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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
eadc15ddc89b5fa04be151cd4538a111dfd81751 | 5,788 | py | Python | ivy/functional/backends/mxnet/statistical.py | SayanJerr/ivy | 7b6ca2b45bae38d260accb6f82c69179519d65eb | [
"Apache-2.0"
] | null | null | null | ivy/functional/backends/mxnet/statistical.py | SayanJerr/ivy | 7b6ca2b45bae38d260accb6f82c69179519d65eb | [
"Apache-2.0"
] | null | null | null | ivy/functional/backends/mxnet/statistical.py | SayanJerr/ivy | 7b6ca2b45bae38d260accb6f82c69179519d65eb | [
"Apache-2.0"
] | null | null | null | from numbers import Number
from typing import Optional, Tuple,Union
import mxnet as mx
#Local
import ivy
from ivy.functional.backends.mxnet import _flat_array_to_1_dim_array, _1_dim_array_to_flat_array, _handle_output
# Array API Standard #
# -------------------#
def sum(x: mx.ndarray.ndarray.NDArray,
axis: Optional[Union[int, Tuple[int, ...]]] = None,
keepdims: bool = False,
out: Optional[mx.ndarray.ndarray.NDArray] = None)\
-> mx.ndarray.ndarray.NDArray:
if axis is None:
num_dims = len(x.shape)
axis = tuple(range(num_dims))
elif isinstance(axis, Number):
axis = (axis,)
elif isinstance(axis, list):
axis = tuple(axis)
if x.shape == ():
x = _flat_array_to_1_dim_array(x)
ret = mx.nd.sum(x, axis=axis, keepdims=keepdims)
if ivy.exists(out):
return ivy.inplace_update(out, _handle_output(x, axis, keepdims, ret))
else:
return _handle_output(x, axis, keepdims, ret)
def prod(x: mx.ndarray.ndarray.NDArray,
axis: Optional[Union[int, Tuple[int, ...]]] = None,
keepdims: bool = False,
out: Optional[mx.ndarray.ndarray.NDArray] = None)\
-> mx.ndarray.ndarray.NDArray:
if axis is None:
num_dims = len(x.shape)
axis = tuple(range(num_dims))
elif isinstance(axis, Number):
axis = (axis,)
elif isinstance(axis, list):
axis = tuple(axis)
if x.shape == ():
x = _flat_array_to_1_dim_array(x)
ret = mx.nd.prod(x, axis=axis, keepdims=keepdims)
if ivy.exists(out):
return ivy.inplace_update(out, _handle_output(x, axis, keepdims, ret))
else:
return _handle_output(x, axis, keepdims, ret)
def mean(x: mx.ndarray.ndarray.NDArray,
axis: Optional[Union[int, Tuple[int, ...]]] = None,
keepdims: bool = False,
out: Optional[mx.ndarray.ndarray.NDArray] = None)\
-> mx.ndarray.ndarray.NDArray:
if axis is None:
num_dims = len(x.shape)
axis = tuple(range(num_dims))
elif isinstance(axis, Number):
axis = (axis,)
elif isinstance(axis, list):
axis = tuple(axis)
if x.shape == ():
x = _flat_array_to_1_dim_array(x)
ret = mx.nd.mean(x, axis=axis, keepdims=keepdims)
if ivy.exists(out):
return ivy.inplace_update(out, _handle_output(x, axis, keepdims, ret))
else:
return _handle_output(x, axis, keepdims, ret)
def var(x:mx.ndarray.ndarray, axis: Union[int, Tuple[int,...]] = None,
keepdims: bool =False, out: Optional[mx.ndarray.ndarray.NDArray] = None)\
-> mx.ndarray.ndarray.NDArray:
mean_of_x_sqrd = mean(x ** 2, axis, keepdims)
mean_of_x = mean(x, axis, keepdims)
is_flat = mean_of_x.shape == ()
if is_flat:
mean_of_x_sqrd = _flat_array_to_1_dim_array(mean_of_x_sqrd)
mean_of_x = _flat_array_to_1_dim_array(mean_of_x)
ret = mean_of_x_sqrd - mean_of_x ** 2
if is_flat:
if ivy.exists(out):
return ivy.inplace_update(out, _1_dim_array_to_flat_array(ret))
else:
return _1_dim_array_to_flat_array(ret)
if ivy.exists(out):
return ivy.inplace_update(out, ret)
else:
return ret
def std(x: mx.ndarray.ndarray.NDArray,
axis: Optional[Union[int, Tuple[int, ...]]] = None,
keepdims: bool = False,
out: Optional[mx.ndarray.ndarray.NDArray] = None)\
-> mx.ndarray.ndarray.NDArray:
red_var = var(x, axis, keepdims)
is_flat = red_var.shape == ()
if is_flat:
red_var = _flat_array_to_1_dim_array(red_var)
red_std = red_var ** 0.5
if is_flat:
if ivy.exists(out):
return ivy.inplace_update(out, _1_dim_array_to_flat_array(red_std))
else:
return _1_dim_array_to_flat_array(red_std)
if ivy.exists(out):
return ivy.inplace_update(out, red_std)
else:
return red_std
def min(x: mx.ndarray.ndarray.NDArray, axis: Union[int, Tuple[int,...]] = None,
keepdims: bool =False, out: Optional[mx.ndarray.ndarray.NDArray] = None)\
-> mx.ndarray.ndarray.NDArray:
if axis is None:
num_dims = len(x.shape)
axis = tuple(range(num_dims))
elif isinstance(axis, Number):
axis = (axis,)
elif isinstance(axis, list):
axis = tuple(axis)
if x.shape == ():
x = _flat_array_to_1_dim_array(x)
ret = mx.nd.min(x, axis=axis, keepdims=keepdims)
if ivy.exists(out):
return ivy.inplace_update(out, _handle_output(x, axis, keepdims, ret))
else:
return _handle_output(x, axis, keepdims, ret)
def max(x: mx.ndarray.ndarray.NDArray, axis: Union[int, Tuple[int,...]] = None,
keepdims: bool =False, out: Optional[mx.ndarray.ndarray.NDArray] = None)\
-> mx.ndarray.ndarray.NDArray:
if axis is None:
num_dims = len(x.shape)
axis = tuple(range(num_dims))
elif isinstance(axis, Number):
axis = (axis,)
elif isinstance(axis, list):
axis = tuple(axis)
if x.shape == ():
x = _flat_array_to_1_dim_array(x)
ret = mx.nd.max(x, axis=axis, keepdims=keepdims)
if ivy.exists(out):
return ivy.inplace_update(out, _handle_output(x, axis, keepdims, ret))
else:
return _handle_output(x, axis, keepdims, ret)
# Extra #
# ------#
def einsum(equation: str,
*operands: mx.ndarray.ndarray.NDArray,
out: Optional[mx.ndarray.ndarray.NDArray] = None)\
-> mx.ndarray.ndarray.NDArray:
if ivy.exists(out):
return ivy.inplace_update(out,mx.np.einsum(equation, *[op.as_np_ndarray() for op in operands]).as_nd_ndarray())
else:
return mx.np.einsum(equation, *[op.as_np_ndarray() for op in operands]).as_nd_ndarray()
| 34.452381 | 119 | 0.62595 | 820 | 5,788 | 4.208537 | 0.089024 | 0.190669 | 0.111272 | 0.153289 | 0.884092 | 0.862938 | 0.845552 | 0.83541 | 0.814547 | 0.765575 | 0 | 0.004102 | 0.24188 | 5,788 | 167 | 120 | 34.658683 | 0.782361 | 0.010194 | 0 | 0.725352 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.056338 | false | 0 | 0.035211 | 0 | 0.232394 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
eaea0ca2b677206136c8a15d8f49f3a466d57d51 | 2,913 | py | Python | networks.py | jmontalvo94/02456_l2rpn | 943cd18031433193dd098d651924b219f373f7ac | [
"MIT"
] | 2 | 2021-03-03T14:27:29.000Z | 2021-12-16T06:31:06.000Z | networks.py | jmontalvo94/02456_l2rpn | 943cd18031433193dd098d651924b219f373f7ac | [
"MIT"
] | null | null | null | networks.py | jmontalvo94/02456_l2rpn | 943cd18031433193dd098d651924b219f373f7ac | [
"MIT"
] | 1 | 2021-03-03T14:29:11.000Z | 2021-03-03T14:29:11.000Z | import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
class NN(nn.Module):
"""Vanilla Neural Network"""
def __init__(self, nn_params):
super().__init__()
# General parameters
self.layers = nn_params['layers']
self.depth = len(self.layers) - 1
# Create architecture
self.nn = nn.Sequential()
self.nn.add_module(f"batchnorm_0", nn.BatchNorm1d(num_features=self.layers[0]))
for n in range(self.depth - 1):
self.nn.add_module(f"layer_{n}", nn.Linear(self.layers[n], self.layers[n + 1]))
self.nn.add_module(f"act_{n}", nn.ReLU())
self.nn.add_module(f"layer_{n + 1}", nn.Linear(self.layers[n + 1], self.layers[n + 2]))
# Optimizer
if nn_params['optimizer'] == 'SGD':
self.optimizer = optim.SGD(self.parameters(), lr=nn_params['learning_rate'])
elif nn_params['optimizer'] == 'ADAM':
self.optimizer = optim.Adam(self.parameters(), lr=nn_params['learning_rate'], weight_decay=nn_params['weight_decay'])
def forward(self, x):
return self.nn(x)
def loss(self, q_outputs, q_targets):
return torch.sum(torch.pow(q_targets - q_outputs, 2))
def update_params(self, new_params, tau):
params = self.state_dict();
for k in params.keys():
params[k] = (1-tau) * params[k] + tau * new_params[k]
self.load_state_dict(params)
class DQN(nn.Module):
"""Deep Q-network with target network"""
def __init__(self, nn_params):
super().__init__()
# General parameters
self.layers = nn_params['layers']
self.depth = len(self.layers) - 1
# Create architecture
self.nn = nn.Sequential()
# self.nn.add_module(f"batchnorm_0", nn.BatchNorm1d(num_features=self.layers[0]))
for n in range(self.depth - 1):
self.nn.add_module(f"layer_{n}", nn.Linear(self.layers[n], self.layers[n + 1]))
self.nn.add_module(f"act_{n}", nn.ReLU())
self.nn.add_module(f"layer_{n + 1}", nn.Linear(self.layers[n + 1], self.layers[n + 2]))
# Optimizer
if nn_params['optimizer'] == 'SGD':
self.optimizer = optim.SGD(self.parameters(), lr=nn_params['learning_rate'])
elif nn_params['optimizer'] == 'ADAM':
self.optimizer = optim.Adam(self.parameters(), lr=nn_params['learning_rate'], weight_decay=nn_params['weight_decay'])
def forward(self, x):
return self.nn(x)
def loss(self, q_outputs, q_targets):
return torch.sum(torch.pow(q_targets - q_outputs, 2))
def update_params(self, new_params, tau):
params = self.state_dict();
for k in params.keys():
params[k] = (1-tau) * params[k] + tau * new_params[k]
self.load_state_dict(params) | 38.328947 | 129 | 0.601099 | 405 | 2,913 | 4.135802 | 0.177778 | 0.050149 | 0.042985 | 0.071642 | 0.914627 | 0.914627 | 0.914627 | 0.914627 | 0.914627 | 0.914627 | 0 | 0.010069 | 0.249914 | 2,913 | 76 | 130 | 38.328947 | 0.756522 | 0.081016 | 0 | 0.862745 | 0 | 0 | 0.07779 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.156863 | false | 0 | 0.078431 | 0.078431 | 0.352941 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
eafcf974daba840d0344b53f18bbea2ad4493186 | 84 | py | Python | src/ui/__init__.py | SqrtMinusOne/SEM6_OpenGL_CourseWork | cf4bda4b989f0c09fe91f676d4094feb75aa54e7 | [
"MIT"
] | 4 | 2020-01-09T13:10:45.000Z | 2021-12-25T20:45:18.000Z | src/ui/__init__.py | SqrtMinusOne/GeoTIFF-3d | cf4bda4b989f0c09fe91f676d4094feb75aa54e7 | [
"MIT"
] | null | null | null | src/ui/__init__.py | SqrtMinusOne/GeoTIFF-3d | cf4bda4b989f0c09fe91f676d4094feb75aa54e7 | [
"MIT"
] | null | null | null | from .open_window import *
from .main_window import *
from .loading_dialog import *
| 21 | 29 | 0.785714 | 12 | 84 | 5.25 | 0.583333 | 0.380952 | 0.507937 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.142857 | 84 | 3 | 30 | 28 | 0.875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 7 |
d803641f79861a57f2197611b08c2e144980f7cc | 154 | py | Python | spikeinterface/toolkit/qualitymetrics/__init__.py | vncntprvst/spikeinterface | dd5ae94f85fe5d9082b45321d2c96ba316eb4b77 | [
"MIT"
] | null | null | null | spikeinterface/toolkit/qualitymetrics/__init__.py | vncntprvst/spikeinterface | dd5ae94f85fe5d9082b45321d2c96ba316eb4b77 | [
"MIT"
] | null | null | null | spikeinterface/toolkit/qualitymetrics/__init__.py | vncntprvst/spikeinterface | dd5ae94f85fe5d9082b45321d2c96ba316eb4b77 | [
"MIT"
] | null | null | null | from .quality_metric_list import *
from .quality_metric_calculator import (compute_quality_metrics,
get_quality_metric_list, QualityMetricCalculator)
| 38.5 | 64 | 0.863636 | 18 | 154 | 6.888889 | 0.555556 | 0.314516 | 0.274194 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.090909 | 154 | 3 | 65 | 51.333333 | 0.885714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.666667 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 7 |
dc5c6ab5104c69934a1834b3e3ae575940d2374e | 9,851 | py | Python | tests/library/test_ceph_osd.py | u-kosmonaft-u/ceph-ansible | 14c472707c165f77def05826b22885480af3e8f9 | [
"Apache-2.0"
] | 1,570 | 2015-01-03T08:38:22.000Z | 2022-03-31T09:24:37.000Z | tests/library/test_ceph_osd.py | u-kosmonaft-u/ceph-ansible | 14c472707c165f77def05826b22885480af3e8f9 | [
"Apache-2.0"
] | 4,964 | 2015-01-05T10:41:44.000Z | 2022-03-31T07:59:49.000Z | tests/library/test_ceph_osd.py | u-kosmonaft-u/ceph-ansible | 14c472707c165f77def05826b22885480af3e8f9 | [
"Apache-2.0"
] | 1,231 | 2015-01-04T11:48:16.000Z | 2022-03-31T12:15:28.000Z | from mock.mock import patch
import os
import pytest
import ca_test_common
import ceph_osd
fake_cluster = 'ceph'
fake_container_binary = 'podman'
fake_container_image = 'quay.ceph.io/ceph/daemon:latest'
fake_id = '42'
fake_ids = ['0', '7', '13']
fake_user = 'client.admin'
fake_keyring = '/etc/ceph/{}.{}.keyring'.format(fake_cluster, fake_user)
invalid_state = 'foo'
class TestCephOSDModule(object):
@patch('ansible.module_utils.basic.AnsibleModule.fail_json')
def test_without_parameters(self, m_fail_json):
ca_test_common.set_module_args({})
m_fail_json.side_effect = ca_test_common.fail_json
with pytest.raises(ca_test_common.AnsibleFailJson) as result:
ceph_osd.main()
result = result.value.args[0]
assert result['msg'] == 'missing required arguments: ids, state'
@patch('ansible.module_utils.basic.AnsibleModule.fail_json')
def test_with_invalid_state(self, m_fail_json):
ca_test_common.set_module_args({
'ids': fake_id,
'state': invalid_state,
})
m_fail_json.side_effect = ca_test_common.fail_json
with pytest.raises(ca_test_common.AnsibleFailJson) as result:
ceph_osd.main()
result = result.value.args[0]
assert result['msg'] == ('value of state must be one of: destroy, down, '
'in, out, purge, rm, got: {}'.format(invalid_state))
@patch('ansible.module_utils.basic.AnsibleModule.exit_json')
def test_with_check_mode(self, m_exit_json):
ca_test_common.set_module_args({
'ids': fake_id,
'state': 'rm',
'_ansible_check_mode': True
})
m_exit_json.side_effect = ca_test_common.exit_json
with pytest.raises(ca_test_common.AnsibleExitJson) as result:
ceph_osd.main()
result = result.value.args[0]
assert not result['changed']
assert result['cmd'] == ['ceph', '-n', fake_user, '-k', fake_keyring, '--cluster', fake_cluster, 'osd', 'rm', fake_id]
assert result['rc'] == 0
assert not result['stdout']
assert not result['stderr']
@patch('ansible.module_utils.basic.AnsibleModule.exit_json')
@patch('ansible.module_utils.basic.AnsibleModule.run_command')
def test_with_failure(self, m_run_command, m_exit_json):
ca_test_common.set_module_args({
'ids': fake_id,
'state': 'rm'
})
m_exit_json.side_effect = ca_test_common.exit_json
stdout = ''
stderr = 'Error EBUSY: osd.{} is still up; must be down before removal.'.format(fake_id)
rc = 16
m_run_command.return_value = rc, stdout, stderr
with pytest.raises(ca_test_common.AnsibleExitJson) as result:
ceph_osd.main()
result = result.value.args[0]
assert result['changed']
assert result['cmd'] == ['ceph', '-n', fake_user, '-k', fake_keyring, '--cluster', fake_cluster, 'osd', 'rm', fake_id]
assert result['rc'] == rc
assert result['stderr'] == stderr
@patch('ansible.module_utils.basic.AnsibleModule.exit_json')
@patch('ansible.module_utils.basic.AnsibleModule.run_command')
@pytest.mark.parametrize('state', ['destroy', 'down', 'in', 'out', 'purge', 'rm'])
def test_set_state(self, m_run_command, m_exit_json, state):
ca_test_common.set_module_args({
'ids': fake_id,
'state': state
})
m_exit_json.side_effect = ca_test_common.exit_json
stdout = ''
stderr = 'marked {} osd.{}'.format(state, fake_id)
rc = 0
m_run_command.return_value = rc, stdout, stderr
cmd = ['ceph', '-n', fake_user, '-k', fake_keyring, '--cluster', fake_cluster, 'osd', state, fake_id]
if state in ['destroy', 'purge']:
cmd.append('--yes-i-really-mean-it')
with pytest.raises(ca_test_common.AnsibleExitJson) as result:
ceph_osd.main()
result = result.value.args[0]
assert result['changed']
assert result['cmd'] == cmd
assert result['rc'] == rc
assert result['stderr'] == stderr
assert result['stdout'] == stdout
@patch('ansible.module_utils.basic.AnsibleModule.exit_json')
@patch('ansible.module_utils.basic.AnsibleModule.run_command')
@pytest.mark.parametrize('state', ['down', 'in', 'out', 'rm'])
def test_set_state_multiple_ids(self, m_run_command, m_exit_json, state):
ca_test_common.set_module_args({
'ids': fake_ids,
'state': state
})
m_exit_json.side_effect = ca_test_common.exit_json
stderr = ''
stdout = ''
for osd in fake_ids:
stderr += 'marked {} osd.{} '.format(state, osd)
rc = 0
m_run_command.return_value = rc, stdout, stderr
cmd = ['ceph', '-n', fake_user, '-k', fake_keyring, '--cluster', fake_cluster, 'osd', state]
cmd.extend(fake_ids)
with pytest.raises(ca_test_common.AnsibleExitJson) as result:
ceph_osd.main()
result = result.value.args[0]
assert result['changed']
assert result['cmd'] == cmd
assert result['rc'] == rc
assert result['stderr'] == stderr
assert result['stdout'] == stdout
@patch('ansible.module_utils.basic.AnsibleModule.fail_json')
@patch('ansible.module_utils.basic.AnsibleModule.run_command')
@pytest.mark.parametrize('state', ['destroy', 'purge'])
def test_invalid_state_multiple_ids(self, m_run_command, m_fail_json, state):
ca_test_common.set_module_args({
'ids': fake_ids,
'state': state
})
m_fail_json.side_effect = ca_test_common.fail_json
with pytest.raises(ca_test_common.AnsibleFailJson) as result:
ceph_osd.main()
result = result.value.args[0]
assert result['msg'] == 'destroy and purge only support one OSD at at time'
assert result['rc'] == 1
@patch('ansible.module_utils.basic.AnsibleModule.exit_json')
@patch('ansible.module_utils.basic.AnsibleModule.run_command')
@pytest.mark.parametrize('state', ['down', 'in', 'out'])
def test_already_set_state(self, m_run_command, m_exit_json, state):
ca_test_common.set_module_args({
'ids': fake_id,
'state': state
})
m_exit_json.side_effect = ca_test_common.exit_json
stdout = ''
stderr = 'osd.{} is already {}.'.format(fake_id, state)
rc = 0
m_run_command.return_value = rc, stdout, stderr
cmd = ['ceph', '-n', fake_user, '-k', fake_keyring, '--cluster', fake_cluster, 'osd', state, fake_id]
with pytest.raises(ca_test_common.AnsibleExitJson) as result:
ceph_osd.main()
result = result.value.args[0]
assert not result['changed']
assert result['cmd'] == cmd
assert result['rc'] == rc
assert result['stderr'] == stderr
assert result['stdout'] == stdout
@patch('ansible.module_utils.basic.AnsibleModule.exit_json')
@patch('ansible.module_utils.basic.AnsibleModule.run_command')
@pytest.mark.parametrize('state', ['down', 'in', 'out', 'rm'])
def test_one_already_set_state_multiple_ids(self, m_run_command, m_exit_json, state):
ca_test_common.set_module_args({
'ids': fake_ids,
'state': state
})
m_exit_json.side_effect = ca_test_common.exit_json
stdout = ''
stderr = 'marked {} osd.{}. osd.{} does not exist. osd.{} does not exist.'.format(state, fake_ids[0], fake_ids[1], fake_ids[2])
rc = 0
m_run_command.return_value = rc, stdout, stderr
cmd = ['ceph', '-n', fake_user, '-k', fake_keyring, '--cluster', fake_cluster, 'osd', state]
cmd.extend(fake_ids)
if state in ['destroy', 'purge']:
cmd.append('--yes-i-really-mean-it')
with pytest.raises(ca_test_common.AnsibleExitJson) as result:
ceph_osd.main()
result = result.value.args[0]
assert result['changed']
assert result['cmd'] == cmd
assert result['rc'] == rc
assert result['stderr'] == stderr
assert result['stdout'] == stdout
@patch.dict(os.environ, {'CEPH_CONTAINER_BINARY': fake_container_binary})
@patch.dict(os.environ, {'CEPH_CONTAINER_IMAGE': fake_container_image})
@patch('ansible.module_utils.basic.AnsibleModule.exit_json')
@patch('ansible.module_utils.basic.AnsibleModule.run_command')
@pytest.mark.parametrize('state', ['destroy', 'down', 'in', 'out', 'purge', 'rm'])
def test_set_state_with_container(self, m_run_command, m_exit_json, state):
ca_test_common.set_module_args({
'ids': fake_id,
'state': state
})
m_exit_json.side_effect = ca_test_common.exit_json
stdout = ''
stderr = 'marked {} osd.{}'.format(state, fake_id)
rc = 0
m_run_command.return_value = rc, stdout, stderr
cmd = [fake_container_binary, 'run', '--rm', '--net=host',
'-v', '/etc/ceph:/etc/ceph:z',
'-v', '/var/lib/ceph/:/var/lib/ceph/:z',
'-v', '/var/log/ceph/:/var/log/ceph/:z',
'--entrypoint=ceph', fake_container_image,
'-n', fake_user, '-k', fake_keyring,
'--cluster', fake_cluster, 'osd', state, fake_id]
if state in ['destroy', 'purge']:
cmd.append('--yes-i-really-mean-it')
with pytest.raises(ca_test_common.AnsibleExitJson) as result:
ceph_osd.main()
result = result.value.args[0]
assert result['changed']
assert result['cmd'] == cmd
assert result['rc'] == rc
assert result['stderr'] == stderr
assert result['stdout'] == stdout
| 40.208163 | 135 | 0.618617 | 1,252 | 9,851 | 4.607029 | 0.108626 | 0.070735 | 0.064494 | 0.067788 | 0.832698 | 0.82819 | 0.81432 | 0.809986 | 0.785541 | 0.785541 | 0 | 0.003745 | 0.240991 | 9,851 | 244 | 136 | 40.372951 | 0.767688 | 0 | 0 | 0.739336 | 0 | 0 | 0.21277 | 0.110446 | 0 | 0 | 0 | 0 | 0.180095 | 1 | 0.047393 | false | 0 | 0.023697 | 0 | 0.075829 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
f4abeb26c7e00bd4bbc2b82e4e9db3b23aea6388 | 8,388 | py | Python | test_gumball_machine.py | cmpe-187/gumball-machine | 8fc2b4bc2704a8c0fe3b707b9fe236e63c4ee32f | [
"MIT"
] | null | null | null | test_gumball_machine.py | cmpe-187/gumball-machine | 8fc2b4bc2704a8c0fe3b707b9fe236e63c4ee32f | [
"MIT"
] | null | null | null | test_gumball_machine.py | cmpe-187/gumball-machine | 8fc2b4bc2704a8c0fe3b707b9fe236e63c4ee32f | [
"MIT"
] | null | null | null | import unittest
import gumball_machine as gumball_machine_class
class NoCurrencyTestCases(unittest.TestCase):
def setUp(self):
self.gumball_machine = gumball_machine_class.GumballMachine()
def test_dispense_red(self):
"""Tests dispensing a red gumball with no currency in the machine"""
# input: dispense_red()
expected_output = "You need at least 5 cents to dispense a red gumball"
actual_output = self.gumball_machine.dispense_red()
self.assertEqual(expected_output, actual_output)
def test_dispense_yellow(self):
"""Tests dispensing a yellow gumball with no currency in the machine"""
# input: dispense_yellow()
expected_output = "You need at least 10 cents to dispense a yellow gumball"
actual_output = self.gumball_machine.dispense_yellow()
self.assertEqual(expected_output, actual_output)
def test_return_my_change(self):
"""Tests returning change with no currency in the machine"""
# input: return_my_change()
expected_output = "There is no change to return"
actual_output = self.gumball_machine.return_my_change()
self.assertEqual(expected_output, actual_output)
class ReturnValidCurrencyTestCases(unittest.TestCase):
def setUp(self):
self.gumball_machine = gumball_machine_class.GumballMachine()
def test_return_nickel(self):
"""Tests inserting a nickel, then returning change"""
# input: insert("nickel"), return_my_change()
expected_output = "Returning your change of 5 cents"
self.gumball_machine.insert("nickel")
actual_output = self.gumball_machine.return_my_change()
self.assertEqual(expected_output, actual_output)
def test_return_dime(self):
"""Tests inserting a dime, then returning change"""
# input: insert("dime"), return_my_change()
expected_output = "Returning your change of 10 cents"
self.gumball_machine.insert("dime")
actual_output = self.gumball_machine.return_my_change()
self.assertEqual(expected_output, actual_output)
def test_return_quarter(self):
"""Tests inserting a quarter, then returning change"""
# input: insert("quarter"), return_my_change()
expected_output = "Returning your change of 25 cents"
self.gumball_machine.insert("quarter")
actual_output = self.gumball_machine.return_my_change()
self.assertEqual(expected_output, actual_output)
class ExactCurrencyTestCases(unittest.TestCase):
def setUp(self):
self.gumball_machine = gumball_machine_class.GumballMachine()
def test_insert_nickel_dispense_red(self):
"""Tests dispensing a red gumball with a nickel (5 cents) in the machine"""
# input: insert("nickel"), dispense_red()
expected_output = "Enjoy your red gumball"
self.gumball_machine.insert("nickel")
actual_output = self.gumball_machine.dispense_red()
self.assertEqual(expected_output, actual_output)
def test_insert_dime_dispense_yellow(self):
"""Tests dispensing a yellow gumball with a dime (10 cents) in the machine"""
# input: insert("dime"), dispense_yellow()
expected_output = "Enjoy your yellow gumball"
self.gumball_machine.insert("dime")
actual_output = self.gumball_machine.dispense_yellow()
self.assertEqual(expected_output, actual_output)
def test_insert_nickels_dispense_yellow(self):
"""Tests dispensing a yellow gumball with two nickels (10 cents) in the machine"""
# input: insert("nickel"), insert("nickel"), dispense_yellow()
expected_output = "Enjoy your yellow gumball"
self.gumball_machine.insert("nickel")
self.gumball_machine.insert("nickel")
actual_output = self.gumball_machine.dispense_yellow()
self.assertEqual(expected_output, actual_output)
class InvalidCurrencyTestCases(unittest.TestCase):
def setUp(self):
self.gumball_machine = gumball_machine_class.GumballMachine()
def test_return_dollar(self):
"""Tests inserting a dollar, then returning change"""
# input: insert("dollar"), return_my_change()
expected_output = "Returning your invalid currency of dollar"
self.gumball_machine.insert("dollar")
actual_output = self.gumball_machine.return_my_change()
self.assertEqual(expected_output, actual_output)
def test_return_dollars(self):
"""Tests inserting multiple dollars, then returning change"""
# input: insert("dollar"), insert("dollar"), return_my_change()
expected_output = "Returning your invalid currency of dollar, dollar"
self.gumball_machine.insert("dollar")
self.gumball_machine.insert("dollar")
actual_output = self.gumball_machine.return_my_change()
self.assertEqual(expected_output, actual_output)
def test_insert_dollar_dispense_red(self):
"""Tests inserting a dollar, then attempting to dispense a red gumball"""
# input: insert("dollar"), dispense_red()
expected_output = "Returning your invalid currency of dollar"
self.gumball_machine.insert("dollar")
actual_output = self.gumball_machine.dispense_red()
self.assertEqual(expected_output, actual_output)
def test_insert_dollar_dispense_yellow(self):
"""Tests inserting a dollar, then attempting to dispense a yellow gumball"""
# input: insert("dollar"), yellow()
expected_output = "Returning your invalid currency of dollar"
self.gumball_machine.insert("dollar")
actual_output = self.gumball_machine.dispense_yellow()
self.assertEqual(expected_output, actual_output)
class MultipleGumballsExactCurrencyTestCases(unittest.TestCase):
def setUp(self):
self.gumball_machine = gumball_machine_class.GumballMachine()
def test_insert_nickels_dispense_reds(self):
"""Tests inserting 2 nickels, and dispensing 2 red gumballs"""
# input: insert("nickel"), insert("nickel"), dispense_red(), dispense_red(), return_my_change()
expected_output = "There is no change to return"
self.gumball_machine.insert("nickel")
self.gumball_machine.insert("nickel")
self.gumball_machine.dispense_red()
self.gumball_machine.dispense_red()
actual_output = self.gumball_machine.return_my_change()
self.assertEqual(expected_output, actual_output)
def test_insert_dime_dispense_reds(self):
"""Tests inserting a dime, and dispensing 2 red gumballs"""
# input: insert("dime"), dispense_red(), dispense_red(), return_my_change()
expected_output = "There is no change to return"
self.gumball_machine.insert("dime")
self.gumball_machine.dispense_red()
self.gumball_machine.dispense_red()
actual_output = self.gumball_machine.return_my_change()
self.assertEqual(expected_output, actual_output)
def test_insert_nickels_dispense_yellows(self):
"""Tests inserting 4 nickels, and dispensing 2 yellow gumballs"""
# input: insert("nickel"), insert("nickel"), insert("nickel"), insert("nickel"), dispense_yellow(), dispense_yellow(), return_my_change()
expected_output = "There is no change to return"
self.gumball_machine.insert("nickel")
self.gumball_machine.insert("nickel")
self.gumball_machine.insert("nickel")
self.gumball_machine.insert("nickel")
self.gumball_machine.dispense_yellow()
self.gumball_machine.dispense_yellow()
actual_output = self.gumball_machine.return_my_change()
self.assertEqual(expected_output, actual_output)
def test_insert_dimes_dispense_yellows(self):
"""Tests inserting 2 dimes, and dispensing 2 yellow gumballs"""
# input: insert("dime"), insert("dime"), dispense_yellow(), dispense_yellow(), return_my_change()
expected_output = "There is no change to return"
self.gumball_machine.insert("dime")
self.gumball_machine.insert("dime")
self.gumball_machine.dispense_yellow()
self.gumball_machine.dispense_yellow()
actual_output = self.gumball_machine.return_my_change()
self.assertEqual(expected_output, actual_output)
if __name__ == '__main__':
unittest.main()
| 42.795918 | 145 | 0.706128 | 986 | 8,388 | 5.741379 | 0.075051 | 0.143438 | 0.162162 | 0.08903 | 0.896661 | 0.838721 | 0.794559 | 0.742448 | 0.742448 | 0.661191 | 0 | 0.002976 | 0.198736 | 8,388 | 195 | 146 | 43.015385 | 0.83931 | 0.23176 | 0 | 0.706897 | 0 | 0 | 0.112425 | 0 | 0 | 0 | 0 | 0 | 0.146552 | 1 | 0.189655 | false | 0 | 0.017241 | 0 | 0.25 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
f4d8f4e6ff7ac090a646e12b14ae31684d5778b1 | 4,752 | py | Python | tests/test_data_transfer_rate_giga_bits_per_second.py | putridparrot/PyUnits | 4f1095c6fc0bee6ba936921c391913dbefd9307c | [
"MIT"
] | null | null | null | tests/test_data_transfer_rate_giga_bits_per_second.py | putridparrot/PyUnits | 4f1095c6fc0bee6ba936921c391913dbefd9307c | [
"MIT"
] | null | null | null | tests/test_data_transfer_rate_giga_bits_per_second.py | putridparrot/PyUnits | 4f1095c6fc0bee6ba936921c391913dbefd9307c | [
"MIT"
] | null | null | null | # <auto-generated>
# This code was generated by the UnitCodeGenerator tool
#
# Changes to this file will be lost if the code is regenerated
# </auto-generated>
import unittest
import units.data_transfer_rate.giga_bits_per_second
class TestGigaBitsPerSecondMethods(unittest.TestCase):
def test_convert_known_giga_bits_per_second_to_bits_per_second(self):
self.assertAlmostEqual(900000.0, units.data_transfer_rate.giga_bits_per_second.to_bits_per_second(0.0009), places=1)
self.assertAlmostEqual(70000.0, units.data_transfer_rate.giga_bits_per_second.to_bits_per_second(0.00007), places=1)
self.assertAlmostEqual(12000.0, units.data_transfer_rate.giga_bits_per_second.to_bits_per_second(1.2e-5), places=1)
def test_convert_known_giga_bits_per_second_to_kilo_bits_per_second(self):
self.assertAlmostEqual(10000.0, units.data_transfer_rate.giga_bits_per_second.to_kilo_bits_per_second(0.01), places=1)
self.assertAlmostEqual(910000.0, units.data_transfer_rate.giga_bits_per_second.to_kilo_bits_per_second(0.91), places=1)
self.assertAlmostEqual(6.1e+6, units.data_transfer_rate.giga_bits_per_second.to_kilo_bits_per_second(6.1), places=1)
def test_convert_known_giga_bits_per_second_to_mega_bits_per_second(self):
self.assertAlmostEqual(6100.0, units.data_transfer_rate.giga_bits_per_second.to_mega_bits_per_second(6.1), places=1)
self.assertAlmostEqual(961.0, units.data_transfer_rate.giga_bits_per_second.to_mega_bits_per_second(0.961), places=1)
self.assertAlmostEqual(1.2, units.data_transfer_rate.giga_bits_per_second.to_mega_bits_per_second(1.2e-3), places=1)
def test_convert_known_giga_bits_per_second_to_tera_bits_per_second(self):
self.assertAlmostEqual(1.2, units.data_transfer_rate.giga_bits_per_second.to_tera_bits_per_second(1200.0), places=1)
self.assertAlmostEqual(90.012, units.data_transfer_rate.giga_bits_per_second.to_tera_bits_per_second(90012.0), places=1)
self.assertAlmostEqual(8.0, units.data_transfer_rate.giga_bits_per_second.to_tera_bits_per_second(8000.0), places=1)
def test_convert_known_giga_bits_per_second_to_kilo_bytes_per_second(self):
self.assertAlmostEqual(150000.0, units.data_transfer_rate.giga_bits_per_second.to_kilo_bytes_per_second(1.2), places=1)
self.assertAlmostEqual(112500.0, units.data_transfer_rate.giga_bits_per_second.to_kilo_bytes_per_second(0.9), places=1)
self.assertAlmostEqual(125.0, units.data_transfer_rate.giga_bits_per_second.to_kilo_bytes_per_second(0.001), places=1)
def test_convert_known_giga_bits_per_second_to_mega_bytes_per_second(self):
self.assertAlmostEqual(112.5, units.data_transfer_rate.giga_bits_per_second.to_mega_bytes_per_second(0.9), places=1)
self.assertAlmostEqual(150.0, units.data_transfer_rate.giga_bits_per_second.to_mega_bytes_per_second(1.2), places=1)
self.assertAlmostEqual(10012.5, units.data_transfer_rate.giga_bits_per_second.to_mega_bytes_per_second(80.1), places=1)
def test_convert_known_giga_bits_per_second_to_giga_bytes_per_second(self):
self.assertAlmostEqual(12.375, units.data_transfer_rate.giga_bits_per_second.to_giga_bytes_per_second(99.0), places=1)
self.assertAlmostEqual(15.390375, units.data_transfer_rate.giga_bits_per_second.to_giga_bytes_per_second(123.123), places=1)
self.assertAlmostEqual(1000.1125, units.data_transfer_rate.giga_bits_per_second.to_giga_bytes_per_second(8000.9), places=1)
def test_convert_known_giga_bits_per_second_to_tera_bytes_per_second(self):
self.assertAlmostEqual(1.125, units.data_transfer_rate.giga_bits_per_second.to_tera_bytes_per_second(9000.0), places=1)
self.assertAlmostEqual(154.320875, units.data_transfer_rate.giga_bits_per_second.to_tera_bytes_per_second(1234567.0), places=1)
self.assertAlmostEqual(0.076625, units.data_transfer_rate.giga_bits_per_second.to_tera_bytes_per_second(613.0), places=1)
def test_convert_known_giga_bits_per_second_to_kibibits_per_second(self):
self.assertAlmostEqual(781250.0, units.data_transfer_rate.giga_bits_per_second.to_kibibits_per_second(0.8), places=1)
self.assertAlmostEqual(11718.75, units.data_transfer_rate.giga_bits_per_second.to_kibibits_per_second(0.012), places=1)
self.assertAlmostEqual(1953.125, units.data_transfer_rate.giga_bits_per_second.to_kibibits_per_second(0.002), places=1)
def test_convert_known_giga_bits_per_second_to_mebibits_per_second(self):
self.assertAlmostEqual(1.9073486, units.data_transfer_rate.giga_bits_per_second.to_mebibits_per_second(0.002), places=1)
self.assertAlmostEqual(858.3068847656, units.data_transfer_rate.giga_bits_per_second.to_mebibits_per_second(0.9), places=1)
self.assertAlmostEqual(5817.413330078, units.data_transfer_rate.giga_bits_per_second.to_mebibits_per_second(6.1), places=1)
if __name__ == '__main__':
unittest.main()
| 74.25 | 129 | 0.856061 | 805 | 4,752 | 4.580124 | 0.129193 | 0.197722 | 0.200976 | 0.189043 | 0.815026 | 0.76729 | 0.705452 | 0.702739 | 0.67182 | 0.602387 | 0 | 0.071729 | 0.049453 | 4,752 | 63 | 130 | 75.428571 | 0.744521 | 0.031355 | 0 | 0 | 1 | 0 | 0.00174 | 0 | 0 | 0 | 0 | 0 | 0.666667 | 1 | 0.222222 | false | 0 | 0.044444 | 0 | 0.288889 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 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 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 |
760c1b671279934e12c0ec04df37f9e6485603ce | 3,650 | py | Python | tests/geographic/outliers/test_find_value_outliers.py | PEM-Humboldt/regi0 | 0d64587d5d87f57cddfc7a67bb8baf74cd70adf2 | [
"MIT"
] | null | null | null | tests/geographic/outliers/test_find_value_outliers.py | PEM-Humboldt/regi0 | 0d64587d5d87f57cddfc7a67bb8baf74cd70adf2 | [
"MIT"
] | 15 | 2022-02-03T11:38:37.000Z | 2022-03-09T23:23:04.000Z | tests/geographic/outliers/test_find_value_outliers.py | PEM-Humboldt/regi0 | 0d64587d5d87f57cddfc7a67bb8baf74cd70adf2 | [
"MIT"
] | null | null | null | """
Test cases for the regi0.geographic.outliers.find_value_outliers function.
"""
import numpy as np
import pandas as pd
from regi0.geographic.outliers import find_value_outliers
def test_iqr(records):
result = find_value_outliers(
records, "scientificName", "minimumElevationInMeters", method="iqr"
)
expected = pd.Series(
[
False,
False,
False,
False,
False,
False,
False,
False,
True,
False,
False,
False,
False,
False,
False,
False,
False,
True,
np.nan,
False,
np.nan,
np.nan,
]
)
pd.testing.assert_series_equal(result, expected)
def test_std(records):
result = find_value_outliers(
records, "scientificName", "minimumElevationInMeters", method="std"
)
expected = pd.Series(
[
False,
False,
False,
False,
False,
False,
False,
False,
True,
False,
False,
False,
False,
False,
False,
False,
False,
True,
np.nan,
False,
np.nan,
np.nan,
]
)
pd.testing.assert_series_equal(result, expected)
def test_zscore(records):
result = find_value_outliers(
records, "scientificName", "minimumElevationInMeters", method="zscore"
)
expected = pd.Series(
[
False,
False,
False,
False,
False,
False,
False,
False,
True,
False,
False,
False,
False,
False,
False,
False,
False,
True,
np.nan,
False,
np.nan,
np.nan,
]
)
pd.testing.assert_series_equal(result, expected)
def test_std_higher_threshold(records):
result = find_value_outliers(
records,
"scientificName",
"minimumElevationInMeters",
method="std",
threshold=3.0,
)
expected = pd.Series(
[
False,
False,
False,
False,
False,
False,
False,
False,
True,
False,
False,
False,
False,
False,
False,
False,
False,
False,
np.nan,
False,
np.nan,
np.nan,
]
)
pd.testing.assert_series_equal(result, expected)
def test_zscore_higher_threshold(records):
result = find_value_outliers(
records,
"scientificName",
"minimumElevationInMeters",
method="zscore",
threshold=3.0,
)
expected = pd.Series(
[
False,
False,
False,
False,
False,
False,
False,
False,
True,
False,
False,
False,
False,
False,
False,
False,
False,
False,
np.nan,
False,
np.nan,
np.nan,
]
)
pd.testing.assert_series_equal(result, expected)
| 20.165746 | 78 | 0.42 | 277 | 3,650 | 5.415162 | 0.137184 | 0.48 | 0.62 | 0.693333 | 0.895333 | 0.895333 | 0.895333 | 0.895333 | 0.895333 | 0.841333 | 0 | 0.003309 | 0.503288 | 3,650 | 180 | 79 | 20.277778 | 0.824049 | 0.020274 | 0 | 0.801205 | 0 | 0 | 0.059137 | 0.033632 | 0 | 0 | 0 | 0 | 0.03012 | 1 | 0.03012 | false | 0 | 0.018072 | 0 | 0.048193 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 1 | 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 | 11 |
52378795dc4649541a390fb7719d4041c7e48919 | 11,691 | py | Python | Tejas_Parab_Tu_HW3/indexer.py | tejasparab1994/CS-6200-Information-Retrieval | b704a11e14429384ee9a9f7a8fc923e23ec22994 | [
"MIT"
] | null | null | null | Tejas_Parab_Tu_HW3/indexer.py | tejasparab1994/CS-6200-Information-Retrieval | b704a11e14429384ee9a9f7a8fc923e23ec22994 | [
"MIT"
] | null | null | null | Tejas_Parab_Tu_HW3/indexer.py | tejasparab1994/CS-6200-Information-Retrieval | b704a11e14429384ee9a9f7a8fc923e23ec22994 | [
"MIT"
] | null | null | null | from collections import defaultdict
import os
from collections import OrderedDict
def main():
corpus = dict()
# user input, based on the user selection, uni, bi or trigram works
n = input("1. Unigram, 2. Bigram, 3. Trigram \n")
# get all the files in the directory mentioned
text_files = [f for f in os.listdir('/Users/tejasparab/Desktop/Python/Assignment 3/Para') if f.endswith('.txt')]
text_files.reverse()
if n == '1':
unigram(text_files, n)
if n == '2':
bigram(text_files, n)
if n == '3':
trigram(text_files, n)
def unigram(text_files, n):
words = []
dict_words = defaultdict(list)
for i in text_files: #opens and reads the contents of a single file and enters the key:value information
#in the dict_words, does so for the entire corpus passed.
with open("Para/" + i, 'r') as f:
val = f.readlines()
print(f.name)
text = ''.join(val)
words.append(text.lower().split(" ")) #cross checking whether all terms lower yet again
flat_words = combined_list(words)
#print(flat_words)
while '' in flat_words:
flat_words.remove('')
for entry in flat_words: #check if the docid, count pair already present for the key
if [os.path.splitext(os.path.basename(f.name))[0], flat_words.count(entry)] in dict_words[entry]:
continue
else: #else append to the values
dict_words[entry].append([os.path.splitext(os.path.basename(f.name))[0], flat_words.count(entry)])
words.clear() #clearing the word_list for the next iteration with a new file
print(dict_words)
table_unigram(dict_words) #function call to the unigram table program and passing the dict_word as parameter
write_uni(dict_words) #unigram.txt output file generated through this function
def table_unigram(dict_words):
count = 0
dict_table = {}
dict_df = {}
for key, value in dict_words.items(): #this loop gets the cumulative frequency of the term in the entire corpus
count = 0
for val in value:
count = count + val[1]
dict_table[key] = count #and stores the new value as a key:value pair in a new dictionary
#print(dict_table)
print(dict_table)
#print(sorted(dict_table.items(), key= lambda x:x[1]))
newDict = OrderedDict(reversed(sorted(dict_table.items(), key= lambda x:x[1])))
print(newDict)
file = open("unigramtfTable.txt", 'a', encoding="ascii",errors= "surrogateescape") #write the table into a .txt file, READ THIS FILE IN PYCHARM FOR BEST RESULTS
file.write("term -> tf" + '\n')
for key, value in newDict.items():
try:
file.write(str(key) + '->' + str(value) + '\n')
except:
pass
file.flush()
file.close()
for key, value in dict_words.items():
df = []
for val in value:
try:
df.append(val[0]) #since value for document id is available at 0th index in the list of values
except:
pass
dict_df[key] = [df, len(df)] #creating a key:value pair with the length of df since this would give us
# how many document_ids are there
print(dict_df)
sort_dict_df = OrderedDict(sorted(dict_df.items()))
sort_dict_df.pop('\n', None)
file = open("unigramdfTable.txt", 'a')
file.write("term -> docID -> df" + '\n')
for k, v in sort_dict_df.items():
try:
file.write(str(k) + '->' + str(v[0]) + '->' + str(v[1]) + '\n') #as mentioned in the assignment format
except:
pass
file.flush()
file.close()
def write_uni(list1):
file = open("unigram" + ".txt", 'a',encoding="ascii",errors= "surrogateescape") # write unigram to unigram.txt file
for k, v in list1.items():
try:
file.write(str(k) + '->' + str(v) + '\n\n') #as mentioned in the assignment format
except:
pass
file.flush()
file.close()
def bigram(text_files, n):
words = []
my_bigrams = []
listoflist = []
dict_words = defaultdict(list)
for i in text_files: #opens and reads the contents of a single file and enters the key:value information
#in the dict_words, does so for the entire corpus passed.
with open("Para/" + i, 'r') as f:
val = f.readlines()
print(f.name)
text = ''.join(val)
words.append(text.lower().split(" "))
flat_words = combined_list(words)
print(flat_words)
while '' in flat_words:
flat_words.remove('')
for i in range(len(flat_words)-1): #-1 since we are checking the next element too here and would result into OutofBounds issue
# check if the docid, count pair already present for the key
if [os.path.splitext(os.path.basename(f.name))[0], flat_words.count(flat_words[i]) + flat_words.count(flat_words[i+1])] in dict_words[flat_words[i], flat_words[i+1]]:
continue
else: #else append to the values
dict_words[flat_words[i], flat_words[i+1]].append([os.path.splitext(os.path.basename(f.name))[0], flat_words.count(flat_words[i])+flat_words.count(flat_words[i+1])])
words.clear() #clearing the word_list for the next iteration with a new file
print(dict_words)
write_bigram(dict_words)
table_bigram(dict_words) #function call to the bigram table program and passing the dict_word as parameter
def table_bigram(dict_words): #works the same way as the unigram function to create table
count = 0
dict_table = {}
dict_df = {}
for key, value in dict_words.items(): #this loop gets the cumulative frequency of the term in the entire corpus
count = 0
for val in value:
count = count + val[1]
dict_table[key] = count #and stores the new value as a key:value pair in a new dictionary
#print(dict_table)
print(dict_table)
#print(sorted(dict_table.items(), key= lambda x:x[1]))
newDict = OrderedDict(reversed(sorted(dict_table.items(), key= lambda x:x[1])))
print(newDict)
file = open("bigramtfTable.txt", 'a', encoding="ascii",errors= "surrogateescape") #write the table into a .txt file, READ THIS FILE IN PYCHARM FOR BEST RESULTS
file.write("term -> tf" + '\n')
for key, value in newDict.items():
try:
file.write(str(key) + '->' + str(value) + '\n')
except:
pass
file.flush()
file.close()
for key, value in dict_words.items():
df = []
for val in value:
try:
df.append(val[0]) #since value for document id is available at 0th index in the list of values
except:
pass
dict_df[key] = [df, len(df)] #creating a key:value pair with the length of df since this would give us
# how many document_ids are there
print(dict_df)
sort_dict_df = OrderedDict(sorted(dict_df.items()))
sort_dict_df.pop('\n', None)
file = open("bigramdfTable.txt", 'a')
file.write("term -> docID -> df" + '\n')
for k, v in sort_dict_df.items():
try:
file.write(str(k) + '->' + str(v[0]) + '->' + str(v[1]) + '\n') #as mentioned in the assignment format
except:
pass
file.flush()
file.close()
def write_bigram(list1):
file = open("bigram" + ".txt", 'a', encoding="ascii", errors= "surrogateescape")
for k,v in list1.items():
try:
file.write(str(k) + '->' + str(v) + '\n\n')
except:
pass
file.flush()
file.close()
def trigram(text_files, n):
words = []
my_bigrams = []
listoflist = []
dict_words = defaultdict(list)
for i in text_files:
with open("Para/" + i, 'r') as f:
val = f.readlines()
print(f.name)
text = ''.join(val)
words.append(text.lower().split(" "))
flat_words = combined_list(words)
print(flat_words)
while '' in flat_words:
flat_words.remove('')
for i in range(len(flat_words)-2): #here we check the next 2 values too, hence len -2, or OutOfBounds issue
#here we check whether the docid,
if [os.path.splitext(os.path.basename(f.name))[0], flat_words.count(flat_words[i]) + flat_words.count(flat_words[i+1]) + flat_words.count(flat_words[i+2])] in dict_words[flat_words[i], flat_words[i+1], flat_words[i+2]]:
continue
else:
dict_words[flat_words[i], flat_words[i+1], flat_words[i+2]].append([os.path.splitext(os.path.basename(f.name))[0], flat_words.count(flat_words[i])+flat_words.count(flat_words[i+1])+flat_words.count(flat_words[i+2])])
#print(flat_bigrams[0:2])
words.clear()
print(dict_words)
write_trigram(dict_words)
table_trigram(dict_words)
def table_trigram(dict_words): #works the same as unigram and bigram table creation function, created separate for
#understanding better
count = 0
dict_table = {}
dict_df = {}
for key, value in dict_words.items(): #this loop gets the cumulative frequency of the term in the entire corpus
count = 0
for val in value:
count = count + val[1]
dict_table[key] = count #and stores the new value as a key:value pair in a new dictionary
#print(dict_table)
print(dict_table)
#print(sorted(dict_table.items(), key= lambda x:x[1]))
newDict = OrderedDict(reversed(sorted(dict_table.items(), key= lambda x:x[1])))
print(newDict)
file = open("trigramtfTable.txt", 'a', encoding="ascii",errors= "surrogateescape") #write the table into a .txt file, READ THIS FILE IN PYCHARM FOR BEST RESULTS
file.write("term -> tf" + '\n')
for key, value in newDict.items():
try:
file.write(str(key) + '->' + str(value) + '\n')
except:
pass
file.flush()
file.close()
for key, value in dict_words.items():
df = []
for val in value:
try:
df.append(val[0]) #since value for document id is available at 0th index in the list of values
except:
pass
dict_df[key] = [df, len(df)] #creating a key:value pair with the length of df since this would give us
# how many document_ids are there
print(dict_df)
sort_dict_df = OrderedDict(sorted(dict_df.items()))
sort_dict_df.pop('\n', None)
file = open("trigramdfTable.txt", 'a')
file.write("term -> docID -> df" + '\n')
for k, v in sort_dict_df.items():
try:
file.write(str(k) + '->' + str(v[0]) + '->' + str(v[1]) + '\n') #as mentioned in the assignment format
except:
pass
file.flush()
file.close()
def write_trigram(list1):
file = open("trigram" + ".txt", 'a', encoding="ascii",errors= "surrogateescape") # get filename without spaces
for k,v in list1.items():
try:
file.write(str(k) + '->' + str(v) + '\n\n')
except:
pass
file.flush()
file.close()
def combined_list(list1):
flat_list = []
for sublist in list1:
for item in sublist:
flat_list.append(item)
return flat_list
main() | 36.880126 | 232 | 0.587974 | 1,634 | 11,691 | 4.106487 | 0.127295 | 0.06304 | 0.029806 | 0.026826 | 0.807154 | 0.797019 | 0.777943 | 0.771535 | 0.771535 | 0.742772 | 0 | 0.008072 | 0.290052 | 11,691 | 317 | 233 | 36.880126 | 0.800361 | 0.250535 | 0 | 0.775 | 0 | 0 | 0.061323 | 0.004938 | 0 | 0 | 0 | 0 | 0 | 1 | 0.045833 | false | 0.05 | 0.0125 | 0 | 0.0625 | 0.070833 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
525f097e6cda1d3f421abe184ba3839ee1b3fba7 | 74 | py | Python | nasws/cnn/search_space/nasbench201/lib/aa_nas_api/__init__.py | kcyu2014/nas-landmarkreg | a00c3619bf4042e446e1919087f0b09fe9fa3a65 | [
"MIT"
] | 8 | 2021-04-13T01:52:11.000Z | 2022-03-30T03:53:12.000Z | nasws/cnn/search_space/nasbench201/lib/aa_nas_api/__init__.py | kcyu2014/nas-landmarkreg | a00c3619bf4042e446e1919087f0b09fe9fa3a65 | [
"MIT"
] | 4 | 2021-05-29T01:41:00.000Z | 2021-08-24T09:40:43.000Z | nasws/cnn/search_space/nasbench201/lib/aa_nas_api/__init__.py | kcyu2014/nas-landmarkreg | a00c3619bf4042e446e1919087f0b09fe9fa3a65 | [
"MIT"
] | null | null | null | from .api import AANASBenchAPI
from .api import ArchResults, ResultsCount
| 24.666667 | 42 | 0.837838 | 9 | 74 | 6.888889 | 0.666667 | 0.225806 | 0.419355 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.121622 | 74 | 2 | 43 | 37 | 0.953846 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 7 |
5292907bd1b1ebfc75cdb3fe1c9a31f982b6d6b2 | 7,544 | py | Python | test/test_polytomous.py | eribean/girth_mcmc | 911376eabf693b517683af8372984b589d6f7e09 | [
"MIT"
] | 6 | 2020-12-29T21:19:55.000Z | 2021-11-25T17:36:29.000Z | test/test_polytomous.py | eribean/girth_mcmc | 911376eabf693b517683af8372984b589d6f7e09 | [
"MIT"
] | 9 | 2020-12-29T00:52:49.000Z | 2021-11-04T14:36:57.000Z | test/test_polytomous.py | eribean/girth_mcmc | 911376eabf693b517683af8372984b589d6f7e09 | [
"MIT"
] | null | null | null | import unittest
import numpy as np
from girth.synthetic import create_synthetic_irt_polytomous
from girth_mcmc import GirthMCMC
class TestPolytomous(unittest.TestCase):
"""Tests the mcmc for polytomous data."""
# Only smoke tests for now
def test_graded_response(self):
"""Testing the grm."""
np.random.seed(46899)
n_categories = 3
difficulty = np.random.randn(5, n_categories-1)
difficulty = np.sort(difficulty, 1)
discrimination = 0.96 * np.sqrt(-2 * np.log(np.random.rand(5)))
theta = np.random.randn(150)
syn_data = create_synthetic_irt_polytomous(difficulty, discrimination,
theta, model='grm')
girth_model = GirthMCMC(model='GRM', model_args=(n_categories,),
options={'n_tune': 1000, 'n_samples': 1000})
result = girth_model(syn_data, progressbar=False)
def test_partial_credit(self):
"""Testing Partial Credit Model."""
rng = np.random.default_rng(84445166253145643984335315216)
n_categories = 3
difficulty = np.random.randn(5, n_categories-1)
discrimination = 0.96 * np.sqrt(-2 * np.log(np.random.rand(5)))
theta = np.random.randn(150)
syn_data = create_synthetic_irt_polytomous(difficulty, discrimination,
theta, model='pcm')
girth_model = GirthMCMC(model='PCM', model_args=(n_categories,),
options={'n_tune': 1000, 'n_samples': 1000})
result = girth_model(syn_data, progressbar=False)
def test_multidimensional_grm(self):
"""Testing Multidimensional GRM."""
rng = np.random.default_rng(29452344633211231635433213)
n_categories = 3
n_factors = 2
discrimnation = rng.uniform(-2, 2, (20, n_factors))
difficulty = np.sort(rng.standard_normal((20, n_categories - 1))*.5, axis=1)*-1
thetas = rng.standard_normal((n_factors, 250))
syn_data = create_synthetic_irt_polytomous(difficulty, discrimnation,
thetas, model='grm_md', seed=rng)
girth_model = GirthMCMC(model='GRM_MD', model_args=(n_categories, n_factors),
options={'n_tune': 1000, 'n_samples': 1000})
result = girth_model(syn_data, progressbar=False)
with self.assertRaises(AssertionError):
girth_model = GirthMCMC(model='GRM_MD', model_args=(n_categories, 1),
options={'n_tune': 1000, 'n_samples': 1000})
result = girth_model(syn_data, progressbar=False)
def test_multidimensional_pcm(self):
"""Testing Multidimensional PCM."""
rng = np.random.default_rng(29452344633211231635433213)
n_categories = 3
n_factors = 2
discrimnation = rng.uniform(-2, 2, (20, n_factors))
difficulty = np.sort(rng.standard_normal((20, n_categories - 1))*.5, axis=1)*-1
thetas = rng.standard_normal((n_factors, 250))
syn_data = create_synthetic_irt_polytomous(difficulty, discrimnation,
thetas, model='grm_md', seed=rng)
girth_model = GirthMCMC(model='PCM_MD', model_args=(n_categories, n_factors),
options={'n_tune': 1000, 'n_samples': 1000})
result = girth_model(syn_data, progressbar=False)
with self.assertRaises(AssertionError):
girth_model = GirthMCMC(model='PCM_MD', model_args=(n_categories, 1),
options={'n_tune': 1000, 'n_samples': 1000})
result = girth_model(syn_data, progressbar=False)
class TestPolytomousVariational(unittest.TestCase):
"""Tests variational inference for polytomous data."""
# Only smoke tests for now
def test_graded_response(self):
"""Testing the grm."""
np.random.seed(67841)
n_categories = 3
difficulty = np.random.randn(5, n_categories-1)
difficulty = np.sort(difficulty, 1)
discrimination = 0.96 * np.sqrt(-2 * np.log(np.random.rand(5)))
theta = np.random.randn(150)
syn_data = create_synthetic_irt_polytomous(difficulty, discrimination,
theta, model='grm')
girth_model = GirthMCMC(model='GRM', model_args=(n_categories,),
options={'variational_inference': True,
'variational_samples': 1000,
'n_samples': 1000})
result = girth_model(syn_data, progressbar=False)
def test_partial_credit(self):
"""Testing Partial Credit Model Variational Inference."""
rng = np.random.default_rng(84445166253145643984335315216)
n_categories = 3
difficulty = np.random.randn(5, n_categories-1)
discrimination = 0.96 * np.sqrt(-2 * np.log(np.random.rand(5)))
theta = np.random.randn(150)
syn_data = create_synthetic_irt_polytomous(difficulty, discrimination,
theta, model='pcm')
girth_model = GirthMCMC(model='PCM', model_args=(n_categories,),
options={'variational_inference': True,
'variational_samples': 1000,
'n_samples': 1000})
result = girth_model(syn_data, progressbar=False)
def test_multidimensional_grm(self):
"""Testing Multidimensional Variational GRM."""
rng = np.random.default_rng(41651654413554315613453234)
n_categories = 3
n_factors = 2
discrimnation = rng.uniform(-2, 2, (20, n_factors))
difficulty = np.sort(rng.standard_normal((20, n_categories-1))*.5, axis=1)*-1
thetas = rng.standard_normal((n_factors, 250))
syn_data = create_synthetic_irt_polytomous(difficulty, discrimnation,
thetas, model='grm_md', seed=rng)
girth_model = GirthMCMC(model='GRM_MD', model_args=(n_categories, n_factors),
options={'variational_inference': True,
'variational_samples': 1000,
'n_samples': 1000})
result = girth_model(syn_data, progressbar=False)
def test_multidimensional_pcm(self):
"""Testing Multidimensional Variational PCM."""
rng = np.random.default_rng(8484959050677840349349)
n_categories = 3
n_factors = 2
discrimnation = rng.uniform(-2, 2, (20, n_factors))
difficulty = np.sort(rng.standard_normal((20, n_categories-1))*.5, axis=1)*-1
thetas = rng.standard_normal((n_factors, 250))
syn_data = create_synthetic_irt_polytomous(difficulty, discrimnation,
thetas, model='grm_md', seed=rng)
girth_model = GirthMCMC(model='PCM_MD', model_args=(n_categories, n_factors),
options={'variational_inference': True,
'variational_samples': 1000,
'n_samples': 1000})
result = girth_model(syn_data, progressbar=False)
if __name__ == '__main__':
unittest.main()
| 43.108571 | 95 | 0.57781 | 796 | 7,544 | 5.237437 | 0.114322 | 0.068602 | 0.028784 | 0.057568 | 0.916287 | 0.916287 | 0.903334 | 0.903334 | 0.903334 | 0.903334 | 0 | 0.069126 | 0.317338 | 7,544 | 174 | 96 | 43.356322 | 0.740388 | 0.052359 | 0 | 0.881356 | 0 | 0 | 0.053262 | 0.011836 | 0 | 0 | 0 | 0 | 0.016949 | 1 | 0.067797 | false | 0 | 0.033898 | 0 | 0.118644 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
8735f41ebc04dbb67ab22d756abcdffa3f0981e1 | 6,690 | py | Python | trackpy/tests/test_mask.py | freemansw1/trackpy | a316c658ffd03d4b6fe705b9bedd63c1ab8276c0 | [
"BSD-3-Clause"
] | 315 | 2015-01-06T14:05:04.000Z | 2022-03-28T05:17:30.000Z | trackpy/tests/test_mask.py | magnunor/trackpy | a5e11426d54d34505267154f94f97bb434fd1812 | [
"BSD-3-Clause"
] | 487 | 2015-01-05T02:02:23.000Z | 2022-03-04T21:37:57.000Z | trackpy/tests/test_mask.py | magnunor/trackpy | a5e11426d54d34505267154f94f97bb434fd1812 | [
"BSD-3-Clause"
] | 117 | 2015-02-05T18:31:43.000Z | 2022-02-28T20:56:58.000Z | import numpy as np
from numpy.testing import assert_equal
from trackpy.masks import slice_image, mask_image
from trackpy.tests.common import StrictTestCase
class TestSlicing(StrictTestCase):
def test_slicing_2D(self):
im = np.empty((9, 9))
# center
for radius in range(1, 5):
sli, origin = slice_image([4, 4], im, radius)
assert_equal(sli.shape, (radius*2+1,) * 2)
assert_equal(origin, (4 - radius,) * 2)
# edge
for radius in range(1, 5):
sli, origin = slice_image([0, 4], im, radius)
assert_equal(sli.shape, (radius + 1, radius*2+1))
# edge
for radius in range(1, 5):
sli, origin = slice_image([4, 0], im, radius)
assert_equal(sli.shape, (radius*2+1, radius + 1))
# corner
for radius in range(1, 5):
sli, origin = slice_image([0, 0], im, radius)
assert_equal(sli.shape, (radius+1, radius + 1))
# outside of image
for radius in range(2, 5):
sli, origin = slice_image([-1, 4], im, radius)
assert_equal(sli.shape, (radius, radius*2+1))
# outside of image
for radius in range(2, 5):
sli, origin = slice_image([-1, -1], im, radius)
assert_equal(sli.shape, (radius, radius))
# no slice
for radius in range(2, 5):
sli, origin = slice_image([-10, 20], im, radius)
assert_equal(sli.shape, (0, 0))
def test_slicing_3D(self):
im = np.empty((9, 9, 9))
# center
for radius in range(1, 5):
sli, origin = slice_image([4, 4, 4], im, radius)
assert_equal(sli.shape, (radius*2+1,) * 3)
assert_equal(origin, (4 - radius,) * 3)
# face
for radius in range(1, 5):
sli, origin = slice_image([0, 4, 4], im, radius)
assert_equal(sli.shape, (radius + 1, radius*2+1, radius*2+1))
# edge
for radius in range(1, 5):
sli, origin = slice_image([4, 0, 0], im, radius)
assert_equal(sli.shape, (radius*2+1, radius + 1, radius + 1))
# corner
for radius in range(1, 5):
sli, origin = slice_image([0, 0, 0], im, radius)
assert_equal(sli.shape, (radius+1, radius + 1, radius + 1))
# outside of image
for radius in range(2, 5):
sli, origin = slice_image([-1, 4, 4], im, radius)
assert_equal(sli.shape, (radius, radius*2+1, radius*2+1))
# outside of image
for radius in range(2, 5):
sli, origin = slice_image([-1, -1, 4], im, radius)
assert_equal(sli.shape, (radius, radius, radius*2+1))
# no slice
for radius in range(2, 5):
sli, origin = slice_image([-10, 20, 30], im, radius)
assert_equal(sli.shape, (0, 0, 0))
def test_slicing_2D_multiple(self):
im = np.empty((9, 9))
radius = 2
sli, origin = slice_image([[4, 4], [4, 4]], im, radius)
assert_equal(sli.shape, (5, 5))
assert_equal(origin, (2, 2))
sli, origin = slice_image([[4, 2], [4, 6]], im, radius)
assert_equal(sli.shape, (5, 9))
assert_equal(origin, (2, 0))
sli, origin = slice_image([[2, 4], [6, 4]], im, radius)
assert_equal(sli.shape, (9, 5))
assert_equal(origin, (0, 2))
sli, origin = slice_image([[2, 4], [6, 4], [-10, 20]], im, radius)
assert_equal(sli.shape, (9, 5))
assert_equal(origin, (0, 2))
def test_slicing_3D_multiple(self):
im = np.empty((9, 9, 9))
radius = 2
sli, origin = slice_image([[4, 4, 4], [4, 4, 4]], im, radius)
assert_equal(sli.shape, (5, 5, 5))
assert_equal(origin, (2, 2, 2))
sli, origin = slice_image([[4, 2, 4], [4, 6, 4]], im, radius)
assert_equal(sli.shape, (5, 9, 5))
assert_equal(origin, (2, 0, 2))
sli, origin = slice_image([[4, 2, 6], [4, 6, 2]], im, radius)
assert_equal(sli.shape, (5, 9, 9))
assert_equal(origin, (2, 0, 0))
sli, origin = slice_image([[4, 2, 4], [4, 6, 4], [-10, 4, 4]], im, radius)
assert_equal(sli.shape, (5, 9, 5))
assert_equal(origin, (2, 0, 2))
class TestMasking(StrictTestCase):
def test_masking_single_2D(self):
im = np.ones((9, 9))
radius = 1 # N pix is 5
sli = mask_image([4, 4], im, radius)
assert_equal(sli.sum(), 5)
assert_equal(sli.shape, im.shape)
sli = mask_image([0, 4], im, radius)
assert_equal(sli.sum(), 4)
sli = mask_image([4, 0], im, radius)
assert_equal(sli.sum(), 4)
sli = mask_image([0, 0], im, radius)
assert_equal(sli.sum(), 3)
sli = mask_image([-1, 4], im, radius)
assert_equal(sli.sum(), 1)
sli = mask_image([-1, -1], im, radius)
assert_equal(sli.sum(), 0)
def test_masking_multiple_2D(self):
im = np.ones((9, 9))
radius = 1 # N pix is 5
sli = mask_image([[4, 2], [4, 6]], im, radius)
assert_equal(sli.sum(), 10)
sli = mask_image([[4, 4], [4, 4]], im, radius)
assert_equal(sli.sum(), 5)
sli = mask_image([[0, 4], [4, 4]], im, radius)
assert_equal(sli.sum(), 9)
sli = mask_image([[-1, 4], [4, 4]], im, radius)
assert_equal(sli.sum(), 6)
sli = mask_image([[-20, 40], [4, 4]], im, radius)
assert_equal(sli.sum(), 5)
def test_masking_single_3D(self):
im = np.ones((9, 9, 9))
radius = 1 # N pix is 7
sli = mask_image([4, 4, 4], im, radius)
assert_equal(sli.sum(), 7)
assert_equal(sli.shape, im.shape)
sli = mask_image([0, 4, 4], im, radius)
assert_equal(sli.sum(), 6)
sli = mask_image([4, 0, 0], im, radius)
assert_equal(sli.sum(), 5)
sli = mask_image([0, 0, 0], im, radius)
assert_equal(sli.sum(), 4)
sli = mask_image([-1, 4, 4], im, radius)
assert_equal(sli.sum(), 1)
sli = mask_image([-1, -1, -1], im, radius)
assert_equal(sli.sum(), 0)
def test_masking_multiple_3D(self):
im = np.ones((9, 9, 9))
radius = 1 # N pix is 7
sli = mask_image([[4, 4, 4], [4, 4, 4]], im, radius)
assert_equal(sli.sum(), 7)
assert_equal(sli.shape, im.shape)
sli = mask_image([[4, 4, 6], [4, 4, 2]], im, radius)
assert_equal(sli.sum(), 14)
sli = mask_image([[4, 4, 0], [4, 4, 4]], im, radius)
assert_equal(sli.sum(), 13)
if __name__ == '__main__':
import unittest
unittest.main()
| 31.116279 | 82 | 0.526009 | 991 | 6,690 | 3.419778 | 0.068618 | 0.181765 | 0.185896 | 0.235468 | 0.89938 | 0.869578 | 0.841546 | 0.805842 | 0.742697 | 0.717911 | 0 | 0.071552 | 0.310613 | 6,690 | 214 | 83 | 31.261682 | 0.66327 | 0.026457 | 0 | 0.380282 | 0 | 0 | 0.001232 | 0 | 0 | 0 | 0 | 0 | 0.394366 | 1 | 0.056338 | false | 0 | 0.035211 | 0 | 0.105634 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
873b7be0bb03623bef51e6ca240d403e98a5a803 | 390 | py | Python | badicalpy/test.py | BahaiCalendar/BadiCalPY | 8fc803f214828fa8e85f8119a1190131deb9226c | [
"MIT"
] | null | null | null | badicalpy/test.py | BahaiCalendar/BadiCalPY | 8fc803f214828fa8e85f8119a1190131deb9226c | [
"MIT"
] | null | null | null | badicalpy/test.py | BahaiCalendar/BadiCalPY | 8fc803f214828fa8e85f8119a1190131deb9226c | [
"MIT"
] | null | null | null | import BadiCal
date = BadiCal.GregorianToBadi(2015, 3, 21);
print(date.year(), date.month(), date.day());
date = BadiCal.GregorianToBadi(2015, 3, 21, True);
print(date.year(), date.month(), date.day());
date = BadiCal.BadiToGregorian(172, 1, 1);
print(date.year(), date.month(), date.day());
date = BadiCal.BadiToGregorian(172, 1, 1, True);
print(date.year(), date.month(), date.day()); | 30 | 50 | 0.679487 | 56 | 390 | 4.732143 | 0.267857 | 0.166038 | 0.196226 | 0.256604 | 0.950943 | 0.950943 | 0.743396 | 0.743396 | 0.603774 | 0.45283 | 0 | 0.068376 | 0.1 | 390 | 13 | 51 | 30 | 0.68661 | 0 | 0 | 0.444444 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.111111 | 0 | 0.111111 | 0.444444 | 0 | 0 | 0 | null | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 7 |
5e514614a67e8a82d95fc209b951271c7a2f904c | 1,841 | py | Python | test_plot.py | md920/Lent-Project | 4e04951550e0dcf6869c9b78e505835f75dcea0b | [
"MIT"
] | 1 | 2022-01-29T18:20:36.000Z | 2022-01-29T18:20:36.000Z | test_plot.py | md920/Lent-Project | 4e04951550e0dcf6869c9b78e505835f75dcea0b | [
"MIT"
] | null | null | null | test_plot.py | md920/Lent-Project | 4e04951550e0dcf6869c9b78e505835f75dcea0b | [
"MIT"
] | null | null | null | from socket import IPPORT_RESERVED
from floodsystem.plot import *
from datetime import datetime
from floodsystem.station import MonitoringStation
def test_plot_water_levels():
s_id = "test-s-id"
m_id = "test-m-id"
label = "some station"
coord = (-2.0, 4.0)
trange = (-2.3, 3.4445)
river = "River X"
town = "My Town"
s = MonitoringStation(s_id, m_id, label, coord, trange, river, town)
s.latest_level = 10
assert plot_water_levels(s, "hello",[0.314]) == None
assert plot_water_levels(s, [datetime(2022,1,15,12,13,14)], "hello") == None
assert plot_water_levels(s, [], []) == None
assert plot_water_levels(s, ["hello"], [0.344]) == None
assert plot_water_levels(s, [datetime(2022,1,15,12,13,14)], ["hello"]) == None
assert plot_water_levels("hello", [datetime(2022,1,15,12,13,14)], ["hello"]) == None
def test_plot_water_level_with_fit():
s_id = "test-s-id"
m_id = "test-m-id"
label = "some station"
coord = (-2.0, 4.0)
trange = (-2.3, 3.4445)
river = "River X"
town = "My Town"
s = MonitoringStation(s_id, m_id, label, coord, trange, river, town)
s.latest_level = 10
assert plot_water_level_with_fit(s, "hello",[0.314], 3) == None
assert plot_water_level_with_fit(s, [datetime(2022,1,15,12,13,14)], "hello", 3) == None
assert plot_water_level_with_fit(s, [], [], 3) == None
assert plot_water_level_with_fit(s, ["hello"], [0.344], 3) == None
assert plot_water_level_with_fit(s, [datetime(2022,1,15,12,13,14)], ["hello"], 3) == None
assert plot_water_level_with_fit("hello", [datetime(2022,1,15,12,13,14)], [0.314], 3) == None
assert plot_water_level_with_fit(s, [datetime(2022,1,15,12,13,14)], [0.314], "hello") == None
assert plot_water_level_with_fit(s, [datetime(2022,1,15,12,13,14)], [0.314], -2) == None
| 40.911111 | 97 | 0.649647 | 305 | 1,841 | 3.714754 | 0.15082 | 0.127096 | 0.185349 | 0.201236 | 0.850838 | 0.846425 | 0.823477 | 0.78729 | 0.778464 | 0.682259 | 0 | 0.108481 | 0.173819 | 1,841 | 44 | 98 | 41.840909 | 0.636423 | 0 | 0 | 0.473684 | 0 | 0 | 0.080391 | 0 | 0 | 0 | 0 | 0 | 0.368421 | 1 | 0.052632 | false | 0 | 0.105263 | 0 | 0.157895 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
5ecaa0649d34c58b1530696042a4d2f651849845 | 200 | py | Python | remediation-functions/iam/__init__.py | Cloudneeti/aws-auto-remediation | d9dc91f1cacfdbc209b624bde9ca783cfadc4509 | [
"MIT"
] | 8 | 2019-09-26T12:53:01.000Z | 2021-05-14T17:39:21.000Z | remediation-functions/iam/__init__.py | Cloudneeti/aws-auto-remediation | d9dc91f1cacfdbc209b624bde9ca783cfadc4509 | [
"MIT"
] | 1 | 2020-02-18T06:22:25.000Z | 2020-02-18T06:22:25.000Z | remediation-functions/iam/__init__.py | Cloudneeti/aws-auto-remediation | d9dc91f1cacfdbc209b624bde9ca783cfadc4509 | [
"MIT"
] | 8 | 2020-01-08T13:16:26.000Z | 2021-07-25T08:03:27.000Z | __all__ = ["iam_minimum_passwordlength", "iam_require_lowercaseletters", "iam_require_numbers", "iam_require_symbols", "iam_require_uppercaseletters", "iam_password_reuse", "iam_password_expiration"]
| 100 | 199 | 0.84 | 22 | 200 | 6.818182 | 0.545455 | 0.266667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.045 | 200 | 1 | 200 | 200 | 0.78534 | 0 | 0 | 0 | 0 | 0 | 0.805 | 0.525 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 7 |
219d6b842cec0be16c95fb191151af08a5350140 | 6 | py | Python | test/scripts/syntaxerr.py | codders/mitmproxy | 4f9deae8fc2b5f8b0519f82b1f3cdda6c115b475 | [
"MIT"
] | 3 | 2016-10-08T05:19:11.000Z | 2020-05-29T20:08:56.000Z | test/scripts/syntaxerr.py | huyphan/mitmproxy | 5259aeb3264423204e84072d9e1b3ace4f6e6031 | [
"MIT"
] | null | null | null | test/scripts/syntaxerr.py | huyphan/mitmproxy | 5259aeb3264423204e84072d9e1b3ace4f6e6031 | [
"MIT"
] | 1 | 2015-08-20T02:20:27.000Z | 2015-08-20T02:20:27.000Z |
a +
| 1.5 | 3 | 0.166667 | 1 | 6 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.666667 | 6 | 3 | 4 | 2 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0 | 1 | 1 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
21c7e7a216337bfe00f125982a3c109dd5005716 | 129 | py | Python | src/lime_python/protocol/client/channels/__init__.py | mirlarof/lime-python | 9961379562bd9d362b16c0ee66f3bde652070b22 | [
"Apache-2.0"
] | 2 | 2019-09-10T15:10:11.000Z | 2021-02-05T21:44:38.000Z | src/lime_python/protocol/client/channels/__init__.py | mirlarof/lime-python | 9961379562bd9d362b16c0ee66f3bde652070b22 | [
"Apache-2.0"
] | 9 | 2021-05-19T21:08:15.000Z | 2021-05-31T20:43:26.000Z | src/lime_python/protocol/client/channels/__init__.py | mirlarof/lime-python | 9961379562bd9d362b16c0ee66f3bde652070b22 | [
"Apache-2.0"
] | 3 | 2019-09-10T15:10:32.000Z | 2022-01-24T13:36:46.000Z | from .command_channel import *
from .message_channel import *
from .notification_channel import *
from .session_channel import *
| 25.8 | 35 | 0.813953 | 16 | 129 | 6.3125 | 0.4375 | 0.514851 | 0.504951 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.124031 | 129 | 4 | 36 | 32.25 | 0.893805 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 7 |
21f9a57d61323f5913283ae2568a838ada55b840 | 1,592 | py | Python | Sec8_Tree/q0889.py | OctoberChang/LeetCode-Solutions | bb7958194e7b196729611cbad19ee792ba41c429 | [
"MIT"
] | 2 | 2021-01-26T00:59:47.000Z | 2021-11-20T02:55:13.000Z | Sec8_Tree/q0889.py | OctoberChang/LeetCode-Solutions | bb7958194e7b196729611cbad19ee792ba41c429 | [
"MIT"
] | null | null | null | Sec8_Tree/q0889.py | OctoberChang/LeetCode-Solutions | bb7958194e7b196729611cbad19ee792ba41c429 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def constructFromPrePost(self, pre: List[int], post: List[int]) -> TreeNode:
# i: start index of pre
# j: start index of post
# n: length
def build(i, j, n):
# do sth
if n <= 0: return None
root = TreeNode(pre[i])
if n == 1: return root
k = j
while post[k] != pre[i+1]: k += 1
l = k - j + 1
root.left = build(i+1, j, l)
root.right = build(i+l+1, k+1, n - l -1)
return root
return build(0, 0, len(pre))
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def constructFromPrePost(self, pre: List[int], post: List[int]) -> TreeNode:
# i: start index of pre
# j: start index of post
# n: length
def build(i, j, n):
# do sth
if n <= 0: return None
root = TreeNode(pre[i])
if n == 1: return root
k = index[pre[i+1]]
l = k - j + 1
root.left = build(i+1, j, l)
root.right = build(i+l+1, k+1, n - l -1)
return root
index = {}
for i in range(len(pre)):
index[post[i]] = i
return build(0, 0, len(pre))
| 25.269841 | 80 | 0.472362 | 225 | 1,592 | 3.306667 | 0.222222 | 0.048387 | 0.064516 | 0.053763 | 0.884409 | 0.884409 | 0.833333 | 0.833333 | 0.833333 | 0.833333 | 0 | 0.023061 | 0.400754 | 1,592 | 62 | 81 | 25.677419 | 0.756813 | 0.288945 | 0 | 0.785714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.142857 | false | 0 | 0 | 0 | 0.357143 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
1d03cc79e3714cc026bfff6e2aa9235826ff8a34 | 14,726 | py | Python | src/restful_api/testes/funcoes_aux_test.py | eubr-bigsea/City-Administration-Dashboard | 0d5b1ad28ea305c5031b8a926d85f59b9dc48d67 | [
"MIT"
] | 1 | 2018-01-26T19:53:16.000Z | 2018-01-26T19:53:16.000Z | src/restful_api/testes/funcoes_aux_test.py | eubr-bigsea/City-Administration-Dashboard | 0d5b1ad28ea305c5031b8a926d85f59b9dc48d67 | [
"MIT"
] | null | null | null | src/restful_api/testes/funcoes_aux_test.py | eubr-bigsea/City-Administration-Dashboard | 0d5b1ad28ea305c5031b8a926d85f59b9dc48d67 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
sys.path.append("../api")
import unittest
import datetime
import funcoes_aux
'''
Para rodar este test deve-se comentar os imports da funcoes_aux
import bd
from api import app
from flask import abort, request, make_response,Response
'''
class FuncoesAuxTest(unittest.TestCase):
def test_create_travels_comparison(self):
# Testar se a função é injetora(onde cada x tem um y diferente)
travels = [{'saida': datetime.timedelta(0, 20289, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)}]
frame_schedules = [{'duracao': 70L, 'saida': datetime.timedelta(0, 20289, 668246),'chegada': datetime.timedelta(0, 26105, 331753)}]
actual = funcoes_aux.create_travels_comparison(travels, frame_schedules)
expected = [({'saida': datetime.timedelta(0, 20289, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)},{'duracao': 70L, 'saida': datetime.timedelta(0, 20289, 668246),'is_paired': True,'chegada': datetime.timedelta(0, 26105, 331753)})]
self.assertEquals(expected, actual)
travels = [{'saida': datetime.timedelta(0, 20289, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)}, {'saida': datetime.timedelta(0, 20289, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)}]
frame_schedules = [{'duracao': 70L, 'saida': datetime.timedelta(0, 20289, 668246),'chegada': datetime.timedelta(0, 26105, 331753)}]
actual = funcoes_aux.create_travels_comparison(travels, frame_schedules)
expected = [({'saida': datetime.timedelta(0, 20289, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)},{'duracao': 70L, 'saida': datetime.timedelta(0, 20289, 668246),'is_paired': True,'chegada': datetime.timedelta(0, 26105, 331753)}), ({'saida': datetime.timedelta(0, 20289, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)}, None)]
self.assertEquals(expected, actual)
#Testa os 5 minutos antes
travels = [{'saida': datetime.timedelta(0, 19988, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)}]
frame_schedules = [{'duracao': 70L, 'saida': datetime.timedelta(0, 20289, 668246),'chegada': datetime.timedelta(0, 26105, 331753)}]
actual = funcoes_aux.create_travels_comparison(travels, frame_schedules)
expected = [({'saida': datetime.timedelta(0, 19988, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)},{'duracao': 70L, 'saida': datetime.timedelta(0, 20289, 668246),'is_paired': True,'chegada': datetime.timedelta(0, 26105, 331753)})]
self.assertNotEquals(expected, actual)
travels = [{'saida': datetime.timedelta(0, 19989, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)}]
frame_schedules = [{'duracao': 70L, 'saida': datetime.timedelta(0, 20289, 668246),'chegada': datetime.timedelta(0, 26105, 331753)}]
actual = funcoes_aux.create_travels_comparison(travels, frame_schedules)
expected = [({'saida': datetime.timedelta(0, 19989, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)},{'duracao': 70L, 'saida': datetime.timedelta(0, 20289, 668246),'is_paired': True,'chegada': datetime.timedelta(0, 26105, 331753)})]
self.assertEquals(expected, actual)
#Testa os 5 minutos depois
travels = [{'saida': datetime.timedelta(0, 20590, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)}]
frame_schedules = [{'duracao': 70L, 'saida': datetime.timedelta(0, 20289, 668246),'chegada': datetime.timedelta(0, 26105, 331753)}]
actual = funcoes_aux.create_travels_comparison(travels, frame_schedules)
expected = [({'saida': datetime.timedelta(0, 20590, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)},{'duracao': 70L, 'saida': datetime.timedelta(0, 20289, 668246),'is_paired': True,'chegada': datetime.timedelta(0, 26105, 331753)})]
self.assertNotEquals(expected, actual)
travels = [{'saida': datetime.timedelta(0, 20589, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)}]
frame_schedules = [{'duracao': 70L, 'saida': datetime.timedelta(0, 20289, 668246),'chegada': datetime.timedelta(0, 26105, 331753)}]
actual = funcoes_aux.create_travels_comparison(travels, frame_schedules)
expected = [({'saida': datetime.timedelta(0, 20589, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)},{'duracao': 70L, 'saida': datetime.timedelta(0, 20289, 668246),'is_paired': True,'chegada': datetime.timedelta(0, 26105, 331753)})]
self.assertEquals(expected, actual)
# Testar quando tem o mesmo número de x e y (testar quando tem viagens a mais)
travels = [{'saida': datetime.timedelta(0, 20289, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)}, {'saida': datetime.timedelta(0, 12345, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)}]
frame_schedules = [{'duracao': 70L, 'saida': datetime.timedelta(0, 20289, 668246),'chegada': datetime.timedelta(0, 26105, 331753)}, {'duracao': 70L, 'saida': datetime.timedelta(0, 20999, 668246),'chegada': datetime.timedelta(0, 26105, 331753)}]
actual = funcoes_aux.create_travels_comparison(travels, frame_schedules)
expected = [({'saida': datetime.timedelta(0, 20289, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)},{'duracao': 70L, 'saida': datetime.timedelta(0, 20289, 668246),'is_paired': True,'chegada': datetime.timedelta(0, 26105, 331753)}),({'saida': datetime.timedelta(0, 12345, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)}, None), (None, {'duracao': 70L, 'saida': datetime.timedelta(0, 20999, 668246),'is_paired': False, 'chegada': datetime.timedelta(0, 26105, 331753)})]
self.assertEquals(expected, actual)
travels = [{'saida': datetime.timedelta(0, 20289, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)}, {'saida': datetime.timedelta(0, 12345, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)}, {'saida': datetime.timedelta(0, 20000, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)}]
frame_schedules = [{'duracao': 70L, 'saida': datetime.timedelta(0, 20289, 668246),'chegada': datetime.timedelta(0, 26105, 331753)}, {'duracao': 80L, 'saida': datetime.timedelta(0, 19800, 668246),'chegada': datetime.timedelta(0, 26105, 331753)}, {'duracao': 70L, 'saida': datetime.timedelta(0, 20999, 668246),'chegada': datetime.timedelta(0, 26105, 331753)}]
actual = funcoes_aux.create_travels_comparison(travels, frame_schedules)
expected = [({'saida': datetime.timedelta(0, 20289, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)},{'duracao': 70L, 'saida': datetime.timedelta(0, 20289, 668246),'is_paired': True,'chegada': datetime.timedelta(0, 26105, 331753)}),({'saida': datetime.timedelta(0, 12345, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)}, None), ({'saida': datetime.timedelta(0, 20000, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)}, {'duracao': 80L, 'saida': datetime.timedelta(0, 19800, 668246),'is_paired': True, 'chegada': datetime.timedelta(0, 26105, 331753)}), (None, {'duracao': 70L, 'saida': datetime.timedelta(0, 20999, 668246),'is_paired': False, 'chegada': datetime.timedelta(0, 26105, 331753)})]
self.assertEquals(expected, actual)
# Testar quando tem o mesmo número de x e y (testar quando tem viagens a menos)
travels = [{'saida': datetime.timedelta(0, 20289, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)}]
frame_schedules = [{'duracao': 70L, 'saida': datetime.timedelta(0, 20289, 668246),'chegada': datetime.timedelta(0, 26105, 331753)}, {'duracao': 70L, 'saida': datetime.timedelta(0, 20999, 668246),'chegada': datetime.timedelta(0, 26105, 331753)}]
actual = funcoes_aux.create_travels_comparison(travels, frame_schedules)
expected = [({'saida': datetime.timedelta(0, 20289, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)},{'duracao': 70L, 'saida': datetime.timedelta(0, 20289, 668246),'is_paired': True,'chegada': datetime.timedelta(0, 26105, 331753)}),(None, {'duracao': 70L, 'saida': datetime.timedelta(0, 20999, 668246),'is_paired': False, 'chegada': datetime.timedelta(0, 26105, 331753)})]
self.assertEquals(expected, actual)
# Testar quando tem mais x do que y (deve ter viagens a mais)
travels = [{'saida': datetime.timedelta(0, 20289, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)}, {'saida': datetime.timedelta(0, 12345, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)}]
frame_schedules = [{'duracao': 70L, 'saida': datetime.timedelta(0, 20289, 668246),'chegada': datetime.timedelta(0, 26105, 331753)}]
actual = funcoes_aux.create_travels_comparison(travels, frame_schedules)
expected = [({'saida': datetime.timedelta(0, 20289, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)},{'duracao': 70L, 'saida': datetime.timedelta(0, 20289, 668246),'is_paired': True,'chegada': datetime.timedelta(0, 26105, 331753)}),({'saida': datetime.timedelta(0, 12345, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)}, None)]
self.assertEquals(expected, actual)
travels = [{'saida': datetime.timedelta(0, 20289, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)}, {'saida': datetime.timedelta(0, 12345, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)}, {'saida': datetime.timedelta(0, 20000, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)}]
frame_schedules = [{'duracao': 70L, 'saida': datetime.timedelta(0, 20289, 668246),'chegada': datetime.timedelta(0, 26105, 331753)}]
actual = funcoes_aux.create_travels_comparison(travels, frame_schedules)
expected = [({'saida': datetime.timedelta(0, 20289, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)},{'duracao': 70L, 'saida': datetime.timedelta(0, 20289, 668246),'is_paired': True,'chegada': datetime.timedelta(0, 26105, 331753)}),({'saida': datetime.timedelta(0, 12345, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)}, None), ({'saida': datetime.timedelta(0, 20000, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)}, None)]
self.assertEquals(expected, actual)
travels = [{'saida': datetime.timedelta(0, 20289, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)}, {'saida': datetime.timedelta(0, 12345, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)}, {'saida': datetime.timedelta(0, 20000, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)}]
frame_schedules = [{'duracao': 70L, 'saida': datetime.timedelta(0, 20289, 668246),'chegada': datetime.timedelta(0, 26105, 331753)}, {'duracao': 80L, 'saida': datetime.timedelta(0, 19800, 668246),'chegada': datetime.timedelta(0, 26105, 331753)}]
actual = funcoes_aux.create_travels_comparison(travels, frame_schedules)
expected = [({'saida': datetime.timedelta(0, 20289, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)},{'duracao': 70L, 'saida': datetime.timedelta(0, 20289, 668246),'is_paired': True,'chegada': datetime.timedelta(0, 26105, 331753)}),({'saida': datetime.timedelta(0, 12345, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)}, None), ({'saida': datetime.timedelta(0, 20000, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)}, {'duracao': 80L, 'saida': datetime.timedelta(0, 19800, 668246),'is_paired': True, 'chegada': datetime.timedelta(0, 26105, 331753)})]
self.assertEquals(expected, actual)
# Testar quando tem mais x do que y (testar quando tem viagens a menos)
travels = [{'saida': datetime.timedelta(0, 20289, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)}, {'saida': datetime.timedelta(0, 12345, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)}, {'saida': datetime.timedelta(0, 20000, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)}]
frame_schedules = [{'duracao': 70L, 'saida': datetime.timedelta(0, 20289, 668246),'chegada': datetime.timedelta(0, 26105, 331753)}, {'duracao': 80L, 'saida': datetime.timedelta(0, 19500, 668246),'chegada': datetime.timedelta(0, 26105, 331753)}]
actual = funcoes_aux.create_travels_comparison(travels, frame_schedules)
expected = [({'saida': datetime.timedelta(0, 20289, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)},{'duracao': 70L, 'saida': datetime.timedelta(0, 20289, 668246),'is_paired': True,'chegada': datetime.timedelta(0, 26105, 331753)}),({'saida': datetime.timedelta(0, 12345, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)}, None), ({'saida': datetime.timedelta(0, 20000, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)}, None),(None, {'duracao': 80L, 'saida': datetime.timedelta(0, 19500, 668246),'is_paired': False, 'chegada': datetime.timedelta(0, 26105, 331753)})]
self.assertEquals(expected, actual)
# Testar quando tem menos x do que y (deve ter viagens a menos)
travels = [{'saida': datetime.timedelta(0, 20289, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)}]
frame_schedules = [{'duracao': 70L, 'saida': datetime.timedelta(0, 20289, 668246),'chegada': datetime.timedelta(0, 26105, 331753)}, {'duracao': 80L, 'saida': datetime.timedelta(0, 19500, 668246),'chegada': datetime.timedelta(0, 26105, 331753)}]
actual = funcoes_aux.create_travels_comparison(travels, frame_schedules)
expected = [({'saida': datetime.timedelta(0, 20289, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)},{'duracao': 70L, 'saida': datetime.timedelta(0, 20289, 668246),'is_paired': True,'chegada': datetime.timedelta(0, 26105, 331753)}),(None, {'duracao': 80L, 'saida': datetime.timedelta(0, 19500, 668246),'is_paired': False, 'chegada': datetime.timedelta(0, 26105, 331753)})]
self.assertEquals(expected, actual)
#dois y pra um x
travels = [{'saida': datetime.timedelta(0, 20289, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)}]
frame_schedules = [{'duracao': 70L, 'saida': datetime.timedelta(0, 20289, 668246),'chegada': datetime.timedelta(0, 26105, 331753)}, {'duracao': 70L, 'saida': datetime.timedelta(0, 20289, 668246),'chegada': datetime.timedelta(0, 26105, 331753)}]
actual = funcoes_aux.create_travels_comparison(travels, frame_schedules)
expected = [({'saida': datetime.timedelta(0, 20289, 668246), 'chegada': datetime.timedelta(0, 26105, 331753)},{'duracao': 70L, 'saida': datetime.timedelta(0, 20289, 668246),'is_paired': True,'chegada': datetime.timedelta(0, 26105, 331753)}),(None, {'duracao': 70L, 'saida': datetime.timedelta(0, 20289, 668246),'is_paired': False, 'chegada': datetime.timedelta(0, 26105, 331753)})]
self.assertEquals(expected, actual)
if __name__ == '__main__':
unittest.main()
| 121.702479 | 727 | 0.694214 | 1,764 | 14,726 | 5.731859 | 0.05839 | 0.329542 | 0.348927 | 0.222926 | 0.963604 | 0.962219 | 0.962219 | 0.962219 | 0.957175 | 0.957175 | 0 | 0.190769 | 0.128956 | 14,726 | 120 | 728 | 122.716667 | 0.59749 | 0.033546 | 0 | 0.619048 | 0 | 0 | 0.122384 | 0 | 0 | 0 | 0 | 0 | 0.178571 | 0 | null | null | 0 | 0.047619 | null | null | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 11 |
df063e978ecb6f54ce1f3711280b8c8ed8674cd3 | 220 | py | Python | db.py | hypafrag/herald-skills | b6b2494730de02627bba6b300c0ecde36434d938 | [
"MIT"
] | null | null | null | db.py | hypafrag/herald-skills | b6b2494730de02627bba6b300c0ecde36434d938 | [
"MIT"
] | null | null | null | db.py | hypafrag/herald-skills | b6b2494730de02627bba6b300c0ecde36434d938 | [
"MIT"
] | null | null | null | import redis
import os
redis = redis.Redis(host=os.environ['HS_REDIS_HOST'],
port=os.environ['HS_REDIS_PORT'],
db=0,
password=os.environ['HS_REDIS_PASSWORD'])
| 27.5 | 61 | 0.559091 | 27 | 220 | 4.333333 | 0.37037 | 0.230769 | 0.282051 | 0.410256 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.006711 | 0.322727 | 220 | 7 | 62 | 31.428571 | 0.778523 | 0 | 0 | 0 | 0 | 0 | 0.195455 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.166667 | 0.333333 | 0 | 0.333333 | 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 | 1 | 1 | 0 | 0 | 0 | 0 | 7 |
df30ef1fe460be0cef5694c5efaf8fcd884d9f32 | 18,748 | py | Python | tests/unit/organization_test.py | guirava/rubrik-sdk-for-python | 10c58a28088a0b8e241af20ab9ecc802cec63246 | [
"MIT"
] | 4 | 2018-09-06T23:34:32.000Z | 2018-10-08T15:04:22.000Z | tests/unit/organization_test.py | guirava/rubrik-sdk-for-python | 10c58a28088a0b8e241af20ab9ecc802cec63246 | [
"MIT"
] | 8 | 2021-03-09T13:02:15.000Z | 2022-02-24T08:46:50.000Z | tests/unit/organization_test.py | guirava/rubrik-sdk-for-python | 10c58a28088a0b8e241af20ab9ecc802cec63246 | [
"MIT"
] | 4 | 2021-04-16T15:49:36.000Z | 2021-11-09T17:58:21.000Z | import pytest
from rubrik_cdm import Connect
def test_add_organization_protectable_object_sql_host_idempotence(rubrik, mocker):
def mock_get_internal_organization_org_id_mssql():
return {
"hasMore": True,
"data": [
{
"managedId": "host_id",
"objectType": "string",
"name": "string",
"primaryClusterId": "string",
"isDeleted": True,
"isRelic": True,
"effectiveSlaDomainId": "string",
"effectiveSlaDomainName": "string",
"descendantCounts": {
"appBlueprint": 0,
"fileset": 0,
"shareFileset": 0,
"mssqlDatabase": 0,
"oracleDatabase": 0,
"storageArrayVolumeGroup": 0,
"vapp": 0,
"volumeGroup": 0,
"virtualMachine": 0
},
"locations": {
"folder": [
{
"managedId": "string",
"name": "string"
}
],
"infrastructure": [
{
"managedId": "string",
"name": "string"
}
],
"physical": [
{
"managedId": "string",
"name": "string"
}
]
},
"properties": {
"hostname": "string",
"clusterName": "string",
"operatingSystem": "string",
"operatingSystemType": "string",
"instanceName": "string"
},
"isEffectiveSlaDomainRetentionLocked": True
}
],
"total": 1
}
mock_get = mocker.patch('rubrik_cdm.Connect.get',
autospec=True, spec_set=True)
mock_get.return_value = mock_get_internal_organization_org_id_mssql()
mock_object_id = mocker.patch('rubrik_cdm.Connect.object_id',
autospec=True, spec_set=True)
mock_object_id.side_effect = [
"org_id", "ord_admin_role_id", "host_id"]
assert rubrik.add_organization_protectable_object_mssql_server_host(
"org_name", "mssql_host") == "No change required. The MSSQL host mssql_host is already assigned to the org_name organization."
def test_add_organization_protectable_object_sql_host(rubrik, mocker):
def mock_get_internal_organization_org_id_mssql():
return {
"hasMore": True,
"data": [
{
"managedId": "string",
"objectType": "string",
"name": "string",
"primaryClusterId": "string",
"isDeleted": True,
"isRelic": True,
"effectiveSlaDomainId": "string",
"effectiveSlaDomainName": "string",
"descendantCounts": {
"appBlueprint": 0,
"fileset": 0,
"shareFileset": 0,
"mssqlDatabase": 0,
"oracleDatabase": 0,
"storageArrayVolumeGroup": 0,
"vapp": 0,
"volumeGroup": 0,
"virtualMachine": 0
},
"locations": {
"folder": [
{
"managedId": "string",
"name": "string"
}
],
"infrastructure": [
{
"managedId": "string",
"name": "string"
}
],
"physical": [
{
"managedId": "string",
"name": "string"
}
]
},
"properties": {
"hostname": "string",
"clusterName": "string",
"operatingSystem": "string",
"operatingSystemType": "string",
"instanceName": "string"
},
"isEffectiveSlaDomainRetentionLocked": True
}
],
"total": 1
}
def mock_post_internal_role_org_admin_id_authorization():
return {
"authorizationSpecifications": [
{
"privilege": "string",
"resources": [
"string"
]
}
],
"roleTemplate": "string"
}
mock_get = mocker.patch('rubrik_cdm.Connect.get',
autospec=True, spec_set=True)
mock_get.return_value = mock_get_internal_organization_org_id_mssql()
mock_object_id = mocker.patch('rubrik_cdm.Connect.object_id',
autospec=True, spec_set=True)
mock_object_id.side_effect = [
"org_id", "ord_admin_role_id", "host_id"]
mock_post = mocker.patch('rubrik_cdm.Connect.post',
autospec=True, spec_set=True)
mock_post.return_value = mock_post_internal_role_org_admin_id_authorization()
assert rubrik.add_organization_protectable_object_mssql_server_host(
"org_name", "mssql_host") == mock_post_internal_role_org_admin_id_authorization()
def test_add_organization_protectable_object_sql_server_db_idempotence(rubrik, mocker):
def mock_get_internal_organization_org_id_mssql():
return {
"hasMore": True,
"data": [
{
"managedId": "mssql_db_id",
"objectType": "string",
"name": "string",
"primaryClusterId": "string",
"isDeleted": True,
"isRelic": True,
"effectiveSlaDomainId": "string",
"effectiveSlaDomainName": "string",
"descendantCounts": {
"appBlueprint": 0,
"fileset": 0,
"shareFileset": 0,
"mssqlDatabase": 0,
"oracleDatabase": 0,
"storageArrayVolumeGroup": 0,
"vapp": 0,
"volumeGroup": 0,
"virtualMachine": 0
},
"locations": {
"folder": [
{
"managedId": "string",
"name": "string"
}
],
"infrastructure": [
{
"managedId": "string",
"name": "string"
}
],
"physical": [
{
"managedId": "string",
"name": "string"
}
]
},
"properties": {
"hostname": "string",
"clusterName": "string",
"operatingSystem": "string",
"operatingSystemType": "string",
"instanceName": "string"
},
"isEffectiveSlaDomainRetentionLocked": True
}
],
"total": 1
}
mock_get = mocker.patch('rubrik_cdm.Connect.get',
autospec=True, spec_set=True)
mock_get.return_value = mock_get_internal_organization_org_id_mssql()
mock_object_id = mocker.patch('rubrik_cdm.Connect.object_id',
autospec=True, spec_set=True)
mock_object_id.side_effect = [
"org_id", "ord_admin_role_id", "mssql_db_id"]
assert rubrik.add_organization_protectable_object_sql_server_db(
"org_name", "mssql_db", "mssql_host", "mssql_instance") == "No change required. The MSSQL DB mssql_db is already assigned to the org_name organization."
def test_add_organization_protectable_object_sql_server_db(rubrik, mocker):
def mock_get_internal_organization_org_id_mssql():
return {
"hasMore": True,
"data": [
{
"managedId": "string",
"objectType": "string",
"name": "string",
"primaryClusterId": "string",
"isDeleted": True,
"isRelic": True,
"effectiveSlaDomainId": "string",
"effectiveSlaDomainName": "string",
"descendantCounts": {
"appBlueprint": 0,
"fileset": 0,
"shareFileset": 0,
"mssqlDatabase": 0,
"oracleDatabase": 0,
"storageArrayVolumeGroup": 0,
"vapp": 0,
"volumeGroup": 0,
"virtualMachine": 0
},
"locations": {
"folder": [
{
"managedId": "string",
"name": "string"
}
],
"infrastructure": [
{
"managedId": "string",
"name": "string"
}
],
"physical": [
{
"managedId": "string",
"name": "string"
}
]
},
"properties": {
"hostname": "string",
"clusterName": "string",
"operatingSystem": "string",
"operatingSystemType": "string",
"instanceName": "string"
},
"isEffectiveSlaDomainRetentionLocked": True
}
],
"total": 1
}
def mock_post_internal_role_org_admin_id_authorization():
return {
"authorizationSpecifications": [
{
"privilege": "string",
"resources": [
"string"
]
}
],
"roleTemplate": "string"
}
mock_get = mocker.patch('rubrik_cdm.Connect.get',
autospec=True, spec_set=True)
mock_get.return_value = mock_get_internal_organization_org_id_mssql()
mock_object_id = mocker.patch('rubrik_cdm.Connect.object_id',
autospec=True, spec_set=True)
mock_object_id.side_effect = [
"org_id", "ord_admin_role_id", "mssql_db_id"]
mock_post = mocker.patch('rubrik_cdm.Connect.post',
autospec=True, spec_set=True)
mock_post.return_value = mock_post_internal_role_org_admin_id_authorization()
assert rubrik.add_organization_protectable_object_sql_server_db(
"org_name", "mssql_db", "mssql_host", "mssql_instance") == mock_post_internal_role_org_admin_id_authorization()
def test_add_organization_protectable_object_sql_availability_group_idempotence(rubrik, mocker):
def mock_get_internal_organization_org_id_mssql():
return {
"hasMore": True,
"data": [
{
"managedId": "ag_id",
"objectType": "string",
"name": "string",
"primaryClusterId": "string",
"isDeleted": True,
"isRelic": True,
"effectiveSlaDomainId": "string",
"effectiveSlaDomainName": "string",
"descendantCounts": {
"appBlueprint": 0,
"fileset": 0,
"shareFileset": 0,
"mssqlDatabase": 0,
"oracleDatabase": 0,
"storageArrayVolumeGroup": 0,
"vapp": 0,
"volumeGroup": 0,
"virtualMachine": 0
},
"locations": {
"folder": [
{
"managedId": "string",
"name": "string"
}
],
"infrastructure": [
{
"managedId": "string",
"name": "string"
}
],
"physical": [
{
"managedId": "string",
"name": "string"
}
]
},
"properties": {
"hostname": "string",
"clusterName": "string",
"operatingSystem": "string",
"operatingSystemType": "string",
"instanceName": "string"
},
"isEffectiveSlaDomainRetentionLocked": True
}
],
"total": 1
}
mock_get = mocker.patch('rubrik_cdm.Connect.get',
autospec=True, spec_set=True)
mock_get.return_value = mock_get_internal_organization_org_id_mssql()
mock_object_id = mocker.patch('rubrik_cdm.Connect.object_id',
autospec=True, spec_set=True)
mock_object_id.side_effect = [
"org_id", "ord_admin_role_id", "ag_id"]
assert rubrik.add_organization_protectable_object_sql_server_availability_group(
"org_name", "mssql_ag") == "No change required. The MSSQL Availability Group mssql_ag is already assigned to the org_name organization."
def test_add_organization_protectable_object_sql_availability_group(rubrik, mocker):
def mock_get_internal_organization_org_id_mssql():
return {
"hasMore": True,
"data": [
{
"managedId": "string",
"objectType": "string",
"name": "string",
"primaryClusterId": "string",
"isDeleted": True,
"isRelic": True,
"effectiveSlaDomainId": "string",
"effectiveSlaDomainName": "string",
"descendantCounts": {
"appBlueprint": 0,
"fileset": 0,
"shareFileset": 0,
"mssqlDatabase": 0,
"oracleDatabase": 0,
"storageArrayVolumeGroup": 0,
"vapp": 0,
"volumeGroup": 0,
"virtualMachine": 0
},
"locations": {
"folder": [
{
"managedId": "string",
"name": "string"
}
],
"infrastructure": [
{
"managedId": "string",
"name": "string"
}
],
"physical": [
{
"managedId": "string",
"name": "string"
}
]
},
"properties": {
"hostname": "string",
"clusterName": "string",
"operatingSystem": "string",
"operatingSystemType": "string",
"instanceName": "string"
},
"isEffectiveSlaDomainRetentionLocked": True
}
],
"total": 1
}
def mock_post_internal_role_org_admin_id_authorization():
return {
"authorizationSpecifications": [
{
"privilege": "string",
"resources": [
"string"
]
}
],
"roleTemplate": "string"
}
mock_get = mocker.patch('rubrik_cdm.Connect.get',
autospec=True, spec_set=True)
mock_get.return_value = mock_get_internal_organization_org_id_mssql()
mock_object_id = mocker.patch('rubrik_cdm.Connect.object_id',
autospec=True, spec_set=True)
mock_object_id.side_effect = [
"org_id", "ord_admin_role_id", "mssql_ag_id"]
mock_post = mocker.patch('rubrik_cdm.Connect.post',
autospec=True, spec_set=True)
mock_post.return_value = mock_post_internal_role_org_admin_id_authorization()
assert rubrik.add_organization_protectable_object_sql_server_availability_group(
"org_name", "mssql_ag") == mock_post_internal_role_org_admin_id_authorization()
| 37.421158 | 160 | 0.396789 | 1,148 | 18,748 | 6.158537 | 0.078397 | 0.023762 | 0.054314 | 0.063649 | 0.985714 | 0.97553 | 0.97553 | 0.97553 | 0.962376 | 0.955021 | 0 | 0.006547 | 0.511201 | 18,748 | 500 | 161 | 37.496 | 0.76495 | 0 | 0 | 0.75395 | 0 | 0 | 0.234265 | 0.049605 | 0 | 0 | 0 | 0 | 0.013544 | 1 | 0.03386 | false | 0 | 0.004515 | 0.020316 | 0.058691 | 0.013544 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
df55143cb214ba01021682f6fbbe3326b219aafa | 18,071 | py | Python | test/inverted/TestInvertedTurtleRock.py | Berserker66/ALttPEntranceRandomizer | 9c681cc65d7281ccded03484b050e8f80ea65dc6 | [
"MIT"
] | null | null | null | test/inverted/TestInvertedTurtleRock.py | Berserker66/ALttPEntranceRandomizer | 9c681cc65d7281ccded03484b050e8f80ea65dc6 | [
"MIT"
] | 5 | 2020-01-18T21:10:46.000Z | 2020-01-25T20:58:19.000Z | test/inverted/TestInvertedTurtleRock.py | Berserker66/ALttPEntranceRandomizer | 9c681cc65d7281ccded03484b050e8f80ea65dc6 | [
"MIT"
] | 2 | 2020-01-18T17:36:50.000Z | 2020-01-22T16:52:08.000Z | from test.inverted.TestInverted import TestInverted
class TestInvertedTurtleRock(TestInverted):
def testTurtleRock(self):
self.run_location_tests([
["Turtle Rock - Compass Chest", False, []],
["Turtle Rock - Compass Chest", False, [], ['Cane of Somaria']],
["Turtle Rock - Compass Chest", False, [], ['Quake', 'Magic Mirror']],
["Turtle Rock - Compass Chest", False, ['Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)'], ['Quake', 'Small Key (Turtle Rock)']],
["Turtle Rock - Compass Chest", True, ['Flute', 'Quake', 'Progressive Sword', 'Cane of Somaria']],
["Turtle Rock - Compass Chest", True, ['Lamp', 'Progressive Glove', 'Quake', 'Progressive Sword', 'Cane of Somaria']],
["Turtle Rock - Compass Chest", True, ['Lamp', 'Magic Mirror', 'Progressive Glove', 'Progressive Glove', 'Cane of Somaria', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)']],
["Turtle Rock - Compass Chest", True, ['Lamp', 'Magic Mirror', 'Progressive Glove', 'Moon Pearl', 'Hookshot', 'Cane of Somaria', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)']],
["Turtle Rock - Compass Chest", True, ['Moon Pearl', 'Flute', 'Magic Mirror', 'Hookshot', 'Cane of Somaria', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)']],
["Turtle Rock - Compass Chest", True, ['Flute', 'Progressive Glove', 'Progressive Glove', 'Magic Mirror', 'Cane of Somaria', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)']],
["Turtle Rock - Chain Chomps", False, []],
["Turtle Rock - Chain Chomps", False, [], ['Magic Mirror', 'Cane of Somaria']],
# Item rando only needs 1 key. ER needs to consider the case when the back is accessible, but not the middle (key wasted on Trinexx door)
["Turtle Rock - Chain Chomps", False, ['Small Key (Turtle Rock)'], ['Magic Mirror', 'Small Key (Turtle Rock)']],
["Turtle Rock - Chain Chomps", True, ['Flute', 'Quake', 'Progressive Sword', 'Cane of Somaria', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)']],
["Turtle Rock - Chain Chomps", True, ['Lamp', 'Progressive Glove', 'Quake', 'Progressive Sword', 'Cane of Somaria', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)']],
["Turtle Rock - Chain Chomps", True, ['Lamp', 'Magic Mirror', 'Progressive Glove', 'Progressive Glove']],
["Turtle Rock - Chain Chomps", True, ['Lamp', 'Magic Mirror', 'Progressive Glove', 'Moon Pearl', 'Hookshot']],
["Turtle Rock - Chain Chomps", True, ['Moon Pearl', 'Flute', 'Magic Mirror', 'Hookshot']],
["Turtle Rock - Chain Chomps", True, ['Flute', 'Progressive Glove', 'Progressive Glove', 'Magic Mirror']],
["Turtle Rock - Roller Room - Left", False, []],
["Turtle Rock - Roller Room - Left", False, [], ['Cane of Somaria']],
["Turtle Rock - Roller Room - Left", False, [], ['Fire Rod']],
["Turtle Rock - Roller Room - Left", False, [], ['Quake', 'Magic Mirror']],
["Turtle Rock - Roller Room - Left", False, ['Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)'], ['Quake', 'Small Key (Turtle Rock)']],
["Turtle Rock - Roller Room - Left", True, ['Fire Rod', 'Flute', 'Quake', 'Progressive Sword', 'Cane of Somaria']],
["Turtle Rock - Roller Room - Left", True, ['Fire Rod', 'Lamp', 'Progressive Glove', 'Quake', 'Progressive Sword', 'Cane of Somaria']],
["Turtle Rock - Roller Room - Left", True, ['Fire Rod', 'Lamp', 'Magic Mirror', 'Progressive Glove', 'Progressive Glove', 'Cane of Somaria', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)']],
["Turtle Rock - Roller Room - Left", True, ['Fire Rod', 'Lamp', 'Magic Mirror', 'Progressive Glove', 'Moon Pearl', 'Hookshot', 'Cane of Somaria', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)']],
["Turtle Rock - Roller Room - Left", True, ['Moon Pearl', 'Fire Rod', 'Flute', 'Magic Mirror', 'Hookshot', 'Cane of Somaria', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)']],
["Turtle Rock - Roller Room - Left", True, ['Fire Rod', 'Flute', 'Progressive Glove', 'Progressive Glove', 'Magic Mirror', 'Cane of Somaria', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)']],
["Turtle Rock - Roller Room - Right", False, []],
["Turtle Rock - Roller Room - Right", False, [], ['Cane of Somaria']],
["Turtle Rock - Roller Room - Right", False, [], ['Fire Rod']],
["Turtle Rock - Roller Room - Right", False, [], ['Quake', 'Magic Mirror']],
["Turtle Rock - Roller Room - Right", False, ['Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)'], ['Quake', 'Small Key (Turtle Rock)']],
["Turtle Rock - Roller Room - Right", True, ['Fire Rod', 'Flute', 'Quake', 'Progressive Sword', 'Cane of Somaria']],
["Turtle Rock - Roller Room - Right", True, ['Fire Rod', 'Lamp', 'Progressive Glove', 'Quake', 'Progressive Sword', 'Cane of Somaria']],
["Turtle Rock - Roller Room - Right", True, ['Fire Rod', 'Lamp', 'Magic Mirror', 'Progressive Glove', 'Progressive Glove', 'Cane of Somaria', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)']],
["Turtle Rock - Roller Room - Right", True, ['Fire Rod', 'Lamp', 'Magic Mirror', 'Progressive Glove', 'Moon Pearl', 'Hookshot', 'Cane of Somaria', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)']],
["Turtle Rock - Roller Room - Right", True, ['Moon Pearl', 'Fire Rod', 'Flute', 'Magic Mirror', 'Hookshot', 'Cane of Somaria', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)']],
["Turtle Rock - Roller Room - Right", True, ['Fire Rod', 'Flute', 'Progressive Glove', 'Progressive Glove', 'Magic Mirror', 'Cane of Somaria', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)']],
["Turtle Rock - Big Chest", False, []],
["Turtle Rock - Big Chest", False, [], ['Big Key (Turtle Rock)']],
["Turtle Rock - Big Chest", False, [], ['Magic Mirror', 'Cane of Somaria']],
["Turtle Rock - Big Chest", False, ['Small Key (Turtle Rock)', 'Small Key (Turtle Rock)'], ['Magic Mirror', 'Small Key (Turtle Rock)']],
["Turtle Rock - Big Chest", True, ['Big Key (Turtle Rock)', 'Flute', 'Quake', 'Progressive Sword', 'Cane of Somaria', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)']],
["Turtle Rock - Big Chest", True, ['Big Key (Turtle Rock)', 'Lamp', 'Progressive Glove', 'Quake', 'Progressive Sword', 'Cane of Somaria', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)']],
["Turtle Rock - Big Chest", True, ['Big Key (Turtle Rock)', 'Lamp', 'Magic Mirror', 'Progressive Glove', 'Progressive Glove', 'Cane of Somaria']],
["Turtle Rock - Big Chest", True, ['Big Key (Turtle Rock)', 'Lamp', 'Magic Mirror', 'Progressive Glove', 'Progressive Glove', 'Hookshot']],
["Turtle Rock - Big Chest", True, ['Big Key (Turtle Rock)', 'Lamp', 'Magic Mirror', 'Progressive Glove', 'Moon Pearl', 'Hookshot']],
["Turtle Rock - Big Chest", True, ['Big Key (Turtle Rock)', 'Moon Pearl', 'Flute', 'Magic Mirror', 'Hookshot']],
["Turtle Rock - Big Chest", True, ['Big Key (Turtle Rock)', 'Flute', 'Progressive Glove', 'Progressive Glove', 'Magic Mirror', 'Cane of Somaria']],
["Turtle Rock - Big Chest", True, ['Big Key (Turtle Rock)', 'Flute', 'Progressive Glove', 'Progressive Glove', 'Magic Mirror', 'Hookshot']],
["Turtle Rock - Big Key Chest", False, []],
["Turtle Rock - Big Key Chest", False, ['Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)'], ['Small Key (Turtle Rock)']],
["Turtle Rock - Big Key Chest", True, ['Flute', 'Quake', 'Progressive Sword', 'Cane of Somaria', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)']],
["Turtle Rock - Big Key Chest", True, ['Lamp', 'Progressive Glove', 'Quake', 'Progressive Sword', 'Cane of Somaria', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)']],
# Mirror in from ledge, use left side entrance, have enough keys to get to the chest
["Turtle Rock - Big Key Chest", True, ['Lamp', 'Magic Mirror', 'Progressive Glove', 'Progressive Glove', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)']],
["Turtle Rock - Big Key Chest", True, ['Lamp', 'Magic Mirror', 'Progressive Glove', 'Moon Pearl', 'Hookshot', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)']],
["Turtle Rock - Big Key Chest", True, ['Moon Pearl', 'Flute', 'Magic Mirror', 'Hookshot', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)']],
["Turtle Rock - Big Key Chest", True, ['Flute', 'Progressive Glove', 'Progressive Glove', 'Magic Mirror', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)']],
["Turtle Rock - Crystaroller Room", False, []],
["Turtle Rock - Crystaroller Room", False, [], ['Big Key (Turtle Rock)', 'Magic Mirror']],
["Turtle Rock - Crystaroller Room", False, [], ['Big Key (Turtle Rock)', 'Cane of Somaria']],
["Turtle Rock - Crystaroller Room", False, [], ['Big Key (Turtle Rock)', 'Lamp']],
["Turtle Rock - Crystaroller Room", False, [], ['Magic Mirror', 'Cane of Somaria']],
["Turtle Rock - Crystaroller Room", False, ['Small Key (Turtle Rock)', 'Small Key (Turtle Rock)'], ['Magic Mirror', 'Small Key (Turtle Rock)']],
["Turtle Rock - Crystaroller Room", True, ['Big Key (Turtle Rock)', 'Flute', 'Quake', 'Progressive Sword', 'Cane of Somaria', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)']],
["Turtle Rock - Crystaroller Room", True, ['Big Key (Turtle Rock)', 'Lamp', 'Progressive Glove', 'Quake', 'Progressive Sword', 'Cane of Somaria', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)']],
["Turtle Rock - Crystaroller Room", True, ['Big Key (Turtle Rock)', 'Lamp', 'Magic Mirror', 'Progressive Glove', 'Progressive Glove']],
["Turtle Rock - Crystaroller Room", True, ['Big Key (Turtle Rock)', 'Lamp', 'Magic Mirror', 'Progressive Glove', 'Moon Pearl', 'Hookshot']],
["Turtle Rock - Crystaroller Room", True, ['Big Key (Turtle Rock)', 'Moon Pearl', 'Flute', 'Magic Mirror', 'Hookshot']],
["Turtle Rock - Crystaroller Room", True, ['Big Key (Turtle Rock)', 'Flute', 'Progressive Glove', 'Progressive Glove', 'Magic Mirror']],
["Turtle Rock - Crystaroller Room", True, ['Lamp', 'Magic Mirror', 'Progressive Glove', 'Progressive Glove', 'Cane of Somaria']],
["Turtle Rock - Crystaroller Room", True, ['Lamp', 'Magic Mirror', 'Progressive Glove', 'Moon Pearl', 'Hookshot', 'Cane of Somaria']],
["Turtle Rock - Crystaroller Room", True, ['Lamp', 'Moon Pearl', 'Flute', 'Magic Mirror', 'Hookshot', 'Cane of Somaria']],
["Turtle Rock - Boss", False, []],
["Turtle Rock - Boss", False, [], ['Cane of Somaria']],
["Turtle Rock - Boss", False, [], ['Ice Rod']],
["Turtle Rock - Boss", False, [], ['Fire Rod']],
["Turtle Rock - Boss", False, [], ['Progressive Sword', 'Hammer']],
["Turtle Rock - Boss", False, [], ['Big Key (Turtle Rock)']],
["Turtle Rock - Boss", False, [], ['Magic Mirror', 'Lamp']],
["Turtle Rock - Boss", False, ['Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)'], ['Small Key (Turtle Rock)']],
["Turtle Rock - Boss", True, ['Ice Rod', 'Fire Rod', 'Lamp', 'Flute', 'Quake', 'Progressive Sword', 'Progressive Sword', 'Cane of Somaria', 'Bottle', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Big Key (Turtle Rock)']],
["Turtle Rock - Boss", True, ['Ice Rod', 'Fire Rod', 'Lamp', 'Progressive Glove', 'Quake', 'Progressive Sword', 'Progressive Sword', 'Cane of Somaria', 'Bottle', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Big Key (Turtle Rock)']],
["Turtle Rock - Boss", True, ['Ice Rod', 'Fire Rod', 'Lamp', 'Progressive Glove', 'Quake', 'Progressive Sword', 'Progressive Sword', 'Cane of Somaria', 'Magic Upgrade (1/2)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)','Small Key (Turtle Rock)', 'Big Key (Turtle Rock)']],
["Turtle Rock - Boss", True, ['Ice Rod', 'Fire Rod', 'Lamp', 'Magic Mirror', 'Progressive Glove', 'Progressive Glove', 'Hammer', 'Cane of Somaria', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Big Key (Turtle Rock)']],
["Turtle Rock - Boss", True, ['Ice Rod', 'Fire Rod', 'Flute', 'Magic Mirror', 'Moon Pearl', 'Hookshot', 'Hammer', 'Cane of Somaria', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Big Key (Turtle Rock)']]
])
def testEyeBridge(self):
for location in ["Turtle Rock - Eye Bridge - Top Right", "Turtle Rock - Eye Bridge - Top Left",
"Turtle Rock - Eye Bridge - Bottom Right", "Turtle Rock - Eye Bridge - Bottom Left"]:
self.run_location_tests([
[location, False, []],
[location, False, ['Progressive Shield', 'Progressive Shield'], ['Progressive Shield', 'Cape', 'Cane of Byrna']],
[location, False, [], ['Big Key (Turtle Rock)', 'Magic Mirror']],
[location, False, [], ['Magic Mirror', 'Cane of Somaria']],
[location, False, [], ['Magic Mirror', 'Lamp']],
[location, False, ['Small Key (Turtle Rock)', 'Small Key (Turtle Rock)'], ['Magic Mirror', 'Small Key (Turtle Rock)']],
[location, True, ['Big Key (Turtle Rock)', 'Flute', 'Quake', 'Progressive Sword', 'Cane of Somaria', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Lamp', 'Cane of Byrna']],
[location, True, ['Big Key (Turtle Rock)', 'Lamp', 'Progressive Glove', 'Quake', 'Progressive Sword', 'Cane of Somaria', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Cane of Byrna']],
[location, True, ['Big Key (Turtle Rock)', 'Flute', 'Quake', 'Progressive Sword', 'Cane of Somaria', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Lamp', 'Cape']],
[location, True, ['Big Key (Turtle Rock)', 'Lamp', 'Progressive Glove', 'Quake', 'Progressive Sword', 'Cane of Somaria', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Cape']],
[location, True, ['Big Key (Turtle Rock)', 'Flute', 'Quake', 'Progressive Sword', 'Cane of Somaria', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Lamp', 'Progressive Shield', 'Progressive Shield', 'Progressive Shield']],
[location, True, ['Big Key (Turtle Rock)', 'Lamp', 'Progressive Glove', 'Quake', 'Progressive Sword', 'Cane of Somaria', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Small Key (Turtle Rock)', 'Progressive Shield', 'Progressive Shield', 'Progressive Shield']],
# Mirroring into Eye Bridge does not require Cane of Somaria
[location, True, ['Lamp', 'Magic Mirror', 'Progressive Glove', 'Progressive Glove', 'Cane of Byrna']],
[location, True, ['Lamp', 'Magic Mirror', 'Progressive Glove', 'Moon Pearl', 'Hookshot', 'Cane of Byrna']],
[location, True, ['Moon Pearl', 'Flute', 'Magic Mirror', 'Hookshot', 'Cane of Byrna']],
[location, True, ['Flute', 'Progressive Glove', 'Progressive Glove', 'Magic Mirror', 'Cane of Byrna']],
[location, True, ['Lamp', 'Magic Mirror', 'Progressive Glove', 'Progressive Glove', 'Cape']],
[location, True, ['Lamp', 'Magic Mirror', 'Progressive Glove', 'Moon Pearl', 'Hookshot', 'Cape']],
[location, True, ['Moon Pearl', 'Flute', 'Magic Mirror', 'Hookshot', 'Cape']],
[location, True, ['Flute', 'Progressive Glove', 'Progressive Glove', 'Magic Mirror', 'Cape']],
[location, True, ['Lamp', 'Magic Mirror', 'Progressive Glove', 'Progressive Glove', 'Progressive Shield', 'Progressive Shield', 'Progressive Shield']],
[location, True, ['Lamp', 'Magic Mirror', 'Progressive Glove', 'Moon Pearl', 'Hookshot', 'Progressive Shield', 'Progressive Shield', 'Progressive Shield']],
[location, True, ['Moon Pearl', 'Flute', 'Magic Mirror', 'Hookshot', 'Progressive Shield', 'Progressive Shield', 'Progressive Shield']],
[location, True, ['Flute', 'Progressive Glove', 'Progressive Glove', 'Magic Mirror', 'Progressive Shield', 'Progressive Shield', 'Progressive Shield']],
]
)
| 129.078571 | 320 | 0.604338 | 2,146 | 18,071 | 5.087139 | 0.043802 | 0.257397 | 0.223871 | 0.258862 | 0.9422 | 0.912064 | 0.87524 | 0.852524 | 0.801319 | 0.723276 | 0 | 0.00021 | 0.209673 | 18,071 | 139 | 321 | 130.007194 | 0.764179 | 0.015384 | 0 | 0.016129 | 0 | 0 | 0.655686 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.016129 | false | 0.080645 | 0.008065 | 0 | 0.032258 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 12 |
df6232b7c3320915800cbecca14e866a7029752e | 2,076 | py | Python | eda_plugin/utility/qt_classes.py | wl-stepp/eda_plugin | 038a43796fce36863d1b27429ca7286b468d72c4 | [
"BSD-3-Clause"
] | null | null | null | eda_plugin/utility/qt_classes.py | wl-stepp/eda_plugin | 038a43796fce36863d1b27429ca7286b468d72c4 | [
"BSD-3-Clause"
] | null | null | null | eda_plugin/utility/qt_classes.py | wl-stepp/eda_plugin | 038a43796fce36863d1b27429ca7286b468d72c4 | [
"BSD-3-Clause"
] | null | null | null | """Customized Qt classes for overall GUI behaviour."""
from PyQt5 import QtWidgets, QtCore
class QMainWindowRestore(QtWidgets.QMainWindow):
"""QMainWindow that saves its last position to the registry and loads it when opened again.
Also closes all the other windows that are open in the application.
"""
def __init__(self):
"""Load the settings in the registry an reset position. If no present, use default."""
super().__init__()
self.settings = QtCore.QSettings("EDA", self.__class__.__name__)
# Initial window size/pos last saved. Use default values for first time
self.resize(self.settings.value("size", QtCore.QSize(270, 225)))
self.move(self.settings.value("pos", QtCore.QPoint(50, 50)))
def closeEvent(self, e):
"""Write window size and position to config file."""
self.settings.setValue("size", self.size())
self.settings.setValue("pos", self.pos())
# Close all other windows too
app = QtWidgets.QApplication.instance()
app.closeAllWindows()
e.accept()
class QWidgetRestore(QtWidgets.QWidget):
"""QWidget that saves its last position to the registry and loads it when opened again.
Also closes all the other windows that are open in the application.
"""
def __init__(self):
"""Load the settings in the registry an reset position. If no present, use default."""
super().__init__()
self.settings = QtCore.QSettings("EDA", self.__class__.__name__)
# Initial window size/pos last saved. Use default values for first time
self.resize(self.settings.value("size", QtCore.QSize(270, 225)))
self.move(self.settings.value("pos", QtCore.QPoint(50, 50)))
def closeEvent(self, e):
"""Write window size and position to config file."""
self.settings.setValue("size", self.size())
self.settings.setValue("pos", self.pos())
# Close all other windows too
app = QtWidgets.QApplication.instance()
app.closeAllWindows()
e.accept()
| 39.923077 | 95 | 0.665222 | 266 | 2,076 | 5.071429 | 0.319549 | 0.088955 | 0.050408 | 0.023721 | 0.876205 | 0.876205 | 0.876205 | 0.876205 | 0.876205 | 0.876205 | 0 | 0.013003 | 0.222062 | 2,076 | 51 | 96 | 40.705882 | 0.822291 | 0.391619 | 0 | 0.88 | 0 | 0 | 0.028192 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.16 | false | 0 | 0.04 | 0 | 0.28 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
df950c938252267e5dfb8a89e6f9befda8a24b0d | 22,545 | py | Python | sdk/python/pulumi_azure/storage/sync_cloud_endpoint.py | aangelisc/pulumi-azure | 71dd9c75403146e16f7480e5a60b08bc0329660e | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/storage/sync_cloud_endpoint.py | aangelisc/pulumi-azure | 71dd9c75403146e16f7480e5a60b08bc0329660e | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/storage/sync_cloud_endpoint.py | aangelisc/pulumi-azure | 71dd9c75403146e16f7480e5a60b08bc0329660e | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
__all__ = ['SyncCloudEndpointArgs', 'SyncCloudEndpoint']
@pulumi.input_type
class SyncCloudEndpointArgs:
def __init__(__self__, *,
file_share_name: pulumi.Input[str],
storage_account_id: pulumi.Input[str],
storage_sync_group_id: pulumi.Input[str],
name: Optional[pulumi.Input[str]] = None,
storage_account_tenant_id: Optional[pulumi.Input[str]] = None):
"""
The set of arguments for constructing a SyncCloudEndpoint resource.
:param pulumi.Input[str] file_share_name: The Storage Share name to be synchronized in this Storage Sync Cloud Endpoint. Changing this forces a new Storage Sync Cloud Endpoint to be created.
:param pulumi.Input[str] storage_account_id: The ID of the Storage Account where the Storage Share exists. Changing this forces a new Storage Sync Cloud Endpoint to be created.
:param pulumi.Input[str] storage_sync_group_id: The ID of the Storage Sync Group where this Cloud Endpoint should be created. Changing this forces a new Storage Sync Cloud Endpoint to be created.
:param pulumi.Input[str] name: The name which should be used for this Storage Sync Cloud Endpoint. Changing this forces a new Storage Sync Cloud Endpoint to be created.
:param pulumi.Input[str] storage_account_tenant_id: The Tenant ID of the Storage Account where the Storage Share exists. Changing this forces a new Storage Sync Cloud Endpoint to be created. Defaults to the current tenant id.
"""
pulumi.set(__self__, "file_share_name", file_share_name)
pulumi.set(__self__, "storage_account_id", storage_account_id)
pulumi.set(__self__, "storage_sync_group_id", storage_sync_group_id)
if name is not None:
pulumi.set(__self__, "name", name)
if storage_account_tenant_id is not None:
pulumi.set(__self__, "storage_account_tenant_id", storage_account_tenant_id)
@property
@pulumi.getter(name="fileShareName")
def file_share_name(self) -> pulumi.Input[str]:
"""
The Storage Share name to be synchronized in this Storage Sync Cloud Endpoint. Changing this forces a new Storage Sync Cloud Endpoint to be created.
"""
return pulumi.get(self, "file_share_name")
@file_share_name.setter
def file_share_name(self, value: pulumi.Input[str]):
pulumi.set(self, "file_share_name", value)
@property
@pulumi.getter(name="storageAccountId")
def storage_account_id(self) -> pulumi.Input[str]:
"""
The ID of the Storage Account where the Storage Share exists. Changing this forces a new Storage Sync Cloud Endpoint to be created.
"""
return pulumi.get(self, "storage_account_id")
@storage_account_id.setter
def storage_account_id(self, value: pulumi.Input[str]):
pulumi.set(self, "storage_account_id", value)
@property
@pulumi.getter(name="storageSyncGroupId")
def storage_sync_group_id(self) -> pulumi.Input[str]:
"""
The ID of the Storage Sync Group where this Cloud Endpoint should be created. Changing this forces a new Storage Sync Cloud Endpoint to be created.
"""
return pulumi.get(self, "storage_sync_group_id")
@storage_sync_group_id.setter
def storage_sync_group_id(self, value: pulumi.Input[str]):
pulumi.set(self, "storage_sync_group_id", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
The name which should be used for this Storage Sync Cloud Endpoint. Changing this forces a new Storage Sync Cloud Endpoint to be created.
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter(name="storageAccountTenantId")
def storage_account_tenant_id(self) -> Optional[pulumi.Input[str]]:
"""
The Tenant ID of the Storage Account where the Storage Share exists. Changing this forces a new Storage Sync Cloud Endpoint to be created. Defaults to the current tenant id.
"""
return pulumi.get(self, "storage_account_tenant_id")
@storage_account_tenant_id.setter
def storage_account_tenant_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "storage_account_tenant_id", value)
@pulumi.input_type
class _SyncCloudEndpointState:
def __init__(__self__, *,
file_share_name: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
storage_account_id: Optional[pulumi.Input[str]] = None,
storage_account_tenant_id: Optional[pulumi.Input[str]] = None,
storage_sync_group_id: Optional[pulumi.Input[str]] = None):
"""
Input properties used for looking up and filtering SyncCloudEndpoint resources.
:param pulumi.Input[str] file_share_name: The Storage Share name to be synchronized in this Storage Sync Cloud Endpoint. Changing this forces a new Storage Sync Cloud Endpoint to be created.
:param pulumi.Input[str] name: The name which should be used for this Storage Sync Cloud Endpoint. Changing this forces a new Storage Sync Cloud Endpoint to be created.
:param pulumi.Input[str] storage_account_id: The ID of the Storage Account where the Storage Share exists. Changing this forces a new Storage Sync Cloud Endpoint to be created.
:param pulumi.Input[str] storage_account_tenant_id: The Tenant ID of the Storage Account where the Storage Share exists. Changing this forces a new Storage Sync Cloud Endpoint to be created. Defaults to the current tenant id.
:param pulumi.Input[str] storage_sync_group_id: The ID of the Storage Sync Group where this Cloud Endpoint should be created. Changing this forces a new Storage Sync Cloud Endpoint to be created.
"""
if file_share_name is not None:
pulumi.set(__self__, "file_share_name", file_share_name)
if name is not None:
pulumi.set(__self__, "name", name)
if storage_account_id is not None:
pulumi.set(__self__, "storage_account_id", storage_account_id)
if storage_account_tenant_id is not None:
pulumi.set(__self__, "storage_account_tenant_id", storage_account_tenant_id)
if storage_sync_group_id is not None:
pulumi.set(__self__, "storage_sync_group_id", storage_sync_group_id)
@property
@pulumi.getter(name="fileShareName")
def file_share_name(self) -> Optional[pulumi.Input[str]]:
"""
The Storage Share name to be synchronized in this Storage Sync Cloud Endpoint. Changing this forces a new Storage Sync Cloud Endpoint to be created.
"""
return pulumi.get(self, "file_share_name")
@file_share_name.setter
def file_share_name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "file_share_name", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
The name which should be used for this Storage Sync Cloud Endpoint. Changing this forces a new Storage Sync Cloud Endpoint to be created.
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter(name="storageAccountId")
def storage_account_id(self) -> Optional[pulumi.Input[str]]:
"""
The ID of the Storage Account where the Storage Share exists. Changing this forces a new Storage Sync Cloud Endpoint to be created.
"""
return pulumi.get(self, "storage_account_id")
@storage_account_id.setter
def storage_account_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "storage_account_id", value)
@property
@pulumi.getter(name="storageAccountTenantId")
def storage_account_tenant_id(self) -> Optional[pulumi.Input[str]]:
"""
The Tenant ID of the Storage Account where the Storage Share exists. Changing this forces a new Storage Sync Cloud Endpoint to be created. Defaults to the current tenant id.
"""
return pulumi.get(self, "storage_account_tenant_id")
@storage_account_tenant_id.setter
def storage_account_tenant_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "storage_account_tenant_id", value)
@property
@pulumi.getter(name="storageSyncGroupId")
def storage_sync_group_id(self) -> Optional[pulumi.Input[str]]:
"""
The ID of the Storage Sync Group where this Cloud Endpoint should be created. Changing this forces a new Storage Sync Cloud Endpoint to be created.
"""
return pulumi.get(self, "storage_sync_group_id")
@storage_sync_group_id.setter
def storage_sync_group_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "storage_sync_group_id", value)
class SyncCloudEndpoint(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
file_share_name: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
storage_account_id: Optional[pulumi.Input[str]] = None,
storage_account_tenant_id: Optional[pulumi.Input[str]] = None,
storage_sync_group_id: Optional[pulumi.Input[str]] = None,
__props__=None):
"""
Manages a Storage Sync Cloud Endpoint.
> **NOTE:** Please ensure Azure File Sync has access to the storage account in your subscription, which indicates that `Microsoft.StorageSync` is assigned role `Reader and Data Access` ( refer to details [here](https://docs.microsoft.com/en-us/azure/storage/files/storage-sync-files-troubleshoot?tabs=portal1%2Cazure-portal#common-troubleshooting-steps)).
## Example Usage
```python
import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_sync = azure.storage.Sync("exampleSync",
resource_group_name=example_resource_group.name,
location=example_resource_group.location)
example_sync_group = azure.storage.SyncGroup("exampleSyncGroup", storage_sync_id=example_sync.id)
example_account = azure.storage.Account("exampleAccount",
resource_group_name=example_resource_group.name,
location=example_resource_group.location,
account_tier="Standard",
account_replication_type="LRS")
example_share = azure.storage.Share("exampleShare",
storage_account_name=example_account.name,
acls=[azure.storage.ShareAclArgs(
id="GhostedRecall",
access_policies=[{
"permissions": "r",
}],
)])
example_sync_cloud_endpoint = azure.storage.SyncCloudEndpoint("exampleSyncCloudEndpoint",
storage_sync_group_id=example_sync_group.id,
file_share_name=example_share.name,
storage_account_id=example_account.id)
```
## Import
Storage Sync Cloud Endpoints can be imported using the `resource id`, e.g.
```sh
$ pulumi import azure:storage/syncCloudEndpoint:SyncCloudEndpoint example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StorageSync/storageSyncServices/sync1/syncGroups/syncgroup1/cloudEndpoints/cloudEndpoint1
```
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] file_share_name: The Storage Share name to be synchronized in this Storage Sync Cloud Endpoint. Changing this forces a new Storage Sync Cloud Endpoint to be created.
:param pulumi.Input[str] name: The name which should be used for this Storage Sync Cloud Endpoint. Changing this forces a new Storage Sync Cloud Endpoint to be created.
:param pulumi.Input[str] storage_account_id: The ID of the Storage Account where the Storage Share exists. Changing this forces a new Storage Sync Cloud Endpoint to be created.
:param pulumi.Input[str] storage_account_tenant_id: The Tenant ID of the Storage Account where the Storage Share exists. Changing this forces a new Storage Sync Cloud Endpoint to be created. Defaults to the current tenant id.
:param pulumi.Input[str] storage_sync_group_id: The ID of the Storage Sync Group where this Cloud Endpoint should be created. Changing this forces a new Storage Sync Cloud Endpoint to be created.
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: SyncCloudEndpointArgs,
opts: Optional[pulumi.ResourceOptions] = None):
"""
Manages a Storage Sync Cloud Endpoint.
> **NOTE:** Please ensure Azure File Sync has access to the storage account in your subscription, which indicates that `Microsoft.StorageSync` is assigned role `Reader and Data Access` ( refer to details [here](https://docs.microsoft.com/en-us/azure/storage/files/storage-sync-files-troubleshoot?tabs=portal1%2Cazure-portal#common-troubleshooting-steps)).
## Example Usage
```python
import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_sync = azure.storage.Sync("exampleSync",
resource_group_name=example_resource_group.name,
location=example_resource_group.location)
example_sync_group = azure.storage.SyncGroup("exampleSyncGroup", storage_sync_id=example_sync.id)
example_account = azure.storage.Account("exampleAccount",
resource_group_name=example_resource_group.name,
location=example_resource_group.location,
account_tier="Standard",
account_replication_type="LRS")
example_share = azure.storage.Share("exampleShare",
storage_account_name=example_account.name,
acls=[azure.storage.ShareAclArgs(
id="GhostedRecall",
access_policies=[{
"permissions": "r",
}],
)])
example_sync_cloud_endpoint = azure.storage.SyncCloudEndpoint("exampleSyncCloudEndpoint",
storage_sync_group_id=example_sync_group.id,
file_share_name=example_share.name,
storage_account_id=example_account.id)
```
## Import
Storage Sync Cloud Endpoints can be imported using the `resource id`, e.g.
```sh
$ pulumi import azure:storage/syncCloudEndpoint:SyncCloudEndpoint example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StorageSync/storageSyncServices/sync1/syncGroups/syncgroup1/cloudEndpoints/cloudEndpoint1
```
:param str resource_name: The name of the resource.
:param SyncCloudEndpointArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
...
def __init__(__self__, resource_name: str, *args, **kwargs):
resource_args, opts = _utilities.get_resource_args_opts(SyncCloudEndpointArgs, pulumi.ResourceOptions, *args, **kwargs)
if resource_args is not None:
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
else:
__self__._internal_init(resource_name, *args, **kwargs)
def _internal_init(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
file_share_name: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
storage_account_id: Optional[pulumi.Input[str]] = None,
storage_account_tenant_id: Optional[pulumi.Input[str]] = None,
storage_sync_group_id: Optional[pulumi.Input[str]] = None,
__props__=None):
if opts is None:
opts = pulumi.ResourceOptions()
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.version is None:
opts.version = _utilities.get_version()
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = SyncCloudEndpointArgs.__new__(SyncCloudEndpointArgs)
if file_share_name is None and not opts.urn:
raise TypeError("Missing required property 'file_share_name'")
__props__.__dict__["file_share_name"] = file_share_name
__props__.__dict__["name"] = name
if storage_account_id is None and not opts.urn:
raise TypeError("Missing required property 'storage_account_id'")
__props__.__dict__["storage_account_id"] = storage_account_id
__props__.__dict__["storage_account_tenant_id"] = storage_account_tenant_id
if storage_sync_group_id is None and not opts.urn:
raise TypeError("Missing required property 'storage_sync_group_id'")
__props__.__dict__["storage_sync_group_id"] = storage_sync_group_id
super(SyncCloudEndpoint, __self__).__init__(
'azure:storage/syncCloudEndpoint:SyncCloudEndpoint',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None,
file_share_name: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
storage_account_id: Optional[pulumi.Input[str]] = None,
storage_account_tenant_id: Optional[pulumi.Input[str]] = None,
storage_sync_group_id: Optional[pulumi.Input[str]] = None) -> 'SyncCloudEndpoint':
"""
Get an existing SyncCloudEndpoint resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] file_share_name: The Storage Share name to be synchronized in this Storage Sync Cloud Endpoint. Changing this forces a new Storage Sync Cloud Endpoint to be created.
:param pulumi.Input[str] name: The name which should be used for this Storage Sync Cloud Endpoint. Changing this forces a new Storage Sync Cloud Endpoint to be created.
:param pulumi.Input[str] storage_account_id: The ID of the Storage Account where the Storage Share exists. Changing this forces a new Storage Sync Cloud Endpoint to be created.
:param pulumi.Input[str] storage_account_tenant_id: The Tenant ID of the Storage Account where the Storage Share exists. Changing this forces a new Storage Sync Cloud Endpoint to be created. Defaults to the current tenant id.
:param pulumi.Input[str] storage_sync_group_id: The ID of the Storage Sync Group where this Cloud Endpoint should be created. Changing this forces a new Storage Sync Cloud Endpoint to be created.
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _SyncCloudEndpointState.__new__(_SyncCloudEndpointState)
__props__.__dict__["file_share_name"] = file_share_name
__props__.__dict__["name"] = name
__props__.__dict__["storage_account_id"] = storage_account_id
__props__.__dict__["storage_account_tenant_id"] = storage_account_tenant_id
__props__.__dict__["storage_sync_group_id"] = storage_sync_group_id
return SyncCloudEndpoint(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter(name="fileShareName")
def file_share_name(self) -> pulumi.Output[str]:
"""
The Storage Share name to be synchronized in this Storage Sync Cloud Endpoint. Changing this forces a new Storage Sync Cloud Endpoint to be created.
"""
return pulumi.get(self, "file_share_name")
@property
@pulumi.getter
def name(self) -> pulumi.Output[str]:
"""
The name which should be used for this Storage Sync Cloud Endpoint. Changing this forces a new Storage Sync Cloud Endpoint to be created.
"""
return pulumi.get(self, "name")
@property
@pulumi.getter(name="storageAccountId")
def storage_account_id(self) -> pulumi.Output[str]:
"""
The ID of the Storage Account where the Storage Share exists. Changing this forces a new Storage Sync Cloud Endpoint to be created.
"""
return pulumi.get(self, "storage_account_id")
@property
@pulumi.getter(name="storageAccountTenantId")
def storage_account_tenant_id(self) -> pulumi.Output[str]:
"""
The Tenant ID of the Storage Account where the Storage Share exists. Changing this forces a new Storage Sync Cloud Endpoint to be created. Defaults to the current tenant id.
"""
return pulumi.get(self, "storage_account_tenant_id")
@property
@pulumi.getter(name="storageSyncGroupId")
def storage_sync_group_id(self) -> pulumi.Output[str]:
"""
The ID of the Storage Sync Group where this Cloud Endpoint should be created. Changing this forces a new Storage Sync Cloud Endpoint to be created.
"""
return pulumi.get(self, "storage_sync_group_id")
| 53.806683 | 363 | 0.692703 | 2,850 | 22,545 | 5.244561 | 0.078596 | 0.073593 | 0.062755 | 0.081889 | 0.887402 | 0.875493 | 0.867064 | 0.85656 | 0.852412 | 0.840436 | 0 | 0.004419 | 0.227101 | 22,545 | 418 | 364 | 53.935407 | 0.853372 | 0.478155 | 0 | 0.653659 | 1 | 0 | 0.128356 | 0.054359 | 0 | 0 | 0 | 0 | 0 | 1 | 0.156098 | false | 0.004878 | 0.02439 | 0 | 0.273171 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
10dff791dc848160baa26a88207fab7eb62d40f7 | 41,741 | py | Python | queue_services/payment-reconciliations/tests/integration/test_payment_reconciliations.py | thorwolpert/sbc-pay | ea355dfb13e783ed1e86ed92efaa45293463c348 | [
"Apache-2.0"
] | 4 | 2020-03-23T21:37:02.000Z | 2021-06-15T11:25:22.000Z | queue_services/payment-reconciliations/tests/integration/test_payment_reconciliations.py | thorwolpert/sbc-pay | ea355dfb13e783ed1e86ed92efaa45293463c348 | [
"Apache-2.0"
] | 757 | 2019-05-02T17:53:52.000Z | 2022-03-31T22:42:01.000Z | queue_services/payment-reconciliations/tests/integration/test_payment_reconciliations.py | thorwolpert/sbc-pay | ea355dfb13e783ed1e86ed92efaa45293463c348 | [
"Apache-2.0"
] | 39 | 2019-01-30T20:05:36.000Z | 2022-03-24T15:07:54.000Z | # Copyright © 2019 Province of British Columbia
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests to assure the Payment Reconciliation.
Test-Suite to ensure that the Payment Reconciliation queue service is working as expected.
"""
from datetime import datetime
import pytest
from entity_queue_common.service_utils import subscribe_to_queue
from flask import current_app
from pay_api.models import CfsAccount as CfsAccountModel
from pay_api.models import Credit as CreditModel
from pay_api.models import Invoice as InvoiceModel
from pay_api.models import Payment as PaymentModel
from pay_api.models import PaymentAccount as PaymentAccountModel
from pay_api.models import Receipt as ReceiptModel
from pay_api.utils.enums import CfsAccountStatus, InvoiceReferenceStatus, InvoiceStatus, PaymentMethod, PaymentStatus
from reconciliations.enums import RecordType, SourceTransaction, Status, TargetTransaction
from .factory import (
factory_create_online_banking_account, factory_create_pad_account, factory_invoice, factory_invoice_reference,
factory_payment, factory_payment_line_item, factory_receipt)
from .utils import create_and_upload_settlement_file, helper_add_event_to_queue
@pytest.mark.asyncio
async def test_online_banking_reconciliations(session, app, stan_server, event_loop, client_id, events_stan, future,
mock_publish):
"""Test Reconciliations worker."""
# Call back for the subscription
from reconciliations.worker import cb_subscription_handler
# Create a Credit Card Payment
# register the handler to test it
await subscribe_to_queue(events_stan,
current_app.config.get('SUBSCRIPTION_OPTIONS').get('subject'),
current_app.config.get('SUBSCRIPTION_OPTIONS').get('queue'),
current_app.config.get('SUBSCRIPTION_OPTIONS').get('durable_name'),
cb_subscription_handler)
# 1. Create payment account
# 2. Create invoice and related records
# 3. Create CFS Invoice records
# 4. Create a CFS settlement file, and verify the records
cfs_account_number = '1234'
pay_account: PaymentAccountModel = factory_create_online_banking_account(status=CfsAccountStatus.ACTIVE.value,
cfs_account=cfs_account_number)
invoice: InvoiceModel = factory_invoice(payment_account=pay_account, total=100, service_fees=10.0,
payment_method_code=PaymentMethod.ONLINE_BANKING.value)
factory_payment_line_item(invoice_id=invoice.id, filing_fees=90.0,
service_fees=10.0, total=90.0)
invoice_number = '1234567890'
factory_invoice_reference(invoice_id=invoice.id, invoice_number=invoice_number)
invoice.invoice_status_code = InvoiceStatus.SETTLEMENT_SCHEDULED.value
invoice = invoice.save()
invoice_id = invoice.id
total = invoice.total
# Create a settlement file and publish.
file_name: str = 'cas_settlement_file.csv'
# Settlement row
date = datetime.now().strftime('%d-%b-%y')
receipt_number = '1234567890'
row = [RecordType.BOLP.value, SourceTransaction.ONLINE_BANKING.value, receipt_number, 100001, date,
total, cfs_account_number,
TargetTransaction.INV.value, invoice_number,
total, 0, Status.PAID.value]
create_and_upload_settlement_file(file_name, [row])
await helper_add_event_to_queue(events_stan, file_name=file_name)
# The invoice should be in PAID status and Payment should be completed
updated_invoice = InvoiceModel.find_by_id(invoice_id)
assert updated_invoice.invoice_status_code == InvoiceStatus.PAID.value
payment: PaymentModel = PaymentModel.find_payment_by_receipt_number(receipt_number)
assert payment.payment_status_code == PaymentStatus.COMPLETED.value
assert payment.paid_amount == total
assert payment.receipt_number == receipt_number
assert payment.payment_method_code == PaymentMethod.ONLINE_BANKING.value
assert payment.invoice_number == invoice_number
@pytest.mark.asyncio
async def test_online_banking_reconciliations_over_payment(session, app, stan_server, event_loop, client_id,
events_stan, future,
mock_publish):
"""Test Reconciliations worker."""
# Call back for the subscription
from reconciliations.worker import cb_subscription_handler
# Create a Credit Card Payment
# register the handler to test it
await subscribe_to_queue(events_stan,
current_app.config.get('SUBSCRIPTION_OPTIONS').get('subject'),
current_app.config.get('SUBSCRIPTION_OPTIONS').get('queue'),
current_app.config.get('SUBSCRIPTION_OPTIONS').get('durable_name'),
cb_subscription_handler)
# 1. Create payment account
# 2. Create invoice and related records
# 3. Create CFS Invoice records
# 4. Create a CFS settlement file, and verify the records
cfs_account_number = '1234'
pay_account: PaymentAccountModel = factory_create_online_banking_account(status=CfsAccountStatus.ACTIVE.value,
cfs_account=cfs_account_number)
invoice: InvoiceModel = factory_invoice(payment_account=pay_account, total=100, service_fees=10.0,
payment_method_code=PaymentMethod.ONLINE_BANKING.value)
factory_payment_line_item(invoice_id=invoice.id, filing_fees=90.0,
service_fees=10.0, total=90.0)
invoice_number = '1234567890'
factory_invoice_reference(invoice_id=invoice.id, invoice_number=invoice_number)
invoice.invoice_status_code = InvoiceStatus.SETTLEMENT_SCHEDULED.value
invoice = invoice.save()
invoice_id = invoice.id
total = invoice.total
# Create a settlement file and publish.
file_name: str = 'cas_settlement_file.csv'
# Settlement row
date = datetime.now().strftime('%d-%b-%y')
receipt_number = '1234567890'
over_payment_amount = 100
inv_row = [RecordType.BOLP.value, SourceTransaction.ONLINE_BANKING.value, receipt_number, 100001, date, total,
cfs_account_number, TargetTransaction.INV.value, invoice_number, total, 0, Status.PAID.value]
credit_row = [RecordType.ONAC.value, SourceTransaction.ONLINE_BANKING.value, receipt_number, 100001, date,
over_payment_amount, cfs_account_number, TargetTransaction.INV.value, invoice_number,
over_payment_amount, 0, Status.ON_ACC.value]
create_and_upload_settlement_file(file_name, [inv_row, credit_row])
await helper_add_event_to_queue(events_stan, file_name=file_name)
# The invoice should be in PAID status and Payment should be completed
updated_invoice = InvoiceModel.find_by_id(invoice_id)
assert updated_invoice.invoice_status_code == InvoiceStatus.PAID.value
payment: PaymentModel = PaymentModel.find_payment_by_receipt_number(receipt_number)
assert payment.payment_status_code == PaymentStatus.COMPLETED.value
assert payment.paid_amount == total + over_payment_amount
assert payment.receipt_number == receipt_number
assert payment.payment_method_code == PaymentMethod.ONLINE_BANKING.value
assert payment.invoice_number is None # No invoice_number if payment is not for 1 invoice
@pytest.mark.asyncio
async def test_online_banking_reconciliations_with_credit(session, app, stan_server, event_loop, client_id, events_stan,
future,
mock_publish):
"""Test Reconciliations worker."""
# Call back for the subscription
from reconciliations.worker import cb_subscription_handler
# Create a Credit Card Payment
# register the handler to test it
await subscribe_to_queue(events_stan,
current_app.config.get('SUBSCRIPTION_OPTIONS').get('subject'),
current_app.config.get('SUBSCRIPTION_OPTIONS').get('queue'),
current_app.config.get('SUBSCRIPTION_OPTIONS').get('durable_name'),
cb_subscription_handler)
# 1. Create payment account
# 2. Create invoice and related records
# 3. Create CFS Invoice records
# 4. Create a CFS settlement file, and verify the records
cfs_account_number = '1234'
pay_account: PaymentAccountModel = factory_create_online_banking_account(status=CfsAccountStatus.ACTIVE.value,
cfs_account=cfs_account_number)
invoice: InvoiceModel = factory_invoice(payment_account=pay_account, total=100, service_fees=10.0,
payment_method_code=PaymentMethod.ONLINE_BANKING.value)
factory_payment_line_item(invoice_id=invoice.id, filing_fees=90.0,
service_fees=10.0, total=90.0)
invoice_number = '1234567890'
factory_invoice_reference(invoice_id=invoice.id, invoice_number=invoice_number)
invoice.invoice_status_code = InvoiceStatus.SETTLEMENT_SCHEDULED.value
invoice = invoice.save()
invoice_id = invoice.id
total = invoice.total
# Create a settlement file and publish.
file_name: str = 'cas_settlement_file.csv'
# Settlement row
date = datetime.now().strftime('%d-%b-%y')
receipt_number = '1234567890'
credit_amount = 10
inv_row = [RecordType.BOLP.value, SourceTransaction.ONLINE_BANKING.value, receipt_number, 100001, date,
total - credit_amount, cfs_account_number, TargetTransaction.INV.value, invoice_number, total, 0,
Status.PAID.value]
credit_row = [RecordType.ONAC.value, SourceTransaction.EFT_WIRE.value, '555566677', 100001, date, credit_amount,
cfs_account_number, TargetTransaction.INV.value, invoice_number, total, 0, Status.PAID.value]
create_and_upload_settlement_file(file_name, [inv_row, credit_row])
await helper_add_event_to_queue(events_stan, file_name=file_name)
# The invoice should be in PAID status and Payment should be completed
updated_invoice = InvoiceModel.find_by_id(invoice_id)
assert updated_invoice.invoice_status_code == InvoiceStatus.PAID.value
payment: PaymentModel = PaymentModel.find_payment_by_receipt_number(receipt_number)
assert payment.payment_status_code == PaymentStatus.COMPLETED.value
assert payment.paid_amount == total - credit_amount
assert payment.receipt_number == receipt_number
assert payment.payment_method_code == PaymentMethod.ONLINE_BANKING.value
assert payment.invoice_number == invoice_number
@pytest.mark.asyncio
async def test_online_banking_reconciliations_overflows_credit(session, app, stan_server, event_loop, client_id,
events_stan, future,
mock_publish):
"""Test Reconciliations worker."""
# Call back for the subscription
from reconciliations.worker import cb_subscription_handler
# Create a Credit Card Payment
# register the handler to test it
await subscribe_to_queue(events_stan,
current_app.config.get('SUBSCRIPTION_OPTIONS').get('subject'),
current_app.config.get('SUBSCRIPTION_OPTIONS').get('queue'),
current_app.config.get('SUBSCRIPTION_OPTIONS').get('durable_name'),
cb_subscription_handler)
# 1. Create payment account
# 2. Create invoice and related records
# 3. Create CFS Invoice records
# 4. Create a CFS settlement file, and verify the records
cfs_account_number = '1234'
pay_account: PaymentAccountModel = factory_create_online_banking_account(status=CfsAccountStatus.ACTIVE.value,
cfs_account=cfs_account_number)
invoice: InvoiceModel = factory_invoice(payment_account=pay_account, total=100, service_fees=10.0,
payment_method_code=PaymentMethod.ONLINE_BANKING.value)
factory_payment_line_item(invoice_id=invoice.id, filing_fees=90.0,
service_fees=10.0, total=90.0)
invoice_number = '1234567890'
factory_invoice_reference(invoice_id=invoice.id, invoice_number=invoice_number)
invoice.invoice_status_code = InvoiceStatus.SETTLEMENT_SCHEDULED.value
invoice = invoice.save()
invoice_id = invoice.id
total = invoice.total
# Create a settlement file and publish.
file_name: str = 'cas_settlement_file.csv'
# Settlement row
date = datetime.now().strftime('%d-%b-%y')
receipt_number = '1234567890'
credit_amount = 10
onac_amount = 100
credit_row = [RecordType.ONAC.value, SourceTransaction.EFT_WIRE.value, '555566677', 100001, date, credit_amount,
cfs_account_number, TargetTransaction.INV.value, invoice_number, total, 0, Status.PAID.value]
inv_row = [RecordType.BOLP.value, SourceTransaction.ONLINE_BANKING.value, receipt_number, 100001, date,
total - credit_amount, cfs_account_number, TargetTransaction.INV.value, invoice_number, total, 0,
Status.PAID.value]
onac_row = [RecordType.ONAC.value, SourceTransaction.ONLINE_BANKING.value, receipt_number, 100001, date,
onac_amount, cfs_account_number, TargetTransaction.RECEIPT.value, receipt_number, total, 0,
Status.ON_ACC.value]
create_and_upload_settlement_file(file_name, [inv_row, credit_row, onac_row])
await helper_add_event_to_queue(events_stan, file_name=file_name)
# The invoice should be in PAID status and Payment should be completed
updated_invoice = InvoiceModel.find_by_id(invoice_id)
assert updated_invoice.invoice_status_code == InvoiceStatus.PAID.value
payment: PaymentModel = PaymentModel.find_payment_by_receipt_number(receipt_number)
assert payment.payment_status_code == PaymentStatus.COMPLETED.value
assert payment.paid_amount == total - credit_amount + onac_amount
assert payment.receipt_number == receipt_number
assert payment.payment_method_code == PaymentMethod.ONLINE_BANKING.value
assert payment.invoice_number is None
@pytest.mark.asyncio
async def test_online_banking_under_payment(session, app, stan_server, event_loop, client_id, events_stan, future,
mock_publish):
"""Test Reconciliations worker."""
# Call back for the subscription
from reconciliations.worker import cb_subscription_handler
# Create a Credit Card Payment
# register the handler to test it
await subscribe_to_queue(events_stan,
current_app.config.get('SUBSCRIPTION_OPTIONS').get('subject'),
current_app.config.get('SUBSCRIPTION_OPTIONS').get('queue'),
current_app.config.get('SUBSCRIPTION_OPTIONS').get('durable_name'),
cb_subscription_handler)
# 1. Create payment account
# 2. Create invoice and related records
# 3. Create CFS Invoice records
# 4. Create a CFS settlement file, and verify the records
cfs_account_number = '1234'
pay_account: PaymentAccountModel = factory_create_online_banking_account(status=CfsAccountStatus.ACTIVE.value,
cfs_account=cfs_account_number)
invoice: InvoiceModel = factory_invoice(payment_account=pay_account, total=100, service_fees=10.0,
payment_method_code=PaymentMethod.ONLINE_BANKING.value)
factory_payment_line_item(invoice_id=invoice.id, filing_fees=90.0,
service_fees=10.0, total=90.0)
invoice_number = '1234567890'
factory_invoice_reference(invoice_id=invoice.id, invoice_number=invoice_number)
invoice.invoice_status_code = InvoiceStatus.SETTLEMENT_SCHEDULED.value
invoice = invoice.save()
invoice_id = invoice.id
total = invoice.total
# Create a settlement file and publish.
file_name: str = 'cas_settlement_file.csv'
paid_amount = 10
# Settlement row
date = datetime.now().strftime('%d-%b-%y')
receipt_number = '1234567890'
row = [RecordType.BOLP.value, SourceTransaction.ONLINE_BANKING.value, receipt_number, 100001, date, paid_amount,
cfs_account_number,
TargetTransaction.INV.value, invoice_number,
total, total - paid_amount, Status.PARTIAL.value]
create_and_upload_settlement_file(file_name, [row])
await helper_add_event_to_queue(events_stan, file_name=file_name)
# The invoice should be in PAID status and Payment should be completed
updated_invoice: InvoiceModel = InvoiceModel.find_by_id(invoice_id)
assert updated_invoice.invoice_status_code == InvoiceStatus.PARTIAL.value
assert updated_invoice.paid == paid_amount
payment: PaymentModel = PaymentModel.find_payment_by_receipt_number(receipt_number)
assert payment.payment_status_code == PaymentStatus.COMPLETED.value
assert payment.paid_amount == paid_amount
assert payment.receipt_number == receipt_number
assert payment.payment_method_code == PaymentMethod.ONLINE_BANKING.value
assert payment.invoice_number == invoice_number
@pytest.mark.asyncio
async def test_pad_reconciliations(session, app, stan_server, event_loop, client_id, events_stan, future, mock_publish):
"""Test Reconciliations worker."""
# Call back for the subscription
from reconciliations.worker import cb_subscription_handler
# Create a Credit Card Payment
# register the handler to test it
await subscribe_to_queue(events_stan,
current_app.config.get('SUBSCRIPTION_OPTIONS').get('subject'),
current_app.config.get('SUBSCRIPTION_OPTIONS').get('queue'),
current_app.config.get('SUBSCRIPTION_OPTIONS').get('durable_name'),
cb_subscription_handler)
# 1. Create payment account
# 2. Create invoices and related records
# 3. Create CFS Invoice records
# 4. Create a CFS settlement file, and verify the records
cfs_account_number = '1234'
pay_account: PaymentAccountModel = factory_create_pad_account(status=CfsAccountStatus.ACTIVE.value,
account_number=cfs_account_number)
invoice1: InvoiceModel = factory_invoice(payment_account=pay_account, total=100, service_fees=10.0,
payment_method_code=PaymentMethod.PAD.value)
factory_payment_line_item(invoice_id=invoice1.id, filing_fees=90.0,
service_fees=10.0, total=90.0)
invoice2: InvoiceModel = factory_invoice(payment_account=pay_account, total=200, service_fees=10.0,
payment_method_code=PaymentMethod.PAD.value)
factory_payment_line_item(invoice_id=invoice2.id, filing_fees=190.0,
service_fees=10.0, total=190.0)
invoice_number = '1234567890'
factory_invoice_reference(invoice_id=invoice1.id, invoice_number=invoice_number)
factory_invoice_reference(invoice_id=invoice2.id, invoice_number=invoice_number)
invoice1.invoice_status_code = InvoiceStatus.SETTLEMENT_SCHEDULED.value
invoice2.invoice_status_code = InvoiceStatus.SETTLEMENT_SCHEDULED.value
invoice1.save()
invoice2.save()
invoice1_id = invoice1.id
invoice2_id = invoice2.id
total = invoice1.total + invoice2.total
# Create a settlement file and publish.
file_name: str = 'cas_settlement_file.csv'
# Settlement row
receipt_number = '1234567890'
date = datetime.now().strftime('%d-%b-%y')
row = [RecordType.PAD.value, SourceTransaction.PAD.value, receipt_number, 100001, date, total,
cfs_account_number,
'INV', invoice_number,
total, 0, Status.PAID.value]
create_and_upload_settlement_file(file_name, [row])
await helper_add_event_to_queue(events_stan, file_name=file_name)
# The invoice should be in PAID status and Payment should be completed
updated_invoice1 = InvoiceModel.find_by_id(invoice1_id)
assert updated_invoice1.invoice_status_code == InvoiceStatus.PAID.value
updated_invoice2 = InvoiceModel.find_by_id(invoice2_id)
assert updated_invoice2.invoice_status_code == InvoiceStatus.PAID.value
payment: PaymentModel = PaymentModel.find_payment_by_receipt_number(receipt_number)
assert payment.payment_status_code == PaymentStatus.COMPLETED.value
assert payment.paid_amount == total
assert payment.receipt_number == receipt_number
assert payment.payment_method_code == PaymentMethod.PAD.value
assert payment.invoice_number == invoice_number
rcpt1: ReceiptModel = ReceiptModel.find_by_invoice_id_and_receipt_number(invoice1_id, receipt_number)
rcpt2: ReceiptModel = ReceiptModel.find_by_invoice_id_and_receipt_number(invoice2_id, receipt_number)
assert rcpt1
assert rcpt2
assert rcpt1.receipt_date == rcpt2.receipt_date
@pytest.mark.asyncio
async def test_pad_reconciliations_with_credit_memo(session, app, stan_server, event_loop,
client_id, events_stan, future, mock_publish):
"""Test Reconciliations worker."""
# Call back for the subscription
from reconciliations.worker import cb_subscription_handler
# Create a Credit Card Payment
# register the handler to test it
await subscribe_to_queue(events_stan,
current_app.config.get('SUBSCRIPTION_OPTIONS').get('subject'),
current_app.config.get('SUBSCRIPTION_OPTIONS').get('queue'),
current_app.config.get('SUBSCRIPTION_OPTIONS').get('durable_name'),
cb_subscription_handler)
# 1. Create payment account
# 2. Create invoices and related records
# 3. Create CFS Invoice records
# 4. Mimic some credits on the account
# 4. Create a CFS settlement file, and verify the records
cfs_account_number = '1234'
pay_account: PaymentAccountModel = factory_create_pad_account(status=CfsAccountStatus.ACTIVE.value,
account_number=cfs_account_number)
invoice1: InvoiceModel = factory_invoice(payment_account=pay_account, total=100, service_fees=10.0,
payment_method_code=PaymentMethod.PAD.value)
factory_payment_line_item(invoice_id=invoice1.id, filing_fees=90.0,
service_fees=10.0, total=90.0)
invoice2: InvoiceModel = factory_invoice(payment_account=pay_account, total=200, service_fees=10.0,
payment_method_code=PaymentMethod.PAD.value)
factory_payment_line_item(invoice_id=invoice2.id, filing_fees=190.0,
service_fees=10.0, total=190.0)
invoice_number = '1234567890'
factory_invoice_reference(invoice_id=invoice1.id, invoice_number=invoice_number)
factory_invoice_reference(invoice_id=invoice2.id, invoice_number=invoice_number)
invoice1.invoice_status_code = InvoiceStatus.SETTLEMENT_SCHEDULED.value
invoice2.invoice_status_code = InvoiceStatus.SETTLEMENT_SCHEDULED.value
invoice1.save()
invoice2.save()
invoice1_id = invoice1.id
invoice2_id = invoice2.id
total = invoice1.total + invoice2.total
# Create a settlement file and publish.
file_name: str = 'cas_settlement_file.csv'
# Settlement row
receipt_number = '1234567890'
credit_memo_number = 'CM123'
date = datetime.now().strftime('%d-%b-%y')
credit_amount = 25
credit_row = [RecordType.CMAP.value, SourceTransaction.CREDIT_MEMO.value, credit_memo_number, 100002, date,
credit_amount, cfs_account_number, 'INV', invoice_number, total, 0, Status.PAID.value]
pad_row = [RecordType.PAD.value, SourceTransaction.PAD.value, receipt_number, 100001, date, total - credit_amount,
cfs_account_number, 'INV', invoice_number, total, 0, Status.PAID.value]
create_and_upload_settlement_file(file_name, [credit_row, pad_row])
await helper_add_event_to_queue(events_stan, file_name=file_name)
# The invoice should be in PAID status and Payment should be completed
updated_invoice1 = InvoiceModel.find_by_id(invoice1_id)
assert updated_invoice1.invoice_status_code == InvoiceStatus.PAID.value
updated_invoice2 = InvoiceModel.find_by_id(invoice2_id)
assert updated_invoice2.invoice_status_code == InvoiceStatus.PAID.value
payment: PaymentModel = PaymentModel.find_payment_by_receipt_number(receipt_number)
assert payment.payment_status_code == PaymentStatus.COMPLETED.value
assert payment.paid_amount == total - credit_amount
assert payment.receipt_number == receipt_number
assert payment.payment_method_code == PaymentMethod.PAD.value
assert payment.invoice_number == invoice_number
rcpt1: ReceiptModel = ReceiptModel.find_by_invoice_id_and_receipt_number(invoice1_id, receipt_number)
rcpt2: ReceiptModel = ReceiptModel.find_by_invoice_id_and_receipt_number(invoice2_id, receipt_number)
assert rcpt1
assert rcpt2
assert rcpt1.receipt_date == rcpt2.receipt_date
@pytest.mark.asyncio
async def test_pad_nsf_reconciliations(session, app, stan_server, event_loop, client_id, events_stan, future,
mock_publish):
"""Test Reconciliations worker for NSF."""
# Call back for the subscription
from reconciliations.worker import cb_subscription_handler
# register the handler to test it
await subscribe_to_queue(events_stan,
current_app.config.get('SUBSCRIPTION_OPTIONS').get('subject'),
current_app.config.get('SUBSCRIPTION_OPTIONS').get('queue'),
current_app.config.get('SUBSCRIPTION_OPTIONS').get('durable_name'),
cb_subscription_handler)
# 1. Create payment account
# 2. Create invoices and related records
# 3. Create CFS Invoice records
# 4. Create a CFS settlement file, and verify the records
cfs_account_number = '1234'
pay_account: PaymentAccountModel = factory_create_pad_account(status=CfsAccountStatus.ACTIVE.value,
account_number=cfs_account_number)
invoice1: InvoiceModel = factory_invoice(payment_account=pay_account, total=100, service_fees=10.0,
payment_method_code=PaymentMethod.PAD.value)
factory_payment_line_item(invoice_id=invoice1.id, filing_fees=90.0,
service_fees=10.0, total=90.0)
invoice2: InvoiceModel = factory_invoice(payment_account=pay_account, total=200, service_fees=10.0,
payment_method_code=PaymentMethod.PAD.value)
factory_payment_line_item(invoice_id=invoice2.id, filing_fees=190.0,
service_fees=10.0, total=190.0)
invoice_number = '1234567890'
factory_invoice_reference(invoice_id=invoice1.id, invoice_number=invoice_number)
factory_invoice_reference(invoice_id=invoice2.id, invoice_number=invoice_number)
invoice1.invoice_status_code = InvoiceStatus.SETTLEMENT_SCHEDULED.value
invoice2.invoice_status_code = InvoiceStatus.SETTLEMENT_SCHEDULED.value
invoice1.save()
invoice2.save()
invoice1_id = invoice1.id
invoice2_id = invoice2.id
pay_account_id = pay_account.id
total = invoice1.total + invoice2.total
# Create a settlement file and publish.
file_name: str = 'cas_settlement_file.csv'
# Settlement row
receipt_number = '1234567890'
date = datetime.now().strftime('%d-%b-%y')
row = [RecordType.PAD.value, SourceTransaction.PAD.value, receipt_number, 100001, date, 0, cfs_account_number,
'INV', invoice_number,
total, total, Status.NOT_PAID.value]
create_and_upload_settlement_file(file_name, [row])
await helper_add_event_to_queue(events_stan, file_name=file_name)
# The invoice should be in SETTLEMENT_SCHEDULED status and Payment should be FAILED
updated_invoice1 = InvoiceModel.find_by_id(invoice1_id)
assert updated_invoice1.invoice_status_code == InvoiceStatus.SETTLEMENT_SCHEDULED.value
updated_invoice2 = InvoiceModel.find_by_id(invoice2_id)
assert updated_invoice2.invoice_status_code == InvoiceStatus.SETTLEMENT_SCHEDULED.value
payment: PaymentModel = PaymentModel.find_payment_by_receipt_number(receipt_number)
assert payment.payment_status_code == PaymentStatus.FAILED.value
assert payment.paid_amount == 0
assert payment.receipt_number == receipt_number
assert payment.payment_method_code == PaymentMethod.PAD.value
assert payment.invoice_number == invoice_number
cfs_account: CfsAccountModel = CfsAccountModel.find_effective_by_account_id(pay_account_id)
assert cfs_account.status == CfsAccountStatus.FREEZE.value
@pytest.mark.asyncio
async def test_pad_reversal_reconciliations(session, app, stan_server, event_loop, client_id, events_stan, future,
mock_publish):
"""Test Reconciliations worker for NSF."""
# Call back for the subscription
from reconciliations.worker import cb_subscription_handler
# register the handler to test it
await subscribe_to_queue(events_stan,
current_app.config.get('SUBSCRIPTION_OPTIONS').get('subject'),
current_app.config.get('SUBSCRIPTION_OPTIONS').get('queue'),
current_app.config.get('SUBSCRIPTION_OPTIONS').get('durable_name'),
cb_subscription_handler)
# 1. Create payment account
# 2. Create invoices and related records for a completed payment
# 3. Create CFS Invoice records
# 4. Create a CFS settlement file, and verify the records
cfs_account_number = '1234'
pay_account: PaymentAccountModel = factory_create_pad_account(status=CfsAccountStatus.ACTIVE.value,
account_number=cfs_account_number)
invoice1: InvoiceModel = factory_invoice(payment_account=pay_account, total=100, service_fees=10.0,
payment_method_code=PaymentMethod.PAD.value,
status_code=InvoiceStatus.PAID.value)
factory_payment_line_item(invoice_id=invoice1.id, filing_fees=90.0,
service_fees=10.0, total=90.0)
invoice2: InvoiceModel = factory_invoice(payment_account=pay_account, total=200, service_fees=10.0,
payment_method_code=PaymentMethod.PAD.value,
status_code=InvoiceStatus.PAID.value)
factory_payment_line_item(invoice_id=invoice2.id, filing_fees=190.0,
service_fees=10.0, total=190.0)
invoice_number = '1234567890'
receipt_number = '9999999999'
factory_invoice_reference(invoice_id=invoice1.id, invoice_number=invoice_number,
status_code=InvoiceReferenceStatus.COMPLETED.value)
factory_invoice_reference(invoice_id=invoice2.id, invoice_number=invoice_number,
status_code=InvoiceReferenceStatus.COMPLETED.value)
receipt_id1 = factory_receipt(invoice_id=invoice1.id, receipt_number=receipt_number).save().id
receipt_id2 = factory_receipt(invoice_id=invoice2.id, receipt_number=receipt_number).save().id
invoice1_id = invoice1.id
invoice2_id = invoice2.id
pay_account_id = pay_account.id
total = invoice1.total + invoice2.total
payment = factory_payment(pay_account=pay_account, paid_amount=total, invoice_amount=total,
invoice_number=invoice_number,
receipt_number=receipt_number, status=PaymentStatus.COMPLETED.value)
pay_id = payment.id
# Now publish message saying payment has been reversed.
# Create a settlement file and publish.
file_name: str = 'cas_settlement_file.csv'
# Settlement row
date = datetime.now().strftime('%d-%b-%y')
row = [RecordType.PADR.value, SourceTransaction.PAD.value, receipt_number, 100001, date, 0, cfs_account_number,
'INV', invoice_number,
total, total, Status.NOT_PAID.value]
create_and_upload_settlement_file(file_name, [row])
await helper_add_event_to_queue(events_stan, file_name=file_name)
# The invoice should be in SETTLEMENT_SCHEDULED status and Payment should be FAILED
updated_invoice1 = InvoiceModel.find_by_id(invoice1_id)
assert updated_invoice1.invoice_status_code == InvoiceStatus.SETTLEMENT_SCHEDULED.value
updated_invoice2 = InvoiceModel.find_by_id(invoice2_id)
assert updated_invoice2.invoice_status_code == InvoiceStatus.SETTLEMENT_SCHEDULED.value
payment: PaymentModel = PaymentModel.find_by_id(pay_id)
assert payment.payment_status_code == PaymentStatus.FAILED.value
assert payment.paid_amount == 0
assert payment.receipt_number == receipt_number
assert payment.payment_method_code == PaymentMethod.PAD.value
assert payment.invoice_number == invoice_number
cfs_account: CfsAccountModel = CfsAccountModel.find_effective_by_account_id(pay_account_id)
assert cfs_account.status == CfsAccountStatus.FREEZE.value
# Receipt should be deleted
assert ReceiptModel.find_by_id(receipt_id1) is None
assert ReceiptModel.find_by_id(receipt_id2) is None
@pytest.mark.asyncio
async def test_eft_wire_reconciliations(session, app, stan_server, event_loop, client_id, events_stan, future,
mock_publish):
"""Test Reconciliations worker."""
# Call back for the subscription
from reconciliations.worker import cb_subscription_handler
# Create a Credit Card Payment
# register the handler to test it
await subscribe_to_queue(events_stan,
current_app.config.get('SUBSCRIPTION_OPTIONS').get('subject'),
current_app.config.get('SUBSCRIPTION_OPTIONS').get('queue'),
current_app.config.get('SUBSCRIPTION_OPTIONS').get('durable_name'),
cb_subscription_handler)
# 1. Create payment account
# 2. Create invoice and related records
# 3. Create CFS Invoice records
# 4. Create a CFS settlement file, and verify the records
cfs_account_number = '1234'
pay_account: PaymentAccountModel = factory_create_online_banking_account(status=CfsAccountStatus.ACTIVE.value,
cfs_account=cfs_account_number)
invoice: InvoiceModel = factory_invoice(payment_account=pay_account, total=100, service_fees=10.0,
payment_method_code=PaymentMethod.ONLINE_BANKING.value)
factory_payment_line_item(invoice_id=invoice.id, filing_fees=90.0,
service_fees=10.0, total=90.0)
invoice_number = '1234567890'
factory_invoice_reference(invoice_id=invoice.id, invoice_number=invoice_number)
invoice.invoice_status_code = InvoiceStatus.SETTLEMENT_SCHEDULED.value
invoice = invoice.save()
invoice_id = invoice.id
total = invoice.total
# Create a payment for EFT Wire
eft_wire_receipt = 'RCPT0012345'
paid_amount = 100
PaymentModel(payment_method_code=PaymentMethod.EFT.value,
payment_status_code=PaymentStatus.CREATED.value,
payment_system_code='PAYBC',
payment_account_id=pay_account.id,
payment_date=datetime.now(),
paid_amount=paid_amount,
receipt_number=eft_wire_receipt).save()
# Create a settlement file and publish.
file_name: str = 'cas_settlement_file.csv'
# Settlement row
date = datetime.now().strftime('%d-%b-%y')
row = [RecordType.EFTP.value, SourceTransaction.EFT_WIRE.value, eft_wire_receipt, 100001, date, total,
cfs_account_number, TargetTransaction.INV.value, invoice_number, total, 0, Status.PAID.value]
create_and_upload_settlement_file(file_name, [row])
await helper_add_event_to_queue(events_stan, file_name=file_name)
# The invoice should be in PAID status and Payment should be completed
updated_invoice = InvoiceModel.find_by_id(invoice_id)
assert updated_invoice.invoice_status_code == InvoiceStatus.PAID.value
payment: PaymentModel = PaymentModel.find_payment_by_receipt_number(eft_wire_receipt)
assert payment.payment_status_code == PaymentStatus.COMPLETED.value
assert payment.paid_amount == paid_amount
assert payment.receipt_number == eft_wire_receipt
@pytest.mark.asyncio
async def test_credits(session, app, stan_server, event_loop, client_id, events_stan, future, mock_publish,
monkeypatch):
"""Test Reconciliations worker."""
# Call back for the subscription
from reconciliations.worker import cb_subscription_handler
# Create a Credit Card Payment
# register the handler to test it
await subscribe_to_queue(events_stan,
current_app.config.get('SUBSCRIPTION_OPTIONS').get('subject'),
current_app.config.get('SUBSCRIPTION_OPTIONS').get('queue'),
current_app.config.get('SUBSCRIPTION_OPTIONS').get('durable_name'),
cb_subscription_handler)
# 1. Create payment account.
# 2. Create EFT/WIRE payment db record.
# 3. Create a credit memo db record.
# 4. Publish credit in settlement file.
# 5. Mock CFS Response for the receipt and credit memo.
# 6. Confirm the credit matches the records.
cfs_account_number = '1234'
pay_account: PaymentAccountModel = factory_create_online_banking_account(status=CfsAccountStatus.ACTIVE.value,
cfs_account=cfs_account_number)
pay_account_id = pay_account.id
# invoice_number = '1234567890'
# Create a payment for EFT Wire
eft_wire_receipt = 'RCPT0012345'
onac_amount = 100
cm_identifier = 1000
cm_amount = 100
cm_used_amount = 50
PaymentModel(payment_method_code=PaymentMethod.EFT.value,
payment_status_code=PaymentStatus.CREATED.value,
payment_system_code='PAYBC',
payment_account_id=pay_account.id,
payment_date=datetime.now(),
paid_amount=onac_amount,
receipt_number=eft_wire_receipt).save()
credit = CreditModel(cfs_identifier=cm_identifier,
is_credit_memo=True,
amount=cm_amount,
remaining_amount=cm_amount,
account_id=pay_account_id).save()
credit_id = credit.id
# Mock up the Receipt look up
def mock_receipt(cfs_account: CfsAccountModel,
receipt_number: str): # pylint: disable=unused-argument; mocks of library methods
return {
'receipt_amount': onac_amount
}
# Mock up the Receipt look up
def mock_cms(cfs_account: CfsAccountModel,
cms_number: str): # pylint: disable=unused-argument; mocks of library methods
return {
'amount_due': cm_amount - cm_used_amount
}
monkeypatch.setattr('pay_api.services.cfs_service.CFSService.get_receipt', mock_receipt)
monkeypatch.setattr('pay_api.services.cfs_service.CFSService.get_cms', mock_cms)
# Create a settlement file and publish.
file_name: str = 'cas_settlement_file.csv'
# Settlement row
date = datetime.now().strftime('%d-%b-%y')
row = [RecordType.ONAC.value, SourceTransaction.EFT_WIRE.value, eft_wire_receipt, 100001, date, onac_amount,
cfs_account_number, TargetTransaction.RECEIPT.value, eft_wire_receipt, onac_amount, 0, Status.ON_ACC.value]
create_and_upload_settlement_file(file_name, [row])
await helper_add_event_to_queue(events_stan, file_name=file_name)
# Look up credit file and make sure the credits are recorded.
pay_account = PaymentAccountModel.find_by_id(pay_account_id)
assert pay_account.credit == onac_amount + cm_amount - cm_used_amount
credit = CreditModel.find_by_id(credit_id)
assert credit.remaining_amount == cm_amount - cm_used_amount
| 51.595797 | 120 | 0.698713 | 4,916 | 41,741 | 5.642596 | 0.056957 | 0.03468 | 0.021919 | 0.022604 | 0.903782 | 0.892822 | 0.886514 | 0.879304 | 0.873644 | 0.863946 | 0 | 0.024863 | 0.228193 | 41,741 | 808 | 121 | 51.659653 | 0.836137 | 0.124793 | 0 | 0.81146 | 0 | 0 | 0.04697 | 0.009749 | 0 | 0 | 0 | 0 | 0.138632 | 1 | 0.003697 | false | 0 | 0.046211 | 0.003697 | 0.053604 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
10fd892af25891ed878ede2394c7396b840c3644 | 153 | py | Python | deployfish/aws/ecs/__init__.py | butlertron/deployfish | 8a2ef2ba1012e60b8e8d803ffcc421d3885cf4a3 | [
"MIT"
] | 1 | 2021-07-23T14:53:43.000Z | 2021-07-23T14:53:43.000Z | deployfish/aws/ecs/__init__.py | TweedInc/deployfish | e58df8d29fc5d1cda516964f41db822a7223d278 | [
"MIT"
] | 3 | 2019-08-21T17:03:14.000Z | 2021-07-14T18:55:25.000Z | deployfish/aws/ecs/__init__.py | butlertron/deployfish | 8a2ef2ba1012e60b8e8d803ffcc421d3885cf4a3 | [
"MIT"
] | 1 | 2020-02-16T17:34:48.000Z | 2020-02-16T17:34:48.000Z | from .Service import Service
from .Task import Task
from .Task import TaskDefinition
from .Task import ContainerDefinition
from .Task import VolumeMixin
| 25.5 | 37 | 0.836601 | 20 | 153 | 6.4 | 0.35 | 0.25 | 0.4375 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.130719 | 153 | 5 | 38 | 30.6 | 0.962406 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 7 |
801f0f0ced05fa4aea9ec241d7f9bc088669a484 | 165 | py | Python | back/db_create.py | PHIKN1GHT/secp_2020 | d77e91251d7237f0a47a362e480e536a17993726 | [
"MIT"
] | null | null | null | back/db_create.py | PHIKN1GHT/secp_2020 | d77e91251d7237f0a47a362e480e536a17993726 | [
"MIT"
] | null | null | null | back/db_create.py | PHIKN1GHT/secp_2020 | d77e91251d7237f0a47a362e480e536a17993726 | [
"MIT"
] | null | null | null | import os.path
from config import SQLALCHEMY_DATABASE_URI
from config import SQLALCHEMY_MIGRATE_REPO
from server import db, app
from model import *
db.create_all()
| 20.625 | 42 | 0.836364 | 26 | 165 | 5.115385 | 0.615385 | 0.150376 | 0.240602 | 0.390977 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.127273 | 165 | 7 | 43 | 23.571429 | 0.923611 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.833333 | 0 | 0.833333 | 0 | 1 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 7 |
8043e1179e9c988fa3c1f1b7b904e4af299937ef | 47,475 | py | Python | tests/test_initialization_methods/__init__.py | zks0002/fixedpoint | e847ff783eab9f242dcc7f29d293c82a591482c4 | [
"BSD-3-Clause"
] | 18 | 2020-05-12T22:40:10.000Z | 2022-02-03T21:27:13.000Z | tests/test_initialization_methods/__init__.py | zks0002/fixedpoint | e847ff783eab9f242dcc7f29d293c82a591482c4 | [
"BSD-3-Clause"
] | 5 | 2020-04-23T15:44:11.000Z | 2022-02-18T04:57:17.000Z | tests/test_initialization_methods/__init__.py | zks0002/fixedpoint | e847ff783eab9f242dcc7f29d293c82a591482c4 | [
"BSD-3-Clause"
] | 6 | 2020-06-03T20:37:54.000Z | 2022-02-18T05:00:37.000Z | #!/usr/bin/env python3.8
# Copyright 2020, Schweitzer Engineering Laboratories, Inc
# SEL Confidential
import random
import re
import sys
from pathlib import Path
import struct
from typing import Tuple, Dict, Any, Union, Iterator
from ..init import (
uut,
UTLOG,
LOGID,
nose,
)
from .. import tools
###############################################################################
# FLOAT TESTS
###############################################################################
@nose.tools.nottest
def initfloat_gen() -> Iterator[Tuple[Any, ...]]:
"""Generates floats. Return style is:
(init, *args, **kwargs, signed, m, n, bits)
"""
ref = {}
for nbit in tools.test_iterator():
s = random.randrange(2)
m = random.randint(1, 52)
n = random.randint(0, 52 - m)
init = tools.random_float(s, m, n, ref)
yield init, (), {}, bool(s), m, n, ref['bits']
@nose.tools.nottest
@tools.setup(progress_bar=True)
def test_initfloat():
"""Verify FixedPoint(float): deduce Q format
"""
sys.stderr.write(f'\b\b\b\b\b: deduce Q format ... ')
for init, args, _, s, m, n, bits in initfloat_gen():
x = uut.FixedPoint(init, *args)
UTLOG.info("%sQ%d.%d \n%.52f\n%s",
'' if (negative := (init < 0)) else 'U', m, n,
init,
binbits := bin(bits),
**LOGID
)
tools.verify_attributes(x,
signed=negative,
str_base=16,
rounding='convergent' if negative else 'nearest',
overflow='clamp',
overflow_alert='error',
mismatch_alert='warning',
implicit_cast_alert='warning',
# Checked below. Trailing/leading 0s are trimmed
m=NotImplemented,
n=NotImplemented,
bits=NotImplemented,
)
nose.tools.assert_equal(float(x), init)
nose.tools.assert_less_equal(x.m, m)
nose.tools.assert_less_equal(x.n, n)
nose.tools.assert_in(bin(x)[2:], binbits[2:])
@nose.tools.nottest
@tools.setup(progress_bar=True)
def test_initfloat_partial_q():
"""Verify FixedPoint(float): incomplete Q format
"""
sys.stderr.write(f'\b\b\b\b\b: incomplete Q format ... ')
ref = {}
for nbit in tools.test_iterator():
s = random.randrange(2)
m = random.randint(1, 52)
n = random.randint(0, 52 - m)
init = tools.random_float(s, m, n, ref)
# Choose which arguments are provided for Q format
args = {}
for arg, val in zip(['signed', 'm', 'n'], [s, m, n]):
if random.getrandbits(1):
args[arg] = val
bits = ref['bits']
UTLOG.info("%sQ%d.%d \n%.52f\n%s\n%r",
'' if (negative := args.get('signed', init < 0)) else 'U', m, n,
init,
binbits := bin(ref['bits']),
args,
**LOGID
)
x = uut.FixedPoint(init, **args)
sn = f"SN: {uut.FixedPoint._SERIAL_NUMBER}"
tools.verify_attributes(x,
signed=negative,
str_base=16,
rounding='convergent' if negative else 'nearest',
overflow='clamp',
overflow_alert='error',
mismatch_alert='warning',
implicit_cast_alert='warning',
# Checked below. Trailing/leading 0s are trimmed
m=NotImplemented,
n=NotImplemented,
bits=NotImplemented,
)
nose.tools.assert_equal(float(x), init, sn)
nose.tools.assert_less_equal(x.m, m, sn)
nose.tools.assert_less_equal(x.n, n, sn)
nose.tools.assert_in(bin(x)[2:], binbits[2:], sn)
class NonFloatLike:
def __init__(self, val):
self.val = float(val)
def __repr__(self):
return f"{self.__class__.__name__}({self.val!r})"
class FloatLike(NonFloatLike):
def __float__(self):
return self.val
@nose.tools.nottest
@tools.setup(progress_bar=True)
def test_initfloatlike():
"""Verify FixedPoint(float): floatable type
"""
sys.stderr.write(f'\b\b\b\b\b: floatable type ... ')
ref = {}
for nbit in tools.test_iterator():
s = random.randrange(2)
m = random.randint(1, 52)
n = random.randint(0, 52 - m)
init = tools.random_float(s, m, n, ref)
# Choose which arguments are provided for Q format
kwargs = {}
for arg, val in zip(['signed', 'm', 'n'], [s, m, n]):
if random.getrandbits(1):
kwargs[arg] = val
bits = ref['bits']
UTLOG.info("%sQ%d.%d \n%.52f\n%s\n%r",
'' if (negative := kwargs.get('signed', init < 0)) else 'U', m, n,
init,
binbits := bin(ref['bits']),
kwargs,
**LOGID
)
x = uut.FixedPoint(FloatLike(init), **kwargs)
sn = f"SN: {uut.FixedPoint._SERIAL_NUMBER}"
tools.verify_attributes(x,
signed=negative,
str_base=16,
rounding='convergent' if negative else 'nearest',
overflow='clamp',
overflow_alert='error',
mismatch_alert='warning',
implicit_cast_alert='warning',
# Checked below. Trailing/leading 0s are trimmed
m=NotImplemented,
n=NotImplemented,
bits=NotImplemented,
)
nose.tools.assert_equal(float(x), init, sn)
nose.tools.assert_less_equal(x.m, m, sn)
nose.tools.assert_less_equal(x.n, n, sn)
nose.tools.assert_in(bin(x)[2:], binbits[2:], sn)
@nose.tools.nottest
@tools.setup(progress_bar=False)
def test_initnotfloatable():
"""Verify FixedPoint(float): non-floatable type
"""
sys.stderr.write(f'\b\b\b\b\b: non-floatable type ... ')
# For weird data types that can't be converted to float
errmsg = r"Unsupported type [^;]+; cannot convert to float\."
with nose.tools.assert_raises_regex(TypeError, errmsg):
uut.FixedPoint(NonFloatLike(random.random()))
@nose.tools.nottest
@tools.setup(progress_bar=True)
def test_initfloat_minmax():
"""Verify FixedPoint(float) with clamp
"""
overflows = [x.name for x in uut.properties.Overflow]
sys.stderr.write(f'\b\b\b\b\b with min/max ... ')
for _ in tools.test_iterator():
L = random.randint(2, 52)
s = random.randrange(2)
m = random.randint(s, L)
n = L - m
bmax = 2**(m + n - s) - 1
bmin = -(bmax + 1) * s
lsb = 2**-n
props = {'overflow': random.choice(overflows)}
fmax = uut.FixedPoint(minimum := float(bmin * lsb), s, m, n, **props)
fmin = uut.FixedPoint(maximum := float(bmax * lsb), s, m, n, **props)
UTLOG.debug("%sQ%d.%d\n%.53f\n%.53f", '' if s else 'U', m, n,
minimum, maximum, **LOGID)
# Minimum and maximum value should not produce a warning or exception
with tools.CaptureWarnings() as warnings:
tools.verify_attributes(uut.FixedPoint(maximum, s, m, n, **props),
signed=s,
str_base=16,
rounding='convergent' if s else 'nearest',
overflow=props['overflow'],
overflow_alert='error',
mismatch_alert='warning',
implicit_cast_alert='warning',
m=m,
n=n,
bits=bmax,
)
tools.verify_attributes(uut.FixedPoint(minimum, s, m, n, **props),
signed=s,
str_base=16,
rounding='convergent' if s else 'nearest',
overflow=props['overflow'],
overflow_alert='error',
mismatch_alert='warning',
implicit_cast_alert='warning',
m=m,
n=n,
bits=abs(bmin),
)
nose.tools.assert_equal(len(warnings), 0)
@nose.tools.nottest
@tools.setup(progress_bar=True)
def test_initfloat_clamp():
"""Verify FixedPoint(float) with clamp
"""
sys.stderr.write(f'\b\b\b\b\b with clamp ... ')
for _ in tools.test_iterator():
L = random.randint(2, 52)
s = random.randrange(2)
m = random.randint(s, L)
n = L - m
bmax = 2**(m + n - s) - 1
bmin = -(bmax + 1) * s
lsb = 2**-n
props = {'overflow': 'clamp'}
fmin = uut.FixedPoint(minimum := float(bmin * lsb), s, m, n, **props)
fmax = uut.FixedPoint(maximum := float(bmax * lsb), s, m, n, **props)
UTLOG.debug("%sQ%d.%d\n%.53f\n%.53f", '' if s else 'U', m, n,
minimum, maximum, **LOGID)
# Minimum and maximum value should not produce a warning or exception
with tools.CaptureWarnings() as warnings:
tools.verify_attributes(uut.FixedPoint(maximum, s, m, n, **props),
signed=s,
str_base=16,
rounding='convergent' if s else 'nearest',
overflow='clamp',
overflow_alert='error',
mismatch_alert='warning',
implicit_cast_alert='warning',
m=m,
n=n,
bits=bmax,
)
tools.verify_attributes(uut.FixedPoint(minimum, s, m, n, **props),
signed=s,
str_base=16,
rounding='convergent' if s else 'nearest',
overflow='clamp',
overflow_alert='error',
mismatch_alert='warning',
implicit_cast_alert='warning',
m=m,
n=n,
bits=abs(bmin),
)
nose.tools.assert_equal(len(warnings), 0)
# Default behavior is for overflows to raise an exception
errmsg = r"\[SN\d+\] [\d.e+-]+ overflows in U?Q\d+\.\d+ format\."
with nose.tools.assert_raises_regex(uut.FixedPointOverflowError, errmsg):
uut.FixedPoint(maximum + lsb, s, m, n, **props)
with nose.tools.assert_raises_regex(uut.FixedPointOverflowError, errmsg):
uut.FixedPoint(minimum - lsb, s, m, n, **props)
# Allow overflow with warning and verify clamping
props['overflow_alert'] = 'warning'
wmsg = r"WARNING \[SN\d+\]: [\d.e+-]+ overflows in U?Q\d+\.\d+ format\."
maxmsg = r"WARNING \[SN\d+\]: Clamped to maximum\."
minmsg = r"WARNING \[SN\d+\]: Clamped to minimum\."
with tools.CaptureWarnings() as warnings:
x = uut.FixedPoint(maximum + lsb, s, m, n, **props)
nose.tools.assert_equal(x, fmax)
nose.tools.assert_equal(float(x), maximum)
nose.tools.assert_true(x.clamped)
first, second = warnings.logs
nose.tools.assert_true(re.search(wmsg, first))
nose.tools.assert_true(re.search(maxmsg, second))
with tools.CaptureWarnings() as warnings:
x = uut.FixedPoint(minimum - lsb, s, m, n, **props)
nose.tools.assert_equal(x, fmin)
nose.tools.assert_equal(float(x), minimum)
nose.tools.assert_true(x.clamped)
first, second = warnings.logs
nose.tools.assert_true(re.search(wmsg, first))
nose.tools.assert_true(re.search(minmsg, second))
# Disable overflow alerts and verify clamping
props['overflow_alert'] = 'ignore'
with tools.CaptureWarnings() as warnings:
x = uut.FixedPoint(maximum + lsb, s, m, n, **props)
nose.tools.assert_equal(x, fmax)
nose.tools.assert_equal(float(x), maximum)
nose.tools.assert_true(x.clamped)
nose.tools.assert_equal(len(warnings), 0)
with tools.CaptureWarnings() as warnings:
x = uut.FixedPoint(minimum - lsb, s, m, n, **props)
nose.tools.assert_equal(x, fmin)
nose.tools.assert_equal(float(x), minimum)
nose.tools.assert_true(x.clamped)
nose.tools.assert_equal(len(warnings), 0)
@nose.tools.nottest
@tools.setup(progress_bar=True)
def test_initfloat_wrap():
"""Verify FixedPoint(float) with wrap
"""
sys.stderr.write(f'\b\b\b\b\b with wrap ... ')
for _ in tools.test_iterator():
L = random.randint(2, 52)
s = random.randrange(2)
m = random.randint(s, L)
n = L - m
bmax = 2**(m + n - s) - 1
bmin = -(bmax + 1) * s
lsb = 2**-n
props = {'overflow': 'wrap'}
fmin = uut.FixedPoint(minimum := float(bmin * lsb), s, m, n, **props)
fmax = uut.FixedPoint(maximum := float(bmax * lsb), s, m, n, **props)
UTLOG.debug("%sQ%d.%d\n%.53f\n%.53f", '' if s else 'U', m, n,
minimum, maximum, **LOGID)
# Minimum and maximum value should not produce a warning or exception
with tools.CaptureWarnings() as warnings:
tools.verify_attributes(uut.FixedPoint(maximum, s, m, n, **props),
signed=s,
str_base=16,
rounding='convergent' if s else 'nearest',
overflow='wrap',
overflow_alert='error',
mismatch_alert='warning',
implicit_cast_alert='warning',
m=m,
n=n,
bits=bmax,
)
tools.verify_attributes(uut.FixedPoint(minimum, s, m, n, **props),
signed=s,
str_base=16,
rounding='convergent' if s else 'nearest',
overflow='wrap',
overflow_alert='error',
mismatch_alert='warning',
implicit_cast_alert='warning',
m=m,
n=n,
bits=abs(bmin),
)
nose.tools.assert_equal(len(warnings), 0)
# Default behavior is for overflows to raise an exception
errmsg = r"\[SN\d+\] [\d.e+-]+ overflows in U?Q\d+\.\d+ format\."
with nose.tools.assert_raises_regex(uut.FixedPointOverflowError, errmsg):
uut.FixedPoint(maximum + lsb, s, m, n, **props)
with nose.tools.assert_raises_regex(uut.FixedPointOverflowError, errmsg):
uut.FixedPoint(minimum - lsb, s, m, n, **props)
# Allow overflow with warning and verify wrapping
props['overflow_alert'] = 'warning'
wmsg = r"WARNING \[SN\d+\]: [\d.e+-]+ overflows in U?Q\d+\.\d+ format\."
maxmsg = r"WARNING \[SN\d+\]: Wrapped maximum\."
minmsg = r"WARNING \[SN\d+\]: Wrapped minimum\."
with tools.CaptureWarnings() as warnings:
x = uut.FixedPoint(maximum + lsb, s, m, n, **props)
nose.tools.assert_equal(x, fmin)
nose.tools.assert_equal(float(x), minimum)
nose.tools.assert_true(x.clamped)
first, second = warnings.logs
nose.tools.assert_true(re.search(wmsg, first))
nose.tools.assert_true(re.search(maxmsg, second))
with tools.CaptureWarnings() as warnings:
x = uut.FixedPoint(minimum - lsb, s, m, n, **props)
nose.tools.assert_equal(x, fmax)
nose.tools.assert_equal(float(x), maximum)
nose.tools.assert_true(x.clamped)
first, second = warnings.logs
nose.tools.assert_true(re.search(wmsg, first))
nose.tools.assert_true(re.search(minmsg, second))
# Disable overflow alerts and verify wrapping
props['overflow_alert'] = 'ignore'
with tools.CaptureWarnings() as warnings:
x = uut.FixedPoint(maximum + lsb, s, m, n, **props)
nose.tools.assert_equal(x, fmin)
nose.tools.assert_equal(float(x), minimum)
nose.tools.assert_true(x.clamped)
nose.tools.assert_equal(len(warnings), 0)
with tools.CaptureWarnings() as warnings:
x = uut.FixedPoint(minimum - lsb, s, m, n, **props)
nose.tools.assert_equal(x, fmax)
nose.tools.assert_equal(float(x), maximum)
nose.tools.assert_true(x.clamped)
nose.tools.assert_equal(len(warnings), 0)
@nose.tools.nottest
@tools.setup(progress_bar=True, require_matlab=True)
def test_initfloat_convergent():
"""Verify FixedPoint(float) with convergent round
"""
sys.stderr.write(f'\b\b\b\b\b with convergent round ... ')
seed = random.getrandbits(31)
UTLOG.debug("MATLAB RANDOM SEED: %d", seed, **LOGID)
tools.MATLAB.generate_stimulus(seed, tools.NUM_ITERATIONS)
unpacker = struct.Struct(
'd' # double - initialization value
'B' # unsigned char - signed
'B' # unsigned char - m
'B' # unsigned char - n
'5x' # Byte alignment padding
'16s' # 16-character string - expected hex value
'd' # double - float expected
)
props = {'rounding': 'convergent', 'str_base': 16}
for data in tools.test_iterator(tools.MATLAB.yield_stimulus(unpacker, 3)):
init, s, m, n, hexexp, floatexp = data
UTLOG.debug("INIT: %.53f\n%sQ%d.%d",
init, '' if s else 'U', m, n, **LOGID)
tools.verify_attributes(x := uut.FixedPoint(init, s, m, n, **props),
signed=s,
str_base=16,
rounding='convergent',
overflow='clamp',
overflow_alert='error',
mismatch_alert='warning',
implicit_cast_alert='warning',
m=m,
n=n,
bits=int(hexexp, 16),
)
nose.tools.assert_equal(float(x), floatexp)
@nose.tools.nottest
@tools.setup(progress_bar=True, require_matlab=True)
def test_initfloat_nearest():
"""Verify FixedPoint(float) with round to nearest
"""
sys.stderr.write(f'\b\b\b\b\b with round to nearest ... ')
seed = random.getrandbits(31)
UTLOG.debug("MATLAB RANDOM SEED: %d", seed, **LOGID)
tools.MATLAB.generate_stimulus(seed, tools.NUM_ITERATIONS)
unpacker = struct.Struct(
'd' # double - initialization value
'B' # unsigned char - signed
'B' # unsigned char - m
'B' # unsigned char - n
'5x' # Byte alignment padding
'16s' # 16-character string - expected hex value
'd' # double - float expected
)
props = {'rounding': 'nearest', 'str_base': 16}
for data in tools.test_iterator(tools.MATLAB.yield_stimulus(unpacker, 3)):
init, s, m, n, hexexp, floatexp = data
UTLOG.debug("INIT: %.53f\n%sQ%d.%d",
init, '' if s else 'U', m, n, **LOGID)
tools.verify_attributes(x := uut.FixedPoint(init, s, m, n, **props),
signed=s,
str_base=16,
rounding='nearest',
overflow='clamp',
overflow_alert='error',
mismatch_alert='warning',
implicit_cast_alert='warning',
m=m,
n=n,
bits=int(hexexp, 16),
)
nose.tools.assert_equal(float(x), floatexp)
@nose.tools.nottest
@tools.setup(progress_bar=True, require_matlab=True)
def test_initfloat_down():
"""Verify FixedPoint(float) with round down
"""
sys.stderr.write(f'\b\b\b\b\b with round down ... ')
seed = random.getrandbits(31)
UTLOG.debug("MATLAB RANDOM SEED: %d", seed, **LOGID)
tools.MATLAB.generate_stimulus(seed, tools.NUM_ITERATIONS)
unpacker = struct.Struct(
'd' # double - initialization value
'B' # unsigned char - signed
'B' # unsigned char - m
'B' # unsigned char - n
'5x' # Byte alignment padding
'16s' # 16-character string - expected hex value
'd' # double - float expected
)
props = {'rounding': 'down', 'str_base': 16}
for data in tools.test_iterator(tools.MATLAB.yield_stimulus(unpacker, 3)):
init, s, m, n, hexexp, floatexp = data
UTLOG.debug("INIT: %.53f\n%sQ%d.%d",
init, '' if s else 'U', m, n, **LOGID)
tools.verify_attributes(x := uut.FixedPoint(init, s, m, n, **props),
signed=s,
str_base=16,
rounding='down',
overflow='clamp',
overflow_alert='error',
mismatch_alert='warning',
implicit_cast_alert='warning',
m=m,
n=n,
bits=int(hexexp, 16),
)
nose.tools.assert_equal(float(x), floatexp)
@nose.tools.nottest
@tools.setup(progress_bar=True, require_matlab=True)
def test_initfloat_out():
"""Verify FixedPoint(float) with round out
"""
sys.stderr.write(f'\b\b\b\b\b with round out ... ')
seed = random.getrandbits(31)
UTLOG.debug("MATLAB RANDOM SEED: %d", seed, **LOGID)
tools.MATLAB.generate_stimulus(seed, tools.NUM_ITERATIONS)
unpacker = struct.Struct(
'd' # double - initialization value
'B' # unsigned char - signed
'B' # unsigned char - m
'B' # unsigned char - n
'5x' # Byte alignment padding
'16s' # 16-character string - expected hex value
'd' # double - float expected
)
props = {'rounding': 'out', 'str_base': 16}
for data in tools.test_iterator(tools.MATLAB.yield_stimulus(unpacker, 3)):
init, s, m, n, hexexp, floatexp = data
UTLOG.debug("INIT: %.53f\n%sQ%d.%d",
init, '' if s else 'U', m, n, **LOGID)
tools.verify_attributes(x := uut.FixedPoint(init, s, m, n, **props),
signed=s,
str_base=16,
rounding='out',
overflow='clamp',
overflow_alert='error',
mismatch_alert='warning',
implicit_cast_alert='warning',
m=m,
n=n,
bits=int(hexexp, 16),
)
nose.tools.assert_equal(float(x), floatexp)
@nose.tools.nottest
@tools.setup(progress_bar=True, require_matlab=True)
def test_initfloat_in():
"""Verify FixedPoint(float) with round in
"""
sys.stderr.write(f'\b\b\b\b\b with round in ... ')
seed = random.getrandbits(31)
UTLOG.debug("MATLAB RANDOM SEED: %d", seed, **LOGID)
tools.MATLAB.generate_stimulus(seed, tools.NUM_ITERATIONS)
unpacker = struct.Struct(
'd' # double - initialization value
'B' # unsigned char - signed
'B' # unsigned char - m
'B' # unsigned char - n
'5x' # Byte alignment padding
'16s' # 16-character string - expected hex value
'd' # double - float expected
)
props = {'rounding': 'in', 'str_base': 16}
for data in tools.test_iterator(tools.MATLAB.yield_stimulus(unpacker, 3)):
init, s, m, n, hexexp, floatexp = data
UTLOG.debug("INIT: %.53f\n%sQ%d.%d",
init, '' if s else 'U', m, n, **LOGID)
tools.verify_attributes(x := uut.FixedPoint(init, s, m, n, **props),
signed=s,
str_base=16,
rounding='in',
overflow='clamp',
overflow_alert='error',
mismatch_alert='warning',
implicit_cast_alert='warning',
m=m,
n=n,
bits=int(hexexp, 16),
)
nose.tools.assert_equal(float(x), floatexp)
@nose.tools.nottest
@tools.setup(progress_bar=True, require_matlab=True)
def test_initfloat_up():
"""Verify FixedPoint(float) with round up
"""
sys.stderr.write(f'\b\b\b\b\b with round up ... ')
seed = random.getrandbits(31)
UTLOG.debug("MATLAB RANDOM SEED: %d", seed, **LOGID)
tools.MATLAB.generate_stimulus(seed, tools.NUM_ITERATIONS)
unpacker = struct.Struct(
'd' # double - initialization value
'B' # unsigned char - signed
'B' # unsigned char - m
'B' # unsigned char - n
'5x' # Byte alignment padding
'16s' # 16-character string - expected hex value
'd' # double - float expected
)
props = {'rounding': 'up', 'str_base': 16}
for data in tools.test_iterator(tools.MATLAB.yield_stimulus(unpacker, 3)):
init, s, m, n, hexexp, floatexp = data
UTLOG.debug("INIT: %.53f\n%sQ%d.%d",
init, '' if s else 'U', m, n, **LOGID)
tools.verify_attributes(x := uut.FixedPoint(init, s, m, n, **props),
signed=s,
str_base=16,
rounding='up',
overflow='clamp',
overflow_alert='error',
mismatch_alert='warning',
implicit_cast_alert='warning',
m=m,
n=n,
bits=int(hexexp, 16),
)
nose.tools.assert_equal(float(x), floatexp)
@tools.setup(progress_bar=True)
def test_from_float():
"""Verify from_float
"""
ref = {}
for nbit in tools.test_iterator():
s = random.randrange(2)
m = random.randint(1, 52)
n = random.randint(0, 52 - m)
init = tools.random_float(s, m, n, ref)
x = uut.FixedPoint(0, s, m, n)
x.from_float(init)
bits = ref['bits']
UTLOG.info("%sQ%d.%d \n%.52f\n%s",
'' if s else 'U', m, n,
init,
bin(ref['bits']),
**LOGID
)
tools.verify_attributes(x,
signed=s,
m=m,
n=n,
bits=bits,
str_base=16,
rounding='convergent' if s else 'nearest',
overflow='clamp',
overflow_alert='error',
mismatch_alert='warning',
implicit_cast_alert='warning',
)
nose.tools.assert_equal(float(x), init)
@tools.setup(progress_bar=False)
def test_fromfloat_error():
"""Verify from_float exceptions
"""
x = uut.FixedPoint(1.0)
errmsg = re.escape(f'Expected {type(1.0)}; got {type(13)}.')
with nose.tools.assert_raises_regex(TypeError, errmsg):
x.from_float(13)
@tools.setup(progress_bar=True)
def test_float_initialization():
"""Verify FixedPoint(float)
"""
for test in [
test_initfloat_clamp,
test_initfloat_wrap,
test_initfloat,
test_initfloat_minmax,
test_initnotfloatable,
test_initfloat_partial_q,
test_initfloatlike,
test_initfloat_convergent,
test_initfloat_nearest,
test_initfloat_down,
test_initfloat_out,
test_initfloat_in,
test_initfloat_up,
]:
yield test
###############################################################################
# INT TESTS
###############################################################################
@nose.tools.nottest
def initint_gen() -> Tuple[int, Tuple[Any, ...], Dict[str, Any], bool, int, int, int]:
"""Generates ints. Return style is:
(init, *args, **kwargs, signed, m, n, bits)
"""
for nbit in tools.test_iterator():
s = random.randrange(2)
m = random.randint(1, 1000)
init = tools.random_int(s, m)
yield init, (), {}, bool(s), m, 0, init & (2**m-1)
@nose.tools.nottest
@tools.setup(progress_bar=True)
def test_initint():
"""Verify FixedPoint(int): deduce Q format
"""
sys.stderr.write(f'\b\b\b\b\b: deduce Q format ... ')
# Trim of trailing 0s and leading 1s (except for 1) for negative numbers
for init, args, _, s, m, _, _ in initint_gen():
x = uut.FixedPoint(init)
tools.verify_attributes(x,
signed=(s := bool(s and init)),
n=0,
str_base=16,
rounding='convergent' if s else 'nearest',
overflow='clamp',
overflow_alert='error',
mismatch_alert='warning',
implicit_cast_alert='warning',
# Checked below. Trailing/leading 0s are trimmed
m=NotImplemented,
bits=NotImplemented,
)
nose.tools.assert_less_equal(x.m, m)
nose.tools.assert_in(bin(x)[2:], bin(init & (2**m-1))[2:])
@nose.tools.nottest
@tools.setup(progress_bar=True)
def test_initint_partial_q():
"""Verify FixedPoint(int): incomplete Q format
"""
sys.stderr.write(f'\b\b\b\b\b: incomplete Q format ... ')
for nbit in tools.test_iterator():
s = random.randrange(2)
m = random.randint(1, 1000)
n = random.randint(0, 1000)
init = tools.random_int(s, m)
bits = (init << n) & (2**(m+n)-1)
# Choose which arguments are provided for Q format
args = {}
for arg, val in zip(['signed', 'm', 'n'], [s, m, n]):
if random.getrandbits(1):
args[arg] = val
x = uut.FixedPoint(init, **args)
sn = f"SN: {uut.FixedPoint._SERIAL_NUMBER}"
tools.verify_attributes(x,
signed=(negative := args.get('signed', init < 0)),
str_base=16,
rounding='convergent' if negative else 'nearest',
overflow='clamp',
overflow_alert='error',
mismatch_alert='warning',
implicit_cast_alert='warning',
# Checked below. Trailing/leading 0s may be trimmed
m=NotImplemented,
n=args.get('n', 0),
bits=NotImplemented,
)
nose.tools.assert_less_equal(x.m, m, sn)
nose.tools.assert_in(bin(x)[2:], bin(bits)[2:], sn)
@nose.tools.nottest
@tools.setup(progress_bar=True)
def test_initint_minmax():
"""Verify FixedPoint(maxint/minint)
"""
sys.stderr.write(f'\b\b\b\b\b with min/max ... ')
overflows = [x.name for x in uut.properties.Overflow]
for _ in tools.test_iterator():
s = random.randrange(2)
m = random.randint(1, 1000)
n = random.randint(0, 1000)
maximum = 2**(m - s) - 1
minimum = -2**(m - 1) * s
props = {'overflow': random.choice(overflows)}
# Minimum and maximum value should not produce a warning or exception
with tools.CaptureWarnings() as warnings:
tools.verify_attributes(
uut.FixedPoint(maximum, s, m, 0, **props),
signed=s,
str_base=16,
rounding='convergent' if s else 'nearest',
overflow=props['overflow'],
overflow_alert='error',
mismatch_alert='warning',
implicit_cast_alert='warning',
m=m,
n=0,
bits=maximum,
)
tools.verify_attributes(
uut.FixedPoint(minimum, s, m, n, **props),
signed=s,
str_base=16,
rounding='convergent' if s else 'nearest',
overflow=props['overflow'],
overflow_alert='error',
mismatch_alert='warning',
implicit_cast_alert='warning',
m=m,
n=n,
bits=s << (m + n - 1),
)
nose.tools.assert_equal(len(warnings), 0)
@nose.tools.nottest
@tools.setup(progress_bar=True)
def test_initint_clamp():
"""Verify FixedPoint(int) with clamp
"""
sys.stderr.write(f'\b\b\b\b\b with clamp ... ')
for _ in tools.test_iterator():
s = random.randrange(2)
m = random.randint(1, 1000)
n = random.randint(0, 1000)
props = {'overflow': 'clamp'}
fmax = uut.FixedPoint(maximum := 2**(m - s) - 1, s, m, 0, **props)
fmin = uut.FixedPoint(minimum := -2**(m - 1) * s, s, m, n, **props)
# Default behavior is for overflows to raise an exception
errmsg = r"\[SN\d+\] Integer -?\d+ overflows in U?Q\d+\.\d+ format\."
with nose.tools.assert_raises_regex(uut.FixedPointOverflowError, errmsg):
uut.FixedPoint(maximum + 1, s, m, 0, **props)
with nose.tools.assert_raises_regex(uut.FixedPointOverflowError, errmsg):
uut.FixedPoint(minimum - 1, s, m, n, **props)
# Allow overflow with warning and verify clamping
props['overflow_alert'] = 'warning'
wmsg = r"WARNING \[SN\d+\]: Integer -?\d+ overflows in U?Q\d+\.\d+ format\."
maxmsg = r"WARNING \[SN\d+\]: Clamped to maximum\."
minmsg = r"WARNING \[SN\d+\]: Clamped to minimum\."
with tools.CaptureWarnings() as warnings:
x = uut.FixedPoint(maximum + 1, s, m, 0, **props)
nose.tools.assert_equal(x, fmax)
nose.tools.assert_equal(int(x), maximum)
nose.tools.assert_true(x.clamped)
first, second = warnings.logs
nose.tools.assert_true(re.search(wmsg, first))
nose.tools.assert_true(re.search(maxmsg, second))
with tools.CaptureWarnings() as warnings:
x = uut.FixedPoint(minimum - 1, s, m, n, **props)
nose.tools.assert_equal(x, fmin)
nose.tools.assert_equal(int(x), minimum)
nose.tools.assert_true(x.clamped)
first, second = warnings.logs
nose.tools.assert_true(re.search(wmsg, first))
nose.tools.assert_true(re.search(minmsg, second))
# Disable overflow alerts and verify clamping
props['overflow_alert'] = 'ignore'
with tools.CaptureWarnings() as warnings:
x = uut.FixedPoint(maximum + 1, s, m, 0, **props)
nose.tools.assert_equal(x, fmax)
nose.tools.assert_equal(int(x), maximum)
nose.tools.assert_true(x.clamped)
nose.tools.assert_equal(len(warnings), 0)
with tools.CaptureWarnings() as warnings:
x = uut.FixedPoint(minimum - 1, s, m, n, **props)
nose.tools.assert_equal(x, fmin)
nose.tools.assert_equal(int(x), minimum)
nose.tools.assert_true(x.clamped)
nose.tools.assert_equal(len(warnings), 0)
@nose.tools.nottest
@tools.setup(progress_bar=True)
def test_initint_wrap():
"""Verify FixedPoint(int) with wrap
"""
sys.stderr.write(f'\b\b\b\b\b with wrap ... ')
for _ in tools.test_iterator():
s = random.randrange(2);
m = random.randint(1, 1000)
n = random.randint(0, 1000)
props = {'overflow': 'wrap'}
fmax = uut.FixedPoint(maximum := max(0, 2**(m - s) - 1), s, m, 0, **props) # Will be 0 for Q1.n
fmin = uut.FixedPoint(minimum := -2**(m - 1) * s, s, m, n, **props)
# Minimum and maximum value should not produce a warning or exception
with tools.CaptureWarnings() as warnings:
tools.verify_attributes(
uut.FixedPoint(maximum, s, m, 0, **props),
signed=s,
str_base=16,
rounding='convergent' if s else 'nearest',
overflow='wrap',
overflow_alert='error',
mismatch_alert='warning',
implicit_cast_alert='warning',
m=m,
n=0,
bits=maximum,
)
tools.verify_attributes(
uut.FixedPoint(minimum, s, m, n, **props),
signed=s,
str_base=16,
rounding='convergent' if s else 'nearest',
overflow='wrap',
overflow_alert='error',
mismatch_alert='warning',
implicit_cast_alert='warning',
m=m,
n=n,
bits=s << (m + n - 1),
)
nose.tools.assert_equal(len(warnings), 0)
# Default behavior is for overflows to raise an exception
errmsg = r"\[SN\d+\] Integer -?\d+ overflows in U?Q\d+\.\d+ format\."
with nose.tools.assert_raises_regex(uut.FixedPointOverflowError, errmsg):
uut.FixedPoint(maximum + 1, s, m, 0, **props)
with nose.tools.assert_raises_regex(uut.FixedPointOverflowError, errmsg):
uut.FixedPoint(minimum - 1, s, m, n, **props)
# Allow overflow with warning and verify clamping
props['overflow_alert'] = 'warning'
wmsg = r"WARNING \[SN\d+\]: Integer -?\d+ overflows in U?Q\d+\.\d+ format\."
maxmsg = r"WARNING \[SN\d+\]: Wrapped maximum\."
minmsg = r"WARNING \[SN\d+\]: Wrapped minimum\."
with tools.CaptureWarnings() as warnings:
x = uut.FixedPoint(maximum + 1, s, m, 0, **props)
nose.tools.assert_equal(x, fmin)
nose.tools.assert_equal(int(x), minimum)
first, second = warnings.logs
nose.tools.assert_true(re.search(wmsg, first))
nose.tools.assert_true(re.search(maxmsg, second))
with tools.CaptureWarnings() as warnings:
x = uut.FixedPoint(minimum - 1, s, m, n, **props)
nose.tools.assert_equal(x, fmax)
nose.tools.assert_equal(int(x), maximum)
first, second = warnings.logs
nose.tools.assert_true(re.search(wmsg, first))
nose.tools.assert_true(re.search(minmsg, second))
# Disable overflow alerts and verify clamping
props['overflow_alert'] = 'ignore'
with tools.CaptureWarnings() as warnings:
x = uut.FixedPoint(maximum + 1, s, m, 0, **props)
nose.tools.assert_equal(x, fmin)
nose.tools.assert_equal(int(x), minimum)
nose.tools.assert_equal(len(warnings), 0)
with tools.CaptureWarnings() as warnings:
x = uut.FixedPoint(minimum - 1, s, m, n, **props)
nose.tools.assert_equal(x, fmax)
nose.tools.assert_equal(int(x), maximum)
nose.tools.assert_equal(len(warnings), 0)
@tools.setup(progress_bar=True)
def test_int_initialization():
"""Verify FixedPoint(int)
"""
for test in [
test_initint,
test_initint_partial_q,
test_initint_clamp,
test_initint_wrap,
test_initint_minmax,
]:
yield test
@tools.setup(progress_bar=True)
def test_from_int():
"""Verify from_int
"""
for nbit in tools.test_iterator():
s = random.randrange(2)
m = random.randint(1, 1000)
n = random.randint(0, 1000)
init = tools.random_int(s, m)
x = uut.FixedPoint(0, s, m, n)
x.from_int(init)
tools.verify_attributes(x,
signed=s,
n=n,
str_base=16,
rounding='convergent' if s else 'nearest',
overflow='clamp',
overflow_alert='error',
mismatch_alert='warning',
implicit_cast_alert='warning',
m=m,
bits=(init << n) & (2**(m+n)-1),
)
@tools.setup(progress_bar=True)
def test_from_int_error():
"""Verify from_int error
"""
x = uut.FixedPoint(1)
# Verify that passing in something other than an int throws an error
errmsg = re.escape(f'Expected {type(1)}; got {type(13.0)}.')
with nose.tools.assert_raises_regex(TypeError, errmsg):
x.from_int(13.0)
###############################################################################
# STRING TESTS
###############################################################################
@nose.tools.nottest
def initstr_gen() -> Tuple[int, Tuple[Any, ...], Dict[str, Any], bool, int, int, int]:
"""Generates strings. Return style is:
(init, *args, **kwargs, signed, m, n, bits)
"""
base_conversion = list(uut.properties.StrConv.values())
for nbit in tools.test_iterator():
random.shuffle(base_conversion)
s = random.randrange(2)
m = random.randint(s, 1000)
n = random.randint(m == 0, 1000 - m)
init = random.getrandbits(L := m + n) | (s << (L-1))
conv = random.choice(base_conversion)
yield conv(init), (bool(s), m, n), {}, bool(s), m, n, init
@tools.setup(progress_bar=True)
def test_initstr():
"""Verify FixedPoint(str)
"""
base_conversion = list(uut.properties.StrConv.values())
errmsg = r"^Superfluous bits detected in string literal '0?[box]?[0-9a-f]+' for U?Q\d+\.\d+ format\.$"
for init, args, _, s, m, n, bits in initstr_gen():
x = uut.FixedPoint(init, *args)
tools.verify_attributes(x,
signed=s,
m=m,
n=n,
bits=bits,
str_base=16,
rounding='convergent' if s else 'nearest',
overflow='clamp',
overflow_alert='error',
mismatch_alert='warning',
implicit_cast_alert='warning',
)
init = random.choice(base_conversion)(bits | 2**(m+n+2))
with nose.tools.assert_raises_regex(ValueError, errmsg):
uut.FixedPoint(init, s, m, n)
@tools.setup(progress_bar=True)
def test_from_str():
"""Verify from_str
"""
base_conversion = list(uut.properties.StrConv.values())
errmsg = r"^Superfluous bits detected in string literal '0?[box]?[0-9a-f]+' for U?Q\d+\.\d+ format\.$"
for nbit in tools.test_iterator():
s = random.randrange(2)
m = random.randint(s, 1000)
n = random.randint(m == 0, 1000 - m)
L = m + n
init = random.getrandbits(L) | (s << (L-1))
for conv in base_conversion:
x = uut.FixedPoint(0, s, m, n)
x.from_string(conv(init))
tools.verify_attributes(x,
signed=s,
m=m,
n=n,
bits=init,
str_base=16,
rounding='convergent' if s else 'nearest',
overflow='clamp',
overflow_alert='error',
mismatch_alert='warning',
implicit_cast_alert='warning',
)
init = random.choice(base_conversion)(init + 2**(m+n+2))
with nose.tools.assert_raises_regex(ValueError, errmsg):
x.from_string(init)
# Verify that passing in something other than a string throws an error
errmsg = re.escape(f'Expected {type("")}; got {type(13)}.')
with nose.tools.assert_raises_regex(TypeError, errmsg):
x.from_string(13)
###############################################################################
# FIXEDPOINT TESTS
###############################################################################
@tools.setup(progress_bar=True)
def test_initFixedPoint():
"""Verify constructor FixedPoint(FixedPoint)
"""
iterators = [
initfloat_gen,
initint_gen,
initstr_gen,
nondefault_props_gen,
]
for iterator in iterators:
for init, args, kwargs, _, _, _, _ in iterator():
x = uut.FixedPoint(init, *args, **kwargs)
tools.verify_attributes(uut.FixedPoint(x),
signed=x.signed,
m=x.m,
n=x.n,
bits=x._bits,
str_base=x.str_base,
rounding=x.rounding,
overflow=x.overflow,
overflow_alert=x.overflow_alert,
mismatch_alert=x.mismatch_alert,
implicit_cast_alert=x.implicit_cast_alert,
)
###############################################################################
# MISCELLANEOUS TESTS
###############################################################################
@nose.tools.nottest
def nondefault_props_gen() -> Tuple[Union[float, int, str], Tuple[Any, ...], Dict[str, Any], bool, int, int, int]:
"""Generates ints, floats, and strings with non-deafult properties.
Return style is: (init, *args, **kwargs, signed, m, n, bits)
"""
ref = {}
choices = {
'overflow': [x.name for x in uut.properties.Overflow],
'rounding': [x.name for x in uut.properties.Rounding],
'str_base': list(uut.properties.StrConv.keys()),
'overflow_alert': [x.name for x in uut.properties.Alert],
'implicit_cast_alert': [x.name for x in uut.properties.Alert],
'mismatch_alert': [x.name for x in uut.properties.Alert],
}
iterator = zip(initfloat_gen(), initint_gen(), initstr_gen())
for f, i, s in tools.test_iterator(iterator):
x = random.choice([f, i, s])
# Generate random properties
kwargs = {}
for key in list(uut.properties.PROPERTIES):
if random.getrandbits(1):
kwargs[key] = (value := random.choice(choices[key]))
yield x[:2] + (kwargs,) + x[3:]
@tools.setup(progress_bar=True)
def test_nondefault_properties():
"""Verify non-default property specs
"""
expected = {}
for init, args, kwargs, s, m, n, bits in nondefault_props_gen():
x = uut.FixedPoint(init, *args, **kwargs)
# expected values
expected['overflow'] = kwargs.get('overflow', 'clamp')
expected['rounding'] = kwargs.get('rounding', 'convergent' if (s if isinstance(init, str) else (init < 0)) else 'nearest')
expected['str_base'] = kwargs.get('str_base', 16)
expected['overflow_alert'] = kwargs.get('overflow_alert', 'error')
expected['mismatch_alert'] = kwargs.get('mismatch_alert', 'warning')
expected['implicit_cast_alert'] = kwargs.get('implicit_cast_alert', 'warning')
if isinstance(init, int):
expected['signed'] = bool(s and init)
expected['m'] = NotImplemented
expected['n'] = 0
expected['bits'] = NotImplemented
tools.verify_attributes(x, **expected)
nose.tools.assert_less_equal(x.m, m)
nose.tools.assert_in(bin(x)[2:], bin(init & (2**m-1))[2:])
elif isinstance(init, float):
expected['signed'] = init < 0
expected['m'] = NotImplemented
expected['n'] = NotImplemented
expected['bits'] = NotImplemented
tools.verify_attributes(x, **expected)
nose.tools.assert_equal(float(x), init)
nose.tools.assert_less_equal(x.m, m)
nose.tools.assert_less_equal(x.n, n)
nose.tools.assert_in(bin(x)[2:], bin(bits)[2:])
else: # string
expected['signed'] = s
expected['m'] = m
expected['n'] = n
expected['bits'] = bits
tools.verify_attributes(x, **expected)
@tools.setup(progress_bar=True)
def test_init_invalid_q():
"""Verify constructor invalid q
"""
# String not fully specified
base_conversion = list(uut.properties.StrConv.values())
errmsg = r"^String literal initialization Q format must be fully constrained\.$"
for nbit in tools.test_iterator():
s = random.randrange(2)
m = random.randint(s, 1000)
n = random.randint(m == 0, 1000 - m)
L = m + n
init = random.getrandbits(L) | (s << (L-1))
invalid_arguments = [
{},
{'n': n},
{'m': m},
{'m': m, 'n': n},
{'signed': s},
{'signed': s, 'n': n},
{'signed': s, 'm': m},
]
conv = random.choice(base_conversion)
for args in invalid_arguments:
with nose.tools.assert_raises_regex(ValueError, errmsg):
uut.FixedPoint(conv(init), **args)
# Negative n
errmsg = r"^Number of fractional bits must be non-negative\.$"
with nose.tools.assert_raises_regex(ValueError, errmsg):
uut.FixedPoint(init, n=-1)
# Negative m
errmsg = r"^Number of integer bits must be non-negative\.$"
with nose.tools.assert_raises_regex(ValueError, errmsg):
uut.FixedPoint(init, m=-max(m, 1))
# m=0 for signed
errmsg = r"^Number of integer bits must be at least 1 for signed numbers\.$"
with nose.tools.assert_raises_regex(ValueError, errmsg):
uut.FixedPoint(init, signed=1, m=0, n=max(n, 1))
# Zero word length
errmsg = r"^Word size \(integer and fractional\) must be positive\.$"
with nose.tools.assert_raises_regex(ValueError, errmsg):
uut.FixedPoint(init, m=0, n=0)
| 37.470403 | 130 | 0.554144 | 5,792 | 47,475 | 4.438363 | 0.052486 | 0.050064 | 0.070603 | 0.043568 | 0.85607 | 0.827868 | 0.81826 | 0.796281 | 0.786439 | 0.764228 | 0 | 0.0135 | 0.294745 | 47,475 | 1,266 | 131 | 37.5 | 0.754286 | 0.093986 | 0 | 0.756731 | 0 | 0.009615 | 0.102089 | 0.004722 | 0 | 0 | 0 | 0 | 0.116346 | 1 | 0.034615 | false | 0 | 0.007692 | 0.001923 | 0.046154 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
3376366adfbf72fd2465f82097dceedb28820eea | 151 | py | Python | demo_function.py | 2951121599/utils | 382fe05d744a4b549d4677bc5700dafe7acb5d94 | [
"MIT"
] | null | null | null | demo_function.py | 2951121599/utils | 382fe05d744a4b549d4677bc5700dafe7acb5d94 | [
"MIT"
] | null | null | null | demo_function.py | 2951121599/utils | 382fe05d744a4b549d4677bc5700dafe7acb5d94 | [
"MIT"
] | null | null | null | # -*-coding:utf-8-*-
# 作者: 29511
# 文件名: test_function.py
# 日期时间:2022/3/17,0:27
print("test----------222111111")
print("test----------2222222222")
| 18.875 | 33 | 0.569536 | 21 | 151 | 4.047619 | 0.857143 | 0.211765 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.261194 | 0.112583 | 151 | 7 | 34 | 21.571429 | 0.373134 | 0.490066 | 0 | 0 | 0 | 0 | 0.652778 | 0.652778 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 9 |
33f73f97954697615df75793d3f2a12e99417c16 | 324 | py | Python | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/GLX/__init__.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/GLX/__init__.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/GLX/__init__.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | """Platform-specific functions/support for the xorg/X11 windowing system"""
from OpenGL.raw.GLX._types import *
from OpenGL.GLX.VERSION.GLX_1_0 import *
from OpenGL.GLX.VERSION.GLX_1_1 import *
from OpenGL.GLX.VERSION.GLX_1_2 import *
from OpenGL.GLX.VERSION.GLX_1_3 import *
from OpenGL.GLX.VERSION.GLX_1_4 import *
| 40.5 | 76 | 0.780864 | 56 | 324 | 4.321429 | 0.392857 | 0.247934 | 0.330579 | 0.392562 | 0.619835 | 0.619835 | 0.619835 | 0 | 0 | 0 | 0 | 0.041958 | 0.117284 | 324 | 7 | 77 | 46.285714 | 0.804196 | 0.212963 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 7 |
d502636b5e47cdff03a15e01957ab94ab69c2ad2 | 5,675 | py | Python | Automated Wikipedia Dump/wiki_prac.py | rajatgarg149/Scraping-Wikipedia-Dump | f666fc3651128f8222784ddb9745721933472654 | [
"MIT"
] | null | null | null | Automated Wikipedia Dump/wiki_prac.py | rajatgarg149/Scraping-Wikipedia-Dump | f666fc3651128f8222784ddb9745721933472654 | [
"MIT"
] | null | null | null | Automated Wikipedia Dump/wiki_prac.py | rajatgarg149/Scraping-Wikipedia-Dump | f666fc3651128f8222784ddb9745721933472654 | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup
import requests
import csv
#import time
#from collections import defaultdict
#from pprint import pprint
#from gensim import corpora, models, similarities
import sys
from requests.exceptions import ConnectionError
i=0
for url in open('links.txt'):
i = i+1
print '---> '+str(i)
url_r_1 = "https://en.wikipedia.org/wiki/"
url_r = "http://en.wikipedia.org/wiki/"
if url.startswith('https://en.wikipedia.org/wiki'):
title = url.replace(url_r_1,'',1)
elif url.startswith('http://en.wikipedia.org/wiki'):
title = url.replace(url_r,'',1)
else:
continue
title = title.replace('\n','',1)
title1 = title.replace('/','',10)
url_new = "https://en.wikipedia.org/w/index.php?title="+str(title)+"&action=history&year=2009&month=-1&tagfilter="
print url_new
while 1:
try:
r = requests.get(url_new)
soup = BeautifulSoup(r.content,"lxml")
except ConnectionError:
continue
else:
break
#for link in soup.find_all('a',{'class':'mw-changeslist-date'}):
# print link.get('href')
try:
history = soup.find_all('a',{'class':'mw-changeslist-date'} )[0].get('href')
except IndexError:
foo = open(sys.argv[1]+title1+'_2009','w')
foo.write("None")
foo.close
foo = open(sys.argv[2]+title1+'_2011','w')
foo.write("None")
foo.close
continue
url_surf = "https://en.wikipedia.org"+history
print url_surf
while 1:
try:
r = requests.get(url_surf)
soup = BeautifulSoup(r.content,"lxml")
except ConnectionError:
continue
else:
break
foo = open(sys.argv[1]+title1+'_2009','w')
foo1 = open('Categories','a')
flag = 0
flag_1 = 1
for link in soup.find_all(["h1","h2","h3","p","li","ul","a","div"]):
if link.get_text() == "Navigation menu":
break
if link.name in ("th"):
foo.write(link.get_text().encode('utf-8')+'\n')
if flag ==1 :
flag = 0
if link.name in ('a'):
if link.get_text() == "Categories":
flag = 1
flag_1 = 1
foo.write(link.get_text().encode('utf-8')+'\n')
else:
continue
if link.get_text() == "v":
break
if link.name in ('div'):
if link.get_text().startswith("Hidden categories:"):
break
else:
continue
if link.name in ("h1","h2"):
foo.write(link.get_text().encode('utf-8')+'\n')
if flag ==1 :
flag = 0
elif link.name in ("h3"):
foo.write(link.get_text().encode('utf-8')+'\n')
if flag ==1 :
flag = 0
elif link.name in ("li"):
foo.write(link.get_text().encode('utf-8')+'\n')
if flag ==1 :
flag_1 = 1
for line in open('Categories'):
if line.rstrip('\n') == link.get_text().encode('utf-8'):
flag_1 = 0
if flag_1 == 1:
foo1.write(link.get_text().encode('utf-8')+'\n')
elif link.name in ("p"):
if flag ==1 :
flag = 0
for string in link:
if string.name == 'a':
#foo.write(string.get('href'))
foo.write(string.get_text().encode('utf-8'))
else:
try:
foo.write(string.get_text().encode('utf-8'))
except:
foo.write(string.encode('utf-8'))
foo.write('\n')
foo.close()
foo1.close()
url_new = "https://en.wikipedia.org/w/index.php?title="+str(title)+"&action=history&year=2011&month=-1&tagfilter="
while 1:
try:
r = requests.get(url_new)
soup = BeautifulSoup(r.content,"lxml")
except ConnectionError:
continue
else:
break
#for link in soup.find_all('a',{'class':'mw-changeslist-date'}):
# print link.get('href')
history = soup.find_all('a',{'class':'mw-changeslist-date'})[0].get('href')
url_surf = "https://en.wikipedia.org"+history
print url_surf
while 1:
try:
r = requests.get(url_surf)
soup = BeautifulSoup(r.content,"lxml")
except ConnectionError:
continue
else:
break
foo = open(sys.argv[2]+title1+'_2011','w')
foo1 = open('Categories','a')
flag = 0
flag_1 = 1
for link in soup.find_all(["h1","h2","h3","p","li","ul","a","div"]):
if link.get_text() == "Navigation menu":
break
if link.name in ("th"):
foo.write(link.get_text().encode('utf-8')+'\n')
if flag ==1 :
flag = 0
if link.name in ('a'):
if link.get_text() == "Categories":
flag = 1
flag_1 = 1
foo.write(link.get_text().encode('utf-8')+'\n')
else:
continue
if link.get_text() == "v":
break
if link.name in ('div'):
if link.get_text().startswith("Hidden categories:"):
break
else:
continue
if link.name in ("h1","h2"):
foo.write(link.get_text().encode('utf-8')+'\n')
if flag ==1 :
flag = 0
elif link.name in ("h3"):
foo.write(link.get_text().encode('utf-8')+'\n')
if flag ==1 :
flag = 0
elif link.name in ("li"):
foo.write(link.get_text().encode('utf-8')+'\n')
if flag ==1 :
flag_1 = 1
for line in open('Categories'):
if line.rstrip('\n') == link.get_text().encode('utf-8'):
flag_1 = 0
if flag_1 == 1:
foo1.write(link.get_text().encode('utf-8')+'\n')
elif link.name in ("p"):
if flag ==1 :
flag = 0
for string in link:
if string.name == 'a':
#foo.write(string.get('href'))
foo.write(string.get_text().encode('utf-8'))
else:
try:
foo.write(string.get_text().encode('utf-8'))
except:
foo.write(string.encode('utf-8'))
foo.write('\n')
foo.close()
foo1.close()
| 29.252577 | 116 | 0.56 | 815 | 5,675 | 3.822086 | 0.127607 | 0.058427 | 0.077689 | 0.092456 | 0.8687 | 0.851364 | 0.838523 | 0.838523 | 0.814767 | 0.814767 | 0 | 0.030925 | 0.253568 | 5,675 | 193 | 117 | 29.404145 | 0.704438 | 0.06185 | 0 | 0.883978 | 0 | 0 | 0.148099 | 0.016936 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.027624 | null | null | 0.022099 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
d513b05179bcbf2e03857a4e32a82f57321dfb1c | 23,346 | py | Python | Topaz/GeneratedConjureTriple.py | Rhodolite/Gem.py.UnitTest | eaa8b6855bcfbb12f67e7eb146928814543ef9d4 | [
"MIT"
] | null | null | null | Topaz/GeneratedConjureTriple.py | Rhodolite/Gem.py.UnitTest | eaa8b6855bcfbb12f67e7eb146928814543ef9d4 | [
"MIT"
] | null | null | null | Topaz/GeneratedConjureTriple.py | Rhodolite/Gem.py.UnitTest | eaa8b6855bcfbb12f67e7eb146928814543ef9d4 | [
"MIT"
] | null | null | null | #
# Copyright (c) 2017-2018 Joy Diamond. All rights reserved.
#
@gem('Topaz.GeneratedConjureTriple')
def gem():
from Gem import create_herd_3, create_herd_4, create_herd_many, create_horde_2, create_horde_many, displace_4y, displace_4z, displace_4z6, displace_4z7
map__lookup = Map.get
map__provide = Map.setdefault
map__store = Map.__setitem__
@share
def produce_simplified_conjure_triple__312(
name, Meta, cache,
lookup = absent,
provide = absent,
store = absent,
):
lookup = cache.get
provide = cache.setdefault
store = cache.__setitem__
@rename('simplified_conjure_%s', name)
def simplified_conjure_triple__312(k1, k2, k3):
#create_next(<KeyData <CommonKeyData 7 7 7 3 ('k3', 'k1', 'k2') k1, k2, k3> 0; 0 0 p q r 0; 0 k3 k1 k2 0>, 0, 0)
p = lookup(k3)
if p is none:
q = Meta(k1, k2, k3)
assert (q.k3 is k3) and (q.k1 is k1) and (q.k2 is k2)
return provide(k3, q)
if p.k1 is k1:
if p.k2 is k2: return p
q = Meta(k1, k2, k3)
assert (q.k3 is k3) and (q.k1 is k1) and (q.k2 is k2)
store(k3, create_horde_2(1, p.k2, k2, p, q))
return q
ph = p.herd_estimate
if ph is 0:
q = Meta(k1, k2, k3)
assert (q.k3 is k3) and (q.k1 is k1) and (q.k2 is k2)
herd = create_herd_2(p.k1, k1, p, q)
store(k3, herd)
return q
if p.skip is 0:
#create_next(<KeyData <CommonKeyData 7 7 7 3 ('k3', 'k1', 'k2') k1, k2, k3> 1; 0 p q r 0 0; k3 k1 k2 0 0>, ph, 0)
#create_next: shift: 1; herd only
if ph is 8:
q = map__lookup(p, k1)
if q is none:
r = Meta(k1, k2, k3)
assert (r.k3 is k3) and (r.k1 is k1) and (r.k2 is k2)
return map__provide(p, k1, r)
if q.k2 is k2: return q
elif p.a is k1:
q = p.v
if q.k2 is k2: return q
pr = p.displace_v
elif p.b is k1:
q = p.w
if q.k2 is k2: return q
pr = p.displace_w
elif ph is 2:
q = Meta(k1, k2, k3)
assert (q.k3 is k3) and (q.k1 is k1) and (q.k2 is k2)
store(k3, create_herd_3(p.a, p.b, k1, p.v, p.w, q))
return q
elif p.c is k1:
q = p.x
if q.k2 is k2: return q
pr = p.displace_x
elif ph is 3:
q = Meta(k1, k2, k3)
assert (q.k3 is k3) and (q.k1 is k1) and (q.k2 is k2)
store(k3, create_herd_4(p.a, p.b, p.c, k1, p.v, p.w, p.x, q))
return q
else:
assert ph is 7
if p.d is k1:
q = p.y
if q.k2 is k2: return q
pr = displace_4y
else:
pe = p.e
if pe is k1:
q = p.z
if q.k2 is k2: return q
pr = displace_4z
elif pe is absent:
p.e = k1
p.e6 = absent
p.z = q = Meta(k1, k2, k3)
assert (q.k3 is k3) and (q.k1 is k1) and (q.k2 is k2)
return q
else:
pe6 = p.e6
if pe6 is k1:
q = p.z6
if q.k2 is k2: return q
pr = displace_4z6
elif pe6 is absent:
p.e6 = k1
p.e7 = absent
p.z6 = q = Meta(k1, k2, k3)
assert (q.k3 is k3) and (q.k1 is k1) and (q.k2 is k2)
return q
else:
pe7 = p.e7
if pe7 is k1:
q = p.z7
if q.k2 is k2: return q
pr = displace_4z7
else:
q = Meta(k1, k2, k3)
assert (q.k3 is k3) and (q.k1 is k1) and (q.k2 is k2)
if pe7 is absent:
p.e7 = k1
p.z7 = q
return q
store(
k3,
create_herd_many(
p.a, p.b, p.c, p.d, pe, pe6, pe7, k1,
p.v, p.w, p.x, p.y, p.z, p.z6, p.z7, q,
)
)
return q
qh = q.herd_estimate
if qh is 0:
r = Meta(k1, k2, k3)
assert (r.k3 is k3) and (r.k1 is k1) and (r.k2 is k2)
herd = create_herd_2(q.k2, k2, q, r)
if ph is 8: map__store(p, k1, herd)
else: pr(p, herd)
return r
#create_last: herd or horde
if qh is 8:
r = map__lookup(q, k2)
if r is not none:
assert (r.k3 is k3) and (r.k1 is k1) and (r.k2 is k2)
return r
r = Meta(k1, k2, k3)
assert (r.k3 is k3) and (r.k1 is k1) and (r.k2 is k2)
map__store(q, k2, r)
return r
if q.a is k2:
r = q.v
assert (r.k3 is k3) and (r.k1 is k1) and (r.k2 is k2)
return r
if q.b is k2:
r = q.w
assert (r.k3 is k3) and (r.k1 is k1) and (r.k2 is k2)
return r
if qh is 2:
r = Meta(k1, k2, k3)
assert (r.k3 is k3) and (r.k1 is k1) and (r.k2 is k2)
if ph is 8:
map__store(p, k1, create_herd_3(q.a, q.b, k2, q.v, q.w, r))
else:
pr(p, create_herd_3(q.a, q.b, k2, q.v, q.w, r))
return r
qc = q.c
if qc is k2:
r = q.x
assert (r.k3 is k3) and (r.k1 is k1) and (r.k2 is k2)
return r
if qc is absent:
q.c = k2
q.x = r = Meta(k1, k2, k3)
assert (r.k3 is k3) and (r.k1 is k1) and (r.k2 is k2)
return r
if qh is 3:
r = Meta(k1, k2, k3)
assert (r.k3 is k3) and (r.k1 is k1) and (r.k2 is k2)
if ph is 8:
map__store(p, k1, create_herd_4(q.a, q.b, qc, k2, q.v, q.w, q.x, r))
else:
pr(p, create_herd_4(q.a, q.b, qc, k2, q.v, q.w, q.x, r))
return r
assert qh is 7
qd = q.d
if qd is k2:
r = q.y
assert (r.k3 is k3) and (r.k1 is k1) and (r.k2 is k2)
return r
if qd is absent:
q.d = k2
q.y = r = Meta(k1, k2, k3)
assert (r.k3 is k3) and (r.k1 is k1) and (r.k2 is k2)
return r
qe = q.e
if qe is k2:
r = q.z
assert (r.k3 is k3) and (r.k1 is k1) and (r.k2 is k2)
return r
if qe is absent:
q.e = k2
q.e6 = absent
q.z = r = Meta(k1, k2, k3)
assert (r.k3 is k3) and (r.k1 is k1) and (r.k2 is k2)
return r
qe6 = q.e6
if qe6 is k2:
r = q.z6
assert (r.k3 is k3) and (r.k1 is k1) and (r.k2 is k2)
return r
if qe6 is absent:
q.e6 = k2
q.e7 = absent
q.z6 = r = Meta(k1, k2, k3)
assert (r.k3 is k3) and (r.k1 is k1) and (r.k2 is k2)
return r
qe7 = q.e7
if qe7 is k2:
r = q.z7
assert (r.k3 is k3) and (r.k1 is k1) and (r.k2 is k2)
return r
r = Meta(k1, k2, k3)
assert (r.k3 is k3) and (r.k1 is k1) and (r.k2 is k2)
if qe7 is absent:
q.e7 = k2
q.z7 = r
return r
if ph is 8:
map__store(
p,
k1,
create_herd_many(
q.a, q.b, qc, qd, qe, qe6, qe7, k2,
q.v, q.w, q.x, q.y, q.z, q.z6, q.z7, r,
),
)
else:
pr(
p,
create_herd_many(
q.a, q.b, qc, qd, qe, qe6, qe7, k2,
q.v, q.w, q.x, q.y, q.z, q.z6, q.z7, r,
),
)
return r
assert p.skip is 1
p_k1 = p.sample().k1
if p_k1 is not k1:
r = Meta(k1, k2, k3)
assert (r.k3 is k3) and (r.k1 is k1) and (r.k2 is k2)
store(k3, create_herd_2(p_k1, k1, p.remove_skip(), r))
return r
#create_last: horde only
if ph is 8:
r = map__lookup(p, k2)
if r is not none:
assert (r.k3 is k3) and (r.k1 is k1) and (r.k2 is k2)
return r
r = Meta(k1, k2, k3)
assert (r.k3 is k3) and (r.k1 is k1) and (r.k2 is k2)
map__store(p, k2, r)
return r
assert ph is 3
if p.a is k2:
r = p.v
assert (r.k3 is k3) and (r.k1 is k1) and (r.k2 is k2)
return r
if p.b is k2:
r = p.w
assert (r.k3 is k3) and (r.k1 is k1) and (r.k2 is k2)
return r
pc = p.c
if pc is k2:
r = p.x
assert (r.k3 is k3) and (r.k1 is k1) and (r.k2 is k2)
return r
r = Meta(k1, k2, k3)
assert (r.k3 is k3) and (r.k1 is k1) and (r.k2 is k2)
if pc is absent:
p.c = k2
p.x = r
return r
h = create_horde_many(1, p.a, p.b, pc, k2, p.v, p.w, p.x, r)
assert h.sample().k1 is k1
store(k3, h)
return r
return simplified_conjure_triple__312
@share
def produce_simplified_conjure_triple(
name, Meta, cache,
lookup = absent,
provide = absent,
store = absent,
):
lookup = cache.get
provide = cache.setdefault
store = cache.__setitem__
@rename('simplified_conjure_%s', name)
def simplified_conjure_triple(k1, k2, k3):
#create_next(<KeyData <CommonKeyData 7 7 7 3 ('k1', 'k2', 'k3') k1, k2, k3> 0; 0 0 p q r 0; 0 k1 k2 k3 0>, 0, 0)
p = lookup(k1)
if p is none:
q = Meta(k1, k2, k3)
assert (q.k1 is k1) and (q.k2 is k2) and (q.k3 is k3)
return provide(k1, q)
if p.k2 is k2:
if p.k3 is k3: return p
q = Meta(k1, k2, k3)
assert (q.k1 is k1) and (q.k2 is k2) and (q.k3 is k3)
store(k1, create_horde_2(1, p.k3, k3, p, q))
return q
ph = p.herd_estimate
if ph is 0:
q = Meta(k1, k2, k3)
assert (q.k1 is k1) and (q.k2 is k2) and (q.k3 is k3)
herd = create_herd_2(p.k2, k2, p, q)
store(k1, herd)
return q
if p.skip is 0:
#create_next(<KeyData <CommonKeyData 7 7 7 3 ('k1', 'k2', 'k3') k1, k2, k3> 1; 0 p q r 0 0; k1 k2 k3 0 0>, ph, 0)
#create_next: shift: 1; herd only
if ph is 8:
q = map__lookup(p, k2)
if q is none:
r = Meta(k1, k2, k3)
assert (r.k1 is k1) and (r.k2 is k2) and (r.k3 is k3)
return map__provide(p, k2, r)
if q.k3 is k3: return q
elif p.a is k2:
q = p.v
if q.k3 is k3: return q
pr = p.displace_v
elif p.b is k2:
q = p.w
if q.k3 is k3: return q
pr = p.displace_w
elif ph is 2:
q = Meta(k1, k2, k3)
assert (q.k1 is k1) and (q.k2 is k2) and (q.k3 is k3)
store(k1, create_herd_3(p.a, p.b, k2, p.v, p.w, q))
return q
elif p.c is k2:
q = p.x
if q.k3 is k3: return q
pr = p.displace_x
elif ph is 3:
q = Meta(k1, k2, k3)
assert (q.k1 is k1) and (q.k2 is k2) and (q.k3 is k3)
store(k1, create_herd_4(p.a, p.b, p.c, k2, p.v, p.w, p.x, q))
return q
else:
assert ph is 7
if p.d is k2:
q = p.y
if q.k3 is k3: return q
pr = displace_4y
else:
pe = p.e
if pe is k2:
q = p.z
if q.k3 is k3: return q
pr = displace_4z
elif pe is absent:
p.e = k2
p.e6 = absent
p.z = q = Meta(k1, k2, k3)
assert (q.k1 is k1) and (q.k2 is k2) and (q.k3 is k3)
return q
else:
pe6 = p.e6
if pe6 is k2:
q = p.z6
if q.k3 is k3: return q
pr = displace_4z6
elif pe6 is absent:
p.e6 = k2
p.e7 = absent
p.z6 = q = Meta(k1, k2, k3)
assert (q.k1 is k1) and (q.k2 is k2) and (q.k3 is k3)
return q
else:
pe7 = p.e7
if pe7 is k2:
q = p.z7
if q.k3 is k3: return q
pr = displace_4z7
else:
q = Meta(k1, k2, k3)
assert (q.k1 is k1) and (q.k2 is k2) and (q.k3 is k3)
if pe7 is absent:
p.e7 = k2
p.z7 = q
return q
store(
k1,
create_herd_many(
p.a, p.b, p.c, p.d, pe, pe6, pe7, k2,
p.v, p.w, p.x, p.y, p.z, p.z6, p.z7, q,
)
)
return q
qh = q.herd_estimate
if qh is 0:
r = Meta(k1, k2, k3)
assert (r.k1 is k1) and (r.k2 is k2) and (r.k3 is k3)
herd = create_herd_2(q.k3, k3, q, r)
if ph is 8: map__store(p, k2, herd)
else: pr(p, herd)
return r
#create_last: herd or horde
if qh is 8:
r = map__lookup(q, k3)
if r is not none:
assert (r.k1 is k1) and (r.k2 is k2) and (r.k3 is k3)
return r
r = Meta(k1, k2, k3)
assert (r.k1 is k1) and (r.k2 is k2) and (r.k3 is k3)
map__store(q, k3, r)
return r
if q.a is k3:
r = q.v
assert (r.k1 is k1) and (r.k2 is k2) and (r.k3 is k3)
return r
if q.b is k3:
r = q.w
assert (r.k1 is k1) and (r.k2 is k2) and (r.k3 is k3)
return r
if qh is 2:
r = Meta(k1, k2, k3)
assert (r.k1 is k1) and (r.k2 is k2) and (r.k3 is k3)
if ph is 8:
map__store(p, k2, create_herd_3(q.a, q.b, k3, q.v, q.w, r))
else:
pr(p, create_herd_3(q.a, q.b, k3, q.v, q.w, r))
return r
qc = q.c
if qc is k3:
r = q.x
assert (r.k1 is k1) and (r.k2 is k2) and (r.k3 is k3)
return r
if qc is absent:
q.c = k3
q.x = r = Meta(k1, k2, k3)
assert (r.k1 is k1) and (r.k2 is k2) and (r.k3 is k3)
return r
if qh is 3:
r = Meta(k1, k2, k3)
assert (r.k1 is k1) and (r.k2 is k2) and (r.k3 is k3)
if ph is 8:
map__store(p, k2, create_herd_4(q.a, q.b, qc, k3, q.v, q.w, q.x, r))
else:
pr(p, create_herd_4(q.a, q.b, qc, k3, q.v, q.w, q.x, r))
return r
assert qh is 7
qd = q.d
if qd is k3:
r = q.y
assert (r.k1 is k1) and (r.k2 is k2) and (r.k3 is k3)
return r
if qd is absent:
q.d = k3
q.y = r = Meta(k1, k2, k3)
assert (r.k1 is k1) and (r.k2 is k2) and (r.k3 is k3)
return r
qe = q.e
if qe is k3:
r = q.z
assert (r.k1 is k1) and (r.k2 is k2) and (r.k3 is k3)
return r
if qe is absent:
q.e = k3
q.e6 = absent
q.z = r = Meta(k1, k2, k3)
assert (r.k1 is k1) and (r.k2 is k2) and (r.k3 is k3)
return r
qe6 = q.e6
if qe6 is k3:
r = q.z6
assert (r.k1 is k1) and (r.k2 is k2) and (r.k3 is k3)
return r
if qe6 is absent:
q.e6 = k3
q.e7 = absent
q.z6 = r = Meta(k1, k2, k3)
assert (r.k1 is k1) and (r.k2 is k2) and (r.k3 is k3)
return r
qe7 = q.e7
if qe7 is k3:
r = q.z7
assert (r.k1 is k1) and (r.k2 is k2) and (r.k3 is k3)
return r
r = Meta(k1, k2, k3)
assert (r.k1 is k1) and (r.k2 is k2) and (r.k3 is k3)
if qe7 is absent:
q.e7 = k3
q.z7 = r
return r
if ph is 8:
map__store(
p,
k2,
create_herd_many(
q.a, q.b, qc, qd, qe, qe6, qe7, k3,
q.v, q.w, q.x, q.y, q.z, q.z6, q.z7, r,
),
)
else:
pr(
p,
create_herd_many(
q.a, q.b, qc, qd, qe, qe6, qe7, k3,
q.v, q.w, q.x, q.y, q.z, q.z6, q.z7, r,
),
)
return r
assert p.skip is 1
p_k2 = p.sample().k2
if p_k2 is not k2:
r = Meta(k1, k2, k3)
assert (r.k1 is k1) and (r.k2 is k2) and (r.k3 is k3)
store(k1, create_herd_2(p_k2, k2, p.remove_skip(), r))
return r
#create_last: horde only
if ph is 8:
r = map__lookup(p, k3)
if r is not none:
assert (r.k1 is k1) and (r.k2 is k2) and (r.k3 is k3)
return r
r = Meta(k1, k2, k3)
assert (r.k1 is k1) and (r.k2 is k2) and (r.k3 is k3)
map__store(p, k3, r)
return r
assert ph is 3
if p.a is k3:
r = p.v
assert (r.k1 is k1) and (r.k2 is k2) and (r.k3 is k3)
return r
if p.b is k3:
r = p.w
assert (r.k1 is k1) and (r.k2 is k2) and (r.k3 is k3)
return r
pc = p.c
if pc is k3:
r = p.x
assert (r.k1 is k1) and (r.k2 is k2) and (r.k3 is k3)
return r
r = Meta(k1, k2, k3)
assert (r.k1 is k1) and (r.k2 is k2) and (r.k3 is k3)
if pc is absent:
p.c = k3
p.x = r
return r
h = create_horde_many(1, p.a, p.b, pc, k3, p.v, p.w, p.x, r)
assert h.sample().k2 is k2
store(k1, h)
return r
return simplified_conjure_triple
| 36.364486 | 155 | 0.329735 | 3,167 | 23,346 | 2.371329 | 0.032207 | 0.053262 | 0.061518 | 0.079095 | 0.925832 | 0.90466 | 0.874834 | 0.838349 | 0.812783 | 0.786152 | 0 | 0.100837 | 0.585411 | 23,346 | 641 | 156 | 36.421217 | 0.67507 | 0.028527 | 0 | 0.757463 | 1 | 0 | 0.003089 | 0.003089 | 0 | 0 | 0 | 0 | 0.141791 | 1 | 0.009328 | false | 0 | 0.001866 | 0 | 0.149254 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 |
1d4a3c987e6d9e3895a49d7f60c73c2e19ea6a2c | 2,711 | py | Python | RasPi_Dev/ros_ws/build/third_packages/world_canvas/world_canvas_msgs/cmake/world_canvas_msgs-genmsg-context.py | QianheYu/xtark_driver_dev | 1708888161cf20c0d1f45c99d0da4467d69c26c8 | [
"BSD-3-Clause"
] | 1 | 2022-03-11T03:31:15.000Z | 2022-03-11T03:31:15.000Z | RasPi_Dev/ros_ws/build/third_packages/world_canvas/world_canvas_msgs/cmake/world_canvas_msgs-genmsg-context.py | bravetree/xtark_driver_dev | 1708888161cf20c0d1f45c99d0da4467d69c26c8 | [
"BSD-3-Clause"
] | null | null | null | RasPi_Dev/ros_ws/build/third_packages/world_canvas/world_canvas_msgs/cmake/world_canvas_msgs-genmsg-context.py | bravetree/xtark_driver_dev | 1708888161cf20c0d1f45c99d0da4467d69c26c8 | [
"BSD-3-Clause"
] | null | null | null | # generated from genmsg/cmake/pkg-genmsg.context.in
messages_str = "/home/xtark/ros_ws/src/third_packages/world_canvas/world_canvas_msgs/msg/Annotation.msg;/home/xtark/ros_ws/src/third_packages/world_canvas/world_canvas_msgs/msg/Annotations.msg;/home/xtark/ros_ws/src/third_packages/world_canvas/world_canvas_msgs/msg/AnnotationData.msg;/home/xtark/ros_ws/src/third_packages/world_canvas/world_canvas_msgs/msg/WorldCanvas.msg;/home/xtark/ros_ws/src/third_packages/world_canvas/world_canvas_msgs/msg/MapListEntry.msg"
services_str = "/home/xtark/ros_ws/src/third_packages/world_canvas/world_canvas_msgs/srv/DeleteMap.srv;/home/xtark/ros_ws/src/third_packages/world_canvas/world_canvas_msgs/srv/ListMaps.srv;/home/xtark/ros_ws/src/third_packages/world_canvas/world_canvas_msgs/srv/PublishMap.srv;/home/xtark/ros_ws/src/third_packages/world_canvas/world_canvas_msgs/srv/RenameMap.srv;/home/xtark/ros_ws/src/third_packages/world_canvas/world_canvas_msgs/srv/SaveMap.srv;/home/xtark/ros_ws/src/third_packages/world_canvas/world_canvas_msgs/srv/DeleteAnnotations.srv;/home/xtark/ros_ws/src/third_packages/world_canvas/world_canvas_msgs/srv/GetAnnotations.srv;/home/xtark/ros_ws/src/third_packages/world_canvas/world_canvas_msgs/srv/GetAnnotationsData.srv;/home/xtark/ros_ws/src/third_packages/world_canvas/world_canvas_msgs/srv/PubAnnotationsData.srv;/home/xtark/ros_ws/src/third_packages/world_canvas/world_canvas_msgs/srv/EditAnnotationsData.srv;/home/xtark/ros_ws/src/third_packages/world_canvas/world_canvas_msgs/srv/SaveAnnotationsData.srv;/home/xtark/ros_ws/src/third_packages/world_canvas/world_canvas_msgs/srv/ListWorlds.srv;/home/xtark/ros_ws/src/third_packages/world_canvas/world_canvas_msgs/srv/SetKeyword.srv;/home/xtark/ros_ws/src/third_packages/world_canvas/world_canvas_msgs/srv/SetRelationship.srv;/home/xtark/ros_ws/src/third_packages/world_canvas/world_canvas_msgs/srv/ResetDatabase.srv;/home/xtark/ros_ws/src/third_packages/world_canvas/world_canvas_msgs/srv/YAMLImport.srv;/home/xtark/ros_ws/src/third_packages/world_canvas/world_canvas_msgs/srv/YAMLExport.srv"
pkg_name = "world_canvas_msgs"
dependencies_str = "std_msgs;uuid_msgs;geometry_msgs"
langs = "gencpp;geneus;genlisp;gennodejs;genpy"
dep_include_paths_str = "world_canvas_msgs;/home/xtark/ros_ws/src/third_packages/world_canvas/world_canvas_msgs/msg;std_msgs;/opt/ros/kinetic/share/std_msgs/cmake/../msg;uuid_msgs;/home/xtark/ros_ws/src/third_packages/unique_identifier/uuid_msgs/msg;geometry_msgs;/opt/ros/kinetic/share/geometry_msgs/cmake/../msg"
PYTHON_EXECUTABLE = "/usr/bin/python"
package_has_static_sources = '' == 'TRUE'
genmsg_check_deps_script = "/opt/ros/kinetic/share/genmsg/cmake/../../../lib/genmsg/genmsg_check_deps.py"
| 225.916667 | 1,558 | 0.859093 | 441 | 2,711 | 4.947846 | 0.174603 | 0.24198 | 0.171861 | 0.153987 | 0.689734 | 0.669569 | 0.669569 | 0.669569 | 0.652154 | 0.652154 | 0 | 0 | 0.012542 | 2,711 | 11 | 1,559 | 246.454545 | 0.815092 | 0.018075 | 0 | 0 | 1 | 0.333333 | 0.923684 | 0.91015 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.111111 | 0 | 0.111111 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
d549a0b301c11c231d4d12bdf4e5db765b565f34 | 4,307 | py | Python | tests/test_propagation_logger.py | sturmianseq/pysllo | 8bc4d17f9a668e9aff3c77f688f0c06ed2e7686b | [
"BSD-3-Clause"
] | 3 | 2016-06-28T15:48:05.000Z | 2020-06-18T07:10:35.000Z | tests/test_propagation_logger.py | sturmianseq/pysllo | 8bc4d17f9a668e9aff3c77f688f0c06ed2e7686b | [
"BSD-3-Clause"
] | 2 | 2016-06-21T20:43:02.000Z | 2016-06-23T13:22:09.000Z | tests/test_propagation_logger.py | sturmianseq/pysllo | 8bc4d17f9a668e9aff3c77f688f0c06ed2e7686b | [
"BSD-3-Clause"
] | 1 | 2021-11-24T15:57:01.000Z | 2021-11-24T15:57:01.000Z | import pytest
import logging
def test_forcing_level_by_level_value(propagation_logger, handler):
msg = "TEST"
propagation_logger.setLevel(logging.INFO)
propagation_logger.force_level(logging.DEBUG)
propagation_logger.debug(msg)
record = handler.pop()
assert record.msg == msg
assert record.levelname == logging.getLevelName(logging.DEBUG)
with pytest.raises(IndexError):
handler.pop()
def test_forcing_level_by_level_name(propagation_logger, handler):
msg = "TEST"
propagation_logger.setLevel(logging.INFO)
propagation_logger.force_level(logging.getLevelName(logging.DEBUG))
propagation_logger.debug(msg)
record = handler.pop()
assert record.msg == msg
assert record.levelname == logging.getLevelName(logging.DEBUG)
with pytest.raises(IndexError):
handler.pop()
def test_level_propagation(propagation_logger, handler):
msg1 = "TEST1"
msg2 = "TEST2"
propagation_logger.set_propagation(True)
propagation_logger.setLevel(logging.INFO)
def test_second_level():
propagation_logger.debug(msg2)
@propagation_logger.level_propagation(logging.DEBUG)
def test_first_level():
propagation_logger.debug(msg1)
test_second_level()
test_first_level()
test_second_level()
record2 = handler.pop()
record1 = handler.pop()
assert record1.levelname == logging.getLevelName(logging.DEBUG)
assert record2.levelname == logging.getLevelName(logging.DEBUG)
with pytest.raises(IndexError):
handler.pop()
def test_reset_level(propagation_logger, handler):
msg = "TEST"
propagation_logger.setLevel(logging.INFO)
propagation_logger.force_level(logging.getLevelName(logging.DEBUG))
propagation_logger.reset_level()
propagation_logger.debug(msg)
with pytest.raises(IndexError):
handler.pop()
def test_forcing_level_with_kwargs_by_level(propagation_logger, handler):
msg1 = "TEST1"
msg2 = "TEST2"
propagation_logger.setLevel(logging.INFO)
propagation_logger.force_level(logger_1=logging.DEBUG)
additional_logger = logging.getLogger('logger_1')
additional_logger.setLevel(logging.INFO)
additional_logger.addHandler(handler)
propagation_logger.debug(msg1)
additional_logger.debug(msg2)
record = handler.pop()
assert record.msg == msg2
assert record.levelname == logging.getLevelName(logging.DEBUG)
with pytest.raises(IndexError):
handler.pop()
def test_forcing_level_with_kwargs_by_level(propagation_logger, handler):
msg1 = "TEST1"
msg2 = "TEST2"
propagation_logger.setLevel(logging.INFO)
propagation_logger.force_level(logger_1="DEBUG")
additional_logger = logging.getLogger('logger_1')
additional_logger.setLevel(logging.INFO)
additional_logger.addHandler(handler)
propagation_logger.debug(msg1)
additional_logger.debug(msg2)
record = handler.pop()
assert record.msg == msg2
assert record.levelname == logging.getLevelName(logging.DEBUG)
with pytest.raises(IndexError):
handler.pop()
def test_forcing_level_by_dict(propagation_logger, handler):
msg1 = "TEST1"
msg2 = "TEST2"
propagation_logger.setLevel(logging.INFO)
levels = {
'logger_1': logging.DEBUG
}
propagation_logger.force_level(levels)
additional_logger = logging.getLogger('logger_1')
additional_logger.setLevel(logging.INFO)
additional_logger.addHandler(handler)
propagation_logger.debug(msg1)
additional_logger.debug(msg2)
record = handler.pop()
assert record.msg == msg2
assert record.levelname == logging.getLevelName(logging.DEBUG)
with pytest.raises(IndexError):
handler.pop()
def test_forcing_level_without_args_and_kwargs(propagation_logger, handler):
with pytest.raises(TypeError) as exc_info:
propagation_logger.force_level()
assert '0 given' in str(exc_info.value)
def test_forcing_level_with_too_many_args(propagation_logger, handler):
with pytest.raises(TypeError) as exc_info:
propagation_logger.force_level(logging.DEBUG, logging.DEBUG)
assert '2 given' in str(exc_info.value)
| 33.387597 | 77 | 0.717669 | 490 | 4,307 | 6.063265 | 0.116327 | 0.200269 | 0.070683 | 0.084147 | 0.840121 | 0.806799 | 0.781555 | 0.777516 | 0.777516 | 0.757657 | 0 | 0.011175 | 0.189691 | 4,307 | 128 | 78 | 33.648438 | 0.840115 | 0 | 0 | 0.704762 | 0 | 0 | 0.024647 | 0 | 0 | 0 | 0 | 0 | 0.133333 | 1 | 0.104762 | false | 0 | 0.019048 | 0 | 0.12381 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
d56713328a09ea5a01cd13754bb4b930b70b5281 | 2,942 | py | Python | plutopy/pluto_yt.py | sddyates/MyPythonPackages | 908fd84017cdadd9628f57ef988c7e6cfc2d90bc | [
"MIT"
] | null | null | null | plutopy/pluto_yt.py | sddyates/MyPythonPackages | 908fd84017cdadd9628f57ef988c7e6cfc2d90bc | [
"MIT"
] | null | null | null | plutopy/pluto_yt.py | sddyates/MyPythonPackages | 908fd84017cdadd9628f57ef988c7e6cfc2d90bc | [
"MIT"
] | 2 | 2019-07-02T05:48:33.000Z | 2021-12-08T05:39:32.000Z | def yt_setup(Ui, plot_geometry, limits):
"""
Plot the interpolated data using yt-python.
"""
import yt
import numpy as np
import matplotlib as plt
import matplotlib.cm as cm
from yt.utilities.physical_constants import mp, kb
from yt.units import dimensions
result = dict(
density = (Ui[0], "g/cm**3"))#,
#pressure = (Ui[1], "dyne/cm**2"),
#velocity_x = (Ui[2], "cm/s"),
#velocity_y = (Ui[3], "cm/s"),
#velocity_z = (Ui[4], "cm/s"),
#magnetic_field_x = (Ui[5], "G"),
#magnetic_field_y = (Ui[6], "G"),
#magnetic_field_z = (Ui[7], "G")
#)
ds = yt.load_uniform_grid(
result,
Ui[0].shape,
length_unit="9*Rsun",
mass_unit=2.4578492774399997e+23,
time_unit=6.26e6,
velocity_unit="cm/s",
magnetic_unit="G",
bbox=limits,
geometry=plot_geometry)
'''
def _temperature(field, data):
mu = 1.01
return (data["gas", "pressure"]*mu*mp)/(data["gas", "density"]*kb)
ds.add_field(("gas", "temperature"), function=_temperature, units="auto",
dimensions=dimensions.temperature)
def _H_number_density(field, data):
mu_i = 1.01
return data["gas", "density"]/(mu_i*mp)
ds.add_field(("gas", "H_number_density"), function=_H_number_density, units="cm**-3")
'''
return ds
def yt_setup_tau(Ui, plot_geometry, limits):
"""
Plot the interpolated data using yt-python.
"""
import yt
import numpy as np
import matplotlib as plt
import matplotlib.cm as cm
from yt.utilities.physical_constants import mp, kb
from yt.units import dimensions
result = dict(
density = (Ui[0], "g/cm**3"),
pressure = (Ui[1], "dyne/cm**2"),
tau_ff = (Ui[2], ""))
'''
velocity_x = (Ui[2], "cm/s"),
velocity_y = (Ui[3], "cm/s"),
velocity_z = (Ui[4], "cm/s"),
magnetic_field_x = (Ui[5], "G"),
magnetic_field_y = (Ui[6], "G"),
magnetic_field_z = (Ui[7], "G"),
tau_ff1 = (Ui[8], ""),
tau_ff2 = (Ui[9], ""),
tau_ff3 = (Ui[10], "")
)
'''
ds = yt.load_uniform_grid(
result,
Ui[0].shape,
length_unit="9*Rsun",
mass_unit=2.4578492774399997e+23,
time_unit=6.26e6,
velocity_unit="cm/s",
magnetic_unit="G",
bbox=limits,
geometry=plot_geometry)
def _temperature(field, data):
mu = 1.01
return (data["gas", "pressure"]*mu*mp)/(data["gas", "density"]*kb)
ds.add_field(("gas", "temperature"), function=_temperature, units="auto",
dimensions=dimensions.temperature)
def _H_number_density(field, data):
mu_i = 1.01
return data["gas", "density"]/(mu_i*mp)
ds.add_field(("gas", "H_number_density"), function=_H_number_density, units="cm**-3")
return ds
| 29.128713 | 89 | 0.556764 | 393 | 2,942 | 3.982188 | 0.206107 | 0.015335 | 0.053674 | 0.033227 | 0.962939 | 0.962939 | 0.962939 | 0.962939 | 0.962939 | 0.962939 | 0 | 0.043192 | 0.276003 | 2,942 | 100 | 90 | 29.42 | 0.691549 | 0.103671 | 0 | 0.705882 | 0 | 0 | 0.067189 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.078431 | false | 0 | 0.235294 | 0 | 0.392157 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
d58718f683aa45fcbfed0bd435ac7f13858b2904 | 4,051 | py | Python | skyportal/tests/api/test_observing_runs.py | Hallflower20/skyportal | e6e6f288f91aa81c4c34e160940d8f54402f6365 | [
"BSD-3-Clause"
] | null | null | null | skyportal/tests/api/test_observing_runs.py | Hallflower20/skyportal | e6e6f288f91aa81c4c34e160940d8f54402f6365 | [
"BSD-3-Clause"
] | null | null | null | skyportal/tests/api/test_observing_runs.py | Hallflower20/skyportal | e6e6f288f91aa81c4c34e160940d8f54402f6365 | [
"BSD-3-Clause"
] | null | null | null | from skyportal.tests import api
def test_token_user_add_new_observing_run(
lris, upload_data_token, red_transients_group
):
run_details = {
'instrument_id': lris.id,
'pi': 'Danny Goldstein',
'observers': 'D. Goldstein, P. Nugent',
'group_id': red_transients_group.id,
'calendar_date': '2020-02-16',
}
status, data = api(
'POST', 'observing_run', data=run_details, token=upload_data_token
)
assert status == 200
assert data['status'] == 'success'
run_id = data['data']['id']
status, data = api('GET', f'observing_run/{run_id}', token=upload_data_token)
assert status == 200
assert data['status'] == 'success'
for key in run_details:
assert data['data'][key] == run_details[key]
def test_super_admin_user_delete_nonowned_observing_run(
lris, upload_data_token, super_admin_token, red_transients_group
):
run_details = {
'instrument_id': lris.id,
'pi': 'Danny Goldstein',
'observers': 'D. Goldstein, P. Nugent',
'group_id': red_transients_group.id,
'calendar_date': '2020-02-16',
}
status, data = api(
'POST', 'observing_run', data=run_details, token=upload_data_token
)
assert status == 200
assert data['status'] == 'success'
run_id = data['data']['id']
status, data = api('DELETE', f'observing_run/{run_id}', token=super_admin_token)
assert status == 200
assert data['status'] == 'success'
def test_unauthorized_user_delete_nonowned_observing_run(
lris, upload_data_token, manage_sources_token, red_transients_group
):
run_details = {
'instrument_id': lris.id,
'pi': 'Danny Goldstein',
'observers': 'D. Goldstein, P. Nugent',
'group_id': red_transients_group.id,
'calendar_date': '2020-02-16',
}
status, data = api(
'POST', 'observing_run', data=run_details, token=upload_data_token
)
assert status == 200
assert data['status'] == 'success'
run_id = data['data']['id']
status, data = api('DELETE', f'observing_run/{run_id}', token=manage_sources_token)
assert status == 400
assert data['status'] == 'error'
def test_authorized_user_modify_owned_observing_run(
lris, upload_data_token, red_transients_group
):
run_details = {
'instrument_id': lris.id,
'pi': 'Danny Goldstein',
'observers': 'D. Goldstein, P. Nugent',
'group_id': red_transients_group.id,
'calendar_date': '2020-02-16',
}
status, data = api(
'POST', 'observing_run', data=run_details, token=upload_data_token
)
assert status == 200
assert data['status'] == 'success'
run_id = data['data']['id']
new_date = {'calendar_date': '2020-02-17'}
run_details.update(new_date)
status, data = api(
'PUT', f'observing_run/{run_id}', data=new_date, token=upload_data_token
)
assert status == 200
assert data['status'] == 'success'
status, data = api('GET', f'observing_run/{run_id}', token=upload_data_token)
assert status == 200
assert data['status'] == 'success'
for key in run_details:
assert data['data'][key] == run_details[key]
def test_unauthorized_user_modify_unowned_observing_run(
lris, upload_data_token, manage_sources_token, red_transients_group
):
run_details = {
'instrument_id': lris.id,
'pi': 'Danny Goldstein',
'observers': 'D. Goldstein, P. Nugent',
'group_id': red_transients_group.id,
'calendar_date': '2020-02-16',
}
status, data = api(
'POST', 'observing_run', data=run_details, token=upload_data_token
)
assert status == 200
assert data['status'] == 'success'
run_id = data['data']['id']
new_date = {'calendar_date': '2020-02-17'}
run_details.update(new_date)
status, data = api(
'PUT', f'observing_run/{run_id}', data=new_date, token=manage_sources_token
)
assert status == 400
assert data['status'] == 'error'
| 28.730496 | 87 | 0.636386 | 514 | 4,051 | 4.723735 | 0.116732 | 0.079077 | 0.080313 | 0.074135 | 0.934514 | 0.934514 | 0.934514 | 0.934514 | 0.916804 | 0.889209 | 0 | 0.028317 | 0.224142 | 4,051 | 140 | 88 | 28.935714 | 0.744193 | 0 | 0 | 0.792793 | 0 | 0 | 0.229326 | 0.032585 | 0 | 0 | 0 | 0 | 0.216216 | 1 | 0.045045 | false | 0 | 0.009009 | 0 | 0.054054 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
633be50653bedd3006035d2384bc41928f21120e | 176 | py | Python | tests/test_version.py | LucaCappelletti94/extra_keras_utils | 02fadec06c0478bac51304461ef8dbb6a63e972d | [
"MIT"
] | null | null | null | tests/test_version.py | LucaCappelletti94/extra_keras_utils | 02fadec06c0478bac51304461ef8dbb6a63e972d | [
"MIT"
] | null | null | null | tests/test_version.py | LucaCappelletti94/extra_keras_utils | 02fadec06c0478bac51304461ef8dbb6a63e972d | [
"MIT"
] | null | null | null | from validate_version_code import validate_version_code
from extra_keras_utils.__version__ import __version__
def test_version():
assert validate_version_code(__version__) | 35.2 | 55 | 0.875 | 23 | 176 | 5.782609 | 0.478261 | 0.338346 | 0.428571 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.090909 | 176 | 5 | 56 | 35.2 | 0.83125 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | 1 | 0.25 | true | 0 | 0.5 | 0 | 0.75 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 8 |
637db13d8b01bb2ac0df2481248f10f631a7ec1e | 3,443 | py | Python | python-client/test/test_repositories_stash_appscode_com_v1alpha1_api.py | tamalsaha/kube-openapi-generator | 6607d1e208965e3a09a0ee6d1f2de7e462939150 | [
"Apache-2.0"
] | 3 | 2018-04-23T09:07:04.000Z | 2019-09-27T10:25:29.000Z | python-client/test/test_repositories_stash_appscode_com_v1alpha1_api.py | tamalsaha/kube-openapi-generator | 6607d1e208965e3a09a0ee6d1f2de7e462939150 | [
"Apache-2.0"
] | 2 | 2018-04-09T09:00:17.000Z | 2021-03-01T11:23:11.000Z | python-client/test/test_repositories_stash_appscode_com_v1alpha1_api.py | tamalsaha/kube-openapi-generator | 6607d1e208965e3a09a0ee6d1f2de7e462939150 | [
"Apache-2.0"
] | 2 | 2018-12-12T11:43:54.000Z | 2019-06-29T12:15:07.000Z | # coding: utf-8
"""
stash-server
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: v0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import swagger_client
from swagger_client.api.repositories_stash_appscode_com_v1alpha1_api import RepositoriesStashAppscodeComV1alpha1Api # noqa: E501
from swagger_client.rest import ApiException
class TestRepositoriesStashAppscodeComV1alpha1Api(unittest.TestCase):
"""RepositoriesStashAppscodeComV1alpha1Api unit test stubs"""
def setUp(self):
self.api = swagger_client.api.repositories_stash_appscode_com_v1alpha1_api.RepositoriesStashAppscodeComV1alpha1Api() # noqa: E501
def tearDown(self):
pass
def test_create_repositories_stash_appscode_com_v1alpha1_namespaced_snapshot(self):
"""Test case for create_repositories_stash_appscode_com_v1alpha1_namespaced_snapshot
"""
pass
def test_delete_repositories_stash_appscode_com_v1alpha1_collection_namespaced_snapshot(self):
"""Test case for delete_repositories_stash_appscode_com_v1alpha1_collection_namespaced_snapshot
"""
pass
def test_delete_repositories_stash_appscode_com_v1alpha1_namespaced_snapshot(self):
"""Test case for delete_repositories_stash_appscode_com_v1alpha1_namespaced_snapshot
"""
pass
def test_get_repositories_stash_appscode_com_v1alpha1_api_resources(self):
"""Test case for get_repositories_stash_appscode_com_v1alpha1_api_resources
"""
pass
def test_list_repositories_stash_appscode_com_v1alpha1_namespaced_snapshot(self):
"""Test case for list_repositories_stash_appscode_com_v1alpha1_namespaced_snapshot
"""
pass
def test_list_repositories_stash_appscode_com_v1alpha1_snapshot_for_all_namespaces(self):
"""Test case for list_repositories_stash_appscode_com_v1alpha1_snapshot_for_all_namespaces
"""
pass
def test_patch_repositories_stash_appscode_com_v1alpha1_namespaced_snapshot(self):
"""Test case for patch_repositories_stash_appscode_com_v1alpha1_namespaced_snapshot
"""
pass
def test_read_repositories_stash_appscode_com_v1alpha1_namespaced_snapshot(self):
"""Test case for read_repositories_stash_appscode_com_v1alpha1_namespaced_snapshot
"""
pass
def test_replace_repositories_stash_appscode_com_v1alpha1_namespaced_snapshot(self):
"""Test case for replace_repositories_stash_appscode_com_v1alpha1_namespaced_snapshot
"""
pass
def test_watch_repositories_stash_appscode_com_v1alpha1_namespaced_snapshot(self):
"""Test case for watch_repositories_stash_appscode_com_v1alpha1_namespaced_snapshot
"""
pass
def test_watch_repositories_stash_appscode_com_v1alpha1_namespaced_snapshot_list(self):
"""Test case for watch_repositories_stash_appscode_com_v1alpha1_namespaced_snapshot_list
"""
pass
def test_watch_repositories_stash_appscode_com_v1alpha1_snapshot_list_for_all_namespaces(self):
"""Test case for watch_repositories_stash_appscode_com_v1alpha1_snapshot_list_for_all_namespaces
"""
pass
if __name__ == '__main__':
unittest.main()
| 32.17757 | 138 | 0.776648 | 389 | 3,443 | 6.305913 | 0.167095 | 0.180188 | 0.264982 | 0.296779 | 0.784753 | 0.784753 | 0.784753 | 0.753771 | 0.694252 | 0.627395 | 0 | 0.024886 | 0.171362 | 3,443 | 106 | 139 | 32.481132 | 0.834911 | 0.417369 | 0 | 0.361111 | 1 | 0 | 0.004186 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.388889 | false | 0.361111 | 0.138889 | 0 | 0.555556 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 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 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 9 |
63911facfa9dff2b704d7485df82474458fb0e7b | 8,501 | py | Python | Tickets/Single.py | fefelson/MLBProjections | 444a1c071cb7b1e21eedc49cf63ae91e80d37978 | [
"MIT"
] | null | null | null | Tickets/Single.py | fefelson/MLBProjections | 444a1c071cb7b1e21eedc49cf63ae91e80d37978 | [
"MIT"
] | null | null | null | Tickets/Single.py | fefelson/MLBProjections | 444a1c071cb7b1e21eedc49cf63ae91e80d37978 | [
"MIT"
] | null | null | null | from .Ticket import Ticket, StateTicket
################################################################################
################################################################################
################################################################################
################################################################################
class Single(Ticket):
def getStateTicket(self, diamondState):
stateTicket = None
if diamondState == "firstBase_secondBase_thirdBase":
stateTicket = BasesLoadedSingle()
elif diamondState == "secondBase_thirdBase":
stateTicket = SecondThirdSingle()
elif diamondState == "firstBase_thirdBase":
stateTicket = FirstThirdSingle()
elif diamondState == "firstBase_secondBase":
stateTicket = FirstSecondSingle()
elif diamondState == "thirdBase":
stateTicket = ThirdSingle()
elif diamondState == "secondBase":
stateTicket = SecondSingle()
elif diamondState == "firstBase":
stateTicket = FirstSingle()
else: #Bases Empty
stateTicket = EmptySingle()
return stateTicket
################################################################################
################################################################################
class BasesLoadedSingle(StateTicket):
def recordOuts(self, umpire):
pass
def recordEvents(self, pitcherId, batterId, diamond, umpire, scoreKeeper):
scoreKeeper.recordBatterH(batterId)
scoreKeeper.recordPitcherH(pitcherId)
# Runners on second and third score
for base in ("thirdBase", "secondBase"):
runnerId, onHook = diamond.popBase(base)
scoreKeeper.recordTeamRun()
scoreKeeper.recordBatterRun(runnerId)
scoreKeeper.recordBatterRbi(batterId)
scoreKeeper.recordPitcherRun(onHook)
if scoreKeeper.exOuts() < 3:
scoreKeeper.recordPitcherER(onHook)
def moveBases(self, diamond):
diamond.moveBase("firstBase", "secondBase")
def reachedBase(self, pitcherId, batterId, diamond):
diamond.reachedBase("firstBase", batterId, pitcherId)
################################################################################
################################################################################
class SecondThirdSingle(StateTicket):
def recordOuts(self, umpire):
pass
def recordEvents(self, pitcherId, batterId, diamond, umpire, scoreKeeper):
scoreKeeper.recordBatterH(batterId)
scoreKeeper.recordPitcherH(pitcherId)
# Runners on second and third score
for base in ("thirdBase", "secondBase"):
runnerId, onHook = diamond.popBase(base)
scoreKeeper.recordTeamRun()
scoreKeeper.recordBatterRun(runnerId)
scoreKeeper.recordBatterRbi(batterId)
scoreKeeper.recordPitcherRun(onHook)
if scoreKeeper.exOuts() < 3:
scoreKeeper.recordPitcherER(onHook)
def moveBases(self, diamond):
pass
def reachedBase(self, pitcherId, batterId, diamond):
diamond.reachedBase("firstBase", batterId, pitcherId)
################################################################################
################################################################################
class FirstThirdSingle(StateTicket):
def recordOuts(self, umpire):
pass
def recordEvents(self, pitcherId, batterId, diamond, umpire, scoreKeeper):
scoreKeeper.recordBatterH(batterId)
scoreKeeper.recordPitcherH(pitcherId)
# Runners on second and third score
runnerId, onHook = diamond.popBase("thirdBase")
scoreKeeper.recordTeamRun()
scoreKeeper.recordBatterRun(runnerId)
scoreKeeper.recordBatterRbi(batterId)
scoreKeeper.recordPitcherRun(onHook)
if scoreKeeper.exOuts() < 3:
scoreKeeper.recordPitcherER(onHook)
def moveBases(self, diamond):
diamond.moveBase("firstBase", "secondBase")
def reachedBase(self, pitcherId, batterId, diamond):
diamond.reachedBase("firstBase", batterId, pitcherId)
################################################################################
################################################################################
class FirstSecondSingle(StateTicket):
def recordOuts(self, umpire):
pass
def recordEvents(self, pitcherId, batterId, diamond, umpire, scoreKeeper):
scoreKeeper.recordBatterH(batterId)
scoreKeeper.recordPitcherH(pitcherId)
# Runners on second and third score
runnerId, onHook = diamond.popBase("secondBase")
scoreKeeper.recordTeamRun()
scoreKeeper.recordBatterRun(runnerId)
scoreKeeper.recordBatterRbi(batterId)
scoreKeeper.recordPitcherRun(onHook)
if scoreKeeper.exOuts() < 3:
scoreKeeper.recordPitcherER(onHook)
def moveBases(self, diamond):
pass
def reachedBase(self, pitcherId, batterId, diamond):
diamond.reachedBase("firstBase", batterId, pitcherId)
################################################################################
################################################################################
class ThirdSingle(StateTicket):
def recordOuts(self, umpire):
pass
def recordEvents(self, pitcherId, batterId, diamond, umpire, scoreKeeper):
scoreKeeper.recordBatterH(batterId)
scoreKeeper.recordPitcherH(pitcherId)
# Runners on second and third score
runnerId, onHook = diamond.popBase("thirdBase")
scoreKeeper.recordTeamRun()
scoreKeeper.recordBatterRun(runnerId)
scoreKeeper.recordBatterRbi(batterId)
scoreKeeper.recordPitcherRun(onHook)
if scoreKeeper.exOuts() < 3:
scoreKeeper.recordPitcherER(onHook)
def moveBases(self, diamond):
pass
def reachedBase(self, pitcherId, batterId, diamond):
diamond.reachedBase("firstBase", batterId, pitcherId)
################################################################################
################################################################################
class SecondSingle(StateTicket):
def recordOuts(self, umpire):
pass
def recordEvents(self, pitcherId, batterId, diamond, umpire, scoreKeeper):
scoreKeeper.recordBatterH(batterId)
scoreKeeper.recordPitcherH(pitcherId)
# Runners on second and third score
runnerId, onHook = diamond.popBase("secondBase")
scoreKeeper.recordTeamRun()
scoreKeeper.recordBatterRun(runnerId)
scoreKeeper.recordBatterRbi(batterId)
scoreKeeper.recordPitcherRun(onHook)
if scoreKeeper.exOuts() < 3:
scoreKeeper.recordPitcherER(onHook)
def moveBases(self, diamond):
pass
def reachedBase(self, pitcherId, batterId, diamond):
diamond.reachedBase("firstBase", batterId, pitcherId)
################################################################################
################################################################################
class FirstSingle(StateTicket):
def recordOuts(self, umpire):
pass
def recordEvents(self, pitcherId, batterId, diamond, umpire, scoreKeeper):
scoreKeeper.recordBatterH(batterId)
scoreKeeper.recordPitcherH(pitcherId)
def moveBases(self, diamond):
diamond.moveBase("firstBase", "secondBase")
def reachedBase(self, pitcherId, batterId, diamond):
diamond.reachedBase("firstBase", batterId, pitcherId)
################################################################################
################################################################################
class EmptySingle(StateTicket):
def recordOuts(self, umpire):
pass
def recordEvents(self, pitcherId, batterId, diamond, umpire, scoreKeeper):
scoreKeeper.recordBatterH(batterId)
scoreKeeper.recordPitcherH(pitcherId)
def moveBases(self, diamond):
pass
def reachedBase(self, pitcherId, batterId, diamond):
diamond.reachedBase("firstBase", batterId, pitcherId)
################################################################################
################################################################################
| 31.139194 | 80 | 0.530996 | 558 | 8,501 | 8.080645 | 0.107527 | 0.04613 | 0.074518 | 0.099357 | 0.851852 | 0.851852 | 0.851852 | 0.851852 | 0.851852 | 0.851852 | 0 | 0.000876 | 0.19386 | 8,501 | 272 | 81 | 31.253676 | 0.657084 | 0.025291 | 0 | 0.8 | 0 | 0 | 0.049394 | 0.004602 | 0 | 0 | 0 | 0 | 0 | 1 | 0.227586 | false | 0.089655 | 0.006897 | 0 | 0.303448 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 9 |
89509766962d3713dc710e8379271299df162d2a | 10,138 | py | Python | ike/util/dh.py | ghazel/ike | bb7d53744427aac71ce05c937ff44fd03525ce0e | [
"MIT"
] | 16 | 2015-10-07T00:52:28.000Z | 2021-11-06T00:46:01.000Z | ike/util/dh.py | ghazel/ike | bb7d53744427aac71ce05c937ff44fd03525ce0e | [
"MIT"
] | 4 | 2015-05-15T16:09:29.000Z | 2018-06-13T07:05:47.000Z | ike/util/dh.py | ghazel/ike | bb7d53744427aac71ce05c937ff44fd03525ce0e | [
"MIT"
] | 8 | 2015-10-07T00:52:29.000Z | 2020-09-01T11:42:35.000Z | # -*- coding: utf-8 -*-
#
# Copyright © 2013 Kimmo Parviainen-Jalanko.
#
import os
import re
import logging
import binascii
from .conv import to_bytes
logging.basicConfig()
logger = logging.getLogger(__name__)
logger.setLevel(logging.CRITICAL)
_PRIME_STRS = {
1: ''' FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1
29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD
EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245
E485B576 625E7EC6 F44C42E9 A63A3620 FFFFFFFF FFFFFFFF''',
2: '''FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1
29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD
EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245
E485B576 625E7EC6 F44C42E9 A637ED6B 0BFF5CB6 F406B7ED
EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE65381
FFFFFFFF FFFFFFFF''',
5: '''FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1
29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD
EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245
E485B576 625E7EC6 F44C42E9 A637ED6B 0BFF5CB6 F406B7ED
EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE45B3D
C2007CB8 A163BF05 98DA4836 1C55D39A 69163FA8 FD24CF5F
83655D23 DCA3AD96 1C62F356 208552BB 9ED52907 7096966D
670C354E 4ABC9804 F1746C08 CA237327 FFFFFFFF FFFFFFFF''',
14: '''FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1
29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD
EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245
E485B576 625E7EC6 F44C42E9 A637ED6B 0BFF5CB6 F406B7ED
EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE45B3D
C2007CB8 A163BF05 98DA4836 1C55D39A 69163FA8 FD24CF5F
83655D23 DCA3AD96 1C62F356 208552BB 9ED52907 7096966D
670C354E 4ABC9804 F1746C08 CA18217C 32905E46 2E36CE3B
E39E772C 180E8603 9B2783A2 EC07A28F B5C55DF0 6F4C52C9
DE2BCBF6 95581718 3995497C EA956AE5 15D22618 98FA0510
15728E5A 8AACAA68 FFFFFFFF FFFFFFFF''',
15: '''FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1
29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD
EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245
E485B576 625E7EC6 F44C42E9 A637ED6B 0BFF5CB6 F406B7ED
EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE45B3D
C2007CB8 A163BF05 98DA4836 1C55D39A 69163FA8 FD24CF5F
83655D23 DCA3AD96 1C62F356 208552BB 9ED52907 7096966D
670C354E 4ABC9804 F1746C08 CA18217C 32905E46 2E36CE3B
E39E772C 180E8603 9B2783A2 EC07A28F B5C55DF0 6F4C52C9
DE2BCBF6 95581718 3995497C EA956AE5 15D22618 98FA0510
15728E5A 8AAAC42D AD33170D 04507A33 A85521AB DF1CBA64
ECFB8504 58DBEF0A 8AEA7157 5D060C7D B3970F85 A6E1E4C7
ABF5AE8C DB0933D7 1E8C94E0 4A25619D CEE3D226 1AD2EE6B
F12FFA06 D98A0864 D8760273 3EC86A64 521F2B18 177B200C
BBE11757 7A615D6C 770988C0 BAD946E2 08E24FA0 74E5AB31
43DB5BFC E0FD108E 4B82D120 A93AD2CA FFFFFFFF FFFFFFFF''',
16: '''FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1
29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD
EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245
E485B576 625E7EC6 F44C42E9 A637ED6B 0BFF5CB6 F406B7ED
EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE45B3D
C2007CB8 A163BF05 98DA4836 1C55D39A 69163FA8 FD24CF5F
83655D23 DCA3AD96 1C62F356 208552BB 9ED52907 7096966D
670C354E 4ABC9804 F1746C08 CA18217C 32905E46 2E36CE3B
E39E772C 180E8603 9B2783A2 EC07A28F B5C55DF0 6F4C52C9
DE2BCBF6 95581718 3995497C EA956AE5 15D22618 98FA0510
15728E5A 8AAAC42D AD33170D 04507A33 A85521AB DF1CBA64
ECFB8504 58DBEF0A 8AEA7157 5D060C7D B3970F85 A6E1E4C7
ABF5AE8C DB0933D7 1E8C94E0 4A25619D CEE3D226 1AD2EE6B
F12FFA06 D98A0864 D8760273 3EC86A64 521F2B18 177B200C
BBE11757 7A615D6C 770988C0 BAD946E2 08E24FA0 74E5AB31
43DB5BFC E0FD108E 4B82D120 A9210801 1A723C12 A787E6D7
88719A10 BDBA5B26 99C32718 6AF4E23C 1A946834 B6150BDA
2583E9CA 2AD44CE8 DBBBC2DB 04DE8EF9 2E8EFC14 1FBECAA6
287C5947 4E6BC05D 99B2964F A090C3A2 233BA186 515BE7ED
1F612970 CEE2D7AF B81BDD76 2170481C D0069127 D5B05AA9
93B4EA98 8D8FDDC1 86FFB7DC 90A6C08F 4DF435C9 34063199
FFFFFFFF FFFFFFFF''',
17: '''FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1 29024E08
8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD EF9519B3 CD3A431B
302B0A6D F25F1437 4FE1356D 6D51C245 E485B576 625E7EC6 F44C42E9
A637ED6B 0BFF5CB6 F406B7ED EE386BFB 5A899FA5 AE9F2411 7C4B1FE6
49286651 ECE45B3D C2007CB8 A163BF05 98DA4836 1C55D39A 69163FA8
FD24CF5F 83655D23 DCA3AD96 1C62F356 208552BB 9ED52907 7096966D
670C354E 4ABC9804 F1746C08 CA18217C 32905E46 2E36CE3B E39E772C
180E8603 9B2783A2 EC07A28F B5C55DF0 6F4C52C9 DE2BCBF6 95581718
3995497C EA956AE5 15D22618 98FA0510 15728E5A 8AAAC42D AD33170D
04507A33 A85521AB DF1CBA64 ECFB8504 58DBEF0A 8AEA7157 5D060C7D
B3970F85 A6E1E4C7 ABF5AE8C DB0933D7 1E8C94E0 4A25619D CEE3D226
1AD2EE6B F12FFA06 D98A0864 D8760273 3EC86A64 521F2B18 177B200C
BBE11757 7A615D6C 770988C0 BAD946E2 08E24FA0 74E5AB31 43DB5BFC
E0FD108E 4B82D120 A9210801 1A723C12 A787E6D7 88719A10 BDBA5B26
99C32718 6AF4E23C 1A946834 B6150BDA 2583E9CA 2AD44CE8 DBBBC2DB
04DE8EF9 2E8EFC14 1FBECAA6 287C5947 4E6BC05D 99B2964F A090C3A2
233BA186 515BE7ED 1F612970 CEE2D7AF B81BDD76 2170481C D0069127
D5B05AA9 93B4EA98 8D8FDDC1 86FFB7DC 90A6C08F 4DF435C9 34028492
36C3FAB4 D27C7026 C1D4DCB2 602646DE C9751E76 3DBA37BD F8FF9406
AD9E530E E5DB382F 413001AE B06A53ED 9027D831 179727B0 865A8918
DA3EDBEB CF9B14ED 44CE6CBA CED4BB1B DB7F1447 E6CC254B 33205151
2BD7AF42 6FB8F401 378CD2BF 5983CA01 C64B92EC F032EA15 D1721D03
F482D7CE 6E74FEF6 D55E702F 46980C82 B5A84031 900B1C9E 59E7C97F
BEC7E8F3 23A97A7E 36CC88BE 0F1D45B7 FF585AC5 4BD407B2 2B4154AA
CC8F6D7E BF48E1D8 14CC5ED2 0F8037E0 A79715EE F29BE328 06A1D58B
B7C5DA76 F550AA3D 8A1FBFF0 EB19CCB1 A313D55C DA56C9EC 2EF29632
387FE8D7 6E3C0468 043E8F66 3F4860EE 12BF2D5B 0B7474D6 E694F91E
6DCC4024 FFFFFFFF FFFFFFFF''',
18: '''FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1
29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD
EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245
E485B576 625E7EC6 F44C42E9 A637ED6B 0BFF5CB6 F406B7ED
EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE45B3D
C2007CB8 A163BF05 98DA4836 1C55D39A 69163FA8 FD24CF5F
83655D23 DCA3AD96 1C62F356 208552BB 9ED52907 7096966D
670C354E 4ABC9804 F1746C08 CA18217C 32905E46 2E36CE3B
E39E772C 180E8603 9B2783A2 EC07A28F B5C55DF0 6F4C52C9
DE2BCBF6 95581718 3995497C EA956AE5 15D22618 98FA0510
15728E5A 8AAAC42D AD33170D 04507A33 A85521AB DF1CBA64
ECFB8504 58DBEF0A 8AEA7157 5D060C7D B3970F85 A6E1E4C7
ABF5AE8C DB0933D7 1E8C94E0 4A25619D CEE3D226 1AD2EE6B
F12FFA06 D98A0864 D8760273 3EC86A64 521F2B18 177B200C
BBE11757 7A615D6C 770988C0 BAD946E2 08E24FA0 74E5AB31
43DB5BFC E0FD108E 4B82D120 A9210801 1A723C12 A787E6D7
88719A10 BDBA5B26 99C32718 6AF4E23C 1A946834 B6150BDA
2583E9CA 2AD44CE8 DBBBC2DB 04DE8EF9 2E8EFC14 1FBECAA6
287C5947 4E6BC05D 99B2964F A090C3A2 233BA186 515BE7ED
1F612970 CEE2D7AF B81BDD76 2170481C D0069127 D5B05AA9
93B4EA98 8D8FDDC1 86FFB7DC 90A6C08F 4DF435C9 34028492
36C3FAB4 D27C7026 C1D4DCB2 602646DE C9751E76 3DBA37BD
F8FF9406 AD9E530E E5DB382F 413001AE B06A53ED 9027D831
179727B0 865A8918 DA3EDBEB CF9B14ED 44CE6CBA CED4BB1B
DB7F1447 E6CC254B 33205151 2BD7AF42 6FB8F401 378CD2BF
5983CA01 C64B92EC F032EA15 D1721D03 F482D7CE 6E74FEF6
D55E702F 46980C82 B5A84031 900B1C9E 59E7C97F BEC7E8F3
23A97A7E 36CC88BE 0F1D45B7 FF585AC5 4BD407B2 2B4154AA
CC8F6D7E BF48E1D8 14CC5ED2 0F8037E0 A79715EE F29BE328
06A1D58B B7C5DA76 F550AA3D 8A1FBFF0 EB19CCB1 A313D55C
DA56C9EC 2EF29632 387FE8D7 6E3C0468 043E8F66 3F4860EE
12BF2D5B 0B7474D6 E694F91E 6DBE1159 74A3926F 12FEE5E4
38777CB6 A932DF8C D8BEC4D0 73B931BA 3BC832B6 8D9DD300
741FA7BF 8AFC47ED 2576F693 6BA42466 3AAB639C 5AE4F568
3423B474 2BF1C978 238F16CB E39D652D E3FDB8BE FC848AD9
22222E04 A4037C07 13EB57A8 1A23F0C7 3473FC64 6CEA306B
4BCBC886 2F8385DD FA9D4B7F A2C087E8 79683303 ED5BDD3A
062B3CF5 B3A278A6 6D2A13F8 3F44F82D DF310EE0 74AB6A36
4597E899 A0255DC1 64F31CC5 0846851D F9AB4819 5DED7EA1
B1D510BD 7EE74D73 FAF36BC3 1ECFA268 359046F4 EB879F92
4009438B 481C6CD7 889A002E D5EE382B C9190DA6 FC026E47
9558E447 5677E9AA 9E3050E2 765694DF C81F56E8 80B96E71
60C980DD 98EDD3DF FFFFFFFF FFFFFFFF'''
}
PRIMES = dict(
(k, int(re.sub('\s+', '', v), 16)) for k, v in _PRIME_STRS.items())
class DiffieHellman(object):
generator = 2
def __init__(self, group=14, n=64):
self.group = group
self.bits = n * 8
self.generate_private_key(n)
self.generate_public_key()
def generate_private_key(self, n):
self.private_key = int(binascii.hexlify(os.urandom(n)), 16)
def generate_public_key(self):
self.public_key = pow(self.generator, self.private_key,
PRIMES[self.group])
def derivate(self, other_key):
self._s = pow(other_key, self.private_key, PRIMES[self.group])
return self.shared_secret
@property
def shared_secret(self):
return to_bytes(self._s)
| 55.398907 | 73 | 0.730913 | 989 | 10,138 | 7.461072 | 0.331648 | 0.034693 | 0.02602 | 0.034693 | 0.823147 | 0.823147 | 0.815287 | 0.815287 | 0.815287 | 0.815287 | 0 | 0.535132 | 0.250345 | 10,138 | 182 | 74 | 55.703297 | 0.435658 | 0.006313 | 0 | 0.440476 | 0 | 0 | 0.89125 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.029762 | false | 0 | 0.029762 | 0.005952 | 0.083333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 |
9826a04677b3a9783e073d9d97486a318a846d46 | 212,093 | py | Python | apps/pages/admin.py | iamjdcollins/districtwebsite | 89e2aea47ca3d221665bc23586a4374421be5800 | [
"MIT"
] | null | null | null | apps/pages/admin.py | iamjdcollins/districtwebsite | 89e2aea47ca3d221665bc23586a4374421be5800 | [
"MIT"
] | null | null | null | apps/pages/admin.py | iamjdcollins/districtwebsite | 89e2aea47ca3d221665bc23586a4374421be5800 | [
"MIT"
] | null | null | null | import sys
from django.conf import settings
from django import forms
from django.db.models import Q
from django.contrib import admin
from django.utils import timezone
from django.contrib.auth import get_permission_codename
from guardian.admin import GuardedModelAdmin
from mptt.admin import MPTTModelAdmin
from ajax_select import make_ajax_form, make_ajax_field
from ajax_select.fields import AutoCompleteSelectField
from adminsortable2.admin import SortableInlineAdminMixin
from apps.common.classes import (
DeletedListFilter,
EditLinkToInlineObject,
LinkToInlineObject,
MyDraggableMPTTAdmin,
)
from apps.common.actions import (
trash_selected,
restore_selected,
publish_selected,
unpublish_selected,
)
from django.contrib.admin.actions import delete_selected
from .models import (
Page,
Announcement,
School,
Department,
Board,
BoardSubPage,
News,
NewsYear,
SubPage,
BoardMeetingYear,
DistrictCalendarYear,
SuperintendentMessage,
SuperintendentMessageYear,
)
from apps.images.models import (
Thumbnail,
NewsThumbnail,
ContentBanner,
ProfilePicture,
DistrictLogo,
DistrictLogoGIF,
DistrictLogoJPG,
DistrictLogoPNG,
DistrictLogoTIF,
PhotoGallery,
PhotoGalleryImage,
)
from apps.directoryentries.models import (
SchoolAdministrator,
Administrator,
Staff,
BoardMember,
StudentBoardMember,
BoardPolicyAdmin,
SchoolAdministration,
SchoolStaff,
SchoolFaculty,
SchoolCommunityCouncilMember,
)
from apps.links.models import (
ResourceLink,
ActionButton,
ClassWebsite,
)
from apps.documents.models import (
Document,
DisclosureDocument,
BoardPolicy,
Policy,
AdministrativeProcedure,
SupportingDocument,
BoardMeetingAgenda,
BoardMeetingMinutes,
BoardMeetingAudio,
BoardMeetingVideo,
BoardMeetingExhibit,
BoardMeetingAgendaItem,
SchoolCommunityCouncilMeetingAgenda,
SchoolCommunityCouncilMeetingMinutes,
)
from apps.events.models import (
BoardMeeting,
DistrictCalendarEvent,
SchoolCommunityCouncilMeeting,
)
from apps.files.models import (
File,
AudioFile,
VideoFile,
PrecinctMap,
)
from apps.taxonomy.models import (
SubjectGradeLevel,
)
from apps.objects.models import Node
from apps.faqs.models import FAQ
import apps.common.functions
from ckeditor.widgets import CKEditorWidget
from django.utils.safestring import mark_safe
from django.urls import reverse
from apps.dashboard.models import PageLayout
from apps.users.models import PageEditor
class ProfilePictureInline(
LinkToInlineObject,
admin.StackedInline,
):
model = ProfilePicture
fk_name = 'parent'
fields = [
'title',
'image_file',
'alttext',
'update_user',
'update_date',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'copy_link',
]
extra = 0
min_num = 1
max_num = 1
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class ThumbnailInline(
LinkToInlineObject,
admin.TabularInline,
):
model = Thumbnail
fk_name = 'parent'
fields = [
'title',
'image_file',
'alttext',
'update_user',
'update_date',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'copy_link',
]
extra = 0
min_num = 0
max_num = 1
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class DistrictLogoGIFInline(
LinkToInlineObject,
admin.TabularInline,
):
model = DistrictLogoGIF
fk_name = 'parent'
fields = [
'title',
'image_file',
'alttext',
'update_user',
'update_date',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'copy_link',
]
extra = 0
min_num = 0
max_num = 1
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class DistrictLogoJPGInline(
LinkToInlineObject,
admin.TabularInline,
):
model = DistrictLogoJPG
fk_name = 'parent'
fields = [
'title',
'image_file',
'alttext',
'update_user',
'update_date',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'copy_link',
]
extra = 0
min_num = 0
max_num = 1
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class DistrictLogoPNGInline(
LinkToInlineObject,
admin.TabularInline,
):
model = DistrictLogoPNG
fk_name = 'parent'
fields = [
'title',
'image_file',
'alttext',
'update_user',
'update_date',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'copy_link',
]
extra = 0
min_num = 0
max_num = 1
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class DistrictLogoTIFInline(
LinkToInlineObject,
admin.TabularInline,
):
model = DistrictLogoTIF
fk_name = 'parent'
fields = [
'title',
'image_file',
'alttext',
'update_user',
'update_date',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'copy_link',
]
extra = 0
min_num = 0
max_num = 1
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class DistrictLogoInlineForm(forms.ModelForm):
class Meta:
model = DistrictLogo
fields = [
'district_logo_group',
'district_logo_style_variation',
]
def __init__(self, *args, **kwargs):
super(DistrictLogoInlineForm, self).__init__(*args, **kwargs)
if self.instance.pk:
self.fields['district_logo_group'].disabled = True
self.fields['district_logo_style_variation'].disabled = True
class DistrictLogoInline(
LinkToInlineObject,
EditLinkToInlineObject,
admin.TabularInline,
):
model = DistrictLogo
form = DistrictLogoInlineForm
ordering = [
'district_logo_group__lft',
'district_logo_style_variation__lft',
]
fk_name = 'parent'
fields = [
'district_logo_group',
'district_logo_style_variation',
'update_user',
'update_date',
'edit_link',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'edit_link',
'copy_link',
]
extra = 0
min_num = 0
max_num = 14
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class NewsInlineForm(forms.ModelForm):
class Meta:
model = News
fields = [
'title',
'pinned',
'author_date',
]
def __init__(self, *args, **kwargs):
super(NewsInlineForm, self).__init__(*args, **kwargs)
if self.instance.pk:
self.fields['title'].disabled = True
class NewsInline(
LinkToInlineObject,
EditLinkToInlineObject,
admin.TabularInline,
):
model = News
form = NewsInlineForm
fk_name = 'parent'
fields = [
'title',
'pinned',
'author_date',
'update_user',
'update_date',
'edit_link',
'published',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'edit_link',
'copy_link',
]
ordering = ['-author_date', ]
extra = 0
min_num = 0
max_num = 500
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm('{0}.{1}'.format(
self.model._meta.model_name,
get_permission_codename('restore', self.model._meta))):
return qs
return qs.filter(deleted=0)
class PhotoGalleryInlineForm(forms.ModelForm):
class Meta:
model = PhotoGallery
fields = ['title', ]
def __init__(self, *args, **kwargs):
super(PhotoGalleryInlineForm, self).__init__(*args, **kwargs)
if self.instance.pk:
self.fields['title'].disabled = True
class PhotoGalleryInline(
LinkToInlineObject,
EditLinkToInlineObject,
SortableInlineAdminMixin,
admin.TabularInline
):
model = PhotoGallery
fk_name = 'parent'
ordering = [
'inline_order',
]
fields = [
'title',
'update_user',
'update_date',
'edit_link',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'edit_link',
'copy_link',
]
extra = 0
min_num = 0
max_num = 1
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm('{0}.{1}'.format(
self.model._meta.model_name,
get_permission_codename('restore', self.model._meta))):
return qs
return qs.filter(deleted=0)
class PhotoGalleryImageInlineForm(forms.ModelForm):
class Meta:
model = PhotoGalleryImage
fields = ['title', 'image_file', 'alttext', ]
def __init__(self, *args, **kwargs):
super(PhotoGalleryImageInlineForm, self).__init__(*args, **kwargs)
if self.instance.pk:
self.fields['title'].disabled = True
class PhotoGalleryImageInline(
SortableInlineAdminMixin,
LinkToInlineObject,
admin.TabularInline,
):
model = PhotoGalleryImage
fk_name = 'parent'
ordering = [
'inline_order',
]
fields = [
'title',
'image_file',
'alttext',
'update_user',
'update_date',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'copy_link',
]
extra = 0
min_num = 0
max_num = 50
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm('{0}.{1}'.format(
self.model._meta.model_name,
get_permission_codename('restore', self.model._meta))):
return qs
return qs.filter(deleted=0)
class NewsThumbnailInline(
LinkToInlineObject,
admin.TabularInline,
):
model = NewsThumbnail
fk_name = 'parent'
fields = [
'title',
'image_file',
'alttext',
'update_user',
'update_date',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'copy_link',
]
extra = 0
min_num = 0
max_num = 1
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm('{0}.{1}'.format(
self.model._meta.model_name,
get_permission_codename('restore', self.model._meta))):
return qs
return qs.filter(deleted=0)
class ContentBannerInline(
SortableInlineAdminMixin,
LinkToInlineObject,
admin.TabularInline
):
model = ContentBanner
fk_name = 'parent'
ordering = [
'inline_order',
]
fields = [
'title',
'image_file',
'alttext',
'update_user',
'update_date',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'copy_link',
]
extra = 0
min_num = 0
max_num = 5
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class SchoolAdministratorInlineForm(forms.ModelForm):
class Meta:
model = SchoolAdministrator
fields = ['employee']
def __init__(self, *args, **kwargs):
super(SchoolAdministratorInlineForm, self).__init__(*args, **kwargs)
if self.instance.pk:
self.fields['employee'].disabled = True
class SchoolAdministratorInline(
SortableInlineAdminMixin,
LinkToInlineObject,
admin.TabularInline,
):
model = SchoolAdministrator
fk_name = 'parent'
ordering = [
'inline_order',
]
fields = [
'employee',
'schooladministratortype',
'update_user',
'update_date',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'copy_link',
]
extra = 0
min_num = 0
max_num = 10
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
form = make_ajax_form(SchoolAdministrator, {
'employee': 'employee'}, SchoolAdministratorInlineForm)
class AdministratorInlineForm(forms.ModelForm):
class Meta:
model = Administrator
fields = ['employee']
def __init__(self, *args, **kwargs):
super(AdministratorInlineForm, self).__init__(*args, **kwargs)
if self.instance.pk:
self.fields['employee'].disabled = True
class AdministratorInline(
SortableInlineAdminMixin,
LinkToInlineObject,
admin.TabularInline,
):
model = Administrator
fk_name = 'parent'
ordering = [
'inline_order',
]
fields = [
'employee',
'update_user',
'update_date',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'copy_link',
]
extra = 0
min_inum = 0
max_num = 15
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
form = make_ajax_form(
Administrator, {'employee': 'employee'}, AdministratorInlineForm)
class StaffInlineForm(forms.ModelForm):
class Meta:
model = Staff
fields = ['employee']
def __init__(self, *args, **kwargs):
super(StaffInlineForm, self).__init__(*args, **kwargs)
if self.instance.pk:
self.fields['employee'].disabled = True
class StaffInline(
SortableInlineAdminMixin,
LinkToInlineObject,
admin.TabularInline,
):
model = Staff
fk_name = 'parent'
ordering = [
'inline_order',
]
fields = [
'employee',
'update_user',
'update_date',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'copy_link',
]
extra = 0
min_num = 0
max_num = 50
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
form = make_ajax_form(Staff, {'employee': 'employee'}, StaffInlineForm)
class StudentBoardMemberInlineForm(forms.ModelForm):
class Meta:
model = StudentBoardMember
fields = ['title']
def __init__(self, *args, **kwargs):
super(StudentBoardMemberInlineForm, self).__init__(*args, **kwargs)
if self.instance.pk:
self.fields['title'].disabled = True
class StudentBoardMemberInline(
LinkToInlineObject,
EditLinkToInlineObject,
admin.TabularInline,
):
model = StudentBoardMember
form = StudentBoardMemberInlineForm
fk_name = 'parent'
fields = [
'title',
'update_user',
'update_date',
'edit_link',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'edit_link',
'copy_link',
]
ordering = ['title', ]
extra = 0
min_num = 0
max_num = 1
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class BoardMemberInlineForm(forms.ModelForm):
class Meta:
model = BoardMember
fields = ['employee']
def __init__(self, *args, **kwargs):
super(BoardMemberInlineForm, self).__init__(*args, **kwargs)
if self.instance.pk:
self.fields['employee'].disabled = True
class BoardMemberInline(
LinkToInlineObject,
admin.TabularInline,
):
model = BoardMember
fk_name = 'parent'
fields = [
'employee',
'is_president',
'is_vicepresident',
'precinct',
'phone',
'street_address',
'city',
'state',
'zipcode',
'term_ends',
'update_user',
'update_date',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'copy_link',
]
ordering = ['precinct__title', ]
extra = 0
min_num = 0
max_num = 7
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
form = make_ajax_form(
BoardMember, {'employee': 'employee'}, BoardMemberInlineForm)
class BoardPolicyAdminInline(
LinkToInlineObject,
admin.TabularInline,
):
model = BoardPolicyAdmin
fk_name = 'parent'
fields = [
'employee',
'update_user',
'update_date',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'copy_link',
]
ordering = ['title', ]
extra = 0
min_num = 0
max_num = 5
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
form = make_ajax_form(BoardPolicyAdmin, {'employee': 'employee'})
class ResourceLinkInlineForm(forms.ModelForm):
class Meta:
model = ResourceLink
fields = ['title', 'link_url', 'published']
def __init__(self, *args, **kwargs):
super(ResourceLinkInlineForm, self).__init__(*args, **kwargs)
if self.instance.related_locked:
self.fields['title'].disabled = True
self.fields['title'].widget.attrs['class'] = '{0} related_locked'.format(
self.fields['title'].widget.attrs['class']
)
self.fields['title'].widget.attrs['data-relatedtype'] = '{0}'.format(
self.instance.related_type
)
self.fields['link_url'].disabled = True
self.fields['published'].disabled = True
if 'deleted' in self.fields:
self.fields['deleted'].disabled = True
class ResourceLinkInline(
SortableInlineAdminMixin,
LinkToInlineObject,
admin.TabularInline
):
model = ResourceLink
form = ResourceLinkInlineForm
fk_name = 'parent'
ordering = [
'inline_order',
]
fields = [
'title',
'link_url',
'update_user',
'update_date',
'published',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'copy_link',
]
extra = 0
min_num = 0
max_num = 50
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class ClassWebsiteInlineForm(forms.ModelForm):
class Meta:
model = ClassWebsite
fields = ['title', 'link_url', 'published']
def __init__(self, *args, **kwargs):
super(ClassWebsiteInlineForm, self).__init__(*args, **kwargs)
class ClassWebsiteInline(
SortableInlineAdminMixin,
LinkToInlineObject,
admin.TabularInline
):
model = ClassWebsite
form = ClassWebsiteInlineForm
fk_name = 'parent'
ordering = [
'inline_order',
]
fields = [
'title',
'link_url',
'update_user',
'update_date',
'published',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'copy_link',
]
extra = 0
min_num = 0
max_num = 50
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class ActionButtonInlineForm(forms.ModelForm):
class Meta:
model = ActionButton
fields = ['title', 'link_url', ]
def __init__(self, *args, **kwargs):
super(ActionButtonInlineForm, self).__init__(*args, **kwargs)
if self.instance.pk:
pass
class ActionButtonInline(
SortableInlineAdminMixin,
LinkToInlineObject,
admin.TabularInline,
):
model = ActionButton
form = ActionButtonInlineForm
fk_name = 'parent'
ordering = [
'inline_order',
]
fields = [
'title',
'link_url',
'update_user',
'update_date',
'published',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'copy_link',
]
extra = 0
min_num = 0
max_num = 8
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class DocumentInlineForm(forms.ModelForm):
class Meta:
model = Document
fields = ['title', 'pagelayout']
def __init__(self, *args, **kwargs):
super(DocumentInlineForm, self).__init__(*args, **kwargs)
self.fields['pagelayout'].initial = Document.PAGELAYOUT
self.fields['pagelayout'].widget = forms.HiddenInput()
if self.instance.pk:
self.fields['title'].disabled = True
class DocumentInline(
EditLinkToInlineObject,
LinkToInlineObject,
admin.TabularInline,
):
model = Document
form = DocumentInlineForm
classes = {
'document_inline',
}
fk_name = 'parent'
fields = [
'title',
'pagelayout',
'update_user',
'update_date',
'edit_link',
'published',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'edit_link',
'copy_link',
]
extra = 0
min_num = 0
max_num = 500
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class DisclosureDocumentInlineForm(forms.ModelForm):
class Meta:
model = DisclosureDocument
fields = ['title', 'pagelayout',]
def __init__(self, *args, **kwargs):
super(DisclosureDocumentInlineForm, self).__init__(*args, **kwargs)
self.fields['pagelayout'].initial = DisclosureDocument.PAGELAYOUT
self.fields['pagelayout'].widget = forms.HiddenInput()
if self.instance.pk:
self.fields['title'].disabled = True
class DisclosureDocumentInline(
EditLinkToInlineObject,
LinkToInlineObject,
admin.TabularInline,
):
model = DisclosureDocument
form = DisclosureDocumentInlineForm
verbose_name = 'Disclosure Document'
verbose_name_plural = 'Disclosure Documents'
fk_name = 'parent'
fields = [
'title',
'pagelayout',
'update_user',
'update_date',
'edit_link',
'published',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'edit_link',
'copy_link',
]
extra = 0
min_num = 0
max_num = 500
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class SchoolCommunityCouncilMeetingAgendaInlineForm(forms.ModelForm):
class Meta:
model = SchoolCommunityCouncilMeetingAgenda
fields = ['title', 'pagelayout']
def __init__(self, *args, **kwargs):
super(
SchoolCommunityCouncilMeetingAgendaInlineForm,
self,
).__init__(*args, **kwargs)
self.fields['pagelayout'].initial = (
SchoolCommunityCouncilMeetingAgenda.PAGELAYOUT
)
self.fields['pagelayout'].widget = forms.HiddenInput()
self.fields['title'].disabled = True
self.fields['title'].initial = 'Agenda'
if self.instance.pk:
pass
def has_changed(self):
if not self.instance.pk:
return True
else:
super(
SchoolCommunityCouncilMeetingAgendaInlineForm,
self
).has_changed()
class SchoolCommunityCouncilMeetingAgendaInline(
EditLinkToInlineObject,
LinkToInlineObject,
admin.TabularInline,
):
model = SchoolCommunityCouncilMeetingAgenda
form = SchoolCommunityCouncilMeetingAgendaInlineForm
fk_name = 'parent'
fields = [
'title',
'pagelayout',
'update_user',
'update_date',
'edit_link',
'published',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'edit_link',
'copy_link',
]
extra = 0
min_num = 0
max_num = 1
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(
self.model._meta.model_name + '.' + get_permission_codename(
'restore',
self.model._meta
)
):
return qs
return qs.filter(deleted=0)
class SchoolCommunityCouncilMeetingMinutesInlineForm(forms.ModelForm):
class Meta:
model = SchoolCommunityCouncilMeetingMinutes
fields = ['title', 'pagelayout']
def __init__(self, *args, **kwargs):
super(
SchoolCommunityCouncilMeetingMinutesInlineForm,
self,
).__init__(*args, **kwargs)
self.fields['pagelayout'].initial = (
SchoolCommunityCouncilMeetingMinutes.PAGELAYOUT
)
self.fields['pagelayout'].widget = forms.HiddenInput()
self.fields['title'].disabled = True
self.fields['title'].initial = 'Minutes'
if self.instance.pk:
pass
def has_changed(self):
if not self.instance.pk:
return True
else:
super(
SchoolCommunityCouncilMeetingMinutesInlineForm,
self
).has_changed()
class SchoolCommunityCouncilMeetingMinutesInline(
EditLinkToInlineObject,
LinkToInlineObject,
admin.TabularInline,
):
model = SchoolCommunityCouncilMeetingMinutes
form = SchoolCommunityCouncilMeetingMinutesInlineForm
fk_name = 'parent'
fields = [
'title',
'pagelayout',
'update_user',
'update_date',
'edit_link',
'published',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'edit_link',
'copy_link',
]
extra = 0
min_num = 0
max_num = 1
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(
self.model._meta.model_name + '.' + get_permission_codename(
'restore',
self.model._meta
)
):
return qs
return qs.filter(deleted=0)
class BoardPolicyInlineForm(forms.ModelForm):
class Meta:
model = BoardPolicy
fields = ['policy_title', 'section', 'index', ]
def __init__(self, *args, **kwargs):
super(BoardPolicyInlineForm, self).__init__(*args, **kwargs)
if self.instance.pk:
self.fields['section'].disabled = True
self.fields['index'].disabled = True
class BoardPolicyInline(
LinkToInlineObject,
EditLinkToInlineObject,
admin.TabularInline,
):
model = BoardPolicy
form = BoardPolicyInlineForm
fk_name = 'parent'
fields = [
'policy_title',
'section',
'index',
'update_user',
'update_date',
'edit_link',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'edit_link',
'copy_link',
]
ordering = ['section__lft', 'index', ]
extra = 0
min_num = 0
max_num = 100
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
class BoardPolicyReviewInlineForm(forms.ModelForm):
class Meta:
model = BoardPolicy
fields = [
'title',
'subcommittee_review',
'boardmeeting_review',
'last_approved',
]
def __init__(self, *args, **kwargs):
super(BoardPolicyReviewInlineForm, self).__init__(*args, **kwargs)
if self.instance.pk:
pass
class BoardPolicyReviewInline(
LinkToInlineObject,
EditLinkToInlineObject,
admin.TabularInline,
):
model = BoardPolicy
form = BoardPolicyReviewInlineForm
verbose_name = 'Board Policy Review Schedule'
verbose_name_plural = 'Board Policy Review Schedule'
fk_name = 'parent'
fields = [
'title',
'subcommittee_review',
'boardmeeting_review',
'last_approved',
'update_user',
'update_date',
'edit_link',
'copy_link',
]
readonly_fields = [
'title',
'update_user',
'update_date',
'edit_link',
'copy_link',
]
ordering = [
'subcommittee_review',
'section__lft',
'index',
]
extra = 0
min_num = 0
max_num = 100
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class PolicyInlineForm(forms.ModelForm):
class Meta:
model = Policy
fields = ['title']
def __init__(self, *args, **kwargs):
super(PolicyInlineForm, self).__init__(*args, **kwargs)
if self.instance.pk:
self.fields['title'].disabled = True
class PolicyInline(
LinkToInlineObject,
EditLinkToInlineObject,
admin.TabularInline,
):
model = Policy
form = PolicyInlineForm
fk_name = 'parent'
fields = [
'title',
'update_user',
'update_date',
'edit_link',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'edit_link',
'copy_link',
]
ordering = [
'title',
]
extra = 0
min_num = 0
max_num = 1
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class AdministrativeProcedureInlineForm(forms.ModelForm):
class Meta:
model = AdministrativeProcedure
fields = ['title']
def __init__(self, *args, **kwargs):
super(AdministrativeProcedureInlineForm,
self).__init__(*args, **kwargs)
if self.instance.pk:
self.fields['title'].disabled = True
class AdministrativeProcedureInline(
LinkToInlineObject,
EditLinkToInlineObject,
admin.TabularInline,
):
model = AdministrativeProcedure
form = AdministrativeProcedureInlineForm
fk_name = 'parent'
fields = [
'title',
'update_user',
'update_date',
'edit_link',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'edit_link',
'copy_link',
]
ordering = [
'title',
]
extra = 0
min_num = 0
max_num = 1
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class SupportingDocumentInlineForm(forms.ModelForm):
class Meta:
model = SupportingDocument
fields = ['title']
def __init__(self, *args, **kwargs):
super(SupportingDocumentInlineForm, self).__init__(*args, **kwargs)
if self.instance.pk:
self.fields['title'].disabled = True
class SupportingDocumentInline(
LinkToInlineObject,
EditLinkToInlineObject,
admin.TabularInline,
):
model = SupportingDocument
form = SupportingDocumentInlineForm
fk_name = 'parent'
fields = [
'title',
'update_user',
'update_date',
'edit_link',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'edit_link',
'copy_link',
]
ordering = [
'title',
]
extra = 0
min_num = 0
max_num = 10
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class BoardMeetingAgendaInlineForm(forms.ModelForm):
class Meta:
model = BoardMeetingAgenda
fields = ['title']
def __init__(self, *args, **kwargs):
super(BoardMeetingAgendaInlineForm, self).__init__(*args, **kwargs)
if self.instance.pk:
self.fields['title'].disabled = True
class BoardMeetingAgendaInline(
LinkToInlineObject,
EditLinkToInlineObject,
admin.TabularInline,
):
model = BoardMeetingAgenda
form = BoardMeetingAgendaInlineForm
fk_name = 'parent'
fields = [
'title',
'update_user',
'update_date',
'edit_link',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'edit_link',
'copy_link',
]
ordering = [
'title',
]
extra = 0
min_num = 0
max_num = 1
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class BoardMeetingMinutesInlineForm(forms.ModelForm):
class Meta:
model = BoardMeetingMinutes
fields = ['title']
def __init__(self, *args, **kwargs):
super(BoardMeetingMinutesInlineForm, self).__init__(*args, **kwargs)
if self.instance.pk:
self.fields['title'].disabled = True
class BoardMeetingMinutesInline(
LinkToInlineObject,
EditLinkToInlineObject,
admin.TabularInline,
):
model = BoardMeetingMinutes
form = BoardMeetingMinutesInlineForm
fk_name = 'parent'
fields = [
'title',
'update_user',
'update_date',
'edit_link',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'edit_link',
'copy_link',
]
ordering = [
'title',
]
extra = 0
min_num = 0
max_num = 1
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class BoardMeetingAudioInlineForm(forms.ModelForm):
class Meta:
model = BoardMeetingAudio
fields = ['title']
def __init__(self, *args, **kwargs):
super(BoardMeetingAudioInlineForm, self).__init__(*args, **kwargs)
if self.instance.pk:
self.fields['title'].disabled = True
class BoardMeetingAudioInline(
LinkToInlineObject,
EditLinkToInlineObject,
admin.TabularInline,
):
model = BoardMeetingAudio
form = BoardMeetingAudioInlineForm
fk_name = 'parent'
fields = [
'title',
'update_user',
'update_date',
'edit_link',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'edit_link',
'copy_link',
]
ordering = [
'title',
]
extra = 0
min_num = 0
max_num = 1
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class BoardMeetingVideoInlineForm(forms.ModelForm):
class Meta:
model = BoardMeetingVideo
fields = ['title']
def __init__(self, *args, **kwargs):
super(BoardMeetingVideoInlineForm, self).__init__(*args, **kwargs)
if self.instance.pk:
self.fields['title'].disabled = True
class BoardMeetingVideoInline(
LinkToInlineObject,
EditLinkToInlineObject,
admin.TabularInline,
):
model = BoardMeetingVideo
form = BoardMeetingVideoInlineForm
fk_name = 'parent'
fields = [
'title',
'update_user',
'update_date',
'edit_link',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'edit_link',
'copy_link',
]
ordering = [
'title',
]
extra = 0
min_num = 0
max_num = 1
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class BoardMeetingExhibitInlineForm(forms.ModelForm):
class Meta:
model = BoardMeetingExhibit
fields = ['title']
def __init__(self, *args, **kwargs):
super(BoardMeetingExhibitInlineForm, self).__init__(*args, **kwargs)
if self.instance.pk:
self.fields['title'].disabled = True
class BoardMeetingExhibitInline(
LinkToInlineObject,
EditLinkToInlineObject,
admin.TabularInline,
):
model = BoardMeetingExhibit
form = BoardMeetingExhibitInlineForm
fk_name = 'parent'
fields = [
'title',
'update_user',
'update_date',
'edit_link',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'edit_link',
'copy_link',
]
ordering = [
'title',
]
extra = 0
min_num = 0
max_num = 50
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class BoardMeetingAgendaItemInlineForm(forms.ModelForm):
class Meta:
model = BoardMeetingAgendaItem
fields = ['title']
def __init__(self, *args, **kwargs):
super(BoardMeetingAgendaItemInlineForm, self).__init__(*args, **kwargs)
if self.instance.pk:
self.fields['title'].disabled = True
class BoardMeetingAgendaItemInline(
LinkToInlineObject,
EditLinkToInlineObject,
admin.TabularInline,
):
model = BoardMeetingAgendaItem
form = BoardMeetingAgendaItemInlineForm
fk_name = 'parent'
fields = [
'title',
'update_user',
'update_date',
'edit_link',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'edit_link',
'copy_link',
]
ordering = ['title', ]
extra = 0
min_num = 0
max_num = 50
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class FileInlineForm(forms.ModelForm):
class Meta:
model = File
fields = [
'file_file',
'file_language',
]
def __init__(self, *args, **kwargs):
super(FileInlineForm, self).__init__(*args, **kwargs)
if self.instance.pk:
self.fields['file_language'].disabled = True
class FileInline(
LinkToInlineObject,
admin.TabularInline,
):
model = File
form = FileInlineForm
fk_name = 'parent'
fields = [
'file_file',
'file_language',
'update_user',
'update_date',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'copy_link',
]
ordering = [
'file_language__lft',
'file_language__title',
]
verbose_name = 'File Translation'
verbose_name_plural = 'File Translations'
extra = 0
min_num = 0
max_num = 50
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class AudioFileInlineForm(forms.ModelForm):
class Meta:
model = AudioFile
fields = ['file_file', ]
def __init__(self, *args, **kwargs):
super(AudioFileInlineForm, self).__init__(*args, **kwargs)
if self.instance.pk:
pass
class AudioFileInline(
LinkToInlineObject,
admin.TabularInline,
):
model = AudioFile
form = AudioFileInlineForm
fk_name = 'parent'
fields = [
'file_file',
'update_user',
'update_date',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'copy_link',
]
extra = 0
min_num = 0
max_num = 1
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class VideoFileInlineForm(forms.ModelForm):
class Meta:
model = VideoFile
fields = ['file_file', ]
def __init__(self, *args, **kwargs):
super(VideoFileInlineForm, self).__init__(*args, **kwargs)
if self.instance.pk:
pass
class VideoFileInline(
LinkToInlineObject,
admin.TabularInline,
):
model = VideoFile
form = VideoFileInlineForm
fk_name = 'parent'
fields = [
'file_file',
'update_user',
'update_date',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'copy_link',
]
extra = 0
min_num = 0
max_num = 1
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class PrecinctMapInline(
LinkToInlineObject,
admin.TabularInline,
):
model = PrecinctMap
fk_name = 'parent'
fields = [
'file_file',
'update_user',
'update_date',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'copy_link',
]
extra = 0
min_num = 0
max_num = 1
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class SubPageInlineForm(forms.ModelForm):
class Meta:
model = SubPage
fields = ['title', ]
def __init__(self, *args, **kwargs):
super(SubPageInlineForm, self).__init__(*args, **kwargs)
if self.instance.pk:
self.fields['title'].disabled = True
class SubPageInline(
LinkToInlineObject,
EditLinkToInlineObject,
admin.TabularInline
):
model = SubPage
form = SubPageInlineForm
classes = {
'subpage_inline',
}
fk_name = 'parent'
fields = [
'title',
'update_user',
'update_date',
'edit_link',
'published',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'edit_link',
'copy_link',
]
extra = 0
min_num = 0
max_num = 50
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class SectionPageInlineForm(forms.ModelForm):
class Meta:
model = Page
fields = [
'title',
]
def __init__(self, *args, **kwargs):
super(SectionPageInlineForm, self).__init__(*args, **kwargs)
if self.instance.pk:
self.fields['title'].disabled = True
class SectionPageInline(
LinkToInlineObject,
SortableInlineAdminMixin,
EditLinkToInlineObject,
admin.TabularInline
):
model = Page
form = SectionPageInlineForm
fk_name = 'parent'
ordering = [
'inline_order',
]
fields = [
'title',
'update_user',
'update_date',
'edit_link',
'published',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'edit_link',
'copy_link',
]
verbose_name = 'Section Page'
verbose_name_plural = 'Section Pages'
extra = 0
min_num = 0
max_num = 50
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class BoardSubPageInlineForm(forms.ModelForm):
class Meta:
model = BoardSubPage
fields = ['title']
def __init__(self, *args, **kwargs):
super(BoardSubPageInlineForm, self).__init__(*args, **kwargs)
if self.instance.pk:
self.fields['title'].disabled = True
class BoardSubPageInline(
LinkToInlineObject,
EditLinkToInlineObject,
admin.TabularInline
):
model = BoardSubPage
form = BoardSubPageInlineForm
fk_name = 'parent'
classes = {
'boardsubpage_inline',
}
fields = [
'title',
'update_user',
'update_date',
'edit_link',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'edit_link',
'copy_link',
]
extra = 0
min_num = 0
max_num = 50
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class BoardMeetingInlineForm(forms.ModelForm):
class Meta:
model = BoardMeeting
fields = [
'startdate',
'meeting_type',
]
def __init__(self, *args, **kwargs):
super(BoardMeetingInlineForm, self).__init__(*args, **kwargs)
if self.instance.pk:
pass
class BoardMeetingInline(
LinkToInlineObject,
EditLinkToInlineObject,
admin.TabularInline,
):
model = BoardMeeting
form = BoardMeetingInlineForm
fk_name = 'parent'
fields = [
'startdate',
'meeting_type',
'update_user',
'update_date',
'edit_link',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'edit_link',
'copy_link',
]
ordering = [
'-startdate',
]
extra = 0
min_num = 0
max_num = 50
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class SchoolCommunityCouncilMeetingInlineForm(forms.ModelForm):
class Meta:
model = SchoolCommunityCouncilMeeting
fields = [
'startdate',
]
def __init__(self, *args, **kwargs):
super(SchoolCommunityCouncilMeetingInlineForm, self).__init__(*args, **kwargs)
if self.instance.pk:
pass
class SchoolCommunityCouncilMeetingInline(
LinkToInlineObject,
EditLinkToInlineObject,
admin.TabularInline,
):
model = SchoolCommunityCouncilMeeting
form = SchoolCommunityCouncilMeetingInlineForm
fk_name = 'parent'
fields = [
'startdate',
'update_user',
'update_date',
'edit_link',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'edit_link',
'copy_link',
]
ordering = [
'startdate',
]
extra = 0
min_num = 0
max_num = 50
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class SuperintendentMessageInlineForm(forms.ModelForm):
class Meta:
model = SuperintendentMessage
fields = ['author_date', ]
def __init__(self, *args, **kwargs):
super(SuperintendentMessageInlineForm, self).__init__(*args, **kwargs)
if self.instance.pk:
pass
class SuperintendentMessageInline(
LinkToInlineObject,
EditLinkToInlineObject,
admin.TabularInline,
):
model = SuperintendentMessage
form = SuperintendentMessageInlineForm
fk_name = 'parent'
fields = [
'author_date',
'update_user',
'update_date',
'edit_link',
'published',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'edit_link',
'copy_link',
]
ordering = [
'-author_date',
]
extra = 0
min_num = 0
max_num = 50
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class DistrictCalendarEventInlineForm(forms.ModelForm):
class Meta:
model = DistrictCalendarEvent
fields = [
'event_name',
'event_category',
'startdate',
'enddate',
]
def __init__(self, *args, **kwargs):
super(DistrictCalendarEventInlineForm, self).__init__(*args, **kwargs)
if self.instance.pk:
pass
class DistrictCalendarEventInline(
LinkToInlineObject,
EditLinkToInlineObject,
admin.TabularInline,
):
model = DistrictCalendarEvent
form = DistrictCalendarEventInlineForm
fk_name = 'parent'
fields = [
'event_name',
'event_category',
'startdate',
'enddate',
'update_user',
'update_date',
'edit_link',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'edit_link',
'copy_link',
]
ordering = [
'startdate',
]
extra = 0
min_num = 0
max_num = 50
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class FAQInlineForm(forms.ModelForm):
class Meta:
model = FAQ
fields = ['question', ]
def __init__(self, *args, **kwargs):
super(FAQInlineForm, self).__init__(*args, **kwargs)
if self.instance.pk:
pass
class FAQInline(
LinkToInlineObject,
EditLinkToInlineObject,
SortableInlineAdminMixin,
admin.TabularInline,
):
model = FAQ
fk_name = 'parent'
ordering = [
'inline_order',
]
fields = [
'question',
'update_user',
'update_date',
'edit_link',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'edit_link',
'copy_link',
]
extra = 0
min_num = 0
max_num = 25
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class AnnouncementInlineForm(forms.ModelForm):
class Meta:
model = Announcement
fields = ['title', 'body', ]
def __init__(self, *args, **kwargs):
super(AnnouncementInlineForm, self).__init__(*args, **kwargs)
if self.instance.pk:
pass
class AnnouncementInline(
LinkToInlineObject,
EditLinkToInlineObject,
SortableInlineAdminMixin,
admin.TabularInline,
):
model = Announcement
fk_name = 'parent'
ordering = [
'inline_order',
]
fields = [
'title',
'update_user',
'update_date',
'edit_link',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'edit_link',
'copy_link',
]
extra = 0
min_num = 0
max_num = 25
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class SchoolAdministrationInlineForm(forms.ModelForm):
class Meta:
model = SchoolAdministration
fields = [
'employee',
]
def __init__(self, *args, **kwargs):
super(SchoolAdministrationInlineForm, self).__init__(*args, **kwargs)
if self.instance.pk:
pass
class SchoolAdministrationInline(
LinkToInlineObject,
# EditLinkToInlineObject,
SortableInlineAdminMixin,
admin.TabularInline,
):
model = SchoolAdministration
form = make_ajax_form(SchoolAdministration, {
'employee': 'employee'}, SchoolAdministrationInlineForm)
fk_name = 'parent'
ordering = [
'inline_order',
]
fields = [
'employee',
'update_user',
'update_date',
# 'edit_link',
'published',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
# 'edit_link',
'copy_link',
]
extra = 0
min_num = 0
max_num = 25
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class SchoolStaffInlineForm(forms.ModelForm):
class Meta:
model = SchoolStaff
fields = [
'employee',
]
def __init__(self, *args, **kwargs):
super(SchoolStaffInlineForm, self).__init__(*args, **kwargs)
if self.instance.pk:
pass
class SchoolStaffInline(
LinkToInlineObject,
# EditLinkToInlineObject,
SortableInlineAdminMixin,
admin.TabularInline,
):
model = SchoolStaff
form = make_ajax_form(SchoolStaff, {
'employee': 'employee'}, SchoolStaffInlineForm)
verbose_name = 'School Staff'
verbose_name_plural = 'School Staff'
fk_name = 'parent'
ordering = [
'inline_order',
]
fields = [
'employee',
'update_user',
'update_date',
# 'edit_link',
'published',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
# 'edit_link',
'copy_link',
]
extra = 0
min_num = 0
max_num = 100
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class SchoolFacultyInlineForm(forms.ModelForm):
class Meta:
model = SchoolFaculty
fields = [
'employee',
'primary_subject',
'primary_contact',
'additional_subjects',
'pagelayout',
]
def __init__(self, *args, **kwargs):
super(SchoolFacultyInlineForm, self).__init__(*args, **kwargs)
self.fields['pagelayout'].initial = str(PageLayout.objects.get(namespace='school-faculty-my-page.html').pk)
self.fields['pagelayout'].widget = forms.HiddenInput()
self.fields['primary_contact'].widget = forms.HiddenInput()
self.fields['primary_subject'].queryset = (
SubjectGradeLevel
.objects
.filter(
site=self.request.site,
deleted=0,
published=1
)
.order_by('inline_order')
)
self.fields['additional_subjects'].queryset = (
SubjectGradeLevel
.objects
.filter(
site=self.request.site,
deleted=0,
published=1
)
.order_by('inline_order')
)
if self.instance.pk:
self.fields['employee'].disabled = True
def clean_primary_contact(self):
data = self.cleaned_data['employee']
return data
class SchoolFacultyInline(
LinkToInlineObject,
EditLinkToInlineObject,
#SortableInlineAdminMixin,
admin.TabularInline,
):
model = SchoolFaculty
form = make_ajax_form(SchoolFaculty, {
'employee': 'employee'}, SchoolFacultyInlineForm)
verbose_name = 'School Faculty'
verbose_name_plural = 'School Faculty'
fk_name = 'parent'
ordering = [
'employee__first_name',
'employee__last_name',
]
fields = [
'employee',
'primary_subject',
'additional_subjects',
'primary_contact',
'pagelayout',
'update_user',
'update_date',
'edit_link',
'published',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'edit_link',
'copy_link',
]
extra = 0
min_num = 0
max_num = 100
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class SchoolCommunityCouncilMemberInlineForm(forms.ModelForm):
class Meta:
model = SchoolCommunityCouncilMember
fields = [
'first_name',
'last_name',
'role',
'email',
'phone',
]
def __init__(self, *args, **kwargs):
super(SchoolCommunityCouncilMemberInlineForm, self).__init__(*args, **kwargs)
if self.instance.pk:
pass
class SchoolCommunityCouncilMemberInline(
LinkToInlineObject,
# EditLinkToInlineObject,
SortableInlineAdminMixin,
admin.TabularInline,
):
model = SchoolCommunityCouncilMember
fk_name = 'parent'
ordering = [
'inline_order',
]
fields = [
'first_name',
'last_name',
'role',
'email',
'phone',
'update_user',
'update_date',
'published',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
'copy_link',
]
extra = 0
min_num = 0
max_num = 100
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class PageEditorInlineForm(forms.ModelForm):
class Meta:
model = PageEditor
fields = [
'employee',
]
def __init__(self, *args, **kwargs):
super(PageEditorInlineForm, self).__init__(*args, **kwargs)
if self.instance.employee_id:
self.fields['employee'].disabled = True
class PageEditorInline(
admin.TabularInline,
):
model = PageEditor
form = make_ajax_form(PageEditor, {
'employee': 'employee'}, PageEditorInlineForm)
verbose_name = 'Page Editor'
verbose_name_plural = 'Page Editors'
fk_name = 'related_node'
ordering = [
'employee__first_name',
'employee__last_name',
]
fields = [
'employee',
'update_user',
'update_date',
]
readonly_fields = [
'update_user',
'update_date',
]
extra = 0
min_num = 0
max_num = 10
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class SubjectGradeLevelInlineForm(forms.ModelForm):
class Meta:
model = SubjectGradeLevel
fields = [
'title',
]
def __init__(self, *args, **kwargs):
super(SubjectGradeLevelInlineForm, self).__init__(*args, **kwargs)
if self.instance.pk:
pass
class SubjectGradeLevelInline(
LinkToInlineObject,
# EditLinkToInlineObject,
SortableInlineAdminMixin,
admin.TabularInline,
):
model = SubjectGradeLevel
form = SubjectGradeLevelInlineForm
verbose_name = 'Subject or Grade Level'
verbose_name_plural = 'Subjects and Grade Levels'
fk_name = 'parent'
ordering = [
'inline_order',
]
fields = [
'title',
'update_user',
'update_date',
# 'edit_link',
'copy_link',
]
readonly_fields = [
'update_user',
'update_date',
# 'edit_link',
'copy_link',
]
extra = 0
min_num = 0
max_num = 50
has_add_permission = apps.common.functions.has_add_permission_inline
has_change_permission = apps.common.functions.has_change_permission_inline
has_delete_permission = apps.common.functions.has_delete_permission_inline
def get_formset(self, request, obj=None, **kwargs):
self.form.request = request
return super().get_formset(request, obj, **kwargs)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm(self.model._meta.model_name + '.' + get_permission_codename('restore', self.model._meta)):
return qs
return qs.filter(deleted=0)
class PageAdminForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(PageAdminForm, self).__init__(*args, **kwargs)
if self.instance:
if 'parent' in self.fields:
self.fields['parent'].queryset = Node.objects.filter(deleted=0, published=1, site=self.instance.site).filter(Q(node_type='pages'))
class Meta:
model = Page
fields = ['title', 'body','primary_contact','parent','url']
class PageAdmin(MyDraggableMPTTAdmin, GuardedModelAdmin):
form = make_ajax_form(Page, {'primary_contact': 'employee'} ,PageAdminForm)
def get_fields(self, request, obj=None):
fields = []
if request.site.domain != 'www.slcschools.org':
if obj:
if obj.pagelayout.namespace in obj.TYPES:
fields = obj.TYPES[obj.pagelayout.namespace]['fields']
else:
fields = []
else:
fields = []
# When adding fields with append below you should
# have a matching remove. For some reason if you
# do not fields appear inconsistently for different
# users.
if request.user.is_superuser:
if 'searchable' not in fields:
fields.append('searchable')
if 'parent' not in fields:
fields.append('parent')
if 'url' not in fields:
fields.append('url')
else:
if 'searchable' in fields:
fields.remove('searchable')
if 'parent' in fields:
fields.remove('parent')
if 'url' in fields:
fields.remove('url')
return fields
elif request.site.domain == 'www.slcschools.org':
fields = ['title', 'pagelayout', 'body','primary_contact',['update_user','update_date',],['create_user','create_date',],]
if request.user.is_superuser:
fields += ['published','searchable','parent',]
if obj:
fields += ['url']
return fields
def get_readonly_fields(self, request, obj=None):
if request.site.domain != 'www.slcschools.org':
if obj:
if obj.pagelayout.namespace in obj.TYPES:
fields = obj.TYPES[obj.pagelayout.namespace]['readonly_fields']
else:
fields = []
else:
fields = ['title']
# When adding fields with append below you should
# have a matching remove. For some reason if you
# do not fields appear inconsistently for different
# users.
if request.user.is_superuser:
if 'title' in fields:
fields.remove('title')
else:
if 'title' not in fields:
fields.append('title')
return fields
elif request.site.domain == 'www.slcschools.org':
fields = ['title','update_user','update_date','create_user','create_date',]
if request.user.is_superuser:
fields.remove('title')
if obj:
fields += ['url']
return fields
inlines = [ActionButtonInline,FAQInline,ResourceLinkInline,DocumentInline,SubPageInline]
def get_inline_instances(self, request, obj=None):
inline_instances = []
if request.site.domain != 'www.slcschools.org':
if obj:
if obj.pagelayout.namespace in obj.TYPES:
inlines = obj.TYPES[obj.pagelayout.namespace]['inlines']
else:
inlines = []
if apps.common.functions.is_globaladmin(request):
if not 'PageEditorInline' in inlines:
inlines.append('PageEditorInline')
else:
if 'PageEditorInline' in inlines:
inlines.remove('PageEditorInline')
else:
inlines = []
inlines = [getattr(sys.modules[__name__], inline) for inline in inlines]
if request.site.domain == 'www.slcschools.org':
inlines = self.inlines
if apps.common.functions.is_globaladmin(request):
if not PageEditorInline in inlines:
inlines.append(PageEditorInline)
else:
if PageEditorInline in inlines:
inlines.remove(PageEditorInline)
for inline_class in inlines:
inline = inline_class(self.model, self.admin_site)
# inline.request = request
if request:
if not (inline.has_add_permission(request) or
inline.has_change_permission(request, obj) or
inline.has_delete_permission(request, obj)):
continue
if not inline.has_add_permission(request):
inline.max_num = 0
inline_instances.append(inline)
return inline_instances
def get_formsets_with_inlines(self, request, obj=None):
if request.site.domain != 'www.slcschools.org':
for inline in self.get_inline_instances(request, obj):
yield inline.get_formset(request, obj), inline
if request.site.domain == 'www.slcschools.org':
for inline in self.get_inline_instances(request, obj):
# Remove delete fields is not superuser
if request.user.is_superuser or request.user.has_perm(inline.model._meta.model_name + '.' + get_permission_codename('restore',inline.model._meta)):
if 'deleted' not in inline.fields:
inline.fields.append('deleted')
else:
while 'deleted' in inline.fields:
inline.fields.remove('deleted')
if obj:
if obj.url == '/search/':
if not isinstance(inline, FAQInline):
continue
else:
if isinstance(inline, FAQInline):
continue
yield inline.get_formset(request, obj), inline
def get_list_display(self, request):
if request.user.has_perm('pages.restore_page'):
return ['tree_actions', 'indented_title','update_date','update_user','published','deleted']
else:
return ['tree_actions', 'indented_title','update_date','update_user','published']
def get_queryset(self, request):
qs = super().get_queryset(request)
qs = qs.filter(site=request.site.pk)
if request.user.is_superuser:
return qs
if request.user.has_perm('pages.restore_page'):
return qs
return qs.filter(deleted=0)
def get_actions(self, request):
actions = super().get_actions(request)
if 'delete_selected' in actions:
del actions['delete_selected']
if request.user.has_perm('pages.trash_page'):
actions['trash_selected'] = (trash_selected,'trash_selected',trash_selected.short_description)
if request.user.has_perm('pages.restore_page'):
actions['restore_selected'] = (restore_selected,'restore_selected',restore_selected.short_description)
if request.user.has_perm('pages.change_page'):
actions['publish_selected'] = (publish_selected, 'publish_selected', publish_selected.short_description)
actions['unpublish_selected'] = (unpublish_selected, 'unpublish_selected', unpublish_selected.short_description)
return actions
def get_list_filter(self, request):
if request.user.has_perm('pages.restore_page'):
return (DeletedListFilter, 'published')
else:
return ['published', ]
has_change_permission = apps.common.functions.has_change_permission
has_add_permission = apps.common.functions.has_add_permission
has_delete_permission = apps.common.functions.has_delete_permission
save_formset = apps.common.functions.save_formset
save_model = apps.common.functions.save_model
response_change = apps.common.functions.response_change
class SchoolAdminForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(SchoolAdminForm, self).__init__(*args, **kwargs)
if self.instance:
if 'parent' in self.fields:
self.fields['parent'].queryset = Node.objects.filter(deleted=0).filter(published=1).filter(Q(content_type='page', node_title='Elementary Schools') | Q(content_type='page', node_title='K-8 Schools') | Q(content_type='page', node_title='Middle Schools') | Q(content_type='page', node_title='High Schools') | Q(content_type='page', node_title='Charter Schools') | Q(content_type='page',node_title='Community Learning Centers'))
class Meta:
model = School
fields = ['title', 'body','building_location','main_phone','main_fax','enrollment','openenrollmentstatus','schooltype','website_url','scc_url','boundary_map','primary_contact','parent','url']
class SchoolAdmin(MPTTModelAdmin,GuardedModelAdmin):
form = make_ajax_form(School,{'primary_contact': 'employee'},SchoolAdminForm)
def get_fields(self, request, obj=None):
fields = [['title', 'school_number'], 'body','building_location','main_phone','main_fax','enrollment','openenrollmentstatus','schooltype','schooloptions','website_url','scc_url','calendar_url','donate_url','boundary_map','primary_contact',['update_user','update_date',],['create_user','create_date',],]
if request.user.is_superuser:
fields += ['published','searchable','parent',]
if obj:
fields += ['url']
return fields
def get_readonly_fields(self, request, obj=None):
fields = ['title','update_user','update_date','create_user','create_date',]
if request.user.is_superuser:
fields.remove('title')
if obj:
fields += ['url']
return fields
inlines = [ThumbnailInline, ContentBannerInline, SchoolAdministratorInline, ResourceLinkInline, DocumentInline,]
def get_inline_instances(self, request, obj=None):
inline_instances = []
inlines = self.inlines
if apps.common.functions.is_globaladmin(request):
if not PageEditorInline in inlines:
inlines.append(PageEditorInline)
else:
if PageEditorInline in inlines:
inlines.remove(PageEditorInline)
for inline_class in inlines:
inline = inline_class(self.model, self.admin_site)
if request:
if not (inline.has_add_permission(request) or
inline.has_change_permission(request, obj) or
inline.has_delete_permission(request, obj)):
continue
if not inline.has_add_permission(request):
inline.max_num = 0
inline_instances.append(inline)
return inline_instances
def get_formsets_with_inlines(self, request, obj=None):
for inline in self.get_inline_instances(request, obj):
# Remove delete fields is not superuser
if request.user.is_superuser or request.user.has_perm(inline.model._meta.model_name + '.' + get_permission_codename('restore',inline.model._meta)):
if not 'deleted' in inline.fields:
inline.fields.append('deleted')
else:
while 'deleted' in inline.fields:
inline.fields.remove('deleted')
yield inline.get_formset(request, obj), inline
has_change_permission = apps.common.functions.has_change_permission
has_add_permission = apps.common.functions.has_add_permission
has_delete_permission = apps.common.functions.has_delete_permission
save_formset = apps.common.functions.save_formset
save_model = apps.common.functions.save_model
response_change = apps.common.functions.response_change
class DepartmentAdminForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(DepartmentAdminForm, self).__init__(*args, **kwargs)
if self.instance:
if 'parent' in self.fields:
self.fields['parent'].queryset = Node.objects.filter(deleted=0).filter(published=1).filter(Q(content_type='page', node_title='Departments') | Q(content_type='department'))
class Meta:
model = Department
fields = ['title','short_description','body','building_location','main_phone','main_fax','primary_contact','parent','url']
class DepartmentAdmin(MPTTModelAdmin,GuardedModelAdmin):
form = make_ajax_form(Department,{'primary_contact': 'employee'}, DepartmentAdminForm)
def get_fields(self, request, obj=None):
fields = ['title','short_description','body','building_location','main_phone','main_fax','primary_contact',['update_user','update_date',],['create_user','create_date',],]
if request.user.is_superuser:
fields += ['published','searchable','parent',]
if obj:
fields += ['url']
return fields
def get_readonly_fields(self, request, obj=None):
fields = ['title','update_user','update_date','create_user','create_date',]
if request.user.is_superuser:
fields.remove('title')
if obj:
fields += ['url']
return fields
inlines = [ContentBannerInline,ActionButtonInline,AdministratorInline,StaffInline,ResourceLinkInline,DocumentInline,SubPageInline]
def get_inline_instances(self, request, obj=None):
inline_instances = []
inlines = self.inlines
if apps.common.functions.is_globaladmin(request):
if not PageEditorInline in inlines:
inlines.append(PageEditorInline)
else:
if PageEditorInline in inlines:
inlines.remove(PageEditorInline)
for inline_class in inlines:
inline = inline_class(self.model, self.admin_site)
if request:
if not (inline.has_add_permission(request) or
inline.has_change_permission(request, obj) or
inline.has_delete_permission(request, obj)):
continue
if not inline.has_add_permission(request):
inline.max_num = 0
inline_instances.append(inline)
return inline_instances
def get_formsets_with_inlines(self, request, obj=None):
for inline in self.get_inline_instances(request, obj):
# Remove delete fields is not superuser
if request.user.is_superuser or request.user.has_perm(inline.model._meta.model_name + '.' + get_permission_codename('restore',inline.model._meta)):
if not 'deleted' in inline.fields:
inline.fields.append('deleted')
else:
while 'deleted' in inline.fields:
inline.fields.remove('deleted')
yield inline.get_formset(request, obj), inline
has_change_permission = apps.common.functions.has_change_permission
has_add_permission = apps.common.functions.has_add_permission
has_delete_permission = apps.common.functions.has_delete_permission
save_formset = apps.common.functions.save_formset
save_model = apps.common.functions.save_model
response_change = apps.common.functions.response_change
class BoardAdminForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(BoardAdminForm, self).__init__(*args, **kwargs)
if self.instance:
if 'parent' in self.fields:
self.fields['parent'].queryset = Node.objects.filter(deleted=0).filter(published=1).filter(Q(content_type='none'))
class Meta:
model = Board
fields = ['title','body','building_location','main_phone','main_fax','mission_statement','vision_statement','primary_contact','parent','url']
class BoardAdmin(MPTTModelAdmin,GuardedModelAdmin):
form = make_ajax_form(Board,{'primary_contact': 'employee'}, BoardAdminForm)
def get_fields(self, request, obj=None):
fields = ['title','body','building_location','main_phone','main_fax','mission_statement','vision_statement','primary_contact',['update_user','update_date',],['create_user','create_date',],]
if request.user.is_superuser:
fields += ['published','searchable','parent',]
if obj:
fields += ['url']
return fields
def get_readonly_fields(self, request, obj=None):
fields = ['title','update_user','update_date','create_user','create_date',]
if request.user.is_superuser:
fields.remove('title')
if obj:
fields += ['url']
return fields
inlines = [ContentBannerInline,BoardMemberInline,StudentBoardMemberInline,ResourceLinkInline,DocumentInline,BoardSubPageInline,]
def get_inline_instances(self, request, obj=None):
inline_instances = []
inlines = self.inlines
if apps.common.functions.is_globaladmin(request):
if not PageEditorInline in inlines:
inlines.append(PageEditorInline)
else:
if PageEditorInline in inlines:
inlines.remove(PageEditorInline)
for inline_class in inlines:
inline = inline_class(self.model, self.admin_site)
if request:
if not (inline.has_add_permission(request) or
inline.has_change_permission(request, obj) or
inline.has_delete_permission(request, obj)):
continue
if not inline.has_add_permission(request):
inline.max_num = 0
inline_instances.append(inline)
return inline_instances
def get_formsets_with_inlines(self, request, obj=None):
for inline in self.get_inline_instances(request, obj):
# Remove delete fields is not superuser
if request.user.is_superuser or request.user.has_perm(inline.model._meta.model_name + '.' + get_permission_codename('restore',inline.model._meta)):
if not 'deleted' in inline.fields:
inline.fields.append('deleted')
else:
while 'deleted' in inline.fields:
inline.fields.remove('deleted')
yield inline.get_formset(request, obj), inline
has_change_permission = apps.common.functions.has_change_permission
has_add_permission = apps.common.functions.has_add_permission
has_delete_permission = apps.common.functions.has_delete_permission
save_formset = apps.common.functions.save_formset
save_model = apps.common.functions.save_model
response_change = apps.common.functions.response_change
class BoardSubPageAdminForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(BoardSubPageAdminForm, self).__init__(*args, **kwargs)
if self.instance:
if 'parent' in self.fields:
self.fields['parent'].queryset = Node.objects.filter(deleted=0).filter(published=1).filter(Q(content_type='board'))
class Meta:
model = BoardSubPage
fields = ['title','body','building_location','main_phone','main_fax','primary_contact','parent','url']
class BoardSubPageAdmin(MPTTModelAdmin,GuardedModelAdmin):
form = make_ajax_form(BoardSubPage,{'primary_contact': 'employee'}, BoardSubPageAdminForm)
def get_fields(self, request, obj=None):
fields = ['title','body','building_location','main_phone','main_fax','primary_contact',['update_user','update_date',],['create_user','create_date',],]
if request.user.is_superuser:
fields += ['published','searchable','parent',]
if obj:
fields += ['url']
return fields
def get_readonly_fields(self, request, obj=None):
fields = ['title','update_user','update_date','create_user','create_date',]
if request.user.is_superuser:
fields.remove('title')
if obj:
fields += ['url']
return fields
inlines = [ContentBannerInline,ActionButtonInline,AdministratorInline,StaffInline,ResourceLinkInline,DocumentInline,BoardPolicyInline,BoardPolicyReviewInline,BoardMeetingInline,SubPageInline,]
def get_inline_instances(self, request, obj=None):
inline_instances = []
inlines = self.inlines
if apps.common.functions.is_globaladmin(request):
if not PageEditorInline in inlines:
inlines.append(PageEditorInline)
else:
if PageEditorInline in inlines:
inlines.remove(PageEditorInline)
for inline_class in inlines:
inline = inline_class(self.model, self.admin_site)
if request:
if not (inline.has_add_permission(request) or
inline.has_change_permission(request, obj) or
inline.has_delete_permission(request, obj)):
continue
if not inline.has_add_permission(request):
inline.max_num = 0
inline_instances.append(inline)
return inline_instances
def get_formsets_with_inlines(self, request, obj=None):
for inline in self.get_inline_instances(request, obj):
# Remove delete fields is not superuser
if request.user.is_superuser or request.user.has_perm(inline.model._meta.model_name + '.' + get_permission_codename('restore',inline.model._meta)):
if not 'deleted' in inline.fields:
inline.fields.append('deleted')
else:
while 'deleted' in inline.fields:
inline.fields.remove('deleted')
if isinstance(inline,ContentBannerInline):
if obj.url == '/board-of-education/policies/':
continue
if obj.url == '/board-of-education/board-meetings/':
continue
if isinstance(inline,ActionButtonInline):
if obj.url == '/board-of-education/policies/':
continue
if obj.url == '/board-of-education/board-meetings/':
continue
if isinstance(inline,AdministratorInline):
if obj.url == '/board-of-education/policies/':
continue
if obj.url == '/board-of-education/board-meetings/':
continue
if isinstance(inline,StaffInline):
if obj.url == '/board-of-education/policies/':
continue
if obj.url == '/board-of-education/board-meetings/':
continue
if isinstance(inline,ResourceLinkInline):
if obj.url == '/board-of-education/policies/':
continue
if obj.url == '/board-of-education/board-meetings/':
continue
if isinstance(inline,DocumentInline):
if obj.url == '/board-of-education/policies/':
continue
if obj.url == '/board-of-education/board-meetings/':
continue
if isinstance(inline,BoardPolicyInline):
if not obj.url == '/board-of-education/policies/':
continue
if isinstance(inline, BoardPolicyReviewInline):
if not obj.url == '/board-of-education/policies/':
continue
if isinstance(inline,BoardMeetingInline):
if not obj.url == '/board-of-education/board-meetings/':
continue
if isinstance(inline,SubPageInline):
pass
yield inline.get_formset(request, obj), inline
has_change_permission = apps.common.functions.has_change_permission
has_add_permission = apps.common.functions.has_add_permission
has_delete_permission = apps.common.functions.has_delete_permission
save_formset = apps.common.functions.save_formset
save_model = apps.common.functions.save_model
response_change = apps.common.functions.response_change
class NewsAdmin(MPTTModelAdmin,GuardedModelAdmin):
def get_fields(self, request, obj=None):
fields = ['title','pinned','summary','body','author_date',['update_user','update_date',],['create_user','create_date',],]
if request.user.is_superuser:
fields += ['published','searchable','parent',]
if obj:
fields += ['url']
return fields
def get_readonly_fields(self, request, obj=None):
fields = ['title','update_user','update_date','create_user','create_date',]
if request.user.is_superuser:
fields.remove('title')
if obj:
fields += ['url']
return fields
inlines = [NewsThumbnailInline, ContentBannerInline, PhotoGalleryInline, ]
def get_formsets_with_inlines(self, request, obj=None):
for inline in self.get_inline_instances(request, obj):
# Remove delete fields is not superuser
if request.user.is_superuser or request.user.has_perm(inline.model._meta.model_name + '.' + get_permission_codename('restore',inline.model._meta)):
if not 'deleted' in inline.fields:
inline.fields.append('deleted')
else:
while 'deleted' in inline.fields:
inline.fields.remove('deleted')
yield inline.get_formset(request, obj), inline
has_change_permission = apps.common.functions.has_change_permission
has_add_permission = apps.common.functions.has_add_permission
has_delete_permission = apps.common.functions.has_delete_permission
save_formset = apps.common.functions.save_formset
save_model = apps.common.functions.save_model
response_change = apps.common.functions.response_change
class NewsYearAdmin(MPTTModelAdmin,GuardedModelAdmin):
def get_fields(self, request, obj=None):
fields = ['title',['update_user','update_date',],['create_user','create_date',],]
if request.user.is_superuser:
fields += ['published','searchable','parent',]
if obj:
fields += ['url']
return fields
def get_readonly_fields(self, request, obj=None):
fields = ['title','update_user','update_date','create_user','create_date',]
if request.user.is_superuser:
fields.remove('title')
if obj:
fields += ['url']
return fields
inlines = [NewsInline, ]
def get_inline_instances(self, request, obj=None):
inline_instances = []
inlines = self.inlines
if apps.common.functions.is_globaladmin(request):
if not PageEditorInline in inlines:
inlines.append(PageEditorInline)
else:
if PageEditorInline in inlines:
inlines.remove(PageEditorInline)
for inline_class in inlines:
inline = inline_class(self.model, self.admin_site)
if request:
if not (inline.has_add_permission(request) or
inline.has_change_permission(request, obj) or
inline.has_delete_permission(request, obj)):
continue
if not inline.has_add_permission(request):
inline.max_num = 0
inline_instances.append(inline)
return inline_instances
def get_formsets_with_inlines(self, request, obj=None):
for inline in self.get_inline_instances(request, obj):
# Remove delete fields is not superuser
if request.user.is_superuser or request.user.has_perm(inline.model._meta.model_name + '.' + get_permission_codename('restore',inline.model._meta)):
if not 'deleted' in inline.fields:
inline.fields.append('deleted')
else:
while 'deleted' in inline.fields:
inline.fields.remove('deleted')
yield inline.get_formset(request, obj), inline
has_change_permission = apps.common.functions.has_change_permission
has_add_permission = apps.common.functions.has_add_permission
has_delete_permission = apps.common.functions.has_delete_permission
save_formset = apps.common.functions.save_formset
save_model = apps.common.functions.save_model
response_change = apps.common.functions.response_change
class SuperintendentMessageAdmin(MPTTModelAdmin,GuardedModelAdmin):
def get_fields(self, request, obj=None):
fields = ['author_date','summary','body',['update_user','update_date',],['create_user','create_date',],]
if request.user.is_superuser:
fields += ['published','searchable','parent',]
if obj:
fields += ['url']
return fields
def get_readonly_fields(self, request, obj=None):
fields = ['author_date','update_user','update_date','create_user','create_date',]
if request.user.is_superuser:
if obj:
fields += ['url']
return fields
inlines = [NewsThumbnailInline,ContentBannerInline,ResourceLinkInline,DocumentInline]
def get_formsets_with_inlines(self, request, obj=None):
for inline in self.get_inline_instances(request, obj):
# Remove delete fields is not superuser
if request.user.is_superuser or request.user.has_perm(inline.model._meta.model_name + '.' + get_permission_codename('restore',inline.model._meta)):
if not 'deleted' in inline.fields:
inline.fields.append('deleted')
else:
while 'deleted' in inline.fields:
inline.fields.remove('deleted')
yield inline.get_formset(request, obj), inline
has_change_permission = apps.common.functions.has_change_permission
has_add_permission = apps.common.functions.has_add_permission
has_delete_permission = apps.common.functions.has_delete_permission
save_formset = apps.common.functions.save_formset
save_model = apps.common.functions.save_model
response_change = apps.common.functions.response_change
class SuperintendentMessageYearAdmin(MPTTModelAdmin,GuardedModelAdmin):
def get_fields(self, request, obj=None):
fields = ['title',['update_user','update_date',],['create_user','create_date',],]
if request.user.is_superuser:
fields += ['published','searchable','parent',]
if obj:
fields += ['url']
return fields
def get_readonly_fields(self, request, obj=None):
fields = ['title','update_user','update_date','create_user','create_date',]
if request.user.is_superuser:
fields.remove('title')
if obj:
fields += ['url']
return fields
inlines = [SuperintendentMessageInline,]
def get_inline_instances(self, request, obj=None):
inline_instances = []
inlines = self.inlines
if apps.common.functions.is_globaladmin(request):
if not PageEditorInline in inlines:
inlines.append(PageEditorInline)
else:
if PageEditorInline in inlines:
inlines.remove(PageEditorInline)
for inline_class in inlines:
inline = inline_class(self.model, self.admin_site)
if request:
if not (inline.has_add_permission(request) or
inline.has_change_permission(request, obj) or
inline.has_delete_permission(request, obj)):
continue
if not inline.has_add_permission(request):
inline.max_num = 0
inline_instances.append(inline)
return inline_instances
def get_formsets_with_inlines(self, request, obj=None):
for inline in self.get_inline_instances(request, obj):
# Remove delete fields is not superuser
if request.user.is_superuser or request.user.has_perm(inline.model._meta.model_name + '.' + get_permission_codename('restore',inline.model._meta)):
if not 'deleted' in inline.fields:
inline.fields.append('deleted')
else:
while 'deleted' in inline.fields:
inline.fields.remove('deleted')
yield inline.get_formset(request, obj), inline
has_change_permission = apps.common.functions.has_change_permission
has_add_permission = apps.common.functions.has_add_permission
has_delete_permission = apps.common.functions.has_delete_permission
save_formset = apps.common.functions.save_formset
save_model = apps.common.functions.save_model
response_change = apps.common.functions.response_change
class DocumentAdmin(MPTTModelAdmin,GuardedModelAdmin):
inlines = [FileInline,]
def get_formsets_with_inlines(self, request, obj=None):
for inline in self.get_inline_instances(request, obj):
# Remove delete fields is not superuser
if request.user.is_superuser or request.user.has_perm(inline.model._meta.model_name + '.' + get_permission_codename('restore',inline.model._meta)):
if not 'deleted' in inline.fields:
inline.fields.append('deleted')
else:
while 'deleted' in inline.fields:
inline.fields.remove('deleted')
yield inline.get_formset(request, obj), inline
def get_fields(self, request, obj=None):
fields = ['title',['update_user','update_date',],['create_user','create_date',],]
if request.user.is_superuser:
fields += ['published','searchable','parent',]
if obj:
fields += ['url']
return fields
def get_readonly_fields(self, request, obj=None):
fields = ['title','update_user','update_date','create_user','create_date',]
if request.user.is_superuser:
fields.remove('title')
if obj:
fields += ['url']
return fields
def get_list_display(self,request):
if request.user.has_perm('documents.restore_document'):
return ['title','update_date','update_user','published','deleted']
else:
return ['title','update_date','update_user','published']
#ordering = ('url',)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm('documents.restore_document'):
return qs
return qs.filter(deleted=0)
def get_actions(self, request):
actions = super().get_actions(request)
if 'delete_selected' in actions:
del actions['delete_selected']
if request.user.has_perm('documents.trash_document'):
actions['trash_selected'] = (trash_selected,'trash_selected',trash_selected.short_description)
if request.user.has_perm('documents.restore_document'):
actions['restore_selected'] = (restore_selected,'restore_selected',restore_selected.short_description)
if request.user.has_perm('documents.change_document'):
actions['publish_selected'] = (publish_selected, 'publish_selected', publish_selected.short_description)
actions['unpublish_selected'] = (unpublish_selected, 'unpublish_selected', unpublish_selected.short_description)
return actions
def get_list_filter(self, request):
if request.user.has_perm('documents.restore_document'):
return (DeletedListFilter,'published')
else:
return ['published',]
has_change_permission = apps.common.functions.has_change_permission
has_add_permission = apps.common.functions.has_add_permission
has_delete_permission = apps.common.functions.has_delete_permission
save_formset = apps.common.functions.save_formset
save_model = apps.common.functions.save_model
response_change = apps.common.functions.response_change
class BoardPolicyAdmin(MPTTModelAdmin,GuardedModelAdmin):
inlines = [BoardPolicyAdminInline,PolicyInline,AdministrativeProcedureInline,SupportingDocumentInline,]
def get_formsets_with_inlines(self, request, obj=None):
for inline in self.get_inline_instances(request, obj):
# Remove delete fields is not superuser
if request.user.is_superuser or request.user.has_perm(inline.model._meta.model_name + '.' + get_permission_codename('restore',inline.model._meta)):
if not 'deleted' in inline.fields:
inline.fields.append('deleted')
else:
while 'deleted' in inline.fields:
inline.fields.remove('deleted')
yield inline.get_formset(request, obj), inline
def get_fields(self, request, obj=None):
fields = ['title','section','index','subcommittee_review','boardmeeting_review','last_approved',['update_user','update_date',],['create_user','create_date',],]
if request.user.is_superuser:
fields += ['published','searchable','parent',]
if obj:
fields += ['url']
return fields
def get_readonly_fields(self, request, obj=None):
fields = ['title','section','index','update_user','update_date','create_user','create_date',]
if request.user.is_superuser:
fields.remove('title')
fields.remove('section')
fields.remove('index')
if obj:
fields += ['url']
return fields
def get_list_display(self,request):
if request.user.has_perm('documents.restore_document'):
return ['title','update_date','update_user','published','deleted']
else:
return ['title','update_date','update_user','published']
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm('documents.restore_document'):
return qs
return qs.filter(deleted=0)
def get_actions(self, request):
actions = super().get_actions(request)
if 'delete_selected' in actions:
del actions['delete_selected']
if request.user.has_perm('documents.trash_document'):
actions['trash_selected'] = (trash_selected,'trash_selected',trash_selected.short_description)
if request.user.has_perm('documents.restore_document'):
actions['restore_selected'] = (restore_selected,'restore_selected',restore_selected.short_description)
if request.user.has_perm('documents.change_document'):
actions['publish_selected'] = (publish_selected, 'publish_selected', publish_selected.short_description)
actions['unpublish_selected'] = (unpublish_selected, 'unpublish_selected', unpublish_selected.short_description)
return actions
def get_list_filter(self, request):
if request.user.has_perm('documents.restore_document'):
return (DeletedListFilter,'published')
else:
return ['published',]
has_change_permission = apps.common.functions.has_change_permission
has_add_permission = apps.common.functions.has_add_permission
has_delete_permission = apps.common.functions.has_delete_permission
save_formset = apps.common.functions.save_formset
save_model = apps.common.functions.save_model
response_change = apps.common.functions.response_change
class PolicyAdmin(MPTTModelAdmin,GuardedModelAdmin):
inlines = [FileInline,]
def get_formsets_with_inlines(self, request, obj=None):
for inline in self.get_inline_instances(request, obj):
# Remove delete fields is not superuser
if request.user.is_superuser or request.user.has_perm(inline.model._meta.model_name + '.' + get_permission_codename('restore',inline.model._meta)):
if not 'deleted' in inline.fields:
inline.fields.append('deleted')
else:
while 'deleted' in inline.fields:
inline.fields.remove('deleted')
yield inline.get_formset(request, obj), inline
def get_fields(self, request, obj=None):
fields = ['title',['update_user','update_date',],['create_user','create_date',],]
if request.user.is_superuser:
fields += ['published','searchable','parent',]
if obj:
fields += ['url']
return fields
def get_readonly_fields(self, request, obj=None):
fields = ['title','update_user','update_date','create_user','create_date',]
if request.user.is_superuser:
fields.remove('title')
if obj:
fields += ['url']
return fields
def get_list_display(self,request):
if request.user.has_perm('documents.restore_document'):
return ['title','update_date','update_user','published','deleted']
else:
return ['title','update_date','update_user','published']
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm('documents.restore_document'):
return qs
return qs.filter(deleted=0)
def get_actions(self, request):
actions = super().get_actions(request)
if 'delete_selected' in actions:
del actions['delete_selected']
if request.user.has_perm('documents.trash_document'):
actions['trash_selected'] = (trash_selected,'trash_selected',trash_selected.short_description)
if request.user.has_perm('documents.restore_document'):
actions['restore_selected'] = (restore_selected,'restore_selected',restore_selected.short_description)
if request.user.has_perm('documents.change_document'):
actions['publish_selected'] = (publish_selected, 'publish_selected', publish_selected.short_description)
actions['unpublish_selected'] = (unpublish_selected, 'unpublish_selected', unpublish_selected.short_description)
return actions
def get_list_filter(self, request):
if request.user.has_perm('documents.restore_document'):
return (DeletedListFilter,'published')
else:
return ['published',]
has_change_permission = apps.common.functions.has_change_permission
has_add_permission = apps.common.functions.has_add_permission
has_delete_permission = apps.common.functions.has_delete_permission
save_formset = apps.common.functions.save_formset
save_model = apps.common.functions.save_model
response_change = apps.common.functions.response_change
class AdministrativeProcedureAdmin(MPTTModelAdmin,GuardedModelAdmin):
inlines = [FileInline,]
def get_formsets_with_inlines(self, request, obj=None):
for inline in self.get_inline_instances(request, obj):
# Remove delete fields is not superuser
if request.user.is_superuser or request.user.has_perm(inline.model._meta.model_name + '.' + get_permission_codename('restore',inline.model._meta)):
if not 'deleted' in inline.fields:
inline.fields.append('deleted')
else:
while 'deleted' in inline.fields:
inline.fields.remove('deleted')
yield inline.get_formset(request, obj), inline
def get_fields(self, request, obj=None):
fields = ['title',['update_user','update_date',],['create_user','create_date',],]
if request.user.is_superuser:
fields += ['published','searchable','parent',]
if obj:
fields += ['url']
return fields
def get_readonly_fields(self, request, obj=None):
fields = ['title','update_user','update_date','create_user','create_date',]
if request.user.is_superuser:
fields.remove('title')
if obj:
fields += ['url']
return fields
def get_list_display(self,request):
if request.user.has_perm('documents.restore_document'):
return ['title','update_date','update_user','published','deleted']
else:
return ['title','update_date','update_user','published']
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm('documents.restore_document'):
return qs
return qs.filter(deleted=0)
def get_actions(self, request):
actions = super().get_actions(request)
if 'delete_selected' in actions:
del actions['delete_selected']
if request.user.has_perm('documents.trash_document'):
actions['trash_selected'] = (trash_selected,'trash_selected',trash_selected.short_description)
if request.user.has_perm('documents.restore_document'):
actions['restore_selected'] = (restore_selected,'restore_selected',restore_selected.short_description)
if request.user.has_perm('documents.change_document'):
actions['publish_selected'] = (publish_selected, 'publish_selected', publish_selected.short_description)
actions['unpublish_selected'] = (unpublish_selected, 'unpublish_selected', unpublish_selected.short_description)
return actions
def get_list_filter(self, request):
if request.user.has_perm('documents.restore_document'):
return (DeletedListFilter,'published')
else:
return ['published',]
has_change_permission = apps.common.functions.has_change_permission
has_add_permission = apps.common.functions.has_add_permission
has_delete_permission = apps.common.functions.has_delete_permission
save_formset = apps.common.functions.save_formset
save_model = apps.common.functions.save_model
response_change = apps.common.functions.response_change
class SupportingDocumentAdmin(MPTTModelAdmin,GuardedModelAdmin):
inlines = [FileInline,]
def get_formsets_with_inlines(self, request, obj=None):
for inline in self.get_inline_instances(request, obj):
# Remove delete fields is not superuser
if request.user.is_superuser or request.user.has_perm(inline.model._meta.model_name + '.' + get_permission_codename('restore',inline.model._meta)):
if not 'deleted' in inline.fields:
inline.fields.append('deleted')
else:
while 'deleted' in inline.fields:
inline.fields.remove('deleted')
yield inline.get_formset(request, obj), inline
def get_fields(self, request, obj=None):
fields = ['title',['update_user','update_date',],['create_user','create_date',],]
if request.user.is_superuser:
fields += ['published','searchable','parent',]
if obj:
fields += ['url']
return fields
def get_readonly_fields(self, request, obj=None):
fields = ['title','update_user','update_date','create_user','create_date',]
if request.user.is_superuser:
fields.remove('title')
if obj:
fields += ['url']
return fields
def get_list_display(self,request):
if request.user.has_perm('documents.restore_document'):
return ['title','update_date','update_user','published','deleted']
else:
return ['title','update_date','update_user','published']
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm('documents.restore_document'):
return qs
return qs.filter(deleted=0)
def get_actions(self, request):
actions = super().get_actions(request)
if 'delete_selected' in actions:
del actions['delete_selected']
if request.user.has_perm('documents.trash_document'):
actions['trash_selected'] = (trash_selected,'trash_selected',trash_selected.short_description)
if request.user.has_perm('documents.restore_document'):
actions['restore_selected'] = (restore_selected,'restore_selected',restore_selected.short_description)
if request.user.has_perm('documents.change_document'):
actions['publish_selected'] = (publish_selected, 'publish_selected', publish_selected.short_description)
actions['unpublish_selected'] = (unpublish_selected, 'unpublish_selected', unpublish_selected.short_description)
return actions
def get_list_filter(self, request):
if request.user.has_perm('documents.restore_document'):
return (DeletedListFilter,'published')
else:
return ['published',]
has_change_permission = apps.common.functions.has_change_permission
has_add_permission = apps.common.functions.has_add_permission
has_delete_permission = apps.common.functions.has_delete_permission
save_formset = apps.common.functions.save_formset
save_model = apps.common.functions.save_model
response_change = apps.common.functions.response_change
class SubPageAdmin(MPTTModelAdmin,GuardedModelAdmin):
form = make_ajax_form(Department,{'primary_contact': 'employee'})
def get_fields(self, request, obj=None):
fields = ['title','body','building_location','main_phone','main_fax','primary_contact',['update_user','update_date',],['create_user','create_date',],]
if request.user.is_superuser:
fields += ['published','searchable','parent',]
if obj:
fields += ['url']
return fields
def get_readonly_fields(self, request, obj=None):
fields = ['title','update_user','update_date','create_user','create_date',]
if request.user.is_superuser:
fields.remove('title')
if obj:
fields += ['url']
return fields
inlines = [ContentBannerInline,ActionButtonInline,AdministratorInline,StaffInline,ResourceLinkInline,DocumentInline,DistrictLogoInline,]
def get_inline_instances(self, request, obj=None):
inline_instances = []
inlines = self.inlines
if apps.common.functions.is_globaladmin(request):
if not PageEditorInline in inlines:
inlines.append(PageEditorInline)
else:
if PageEditorInline in inlines:
inlines.remove(PageEditorInline)
for inline_class in inlines:
inline = inline_class(self.model, self.admin_site)
if request:
if not (inline.has_add_permission(request) or
inline.has_change_permission(request, obj) or
inline.has_delete_permission(request, obj)):
continue
if not inline.has_add_permission(request):
inline.max_num = 0
inline_instances.append(inline)
return inline_instances
def get_formsets_with_inlines(self, request, obj=None):
for inline in self.get_inline_instances(request, obj):
# Remove delete fields is not superuser
if request.user.is_superuser or request.user.has_perm(inline.model._meta.model_name + '.' + get_permission_codename('restore',inline.model._meta)):
if not 'deleted' in inline.fields:
inline.fields.append('deleted')
else:
while 'deleted' in inline.fields:
inline.fields.remove('deleted')
if obj:
if not obj.url == '/departments/communications-and-community-relations/district-logo/':
if isinstance(inline,DistrictLogoInline):
continue
yield inline.get_formset(request, obj), inline
has_change_permission = apps.common.functions.has_change_permission
has_add_permission = apps.common.functions.has_add_permission
has_delete_permission = apps.common.functions.has_delete_permission
save_formset = apps.common.functions.save_formset
save_model = apps.common.functions.save_model
response_change = apps.common.functions.response_change
class StudentBoardMemberAdmin(MPTTModelAdmin,GuardedModelAdmin):
def get_fields(self, request, obj=None):
fields = ['title','first_name','last_name','phone','building_location',['update_user','update_date',],['create_user','create_date',],]
if request.user.is_superuser:
fields += ['published','searchable','parent',]
if obj:
fields += ['url']
return fields
def get_readonly_fields(self, request, obj=None):
fields = ['title','update_user','update_date','create_user','create_date',]
if request.user.is_superuser:
fields.remove('title')
if obj:
fields += ['url']
return fields
inlines = [ProfilePictureInline,]
def get_formsets_with_inlines(self, request, obj=None):
for inline in self.get_inline_instances(request, obj):
# Remove delete fields is not superuser
if request.user.is_superuser or request.user.has_perm(inline.model._meta.model_name + '.' + get_permission_codename('restore',inline.model._meta)):
if not 'deleted' in inline.fields:
inline.fields.append('deleted')
else:
while 'deleted' in inline.fields:
inline.fields.remove('deleted')
yield inline.get_formset(request, obj), inline
has_change_permission = apps.common.functions.has_change_permission
has_add_permission = apps.common.functions.has_add_permission
has_delete_permission = apps.common.functions.has_delete_permission
save_formset = apps.common.functions.save_formset
save_model = apps.common.functions.save_model
response_change = apps.common.functions.response_change
class BoardMeetingAdmin(MPTTModelAdmin,GuardedModelAdmin):
inlines = [BoardMeetingAgendaInline,BoardMeetingMinutesInline,BoardMeetingAudioInline,BoardMeetingVideoInline,BoardMeetingExhibitInline,BoardMeetingAgendaItemInline]
def get_formsets_with_inlines(self, request, obj=None):
for inline in self.get_inline_instances(request, obj):
# Remove delete fields is not superuser
if request.user.is_superuser or request.user.has_perm(inline.model._meta.model_name + '.' + get_permission_codename('restore',inline.model._meta)):
if not 'deleted' in inline.fields:
inline.fields.append('deleted')
else:
while 'deleted' in inline.fields:
inline.fields.remove('deleted')
yield inline.get_formset(request, obj), inline
def get_fields(self, request, obj=None):
fields = ['title','originaldate', 'startdate','cancelled','meeting_type','building_location','non_district_location','non_district_location_google_place',['update_user','update_date',],['create_user','create_date',],]
if request.user.is_superuser:
fields += ['published','searchable','parent']
if obj:
fields += ['url']
return fields
def get_readonly_fields(self, request, obj=None):
fields = ['title','originaldate','update_user','update_date','create_user','create_date',]
if request.user.is_superuser:
fields.remove('title')
fields.remove('originaldate')
if obj:
fields += ['url']
return fields
def get_list_display(self,request):
if request.user.has_perm('documents.restore_document'):
return ['title','update_date','update_user','published','deleted']
else:
return ['title','update_date','update_user','published']
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm('documents.restore_document'):
return qs
return qs.filter(deleted=0)
def get_actions(self, request):
actions = super().get_actions(request)
if 'delete_selected' in actions:
del actions['delete_selected']
if request.user.has_perm('documents.trash_document'):
actions['trash_selected'] = (trash_selected,'trash_selected',trash_selected.short_description)
if request.user.has_perm('documents.restore_document'):
actions['restore_selected'] = (restore_selected,'restore_selected',restore_selected.short_description)
if request.user.has_perm('documents.change_document'):
actions['publish_selected'] = (publish_selected, 'publish_selected', publish_selected.short_description)
actions['unpublish_selected'] = (unpublish_selected, 'unpublish_selected', unpublish_selected.short_description)
return actions
def get_list_filter(self, request):
if request.user.has_perm('documents.restore_document'):
return (DeletedListFilter,'published')
else:
return ['published',]
has_change_permission = apps.common.functions.has_change_permission
has_add_permission = apps.common.functions.has_add_permission
has_delete_permission = apps.common.functions.has_delete_permission
save_formset = apps.common.functions.save_formset
save_model = apps.common.functions.save_model
response_change = apps.common.functions.response_change
class SchoolCommunityCouncilMeetingAdmin(MPTTModelAdmin, GuardedModelAdmin):
inlines = [
SchoolCommunityCouncilMeetingAgendaInline,
SchoolCommunityCouncilMeetingMinutesInline
]
def get_formsets_with_inlines(self, request, obj=None):
for inline in self.get_inline_instances(request, obj):
# Remove delete fields is not superuser
if request.user.is_superuser or request.user.has_perm(inline.model._meta.model_name + '.' + get_permission_codename('restore',inline.model._meta)):
if not 'deleted' in inline.fields:
inline.fields.append('deleted')
else:
while 'deleted' in inline.fields:
inline.fields.remove('deleted')
yield inline.get_formset(request, obj), inline
def get_fields(self, request, obj=None):
fields = [
'title',
'originaldate',
'startdate',
'cancelled',
['update_user', 'update_date', ],
['create_user', 'create_date', ],
]
if request.user.is_superuser:
fields += [
'published',
'searchable',
'parent',
]
if obj:
fields += ['url']
return fields
def get_readonly_fields(self, request, obj=None):
fields = [
'title',
'originaldate',
'update_user',
'update_date',
'create_user',
'create_date',
]
if request.user.is_superuser:
fields.remove('title')
fields.remove('originaldate')
if obj:
fields += ['url']
return fields
def get_list_display(self, request):
if request.user.has_perm('documents.restore_document'):
return [
'title',
'update_date',
'update_user',
'published',
'deleted'
]
else:
return ['title', 'update_date', 'update_user', 'published']
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm('documents.restore_document'):
return qs
return qs.filter(deleted=0)
def get_actions(self, request):
actions = super().get_actions(request)
if 'delete_selected' in actions:
del actions['delete_selected']
if request.user.has_perm('documents.trash_document'):
actions['trash_selected'] = (trash_selected,'trash_selected',trash_selected.short_description)
if request.user.has_perm('documents.restore_document'):
actions['restore_selected'] = (restore_selected,'restore_selected',restore_selected.short_description)
if request.user.has_perm('documents.change_document'):
actions['publish_selected'] = (publish_selected, 'publish_selected', publish_selected.short_description)
actions['unpublish_selected'] = (unpublish_selected, 'unpublish_selected', unpublish_selected.short_description)
return actions
def get_list_filter(self, request):
if request.user.has_perm('documents.restore_document'):
return (DeletedListFilter, 'published')
else:
return ['published', ]
has_change_permission = apps.common.functions.has_change_permission
has_add_permission = apps.common.functions.has_add_permission
has_delete_permission = apps.common.functions.has_delete_permission
save_formset = apps.common.functions.save_formset
save_model = apps.common.functions.save_model
response_change = apps.common.functions.response_change
class BoardMeetingYearAdmin(MPTTModelAdmin, GuardedModelAdmin):
inlines = [BoardMeetingInline,]
def get_inline_instances(self, request, obj=None):
inline_instances = []
inlines = self.inlines
if apps.common.functions.is_globaladmin(request):
if not PageEditorInline in inlines:
inlines.append(PageEditorInline)
else:
if PageEditorInline in inlines:
inlines.remove(PageEditorInline)
for inline_class in inlines:
inline = inline_class(self.model, self.admin_site)
if request:
if not (inline.has_add_permission(request) or
inline.has_change_permission(request, obj) or
inline.has_delete_permission(request, obj)):
continue
if not inline.has_add_permission(request):
inline.max_num = 0
inline_instances.append(inline)
return inline_instances
def get_formsets_with_inlines(self, request, obj=None):
for inline in self.get_inline_instances(request, obj):
# Remove delete fields is not superuser
if request.user.is_superuser or request.user.has_perm(inline.model._meta.model_name + '.' + get_permission_codename('restore',inline.model._meta)):
if not 'deleted' in inline.fields:
inline.fields.append('deleted')
else:
while 'deleted' in inline.fields:
inline.fields.remove('deleted')
yield inline.get_formset(request, obj), inline
def get_fields(self, request, obj=None):
fields = ['title',['update_user','update_date',],['create_user','create_date',],]
if request.user.is_superuser:
fields += ['published','searchable','parent']
if obj:
fields += ['url']
return fields
def get_readonly_fields(self, request, obj=None):
fields = ['title','update_user','update_date','create_user','create_date',]
if request.user.is_superuser:
fields.remove('title')
if obj:
fields += ['url']
return fields
def get_list_display(self,request):
if request.user.has_perm('documents.restore_document'):
return ['title','update_date','update_user','published','deleted']
else:
return ['title','update_date','update_user','published']
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm('documents.restore_document'):
return qs
return qs.filter(deleted=0)
def get_actions(self, request):
actions = super().get_actions(request)
if 'delete_selected' in actions:
del actions['delete_selected']
if request.user.has_perm('documents.trash_document'):
actions['trash_selected'] = (trash_selected,'trash_selected',trash_selected.short_description)
if request.user.has_perm('documents.restore_document'):
actions['restore_selected'] = (restore_selected,'restore_selected',restore_selected.short_description)
if request.user.has_perm('documents.change_document'):
actions['publish_selected'] = (publish_selected, 'publish_selected', publish_selected.short_description)
actions['unpublish_selected'] = (unpublish_selected, 'unpublish_selected', unpublish_selected.short_description)
return actions
def get_list_filter(self, request):
if request.user.has_perm('documents.restore_document'):
return (DeletedListFilter,'published')
else:
return ['published',]
has_change_permission = apps.common.functions.has_change_permission
has_add_permission = apps.common.functions.has_add_permission
has_delete_permission = apps.common.functions.has_delete_permission
save_formset = apps.common.functions.save_formset
save_model = apps.common.functions.save_model
response_change = apps.common.functions.response_change
class BoardMeetingAgendaAdmin(MPTTModelAdmin,GuardedModelAdmin):
inlines = [FileInline,]
def get_formsets_with_inlines(self, request, obj=None):
for inline in self.get_inline_instances(request, obj):
# Remove delete fields is not superuser
if request.user.is_superuser or request.user.has_perm(inline.model._meta.model_name + '.' + get_permission_codename('restore',inline.model._meta)):
if not 'deleted' in inline.fields:
inline.fields.append('deleted')
else:
while 'deleted' in inline.fields:
inline.fields.remove('deleted')
yield inline.get_formset(request, obj), inline
def get_fields(self, request, obj=None):
fields = ['title',['update_user','update_date',],['create_user','create_date',],]
if request.user.is_superuser:
fields += ['published','searchable','parent']
if obj:
fields += ['url']
return fields
def get_readonly_fields(self, request, obj=None):
fields = ['title','update_user','update_date','create_user','create_date',]
if request.user.is_superuser:
fields.remove('title')
if obj:
fields += ['url']
return fields
def get_list_display(self,request):
if request.user.has_perm('documents.restore_document'):
return ['title','update_date','update_user','published','deleted']
else:
return ['title','update_date','update_user','published']
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm('documents.restore_document'):
return qs
return qs.filter(deleted=0)
def get_actions(self, request):
actions = super().get_actions(request)
if 'delete_selected' in actions:
del actions['delete_selected']
if request.user.has_perm('documents.trash_document'):
actions['trash_selected'] = (trash_selected,'trash_selected',trash_selected.short_description)
if request.user.has_perm('documents.restore_document'):
actions['restore_selected'] = (restore_selected,'restore_selected',restore_selected.short_description)
if request.user.has_perm('documents.change_document'):
actions['publish_selected'] = (publish_selected, 'publish_selected', publish_selected.short_description)
actions['unpublish_selected'] = (unpublish_selected, 'unpublish_selected', unpublish_selected.short_description)
return actions
def get_list_filter(self, request):
if request.user.has_perm('documents.restore_document'):
return (DeletedListFilter,'published')
else:
return ['published',]
has_change_permission = apps.common.functions.has_change_permission
has_add_permission = apps.common.functions.has_add_permission
has_delete_permission = apps.common.functions.has_delete_permission
save_formset = apps.common.functions.save_formset
save_model = apps.common.functions.save_model
response_change = apps.common.functions.response_change
class BoardMeetingMinutesAdmin(MPTTModelAdmin,GuardedModelAdmin):
inlines = [FileInline,]
def get_formsets_with_inlines(self, request, obj=None):
for inline in self.get_inline_instances(request, obj):
# Remove delete fields is not superuser
if request.user.is_superuser or request.user.has_perm(inline.model._meta.model_name + '.' + get_permission_codename('restore',inline.model._meta)):
if not 'deleted' in inline.fields:
inline.fields.append('deleted')
else:
while 'deleted' in inline.fields:
inline.fields.remove('deleted')
yield inline.get_formset(request, obj), inline
def get_fields(self, request, obj=None):
fields = ['title',['update_user','update_date',],['create_user','create_date',],]
if request.user.is_superuser:
fields += ['published','searchable','parent']
if obj:
fields += ['url']
return fields
def get_readonly_fields(self, request, obj=None):
fields = ['title','update_user','update_date','create_user','create_date',]
if request.user.is_superuser:
fields.remove('title')
if obj:
fields += ['url']
return fields
def get_list_display(self,request):
if request.user.has_perm('documents.restore_document'):
return ['title','update_date','update_user','published','deleted']
else:
return ['title','update_date','update_user','published']
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm('documents.restore_document'):
return qs
return qs.filter(deleted=0)
def get_actions(self, request):
actions = super().get_actions(request)
if 'delete_selected' in actions:
del actions['delete_selected']
if request.user.has_perm('documents.trash_document'):
actions['trash_selected'] = (trash_selected,'trash_selected',trash_selected.short_description)
if request.user.has_perm('documents.restore_document'):
actions['restore_selected'] = (restore_selected,'restore_selected',restore_selected.short_description)
if request.user.has_perm('documents.change_document'):
actions['publish_selected'] = (publish_selected, 'publish_selected', publish_selected.short_description)
actions['unpublish_selected'] = (unpublish_selected, 'unpublish_selected', unpublish_selected.short_description)
return actions
def get_list_filter(self, request):
if request.user.has_perm('documents.restore_document'):
return (DeletedListFilter,'published')
else:
return ['published',]
has_change_permission = apps.common.functions.has_change_permission
has_add_permission = apps.common.functions.has_add_permission
has_delete_permission = apps.common.functions.has_delete_permission
save_formset = apps.common.functions.save_formset
save_model = apps.common.functions.save_model
response_change = apps.common.functions.response_change
class BoardMeetingAudioAdmin(MPTTModelAdmin,GuardedModelAdmin):
inlines = [AudioFileInline,]
def get_formsets_with_inlines(self, request, obj=None):
for inline in self.get_inline_instances(request, obj):
# Remove delete fields is not superuser
if request.user.is_superuser or request.user.has_perm(inline.model._meta.model_name + '.' + get_permission_codename('restore',inline.model._meta)):
if not 'deleted' in inline.fields:
inline.fields.append('deleted')
else:
while 'deleted' in inline.fields:
inline.fields.remove('deleted')
yield inline.get_formset(request, obj), inline
def get_fields(self, request, obj=None):
fields = ['title',['update_user','update_date',],['create_user','create_date',],]
if request.user.is_superuser:
fields += ['published','searchable','parent']
if obj:
fields += ['url']
return fields
def get_readonly_fields(self, request, obj=None):
fields = ['title','update_user','update_date','create_user','create_date',]
if request.user.is_superuser:
fields.remove('title')
if obj:
fields += ['url']
return fields
def get_list_display(self,request):
if request.user.has_perm('documents.restore_document'):
return ['title','update_date','update_user','published','deleted']
else:
return ['title','update_date','update_user','published']
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm('documents.restore_document'):
return qs
return qs.filter(deleted=0)
def get_actions(self, request):
actions = super().get_actions(request)
if 'delete_selected' in actions:
del actions['delete_selected']
if request.user.has_perm('documents.trash_document'):
actions['trash_selected'] = (trash_selected,'trash_selected',trash_selected.short_description)
if request.user.has_perm('documents.restore_document'):
actions['restore_selected'] = (restore_selected,'restore_selected',restore_selected.short_description)
if request.user.has_perm('documents.change_document'):
actions['publish_selected'] = (publish_selected, 'publish_selected', publish_selected.short_description)
actions['unpublish_selected'] = (unpublish_selected, 'unpublish_selected', unpublish_selected.short_description)
return actions
def get_list_filter(self, request):
if request.user.has_perm('documents.restore_document'):
return (DeletedListFilter,'published')
else:
return ['published',]
has_change_permission = apps.common.functions.has_change_permission
has_add_permission = apps.common.functions.has_add_permission
has_delete_permission = apps.common.functions.has_delete_permission
save_formset = apps.common.functions.save_formset
save_model = apps.common.functions.save_model
response_change = apps.common.functions.response_change
class BoardMeetingVideoAdmin(MPTTModelAdmin,GuardedModelAdmin):
inlines = [VideoFileInline,]
def get_formsets_with_inlines(self, request, obj=None):
for inline in self.get_inline_instances(request, obj):
# Remove delete fields is not superuser
if request.user.is_superuser or request.user.has_perm(inline.model._meta.model_name + '.' + get_permission_codename('restore',inline.model._meta)):
if not 'deleted' in inline.fields:
inline.fields.append('deleted')
else:
while 'deleted' in inline.fields:
inline.fields.remove('deleted')
yield inline.get_formset(request, obj), inline
def get_fields(self, request, obj=None):
fields = ['title',['update_user','update_date',],['create_user','create_date',],]
if request.user.is_superuser:
fields += ['published','searchable','parent']
if obj:
fields += ['url']
return fields
def get_readonly_fields(self, request, obj=None):
fields = ['title','update_user','update_date','create_user','create_date',]
if request.user.is_superuser:
fields.remove('title')
if obj:
fields += ['url']
return fields
def get_list_display(self,request):
if request.user.has_perm('documents.restore_document'):
return ['title','update_date','update_user','published','deleted']
else:
return ['title','update_date','update_user','published']
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm('documents.restore_document'):
return qs
return qs.filter(deleted=0)
def get_actions(self, request):
actions = super().get_actions(request)
if 'delete_selected' in actions:
del actions['delete_selected']
if request.user.has_perm('documents.trash_document'):
actions['trash_selected'] = (trash_selected,'trash_selected',trash_selected.short_description)
if request.user.has_perm('documents.restore_document'):
actions['restore_selected'] = (restore_selected,'restore_selected',restore_selected.short_description)
if request.user.has_perm('documents.change_document'):
actions['publish_selected'] = (publish_selected, 'publish_selected', publish_selected.short_description)
actions['unpublish_selected'] = (unpublish_selected, 'unpublish_selected', unpublish_selected.short_description)
return actions
def get_list_filter(self, request):
if request.user.has_perm('documents.restore_document'):
return (DeletedListFilter,'published')
else:
return ['published',]
has_change_permission = apps.common.functions.has_change_permission
has_add_permission = apps.common.functions.has_add_permission
has_delete_permission = apps.common.functions.has_delete_permission
save_formset = apps.common.functions.save_formset
save_model = apps.common.functions.save_model
response_change = apps.common.functions.response_change
class BoardMeetingExhibitAdmin(MPTTModelAdmin,GuardedModelAdmin):
inlines = [FileInline,]
def get_formsets_with_inlines(self, request, obj=None):
for inline in self.get_inline_instances(request, obj):
# Remove delete fields is not superuser
if request.user.is_superuser or request.user.has_perm(inline.model._meta.model_name + '.' + get_permission_codename('restore',inline.model._meta)):
if not 'deleted' in inline.fields:
inline.fields.append('deleted')
else:
while 'deleted' in inline.fields:
inline.fields.remove('deleted')
yield inline.get_formset(request, obj), inline
def get_fields(self, request, obj=None):
fields = ['title',['update_user','update_date',],['create_user','create_date',],]
if request.user.is_superuser:
fields += ['published','searchable','parent']
if obj:
fields += ['url']
return fields
def get_readonly_fields(self, request, obj=None):
fields = ['title','update_user','update_date','create_user','create_date',]
if request.user.is_superuser:
fields.remove('title')
if obj:
fields += ['url']
return fields
def get_list_display(self,request):
if request.user.has_perm('documents.restore_document'):
return ['title','update_date','update_user','published','deleted']
else:
return ['title','update_date','update_user','published']
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm('documents.restore_document'):
return qs
return qs.filter(deleted=0)
def get_actions(self, request):
actions = super().get_actions(request)
if 'delete_selected' in actions:
del actions['delete_selected']
if request.user.has_perm('documents.trash_document'):
actions['trash_selected'] = (trash_selected,'trash_selected',trash_selected.short_description)
if request.user.has_perm('documents.restore_document'):
actions['restore_selected'] = (restore_selected,'restore_selected',restore_selected.short_description)
if request.user.has_perm('documents.change_document'):
actions['publish_selected'] = (publish_selected, 'publish_selected', publish_selected.short_description)
actions['unpublish_selected'] = (unpublish_selected, 'unpublish_selected', unpublish_selected.short_description)
return actions
def get_list_filter(self, request):
if request.user.has_perm('documents.restore_document'):
return (DeletedListFilter,'published')
else:
return ['published',]
has_change_permission = apps.common.functions.has_change_permission
has_add_permission = apps.common.functions.has_add_permission
has_delete_permission = apps.common.functions.has_delete_permission
save_formset = apps.common.functions.save_formset
save_model = apps.common.functions.save_model
response_change = apps.common.functions.response_change
class BoardMeetingAgendaItemAdmin(MPTTModelAdmin,GuardedModelAdmin):
inlines = [FileInline,]
def get_formsets_with_inlines(self, request, obj=None):
for inline in self.get_inline_instances(request, obj):
# Remove delete fields is not superuser
if request.user.is_superuser or request.user.has_perm(inline.model._meta.model_name + '.' + get_permission_codename('restore',inline.model._meta)):
if not 'deleted' in inline.fields:
inline.fields.append('deleted')
else:
while 'deleted' in inline.fields:
inline.fields.remove('deleted')
yield inline.get_formset(request, obj), inline
def get_fields(self, request, obj=None):
fields = ['title',['update_user','update_date',],['create_user','create_date',],]
if request.user.is_superuser:
fields += ['published','searchable','parent']
if obj:
fields += ['url']
return fields
def get_readonly_fields(self, request, obj=None):
fields = ['title','update_user','update_date','create_user','create_date',]
if request.user.is_superuser:
fields.remove('title')
if obj:
fields += ['url']
return fields
def get_list_display(self,request):
if request.user.has_perm('documents.restore_document'):
return ['title','update_date','update_user','published','deleted']
else:
return ['title','update_date','update_user','published']
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm('documents.restore_document'):
return qs
return qs.filter(deleted=0)
def get_actions(self, request):
actions = super().get_actions(request)
if 'delete_selected' in actions:
del actions['delete_selected']
if request.user.has_perm('documents.trash_document'):
actions['trash_selected'] = (trash_selected,'trash_selected',trash_selected.short_description)
if request.user.has_perm('documents.restore_document'):
actions['restore_selected'] = (restore_selected,'restore_selected',restore_selected.short_description)
if request.user.has_perm('documents.change_document'):
actions['publish_selected'] = (publish_selected, 'publish_selected', publish_selected.short_description)
actions['unpublish_selected'] = (unpublish_selected, 'unpublish_selected', unpublish_selected.short_description)
return actions
def get_list_filter(self, request):
if request.user.has_perm('documents.restore_document'):
return (DeletedListFilter,'published')
else:
return ['published',]
has_change_permission = apps.common.functions.has_change_permission
has_add_permission = apps.common.functions.has_add_permission
has_delete_permission = apps.common.functions.has_delete_permission
save_formset = apps.common.functions.save_formset
save_model = apps.common.functions.save_model
response_change = apps.common.functions.response_change
class FAQAdmin(MPTTModelAdmin,GuardedModelAdmin):
inlines = [ActionButtonInline,ResourceLinkInline]
def get_formsets_with_inlines(self, request, obj=None):
for inline in self.get_inline_instances(request, obj):
# Remove delete fields is not superuser
if request.user.is_superuser or request.user.has_perm(inline.model._meta.model_name + '.' + get_permission_codename('restore',inline.model._meta)):
if not 'deleted' in inline.fields:
inline.fields.append('deleted')
else:
while 'deleted' in inline.fields:
inline.fields.remove('deleted')
yield inline.get_formset(request, obj), inline
def get_fields(self, request, obj=None):
fields = ['question','answer',['update_user','update_date',],['create_user','create_date',],]
if request.user.is_superuser:
fields += ['published','searchable','parent']
if obj:
fields += ['url']
return fields
def get_readonly_fields(self, request, obj=None):
fields = ['update_user','update_date','create_user','create_date',]
if request.user.is_superuser:
if obj:
fields += ['url']
return fields
def get_list_display(self,request):
if request.user.has_perm('documents.restore_document'):
return ['question','update_date','update_user','published','deleted']
else:
return ['question','update_date','update_user','published']
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm('documents.restore_document'):
return qs
return qs.filter(deleted=0)
def get_actions(self, request):
actions = super().get_actions(request)
if 'delete_selected' in actions:
del actions['delete_selected']
if request.user.has_perm('documents.trash_document'):
actions['trash_selected'] = (trash_selected,'trash_selected',trash_selected.short_description)
if request.user.has_perm('documents.restore_document'):
actions['restore_selected'] = (restore_selected,'restore_selected',restore_selected.short_description)
if request.user.has_perm('documents.change_document'):
actions['publish_selected'] = (publish_selected, 'publish_selected', publish_selected.short_description)
actions['unpublish_selected'] = (unpublish_selected, 'unpublish_selected', unpublish_selected.short_description)
return actions
def get_list_filter(self, request):
if request.user.has_perm('documents.restore_document'):
return (DeletedListFilter,'published')
else:
return ['published',]
has_change_permission = apps.common.functions.has_change_permission
has_add_permission = apps.common.functions.has_add_permission
has_delete_permission = apps.common.functions.has_delete_permission
save_formset = apps.common.functions.save_formset
save_model = apps.common.functions.save_model
response_change = apps.common.functions.response_change
class DistrictCalendarYearAdmin(MPTTModelAdmin,GuardedModelAdmin):
inlines = [DistrictCalendarEventInline,ResourceLinkInline, DocumentInline, ]
def get_inline_instances(self, request, obj=None):
inline_instances = []
inlines = self.inlines
if apps.common.functions.is_globaladmin(request):
if not PageEditorInline in inlines:
inlines.append(PageEditorInline)
else:
if PageEditorInline in inlines:
inlines.remove(PageEditorInline)
for inline_class in inlines:
inline = inline_class(self.model, self.admin_site)
if request:
if not (inline.has_add_permission(request) or
inline.has_change_permission(request, obj) or
inline.has_delete_permission(request, obj)):
continue
if not inline.has_add_permission(request):
inline.max_num = 0
inline_instances.append(inline)
return inline_instances
def get_formsets_with_inlines(self, request, obj=None):
for inline in self.get_inline_instances(request, obj):
# Remove delete fields is not superuser
if request.user.is_superuser or request.user.has_perm(inline.model._meta.model_name + '.' + get_permission_codename('restore',inline.model._meta)):
if not 'deleted' in inline.fields:
inline.fields.append('deleted')
else:
while 'deleted' in inline.fields:
inline.fields.remove('deleted')
yield inline.get_formset(request, obj), inline
def get_fields(self, request, obj=None):
fields = ['title',['update_user','update_date',],['create_user','create_date',],]
if request.user.is_superuser:
fields += ['published','searchable','parent']
if obj:
fields += ['url']
return fields
def get_readonly_fields(self, request, obj=None):
fields = ['title','update_user','update_date','create_user','create_date',]
if request.user.is_superuser:
if obj:
fields += ['url']
return fields
def get_list_display(self,request):
if request.user.has_perm('documents.restore_document'):
return ['title','update_date','update_user','published','deleted']
else:
return ['title','update_date','update_user','published']
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm('documents.restore_document'):
return qs
return qs.filter(deleted=0)
def get_actions(self, request):
actions = super().get_actions(request)
if 'delete_selected' in actions:
del actions['delete_selected']
if request.user.has_perm('documents.trash_document'):
actions['trash_selected'] = (trash_selected,'trash_selected',trash_selected.short_description)
if request.user.has_perm('documents.restore_document'):
actions['restore_selected'] = (restore_selected,'restore_selected',restore_selected.short_description)
if request.user.has_perm('documents.change_document'):
actions['publish_selected'] = (publish_selected, 'publish_selected', publish_selected.short_description)
actions['unpublish_selected'] = (unpublish_selected, 'unpublish_selected', unpublish_selected.short_description)
return actions
def get_list_filter(self, request):
if request.user.has_perm('documents.restore_document'):
return (DeletedListFilter,'published')
else:
return ['published',]
has_change_permission = apps.common.functions.has_change_permission
has_add_permission = apps.common.functions.has_add_permission
has_delete_permission = apps.common.functions.has_delete_permission
save_formset = apps.common.functions.save_formset
save_model = apps.common.functions.save_model
response_change = apps.common.functions.response_change
class DistrictCalendarEventAdmin(MPTTModelAdmin,GuardedModelAdmin):
inlines = []
def get_formsets_with_inlines(self, request, obj=None):
for inline in self.get_inline_instances(request, obj):
# Remove delete fields is not superuser
if request.user.is_superuser or request.user.has_perm(inline.model._meta.model_name + '.' + get_permission_codename('restore',inline.model._meta)):
if not 'deleted' in inline.fields:
inline.fields.append('deleted')
else:
while 'deleted' in inline.fields:
inline.fields.remove('deleted')
yield inline.get_formset(request, obj), inline
def get_fields(self, request, obj=None):
fields = ['event_name','event_category','startdate','enddate','building_location','non_district_location','non_district_location_google_place','cancelled',['update_user','update_date',],['create_user','create_date',],]
if request.user.is_superuser:
fields += ['published','searchable','parent']
if obj:
fields += ['url']
return fields
def get_readonly_fields(self, request, obj=None):
fields = ['update_user','update_date','create_user','create_date',]
if request.user.is_superuser:
if obj:
fields += ['url']
return fields
def get_list_display(self,request):
if request.user.has_perm('documents.restore_document'):
return ['event_name','event_category','startdate','enddate','update_date','update_user','published','deleted']
else:
return ['event_name','event_category','startdate','enddate','update_date','update_user','published']
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm('documents.restore_document'):
return qs
return qs.filter(deleted=0)
def get_actions(self, request):
actions = super().get_actions(request)
if 'delete_selected' in actions:
del actions['delete_selected']
if request.user.has_perm('documents.trash_document'):
actions['trash_selected'] = (trash_selected,'trash_selected',trash_selected.short_description)
if request.user.has_perm('documents.restore_document'):
actions['restore_selected'] = (restore_selected,'restore_selected',restore_selected.short_description)
if request.user.has_perm('documents.change_document'):
actions['publish_selected'] = (publish_selected, 'publish_selected', publish_selected.short_description)
actions['unpublish_selected'] = (unpublish_selected, 'unpublish_selected', unpublish_selected.short_description)
return actions
def get_list_filter(self, request):
if request.user.has_perm('documents.restore_document'):
return (DeletedListFilter,'published')
else:
return ['published',]
has_change_permission = apps.common.functions.has_change_permission
has_add_permission = apps.common.functions.has_add_permission
has_delete_permission = apps.common.functions.has_delete_permission
save_formset = apps.common.functions.save_formset
save_model = apps.common.functions.save_model
response_change = apps.common.functions.response_change
class DistrictLogoAdmin(MPTTModelAdmin,GuardedModelAdmin):
inlines = [ThumbnailInline,DistrictLogoGIFInline,DistrictLogoJPGInline,DistrictLogoPNGInline,DistrictLogoTIFInline,]
def get_formsets_with_inlines(self, request, obj=None):
for inline in self.get_inline_instances(request, obj):
# Remove delete fields is not superuser
if request.user.is_superuser or request.user.has_perm(inline.model._meta.model_name + '.' + get_permission_codename('restore',inline.model._meta)):
if not 'deleted' in inline.fields:
inline.fields.append('deleted')
else:
while 'deleted' in inline.fields:
inline.fields.remove('deleted')
yield inline.get_formset(request, obj), inline
def get_fields(self, request, obj=None):
fields = ['district_logo_group','district_logo_style_variation',['update_user','update_date',],['create_user','create_date',],]
if request.user.is_superuser:
fields += ['published','searchable','parent']
if obj:
fields += ['url']
return fields
def get_readonly_fields(self, request, obj=None):
fields = ['district_logo_group','district_logo_style_variation','update_user','update_date','create_user','create_date',]
if request.user.is_superuser:
if obj:
fields += ['url']
return fields
def get_list_display(self,request):
if request.user.has_perm('documents.restore_document'):
return ['event_name','event_category','startdate','enddate','update_date','update_user','published','deleted']
else:
return ['event_name','event_category','startdate','enddate','update_date','update_user','published']
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm('documents.restore_document'):
return qs
return qs.filter(deleted=0)
def get_actions(self, request):
actions = super().get_actions(request)
if 'delete_selected' in actions:
del actions['delete_selected']
if request.user.has_perm('documents.trash_document'):
actions['trash_selected'] = (trash_selected,'trash_selected',trash_selected.short_description)
if request.user.has_perm('documents.restore_document'):
actions['restore_selected'] = (restore_selected,'restore_selected',restore_selected.short_description)
if request.user.has_perm('documents.change_document'):
actions['publish_selected'] = (publish_selected, 'publish_selected', publish_selected.short_description)
actions['unpublish_selected'] = (unpublish_selected, 'unpublish_selected', unpublish_selected.short_description)
return actions
def get_list_filter(self, request):
if request.user.has_perm('documents.restore_document'):
return (DeletedListFilter, 'published')
else:
return ['published', ]
has_change_permission = apps.common.functions.has_change_permission
has_add_permission = apps.common.functions.has_add_permission
has_delete_permission = apps.common.functions.has_delete_permission
save_formset = apps.common.functions.save_formset
save_model = apps.common.functions.save_model
response_change = apps.common.functions.response_change
class PhotoGalleryAdmin(MPTTModelAdmin,GuardedModelAdmin):
inlines = [PhotoGalleryImageInline, ]
def get_formsets_with_inlines(self, request, obj=None):
for inline in self.get_inline_instances(request, obj):
# Remove delete fields is not superuser
if request.user.is_superuser or request.user.has_perm(inline.model._meta.model_name + '.' + get_permission_codename('restore',inline.model._meta)):
if not 'deleted' in inline.fields:
inline.fields.append('deleted')
else:
while 'deleted' in inline.fields:
inline.fields.remove('deleted')
yield inline.get_formset(request, obj), inline
def get_fields(self, request, obj=None):
fields = ['title',['update_user','update_date',],['create_user','create_date',],]
if request.user.is_superuser:
fields += ['published', 'searchable', 'parent']
if obj:
fields += ['url']
return fields
def get_readonly_fields(self, request, obj=None):
fields = ['title','update_user','update_date','create_user','create_date',]
if request.user.is_superuser:
fields.remove('title')
if obj:
fields += ['url']
return fields
def get_list_display(self,request):
if request.user.has_perm('documents.restore_document'):
return ['title','update_date','update_user','published','deleted']
else:
return ['title','update_date','update_user','published']
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm('documents.restore_document'):
return qs
return qs.filter(deleted=0)
def get_actions(self, request):
actions = super().get_actions(request)
if 'delete_selected' in actions:
del actions['delete_selected']
if request.user.has_perm('documents.trash_document'):
actions['trash_selected'] = (trash_selected,'trash_selected',trash_selected.short_description)
if request.user.has_perm('documents.restore_document'):
actions['restore_selected'] = (restore_selected,'restore_selected',restore_selected.short_description)
if request.user.has_perm('documents.change_document'):
actions['publish_selected'] = (publish_selected, 'publish_selected', publish_selected.short_description)
actions['unpublish_selected'] = (unpublish_selected, 'unpublish_selected', unpublish_selected.short_description)
return actions
def get_list_filter(self, request):
if request.user.has_perm('documents.restore_document'):
return (DeletedListFilter, 'published')
else:
return ['published', ]
has_change_permission = apps.common.functions.has_change_permission
has_add_permission = apps.common.functions.has_add_permission
has_delete_permission = apps.common.functions.has_delete_permission
save_formset = apps.common.functions.save_formset
save_model = apps.common.functions.save_model
response_change = apps.common.functions.response_change
class AnnouncementAdmin(
MPTTModelAdmin,
GuardedModelAdmin,
):
# inlines = [PhotoGalleryImageInline, ]
def get_formsets_with_inlines(self, request, obj=None):
for inline in self.get_inline_instances(request, obj):
# Remove delete fields is not superuser
if request.user.is_superuser or request.user.has_perm(inline.model._meta.model_name + '.' + get_permission_codename('restore',inline.model._meta)):
if not 'deleted' in inline.fields:
inline.fields.append('deleted')
else:
while 'deleted' in inline.fields:
inline.fields.remove('deleted')
yield inline.get_formset(request, obj), inline
def get_fields(self, request, obj=None):
fields = ['title', 'body', ['update_user','update_date',],['create_user','create_date',],]
if request.user.is_superuser:
fields += ['published', 'searchable', 'parent']
if obj:
fields += ['url']
return fields
def get_readonly_fields(self, request, obj=None):
fields = ['title','update_user','update_date','create_user','create_date',]
if request.user.is_superuser:
fields.remove('title')
if obj:
fields += ['url']
return fields
def get_list_display(self,request):
if request.user.has_perm('documents.restore_document'):
return ['title', 'update_date','update_user','published','deleted']
else:
return ['title', 'update_date','update_user','published']
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm('announcement.restore_document'):
return qs
return qs.filter(deleted=0)
def get_actions(self, request):
actions = super().get_actions(request)
if 'delete_selected' in actions:
del actions['delete_selected']
if request.user.has_perm('announcement.trash_document'):
actions['trash_selected'] = (trash_selected,'trash_selected',trash_selected.short_description)
if request.user.has_perm('announcement.restore_document'):
actions['restore_selected'] = (restore_selected,'restore_selected',restore_selected.short_description)
if request.user.has_perm('announcement.change_document'):
actions['publish_selected'] = (publish_selected, 'publish_selected', publish_selected.short_description)
actions['unpublish_selected'] = (unpublish_selected, 'unpublish_selected', unpublish_selected.short_description)
return actions
def get_list_filter(self, request):
if request.user.has_perm('announcement.restore_document'):
return (DeletedListFilter, 'published')
else:
return ['published', ]
has_change_permission = apps.common.functions.has_change_permission
has_add_permission = apps.common.functions.has_add_permission
has_delete_permission = apps.common.functions.has_delete_permission
save_formset = apps.common.functions.save_formset
save_model = apps.common.functions.save_model
response_change = apps.common.functions.response_change
class SchoolFacultyAdmin(
MPTTModelAdmin,
GuardedModelAdmin,
):
inlines = [DisclosureDocumentInline, ClassWebsiteInline, ]
def get_inline_instances(self, request, obj=None):
inline_instances = []
inlines = self.inlines
if apps.common.functions.is_globaladmin(request):
if not PageEditorInline in inlines:
inlines.append(PageEditorInline)
else:
if PageEditorInline in inlines:
inlines.remove(PageEditorInline)
for inline_class in inlines:
inline = inline_class(self.model, self.admin_site)
if request:
if not (inline.has_add_permission(request) or
inline.has_change_permission(request, obj) or
inline.has_delete_permission(request, obj)):
continue
if not inline.has_add_permission(request):
inline.max_num = 0
inline_instances.append(inline)
return inline_instances
def get_formsets_with_inlines(self, request, obj=None):
for inline in self.get_inline_instances(request, obj):
# Remove delete fields is not superuser
if request.user.is_superuser or request.user.has_perm(inline.model._meta.model_name + '.' + get_permission_codename('restore',inline.model._meta)):
if not 'deleted' in inline.fields:
inline.fields.append('deleted')
else:
while 'deleted' in inline.fields:
inline.fields.remove('deleted')
yield inline.get_formset(request, obj), inline
def get_fields(self, request, obj=None):
fields = ['title', 'body', ['update_user','update_date',],['create_user','create_date',],]
if request.user.is_superuser:
fields += ['published', 'searchable', 'parent']
if obj:
fields += ['url']
return fields
def get_readonly_fields(self, request, obj=None):
fields = ['title','update_user','update_date','create_user','create_date',]
if request.user.is_superuser:
fields.remove('title')
if obj:
fields += ['url']
return fields
def get_list_display(self,request):
if request.user.has_perm('documents.restore_document'):
return ['title', 'update_date','update_user','published','deleted']
else:
return ['title', 'update_date','update_user','published']
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm('schoolfaculty.restore_document'):
return qs
return qs.filter(deleted=0)
def get_actions(self, request):
actions = super().get_actions(request)
if 'delete_selected' in actions:
del actions['delete_selected']
if request.user.has_perm('schoolfaculty.trash_document'):
actions['trash_selected'] = (trash_selected,'trash_selected',trash_selected.short_description)
if request.user.has_perm('schoolfaculty.restore_document'):
actions['restore_selected'] = (restore_selected,'restore_selected',restore_selected.short_description)
if request.user.has_perm('schoolfaculty.change_document'):
actions['publish_selected'] = (publish_selected, 'publish_selected', publish_selected.short_description)
actions['unpublish_selected'] = (unpublish_selected, 'unpublish_selected', unpublish_selected.short_description)
return actions
def get_list_filter(self, request):
if request.user.has_perm('schoolfaculty.restore_document'):
return (DeletedListFilter, 'published')
else:
return ['published', ]
has_change_permission = apps.common.functions.has_change_permission
has_add_permission = apps.common.functions.has_add_permission
has_delete_permission = apps.common.functions.has_delete_permission
save_formset = apps.common.functions.save_formset
save_model = apps.common.functions.save_model
response_change = apps.common.functions.response_change
class DisclosureDocumentAdmin(MPTTModelAdmin, GuardedModelAdmin):
inlines = [FileInline, ]
def get_formsets_with_inlines(self, request, obj=None):
for inline in self.get_inline_instances(request, obj):
# Remove delete fields is not superuser
if request.user.is_superuser or request.user.has_perm(
inline.model._meta.model_name + '.' + get_permission_codename('restore', inline.model._meta)):
if not 'deleted' in inline.fields:
inline.fields.append('deleted')
else:
while 'deleted' in inline.fields:
inline.fields.remove('deleted')
yield inline.get_formset(request, obj), inline
def get_fields(self, request, obj=None):
fields = ['title', ['update_user', 'update_date', ], ['create_user', 'create_date', ], ]
if request.user.is_superuser:
fields += ['published', 'searchable', 'parent', ]
if obj:
fields += ['url']
return fields
def get_readonly_fields(self, request, obj=None):
fields = ['title', 'update_user', 'update_date', 'create_user', 'create_date', ]
if request.user.is_superuser:
fields.remove('title')
if obj:
fields += ['url']
return fields
def get_list_display(self, request):
if request.user.has_perm('documents.restore_disclosuredocument'):
return ['title', 'update_date', 'update_user', 'published', 'deleted']
else:
return ['title', 'update_date', 'update_user', 'published']
# ordering = ('url',)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm('documents.restore_disclosuredocument'):
return qs
return qs.filter(deleted=0)
def get_actions(self, request):
actions = super().get_actions(request)
if 'delete_selected' in actions:
del actions['delete_selected']
if request.user.has_perm('documents.trash_disclosuredocument'):
actions['trash_selected'] = (trash_selected, 'trash_selected', trash_selected.short_description)
if request.user.has_perm('documents.restore_disclosuredocument'):
actions['restore_selected'] = (restore_selected, 'restore_selected', restore_selected.short_description)
if request.user.has_perm('documents.change_disclosuredocument'):
actions['publish_selected'] = (publish_selected, 'publish_selected', publish_selected.short_description)
actions['unpublish_selected'] = (
unpublish_selected, 'unpublish_selected', unpublish_selected.short_description)
return actions
def get_list_filter(self, request):
if request.user.has_perm('documents.restore_disclosuredocument'):
return (DeletedListFilter, 'published')
else:
return ['published', ]
has_change_permission = apps.common.functions.has_change_permission
has_add_permission = apps.common.functions.has_add_permission
has_delete_permission = apps.common.functions.has_delete_permission
save_formset = apps.common.functions.save_formset
save_model = apps.common.functions.save_model
response_change = apps.common.functions.response_change
class SchoolCommunityCouncilMeetingAgendaAdmin(
MPTTModelAdmin,
GuardedModelAdmin,
):
inlines = [FileInline, ]
def get_formsets_with_inlines(self, request, obj=None):
for inline in self.get_inline_instances(request, obj):
# Remove delete fields is not superuser
if request.user.is_superuser or request.user.has_perm(
inline.model._meta.model_name + '.' + get_permission_codename('restore', inline.model._meta)):
if not 'deleted' in inline.fields:
inline.fields.append('deleted')
else:
while 'deleted' in inline.fields:
inline.fields.remove('deleted')
yield inline.get_formset(request, obj), inline
def get_fields(self, request, obj=None):
fields = ['title', ['update_user', 'update_date', ], ['create_user', 'create_date', ], ]
if request.user.is_superuser:
fields += ['published', 'searchable', 'parent', ]
if obj:
fields += ['url']
return fields
def get_readonly_fields(self, request, obj=None):
fields = ['title', 'update_user', 'update_date', 'create_user', 'create_date', ]
if request.user.is_superuser:
fields.remove('title')
if obj:
fields += ['url']
return fields
def get_list_display(self, request):
if request.user.has_perm('documents.restore_schoolcommunitycouncilmeetingagenda'):
return ['title', 'update_date', 'update_user', 'published', 'deleted']
else:
return ['title', 'update_date', 'update_user', 'published']
# ordering = ('url',)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm('documents.restore_schoolcommunitycouncilmeetingagenda'):
return qs
return qs.filter(deleted=0)
def get_actions(self, request):
actions = super().get_actions(request)
if 'delete_selected' in actions:
del actions['delete_selected']
if request.user.has_perm('documents.trash_schoolcommunitycouncilmeetingagenda'):
actions['trash_selected'] = (trash_selected, 'trash_selected', trash_selected.short_description)
if request.user.has_perm('documents.restore_schoolcommunitycouncilmeetingagenda'):
actions['restore_selected'] = (restore_selected, 'restore_selected', restore_selected.short_description)
if request.user.has_perm('documents.change_schoolcommunitycouncilmeetingagenda'):
actions['publish_selected'] = (publish_selected, 'publish_selected', publish_selected.short_description)
actions['unpublish_selected'] = (
unpublish_selected, 'unpublish_selected', unpublish_selected.short_description)
return actions
def get_list_filter(self, request):
if request.user.has_perm('documents.restore_schoolcommunitycouncilmeetingagenda'):
return (DeletedListFilter, 'published')
else:
return ['published', ]
has_change_permission = apps.common.functions.has_change_permission
has_add_permission = apps.common.functions.has_add_permission
has_delete_permission = apps.common.functions.has_delete_permission
save_formset = apps.common.functions.save_formset
save_model = apps.common.functions.save_model
response_change = apps.common.functions.response_change
class SchoolCommunityCouncilMeetingMinutesAdmin(
MPTTModelAdmin,
GuardedModelAdmin,
):
inlines = [FileInline, ]
def get_formsets_with_inlines(self, request, obj=None):
for inline in self.get_inline_instances(request, obj):
# Remove delete fields is not superuser
if request.user.is_superuser or request.user.has_perm(
inline.model._meta.model_name + '.' + get_permission_codename('restore', inline.model._meta)):
if not 'deleted' in inline.fields:
inline.fields.append('deleted')
else:
while 'deleted' in inline.fields:
inline.fields.remove('deleted')
yield inline.get_formset(request, obj), inline
def get_fields(self, request, obj=None):
fields = ['title', ['update_user', 'update_date', ], ['create_user', 'create_date', ], ]
if request.user.is_superuser:
fields += ['published', 'searchable', 'parent', ]
if obj:
fields += ['url']
return fields
def get_readonly_fields(self, request, obj=None):
fields = ['title', 'update_user', 'update_date', 'create_user', 'create_date', ]
if request.user.is_superuser:
fields.remove('title')
if obj:
fields += ['url']
return fields
def get_list_display(self, request):
if request.user.has_perm('documents.restore_schoolcommunitycouncilmeetingminutes'):
return ['title', 'update_date', 'update_user', 'published', 'deleted']
else:
return ['title', 'update_date', 'update_user', 'published']
# ordering = ('url',)
def get_queryset(self, request):
qs = super().get_queryset(request)
if request.user.is_superuser:
return qs
if request.user.has_perm('documents.restore_schoolcommunitycouncilmeetingminutes'):
return qs
return qs.filter(deleted=0)
def get_actions(self, request):
actions = super().get_actions(request)
if 'delete_selected' in actions:
del actions['delete_selected']
if request.user.has_perm('documents.trash_schoolcommunitycouncilmeetingminutes'):
actions['trash_selected'] = (trash_selected, 'trash_selected', trash_selected.short_description)
if request.user.has_perm('documents.restore_schoolcommunitycouncilmeetingminutes'):
actions['restore_selected'] = (restore_selected, 'restore_selected', restore_selected.short_description)
if request.user.has_perm('documents.change_schoolcommunitycouncilmeetingminutes'):
actions['publish_selected'] = (publish_selected, 'publish_selected', publish_selected.short_description)
actions['unpublish_selected'] = (
unpublish_selected, 'unpublish_selected', unpublish_selected.short_description)
return actions
def get_list_filter(self, request):
if request.user.has_perm('documents.restore_schoolcommunitycouncilmeetingminutes'):
return (DeletedListFilter, 'published')
else:
return ['published', ]
has_change_permission = apps.common.functions.has_change_permission
has_add_permission = apps.common.functions.has_add_permission
has_delete_permission = apps.common.functions.has_delete_permission
save_formset = apps.common.functions.save_formset
save_model = apps.common.functions.save_model
response_change = apps.common.functions.response_change
admin.site.register(Page, PageAdmin)
admin.site.register(School, SchoolAdmin)
admin.site.register(Department, DepartmentAdmin)
admin.site.register(Board, BoardAdmin)
admin.site.register(News, NewsAdmin)
admin.site.register(NewsYear, NewsYearAdmin)
admin.site.register(SuperintendentMessage, SuperintendentMessageAdmin)
admin.site.register(SuperintendentMessageYear, SuperintendentMessageYearAdmin)
admin.site.register(Document, DocumentAdmin)
admin.site.register(BoardPolicy, BoardPolicyAdmin)
admin.site.register(Policy, PolicyAdmin)
admin.site.register(AdministrativeProcedure, AdministrativeProcedureAdmin)
admin.site.register(SupportingDocument, SupportingDocumentAdmin)
admin.site.register(BoardMeetingAgenda, BoardMeetingAgendaAdmin)
admin.site.register(BoardMeetingMinutes, BoardMeetingMinutesAdmin)
admin.site.register(BoardMeetingAudio, BoardMeetingAudioAdmin)
admin.site.register(BoardMeetingVideo, BoardMeetingVideoAdmin)
admin.site.register(BoardMeetingExhibit, BoardMeetingExhibitAdmin)
admin.site.register(BoardMeetingAgendaItem, BoardMeetingAgendaItemAdmin)
admin.site.register(SubPage, SubPageAdmin)
admin.site.register(StudentBoardMember, StudentBoardMemberAdmin)
admin.site.register(BoardSubPage, BoardSubPageAdmin)
admin.site.register(BoardMeeting, BoardMeetingAdmin)
admin.site.register(SchoolCommunityCouncilMeeting, SchoolCommunityCouncilMeetingAdmin)
admin.site.register(BoardMeetingYear, BoardMeetingYearAdmin)
admin.site.register(FAQ, FAQAdmin)
admin.site.register(DistrictCalendarYear, DistrictCalendarYearAdmin)
admin.site.register(DistrictCalendarEvent, DistrictCalendarEventAdmin)
admin.site.register(DistrictLogo, DistrictLogoAdmin)
admin.site.register(PhotoGallery, PhotoGalleryAdmin)
admin.site.register(Announcement, AnnouncementAdmin)
admin.site.register(SchoolFaculty, SchoolFacultyAdmin)
admin.site.register(DisclosureDocument, DisclosureDocumentAdmin)
admin.site.register(SchoolCommunityCouncilMeetingAgenda, SchoolCommunityCouncilMeetingAgendaAdmin)
admin.site.register(SchoolCommunityCouncilMeetingMinutes, SchoolCommunityCouncilMeetingMinutesAdmin)
admin.site.register(ProfilePicture)
| 36.070238 | 440 | 0.649177 | 22,538 | 212,093 | 5.856243 | 0.022495 | 0.03542 | 0.038413 | 0.059324 | 0.875663 | 0.847744 | 0.836425 | 0.830288 | 0.815892 | 0.809195 | 0 | 0.002 | 0.245548 | 212,093 | 5,879 | 441 | 36.076374 | 0.822853 | 0.009307 | 0 | 0.846611 | 0 | 0 | 0.130446 | 0.023817 | 0 | 0 | 0 | 0 | 0 | 1 | 0.074911 | false | 0.003369 | 0.006143 | 0 | 0.396552 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
984f00a27e946a1b356f57293c2f53ca89059c0f | 3,502 | py | Python | graphtheory/algorithms/matching.py | gitter-badger/graphs-dict | 2be1a5b140feb050eec799d6cadf6de5eef01745 | [
"BSD-3-Clause"
] | 36 | 2015-09-20T20:55:39.000Z | 2021-09-20T05:49:03.000Z | graphtheory/algorithms/matching.py | gitter-badger/graphs-dict | 2be1a5b140feb050eec799d6cadf6de5eef01745 | [
"BSD-3-Clause"
] | 6 | 2016-03-25T21:41:46.000Z | 2020-02-12T03:18:59.000Z | graphtheory/algorithms/matching.py | gitter-badger/graphs-dict | 2be1a5b140feb050eec799d6cadf6de5eef01745 | [
"BSD-3-Clause"
] | 9 | 2016-09-12T07:57:27.000Z | 2022-03-21T16:15:39.000Z | #!/usr/bin/python
try:
from Queue import PriorityQueue
except ImportError: # Python 3
from queue import PriorityQueue
from graphtheory.structures.edges import Edge
class MaximalMatching:
"""Find a maximal cardinality matching using a greedy method.
Attributes
----------
graph : input undirected graph
mate : dict with nodes (values are nodes or None)
cardinality : number
Notes
-----
Based on ideas from NetworkX library:
http://networkx.github.io/documentation/networkx-1.9.1/
_modules/networkx/algorithms/matching.html#maximal_matching
"""
def __init__(self, graph):
"""The algorithm initialization."""
if graph.is_directed():
raise ValueError("the graph is directed")
self.graph = graph
self.mate = dict((node, None) for node in self.graph.iternodes())
self.cardinality = 0
def run(self):
"""Executable pseudocode."""
for edge in self.graph.iteredges(): # O(E) time
if (self.mate[edge.source] is None and
self.mate[edge.target] is None):
self.mate[edge.source] = edge.target
self.mate[edge.target] = edge.source
self.cardinality += 1
class MaximalMatchingWithEdges:
"""Find a maximal cardinality matching using a greedy method.
Attributes
----------
graph : input undirected graph
mate : dict with nodes (values are edges or None)
cardinality : number
Notes
-----
Based on ideas from NetworkX library:
http://networkx.github.io/documentation/networkx-1.9.1/
_modules/networkx/algorithms/matching.html#maximal_matching
"""
def __init__(self, graph):
"""The algorithm initialization."""
if graph.is_directed():
raise ValueError("the graph is directed")
self.graph = graph
self.mate = dict((node, None) for node in self.graph.iternodes())
self.cardinality = 0
def run(self):
"""Executable pseudocode."""
for edge in self.graph.iteredges(): # O(E) time
if (self.mate[edge.source] is None and
self.mate[edge.target] is None):
self.mate[edge.source] = edge
self.mate[edge.target] = ~edge
self.cardinality += 1
class MinimumWeightMatchingWithEdges:
"""Find a minimum weight matching using a greedy method.
Attributes
----------
graph : input undirected graph
mate : dict with nodes (values are edges or None)
cardinality : number
"""
# Bedzie potrzebne do problemu chinskiego listonosza.
def __init__(self, graph):
"""The algorithm initialization."""
if graph.is_directed():
raise ValueError("the graph is directed")
self.graph = graph
self.mate = dict((node, None) for node in self.graph.iternodes())
self.cardinality = 0
self._pq = PriorityQueue()
def run(self):
"""Executable pseudocode."""
for edge in self.graph.iteredges():
self._pq.put((edge.weight, edge))
while not self._pq.empty():
_, edge = self._pq.get()
if (self.mate[edge.source] is None and
self.mate[edge.target] is None):
self.mate[edge.source] = edge
self.mate[edge.target] = ~edge
self.cardinality += 1
# EOF
| 30.719298 | 73 | 0.593661 | 398 | 3,502 | 5.163317 | 0.241206 | 0.058394 | 0.070073 | 0.052555 | 0.809246 | 0.79854 | 0.79854 | 0.79854 | 0.79854 | 0.79854 | 0 | 0.005291 | 0.298401 | 3,502 | 113 | 74 | 30.99115 | 0.831095 | 0.326385 | 0 | 0.72549 | 0 | 0 | 0.029099 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.117647 | false | 0 | 0.078431 | 0 | 0.254902 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
f68bc14feb463845efc83e4ea27b7f3c10fc80a8 | 51 | py | Python | src/tenzing/__init__.py | ieaves/tenzing | 92d39c1c3a5633d8074e0ffe8c2687c465aebbc8 | [
"MIT"
] | null | null | null | src/tenzing/__init__.py | ieaves/tenzing | 92d39c1c3a5633d8074e0ffe8c2687c465aebbc8 | [
"MIT"
] | null | null | null | src/tenzing/__init__.py | ieaves/tenzing | 92d39c1c3a5633d8074e0ffe8c2687c465aebbc8 | [
"MIT"
] | null | null | null | from tenzing import core
from tenzing import utils
| 17 | 25 | 0.843137 | 8 | 51 | 5.375 | 0.625 | 0.511628 | 0.790698 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.156863 | 51 | 2 | 26 | 25.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 7 |
f6a710eca40cb65692681537bee4451ee8871db5 | 1,388 | py | Python | write_grok/test.py | namedyangfan/Python_practice | 7f7394d82bb5afc13b039eec286b9485a775ae39 | [
"MIT"
] | null | null | null | write_grok/test.py | namedyangfan/Python_practice | 7f7394d82bb5afc13b039eec286b9485a775ae39 | [
"MIT"
] | null | null | null | write_grok/test.py | namedyangfan/Python_practice | 7f7394d82bb5afc13b039eec286b9485a775ae39 | [
"MIT"
] | null | null | null | import os
from write_grok import Write_grok
import glob
grok_directory = r"D:\ARB\HGS_Simulations\Sub_Assiniboine\steve_Jun\26-31-SARB_monthly_47764Nodes"
grok_name = "ARB_ASSN.grok"
target_times=[32875200.0, 35424000.0, 37972800.0, 40608000.0, 43243200.0, 45878400.0, 48513600.0, 51192000.0, 53827200.0, 56462400.0, 59097600.0, 61732800.0, 64411200.0, 66960000.0, 69508800.0, 72144000.0, 74779200.0, 77414400.0, 80049600.0, 82728000.0, 85363200.0, 87998400.0, 90633600.0, 93268800.0]
gr = Write_grok(grok_name=grok_name, grok_directory=grok_directory)
gr.add_gw_wells(inc_file_name="ARB_subassin_obs.inc",overwrite=True)
gr.add_target_output_times(out_times=[0.932688500E+008], target_times=target_times, overwrite=True)
grok_directory = r"D:\ARB\HGS_Simulations\Qu_Appelle\Steve_Jun_51250nodes\26-32-QRB_daily_51250Nodes"
grok_name = "ARB_QUAP.grok"
target_times=[32875200.0, 35424000.0, 37972800.0, 40608000.0, 43243200.0, 45878400.0, 48513600.0, 51192000.0, 53827200.0, 56462400.0, 59097600.0, 61732800.0, 64411200.0, 66960000.0, 69508800.0, 72144000.0, 74779200.0, 77414400.0, 80049600.0, 82728000.0, 85363200.0, 87998400.0, 90633600.0, 93268800.0]
gr = Write_grok(grok_name=grok_name, grok_directory=grok_directory)
gr.add_gw_wells(inc_file_name="obs_wells.inc",overwrite=True)
gr.add_target_output_times(out_times=[0.932688500E+008], target_times=target_times, overwrite=True)
| 69.4 | 301 | 0.804035 | 232 | 1,388 | 4.577586 | 0.306034 | 0.073446 | 0.045198 | 0.028249 | 0.817326 | 0.817326 | 0.817326 | 0.757062 | 0.757062 | 0.757062 | 0 | 0.37 | 0.063401 | 1,388 | 19 | 302 | 73.052632 | 0.446923 | 0 | 0 | 0.4 | 0 | 0 | 0.157174 | 0.114636 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.2 | 0 | 0.2 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 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 | 8 |
120d2cf9600c18509a5b1d6b43c999bc503d84ff | 539 | py | Python | PythonNotes/FixingProgrammingErrors/SyntaxErrors.py | minefarmer/PythonMega | 1b22f6648ca7a9711853aaa909558d49416d4fd7 | [
"Unlicense"
] | null | null | null | PythonNotes/FixingProgrammingErrors/SyntaxErrors.py | minefarmer/PythonMega | 1b22f6648ca7a9711853aaa909558d49416d4fd7 | [
"Unlicense"
] | null | null | null | PythonNotes/FixingProgrammingErrors/SyntaxErrors.py | minefarmer/PythonMega | 1b22f6648ca7a9711853aaa909558d49416d4fd7 | [
"Unlicense"
] | null | null | null | # Runtime errors
# print(1)
# int(9)
# int 9 # File "C:\Users\pgold\CarlsHub\PythonMega\class.py", line 3
# # int 9
# # ^^^^^
# print(2)
# print 3
print(1)
int(9)
int (999) # File "c:\Users\pgold\CarlsHub\PythonMega\class.py", line 16
# print 3
# ^^^^^^^
# SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
print(2)
print 3 # print 3
# ^^^^^^^
# SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| 24.5 | 87 | 0.534323 | 70 | 539 | 4.114286 | 0.4 | 0.055556 | 0.0625 | 0.069444 | 0.916667 | 0.743056 | 0.743056 | 0.743056 | 0.743056 | 0.4375 | 0 | 0.047493 | 0.296846 | 539 | 22 | 88 | 24.5 | 0.712401 | 0.756957 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0.6 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 7 |
1227284bab09c729ce9769d39d56e04effc0bda3 | 40,779 | py | Python | stochpy/modules/StochPyPlot.py | bgoli/stochpy | ba06e5eaf1204dbc8ea39996ff8a08e9b0b5997d | [
"BSD-3-Clause"
] | 35 | 2016-02-29T22:56:07.000Z | 2022-03-06T17:21:29.000Z | stochpy/modules/StochPyPlot.py | bgoli/stochpy | ba06e5eaf1204dbc8ea39996ff8a08e9b0b5997d | [
"BSD-3-Clause"
] | 6 | 2016-10-13T12:43:54.000Z | 2021-04-30T09:06:59.000Z | stochpy/modules/StochPyPlot.py | bgoli/stochpy | ba06e5eaf1204dbc8ea39996ff8a08e9b0b5997d | [
"BSD-3-Clause"
] | 13 | 2016-07-07T19:49:25.000Z | 2021-05-14T20:24:17.000Z | #! /usr/bin/env python
"""
StochPy plotting class
======================
Written by T.R. Maarleveld and M. Moinat, Amsterdam, The Netherlands
E-mail: tmd200@users.sourceforge.net
Last Change: August 05, 2015
"""
from __future__ import division, print_function, absolute_import
import stochpy
from . import Analysis
try:
import numpy as np
except ImportError:
print("Make sure that the NumPy module is installed")
print("This program does not work without NumPy")
print("See http://numpy.scipy.org/ for more information about NumPy")
sys.exit()
class PlottingFunctions():
def PlotSpeciesTimeSeries(self,n_events2plot = 10000,species2plot = True,linestyle = 'solid',linewidth = 1,marker = '',colors = None,title = '',xlabel='Time',ylabel='Copy Number',IsLegend=True,legend_location='upper right'):
"""
Plot time simulation output for each generated trajectory
Input:
- *n_events2plot* [default = 10000] (integer)
- *species2plot* [default = True] as a list ['S1','S2']
- *linestyle* [default = 'solid'] dashed, solid, and dash_dot (string)
- *linewidth* [default = 1] (float)
- *marker* [default = ''] ('v','o','s',',','*','.')
- *colors* [default = None] (list)
- *title* [default = ''] (string)
- *xlabel* [default = 'Time'] (string)
- *ylabel* [default = 'Copy Number'] (string)
- *IsLegend* [default = True] (boolean)
- *legend_location* [default = 'upper right'] (string/integer)
"""
assert stochpy._IsPlotting, "Install matplotlib or use Export2file()"
assert self._IsSimulationDone, "First do a stochastic simulation"
assert not self._IsOnlyLastTimepoint, "Plotting is disabled when saving only the last time point"
species2plot = self._getSpecies2Plot(species2plot)
if str(n_events2plot).lower() == 'all':
n_events2plot = self.data_stochsim.simulation_timesteps
for n in range(1,self.sim_trajectories_done+1):
if self.sim_trajectories_done > 1:
self.GetTrajectoryData(n)
self.plot.TimeSeries(self.data_stochsim.getSpecies(),n_events2plot,species2plot,self.data_stochsim.species_labels,n-1,linestyle,linewidth,marker,colors,title,xlabel,ylabel,IsLegend,legend_location) # Plot time sim
self.plot.plotnum+=1
def PlotPropensitiesTimeSeries(self,n_events2plot = 10000,rates2plot = True,linestyle = 'solid',linewidth = 1,marker = '',colors = None,title = '',xlabel='Time',ylabel='Propensity',IsLegend=True,legend_location='upper right'):
"""
Plot time simulation output for each generated trajectory
Input:
- *n_events2plot* [default = 10000] (integer)
- *rates2plot* [default = True]: species as a list ['S1','S2']
- *marker* [default = ''] ('v','o','s',',','*','.')
- *linestyle* [default = 'solid']: dashed, dotted, and solid (string)
- *linewidth* [default = 1] (float)
- *colors* [default = None] (list)
- *title* [default = ''] (string)
- *xlabel* [default = 'Time'] (string)
- *ylabel* [default = 'Propensity'] (string)
- *IsLegend* [default = True] (boolean)
- *legend_location* [default = 'upper right'] (string/integer)
"""
assert stochpy._IsPlotting, "Install matplotlib or use Export2file()"
assert self._IsSimulationDone and self._IsTrackPropensities, "First do a stochastic simulation with tracking propensities (use the IsTrackPropensities flag in DoStochSim)"
assert not self._IsOnlyLastTimepoint, "Plotting is disabled when saving only the last time point"
rates2plot = self._getRates2Plot(rates2plot)
if str(n_events2plot).lower() == 'all':
n_events2plot = self.data_stochsim.simulation_timesteps
for n in range(1,self.sim_trajectories_done+1):
if self.sim_trajectories_done > 1:
self.GetTrajectoryData(n)
self.plot.TimeSeries(self.data_stochsim.getPropensities(),n_events2plot,rates2plot,self.sim_rates_tracked,n-1,linestyle,linewidth,marker,colors,title,xlabel,ylabel,IsLegend,legend_location)
self.plot.plotnum+=1
def PlotSpeciesDistributions(self,species2plot = True, histtype = 'step',linestyle = 'solid',linewidth = 1,colors=None,title = '',xlabel='Copy number', ylabel='PMF',IsLegend=True,legend_location='upper right',bin_size=1,orientation='vertical'):
"""
Plots the PMF for each generated trajectory
Input:
- *species2plot* [default = True] as a list ['S1','S2']
- *histtype* [default = 'step'] (string) ['step','stepfilled','bar]
- *linestyle* [default = 'dotted'] (string)
- *linewidth* [default = 1] (float)
- *colors* (list)
- *title* [default = ''] (string)
- *xlabel* [default = 'Copy number'] (string)
- *ylabel* [default = 'PMF'] (string)
- *IsLegend* [default = True] (boolean)
- *legend_location* [default = 'upper right'] (string/integer)
- *bin_size* [default=None] (integer)
- *orientation* [default = 'vertical'] (string)
"""
assert stochpy._IsPlotting, "Install matplotlib or use Export2file()"
assert self._IsSimulationDone, "First do a stochastic simulation"
assert not self._IsOnlyLastTimepoint, "Plotting is disabled when saving only the last time point"
species2plot = self._getSpecies2Plot(species2plot)
for n in range(1,self.sim_trajectories_done+1):
if self.sim_trajectories_done > 1:
self.GetTrajectoryData(n)
self.plot.Distributions(distributions =self.data_stochsim.species_distributions,datatype=species2plot,labels=self.data_stochsim.species_labels,trajectory_index=n-1,linestyle=linestyle,linewidth=linewidth,
colors=colors,title=title,xlabel=xlabel,ylabel=ylabel,is_legend=IsLegend,legend_location = legend_location,bin_size= bin_size,histtype = histtype,orientation = orientation)
self.plot.plotnum += 1
def PlotPropensitiesDistributions(self,rates2plot = True,histtype='step', linestyle = 'solid',linewidth = 1,colors=None,title='',xlabel='Propensity', ylabel='PMF', IsLegend=True, legend_location='upper right',bin_size=1,orientation = 'vertical'):
"""
Plots the PMF for each generated trajectory
Input:
- *rates2plot* [default = True] as a list ['R1','R2']
- *histtype* [default = 'step'] (string) ['step','stepfilled','bar]
- *linestyle* [default = 'dotted'] (string)
- *linewidth* [default = 1] (float)
- *colors* (list)
- *title* [default = ''] (string)
- *xlabel* [default = 'Propensity'] (string)
- *ylabel* [default = 'PMF'] (string)
- *IsLegend* [default = True] (boolean)
- *legend_location* [default = 'upper right'] (string/integer)
- *bin_size* [default=1] (integer)
- *orientation* [default = 'vertical'] (string)
"""
assert stochpy._IsPlotting, "Install matplotlib or use Export2file()"
assert self._IsSimulationDone and self._IsTrackPropensities, "First do a stochastic simulation with tracking propensities (use the IsTrackPropensities flag in DoStochSim)"
assert not self._IsOnlyLastTimepoint, "Plotting is disabled when saving only the last time point"
rates2plot = self._getRates2Plot(rates2plot)
for n in range(1,self.sim_trajectories_done+1):
if self.sim_trajectories_done > 1:
self.GetTrajectoryData(n)
self.plot.Distributions(distributions= self.data_stochsim.propensities_distributions,datatype = rates2plot,labels = self.sim_rates_tracked,trajectory_index =n-1,linestyle=linestyle,linewidth=linewidth,colors=colors,title=title,xlabel=xlabel,ylabel=ylabel,is_legend=IsLegend,legend_location=legend_location,bin_size= bin_size,histtype=histtype,orientation=orientation)
self.plot.plotnum += 1
def PlotWaitingtimesDistributions(self,rates2plot = True,linestyle = 'None',linewidth = 1, marker = 'o',colors = None,title = '',xlabel=r'inter-event time $t$',ylabel='PDF',IsLegend=True,legend_location='upper right'):
"""
Plot event waiting time distributions
Input:
- *rates2plot* [default = True] as a list of strings ["R1","R2"]
- *linestyle* [default = 'None'] dashed, dotted, dash_dot, and solid (string)
- *linewidth* [default = 1] (float)
- *marker* [default = 'o'] ('v','o','s',',','*','.')
- *colors* [default = None] (list)
- *title* [default = ''] (string)
- *xlabel* [default = 'inter-event time t'] (string)
- *ylabel* [default = 'PDF'] (string)
- *IsLegend* [default = True] (boolean)
- *legend_location* [default = 'upper right'] (string/integer)
"""
assert stochpy._IsPlotting, "Install matplotlib or use Export2file()"
assert not self._IsTauleaping, "Tau-Leaping method does not allow for calculation of waiting times"
assert not self._IsOnlyLastTimepoint, "Plotting is disabled when saving only the last time point"
if (not self.data_stochsim.HAS_WAITINGTIMES) and (not self._IsTauleaping):
self.GetWaitingtimes()
waitingtime_r_ids = list(self.data_stochsim.waiting_times)
if rates2plot == True:
rates2plot = np.sort(waitingtime_r_ids)
else:
rates2plot = self._getRates2Plot(rates2plot)
for r_id in rates2plot:
if r_id + '_Completion' in waitingtime_r_ids: # Automatically also select completion waiting times
rates2plot.append( r_id + '_Completion' )
for n in range(1,self.sim_trajectories_done+1):
if self.sim_trajectories_done > 1:
self.GetTrajectoryData(n)
self.plot.WaitingtimesDistributions(self.data_stochsim.waiting_times,rates2plot,n-1,linestyle,linewidth, marker,colors,title,xlabel,ylabel,IsLegend,legend_location)
self.plot.plotnum+=1
def PlotAverageSpeciesTimeSeries(self,species2plot = True,linestyle = 'None',linewidth = 1,marker = 'o',markersize = 5,colors = None,title = 'Average Species Time Series (# of trajectories = )',xlabel='Time',ylabel='Copy number',IsLegend=True,legend_location='upper right',nstd=1):
"""
Plot the average time simulation result. For each time point, the mean and standard deviation are plotted
Input:
- *species2plot* [default = True] as a list ['S1','S2']
- *linestyle* [default = 'dotted'] dashed, solid, and dash_dot (string)
- *linewidth* [default = 1] (float)
- *marker* [default = 'o'] ('v','o','s',',','*','.')
- *markersize* [default = 5] (float)
- *colors* [default = None] (list)
- *title* [default = 'Average Time (# of trajectories = ... )' ] (string)
- *xlabel* [default = 'Time'] (string)
- *ylabel* [default = 'Copy number'] (string)
- *IsLegend* [default = True] (boolean)
- *legend_location* [default = 'upper right'] (string/integer)
- *nstd* [default=1] (float)
"""
assert stochpy._IsPlotting, "Install matplotlib or use Export2file()"
assert not self._IsOnlyLastTimepoint, "Plotting is disabled when saving only the last time point"
if not self.HAS_AVERAGE:
print("*** WARNING ***: No regular grid is created yet. Use GetRegularGrid(n_samples) if averaged results are unsatisfactory (e.g. more or less 'samples')")
self.GetRegularGrid()
species2plot = self._getSpecies2Plot(species2plot)
if '(# of trajectories = )' in title:
title = title.replace('= ','= {0:d}'.format(self.sim_trajectories_done))
self.plot.AverageTimeSeries(self.data_stochsim_grid.species_means,self.data_stochsim_grid.species_standard_deviations,self.data_stochsim_grid.time,nstd,species2plot,self.sim_species_tracked,linestyle,linewidth,marker,markersize,colors,title,xlabel,ylabel,IsLegend,legend_location)
self.plot.plotnum+=1
def PlotAverageSpeciesDistributions(self,species2plot = True,linestyle = 'None',linewidth = 1,marker = 'o',colors = None,title = 'Average Species Distributions (# of trajectories = )',xlabel='Copy number',ylabel='PMF',IsLegend=True,legend_location = 'upper right',nstd=1):
"""
Plot the average species distributions For each species Amount, the mean and standard deviation are plotted
Input:
- *species2plot* [default = True] as a list ['S1','S2']
- *linestyle* [default = 'dotted'] dashed, solid, and dash_dot (string)
- *linewidth* [default = 1] (float)
- *marker* [default = 'o'] ('v','o','s',',','*','.')
- *colors* [default = None] (list)
- *title* [default = 'Average Species Distributions (# of trajectories = ... )' ] (string)
- *xlabel* [default = 'Copy number'] (string)
- *ylabel* [default = 'PMF'] (string)
- *IsLegend* [default = True] (boolean)
- *legend_location* [default = 'upper right'] (string/integer)
- *nstd* [default=1] (float)
"""
assert stochpy._IsPlotting, "Install matplotlib or use Export2file()"
assert not self._IsOnlyLastTimepoint, "Plotting is disabled when saving only the last time point"
if not self.data_stochsim_grid.HAS_AVERAGE_SPECIES_DISTRIBUTIONS:
self.GetAverageSpeciesDistributions()
species2plot = self._getSpecies2Plot(species2plot)
if '(# of trajectories = )' in title:
title = title.replace('= ','= {0:d}'.format(self.sim_trajectories_done))
self.plot.AverageDistributions(self.data_stochsim_grid.species_distributions_means,self.data_stochsim_grid.species_distributions_standard_deviations,nstd,species2plot,self.sim_species_tracked,linestyle,linewidth,marker,colors,title,xlabel,ylabel,IsLegend,legend_location)
self.plot.plotnum+=1
def PlotAverageSpeciesDistributionsConfidenceIntervals(self,species2plot=True,colors = None,title = 'Average Species Distributions (# of trajectories = )',xlabel='Copy number',ylabel='PMF',IsLegend=True,legend_location='upper right',nstd=1):
"""
Plot the average species distributions For each species Amount, the mean and standard deviation are plotted
Input:
- *species2plot* [default = True] as a list ['S1','S2']
- *colors* [default = None] (list)
- *title* [default = 'Average Species Distributions (# of trajectories = ... )' ] (string)
- *xlabel* [default = 'Copy number'] (string)
- *ylabel* [default = 'PMF'] (string)
- *IsLegend* [default = True] (boolean)
- *legend_location* [default = 'upper right'] (string/integer)
- *nstd* [default=1] (float)
"""
assert stochpy._IsPlotting, "Install matplotlib or use Export2file()"
assert not self._IsOnlyLastTimepoint, "Plotting is disabled when saving only the last time point"
if not self.data_stochsim_grid.HAS_AVERAGE_SPECIES_DISTRIBUTIONS:
self.GetAverageSpeciesDistributions()
species2plot = self._getSpecies2Plot(species2plot)
if '(# of trajectories = )' in title:
title = title.replace('= ','= {0:d}'.format(self.sim_trajectories_done))
self.plot.AverageDistributionsCI(self.data_stochsim_grid.species_distributions_means,self.data_stochsim_grid.species_distributions_standard_deviations,nstd,species2plot,self.sim_species_tracked,colors,title,xlabel,ylabel,IsLegend,legend_location)
self.plot.plotnum+=1
def PlotAveragePropensitiesDistributionsConfidenceIntervals(self,rates2plot = True,colors = None,title = 'Average Propensities Distributions (# of trajectories = )',xlabel='Propensity',ylabel='PMF',IsLegend=True,legend_location='upper right',nstd=1):
"""
Plot the average time simulation result. For each time point, the mean and standard deviation are plotted
Input:
- *rates2plot* [default = True] as a list ['R1','R2']
- *colors* [default = None] (list)
- *title* [default = 'Average Time (# of trajectories = ... )' ] (string)
- *xlabel* [default = 'Propensity'] (string)
- *ylabel* [default = 'PMF'] (string)
- *IsLegend* [default = True] (boolean)
- *legend_location* [default = 'upper right'] (string/integer)
- *nstd* [default=1] (float)
"""
assert stochpy._IsPlotting, "Install matplotlib or use Export2file()"
assert not self._IsOnlyLastTimepoint, "Plotting is disabled when saving only the last time point"
if not self.data_stochsim_grid.HAS_AVERAGE_PROPENSITIES_DISTRIBUTIONS:
self.GetAveragePropensitiesDistributions()
rates2plot = self._getRates2Plot(rates2plot)
self.plot.AverageDistributionsCI(self.data_stochsim_grid.propensities_distributions_means,self.data_stochsim_grid.propensities_distributions_standard_deviations,nstd,rates2plot,self.sim_rates_tracked,colors,title,xlabel,ylabel,IsLegend,legend_location)
self.plot.plotnum+=1
def PlotAveragePropensitiesDistributions(self,rates2plot = True,linestyle = 'None',linewidth = 1,marker = 'o',colors = None,title = 'Average Propensities Distributions (# of trajectories = )',xlabel='Propensity',ylabel='PMF',IsLegend=True,legend_location='upper right',nstd=1):
"""
Plot the average time simulation result. For each time point, the mean and standard deviation are plotted
Input:
- *rates2plot* [default = True] as a list ['R1','R2']
- *linestyle* [default = 'dotted'] dashed, solid, and dash_dot (string)
- *linewidth* [default = 1] (float)
- *marker* [default = 'o'] ('v','o','s',',','*','.')
- *colors* [default = None] (list)
- *title* [default = 'Average Propensities Distributions (# of trajectories = ... )' ] (string)
- *xlabel* [default = 'Propensity'] (string)
- *ylabel* [default = 'PMF'] (string)
- *IsLegend* [default = True] (boolean)
- *legend_location* [default = 'upper right'] (string/integer)
- *nstd* [default=1] (float)
"""
assert stochpy._IsPlotting, "Install matplotlib or use Export2file()"
assert not self._IsOnlyLastTimepoint, "Plotting is disabled when saving only the last time point"
if not self.data_stochsim_grid.HAS_AVERAGE_PROPENSITIES_DISTRIBUTIONS:
self.GetAveragePropensitiesDistributions()
rates2plot = self._getRates2Plot(rates2plot)
if '(# of trajectories = )' in title:
title = title.replace('= ','= {0:d}'.format(self.sim_trajectories_done))
self.plot.AverageDistributions(self.data_stochsim_grid.propensities_distributions_means,self.data_stochsim_grid.propensities_distributions_standard_deviations,nstd,rates2plot,self.sim_rates_tracked,linestyle,linewidth,marker,colors,title,xlabel,ylabel,IsLegend,legend_location)
self.plot.plotnum+=1
def PlotAveragePropensitiesTimeSeries(self,rates2plot = True,linestyle = 'None',linewidth = 1, marker = 'o',markersize=5,colors = None,title = 'Average Propensities Time Series (# of trajectories = )',xlabel='Time',ylabel='Propensity',IsLegend=True,legend_location='upper right',nstd=1):
"""
Plot the average propensities. For each time point, the mean and standard deviation are plotted
Input:
- *rates2plot* [default = True] as a list ['S1','S2']
- *linestyle* [default = 'dotted'] dashed, solid, and dash_dot (string)
- *linewidth* [default = 1] (float)
- *marker* [default = 'o'] ('v','o','s',',','*','.')
- *markersize* [default = 5] (float)
- *colors* [default = None] (list)
- *title* [default = 'Average Propensities Time Series (# of trajectories = ...)' ] (string)
- *xlabel* [default = 'Time'] (string)
- *ylabel* [default = 'Propensity'] (string)
- *IsLegend* [default = True] (boolean)
- *legend_location* [default = 'upper right'] (string/integer)
- *nstd* [default=1] (float)
"""
assert stochpy._IsPlotting, "Install matplotlib or use Export2file()"
assert self._IsTrackPropensities, "First do a stochastic simulation with tracking propensities (use the IsTrackPropensities flag in DoStochSim)"
assert not self._IsOnlyLastTimepoint, "Plotting is disabled when saving only the last time point"
if (not self.HAS_AVERAGE) and (self._IsTrackPropensities):
print("*** WARNING ***: No regular grid is created yet. Use GetRegularGrid(n_samples) if averaged results are unsatisfactory)")
self.GetRegularGrid()
rates2plot = self._getRates2Plot(rates2plot)
if '(# of trajectories = )' in title:
title = title.replace('= ','= {0:d}'.format(self.sim_trajectories_done))
self.plot.AverageTimeSeries(self.data_stochsim_grid.propensities_means,self.data_stochsim_grid.propensities_standard_deviations, self.data_stochsim_grid.time,nstd,rates2plot,self.sim_rates_tracked,linestyle,linewidth,marker,markersize,colors,title,xlabel,ylabel,IsLegend,legend_location)
self.plot.plotnum+=1
def PlotSpeciesAutocorrelations(self,nlags = -1,species2plot=True,linestyle = 'None',linewidth = 1,marker = 'o',colors = None,title = '',xlabel=r'Lag ($\tau$)',ylabel='Auto-correlation',IsLegend=True,legend_location='upper right'):
"""
Plot species autocorrelations
Input:
- *nlags* [default = -1] (integer) 1,2,3 ... -1 where 3 means calculate the autocorrelation for the first 3 lags and -1 for all lags
- *species2plot* [default = True] as a list ['S1','S2']
- *linestyle* [default = 'dotted'] dashed, solid, and dash_dot (string)
- *linewidth* [default = 1] (float)
- *marker* [default = 'o'] ('v','o','s',',','*','.')
- *colors* [default = None] (list)
- *title* [default = ''] (string)
- *xlabel* [default = r'Lag ($\tau$)'] (string)
- *ylabel* [default = 'Auto-correlation'] (string)
- *IsLegend* [default = True] (boolean)
- *legend_location* [default = 'upper right'] (string/integer)
"""
assert stochpy._IsPlotting, "Install matplotlib or use Export2file()"
assert not self._IsOnlyLastTimepoint, "Plotting is disabled when saving only the last time point"
if not self.data_stochsim_grid.HAS_SPECIES_AUTOCORRELATIONS:
print("*** WARNING ***: Autocorrelations are not yet calculated. StochPy automatically calculates autocorrelations with pre-defined settings. You can use GetSpeciesAutocorrelations(species2calc=True,n_samples=51)")
self.GetSpeciesAutocorrelations(species2calc = species2plot)
species2plot = self._getSpecies2Plot(species2plot)
for n in range(self.sim_trajectories_done):
self.plot.Autocorrelations(self.data_stochsim_grid.time[:nlags],self.data_stochsim_grid.species_autocorrelations[:,n], species2plot,self.sim_species_tracked,n,linestyle,linewidth,marker,colors,title,xlabel,ylabel,IsLegend,legend_location)
self.plot.plotnum+=1
def PlotSpeciesAutocovariances(self,nlags = -1,species2plot=True,linestyle = 'None', linewidth = 1, marker = 'o',colors = None,title = '',xlabel=r'Lag ($\tau$)',ylabel='Auto-covariance',IsLegend=True,legend_location='upper right'):
"""
Plot species auto-covariances
Input:
- *nlags* [default = -1] (integer) 1,2,3 ... -1 where 3 means calculate the autocorrelation for the first 3 lags and -1 for all lags
- *species2plot* [default = True] as a list ['S1','S2']
- *linestyle* [default = 'dotted'] dashed, solid, and dash_dot (string)
- *linewidth* [default = 1] (float)
- *marker* [default = 'o'] ('v','o','s',',','*','.')
- *colors* [default = None] (list)
- *title* [default = ''] (string)
- *xlabel* [default = r'Lag ($\tau$)'] (string)
- *ylabel* [default = 'Auto-covariance'] (string)
- *IsLegend* [default = True] (boolean)
- *legend_location* [default = 'upper right'] (string/integer)
"""
assert stochpy._IsPlotting, "Install matplotlib or use Export2file()"
assert not self._IsOnlyLastTimepoint, "Plotting is disabled when saving only the last time point"
if not self.data_stochsim_grid.HAS_SPECIES_AUTOCOVARIANCES:
print("*** WARNING ***: Autocovariances are not yet calculated. StochPy automatically calculates autocovariances with pre-defined settings. You can use GetSpeciesAutocovariances(species2calc=True,n_samples=51)")
self.GetSpeciesAutocovariances(species2calc = species2plot)
species2plot = self._getSpecies2Plot(species2plot)
for n in range(self.sim_trajectories_done):
self.plot.Autocorrelations(self.data_stochsim_grid.time[:nlags],self.data_stochsim_grid.species_autocovariances[:,n], species2plot,self.sim_species_tracked,n,linestyle,linewidth,marker,colors,title,xlabel,ylabel,IsLegend,legend_location)
self.plot.plotnum+=1
def PlotAverageSpeciesAutocorrelations(self,nlags=-1,species2plot = True,linestyle = 'None',linewidth = 1, marker = 'o',markersize=5,colors = None,title = 'Average Species Autocorrelations(# of trajectories = )',xlabel=r'Lag ($\tau$)',ylabel='Auto-correlation',IsLegend=True,legend_location='upper right',nstd=1):
"""
Plot the average time simulation result. For each time point, the mean and standard deviation are plotted
Input:
- *nlags* [default = -1] (integer) 1,2,3 ... -1 where 3 means calculate the autocorrelation for the first 3 lags and -1 for all lags
- *species2plot* [default = True] as a list ['S1','S2']
- *linestyle* [default = 'dotted'] dashed, solid, and dash_dot (string)
- *linewidth* [default = 1] (float)
- *marker* [default = 'o'] ('v','o','s',',','*','.')
- *markersize* [default = 1] (float)
- *colors* [default = None] (list)
- *title* [default = 'Average Species Autocorrelations(# of trajectories = ... )' ] (string)
- *xlabel* [default = r'Lag ($\tau$)'] (string)
- *ylabel* [default = 'Auto-correlation'] (string)
- *IsLegend* [default = True] (boolean)
- *legend_location* [default = 'upper right'] (string/integer)
- *nstd* [default=1] (float)
"""
assert stochpy._IsPlotting, "Install matplotlib or use Export2file()"
assert not self._IsOnlyLastTimepoint, "Plotting is disabled when saving only the last time point"
if not self.data_stochsim_grid.HAS_SPECIES_AUTOCORRELATIONS:
print("*** WARNING ***: Autocorrelations are not yet calculated. StochPy automatically calculates autocorrelations with pre-defined settings. You can use GetSpeciesAutocorrelations(species2calc=True,n_samples=51)")
self.GetSpeciesAutocorrelations(species2calc = species2plot)
species2plot = self._getSpecies2Plot(species2plot)
if '(# of trajectories = )' in title:
title = title.replace('= ','= {0:d}'.format(self.sim_trajectories_done))
self.plot.AverageTimeSeries(self.data_stochsim_grid.species_autocorrelations_means[:nlags][:],self.data_stochsim_grid.species_autocorrelations_standard_deviations[:nlags][:],self.data_stochsim_grid.time[:nlags],nstd,species2plot,self.sim_species_tracked, linestyle,linewidth,marker,markersize,colors, title,xlabel,ylabel,IsLegend, legend_location)
self.plot.plotnum+=1
def PlotAverageSpeciesAutocovariances(self,nlags=-1,species2plot = True,linestyle = 'None',linewidth = 1, marker = 'o',markersize=5,colors = None,title = 'Average Species Autocovariances (# of trajectories = )',xlabel=r'Lag ($\tau$)',ylabel='Auto-covariance',IsLegend=True,legend_location='upper right',nstd=1):
"""
Plot the average time simulation result. For each time point, the mean and standard deviation are plotted
Input:
- *nlags* [default = -1] (integer) 1,2,3 ... -1 where 3 means calculate the autocorrelation for the first 3 lags and -1 for all lags
- *species2plot* [default = True] as a list ['S1','S2']
- *linestyle* [default = 'dotted'] dashed, solid, and dash_dot (string)
- *linewidth* [default = 1] (float)
- *marker* [default = 'o'] ('v','o','s',',','*','.')
- *markersize* [default = 1] (float)
- *colors* [default = None] (list)
- *title* [default = 'Average Species Autocovariances (# of trajectories = ... )' ] (string)
- *xlabel* [default = r'Lag ($\tau$)'] (string)
- *ylabel* [default = 'Auto-covariance'] (string)
- *IsLegend* [default = True] (boolean)
- *legend_location* [default = 'upper right'] (string/integer)
- *nstd* [default=1] (float)
"""
assert stochpy._IsPlotting, "Install matplotlib or use Export2file()"
assert not self._IsOnlyLastTimepoint, "Plotting is disabled when saving only the last time point"
if not self.data_stochsim_grid.HAS_SPECIES_AUTOCOVARIANCES:
print("*** WARNING ***: Autocovariances are not yet calculated. StochPy automatically calculates autocovariances with pre-defined settings. You can use GetSpeciesAutocovariances(species2calc=True,n_samples=51)")
self.GetSpeciesAutocovariances(species2calc = species2plot)
species2plot = self._getSpecies2Plot(species2plot)
if '(# of trajectories = )' in title:
title = title.replace('= ','= {0:d}'.format(self.sim_trajectories_done))
self.plot.AverageTimeSeries(self.data_stochsim_grid.species_autocovariances_means[:nlags][:],self.data_stochsim_grid.species_autocovariances_standard_deviations[:nlags][:],self.data_stochsim_grid.time[:nlags],nstd,species2plot,self.sim_species_tracked,linestyle,linewidth, marker, markersize, colors, title, xlabel, ylabel, IsLegend, legend_location)
self.plot.plotnum+=1
def PlotPropensitiesAutocorrelations(self,nlags=-1,rates2plot=True,linestyle = 'None', linewidth = 1, marker = 'o',colors = None,title = '',xlabel=r'Lag ($\tau$)',ylabel='Auto-correlation',IsLegend=True,legend_location='upper right'):
"""
Input:
- *nlags* [default = -1] (integer) 1,2,3 ... -1 where 3 means calculate the autocorrelation for the first 3 lags and -1 for all lags
- *rates2plot* [default = True] as a list ['R1','R2']
- *linestyle* [default = 'dotted'] dashed, solid, and dash_dot (string)
- *linewidth* [default = 1] (float)
- *marker* [default = ','] ('v','o','s',',','*','.')
- *colors* [default = None] (list)
- *title* [default = ''] (string)
- *xlabel* [default = r'Lag ($\tau$)'] (string)
- *ylabel* [default = 'Auto-correlation'] (string)
- *IsLegend* [default = True] (boolean)
- *legend_location* [default = 'upper right'] (string/integer)
"""
assert stochpy._IsPlotting, "Install matplotlib or use Export2file()"
assert not self._IsOnlyLastTimepoint, "Plotting is disabled when saving only the last time point"
if not self.data_stochsim_grid.HAS_PROPENSITIES_AUTOCORRELATIONS:
print("*** WARNING ***: Autocorrelations are not yet calculated. StochPy automatically calculates autocorrelations with pre-defined settings. You can use GetPropensitiesAutocorrelations(rates=True,n_samples=51)")
self.GetPropensitiesAutocorrelations(rates = rates2plot,n_samples=self.data_stochsim.simulation_endtime)
rates2plot = self._getRates2Plot(rates2plot)
for n in range(self.sim_trajectories_done):
self.plot.Autocorrelations(self.data_stochsim_grid.time[:nlags],self.data_stochsim_grid.propensities_autocorrelations[:,n],rates2plot,self.sim_rates_tracked,n,linestyle,linewidth,marker,colors,title,xlabel,ylabel,IsLegend,legend_location)
self.plot.plotnum+=1
def PlotPropensitiesAutocovariances(self,nlags=-1,rates2plot=True,linestyle = 'None',linewidth = 1, marker = 'o',colors = None,title = '',xlabel=r'Lag ($\tau$)',ylabel='Auto-covariance',IsLegend=True,legend_location='upper right'):
"""
Input:
- *nlags* [default = -1] (integer) 1,2,3 ... -1 where 3 means calculate the autocorrelation for the first 3 lags and -1 for all lags
- *rates2plot* [default = True] as a list ['R1','R2']
- *linestyle* [default = 'dotted'] dashed, solid, and dash_dot (string)
- *linewidth* [default = 1] (float)
- *marker* [default = ','] ('v','o','s',',','*','.')
- *colors* [default = None] (list)
- *title* [default = ''] (string)
- *xlabel* [default = r'Lag ($\tau$)'] (string)
- *ylabel* [default = 'Auto-covariance'] (string)
- *IsLegend* [default = True] (boolean)
- *legend_location* [default = 'upper right'] (string/integer)
"""
assert stochpy._IsPlotting, "Install matplotlib or use Export2file()"
assert not self._IsOnlyLastTimepoint, "Plotting is disabled when saving only the last time point"
if not self.data_stochsim_grid.HAS_PROPENSITIES_AUTOCOVARIANCES:
print("*** WARNING ***: Autocovariances are not yet calculated. StochPy automatically calculates autocovariances with pre-defined settings. You can use GetPropensitiesAutocovariances(rates=True,n_samples=51)")
self.GetPropensitiesAutocovariances(rates = rates2plot,n_samples=self.data_stochsim.simulation_endtime)
rates2plot = self._getRates2Plot(rates2plot)
for n in range(self.sim_trajectories_done):
self.plot.Autocorrelations(self.data_stochsim_grid.time[:nlags],self.data_stochsim_grid.propensities_autocovariances[:,n],rates2plot,self.sim_rates_tracked,n,linestyle,linewidth, marker,colors,title,xlabel,ylabel,IsLegend,legend_location)
self.plot.plotnum+=1
def PlotAveragePropensitiesAutocorrelations(self,nlags=-1,rates2plot = True,linestyle = 'None',linewidth = 1, marker = 'o',markersize=5,colors = None,title = 'Average Propensities Autocorrelations(# of trajectories = )',xlabel=r'Lag ($\tau$)',ylabel='Auto-correlation',IsLegend=True,legend_location='upper right',nstd=1):
"""
Plot the average propensities autocorrelation result for different lags. For each lag, the mean and standard deviation are plotted
Input:
- *nlags* [default = -1] (integer) 1,2,3 ... -1 where 3 means calculate the autocorrelation for the first 3 lags and -1 for all lags
- *rates2plot* [default = True] as a list ['R1','R2']
- *linestyle* [default = 'dotted'] dashed, solid, and dash_dot (string)
- *marker* [default = ','] ('v','o','s',',','*','.')
- *markersize* [default = 1] (float)
- *colors* [default = None] (list)
- *title* [default = 'Average Propensities Autocorrelation(# of trajectories = ... )' ] (string)
- *xlabel* [default = r'Lag ($\tau$)'] (string)
- *ylabel* [default = 'Auto-correlation'] (string)
- *IsLegend* [default = True] (boolean)
- *legend_location* [default = 'upper right'] (string/integer)
- *nstd* [default=1] (float)
"""
assert stochpy._IsPlotting, "Install matplotlib or use Export2file()"
assert not self._IsOnlyLastTimepoint, "Plotting is disabled when saving only the last time point"
if not self.data_stochsim_grid.HAS_PROPENSITIES_AUTOCORRELATIONS:
print("*** WARNING ***: Autocorrelations are not yet calculated. StochPy automatically calculates autocorrelations with pre-defined settings. You can use GetPropensitiesAutocorrelations(rates=True,n_samples=51)")
self.GetPropensitiesAutocorrelations(rates = rates2plot,n_samples=self.data_stochsim.simulation_endtime)
rates2plot = self._getRates2Plot(rates2plot)
if '(# of trajectories = )' in title:
title = title.replace('= ','= {0:d}'.format(self.sim_trajectories_done))
self.plot.AverageTimeSeries(self.data_stochsim_grid.propensities_autocorrelations_means[:nlags][:], self.data_stochsim_grid.propensities_autocorrelations_standard_deviations[:nlags][:], self.data_stochsim_grid.time[:nlags], nstd, rates2plot, self.sim_rates_tracked, linestyle,linewidth,marker,markersize,colors,title,xlabel,ylabel,IsLegend,legend_location)
self.plot.plotnum+=1
def PlotAveragePropensitiesAutocovariances(self,nlags=-1,rates2plot = True,linestyle = 'None',linewidth = 1, marker = 'o',markersize=5,colors = None,title = 'Average Propensities Autocovariances (# of trajectories = )',xlabel=r'Lag ($\tau$)',ylabel='Auto-covariance',IsLegend=True,legend_location='upper right',nstd=1):
"""
Plot the average propensities autocorrelation result for different lags. For each lag, the mean and standard deviation are plotted
Input:
- *nlags* [default = -1] (integer) 1,2,3 ... -1 where 3 means calculate the autocorrelation for the first 3 lags and -1 for all lags
- *rates2plot* [default = True] as a list ['R1','R2']
- *linestyle* [default = 'dotted'] dashed, solid, and dash_dot (string)
- *linewidth* [default = 1] (float)
- *marker* [default = ','] ('v','o','s',',','*','.')
- *markersize* [default = 1] (float)
- *colors* [default = None] (list)
- *title* [default = 'Average Propensities Autocovariances (# of trajectories = )' ] (string)
- *xlabel* [default = r'Lag ($\tau$)'] (string)
- *ylabel* [default = 'Auto-covariance'] (string)
- *IsLegend* [default = True] (boolean)
- *legend_location* [default = 'upper right'] (string/integer)
- *nstd* [default=1] (float)
"""
assert stochpy._IsPlotting, "Install matplotlib or use Export2file()"
assert not self._IsOnlyLastTimepoint, "Plotting is disabled when saving only the last time point"
if not self.data_stochsim_grid.HAS_PROPENSITIES_AUTOCOVARIANCES:
print("*** WARNING ***: Autocovariances are not yet calculated. StochPy automatically calculates autocovariances with pre-defined settings. You can use GetPropensitiesAutocovariances(rates=True,n_samples=51)")
self.GetPropensitiesAutocovariances(rates = rates2plot,n_samples=self.data_stochsim.simulation_endtime)
rates2plot = self._getRates2Plot(rates2plot)
if '(# of trajectories = )' in title:
title = title.replace('= ','= {0:d}'.format(self.sim_trajectories_done))
self.plot.AverageTimeSeries(self.data_stochsim_grid.propensities_autocovariances_means[:nlags][:],self.data_stochsim_grid.propensities_autocovariances_standard_deviations[:nlags][:], self.data_stochsim_grid.time[:nlags],nstd,rates2plot, self.sim_rates_tracked, linestyle,linewidth, marker,markersize,colors,title,xlabel,ylabel,IsLegend,legend_location)
self.plot.plotnum+=1
| 64.218898 | 379 | 0.64288 | 4,327 | 40,779 | 5.94985 | 0.066328 | 0.018955 | 0.03791 | 0.035735 | 0.920528 | 0.911828 | 0.907128 | 0.88825 | 0.883667 | 0.879122 | 0 | 0.013816 | 0.229702 | 40,779 | 634 | 380 | 64.320189 | 0.805775 | 0.326099 | 0 | 0.704545 | 0 | 0.045455 | 0.233205 | 0.019967 | 0 | 0 | 0 | 0 | 0.2 | 1 | 0.086364 | false | 0 | 0.022727 | 0 | 0.113636 | 0.063636 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
12289bd7b1e2e2a4afb9b054591fcd4a87ab6625 | 4,493 | py | Python | KT17/PlotMP.py | mattkjames7/KT17 | 5550afeb9fea4255b0f0105021df23743c14744f | [
"MIT"
] | 2 | 2020-03-12T13:39:04.000Z | 2022-03-15T13:52:05.000Z | KT17/PlotMP.py | mattkjames7/KT17 | 5550afeb9fea4255b0f0105021df23743c14744f | [
"MIT"
] | null | null | null | KT17/PlotMP.py | mattkjames7/KT17 | 5550afeb9fea4255b0f0105021df23743c14744f | [
"MIT"
] | null | null | null | import numpy as np
def PlotShueMP(fig,Rsm,Alpha,color=[0.0,0.0,1.0],lw=2,zorder=10,NoonTop=True):
'''
Plots the Shue et al 1997 magnetopause.
Inputs
======
fig : obj
Either a matplotlib.pyplot or matplotlib.pyplot.axes instance
Rsm : float
Subsolar distance of the magnetopause.
Alpha : float
Flaring parameter of the magnetopause.
color : list
RGB color to plot the magnetopause in.
lw : float
Width of the magnetopause line.
zorder : float
Height order of this plot object.
NoonTop : bool
When True, the plot is oriented such that noon is at the top
otherwise, noon is to the left of the plot.
'''
theta = np.pi*(np.arange(359)-179)/180.0
r = Rsm*(2.0/(1+np.cos(theta)))**Alpha
x = r*np.cos(theta)
z = r*np.sin(theta)
if NoonTop:
fig.plot(z,x,color=color,lw=lw,zorder=zorder,label='Magnetopause')
else:
fig.plot(x,z,color=color,lw=lw,zorder=zorder,label='Magnetopause')
def PlotShueMPYZ(fig,Rsm,Alpha,color=[0.0,0.0,1.0],lw=2,zorder=10):
'''
Plots the Shue et al 1997 magnetopause.
Inputs
======
fig : obj
Either a matplotlib.pyplot or matplotlib.pyplot.axes instance
Rsm : float
Subsolar distance of the magnetopause.
Alpha : float
Flaring parameter of the magnetopause.
color : list
RGB color to plot the magnetopause in.
lw : float
Width of the magnetopause line.
zorder : float
Height order of this plot object.
NoonTop : bool
When True, the plot is oriented such that noon is at the top
otherwise, noon is to the left of the plot.
'''
theta = np.pi*(np.arange(359)-179)/180.0
r = Rsm*(2.0)**Alpha
y = r*np.cos(theta)
z = r*np.sin(theta)
fig.plot(y,z,color=col,lw=lw,zorder=zorder,label='Magnetopause')
def PlotMercuryMP(fig,Rsm=1.42,Alpha=0.5,color=[0.0,0.0,1.0],lw=2,zorder=10,NoonTop=True):
'''
Plots Mercury's magnetopause.
Inputs
======
fig : obj
Either a matplotlib.pyplot or matplotlib.pyplot.axes instance
Rsm : float
Subsolar distance of the magnetopause.
Alpha : float
Flaring parameter of the magnetopause.
color : list
RGB color to plot the magnetopause in.
lw : float
Width of the magnetopause line.
zorder : float
Height order of this plot object.
NoonTop : bool
When True, the plot is oriented such that noon is at the top
otherwise, noon is to the left of the plot.
'''
PlotShueMP(fig,Rsm,Alpha,color,lw,zorder,NoonTop)
def PlotMercuryMPYZ(fig,Rsm=1.42,Alpha=0.5,color=[0.0,0.0,1.0],lw=2,zorder=10):
'''
Plots Mercury's magnetopause.
Inputs
======
fig : obj
Either a matplotlib.pyplot or matplotlib.pyplot.axes instance
Rsm : float
Subsolar distance of the magnetopause.
Alpha : float
Flaring parameter of the magnetopause.
color : list
RGB color to plot the magnetopause in.
lw : float
Width of the magnetopause line.
zorder : float
Height order of this plot object.
NoonTop : bool
When True, the plot is oriented such that noon is at the top
otherwise, noon is to the left of the plot.
'''
PlotShueMPYZ(fig,Rsm,Alpha,color,lw,zorder)
def PlotKT17MercuryMP(fig,Rsun=0.39,DistInd=50.0,color=[0.0,0.0,1.0],lw=2,zorder=10,NoonTop=True):
'''
Plots Mercury's magnetopause.
Inputs
======
fig : obj
Either a matplotlib.pyplot or matplotlib.pyplot.axes instance
Rsun : float
radial distance of mercury from the Sun in AU
DistIndex : float
Anderson et al 2013 disturbance index.
color : list
RGB color to plot the magnetopause in.
lw : float
Width of the magnetopause line.
zorder : float
Height order of this plot object.
NoonTop : bool
When True, the plot is oriented such that noon is at the top
otherwise, noon is to the left of the plot.
'''
f=2.06873-0.00279*DistInd
Rsm=f*Rsun**(1.0/3.0)
PlotShueMP(fig,Rsm,0.5,color,lw,zorder,NoonTop)
def PlotKT17MercuryMPYZ(fig,Rsun=0.39,DistInd=50.0,color=[0.0,0.0,1.0],lw=2,zorder=10):
'''
Plots Mercury's magnetopause.
Inputs
======
fig : obj
Either a matplotlib.pyplot or matplotlib.pyplot.axes instance
Rsun : float
radial distance of mercury from the Sun in AU
DistIndex : float
Anderson et al 2013 disturbance index.
color : list
RGB color to plot the magnetopause in.
lw : float
Width of the magnetopause line.
zorder : float
Height order of this plot object.
NoonTop : bool
When True, the plot is oriented such that noon is at the top
otherwise, noon is to the left of the plot.
'''
f=2.06873-0.00279*DistInd
Rsm=f*Rsun**(1.0/3.0)
PlotShueMPYZ(fig,Rsm,0.5,color,lw,zorder)
| 25.241573 | 98 | 0.707323 | 755 | 4,493 | 4.209272 | 0.137748 | 0.031466 | 0.07489 | 0.015104 | 0.94399 | 0.923851 | 0.908748 | 0.88326 | 0.856199 | 0.841724 | 0 | 0.042861 | 0.184732 | 4,493 | 177 | 99 | 25.384181 | 0.824734 | 0.750056 | 0 | 0.285714 | 0 | 0 | 0.02765 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.214286 | false | 0 | 0.035714 | 0 | 0.25 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
89f558e84df3dda768871fc57a0767fcae2007e7 | 1,742 | py | Python | srv6_sdn_control_plane/northbound/grpc/tunnel_mode.py | everywan-io/srv6-sdn-control-plane | afb7ce82571c852f784b763b8dec766b75f350fd | [
"Apache-2.0"
] | null | null | null | srv6_sdn_control_plane/northbound/grpc/tunnel_mode.py | everywan-io/srv6-sdn-control-plane | afb7ce82571c852f784b763b8dec766b75f350fd | [
"Apache-2.0"
] | null | null | null | srv6_sdn_control_plane/northbound/grpc/tunnel_mode.py | everywan-io/srv6-sdn-control-plane | afb7ce82571c852f784b763b8dec766b75f350fd | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
class TunnelMode(object):
def __init__(self, name):
self.name = name
def init_overlay_data(self, overlayid,
overlay_name, tenantid, overlay_info):
pass
def init_tunnel_mode(self, deviceid, tenantid, overlay_info):
pass
def init_overlay(self, overlayid, overlay_name,
overlay_type, tenantid, deviceid, overlay_info):
pass
def add_slice_to_overlay(self, overlayid, overlay_name,
deviceid, interface_name, tenantid, overlay_info):
pass
def create_tunnel(self, overlayid, overlay_name, overlay_type,
l_slice, r_slice, tenantid, overlay_info):
pass
def destroy_overlay_data(self, overlayid,
overlay_name, tenantid, overlay_info,
ignore_errors=False):
pass
def destroy_tunnel_mode(self, deviceid, tenantid, overlay_info,
ignore_errors=False):
pass
def destroy_overlay(self, overlayid, overlay_name,
overlay_type, tenantid, deviceid, overlay_info,
ignore_errors=False):
pass
def remove_slice_from_overlay(self, overlayid, overlay_name,
deviceid, interface_name,
tenantid, overlay_info,
ignore_errors=False):
pass
def remove_tunnel(self, overlayid, overlay_name, overlay_type,
l_slice, r_slice, tenantid, overlay_info,
ignore_errors=False):
pass
def get_overlays(self):
raise NotImplementedError
| 31.672727 | 79 | 0.572331 | 172 | 1,742 | 5.47093 | 0.215116 | 0.116897 | 0.170032 | 0.204038 | 0.845909 | 0.83847 | 0.807651 | 0.740701 | 0.676939 | 0.450584 | 0 | 0 | 0.365098 | 1,742 | 54 | 80 | 32.259259 | 0.850814 | 0.009185 | 0 | 0.384615 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.307692 | false | 0.25641 | 0 | 0 | 0.333333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 7 |
d61778da8095d7f6866dc4004153c8f6b9f4d714 | 7,441 | py | Python | servers/hr_monitor/src/tests/test_data_model.py | arpitgogia/mars_city | 30cacd80487a8c2354bbc15b4fad211ed1cb4f9d | [
"BSD-2-Clause-FreeBSD"
] | 25 | 2016-07-20T04:49:14.000Z | 2021-08-25T09:05:04.000Z | servers/hr_monitor/src/tests/test_data_model.py | arpitgogia/mars_city | 30cacd80487a8c2354bbc15b4fad211ed1cb4f9d | [
"BSD-2-Clause-FreeBSD"
] | 16 | 2016-12-27T08:30:27.000Z | 2018-06-18T08:51:44.000Z | servers/hr_monitor/src/tests/test_data_model.py | arpitgogia/mars_city | 30cacd80487a8c2354bbc15b4fad211ed1cb4f9d | [
"BSD-2-Clause-FreeBSD"
] | 49 | 2016-07-20T13:08:27.000Z | 2020-06-02T18:26:12.000Z | #! /usr/bin/env python
from __future__ import division
import sys
import unittest
from datetime import datetime, timedelta
from random import uniform, randint, choice
sys.path.append("../")
sys.path.append("../../")
from src.data_model import Datapoint, Alarm
class DatapointTests(unittest.TestCase):
def test_no_millisec(self):
etimestamp = datetime.now()
emillisecs = etimestamp.microsecond / 1000
ehr = randint(30, 240)
eacc_x = uniform(0, 16)
eacc_y = uniform(0, 16)
eacc_z = uniform(0, 16)
eacc_magn = (eacc_x ** 2 + eacc_y ** 2 + eacc_z ** 2) ** 0.5
dp = Datapoint(etimestamp, ehr, eacc_x, eacc_y, eacc_z)
self.assertEqual(etimestamp, dp.timestamp)
self.assertEqual(emillisecs, dp.millisecond)
self.assertAlmostEqual(ehr, dp.hr)
self.assertAlmostEqual(eacc_x, dp.acc_x)
self.assertAlmostEqual(eacc_y, dp.acc_y)
self.assertAlmostEqual(eacc_z, dp.acc_z)
self.assertAlmostEqual(eacc_magn, dp.acc_magn)
def test_millisec(self):
etimestamp = datetime.now()
emillisecs = etimestamp.microsecond / 1000
ehr = randint(30, 240)
eacc_x = uniform(0, 16)
eacc_y = uniform(0, 16)
eacc_z = uniform(0, 16)
eacc_magn = (eacc_x ** 2 + eacc_y ** 2 + eacc_z ** 2) ** 0.5
dp = Datapoint(etimestamp, ehr, eacc_x, eacc_y, eacc_z, emillisecs)
self.assertEqual(etimestamp, dp.timestamp)
self.assertEqual(emillisecs, dp.millisecond)
self.assertAlmostEqual(ehr, dp.hr)
self.assertAlmostEqual(eacc_x, dp.acc_x)
self.assertAlmostEqual(eacc_y, dp.acc_y)
self.assertAlmostEqual(eacc_z, dp.acc_z)
self.assertAlmostEqual(eacc_magn, dp.acc_magn)
def test_repr(self):
etimestamp = datetime.now()
emillisecs = etimestamp.microsecond / 1000
ehr = randint(30, 240)
eacc_x = uniform(0, 16)
eacc_y = uniform(0, 16)
eacc_z = uniform(0, 16)
eacc_magn = (eacc_x ** 2 + eacc_y ** 2 + eacc_z ** 2) ** 0.5
dp = Datapoint(etimestamp, ehr, eacc_x, eacc_y, eacc_z, emillisecs)
self.assertEqual(dp.__repr__(),
"<Datapoint('%s','%s','%s','%s','%s','%s')>"
% (etimestamp, ehr, eacc_x, eacc_y, eacc_z,
eacc_magn))
class AlarmTests(unittest.TestCase):
def test_timestamp_millisec(self):
etimestamp = datetime.now()
emillisecs = etimestamp.microsecond / 1000
ealarm_lvl = randint(30, 240)
esgmt_begin = uniform(0, 16)
esgmt_end = uniform(0, 16)
chars = ''.join(chr(x) for x in range(65, 122))
size = 20
ebitmp1 = ''.join(choice(chars) for x in range(size))
ebitmp2 = ''.join(choice(chars) for x in range(size))
alarm = Alarm(ealarm_lvl, esgmt_begin, esgmt_end,
ebitmp1, ebitmp2, etimestamp, emillisecs)
self.assertEqual(etimestamp, alarm.timestamp)
self.assertEqual(emillisecs, alarm.millisecond)
self.assertAlmostEqual(ealarm_lvl, alarm.alarm_lvl)
self.assertAlmostEqual(esgmt_begin, alarm.sgmt_begin)
self.assertAlmostEqual(esgmt_end, alarm.sgmt_end)
self.assertAlmostEqual(ebitmp1, alarm.bitmp1)
self.assertAlmostEqual(ebitmp2, alarm.bitmp2)
def test_timestamp_no_millisec(self):
etimestamp = datetime.now()
emillisecs = etimestamp.microsecond / 1000
ealarm_lvl = randint(30, 240)
esgmt_begin = uniform(0, 16)
esgmt_end = uniform(0, 16)
chars = ''.join(chr(x) for x in range(65, 122))
size = 20
ebitmp1 = ''.join(choice(chars) for x in range(size))
ebitmp2 = ''.join(choice(chars) for x in range(size))
alarm = Alarm(ealarm_lvl, esgmt_begin, esgmt_end,
ebitmp1, ebitmp2, etimestamp)
self.assertEqual(etimestamp, alarm.timestamp)
self.assertEqual(emillisecs, alarm.millisecond)
self.assertAlmostEqual(ealarm_lvl, alarm.alarm_lvl)
self.assertAlmostEqual(esgmt_begin, alarm.sgmt_begin)
self.assertAlmostEqual(esgmt_end, alarm.sgmt_end)
self.assertAlmostEqual(ebitmp1, alarm.bitmp1)
self.assertAlmostEqual(ebitmp2, alarm.bitmp2)
def test_no_timestamp_millisec(self):
etimestamp = datetime.now()
emillisecs = etimestamp.microsecond / 1000
ealarm_lvl = randint(30, 240)
esgmt_begin = uniform(0, 16)
esgmt_end = uniform(0, 16)
chars = ''.join(chr(x) for x in range(65, 122))
size = 20
ebitmp1 = ''.join(choice(chars) for x in range(size))
ebitmp2 = ''.join(choice(chars) for x in range(size))
alarm = Alarm(ealarm_lvl, esgmt_begin, esgmt_end,
ebitmp1, ebitmp2, millisecond=emillisecs)
self.assertAlmostEqual(
float((etimestamp
- timedelta(microseconds=etimestamp.microsecond))
.strftime('%s.%f')),
float(alarm.timestamp.strftime('%s.%f')),
delta=1)
self.assertEqual(emillisecs, alarm.millisecond)
self.assertAlmostEqual(ealarm_lvl, alarm.alarm_lvl)
self.assertAlmostEqual(esgmt_begin, alarm.sgmt_begin)
self.assertAlmostEqual(esgmt_end, alarm.sgmt_end)
self.assertAlmostEqual(ebitmp1, alarm.bitmp1)
self.assertAlmostEqual(ebitmp2, alarm.bitmp2)
def test_no_timestamp_no_millisec(self):
etimestamp = datetime.now()
emillisecs = etimestamp.microsecond / 1000
ealarm_lvl = randint(30, 240)
esgmt_begin = uniform(0, 16)
esgmt_end = uniform(0, 16)
chars = ''.join(chr(x) for x in range(65, 122))
size = 20
ebitmp1 = ''.join(choice(chars) for x in range(size))
ebitmp2 = ''.join(choice(chars) for x in range(size))
alarm = Alarm(ealarm_lvl, esgmt_begin, esgmt_end, ebitmp1, ebitmp2)
self.assertAlmostEqual(
float((etimestamp
- timedelta(microseconds=etimestamp.microsecond))
.strftime('%s.%f')),
float(alarm.timestamp.strftime('%s.%f')),
delta=1)
self.assertAlmostEqual(emillisecs, alarm.millisecond, delta=1)
self.assertAlmostEqual(ealarm_lvl, alarm.alarm_lvl)
self.assertAlmostEqual(esgmt_begin, alarm.sgmt_begin)
self.assertAlmostEqual(esgmt_end, alarm.sgmt_end)
self.assertAlmostEqual(ebitmp1, alarm.bitmp1)
self.assertAlmostEqual(ebitmp2, alarm.bitmp2)
def test_repr(self):
etimestamp = datetime.now()
emillisecs = etimestamp.microsecond / 1000
ealarm_lvl = randint(30, 240)
esgmt_begin = uniform(0, 16)
esgmt_end = uniform(0, 16)
chars = ''.join(chr(x) for x in range(65, 122))
size = 20
ebitmp1 = ''.join(choice(chars) for x in range(size))
ebitmp2 = ''.join(choice(chars) for x in range(size))
alarm = Alarm(ealarm_lvl, esgmt_begin, esgmt_end,
ebitmp1, ebitmp2, etimestamp, emillisecs)
self.assertEqual(alarm.__repr__(),
"<Alarm('%s','%s', '%s', '%s')>"
% (etimestamp, ealarm_lvl,
esgmt_begin, esgmt_end))
if __name__ == '__main__':
unittest.main()
| 38.554404 | 75 | 0.614837 | 873 | 7,441 | 5.074456 | 0.099656 | 0.156433 | 0.042889 | 0.037246 | 0.908804 | 0.904289 | 0.898194 | 0.898194 | 0.891874 | 0.891874 | 0 | 0.040184 | 0.270931 | 7,441 | 192 | 76 | 38.755208 | 0.776406 | 0.002822 | 0 | 0.803797 | 0 | 0 | 0.014692 | 0.005661 | 0 | 0 | 0 | 0 | 0.278481 | 1 | 0.050633 | false | 0 | 0.037975 | 0 | 0.101266 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
d62b28d5779f4097d90ba47b536fe790fedb0af8 | 17,804 | py | Python | test/test_SM/test_find_kontrol_only_actual.py | IrinaSlobodchikova/marker | 72f981134fb025a94348cd2bc829fa8430a01372 | [
"Apache-2.0"
] | null | null | null | test/test_SM/test_find_kontrol_only_actual.py | IrinaSlobodchikova/marker | 72f981134fb025a94348cd2bc829fa8430a01372 | [
"Apache-2.0"
] | null | null | null | test/test_SM/test_find_kontrol_only_actual.py | IrinaSlobodchikova/marker | 72f981134fb025a94348cd2bc829fa8430a01372 | [
"Apache-2.0"
] | null | null | null |
#global l
#l = ('Сегодня', 'Вчера', 'Последние 7 дней', 'Текущий месяц', 'Прошлый месяц', 'Текущий квартал',
# 'Прошлый квартал', 'Текущий год', 'Прошлый год', 'Выбрать период...')
# rostelecom@rt.ru
def test_sm_find_kontrol_by_text_data_nachala_today_actual(app):
app.testhelpersm.refresh_page()
app.session.open_SM_page(app.smKontrol)
app.session.ensure_login_sm(app.username, app.password)
app.session.ensure_login_sm(app.username, app.password)
app.session.open_SM_page(app.smKontrol)
app.testHelperSMSearch.expand_show_hide()
# Искать в контейнере (всего контейнеров + 1, номер контейнера(если 0 - случайный выбор), номер строки
# в контейнере если 0 - случайный выбор)
#s = app.testhelpersm.find_in_container_number(6, 0, 0)
#app.testHelperSMSearch.enter_text_in_seach_field("колбаса")
l = ('Сегодня', 'Вчера', 'Последние 7 дней', 'Текущий месяц', 'Прошлый месяц', 'Текущий квартал',
'Прошлый квартал', 'Текущий год', 'Прошлый год', 'За весь период', 'Выбрать период...')
app.testHelperSMSearch.select_data_nachala(l[0], 1)
app.testHelperSMSearch.press_search_button()
#if app.testhelpersm.check_results() == '0':
# tr = 1
# while app.testhelpersm.check_results() == '0' and tr < 20:
# app.session.open_SM_page(app.smParticipants)
# s = app.testhelpersm.find_in_container_number(6, 0, 0)
# tr = tr + 1
old_result = app.testHelperSMSearch.check_results()
app.testHelperSMSearch.select_data_nachala(l[0], 1)
app.testHelperSMSearch.select_actual_only()
app.testHelperSMSearch.press_search_button()
new_result = app.testHelperSMSearch.check_results()
assert int(new_result) != 0
assert int(old_result) != 0
assert int(old_result) > int(new_result)
def test_sm_find_kontrol_by_text_data_nachala_yestoday_actual(app):
app.testhelpersm.refresh_page()
app.session.open_SM_page(app.smKontrol)
app.session.ensure_login_sm(app.username, app.password)
app.session.ensure_login_sm(app.username, app.password)
app.session.open_SM_page(app.smKontrol)
app.testHelperSMSearch.expand_show_hide()
# Искать в контейнере (всего контейнеров + 1, номер контейнера(если 0 - случайный выбор), номер строки
# в контейнере если 0 - случайный выбор)
#s = app.testhelpersm.find_in_container_number(6, 0, 0)
#app.testHelperSMSearch.enter_text_in_seach_field("колбаса")
l = ('Сегодня', 'Вчера', 'Последние 7 дней', 'Текущий месяц', 'Прошлый месяц', 'Текущий квартал',
'Прошлый квартал', 'Текущий год', 'Прошлый год', 'За весь период', 'Выбрать период...')
app.testHelperSMSearch.select_data_nachala(l[1], 1)
app.testHelperSMSearch.press_search_button()
#if app.testhelpersm.check_results() == '0':
# tr = 1
# while app.testhelpersm.check_results() == '0' and tr < 20:
# app.session.open_SM_page(app.smParticipants)
# s = app.testhelpersm.find_in_container_number(6, 0, 0)
# tr = tr + 1
old_result = app.testHelperSMSearch.check_results()
app.testHelperSMSearch.select_data_nachala(l[1], 1)
app.testHelperSMSearch.select_actual_only()
app.testHelperSMSearch.press_search_button()
new_result = app.testHelperSMSearch.check_results()
assert int(new_result) != 0
assert int(old_result) != 0
assert int(old_result) > int(new_result)
def test_sm_find_kontrol_by_text_data_nachala_last_7_days_actual(app):
app.testhelpersm.refresh_page()
app.session.open_SM_page(app.smKontrol)
app.session.ensure_login_sm(app.username, app.password)
app.session.ensure_login_sm(app.username, app.password)
app.session.open_SM_page(app.smKontrol)
app.testHelperSMSearch.expand_show_hide()
# Искать в контейнере (всего контейнеров + 1, номер контейнера(если 0 - случайный выбор), номер строки
# в контейнере если 0 - случайный выбор)
#s = app.testhelpersm.find_in_container_number(6, 0, 0)
#app.testHelperSMSearch.enter_text_in_seach_field("колбаса")
l = ('Сегодня', 'Вчера', 'Последние 7 дней', 'Текущий месяц', 'Прошлый месяц', 'Текущий квартал',
'Прошлый квартал', 'Текущий год', 'Прошлый год', 'За весь период', 'Выбрать период...')
app.testHelperSMSearch.select_data_nachala(l[2], 1)
app.testHelperSMSearch.press_search_button()
#if app.testhelpersm.check_results() == '0':
# tr = 1
# while app.testhelpersm.check_results() == '0' and tr < 20:
# app.session.open_SM_page(app.smParticipants)
# s = app.testhelpersm.find_in_container_number(6, 0, 0)
# tr = tr + 1
old_result = app.testHelperSMSearch.check_results()
app.testHelperSMSearch.select_data_nachala(l[2], 1)
app.testHelperSMSearch.select_actual_only()
app.testHelperSMSearch.press_search_button()
new_result = app.testHelperSMSearch.check_results()
assert int(new_result) != 0
assert int(old_result) != 0
assert int(old_result) > int(new_result)
def test_sm_find_kontrol_by_text_data_nachala_current_month_actual(app):
app.testhelpersm.refresh_page()
app.session.open_SM_page(app.smKontrol)
app.session.ensure_login_sm(app.username, app.password)
app.session.ensure_login_sm(app.username, app.password)
app.session.open_SM_page(app.smKontrol)
app.testHelperSMSearch.expand_show_hide()
# Искать в контейнере (всего контейнеров + 1, номер контейнера(если 0 - случайный выбор), номер строки
# в контейнере если 0 - случайный выбор)
#s = app.testhelpersm.find_in_container_number(6, 0, 0)
app.testHelperSMSearch.enter_text_in_seach_field("колбаса")
l = ('Сегодня', 'Вчера', 'Последние 7 дней', 'Текущий месяц', 'Прошлый месяц', 'Текущий квартал',
'Прошлый квартал', 'Текущий год', 'Прошлый год', 'За весь период', 'Выбрать период...')
app.testHelperSMSearch.select_data_nachala(l[3], 1)
app.testHelperSMSearch.press_search_button()
#if app.testhelpersm.check_results() == '0':
# tr = 1
# while app.testhelpersm.check_results() == '0' and tr < 20:
# app.session.open_SM_page(app.smParticipants)
# s = app.testhelpersm.find_in_container_number(6, 0, 0)
# tr = tr + 1
old_result = app.testHelperSMSearch.check_results()
app.testHelperSMSearch.select_data_nachala(l[3], 1)
app.testHelperSMSearch.select_actual_only()
app.testHelperSMSearch.press_search_button()
new_result = app.testHelperSMSearch.check_results()
assert int(new_result) != 0
assert int(old_result) != 0
assert int(old_result) > int(new_result)
def test_sm_find_kontrol_by_text_data_nachala_prev_month_actual(app):
app.testhelpersm.refresh_page()
app.session.open_SM_page(app.smKontrol)
app.session.ensure_login_sm(app.username, app.password)
app.session.ensure_login_sm(app.username, app.password)
app.session.open_SM_page(app.smKontrol)
app.testHelperSMSearch.expand_show_hide()
# Искать в контейнере (всего контейнеров + 1, номер контейнера(если 0 - случайный выбор), номер строки
# в контейнере если 0 - случайный выбор)
#s = app.testhelpersm.find_in_container_number(6, 0, 0)
app.testHelperSMSearch.enter_text_in_seach_field("колбаса")
l = ('Сегодня', 'Вчера', 'Последние 7 дней', 'Текущий месяц', 'Прошлый месяц', 'Текущий квартал',
'Прошлый квартал', 'Текущий год', 'Прошлый год', 'За весь период', 'Выбрать период...')
app.testHelperSMSearch.select_data_nachala(l[4], 1)
app.testHelperSMSearch.press_search_button()
#if app.testhelpersm.check_results() == '0':
# tr = 1
# while app.testhelpersm.check_results() == '0' and tr < 20:
# app.session.open_SM_page(app.smParticipants)
# s = app.testhelpersm.find_in_container_number(6, 0, 0)
# tr = tr + 1
old_result = app.testHelperSMSearch.check_results()
app.testHelperSMSearch.select_data_nachala(l[4], 1)
app.testHelperSMSearch.select_actual_only()
app.testHelperSMSearch.press_search_button()
new_result = app.testHelperSMSearch.check_results()
assert int(new_result) != 0
assert int(old_result) != 0
assert int(old_result) > int(new_result)
def test_sm_find_kontrol_by_text_data_nachala_current_kvartal_actual(app):
app.testhelpersm.refresh_page()
app.session.open_SM_page(app.smKontrol)
app.session.ensure_login_sm(app.username, app.password)
app.session.ensure_login_sm(app.username, app.password)
app.session.open_SM_page(app.smKontrol)
app.testHelperSMSearch.expand_show_hide()
# Искать в контейнере (всего контейнеров + 1, номер контейнера(если 0 - случайный выбор), номер строки
# в контейнере если 0 - случайный выбор)
#s = app.testhelpersm.find_in_container_number(6, 0, 0)
app.testHelperSMSearch.enter_text_in_seach_field("колбаса")
l = ('Сегодня', 'Вчера', 'Последние 7 дней', 'Текущий месяц', 'Прошлый месяц', 'Текущий квартал',
'Прошлый квартал', 'Текущий год', 'Прошлый год', 'За весь период', 'Выбрать период...')
app.testHelperSMSearch.select_data_nachala(l[5], 1)
app.testHelperSMSearch.press_search_button()
#if app.testhelpersm.check_results() == '0':
# tr = 1
# while app.testhelpersm.check_results() == '0' and tr < 20:
# app.session.open_SM_page(app.smParticipants)
# s = app.testhelpersm.find_in_container_number(6, 0, 0)
# tr = tr + 1
old_result = app.testHelperSMSearch.check_results()
app.testHelperSMSearch.select_data_nachala(l[5], 1)
app.testHelperSMSearch.select_actual_only()
app.testHelperSMSearch.press_search_button()
new_result = app.testHelperSMSearch.check_results()
assert int(new_result) != 0
assert int(old_result) != 0
assert int(old_result) > int(new_result)
def test_sm_find_kontrol_by_text_data_nachala_prev_kvartal_actual(app):
app.testhelpersm.refresh_page()
app.session.open_SM_page(app.smKontrol)
app.session.ensure_login_sm(app.username, app.password)
app.session.ensure_login_sm(app.username, app.password)
app.session.open_SM_page(app.smKontrol)
app.testHelperSMSearch.expand_show_hide()
# Искать в контейнере (всего контейнеров + 1, номер контейнера(если 0 - случайный выбор), номер строки
# в контейнере если 0 - случайный выбор)
#s = app.testhelpersm.find_in_container_number(6, 0, 0)
app.testHelperSMSearch.enter_text_in_seach_field("колбаса")
l = ('Сегодня', 'Вчера', 'Последние 7 дней', 'Текущий месяц', 'Прошлый месяц', 'Текущий квартал',
'Прошлый квартал', 'Текущий год', 'Прошлый год', 'За весь период', 'Выбрать период...')
app.testHelperSMSearch.select_data_nachala(l[6], 1)
app.testHelperSMSearch.press_search_button()
#if app.testhelpersm.check_results() == '0':
# tr = 1
# while app.testhelpersm.check_results() == '0' and tr < 20:
# app.session.open_SM_page(app.smParticipants)
# s = app.testhelpersm.find_in_container_number(6, 0, 0)
# tr = tr + 1
old_result = app.testHelperSMSearch.check_results()
app.testHelperSMSearch.select_data_nachala(l[6], 1)
app.testHelperSMSearch.select_actual_only()
app.testHelperSMSearch.press_search_button()
new_result = app.testHelperSMSearch.check_results()
assert int(new_result) != 0
assert int(old_result) != 0
assert int(old_result) > int(new_result)
def test_sm_find_kontrol_by_text_data_current_year_actual(app):
app.testhelpersm.refresh_page()
app.session.open_SM_page(app.smKontrol)
app.session.ensure_login_sm(app.username, app.password)
app.session.ensure_login_sm(app.username, app.password)
app.session.open_SM_page(app.smKontrol)
app.testHelperSMSearch.expand_show_hide()
# Искать в контейнере (всего контейнеров + 1, номер контейнера(если 0 - случайный выбор), номер строки
# в контейнере если 0 - случайный выбор)
#s = app.testhelpersm.find_in_container_number(6, 0, 0)
app.testHelperSMSearch.enter_text_in_seach_field("колбаса")
l = ('Сегодня', 'Вчера', 'Последние 7 дней', 'Текущий месяц', 'Прошлый месяц', 'Текущий квартал',
'Прошлый квартал', 'Текущий год', 'Прошлый год', 'За весь период', 'За весь период', 'Выбрать период...')
app.testHelperSMSearch.select_data_nachala(l[7], 1)
app.testHelperSMSearch.press_search_button()
#if app.testhelpersm.check_results() == '0':
# tr = 1
# while app.testhelpersm.check_results() == '0' and tr < 20:
# app.session.open_SM_page(app.smParticipants)
# s = app.testhelpersm.find_in_container_number(6, 0, 0)
# tr = tr + 1
old_result = app.testHelperSMSearch.check_results()
app.testHelperSMSearch.select_data_nachala(l[7], 1)
app.testHelperSMSearch.select_actual_only()
app.testHelperSMSearch.press_search_button()
new_result = app.testHelperSMSearch.check_results()
assert int(new_result) != 0
assert int(old_result) != 0
assert int(old_result) > int(new_result)
def test_sm_find_kontrol_by_text_data_nachala_prev_year_actual(app):
app.testhelpersm.refresh_page()
app.session.open_SM_page(app.smKontrol)
app.session.ensure_login_sm(app.username, app.password)
app.session.ensure_login_sm(app.username, app.password)
app.session.open_SM_page(app.smKontrol)
app.testHelperSMSearch.expand_show_hide()
# Искать в контейнере (всего контейнеров + 1, номер контейнера(если 0 - случайный выбор), номер строки
# в контейнере если 0 - случайный выбор)
#s = app.testhelpersm.find_in_container_number(6, 0, 0)
app.testHelperSMSearch.enter_text_in_seach_field("колбаса")
l = ('Сегодня', 'Вчера', 'Последние 7 дней', 'Текущий месяц', 'Прошлый месяц', 'Текущий квартал',
'Прошлый квартал', 'Текущий год', 'Прошлый год', 'За весь период', 'Выбрать период...')
app.testHelperSMSearch.select_data_nachala(l[8], 1)
app.testHelperSMSearch.press_search_button()
#if app.testhelpersm.check_results() == '0':
# tr = 1
# while app.testhelpersm.check_results() == '0' and tr < 20:
# app.session.open_SM_page(app.smParticipants)
# s = app.testhelpersm.find_in_container_number(6, 0, 0)
# tr = tr + 1
old_result = app.testHelperSMSearch.check_results()
app.testHelperSMSearch.select_data_nachala(l[8], 1)
app.testHelperSMSearch.select_actual_only()
app.testHelperSMSearch.press_search_button()
new_result = app.testHelperSMSearch.check_results()
assert int(new_result) != 0
assert int(old_result) != 0
assert int(old_result) > int(new_result)
def test_sm_find_kontrol_by_text_data_nachala_for_all_period_actual(app):
app.testhelpersm.refresh_page()
app.session.open_SM_page(app.smKontrol)
app.session.ensure_login_sm(app.username, app.password)
app.session.ensure_login_sm(app.username, app.password)
app.session.open_SM_page(app.smKontrol)
app.testHelperSMSearch.expand_show_hide()
# Искать в контейнере (всего контейнеров + 1, номер контейнера(если 0 - случайный выбор), номер строки
# в контейнере если 0 - случайный выбор)
#s = app.testhelpersm.find_in_container_number(6, 0, 0)
app.testHelperSMSearch.enter_text_in_seach_field("колбаса")
l = ('Сегодня', 'Вчера', 'Последние 7 дней', 'Текущий месяц', 'Прошлый месяц', 'Текущий квартал',
'Прошлый квартал', 'Текущий год', 'Прошлый год', 'За весь период', 'Выбрать период...')
app.testHelperSMSearch.select_data_nachala(l[9], 1)
app.testHelperSMSearch.press_search_button()
#if app.testhelpersm.check_results() == '0':
# tr = 1
# while app.testhelpersm.check_results() == '0' and tr < 20:
# app.session.open_SM_page(app.smParticipants)
# s = app.testhelpersm.find_in_container_number(6, 0, 0)
# tr = tr + 1
old_result = app.testHelperSMSearch.check_results()
app.testHelperSMSearch.select_data_nachala(l[9], 1)
app.testHelperSMSearch.select_actual_only()
app.testHelperSMSearch.press_search_button()
new_result = app.testHelperSMSearch.check_results()
assert int(new_result) != 0
assert int(old_result) != 0
assert int(old_result) > int(new_result)
def test_sm_find_kontrol_by_text_data_nachala_select_period_actual(app):
app.testhelpersm.refresh_page()
app.session.open_SM_page(app.smKontrol)
app.session.ensure_login_sm(app.username, app.password)
app.session.ensure_login_sm(app.username, app.password)
app.session.open_SM_page(app.smKontrol)
app.testHelperSMSearch.expand_show_hide()
# Искать в контейнере (всего контейнеров + 1, номер контейнера(если 0 - случайный выбор), номер строки
# в контейнере если 0 - случайный выбор)
#s = app.testhelpersm.find_in_container_number(6, 0, 0)
app.testHelperSMSearch.enter_text_in_seach_field("колбаса")
l = ('Сегодня', 'Вчера', 'Последние 7 дней', 'Текущий месяц', 'Прошлый месяц', 'Текущий квартал',
'Прошлый квартал', 'Текущий год', 'Прошлый год', 'За весь период', 'Выбрать период...')
app.testHelperSMSearch.select_data_nachala(l[10], 1)
app.testHelperSMSearch.press_search_button()
#if app.testhelpersm.check_results() == '0':
# tr = 1
# while app.testhelpersm.check_results() == '0' and tr < 20:
# app.session.open_SM_page(app.smParticipants)
# s = app.testhelpersm.find_in_container_number(6, 0, 0)
# tr = tr + 1
old_result = app.testHelperSMSearch.check_results()
app.testHelperSMSearch.select_actual_only()
app.testHelperSMSearch.press_search_button()
new_result = app.testHelperSMSearch.check_results()
assert int(new_result) != 0
assert int(old_result) != 0
assert int(old_result) > int(new_result) | 53.146269 | 117 | 0.714671 | 2,351 | 17,804 | 5.165462 | 0.043811 | 0.169466 | 0.038043 | 0.043478 | 0.993659 | 0.993659 | 0.993659 | 0.993659 | 0.993659 | 0.990613 | 0 | 0.016396 | 0.167547 | 17,804 | 335 | 118 | 53.146269 | 0.802982 | 0.294428 | 0 | 0.939815 | 0 | 0 | 0.126606 | 0 | 0 | 0 | 0 | 0 | 0.152778 | 1 | 0.050926 | false | 0.101852 | 0 | 0 | 0.050926 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 8 |
c3995cdde73537e8f7587d921e0e606a61562739 | 34,680 | py | Python | pyaz/batch/job_schedule/__init__.py | py-az-cli/py-az-cli | 9a7dc44e360c096a5a2f15595353e9dad88a9792 | [
"MIT"
] | null | null | null | pyaz/batch/job_schedule/__init__.py | py-az-cli/py-az-cli | 9a7dc44e360c096a5a2f15595353e9dad88a9792 | [
"MIT"
] | null | null | null | pyaz/batch/job_schedule/__init__.py | py-az-cli/py-az-cli | 9a7dc44e360c096a5a2f15595353e9dad88a9792 | [
"MIT"
] | 1 | 2022-02-03T09:12:01.000Z | 2022-02-03T09:12:01.000Z | from ... pyaz_utils import _call_az
def create(account_endpoint=None, account_key=None, account_name=None, do_not_run_after=None, do_not_run_until=None, id=None, job_manager_task_command_line=None, job_manager_task_id=None, job_manager_task_resource_files=None, job_max_task_retry_count=None, job_max_wall_clock_time=None, json_file=None, max_parallel_tasks=None, metadata=None, on_all_tasks_complete=None, pool_id=None, priority=None, recurrence_interval=None, required_slots=None, start_window=None, uses_task_dependencies=None):
'''
Add a Batch job schedule to an account.
Optional Parameters:
- account_endpoint -- Batch service endpoint. Alternatively, set by environment variable: AZURE_BATCH_ENDPOINT
- account_key -- Batch account key. Alternatively, set by environment variable: AZURE_BATCH_ACCESS_KEY
- account_name -- Batch account name. Alternatively, set by environment variable: AZURE_BATCH_ACCOUNT
- do_not_run_after -- If you do not specify a doNotRunAfter time, and you are creating a recurring Job Schedule, the Job Schedule will remain active until you explicitly terminate it. Expected format is an ISO-8601 timestamp.
- do_not_run_until -- If you do not specify a doNotRunUntil time, the schedule becomes ready to create Jobs immediately. Expected format is an ISO-8601 timestamp.
- id -- Required. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an Account that differ only by case).
- job_manager_task_command_line -- Required. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables).
- job_manager_task_id -- Required. The ID can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters.
- job_manager_task_resource_files -- Files listed under this element are located in the Task's working directory. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. Space-separated resource references in filename=httpurl format.
- job_max_task_retry_count -- The maximum number of times each Task may be retried. The Batch service retries a Task if its exit code is nonzero. Note that this value specifically controls the number of retries. The Batch service will try each Task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries a Task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry Tasks. If the maximum retry count is -1, the Batch service retries Tasks without limit. The default value is 0 (no retries).
- job_max_wall_clock_time -- If the Job does not complete within the time limit, the Batch service terminates it and any Tasks that are still running. In this case, the termination reason will be MaxWallClockTimeExpiry. If this property is not specified, there is no time limit on how long the Job may run. Expected format is an ISO-8601 duration.
- json_file -- A file containing the cloud job schedule specification in JSON (formatted to match the respective REST API body). If this parameter is specified, all 'Cloud Job Schedule Arguments' are ignored.
- max_parallel_tasks -- The maximum number of tasks that can be executed in parallel for the job. The value of maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default value is -1, which means there's no limit to the number of tasks that can be run at once. You can update a job's maxParallelTasks after it has been created using the update job API. Default value: -1 .
- metadata -- The Batch service does not assign any meaning to metadata; it is solely for the use of user code. Space-separated values in 'key=value' format.
- on_all_tasks_complete -- The action the Batch service should take when all Tasks in a Job created under this schedule are in the completed state. Note that if a Job contains no Tasks, then all Tasks are considered complete. This option is therefore most commonly used with a Job Manager task; if you want to use automatic Job termination without a Job Manager, you should initially set onAllTasksComplete to noaction and update the Job properties to set onAllTasksComplete to terminatejob once you have finished adding Tasks. The default is noaction.
- pool_id -- The id of an existing pool. All the tasks of the job will run on the specified pool.
- priority -- The priority of Jobs created under this schedule. Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0. This priority is used as the default for all Jobs under the Job Schedule. You can update a Job's priority after it has been created using by using the update Job API.
- recurrence_interval -- Because a Job Schedule can have at most one active Job under it at any given time, if it is time to create a new Job under a Job Schedule, but the previous Job is still running, the Batch service will not create the new Job until the previous Job finishes. If the previous Job does not finish within the startWindow period of the new recurrenceInterval, then no new Job will be scheduled for that interval. For recurring Jobs, you should normally specify a jobManagerTask in the jobSpecification. If you do not use jobManagerTask, you will need an external process to monitor when Jobs are created, add Tasks to the Jobs and terminate the Jobs ready for the next recurrence. The default is that the schedule does not recur: one Job is created, within the startWindow after the doNotRunUntil time, and the schedule is complete as soon as that Job finishes. The minimum value is 1 minute. If you specify a lower value, the Batch service rejects the schedule with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). Expected format is an ISO-8601 duration.
- required_slots -- The number of scheduling slots that the Task requires to run. The default is 1. A Task can only be scheduled to run on a compute node if the node has enough free scheduling slots available. For multi-instance Tasks, this property is not supported and must not be specified.
- start_window -- If a Job is not created within the startWindow interval, then the 'opportunity' is lost; no Job will be created until the next recurrence of the schedule. If the schedule is recurring, and the startWindow is longer than the recurrence interval, then this is equivalent to an infinite startWindow, because the Job that is 'due' in one recurrenceInterval is not carried forward into the next recurrence interval. The default is infinite. The minimum value is 1 minute. If you specify a lower value, the Batch service rejects the schedule with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). Expected format is an ISO-8601 duration.
- uses_task_dependencies -- Whether Tasks in the Job can define dependencies on each other. The default is false. True if flag present.
'''
return _call_az("az batch job-schedule create", locals())
def delete(job_schedule_id, account_endpoint=None, account_key=None, account_name=None, if_match=None, if_modified_since=None, if_none_match=None, if_unmodified_since=None, yes=None):
'''
Required Parameters:
- job_schedule_id -- The ID of the Job Schedule to delete.
Optional Parameters:
- account_endpoint -- Batch service endpoint. Alternatively, set by environment variable: AZURE_BATCH_ENDPOINT
- account_key -- Batch account key. Alternatively, set by environment variable: AZURE_BATCH_ACCESS_KEY
- account_name -- Batch account name. Alternatively, set by environment variable: AZURE_BATCH_ACCOUNT
- if_match -- An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client.
- if_modified_since -- A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time.
- if_none_match -- An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client.
- if_unmodified_since -- A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time.
- yes -- Do not prompt for confirmation.
'''
return _call_az("az batch job-schedule delete", locals())
def show(job_schedule_id, account_endpoint=None, account_key=None, account_name=None, expand=None, if_match=None, if_modified_since=None, if_none_match=None, if_unmodified_since=None, select=None):
'''
Required Parameters:
- job_schedule_id -- The ID of the Job Schedule to get.
Optional Parameters:
- account_endpoint -- Batch service endpoint. Alternatively, set by environment variable: AZURE_BATCH_ENDPOINT
- account_key -- Batch account key. Alternatively, set by environment variable: AZURE_BATCH_ACCESS_KEY
- account_name -- Batch account name. Alternatively, set by environment variable: AZURE_BATCH_ACCOUNT
- expand -- An OData $expand clause.
- if_match -- An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client.
- if_modified_since -- A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time.
- if_none_match -- An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client.
- if_unmodified_since -- A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time.
- select -- An OData $select clause.
'''
return _call_az("az batch job-schedule show", locals())
def set(job_schedule_id, account_endpoint=None, account_key=None, account_name=None, do_not_run_after=None, do_not_run_until=None, if_match=None, if_modified_since=None, if_none_match=None, if_unmodified_since=None, job_manager_task_application_package_references=None, job_manager_task_command_line=None, job_manager_task_environment_settings=None, job_manager_task_id=None, job_manager_task_resource_files=None, job_metadata=None, json_file=None, max_parallel_tasks=None, metadata=None, on_all_tasks_complete=None, pool_id=None, priority=None, recurrence_interval=None, required_slots=None, start_window=None, uses_task_dependencies=None):
'''
Update the properties of a job schedule.
Required Parameters:
- job_schedule_id -- The ID of the Job Schedule to update.
Optional Parameters:
- account_endpoint -- Batch service endpoint. Alternatively, set by environment variable: AZURE_BATCH_ENDPOINT
- account_key -- Batch account key. Alternatively, set by environment variable: AZURE_BATCH_ACCESS_KEY
- account_name -- Batch account name. Alternatively, set by environment variable: AZURE_BATCH_ACCOUNT
- do_not_run_after -- If you do not specify a doNotRunAfter time, and you are creating a recurring Job Schedule, the Job Schedule will remain active until you explicitly terminate it. Expected format is an ISO-8601 timestamp.
- do_not_run_until -- If you do not specify a doNotRunUntil time, the schedule becomes ready to create Jobs immediately. Expected format is an ISO-8601 timestamp.
- if_match -- An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client.
- if_modified_since -- A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time.
- if_none_match -- An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client.
- if_unmodified_since -- A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time.
- job_manager_task_application_package_references -- Application Packages are downloaded and deployed to a shared directory, not the Task working directory. Therefore, if a referenced Application Package is already on the Compute Node, and is up to date, then it is not re-downloaded; the existing copy on the Compute Node is used. If a referenced Application Package cannot be installed, for example because the package has been deleted or because download failed, the Task fails. Space-separated application IDs with optional version in 'id[#version]' format.
- job_manager_task_command_line -- Required. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables).
- job_manager_task_environment_settings -- Space-separated values in 'key=value' format.
- job_manager_task_id -- Required. The ID can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters.
- job_manager_task_resource_files -- Files listed under this element are located in the Task's working directory. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. Space-separated resource references in filename=httpurl format.
- job_metadata -- The Batch service does not assign any meaning to metadata; it is solely for the use of user code. Space-separated values in 'key=value' format.
- json_file -- A file containing the job schedule patch parameter specification in JSON (formatted to match the respective REST API body). If this parameter is specified, all 'Job Schedule Arguments' are ignored.
- max_parallel_tasks -- The maximum number of tasks that can be executed in parallel for the job. The value of maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default value is -1, which means there's no limit to the number of tasks that can be run at once. You can update a job's maxParallelTasks after it has been created using the update job API. Default value: -1 .
- metadata -- If you do not specify this element, existing metadata is left unchanged. Space-separated values in 'key=value' format.
- on_all_tasks_complete -- The action the Batch service should take when all Tasks in a Job created under this schedule are in the completed state. Note that if a Job contains no Tasks, then all Tasks are considered complete. This option is therefore most commonly used with a Job Manager task; if you want to use automatic Job termination without a Job Manager, you should initially set onAllTasksComplete to noaction and update the Job properties to set onAllTasksComplete to terminatejob once you have finished adding Tasks. The default is noaction.
- pool_id -- The id of an existing pool. All the tasks of the job will run on the specified pool.
- priority -- The priority of Jobs created under this schedule. Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0. This priority is used as the default for all Jobs under the Job Schedule. You can update a Job's priority after it has been created using by using the update Job API.
- recurrence_interval -- Because a Job Schedule can have at most one active Job under it at any given time, if it is time to create a new Job under a Job Schedule, but the previous Job is still running, the Batch service will not create the new Job until the previous Job finishes. If the previous Job does not finish within the startWindow period of the new recurrenceInterval, then no new Job will be scheduled for that interval. For recurring Jobs, you should normally specify a jobManagerTask in the jobSpecification. If you do not use jobManagerTask, you will need an external process to monitor when Jobs are created, add Tasks to the Jobs and terminate the Jobs ready for the next recurrence. The default is that the schedule does not recur: one Job is created, within the startWindow after the doNotRunUntil time, and the schedule is complete as soon as that Job finishes. The minimum value is 1 minute. If you specify a lower value, the Batch service rejects the schedule with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). Expected format is an ISO-8601 duration.
- required_slots -- The number of scheduling slots that the Task requires to run. The default is 1. A Task can only be scheduled to run on a compute node if the node has enough free scheduling slots available. For multi-instance Tasks, this property is not supported and must not be specified.
- start_window -- If a Job is not created within the startWindow interval, then the 'opportunity' is lost; no Job will be created until the next recurrence of the schedule. If the schedule is recurring, and the startWindow is longer than the recurrence interval, then this is equivalent to an infinite startWindow, because the Job that is 'due' in one recurrenceInterval is not carried forward into the next recurrence interval. The default is infinite. The minimum value is 1 minute. If you specify a lower value, the Batch service rejects the schedule with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). Expected format is an ISO-8601 duration.
- uses_task_dependencies -- Whether Tasks in the Job can define dependencies on each other. The default is false. Specify either 'true' or 'false' to update the property.
'''
return _call_az("az batch job-schedule set", locals())
def reset(job_schedule_id, account_endpoint=None, account_key=None, account_name=None, do_not_run_after=None, do_not_run_until=None, if_match=None, if_modified_since=None, if_none_match=None, if_unmodified_since=None, job_manager_task_application_package_references=None, job_manager_task_command_line=None, job_manager_task_environment_settings=None, job_manager_task_id=None, job_manager_task_resource_files=None, job_metadata=None, json_file=None, max_parallel_tasks=None, metadata=None, on_all_tasks_complete=None, pool_id=None, priority=None, recurrence_interval=None, required_slots=None, start_window=None, uses_task_dependencies=None):
'''
Reset the properties of a job schedule. An updated job specification only applies to new jobs.
Required Parameters:
- job_schedule_id -- The ID of the Job Schedule to update.
Optional Parameters:
- account_endpoint -- Batch service endpoint. Alternatively, set by environment variable: AZURE_BATCH_ENDPOINT
- account_key -- Batch account key. Alternatively, set by environment variable: AZURE_BATCH_ACCESS_KEY
- account_name -- Batch account name. Alternatively, set by environment variable: AZURE_BATCH_ACCOUNT
- do_not_run_after -- If you do not specify a doNotRunAfter time, and you are creating a recurring Job Schedule, the Job Schedule will remain active until you explicitly terminate it. Expected format is an ISO-8601 timestamp.
- do_not_run_until -- If you do not specify a doNotRunUntil time, the schedule becomes ready to create Jobs immediately. Expected format is an ISO-8601 timestamp.
- if_match -- An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client.
- if_modified_since -- A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time.
- if_none_match -- An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client.
- if_unmodified_since -- A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time.
- job_manager_task_application_package_references -- Application Packages are downloaded and deployed to a shared directory, not the Task working directory. Therefore, if a referenced Application Package is already on the Compute Node, and is up to date, then it is not re-downloaded; the existing copy on the Compute Node is used. If a referenced Application Package cannot be installed, for example because the package has been deleted or because download failed, the Task fails. Space-separated application IDs with optional version in 'id[#version]' format.
- job_manager_task_command_line -- Required. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables).
- job_manager_task_environment_settings -- Space-separated values in 'key=value' format.
- job_manager_task_id -- Required. The ID can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters.
- job_manager_task_resource_files -- Files listed under this element are located in the Task's working directory. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. Space-separated resource references in filename=httpurl format.
- job_metadata -- The Batch service does not assign any meaning to metadata; it is solely for the use of user code. Space-separated values in 'key=value' format.
- json_file -- A file containing the job schedule update parameter specification in JSON (formatted to match the respective REST API body). If this parameter is specified, all 'Job Schedule Arguments' are ignored.
- max_parallel_tasks -- The maximum number of tasks that can be executed in parallel for the job. The value of maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default value is -1, which means there's no limit to the number of tasks that can be run at once. You can update a job's maxParallelTasks after it has been created using the update job API. Default value: -1 .
- metadata -- If you do not specify this element, it takes the default value of an empty list; in effect, any existing metadata is deleted. Space-separated values in 'key=value' format.
- on_all_tasks_complete -- The action the Batch service should take when all Tasks in a Job created under this schedule are in the completed state. Note that if a Job contains no Tasks, then all Tasks are considered complete. This option is therefore most commonly used with a Job Manager task; if you want to use automatic Job termination without a Job Manager, you should initially set onAllTasksComplete to noaction and update the Job properties to set onAllTasksComplete to terminatejob once you have finished adding Tasks. The default is noaction.
- pool_id -- The id of an existing pool. All the tasks of the job will run on the specified pool.
- priority -- The priority of Jobs created under this schedule. Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0. This priority is used as the default for all Jobs under the Job Schedule. You can update a Job's priority after it has been created using by using the update Job API.
- recurrence_interval -- Because a Job Schedule can have at most one active Job under it at any given time, if it is time to create a new Job under a Job Schedule, but the previous Job is still running, the Batch service will not create the new Job until the previous Job finishes. If the previous Job does not finish within the startWindow period of the new recurrenceInterval, then no new Job will be scheduled for that interval. For recurring Jobs, you should normally specify a jobManagerTask in the jobSpecification. If you do not use jobManagerTask, you will need an external process to monitor when Jobs are created, add Tasks to the Jobs and terminate the Jobs ready for the next recurrence. The default is that the schedule does not recur: one Job is created, within the startWindow after the doNotRunUntil time, and the schedule is complete as soon as that Job finishes. The minimum value is 1 minute. If you specify a lower value, the Batch service rejects the schedule with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). Expected format is an ISO-8601 duration.
- required_slots -- The number of scheduling slots that the Task requires to run. The default is 1. A Task can only be scheduled to run on a compute node if the node has enough free scheduling slots available. For multi-instance Tasks, this property is not supported and must not be specified.
- start_window -- If a Job is not created within the startWindow interval, then the 'opportunity' is lost; no Job will be created until the next recurrence of the schedule. If the schedule is recurring, and the startWindow is longer than the recurrence interval, then this is equivalent to an infinite startWindow, because the Job that is 'due' in one recurrenceInterval is not carried forward into the next recurrence interval. The default is infinite. The minimum value is 1 minute. If you specify a lower value, the Batch service rejects the schedule with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). Expected format is an ISO-8601 duration.
- uses_task_dependencies -- Whether Tasks in the Job can define dependencies on each other. The default is false. True if flag present.
'''
return _call_az("az batch job-schedule reset", locals())
def disable(job_schedule_id, account_endpoint=None, account_key=None, account_name=None, if_match=None, if_modified_since=None, if_none_match=None, if_unmodified_since=None):
'''
Required Parameters:
- job_schedule_id -- The ID of the Job Schedule to disable.
Optional Parameters:
- account_endpoint -- Batch service endpoint. Alternatively, set by environment variable: AZURE_BATCH_ENDPOINT
- account_key -- Batch account key. Alternatively, set by environment variable: AZURE_BATCH_ACCESS_KEY
- account_name -- Batch account name. Alternatively, set by environment variable: AZURE_BATCH_ACCOUNT
- if_match -- An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client.
- if_modified_since -- A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time.
- if_none_match -- An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client.
- if_unmodified_since -- A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time.
'''
return _call_az("az batch job-schedule disable", locals())
def enable(job_schedule_id, account_endpoint=None, account_key=None, account_name=None, if_match=None, if_modified_since=None, if_none_match=None, if_unmodified_since=None):
'''
Required Parameters:
- job_schedule_id -- The ID of the Job Schedule to enable.
Optional Parameters:
- account_endpoint -- Batch service endpoint. Alternatively, set by environment variable: AZURE_BATCH_ENDPOINT
- account_key -- Batch account key. Alternatively, set by environment variable: AZURE_BATCH_ACCESS_KEY
- account_name -- Batch account name. Alternatively, set by environment variable: AZURE_BATCH_ACCOUNT
- if_match -- An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client.
- if_modified_since -- A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time.
- if_none_match -- An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client.
- if_unmodified_since -- A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time.
'''
return _call_az("az batch job-schedule enable", locals())
def stop(job_schedule_id, account_endpoint=None, account_key=None, account_name=None, if_match=None, if_modified_since=None, if_none_match=None, if_unmodified_since=None):
'''
Required Parameters:
- job_schedule_id -- The ID of the Job Schedule to terminates.
Optional Parameters:
- account_endpoint -- Batch service endpoint. Alternatively, set by environment variable: AZURE_BATCH_ENDPOINT
- account_key -- Batch account key. Alternatively, set by environment variable: AZURE_BATCH_ACCESS_KEY
- account_name -- Batch account name. Alternatively, set by environment variable: AZURE_BATCH_ACCOUNT
- if_match -- An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client.
- if_modified_since -- A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time.
- if_none_match -- An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client.
- if_unmodified_since -- A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time.
'''
return _call_az("az batch job-schedule stop", locals())
def list(account_endpoint=None, account_key=None, account_name=None, expand=None, filter=None, select=None):
'''
Optional Parameters:
- account_endpoint -- Batch service endpoint. Alternatively, set by environment variable: AZURE_BATCH_ENDPOINT
- account_key -- Batch account key. Alternatively, set by environment variable: AZURE_BATCH_ACCESS_KEY
- account_name -- Batch account name. Alternatively, set by environment variable: AZURE_BATCH_ACCOUNT
- expand -- An OData $expand clause.
- filter -- An OData $filter clause. For more information on constructing this filter, see https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-job-schedules.
- select -- An OData $select clause.
'''
return _call_az("az batch job-schedule list", locals())
| 158.356164 | 1,125 | 0.788033 | 5,557 | 34,680 | 4.829044 | 0.071801 | 0.022955 | 0.01513 | 0.018781 | 0.950475 | 0.946227 | 0.939631 | 0.936165 | 0.936165 | 0.936165 | 0 | 0.005404 | 0.167676 | 34,680 | 218 | 1,126 | 159.082569 | 0.924268 | 0.880565 | 0 | 0 | 0 | 0 | 0.070619 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.473684 | false | 0 | 0.052632 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 11 |
615c6cd80626980f9281fb90bdb989c964f642f2 | 10,908 | py | Python | test.py | EE559DeepLearningEPFL/Project2 | b6c5b0716fa40e4d466ab91ba1fec73b9d654a57 | [
"MIT"
] | null | null | null | test.py | EE559DeepLearningEPFL/Project2 | b6c5b0716fa40e4d466ab91ba1fec73b9d654a57 | [
"MIT"
] | null | null | null | test.py | EE559DeepLearningEPFL/Project2 | b6c5b0716fa40e4d466ab91ba1fec73b9d654a57 | [
"MIT"
] | 1 | 2021-05-30T09:29:25.000Z | 2021-05-30T09:29:25.000Z | import torch
import math
from layer_module import Module
from neural_network import NeuralNet
import matplotlib.pyplot as plt
# device = 'cuda:0' if torch.cuda.is_available() else 'cpu'
device = 'cpu'
dtype = torch.float32
print("-------------------------------------------------------")
print("----------- Single layer module (GD)-------------------")
print("-------------------------------------------------------")
# training data
nb=64
data_input = torch.empty((nb, 2), dtype=dtype, device=device).uniform_(0, 1)
data_target = ((data_input-0.5).norm(p=2, dim=1, keepdim=True)<math.sqrt(1/2/math.pi))*1
print("Training data:")
print(" Input size:", data_input.size(), " target size:", data_target.size())
print(" ")
mod2 = Module(layer_type='Linear',
if_batchnorm=False,
activation_type='relu',
params_shape=(2, 1),
dtype=dtype, device=device)
print("Module information:")
mod2.print_module()
print(" ")
lr = 4e-3
reg = 0.1
loss_arr = []
for i in range(30):
output, cache = mod2.forward(data_input, mode='train')
loss, d_loss = mod2.loss(output, data_target, reg)
loss_arr.append(loss.item())
d_output, d_params = mod2.backward(d_loss, cache)
mod2.update_params(d_params, lr, reg)
output, _ = mod2.forward(data_input, mode='test')
print("learning_rate = {}, regularization = {}, num_iteration = {}".format(lr, reg, 30))
print(" ")
print("accuracy on training set is", torch.mean(1.0*((output>0.5)==data_target)).item())
print(" ")
fig = plt.figure(figsize=(7, 4))
plt.plot(loss_arr)
plt.show()
nb=64
data_input = torch.empty((nb, 2), dtype=dtype, device=device).uniform_(0, 1)
data_target = ((data_input-0.5).norm(p=2, dim=1, keepdim=True)<math.sqrt(1/2/math.pi))*1
print("Testing data:")
print(" Input size:", data_input.size(), " target size:", data_target.size())
output, _ = mod2.forward(data_input, mode='test')
print("accuracy on testing set is", torch.mean(1.0*((output>0.5)==data_target)).item())
print(" ")
print("-------------------------------------------------------")
print("---------------- End of section -----------------------")
print("-------------------------------------------------------")
input("Press Enter and move on to next section...")
print("-------------------------------------------------------")
print("------------ Sequential module (GD) -------------------")
print("-------------------------------------------------------")
# training data
nb=64
data_input = torch.empty((nb, 2), dtype=dtype, device=device).uniform_(0, 1)
data_target = ((data_input-0.5).norm(p=2, dim=1, keepdim=True)<math.sqrt(1/2/math.pi))*1
print("Training data:")
print(" Input size:", data_input.size(), " target size:", data_target.size())
print(" ")
mod3 = Module(layer_type='Sequential',
dtype=dtype, device=device)
mod3.append(Module(layer_type='Linear',
if_batchnorm=True,
activation_type='relu',
params_shape=(2, 100),
dtype=dtype, device=device))
mod3.append(Module(layer_type='Linear',
if_batchnorm=True,
activation_type='relu',
params_shape=(100, 50),
dtype=dtype, device=device))
mod3.append(Module(layer_type='Linear',
if_batchnorm=True,
activation_type='relu',
params_shape=(50, 20),
dtype=dtype, device=device))
mod3.append(Module(layer_type='Linear',
if_batchnorm=False,
activation_type=None,
params_shape=(20, 1),
dtype=dtype, device=device))
print("Module information:")
mod3.print_module()
print(" ")
loss_arr = []
for i in range(30):
output, cache = mod3.forward(data_input, mode='train')
loss, d_loss = mod3.loss(output, data_target, reg)
# print("Loss is {:.3f}".format(loss.item()))
loss_arr.append(loss.item())
d_input, d_params = mod3.backward(d_loss, cache)
# print(d_params)
mod3.update_params(d_params, lr, reg)
print("learning_rate = {}, regularization = {}, num_iteration = {}".format(lr, reg, 30))
print(" ")
output, _ = mod3.forward(data_input, mode='test')
print("accuracy on training set is", torch.mean(1.0*((output>0.5)==data_target)).item())
print(" ")
plt.plot(loss_arr)
plt.show()
nb=64
data_input = torch.empty((nb, 2), dtype=dtype, device=device).uniform_(0, 1)
data_target = ((data_input-0.5).norm(p=2, dim=1, keepdim=True)<math.sqrt(1/2/math.pi))*1
print("Testing data:")
print(" Input size:", data_input.size(), " target size:", data_target.size())
output, _ = mod3.forward(data_input, mode='test')
print("accuracy on testing set is", torch.mean(1.0*((output>0.5)==data_target)).item())
print(" ")
print("-------------------------------------------------------")
print("---------------- End of section -----------------------")
print("-------------------------------------------------------")
input("Press Enter and move on to next section...")
print("-------------------------------------------------------")
print("------------- Sequential module (SGD) -----------------")
print("-------------------------------------------------------")
# training data
nb=1000
data_input = torch.empty((nb, 2), dtype=dtype, device=device).uniform_(0, 1)
data_target = ((data_input-0.5).norm(p=2, dim=1, keepdim=True)<math.sqrt(1/2/math.pi))*1
print("Training data:")
print(" Input size:", data_input.size(), " target size:", data_target.size())
print(" ")
print("Sanity check")
fig, ax = plt.subplots(figsize=(5, 5))
circ = plt.Circle((0.5, 0.5), math.sqrt(1/2/math.pi), fill=False)
plt.scatter(data_input[:, 0].cpu(), data_input[:, 1].cpu())
plt.xlabel('x0')
plt.ylabel('x1')
plt.title('Scatter of input')
ax.add_patch(circ)
plt.show()
print('Average of train_target==1 is', torch.mean(data_target*1.0).item())
print(" ")
net1 = NeuralNet(layer_type='Sequential', learning_rate=2e-3,
regularization=0.05, iteration=1000, batch_size=64,
dtype=dtype, device=device)
net1.append(Module(layer_type='Linear',
if_batchnorm=True,
activation_type='relu',
params_shape=(2, 100),
dtype=dtype, device=device))
net1.append(Module(layer_type='Linear',
if_batchnorm=True,
activation_type='relu',
params_shape=(100, 50),
dtype=dtype, device=device))
net1.append(Module(layer_type='Linear',
if_batchnorm=True,
activation_type='relu',
params_shape=(50, 20),
dtype=dtype, device=device))
net1.append(Module(layer_type='Linear',
if_batchnorm=False,
activation_type='relu',
params_shape=(20, 1),
dtype=dtype, device=device))
print("Module information:")
net1.print_module()
print(" ")
print("learning_rate = {}, regularization = {}, ".format(net1.learning_rate, net1.regularization))
print("iteration = {}, batch_size = {}".format(net1.iteration, net1.batch_size))
print(" ")
loss_arr = net1.train(data_input, data_target)
plt.figure(figsize=(7, 4))
plt.plot(loss_arr)
plt.xlabel('iteration')
plt.ylabel('Loss')
plt.show()
output, _ = net1.forward(data_input, mode='test')
print("accuracy on training set is", torch.mean(1.0*((output>0.5)==data_target)).item())
print(" ")
test_input = torch.empty((nb, 2), dtype=dtype, device=device).uniform_(0, 1)
test_target = ((test_input-0.5).norm(p=2, dim=1, keepdim=True)<math.sqrt(1/2/math.pi))*1
output, _ = net1.forward(test_input, mode='test')
print("accuracy on testing set is", torch.mean(1.0*((output>0.5)==test_target)).item())
print(" ")
print("-------------------------------------------------------")
print("---------------- End of section -----------------------")
print("-------------------------------------------------------")
print("The next session is a neural network with 2 convolutional layers,")
print("It may take quite some time to finish.")
input("Press Enter and move on to next section...")
print("-------------------------------------------------------")
print("--------- Sequential module (SGD+Conv2d) --------------")
print("-------------------------------------------------------")
nb=500
data_input = torch.empty((nb, 3, 4, 4), dtype=dtype, device=device).uniform_(0, 1)
data_target = ((data_input.reshape(nb, -1)-0.5).norm(p=2, dim=1, keepdim=True)<2)*1
print("Training data:")
print(" Input size:", data_input.size(), " target size:", data_target.size())
print(' Average of train_target==1 is', torch.mean(data_target*1.0).item())
print(" ")
net2 = NeuralNet(layer_type='Sequential', learning_rate=2.1e-3,
regularization=0.22, iteration=400, batch_size=32,
dtype=dtype, device=device)
net2.append(Module(layer_type='Conv2d',
if_batchnorm=True,
activation_type='relu',
params_shape=(8, 3, 3, 3),
conv_param={'padding':1, 'stride':1},
dtype=dtype, device=device))
net2.append(Module(layer_type='Conv2d',
if_batchnorm=True,
activation_type='relu',
params_shape=(16, 8, 3, 3),
conv_param={'padding':1, 'stride':1},
dtype=dtype, device=device))
net2.append(Module(layer_type='Linear',
if_batchnorm=True,
activation_type='relu',
params_shape=(16*4*4, 100),
dtype=dtype, device=device))
net2.append(Module(layer_type='Linear',
if_batchnorm=False,
activation_type=None,
params_shape=(100, 1),
dtype=dtype, device=device))
print("Module information:")
net2.print_module()
print(" ")
print("learning_rate = {}, regularization = {}, ".format(net2.learning_rate, net2.regularization))
print("iteration = {}, batch_size = {}".format(net2.iteration, net2.batch_size))
print(" ")
loss_arr = net2.train(data_input, data_target)
plt.figure(figsize=(7, 4))
plt.plot(loss_arr)
plt.xlabel('iteration')
plt.ylabel('Loss')
plt.show()
output, _ = net2.forward(data_input, mode='test')
print("accuracy on training set is", torch.mean(1.0*((output>0.5)==data_target)).item())
print(" ")
data_input = torch.empty((nb, 3, 4, 4), dtype=dtype, device=device).uniform_(0, 1)
data_target = ((data_input.reshape(nb, -1)-0.5).norm(p=2, dim=1, keepdim=True)<2)*1
print("Testing data:")
print(" Input size:", data_input.size(), " target size:", data_target.size())
output, _ = net2.forward(data_input, mode='test')
print("accuracy on testing set is", torch.mean(1.0*((output>0.5)==data_target)).item())
print(" ")
print("-------------------------------------------------------")
print("---------------- End of section -----------------------")
print("-------------------------------------------------------")
input("Press Enter and Exit...")
| 38.13986 | 99 | 0.572149 | 1,389 | 10,908 | 4.357811 | 0.115911 | 0.050553 | 0.06344 | 0.087229 | 0.843053 | 0.826698 | 0.781265 | 0.781265 | 0.731373 | 0.71353 | 0 | 0.032954 | 0.162633 | 10,908 | 285 | 100 | 38.273684 | 0.629735 | 0.014576 | 0 | 0.748971 | 0 | 0 | 0.258704 | 0.092627 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.020576 | 0 | 0.020576 | 0.353909 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
6182682e2135063122b8295ca9963a08768e8597 | 8,119 | py | Python | tests/test_routes.py | burdettadam/aries-acapy-plugin-did-comm-uniresolver | 241ffbf1184e8355247765ebc135870ce2232624 | [
"Apache-2.0"
] | null | null | null | tests/test_routes.py | burdettadam/aries-acapy-plugin-did-comm-uniresolver | 241ffbf1184e8355247765ebc135870ce2232624 | [
"Apache-2.0"
] | null | null | null | tests/test_routes.py | burdettadam/aries-acapy-plugin-did-comm-uniresolver | 241ffbf1184e8355247765ebc135870ce2232624 | [
"Apache-2.0"
] | null | null | null | """Test AwaitableHandler classes."""
from unittest.mock import MagicMock
from aiohttp import web
from aries_cloudagent.messaging.models.base import BaseModelError
from didcomm_resolver.role.requester.routes import (
connections,
connection,
connection_register,
connection_remove,
register,
post_process_routes,
connection_update,
)
import pytest
from asynctest import mock
from aries_cloudagent.storage.error import StorageError
class AsyncMock(MagicMock):
async def __call__(self, *args, **kwargs):
return super(AsyncMock, self).__call__(*args, **kwargs)
@pytest.mark.asyncio
@mock.patch("didcomm_resolver.role.requester.routes.ConnRecord")
async def test_connection(conRecord_mock):
async_mock = AsyncMock()
async_mock.metadata_get.return_value = {"methods": "test"}
async_mock.connection_id = "conn"
async_mock.state = "active"
async def list_aux(*args, **kwargs):
return async_mock
conRecord_mock.retrieve_by_id = list_aux
context_magic = MagicMock()
context_magic.session.side_effect = AsyncMock()
request = web.BaseRequest
request.match_info = {"conn_id": "mocked_id"}
request = MagicMock()
request["context"].session.side_effect = list_aux
result = await connection(request)
assert result.reason == "OK"
assert result.status == 200
@pytest.mark.asyncio
@mock.patch("didcomm_resolver.role.requester.routes.ConnRecord")
async def test_connection_fail(conRecord_mock):
async_mock = AsyncMock()
async_mock.metadata_get.return_value = {"methods": "test"}
async_mock.connection_id = "conn"
async_mock.state = "active"
async def list_aux(*args, **kwargs):
return async_mock
async def raise_aux(*args, **kwargs):
raise StorageError()
conRecord_mock.retrieve_by_id = raise_aux
context_magic = MagicMock()
context_magic.session.side_effect = AsyncMock()
request = web.BaseRequest
request.match_info = {"conn_id": "mocked_id"}
request = MagicMock()
request["context"].session.side_effect = list_aux
with pytest.raises(web.HTTPBadRequest):
await connection(request)
@pytest.mark.asyncio
@mock.patch("didcomm_resolver.role.requester.routes.ConnRecord")
async def test_send_and_wait_for_response(conRecord_mock):
async_mock = AsyncMock()
async_mock.metadata_get.return_value = {"methods": "test"}
async_mock.connection_id = "conn"
async_mock.state = "active"
async def list_aux(*args, **kwargs):
return [async_mock]
conRecord_mock.query.side_effect = list_aux
context_magic = MagicMock()
context_magic.session.side_effect = AsyncMock()
result = await connections({"context": context_magic})
assert result.reason == "OK"
assert result.status == 200
@pytest.mark.asyncio
@mock.patch("didcomm_resolver.role.requester.routes.ConnRecord")
async def test_send_and_wait_for_response_fail(conRecord_mock):
async def list_aux(*args, **kwargs):
raise StorageError()
conRecord_mock.retrieve_by_id.side_effect = StorageError
conRecord_mock.query.side_effect = list_aux
with pytest.raises(web.HTTPBadRequest):
await connections({"context": AsyncMock()})
@pytest.mark.asyncio
@mock.patch("didcomm_resolver.role.requester.routes.DIDCommResolver")
async def test_connection_register(DIDCommResolver_mock):
async def aux(*args):
return []
DIDCommResolver_mock.register_connection.side_effect = aux
async_mock = AsyncMock()
async_mock.session.return_value = MagicMock()
my_dict = {"context": async_mock, "conn_id": "123", "c": 3}
def getitem(name):
return my_dict[name]
def setitem(name, val):
my_dict[name] = val
mock = MagicMock()
mock.__getitem__.side_effect = getitem
mock.__setitem__.side_effect = setitem
mock.match_info = mock
mock.body_exists = False
result = await connection_register(mock)
assert result.reason == "OK"
assert result.status == 200
@pytest.mark.asyncio
@mock.patch("didcomm_resolver.role.requester.routes.DIDCommResolver")
async def test_connection_register_fail(DIDCommResolver_mock):
async def aux(*args):
raise BaseModelError()
DIDCommResolver_mock.register_connection.side_effect = aux
async_mock = AsyncMock()
async_mock.session.return_value = MagicMock()
my_dict = {"context": async_mock, "conn_id": "123", "c": 3}
def getitem(name):
return my_dict[name]
def setitem(name, val):
my_dict[name] = val
mock = MagicMock()
mock.__getitem__.side_effect = getitem
mock.__setitem__.side_effect = setitem
mock.match_info = mock
mock.body_exists = False
with pytest.raises(web.HTTPBadRequest):
await connection_register(mock)
@pytest.mark.asyncio
@mock.patch("didcomm_resolver.role.requester.routes.DIDCommResolver")
async def test_connection_update(DIDCommResolver_mock):
async def aux(*args):
return []
DIDCommResolver_mock.update_connection.side_effect = aux
async_mock = AsyncMock()
async_mock.session.return_value = MagicMock()
my_dict = {"context": async_mock, "conn_id": "123", "c": 3}
def getitem(name):
return my_dict[name]
def setitem(name, val):
my_dict[name] = val
mock = MagicMock()
mock.__getitem__.side_effect = getitem
mock.__setitem__.side_effect = setitem
mock.match_info = mock
mock.body_exists = False
result = await connection_update(mock)
assert result.reason == "OK"
assert result.status == 200
@pytest.mark.asyncio
@mock.patch("didcomm_resolver.role.requester.routes.DIDCommResolver")
async def test_connection_update_fail(DIDCommResolver_mock):
async def raise_exc(*args):
raise BaseModelError()
DIDCommResolver_mock.update_connection.side_effect = raise_exc
async_mock = AsyncMock()
async_mock.session.return_value = MagicMock()
my_dict = {"context": async_mock, "conn_id": "123", "c": 3}
def getitem(name):
return my_dict[name]
def setitem(name, val):
my_dict[name] = val
mock = MagicMock()
mock.__getitem__.side_effect = getitem
mock.__setitem__.side_effect = setitem
mock.match_info = mock
mock.body_exists = False
with pytest.raises(web.HTTPBadRequest):
await connection_update(mock)
@pytest.mark.asyncio
@mock.patch("didcomm_resolver.role.requester.routes.DIDCommResolver")
async def test_remove_connection(DIDCommResolver_mock):
async def aux(*args):
return []
DIDCommResolver_mock.remove_connection.side_effect = aux
async_mock = AsyncMock()
async_mock.session.return_value = MagicMock()
my_dict = {"context": async_mock, "conn_id": "123", "c": 3}
def getitem(name):
return my_dict[name]
def setitem(name, val):
my_dict[name] = val
mock = MagicMock()
mock.__getitem__.side_effect = getitem
mock.__setitem__.side_effect = setitem
mock.match_info = mock
mock.body_exists = False
result = await connection_remove(mock)
assert result.reason == "OK"
assert result.status == 200
@pytest.mark.asyncio
@mock.patch("didcomm_resolver.role.requester.routes.DIDCommResolver")
async def test_remove_connection_fail(DIDCommResolver_mock):
async def aux(*args):
raise BaseModelError()
DIDCommResolver_mock.remove_connection.side_effect = aux
async_mock = AsyncMock()
async_mock.session.return_value = MagicMock()
my_dict = {"context": async_mock, "conn_id": "123", "c": 3}
def getitem(name):
return my_dict[name]
def setitem(name, val):
my_dict[name] = val
mock = MagicMock()
mock.__getitem__.side_effect = getitem
mock.__setitem__.side_effect = setitem
mock.match_info = mock
mock.body_exists = False
with pytest.raises(web.HTTPBadRequest):
await connection_remove(mock)
@pytest.mark.asyncio
async def test_register():
await register(MagicMock())
@pytest.mark.asyncio
async def test_post_process_routes():
post_process_routes(MagicMock())
| 27.804795 | 69 | 0.713758 | 994 | 8,119 | 5.544266 | 0.102616 | 0.053892 | 0.037017 | 0.055888 | 0.871167 | 0.853021 | 0.831065 | 0.823263 | 0.823263 | 0.79804 | 0 | 0.005861 | 0.180441 | 8,119 | 291 | 70 | 27.900344 | 0.822362 | 0.003695 | 0 | 0.761905 | 0 | 0 | 0.094148 | 0.064333 | 0 | 0 | 0 | 0 | 0.047619 | 1 | 0.057143 | false | 0 | 0.033333 | 0.028571 | 0.157143 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
619a742bac4f0a3804705f8100d35748c45afd0e | 44,643 | py | Python | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_web_site_management_client_operations.py | kushan2018/azure-sdk-for-python | 08a9296207281f4e90e23cf7a30173863accc867 | [
"MIT"
] | null | null | null | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_web_site_management_client_operations.py | kushan2018/azure-sdk-for-python | 08a9296207281f4e90e23cf7a30173863accc867 | [
"MIT"
] | 1 | 2020-03-06T05:57:16.000Z | 2020-03-06T05:57:16.000Z | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_web_site_management_client_operations.py | kushan2018/azure-sdk-for-python | 08a9296207281f4e90e23cf7a30173863accc867 | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from msrest.pipeline import ClientRawResponse
from msrestazure.azure_exceptions import CloudError
from .. import models
import uuid
class WebSiteManagementClientOperationsMixin(object):
def get_publishing_user(
self, custom_headers=None, raw=False, **operation_config):
"""Gets publishing user.
Gets publishing user.
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: User or ClientRawResponse if raw=true
:rtype: ~azure.mgmt.web.models.User or
~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
# Construct URL
url = self.get_publishing_user.metadata['url']
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('User', response)
if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response
return deserialized
get_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'}
def update_publishing_user(
self, user_details, custom_headers=None, raw=False, **operation_config):
"""Updates publishing user.
Updates publishing user.
:param user_details: Details of publishing user
:type user_details: ~azure.mgmt.web.models.User
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: User or ClientRawResponse if raw=true
:rtype: ~azure.mgmt.web.models.User or
~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
# Construct URL
url = self.update_publishing_user.metadata['url']
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct body
body_content = self._serialize.body(user_details, 'User')
# Construct and send request
request = self._client.put(url, query_parameters, header_parameters, body_content)
response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('User', response)
if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response
return deserialized
update_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'}
def list_source_controls(
self, custom_headers=None, raw=False, **operation_config):
"""Gets the source controls available for Azure websites.
Gets the source controls available for Azure websites.
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: An iterator like instance of SourceControl
:rtype:
~azure.mgmt.web.models.SourceControlPaged[~azure.mgmt.web.models.SourceControl]
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
def prepare_request(next_link=None):
if not next_link:
# Construct URL
url = self.list_source_controls.metadata['url']
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
else:
url = next_link
query_parameters = {}
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
return request
def internal_paging(next_link=None):
request = prepare_request(next_link)
response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
return response
# Deserialize response
header_dict = None
if raw:
header_dict = {}
deserialized = models.SourceControlPaged(internal_paging, self._deserialize.dependencies, header_dict)
return deserialized
list_source_controls.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols'}
def get_source_control(
self, source_control_type, custom_headers=None, raw=False, **operation_config):
"""Gets source control token.
Gets source control token.
:param source_control_type: Type of source control
:type source_control_type: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: SourceControl or ClientRawResponse if raw=true
:rtype: ~azure.mgmt.web.models.SourceControl or
~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
# Construct URL
url = self.get_source_control.metadata['url']
path_format_arguments = {
'sourceControlType': self._serialize.url("source_control_type", source_control_type, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('SourceControl', response)
if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response
return deserialized
get_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'}
def update_source_control(
self, source_control_type, request_message, custom_headers=None, raw=False, **operation_config):
"""Updates source control token.
Updates source control token.
:param source_control_type: Type of source control
:type source_control_type: str
:param request_message: Source control token information
:type request_message: ~azure.mgmt.web.models.SourceControl
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: SourceControl or ClientRawResponse if raw=true
:rtype: ~azure.mgmt.web.models.SourceControl or
~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
# Construct URL
url = self.update_source_control.metadata['url']
path_format_arguments = {
'sourceControlType': self._serialize.url("source_control_type", source_control_type, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct body
body_content = self._serialize.body(request_message, 'SourceControl')
# Construct and send request
request = self._client.put(url, query_parameters, header_parameters, body_content)
response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('SourceControl', response)
if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response
return deserialized
update_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'}
def check_name_availability(
self, name, type, is_fqdn=None, custom_headers=None, raw=False, **operation_config):
"""Check if a resource name is available.
Check if a resource name is available.
:param name: Resource name to verify.
:type name: str
:param type: Resource type used for verification. Possible values
include: 'Site', 'Slot', 'HostingEnvironment', 'PublishingUser',
'Microsoft.Web/sites', 'Microsoft.Web/sites/slots',
'Microsoft.Web/hostingEnvironments', 'Microsoft.Web/publishingUsers'
:type type: str or ~azure.mgmt.web.models.CheckNameResourceTypes
:param is_fqdn: Is fully qualified domain name.
:type is_fqdn: bool
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: ResourceNameAvailability or ClientRawResponse if raw=true
:rtype: ~azure.mgmt.web.models.ResourceNameAvailability or
~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
request = models.ResourceNameAvailabilityRequest(name=name, type=type, is_fqdn=is_fqdn)
# Construct URL
url = self.check_name_availability.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct body
body_content = self._serialize.body(request, 'ResourceNameAvailabilityRequest')
# Construct and send request
request = self._client.post(url, query_parameters, header_parameters, body_content)
response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('ResourceNameAvailability', response)
if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response
return deserialized
check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability'}
def get_subscription_deployment_locations(
self, custom_headers=None, raw=False, **operation_config):
"""Gets list of available geo regions plus ministamps.
Gets list of available geo regions plus ministamps.
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: DeploymentLocations or ClientRawResponse if raw=true
:rtype: ~azure.mgmt.web.models.DeploymentLocations or
~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
# Construct URL
url = self.get_subscription_deployment_locations.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('DeploymentLocations', response)
if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response
return deserialized
get_subscription_deployment_locations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations'}
def list_geo_regions(
self, sku=None, linux_workers_enabled=None, custom_headers=None, raw=False, **operation_config):
"""Get a list of available geographical regions.
Get a list of available geographical regions.
:param sku: Name of SKU used to filter the regions. Possible values
include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium',
'PremiumV2', 'Dynamic', 'Isolated'
:type sku: str or ~azure.mgmt.web.models.SkuName
:param linux_workers_enabled: Specify <code>true</code> if you want to
filter to only regions that support Linux workers.
:type linux_workers_enabled: bool
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: An iterator like instance of GeoRegion
:rtype:
~azure.mgmt.web.models.GeoRegionPaged[~azure.mgmt.web.models.GeoRegion]
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
def prepare_request(next_link=None):
if not next_link:
# Construct URL
url = self.list_geo_regions.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
if sku is not None:
query_parameters['sku'] = self._serialize.query("sku", sku, 'str')
if linux_workers_enabled is not None:
query_parameters['linuxWorkersEnabled'] = self._serialize.query("linux_workers_enabled", linux_workers_enabled, 'bool')
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
else:
url = next_link
query_parameters = {}
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
return request
def internal_paging(next_link=None):
request = prepare_request(next_link)
response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
return response
# Deserialize response
header_dict = None
if raw:
header_dict = {}
deserialized = models.GeoRegionPaged(internal_paging, self._deserialize.dependencies, header_dict)
return deserialized
list_geo_regions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions'}
def list_site_identifiers_assigned_to_host_name(
self, name=None, custom_headers=None, raw=False, **operation_config):
"""List all apps that are assigned to a hostname.
List all apps that are assigned to a hostname.
:param name: Name of the object.
:type name: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: An iterator like instance of Identifier
:rtype:
~azure.mgmt.web.models.IdentifierPaged[~azure.mgmt.web.models.Identifier]
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
name_identifier = models.NameIdentifier(name=name)
def prepare_request(next_link=None):
if not next_link:
# Construct URL
url = self.list_site_identifiers_assigned_to_host_name.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
else:
url = next_link
query_parameters = {}
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct body
body_content = self._serialize.body(name_identifier, 'NameIdentifier')
# Construct and send request
request = self._client.post(url, query_parameters, header_parameters, body_content)
return request
def internal_paging(next_link=None):
request = prepare_request(next_link)
response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
return response
# Deserialize response
header_dict = None
if raw:
header_dict = {}
deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict)
return deserialized
list_site_identifiers_assigned_to_host_name.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName'}
def list_premier_add_on_offers(
self, custom_headers=None, raw=False, **operation_config):
"""List all premier add-on offers.
List all premier add-on offers.
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: An iterator like instance of PremierAddOnOffer
:rtype:
~azure.mgmt.web.models.PremierAddOnOfferPaged[~azure.mgmt.web.models.PremierAddOnOffer]
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
def prepare_request(next_link=None):
if not next_link:
# Construct URL
url = self.list_premier_add_on_offers.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
else:
url = next_link
query_parameters = {}
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
return request
def internal_paging(next_link=None):
request = prepare_request(next_link)
response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
return response
# Deserialize response
header_dict = None
if raw:
header_dict = {}
deserialized = models.PremierAddOnOfferPaged(internal_paging, self._deserialize.dependencies, header_dict)
return deserialized
list_premier_add_on_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers'}
def list_skus(
self, custom_headers=None, raw=False, **operation_config):
"""List all SKUs.
List all SKUs.
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: SkuInfos or ClientRawResponse if raw=true
:rtype: ~azure.mgmt.web.models.SkuInfos or
~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
# Construct URL
url = self.list_skus.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('SkuInfos', response)
if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response
return deserialized
list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus'}
def verify_hosting_environment_vnet(
self, parameters, custom_headers=None, raw=False, **operation_config):
"""Verifies if this VNET is compatible with an App Service Environment by
analyzing the Network Security Group rules.
Verifies if this VNET is compatible with an App Service Environment by
analyzing the Network Security Group rules.
:param parameters: VNET information
:type parameters: ~azure.mgmt.web.models.VnetParameters
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: VnetValidationFailureDetails or ClientRawResponse if raw=true
:rtype: ~azure.mgmt.web.models.VnetValidationFailureDetails or
~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
# Construct URL
url = self.verify_hosting_environment_vnet.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct body
body_content = self._serialize.body(parameters, 'VnetParameters')
# Construct and send request
request = self._client.post(url, query_parameters, header_parameters, body_content)
response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('VnetValidationFailureDetails', response)
if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response
return deserialized
verify_hosting_environment_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet'}
def move(
self, resource_group_name, target_resource_group=None, resources=None, custom_headers=None, raw=False, **operation_config):
"""Move resources between resource groups.
Move resources between resource groups.
:param resource_group_name: Name of the resource group to which the
resource belongs.
:type resource_group_name: str
:param target_resource_group:
:type target_resource_group: str
:param resources:
:type resources: list[str]
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: None or ClientRawResponse if raw=true
:rtype: None or ~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
move_resource_envelope = models.CsmMoveResourceEnvelope(target_resource_group=target_resource_group, resources=resources)
# Construct URL
url = self.move.metadata['url']
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct body
body_content = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope')
# Construct and send request
request = self._client.post(url, query_parameters, header_parameters, body_content)
response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [204]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
if raw:
client_raw_response = ClientRawResponse(None, response)
return client_raw_response
move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'}
def validate(
self, resource_group_name, validate_request, custom_headers=None, raw=False, **operation_config):
"""Validate if a resource can be created.
Validate if a resource can be created.
:param resource_group_name: Name of the resource group to which the
resource belongs.
:type resource_group_name: str
:param validate_request: Request with the resources to validate.
:type validate_request: ~azure.mgmt.web.models.ValidateRequest
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: ValidateResponse or ClientRawResponse if raw=true
:rtype: ~azure.mgmt.web.models.ValidateResponse or
~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
# Construct URL
url = self.validate.metadata['url']
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct body
body_content = self._serialize.body(validate_request, 'ValidateRequest')
# Construct and send request
request = self._client.post(url, query_parameters, header_parameters, body_content)
response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('ValidateResponse', response)
if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response
return deserialized
validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate'}
def validate_move(
self, resource_group_name, target_resource_group=None, resources=None, custom_headers=None, raw=False, **operation_config):
"""Validate whether a resource can be moved.
Validate whether a resource can be moved.
:param resource_group_name: Name of the resource group to which the
resource belongs.
:type resource_group_name: str
:param target_resource_group:
:type target_resource_group: str
:param resources:
:type resources: list[str]
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: None or ClientRawResponse if raw=true
:rtype: None or ~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
move_resource_envelope = models.CsmMoveResourceEnvelope(target_resource_group=target_resource_group, resources=resources)
# Construct URL
url = self.validate_move.metadata['url']
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct body
body_content = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope')
# Construct and send request
request = self._client.post(url, query_parameters, header_parameters, body_content)
response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [204]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
if raw:
client_raw_response = ClientRawResponse(None, response)
return client_raw_response
validate_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources'}
| 45.276876 | 166 | 0.663127 | 4,776 | 44,643 | 6.001884 | 0.058626 | 0.053585 | 0.025118 | 0.037677 | 0.896494 | 0.881842 | 0.868237 | 0.834397 | 0.818489 | 0.806803 | 0 | 0.003131 | 0.241673 | 44,643 | 985 | 167 | 45.322843 | 0.843593 | 0.268508 | 0 | 0.819085 | 0 | 0 | 0.144374 | 0.071002 | 0 | 0 | 0 | 0 | 0 | 1 | 0.045726 | false | 0 | 0.007952 | 0 | 0.119284 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
61bcd8cc1636af9321597d972b56a0f091d7f364 | 441 | py | Python | test/run/t299.py | timmartin/skulpt | 2e3a3fbbaccc12baa29094a717ceec491a8a6750 | [
"MIT"
] | 2,671 | 2015-01-03T08:23:25.000Z | 2022-03-31T06:15:48.000Z | test/run/t299.py | csev/skulpt | 9aa25b7dbf29f23ee8d3140d01a6f4353d12e66f | [
"MIT"
] | 972 | 2015-01-05T08:11:00.000Z | 2022-03-29T13:47:15.000Z | test/run/t299.py | csev/skulpt | 9aa25b7dbf29f23ee8d3140d01a6f4353d12e66f | [
"MIT"
] | 845 | 2015-01-03T19:53:36.000Z | 2022-03-29T18:34:22.000Z | # Test the comparison of sets
l = [1,2,3,4,1,1]
print l
s = set(l)
print s
# Test the comparison of sets
print '# self'
print '# forwards'
print s.isdisjoint(s)
print s > s
print s.issuperset(s)
print s >= s
print s == s
print s != s
print s.issubset(s)
print s <= s
print s < s
print '# backwards'
print s.isdisjoint(s)
print s > s
print s.issuperset(s)
print s >= s
print s == s
print s != s
print s.issubset(s)
print s <= s
print s < s
| 14.7 | 29 | 0.653061 | 90 | 441 | 3.2 | 0.211111 | 0.395833 | 0.388889 | 0.333333 | 0.809028 | 0.649306 | 0.649306 | 0.649306 | 0.631944 | 0.631944 | 0 | 0.017241 | 0.210884 | 441 | 29 | 30 | 15.206897 | 0.810345 | 0.124717 | 0 | 0.72 | 0 | 0 | 0.070496 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0.92 | 0 | 0 | 0 | null | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 8 |
4eec00e1df3e4aa937c71fa377d456e9a6aca164 | 4,135 | py | Python | utils.py | money-shredder/Barlow-Twins-HSIC | b4edc9c85ea7fbe899bd0bdff294d33927809ff0 | [
"MIT"
] | 49 | 2021-04-29T13:56:02.000Z | 2022-03-23T17:58:01.000Z | utils.py | money-shredder/Barlow-Twins-HSIC | b4edc9c85ea7fbe899bd0bdff294d33927809ff0 | [
"MIT"
] | 4 | 2021-06-07T10:55:57.000Z | 2022-01-10T20:44:01.000Z | utils.py | money-shredder/Barlow-Twins-HSIC | b4edc9c85ea7fbe899bd0bdff294d33927809ff0 | [
"MIT"
] | 11 | 2021-06-21T14:48:42.000Z | 2022-03-23T17:58:04.000Z | from PIL import Image
from torchvision import transforms
from torchvision.datasets import CIFAR10
# for cifar10 (32x32)
class CifarPairTransform:
def __init__(self, train_transform = True, pair_transform = True):
if train_transform is True:
self.transform = transforms.Compose([
transforms.RandomResizedCrop(32),
transforms.RandomHorizontalFlip(p=0.5),
transforms.RandomApply([transforms.ColorJitter(0.4, 0.4, 0.4, 0.1)], p=0.8),
transforms.RandomGrayscale(p=0.2),
transforms.ToTensor(),
transforms.Normalize([0.4914, 0.4822, 0.4465], [0.2023, 0.1994, 0.2010])])
else:
self.transform = transforms.Compose([
transforms.ToTensor(),
transforms.Normalize([0.4914, 0.4822, 0.4465], [0.2023, 0.1994, 0.2010])])
self.pair_transform = pair_transform
def __call__(self, x):
if self.pair_transform is True:
y1 = self.transform(x)
y2 = self.transform(x)
return y1, y2
else:
return self.transform(x)
# for tiny imagenet (64x64)
class TinyImageNetPairTransform:
def __init__(self, train_transform = True, pair_transform = True):
if train_transform is True:
self.transform = transforms.Compose([
transforms.RandomApply(
[transforms.ColorJitter(brightness=0.4, contrast=0.4,
saturation=0.4, hue=0.1)],
p=0.8
),
transforms.RandomGrayscale(p=0.1),
transforms.RandomResizedCrop(
64,
scale=(0.2, 1.0),
ratio=(0.75, (4 / 3)),
interpolation=Image.BICUBIC,
),
transforms.RandomHorizontalFlip(p=0.5),
transforms.ToTensor(),
transforms.Normalize((0.480, 0.448, 0.398), (0.277, 0.269, 0.282))
])
else:
self.transform = transforms.Compose([
transforms.ToTensor(),
transforms.Normalize((0.480, 0.448, 0.398), (0.277, 0.269, 0.282))
])
self.pair_transform = pair_transform
def __call__(self, x):
if self.pair_transform is True:
y1 = self.transform(x)
y2 = self.transform(x)
return y1, y2
else:
return self.transform(x)
# for stl10 (96x96)
class StlPairTransform:
def __init__(self, train_transform = True, pair_transform = True):
if train_transform is True:
self.transform = transforms.Compose([
transforms.RandomApply(
[transforms.ColorJitter(brightness=0.4, contrast=0.4,
saturation=0.4, hue=0.1)],
p=0.8
),
transforms.RandomGrayscale(p=0.1),
transforms.RandomResizedCrop(
64,
scale=(0.2, 1.0),
ratio=(0.75, (4 / 3)),
interpolation=Image.BICUBIC,
),
transforms.RandomHorizontalFlip(p=0.5),
transforms.ToTensor(),
transforms.Normalize((0.43, 0.42, 0.39), (0.27, 0.26, 0.27))
])
else:
self.transform = transforms.Compose([
transforms.Resize(70, interpolation=Image.BICUBIC),
transforms.CenterCrop(64),
transforms.ToTensor(),
transforms.Normalize((0.43, 0.42, 0.39), (0.27, 0.26, 0.27))
])
self.pair_transform = pair_transform
def __call__(self, x):
if self.pair_transform is True:
y1 = self.transform(x)
y2 = self.transform(x)
return y1, y2
else:
return self.transform(x)
| 41.35 | 94 | 0.496735 | 414 | 4,135 | 4.859903 | 0.195652 | 0.096918 | 0.062624 | 0.089463 | 0.846918 | 0.843936 | 0.800696 | 0.800696 | 0.800696 | 0.784791 | 0 | 0.097796 | 0.396614 | 4,135 | 99 | 95 | 41.767677 | 0.708617 | 0.015236 | 0 | 0.88172 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.064516 | false | 0 | 0.032258 | 0 | 0.193548 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
f63bf6ed094735b77976c2e19fd4ecc0297556dc | 41 | py | Python | src/IO/__init__.py | 1ramen/bfython | 6a423223a6e969331baa01eb1f34ba13b1266764 | [
"MIT"
] | 3 | 2017-12-05T15:52:50.000Z | 2019-02-19T11:36:20.000Z | src/IO/__init__.py | 1ramen/bfython | 6a423223a6e969331baa01eb1f34ba13b1266764 | [
"MIT"
] | 1 | 2017-11-29T04:40:26.000Z | 2017-11-29T04:40:26.000Z | src/IO/__init__.py | 1ramen/bfython | 6a423223a6e969331baa01eb1f34ba13b1266764 | [
"MIT"
] | null | null | null | from IO.getch import getch
import IO.args | 20.5 | 26 | 0.829268 | 8 | 41 | 4.25 | 0.625 | 0.647059 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.121951 | 41 | 2 | 27 | 20.5 | 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 | 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 | 7 |
f651e62b677bf0996b601d4702d0658362d83b10 | 8,896 | py | Python | deepcell_label/loaders_test.py | naterenegar/deepcell-label | 5ebe3dd5786746dbdea3dc2ff37f07bb45ebffb8 | [
"Apache-2.0"
] | null | null | null | deepcell_label/loaders_test.py | naterenegar/deepcell-label | 5ebe3dd5786746dbdea3dc2ff37f07bb45ebffb8 | [
"Apache-2.0"
] | null | null | null | deepcell_label/loaders_test.py | naterenegar/deepcell-label | 5ebe3dd5786746dbdea3dc2ff37f07bb45ebffb8 | [
"Apache-2.0"
] | null | null | null | """Tests for loaders.py"""
import io
import json
import tempfile
import tarfile
import pytest
import numpy as np
from PIL import Image
from deepcell_label import loaders
def test_load_raw_npz():
"""Creates a dummy NPZ file with just a raw array and loads it."""
expected = np.zeros((1, 1, 1, 1))
npz = io.BytesIO()
np.savez(npz, X=expected)
npz.seek(0)
loader = loaders.Loader('ZYXC')
loader.path = 'test.npz'
loader._data = npz
loader._load()
np.testing.assert_array_equal(loader.raw_array, expected)
np.testing.assert_array_equal(loader.label_array, expected)
assert loader.cell_ids is not None
assert loader.cell_info is not None
def test_load_combined_npz():
"""Creates a dummy NPZ file with both a raw array and a label array and loads it."""
expected_raw = np.zeros((1, 1, 1, 1))
expected_label = np.ones((1, 1, 1, 1))
npz = io.BytesIO()
np.savez(npz, X=expected_raw, y=expected_label)
npz.seek(0)
loader = loaders.Loader('ZYXC')
loader.path = 'test.npz'
loader._data = npz
loader._load()
np.testing.assert_array_equal(loader.raw_array, expected_raw)
np.testing.assert_array_equal(loader.label_array, expected_label)
assert loader.cell_ids is not None
assert loader.cell_info is not None
def test_load_trk():
"""Creates a dummy TRK file and loads it."""
expected_raw = np.zeros((1, 1, 1, 1))
expected_label = np.ones((1, 1, 1, 1))
expected_tracks = {1: {'frame_div': None,
'daughters': [],
'frames': [0],
'label': '1',
'capped': False,
'parent': None}}
trk = io.BytesIO()
with tarfile.open(fileobj=trk, mode='w') as trks:
with tempfile.NamedTemporaryFile('w') as lineage_file:
json.dump(expected_tracks, lineage_file, indent=1)
lineage_file.flush()
trks.add(lineage_file.name, 'lineage.json')
with tempfile.NamedTemporaryFile() as raw_file:
np.save(raw_file, expected_raw)
raw_file.flush()
trks.add(raw_file.name, 'raw.npy')
with tempfile.NamedTemporaryFile() as tracked_file:
np.save(tracked_file, expected_label)
tracked_file.flush()
trks.add(tracked_file.name, 'tracked.npy')
trk.seek(0)
loader = loaders.Loader('ZYXC')
loader.path = 'test.trk'
loader._data = trk
loader._load()
np.testing.assert_array_equal(loader.raw_array, expected_raw)
np.testing.assert_array_equal(loader.label_array, expected_label)
assert loader.cell_ids is not None
assert loader.cell_info == {0: expected_tracks}
def test_load_trk_no_lineage():
expected_raw = np.zeros((1, 1, 1, 1))
expected_label = np.ones((1, 1, 1, 1))
trk = io.BytesIO()
with tarfile.open(fileobj=trk, mode='w') as trks:
with tempfile.NamedTemporaryFile() as raw_file:
np.save(raw_file, expected_raw)
raw_file.flush()
trks.add(raw_file.name, 'raw.npy')
with tempfile.NamedTemporaryFile() as tracked_file:
np.save(tracked_file, expected_label)
tracked_file.flush()
trks.add(tracked_file.name, 'tracked.npy')
trk.seek(0)
loader = loaders.Loader('ZYXC')
loader.path = 'test.trk'
loader._data = trk
with pytest.raises(ValueError):
loader._load()
def test_load_trk_multiple_lineages():
expected_raw = np.zeros((1, 1, 1, 1))
expected_label = np.ones((1, 1, 1, 1))
expected_tracks = 2 * [{1: {'frame_div': None,
'daughters': [],
'frames': [0],
'label': '1',
'capped': False,
'parent': None}}]
trk = io.BytesIO()
with tarfile.open(fileobj=trk, mode='w') as trks:
with tempfile.NamedTemporaryFile('w') as lineage_file:
json.dump(expected_tracks, lineage_file, indent=1)
lineage_file.flush()
trks.add(lineage_file.name, 'lineage.json')
with tempfile.NamedTemporaryFile() as raw_file:
np.save(raw_file, expected_raw)
raw_file.flush()
trks.add(raw_file.name, 'raw.npy')
with tempfile.NamedTemporaryFile() as tracked_file:
np.save(tracked_file, expected_label)
tracked_file.flush()
trks.add(tracked_file.name, 'tracked.npy')
trk.seek(0)
loader = loaders.Loader('ZYXC')
loader.path = 'test.trk'
loader._data = trk
with pytest.raises(ValueError):
loader._load()
def test_load_png():
"""Creates a dummy PNG file with three channels and loads it."""
out = io.BytesIO()
image = Image.new('RGB', (1, 1))
image.save(out, format='png')
out.seek(0)
expected_raw = np.zeros((1, 1, 1, 3))
expected_label = np.zeros((1, 1, 1, 1))
loader = loaders.Loader('YXC')
loader.path = 'test.png'
loader._data = out
loader._load()
np.testing.assert_array_equal(loader.raw_array, expected_raw)
np.testing.assert_array_equal(loader.label_array, expected_label)
assert loader.cell_ids is not None
assert loader.cell_info is not None
def test_load_png_no_channels():
"""Creates a dummy PNG file with no channels and loads it."""
out = io.BytesIO()
image = Image.new('L', (1, 1))
image.save(out, format='png')
out.seek(0)
expected_raw = np.zeros((1, 1, 1, 1))
expected_label = np.zeros((1, 1, 1, 1))
loader = loaders.Loader('YX')
loader.path = 'test.png'
loader._data = out
loader._load()
np.testing.assert_array_equal(loader.raw_array, expected_raw)
np.testing.assert_array_equal(loader.label_array, expected_label)
assert loader.cell_ids is not None
assert loader.cell_info is not None
def test_load_png_four_channels():
"""Creates a dummy PNG file with four channels and loads it."""
out = io.BytesIO()
image = Image.new('RGBA', (1, 1))
image.save(out, format='png')
out.seek(0)
expected_raw = np.zeros((1, 1, 1, 3))
expected_label = np.zeros((1, 1, 1, 1))
loader = loaders.Loader('YXC')
loader.path = 'test.png'
loader._data = out
loader._load()
np.testing.assert_array_equal(loader.raw_array, expected_raw)
np.testing.assert_array_equal(loader.label_array, expected_label)
assert loader.cell_ids is not None
assert loader.cell_info is not None
def test_load_tiff():
"""Creates a dummy TIFF file with 3 channels and loads it."""
out = io.BytesIO()
image = Image.new('RGB', (1, 1))
image.save(out, format='tiff')
out.seek(0)
expected_raw = np.zeros((1, 1, 1, 3))
expected_label = np.zeros((1, 1, 1, 1))
loader = loaders.Loader('YXC')
loader.path = 'test.tiff'
loader._data = out
loader._load()
np.testing.assert_array_equal(loader.raw_array, expected_raw)
np.testing.assert_array_equal(loader.label_array, expected_label)
assert loader.cell_ids is not None
assert loader.cell_info is not None
def test_load_tiff_no_channels():
"""Creates a dummy TIFF file with no channels and loads it."""
out = io.BytesIO()
# 'L' for luminance mode in greyscale; no channel dimension
image = Image.new('L', (1, 1))
image.save(out, format='tiff')
out.seek(0)
expected_raw = np.zeros((1, 1, 1, 1))
expected_label = np.zeros((1, 1, 1, 1))
loader = loaders.Loader('YX')
loader.path = 'test.tiff'
loader._data = out
loader._load()
np.testing.assert_array_equal(loader.raw_array, expected_raw)
np.testing.assert_array_equal(loader.label_array, expected_label)
assert loader.cell_ids is not None
assert loader.cell_info is not None
def test_load_tiff_four_channels():
"""Creates a dummy TIFF file with more than 3 channels and loads it."""
out = io.BytesIO()
# 'L' for luminance mode in greyscale; no channel dimension
image = Image.new('RGBA', (1, 1))
image.save(out, format='tiff')
out.seek(0)
expected_raw = np.zeros((1, 1, 1, 4))
expected_label = np.zeros((1, 1, 1, 1))
loader = loaders.Loader(axes='YXC')
loader.path = 'test.tiff'
loader._data = out
loader._load()
np.testing.assert_array_equal(loader.raw_array, expected_raw)
np.testing.assert_array_equal(loader.label_array, expected_label)
assert loader.cell_ids is not None
assert loader.cell_info is not None
def test_load_badext():
"""Creates a dummy TIFF file with more than 3 channels and loads it."""
loader = loaders.Loader()
loader.path = 'test.badext'
loader._data = io.BytesIO()
with pytest.raises(loaders.InvalidExtension):
loader._load()
| 31.546099 | 88 | 0.632531 | 1,253 | 8,896 | 4.31684 | 0.090184 | 0.024034 | 0.021076 | 0.066556 | 0.922906 | 0.915511 | 0.905158 | 0.878721 | 0.878536 | 0.869477 | 0 | 0.017841 | 0.24393 | 8,896 | 281 | 89 | 31.658363 | 0.786351 | 0.082509 | 0 | 0.829384 | 0 | 0 | 0.042196 | 0 | 0 | 0 | 0 | 0 | 0.170616 | 1 | 0.056872 | false | 0 | 0.037915 | 0 | 0.094787 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
9c898d0116163b592fc7948cb0b985745b1bda03 | 506,277 | py | Python | proj/hps_accel/gateware/gen2/build_sample_conv_06_pickle.py | keadwen/CFU-Playground | 74c79158e85e1365170ececd1d91ea3fa48faba0 | [
"Apache-2.0"
] | 240 | 2021-03-09T23:32:09.000Z | 2022-03-28T14:54:08.000Z | proj/hps_accel/gateware/gen2/build_sample_conv_06_pickle.py | keadwen/CFU-Playground | 74c79158e85e1365170ececd1d91ea3fa48faba0 | [
"Apache-2.0"
] | 283 | 2021-03-10T00:09:11.000Z | 2022-03-31T16:39:40.000Z | proj/hps_accel/gateware/gen2/build_sample_conv_06_pickle.py | keadwen/CFU-Playground | 74c79158e85e1365170ececd1d91ea3fa48faba0 | [
"Apache-2.0"
] | 78 | 2021-03-10T06:13:39.000Z | 2022-03-30T14:09:00.000Z | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Data from Conv2D op 06 in 09_20 model with cat picture input.
This op is a 4x4 conv with 1 deep inputs and 16 deep outputs outputs. It
is the same op as contained in the conv2d_06.cc test data file.
Run with
```
cd proj/hps_accel
../../scripts/pyrun -m gateware.gen2.build_sample_conv_05_pickle
```
"""
from pathlib import Path
import pickle
import sys
from .conv2d_data import Conv2DData, save_data
from .utils import as_signed_int32_array, as_unsigned_int32_array
if __name__ != '__main__':
print('Run as script to produce a data file. Do not import')
sys.exit(1)
output_multipliers_raw = [
0x40,0x5f,0x7d,0x61,0x49,0x5c,0x20,0x5d,0x85,0x1c,0x36,0x68,0x56,0xbf,0xb2,0x49,
0xf1,0x18,0x8c,0x7d,0xe0,0x89,0xee,0x66,0x93,0x05,0x38,0x5a,0x7e,0x69,0xbe,0x74,
0x7b,0xf0,0xf2,0x73,0x74,0x1b,0x3f,0x64,0x6d,0x9d,0x86,0x4e,0x9b,0xac,0xd0,0x54,
0x50,0xb0,0x3a,0x62,0x6f,0x3b,0xed,0x71,0x4e,0x00,0xee,0x6e,0x6a,0x34,0x9b,0x69,
]
output_shift_raw = [
0xf8,0xff,0xff,0xff,0xf8,0xff,0xff,0xff,0xf7,0xff,0xff,0xff,0xf8,0xff,0xff,0xff,
0xf8,0xff,0xff,0xff,0xf8,0xff,0xff,0xff,0xf8,0xff,0xff,0xff,0xf8,0xff,0xff,0xff,
0xf8,0xff,0xff,0xff,0xf8,0xff,0xff,0xff,0xf8,0xff,0xff,0xff,0xf8,0xff,0xff,0xff,
0xf8,0xff,0xff,0xff,0xf8,0xff,0xff,0xff,0xfb,0xff,0xff,0xff,0xf7,0xff,0xff,0xff,
]
output_bias_raw = [
0x0e,0xf4,0xff,0xff,0xe6,0xf6,0xff,0xff,0xb6,0xc7,0xff,0xff,0x67,0x18,0x00,0x00,
0xc5,0x21,0x00,0x00,0x32,0xc9,0xff,0xff,0xbf,0xdb,0xff,0xff,0x7a,0x12,0x00,0x00,
0xcb,0xf6,0xff,0xff,0x00,0xf7,0xff,0xff,0x01,0x16,0x00,0x00,0xe2,0xf2,0xff,0xff,
0x58,0xf5,0xff,0xff,0x5d,0xf7,0xff,0xff,0x24,0x02,0x00,0x00,0x19,0x04,0x00,0x00,
]
input_data_raw = [
0x80,0xc6,0xc7,0xc7,0xc7,0xc8,0xca,0xc8,0xc4,0xbd,0xb6,0xaa,0xa4,0xa4,0xa2,0xa2,
0xa1,0xa2,0xa2,0xa1,0xa1,0xa2,0xa1,0xa2,0xa3,0xa2,0xa2,0xa3,0xa4,0xa5,0xa6,0xa6,
0xa6,0xa7,0xa7,0xa7,0xa6,0xa6,0xa5,0xa5,0xa5,0xa4,0xa5,0xa6,0xa6,0xa5,0xa7,0xa5,
0xa7,0xa9,0xa7,0xa6,0xa2,0xa7,0xa9,0xa9,0xa9,0xa9,0xaa,0xa7,0xa9,0xa7,0xa8,0xa9,
0xa7,0xa7,0xaa,0xaa,0xa9,0xa8,0xaa,0xa8,0xa8,0xaa,0xa7,0xa7,0xa9,0xab,0xaa,0xaa,
0xa9,0xa9,0xab,0xa8,0xa5,0xa5,0xa7,0xa9,0xa8,0xa7,0xa7,0xa6,0xa7,0xa8,0xa9,0xa7,
0xa8,0xa7,0xa6,0xa7,0xa6,0xa4,0xa5,0xa4,0xa4,0xa4,0xa8,0xa7,0xa6,0xa6,0xa6,0xa3,
0xa3,0xa1,0xa1,0xa1,0xa0,0xa1,0xa0,0x9e,0x9d,0x9c,0x99,0x9b,0x9e,0x9e,0x9f,0xc9,
0x30,0x33,0x2a,0x09,0xfd,0x09,0xfb,0xe9,0xda,0xd4,0xd6,0xde,0xcd,0xd5,0xcb,0x0b,
0x07,0xd6,0xf3,0xf6,0x1f,0xee,0x9c,0x90,0x91,0x83,0xae,0xc2,0x91,0x8d,0x96,0xae,
0xb6,0xb3,0xb1,0xd3,0xcf,0x9d,0x9e,0xa0,0x9f,0xa2,0xa7,0xa9,0xd1,0x02,0x01,0x02,
0x02,0x02,0x02,0x04,0x05,0x06,0x06,0x07,0x07,0x09,0x0a,0x0a,0x0b,0x0c,0x0d,0x0e,
0x0e,0x0f,0x0f,0x10,0x11,0x11,0x11,0x11,0x11,0x11,0x10,0x10,0x10,0x10,0x0f,0x0e,
0x0d,0x0c,0x0c,0x0b,0x0a,0x09,0x08,0x07,0x07,0x06,0x05,0x04,0x02,0xff,0xfa,0xf6,
0xf4,0xf1,0xed,0xec,0xc0,0x9a,0x99,0x98,0x97,0x94,0x90,0x90,0x91,0x94,0x97,0x97,
0x99,0x9c,0x9e,0x99,0x98,0x9b,0x99,0x99,0x98,0xa1,0xe1,0xca,0xc7,0xc9,0xc9,0xcb,
0xcb,0xc8,0xcb,0xcb,0xc7,0xc7,0xc7,0xc7,0xc8,0xc9,0xca,0xc9,0xc8,0xc9,0xc9,0xc9,
0xc7,0xc6,0xc7,0xc7,0xc6,0xc6,0xc5,0xc5,0xc6,0xc7,0xc6,0xc3,0xc2,0xc2,0xc2,0xc4,
0xc4,0xc3,0xc2,0xc3,0xc2,0xc2,0xc2,0xc4,0xc4,0xc5,0xc6,0xc6,0xc6,0xc7,0xc7,0xc8,
0xc9,0xc9,0xc4,0xc9,0xca,0xce,0xce,0xce,0xcf,0xcf,0xd0,0xcf,0xcf,0xce,0xcc,0xcd,
0xd1,0x80,0x80,0xc7,0xc7,0xc9,0xc9,0xc5,0xc6,0xcb,0xc6,0xbd,0xb3,0xaa,0xa9,0xa6,
0xa5,0xa3,0xa3,0xa5,0xa3,0xa1,0xa1,0xa2,0xa3,0xa4,0xa2,0xa4,0xa4,0xa4,0xa4,0xa6,
0xa7,0xa6,0xa5,0xa8,0xa7,0xa6,0xa5,0xa6,0xa5,0xa5,0xa5,0xa5,0xa7,0xa7,0xa5,0xa6,
0xa7,0xa7,0xa8,0xa7,0xa8,0xa8,0xa6,0xa6,0xa7,0xa8,0xa8,0xaa,0xaa,0xa6,0xa7,0xa6,
0xa5,0xa9,0xa8,0xa8,0xaa,0xaa,0xaa,0xaa,0xa8,0xa8,0xa9,0xa8,0xa6,0xa8,0xa9,0xa8,
0xa9,0xa9,0xa8,0xa8,0xa7,0xa7,0xa7,0xa7,0xa9,0xa9,0xa8,0xa8,0xa7,0xa6,0xa6,0xa7,
0xa9,0xa8,0xa8,0xa8,0xa7,0xa8,0xa8,0xa7,0xa7,0xa6,0xa7,0xa7,0xaa,0xa7,0xa8,0xa9,
0xa8,0xa7,0xa7,0xa6,0xa8,0xa6,0xa3,0xa1,0xa1,0xa1,0xa0,0x9e,0x9d,0xa0,0xa2,0x9f,
0xb1,0x17,0x3b,0x28,0x01,0xfc,0x16,0x09,0x09,0x01,0x04,0x05,0xff,0x08,0xfe,0x12,
0x09,0x15,0x26,0x12,0x23,0x10,0x04,0xe7,0xb6,0xae,0x98,0xb1,0xbc,0x92,0x9a,0xa8,
0xab,0xb7,0xb2,0xad,0xb1,0xb7,0xab,0x9c,0xa0,0x9d,0x9f,0xa5,0xa9,0xc0,0xf8,0x00,
0x00,0x00,0x01,0x01,0x02,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,
0x0d,0x0d,0x0e,0x0e,0x0e,0x0f,0x10,0x10,0x0f,0x0f,0x0f,0x0e,0x0e,0x0e,0x0e,0x0e,
0x0d,0x0c,0x0b,0x0b,0x0a,0x09,0x08,0x07,0x07,0x06,0x05,0x04,0x03,0x01,0x00,0xfd,
0xf7,0xf3,0xf1,0xef,0xec,0xea,0xba,0x9b,0x9c,0x9a,0x99,0x96,0x95,0x93,0x93,0x95,
0x98,0x9a,0x9d,0x9e,0xa0,0x9b,0x9a,0x9d,0x9c,0x9a,0x99,0xa7,0xdf,0xc9,0xcb,0xca,
0xca,0xcd,0xcc,0xca,0xcc,0xcc,0xc9,0xc8,0xc9,0xcc,0xca,0xc9,0xca,0xca,0xcb,0xcb,
0xca,0xcb,0xc9,0xc8,0xc9,0xc8,0xc7,0xc6,0xc6,0xc6,0xc7,0xc8,0xc7,0xc4,0xc4,0xc4,
0xc3,0xc4,0xca,0xc9,0xc5,0xc4,0xc3,0xc1,0xc4,0xc6,0xc6,0xc7,0xc8,0xc9,0xcb,0xcd,
0xcc,0xca,0xca,0xcc,0xcc,0xcb,0xce,0xd0,0xd1,0xd1,0xd1,0xd2,0xcf,0xcf,0xce,0xca,
0xcd,0xcd,0xd0,0x80,0x80,0xc6,0xc8,0xc7,0xc6,0xc5,0xc5,0xcb,0xc4,0xbd,0xb4,0xa8,
0xa6,0xa6,0xa6,0xa5,0xa5,0xa5,0xa5,0xa3,0xa3,0xa3,0xa5,0xa3,0xa1,0xa3,0xa5,0xa4,
0xa6,0xa8,0xa5,0xa6,0xa6,0xa7,0xa6,0xa4,0xa4,0xa5,0xa5,0xa5,0xa6,0xa8,0xa9,0xa9,
0xa7,0xa6,0xa5,0xa4,0xa5,0xa6,0xa7,0xa7,0xa5,0xa7,0xa7,0xa7,0xa5,0xa3,0xa7,0xa6,
0xa6,0xa2,0xa3,0xa6,0xa8,0xa7,0xa9,0xa9,0xa8,0xa7,0xa7,0xa6,0xa9,0xa8,0xa7,0xa9,
0xa9,0xa7,0xa9,0xa9,0xa8,0xa7,0xa6,0xa6,0xa6,0xa8,0xa9,0xa8,0xa8,0xaa,0xa8,0xa7,
0xa7,0xa9,0xa8,0xa8,0xa8,0xa8,0xa7,0xa7,0xa7,0xa8,0xa9,0xa9,0xa8,0xa9,0xaa,0xa7,
0xa8,0xa8,0xa8,0xa6,0xa6,0xa6,0xa7,0xa8,0xa7,0xa4,0xa1,0xa0,0xa2,0xa0,0xa0,0xa1,
0xa3,0xa6,0xcc,0x32,0x29,0x06,0xee,0x17,0x2b,0x14,0x15,0x19,0x1a,0x21,0x24,0x18,
0xf3,0x18,0x2e,0x31,0x3c,0x39,0x17,0x0a,0xdb,0xdc,0xe2,0xcf,0xe2,0xd1,0xaf,0xb9,
0xac,0x97,0x92,0xa1,0xc1,0xd0,0xb4,0xaf,0x9e,0x9b,0x9b,0x9e,0xa6,0xa7,0xaf,0xe6,
0x01,0xff,0x00,0x00,0x00,0x00,0x01,0x02,0x02,0x03,0x04,0x05,0x07,0x07,0x08,0x09,
0x0a,0x0b,0x0b,0x0c,0x0c,0x0d,0x0d,0x0e,0x0e,0x0e,0x0e,0x0d,0x0d,0x0d,0x0d,0x0d,
0x0d,0x0c,0x0c,0x0b,0x09,0x09,0x08,0x08,0x07,0x06,0x06,0x05,0x04,0x03,0x01,0x00,
0xfe,0xfb,0xf5,0xf1,0xf0,0xee,0xeb,0xe8,0xb6,0x9b,0x9d,0x9c,0x9a,0x99,0x98,0x97,
0x96,0x98,0x9b,0x9d,0xa1,0xa3,0xa4,0x9d,0x9d,0x9f,0x9d,0x9c,0x9b,0xab,0xdd,0xcc,
0xcc,0xcc,0xca,0xc8,0xc8,0xc9,0xcc,0xcb,0xc9,0xc9,0xc8,0xcb,0xcc,0xcc,0xcb,0xcb,
0xcb,0xcb,0xcb,0xcc,0xcc,0xcc,0xcb,0xca,0xc6,0xc4,0xc6,0xc7,0xc6,0xc7,0xc7,0xc6,
0xc7,0xc7,0xc5,0xc5,0xc6,0xc4,0xc4,0xc4,0xc4,0xc6,0xc5,0xc5,0xc6,0xc7,0xc9,0xcb,
0xcc,0xcd,0xcf,0xce,0xcf,0xcf,0xce,0xcc,0xd2,0xd2,0xd0,0xd3,0xd4,0xd4,0xd1,0xd0,
0xd0,0xce,0xd0,0xce,0xcd,0x80,0x80,0xc0,0xc3,0xc1,0xc3,0xc6,0xc6,0xc6,0xc0,0xbb,
0xb4,0xaa,0xa6,0xa7,0xa7,0xa8,0xa6,0xa7,0xa6,0xa5,0xa6,0xa5,0xa7,0xa5,0xa3,0xa4,
0xa4,0xa6,0xa5,0xa6,0xa4,0xa4,0xa5,0xa6,0xa6,0xa7,0xa7,0xa6,0xa4,0xa4,0xa4,0xa7,
0xa7,0xa7,0xa7,0xa6,0xa4,0xa5,0xa4,0xa2,0xa4,0xa6,0xa6,0xa6,0xa6,0xa7,0xa4,0xa1,
0xa5,0xa6,0xa8,0xa7,0xa6,0xa6,0xa8,0xa7,0xa7,0xa8,0xa6,0xa3,0xa5,0xa5,0xa6,0xa6,
0xa6,0xa8,0xa8,0xa6,0xa8,0xa8,0xa7,0xa6,0xa3,0xa4,0xa6,0xa7,0xa7,0xa7,0xa7,0xa7,
0xa5,0xa6,0xa6,0xa7,0xa7,0xa6,0xa7,0xa7,0xa5,0xa5,0xa5,0xa8,0xa9,0xa9,0xa7,0xa7,
0xa8,0xa6,0xa6,0xa6,0xa6,0xa7,0xa7,0xa7,0xa7,0xa7,0xa7,0xa5,0xa3,0xa3,0xa4,0xa1,
0xa2,0xa2,0xa3,0xa7,0xdc,0x2f,0x11,0x01,0x16,0x32,0x35,0x2e,0x26,0x31,0x23,0x13,
0x29,0x16,0xea,0xf3,0xd3,0x01,0x36,0x37,0x07,0xf2,0xc4,0x02,0xf8,0xe1,0x0a,0xf6,
0xd8,0xbe,0xa4,0x96,0x94,0xa0,0xc5,0xcf,0xa5,0xa8,0xac,0x9a,0x98,0xa4,0xad,0xa9,
0xbe,0xee,0xff,0xff,0xfe,0xff,0xff,0x00,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x06,
0x06,0x08,0x09,0x09,0x09,0x0a,0x0b,0x0b,0x0b,0x0c,0x0c,0x0d,0x0c,0x0c,0x0c,0x0c,
0x0c,0x0b,0x0b,0x0b,0x0a,0x09,0x08,0x07,0x06,0x06,0x06,0x06,0x04,0x03,0x02,0x01,
0x00,0xff,0xfd,0xf9,0xf4,0xf0,0xef,0xed,0xea,0xe4,0xb1,0x9a,0x9e,0x9d,0x9a,0x99,
0x9a,0x99,0x97,0x99,0x9e,0xa0,0xa5,0xa7,0xa6,0x9f,0xa2,0xa3,0xa2,0xa2,0xa0,0xb1,
0xda,0xcb,0xcb,0xcd,0xcb,0xca,0xcb,0xcd,0xcc,0xca,0xc8,0xcb,0xcb,0xcc,0xcc,0xcd,
0xcb,0xcd,0xcd,0xcd,0xcc,0xcc,0xcc,0xce,0xce,0xc9,0xbe,0xc1,0xc7,0xc6,0xc6,0xc7,
0xc8,0xc6,0xc8,0xc9,0xc7,0xc6,0xc5,0xc4,0xc5,0xc4,0xc5,0xca,0xcd,0xc8,0xc7,0xc9,
0xca,0xca,0xcd,0xcd,0xcb,0xcd,0xd0,0xcf,0xd0,0xd1,0xd2,0xcf,0xcf,0xd1,0xd2,0xcf,
0xd1,0xd2,0xd5,0xd5,0xd5,0xd0,0xcf,0x80,0x80,0xc1,0xc1,0xc2,0xc4,0xc4,0xc8,0xc6,
0xbe,0xbb,0xb1,0xa9,0xa8,0xa6,0xa8,0xa9,0xa7,0xa7,0xa7,0xa6,0xa8,0xa8,0xa7,0xa6,
0xa6,0xa7,0xa5,0xa7,0xa8,0xa7,0xa7,0xa5,0xa7,0xa7,0xa5,0xa5,0xa5,0xa5,0xa3,0xa3,
0xa3,0xa4,0xa3,0xa5,0xa5,0xa6,0xa3,0xa5,0xa4,0xa3,0xa4,0xa7,0xa6,0xa6,0xa5,0xa6,
0xa6,0xa4,0xa6,0xa5,0xa5,0xa6,0xa7,0xa6,0xa5,0xa5,0xa7,0xa7,0xa7,0xa5,0xa6,0xa6,
0xa4,0xa6,0xa5,0xa6,0xa6,0xa4,0xa4,0xa3,0xa3,0xa2,0xa3,0xa4,0xa5,0xa6,0xa5,0xa5,
0xa5,0xa6,0xa5,0xa7,0xa7,0xa7,0xa6,0xa5,0xa5,0xa6,0xa6,0xa6,0xa6,0xa7,0xa7,0xa9,
0xa5,0xa4,0xa7,0xa6,0xa6,0xa5,0xa6,0xa7,0xa8,0xa9,0xa8,0xa7,0xa7,0xa6,0xa4,0xa5,
0xa5,0xa2,0xa5,0xa8,0xa5,0xa8,0xf3,0x23,0xf0,0x15,0x36,0x3c,0x39,0x38,0x38,0x34,
0x1e,0x08,0x1c,0xf7,0xc7,0xc5,0xa4,0xcb,0x2a,0x35,0x06,0xdb,0xe3,0x1a,0xf3,0xf4,
0x1e,0x18,0xff,0xe7,0xbf,0xa2,0x96,0xa2,0xc9,0xc5,0xba,0xcf,0xa3,0x9a,0xa0,0xa4,
0xa9,0xb3,0xec,0xfc,0xfc,0xfe,0xfe,0xfe,0xfe,0xff,0x00,0x00,0x01,0x02,0x03,0x04,
0x05,0x06,0x06,0x07,0x08,0x08,0x09,0x0a,0x0a,0x0a,0x0a,0x0a,0x0b,0x0b,0x0b,0x0b,
0x0b,0x0b,0x0a,0x0a,0x0a,0x09,0x09,0x08,0x06,0x05,0x04,0x05,0x04,0x04,0x03,0x02,
0x01,0x00,0xff,0xfd,0xfc,0xf9,0xf4,0xf0,0xee,0xec,0xe9,0xe4,0xae,0x98,0x9d,0x9c,
0x9a,0x98,0x99,0x99,0x98,0x9c,0xa0,0xa2,0xa5,0xa7,0xa7,0xa0,0xa5,0xa6,0xa5,0xa5,
0xa4,0xb7,0xda,0xcd,0xca,0xcc,0xcc,0xcc,0xcb,0xca,0xcb,0xcb,0xca,0xcb,0xcc,0xcb,
0xca,0xcc,0xcb,0xcb,0xce,0xcd,0xcd,0xcc,0xcb,0xcd,0xcc,0xc9,0xc5,0xc4,0xc6,0xc6,
0xc5,0xc6,0xc7,0xc7,0xca,0xc9,0xc8,0xc6,0xc5,0xc5,0xc6,0xc5,0xc5,0xc8,0xca,0xc9,
0xc7,0xc9,0xc9,0xd1,0xd0,0xce,0xce,0xcc,0xcf,0xcf,0xd0,0xd1,0xce,0xcf,0xd3,0xd0,
0xd2,0xc4,0xce,0xd3,0xd3,0xd4,0xd5,0xd5,0xd4,0x80,0x80,0xc1,0xc1,0xbf,0xc9,0xc8,
0xca,0xcb,0xc1,0xb9,0xb1,0xaa,0xa9,0xa7,0xa8,0xa8,0xa7,0xa7,0xa7,0xa7,0xa9,0xa7,
0xa6,0xa6,0xa7,0xa7,0xa4,0xa6,0xa6,0xa6,0xa5,0xa6,0xa8,0xa6,0xa4,0xa4,0xa4,0xa5,
0xa5,0xa4,0xa3,0xa3,0xa4,0xaa,0xa5,0xa4,0xa4,0xa6,0xa5,0xa5,0xa5,0xa7,0xa5,0xa6,
0xa4,0xa5,0xa6,0xa5,0xa5,0xa6,0xa6,0xa5,0xa5,0xa4,0xa4,0xa8,0xa4,0xa1,0xa5,0xa7,
0xa9,0xa6,0xa6,0xa6,0xa6,0xa5,0xa4,0xa2,0xa3,0xa4,0xa3,0xa3,0xa4,0xa5,0xa5,0xa6,
0xa6,0xa5,0xa5,0xa4,0xa5,0xa6,0xa6,0xa5,0xa4,0xa2,0xa4,0xa5,0xa6,0xa4,0xa5,0xa5,
0xa5,0xa7,0xa6,0xa5,0xa6,0xa7,0xa8,0xa7,0xa7,0xa6,0xa7,0xa8,0xa8,0xa7,0xa8,0xa8,
0xa1,0xa2,0xa5,0xa3,0xa4,0xa6,0xa5,0xaf,0x03,0x1b,0x03,0x0f,0xfd,0x15,0x2a,0x34,
0x34,0x25,0x20,0x13,0x0d,0xda,0xa9,0xa5,0xa0,0xb2,0x22,0x38,0x05,0xd5,0xfa,0x1a,
0xf4,0xfc,0x2b,0x25,0x21,0x04,0xef,0xc5,0x9b,0x9c,0xdd,0xe6,0xf6,0xd0,0x97,0xa3,
0xa2,0xa8,0xb0,0xdd,0xf7,0xfb,0xfb,0xfd,0xfd,0xfd,0xfe,0xfe,0xff,0x00,0x01,0x02,
0x03,0x04,0x05,0x05,0x05,0x06,0x07,0x08,0x09,0x09,0x09,0x09,0x0a,0x0a,0x0a,0x0a,
0x0a,0x0a,0x0a,0x0a,0x09,0x09,0x08,0x07,0x07,0x06,0x05,0x04,0x04,0x04,0x03,0x03,
0x02,0x01,0x00,0xff,0xfe,0xfd,0xfb,0xf8,0xf3,0xf1,0xee,0xec,0xe9,0xe7,0xd2,0x9f,
0x9b,0x9c,0x9b,0x98,0x99,0x99,0x99,0x9d,0xa1,0xa3,0xa6,0xa7,0xa8,0xa2,0xa4,0xa7,
0xa7,0xa6,0xa6,0xb6,0xc7,0xca,0xc7,0xcb,0xcb,0xca,0xc9,0xc7,0xca,0xcb,0xcc,0xcd,
0xcd,0xcc,0xcb,0xcc,0xcd,0xcb,0xcb,0xce,0xcf,0xcd,0xcb,0xcc,0xca,0xc9,0xcb,0xca,
0xc7,0xc8,0xc0,0xc7,0xc9,0xca,0xcb,0xc9,0xc5,0xc5,0xc8,0xc9,0xc9,0xc9,0xc9,0xc9,
0xc7,0xc7,0xc7,0xc8,0xcb,0xe2,0xd1,0xce,0xd2,0xcb,0xce,0xce,0xcf,0xd0,0xcd,0xcd,
0xd1,0xd1,0xd0,0xcf,0xd1,0xd6,0xd3,0xd1,0xd2,0xd3,0xd2,0x80,0x80,0xc2,0xc4,0xc1,
0xc3,0xc6,0xc7,0xc6,0xc0,0xb7,0xaf,0xa8,0xa8,0xa8,0xa9,0xa9,0xa9,0xa9,0xa9,0xa8,
0xa7,0xa8,0xa8,0xa6,0xa8,0xa8,0xa8,0xa7,0xa8,0xa6,0xa5,0xa7,0xa8,0xa6,0xa4,0xa5,
0xa5,0xa5,0xa4,0xa3,0xa4,0xa6,0xa4,0xaa,0xa5,0xa1,0xa2,0xa6,0xa5,0xa5,0xa6,0xa8,
0xa5,0xa5,0xa5,0xa5,0xa4,0xa4,0xa6,0xa6,0xa5,0xa4,0xa6,0xa6,0xa6,0xa7,0xa6,0xa1,
0xa4,0xa6,0xa5,0xa6,0xa6,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa4,0xa4,0xa4,0xa4,
0xa4,0xa4,0xa4,0xa5,0xa6,0xa6,0xa6,0xa7,0xa8,0xa5,0xa3,0xa3,0xa5,0xa6,0xa6,0xa4,
0xa5,0xa5,0xa6,0xa5,0xa5,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa9,
0xaa,0xa7,0xa3,0xa1,0xa4,0xa2,0xa3,0xa2,0xa9,0xc2,0x19,0x1d,0x20,0xf7,0xe4,0xe0,
0xf0,0xfb,0xee,0xed,0xe1,0xea,0xf8,0xd6,0x9f,0x9a,0x9b,0xb2,0x28,0x38,0x0b,0xe7,
0xf3,0x12,0xec,0xf0,0x2a,0x24,0x24,0x1c,0x03,0xc8,0x9c,0x9e,0xbe,0xff,0x10,0xe9,
0xa6,0xa1,0xa1,0xae,0xc9,0xf7,0xfa,0xfa,0xfa,0xfc,0xfc,0xfd,0xfd,0xfe,0xff,0xff,
0x00,0x02,0x02,0x03,0x04,0x04,0x05,0x05,0x06,0x07,0x08,0x08,0x08,0x09,0x09,0x0a,
0x0a,0x0a,0x0a,0x09,0x09,0x08,0x08,0x07,0x06,0x06,0x05,0x05,0x04,0x03,0x03,0x03,
0x04,0x03,0x02,0x00,0x00,0xfe,0xfd,0xfb,0xf9,0xf7,0xf2,0xf0,0xee,0xec,0xe9,0xe5,
0xe5,0xcb,0x9e,0x9a,0x9a,0x9a,0x9a,0x9a,0x99,0x9e,0xa3,0xa4,0xa6,0xa9,0xa8,0xa2,
0xa6,0xa8,0xa8,0xa7,0xa9,0xae,0xaa,0xb7,0xc9,0xcc,0xc9,0xc7,0xc7,0xc7,0xc9,0xc9,
0xcc,0xce,0xcd,0xca,0xca,0xcc,0xce,0xcb,0xc6,0xd1,0xcf,0xce,0xcc,0xca,0xc9,0xc9,
0xca,0xcc,0xc8,0xc5,0xc6,0xca,0xcb,0xca,0xca,0xc8,0xc5,0xc5,0xc8,0xc9,0xc8,0xca,
0xcc,0xcc,0xcb,0xc9,0xc9,0xc9,0xcf,0xd6,0xda,0xcb,0xcb,0xcb,0xcb,0xcc,0xcd,0xcf,
0xcd,0xcb,0xcf,0xd2,0xd2,0xd2,0xd4,0xd3,0xd0,0xd1,0xd5,0xd2,0xd1,0x80,0x80,0xc1,
0xc0,0xc1,0xc5,0xc4,0xc3,0xc0,0xc1,0xb7,0xae,0xa8,0xa9,0xa6,0xa7,0xa6,0xa6,0xa6,
0xa8,0xa5,0xa5,0xa8,0xa6,0xa4,0xa5,0xa6,0xa6,0xa7,0xa7,0xa6,0xa7,0xa6,0xa6,0xa5,
0xa5,0xa4,0xa4,0xa4,0xa4,0xa3,0xa3,0xa5,0xa3,0xa6,0xa5,0xa0,0xa0,0xa3,0xa4,0xac,
0xa5,0xa3,0xa2,0xa4,0xa4,0xa4,0xa2,0xa5,0xa5,0xa3,0xa1,0xa2,0xa2,0xa4,0xa5,0xa5,
0xa6,0xa5,0xa6,0xa5,0xa5,0xa5,0xa6,0xa5,0xa3,0xa4,0xa3,0xa5,0xa5,0xa6,0xa5,0xa4,
0xa4,0xa6,0xa3,0xa5,0xa4,0xa6,0xa6,0xa6,0xa7,0xa5,0xa5,0xa5,0xa3,0xa3,0xa6,0xa5,
0xa5,0xa3,0xa3,0xa5,0xa6,0xa5,0xa3,0xa6,0xa6,0xa7,0xa6,0xa7,0xa7,0xa7,0xa6,0xa5,
0xa7,0xa9,0xa9,0xa4,0xa0,0xa0,0xa3,0xa0,0xa3,0xa2,0xa2,0xcb,0x20,0x1e,0x05,0xfc,
0x17,0x1b,0xfa,0xde,0xd7,0xcf,0x9e,0x9f,0xc4,0xcd,0xa6,0x9b,0x9e,0xcd,0x36,0x37,
0x0c,0xe9,0xed,0x00,0xdf,0xf2,0x1c,0x1a,0x1d,0x29,0x10,0xdf,0xa7,0x92,0xa0,0xcd,
0xfc,0x0b,0xb9,0x9f,0xa7,0xba,0xee,0xf8,0xf8,0xf9,0xfa,0xfb,0xfc,0xfc,0xfc,0xfd,
0xfe,0xff,0x00,0x01,0x02,0x03,0x03,0x04,0x05,0x05,0x06,0x06,0x07,0x07,0x07,0x08,
0x08,0x09,0x09,0x09,0x09,0x09,0x08,0x08,0x07,0x06,0x06,0x05,0x04,0x03,0x03,0x02,
0x01,0x01,0x02,0x02,0x01,0xff,0xfe,0xfd,0xfb,0xf9,0xf8,0xf5,0xf2,0xf0,0xee,0xec,
0xe9,0xe5,0xe2,0xe3,0xc5,0x9a,0x97,0x99,0x9b,0x9b,0x9b,0xa0,0xa5,0xa4,0xa6,0xa8,
0xa8,0xa4,0xa8,0xa9,0xa9,0xa9,0xa9,0xb1,0xb4,0xab,0xbd,0xcc,0xca,0xc5,0xc8,0xca,
0xcc,0xcd,0xcc,0xce,0xcf,0xcd,0xce,0xce,0xcf,0xcc,0xcb,0xd3,0xd2,0xd0,0xcc,0xc9,
0xc9,0xcc,0xce,0xcf,0xca,0xc7,0xca,0xcb,0xc8,0xca,0xcb,0xc9,0xc4,0xc5,0xc9,0xca,
0xc9,0xca,0xcf,0xd5,0xd0,0xcc,0xcc,0xc9,0xcd,0xd4,0xcd,0xce,0xcf,0xc9,0xca,0xcc,
0xcc,0xce,0xcd,0xcb,0xce,0xd1,0xce,0xd0,0xd4,0xd2,0xd0,0xd0,0xd6,0xd4,0xd2,0x80,
0x80,0xc2,0xbe,0xc1,0xc2,0xc1,0xc0,0xbe,0xb9,0xb5,0xaf,0xa9,0xa9,0xa7,0xa7,0xa7,
0xa6,0xa6,0xa7,0xa6,0xa6,0xa7,0xa4,0xa2,0xa4,0xa6,0xa5,0xa5,0xa6,0xa7,0xa7,0xa6,
0xa6,0xa7,0xa6,0xa6,0xa3,0xa3,0xa4,0xa5,0xa4,0xa3,0xa1,0xa2,0xa7,0xa6,0xa3,0xa2,
0xa4,0xa9,0xa3,0xa1,0xa2,0xa3,0xa4,0xa5,0xa5,0xa5,0xa4,0xa2,0xa3,0xa2,0xa3,0xa3,
0xa4,0xa6,0xa7,0xa7,0xa6,0xa4,0xa3,0xa3,0xa6,0xa4,0xa3,0xa3,0xa4,0xa5,0xa5,0xa3,
0xa4,0xa4,0xa4,0xa2,0xa0,0xa4,0xa5,0xa5,0xa6,0xa4,0xa3,0xa4,0xa5,0xa3,0xa4,0xa4,
0xa4,0xa4,0xa4,0xa4,0xa5,0xa5,0xa5,0xa5,0xa7,0xa6,0xa7,0xa6,0xa6,0xa8,0xa7,0xa8,
0xa6,0xa6,0xa9,0xa7,0xa7,0xa6,0xa3,0xa0,0xa3,0xa1,0xa2,0xa0,0xa1,0xda,0x2a,0x05,
0xf1,0x00,0x22,0x26,0x03,0xdc,0xc8,0xb7,0x8d,0x9d,0xd4,0xc9,0xa8,0x96,0xa9,0x07,
0x3c,0x34,0x02,0xef,0xef,0xfb,0xf0,0xf9,0x06,0x10,0x1d,0x26,0x1e,0xf3,0xbb,0x9f,
0xa8,0xb3,0xda,0xf7,0xb5,0xa8,0xb7,0xe7,0xf6,0xf6,0xf8,0xf9,0xf9,0xfa,0xfb,0xfc,
0xfc,0xfc,0xfe,0xff,0xff,0x00,0x01,0x02,0x03,0x03,0x03,0x04,0x05,0x06,0x06,0x06,
0x07,0x07,0x07,0x08,0x08,0x07,0x07,0x07,0x07,0x06,0x06,0x05,0x05,0x03,0x03,0x02,
0x02,0x01,0x01,0x01,0x01,0x00,0x00,0xff,0xfd,0xfc,0xfa,0xf8,0xf7,0xf4,0xf1,0xef,
0xed,0xec,0xe9,0xe5,0xe3,0xe0,0xe0,0xbe,0x97,0x98,0x9c,0x9b,0x9b,0xa2,0xa5,0xa5,
0xa5,0xa6,0xa7,0xa5,0xa9,0xa9,0xa9,0xa9,0xac,0xb3,0xb9,0xb9,0xa9,0xbd,0xca,0xc2,
0xc7,0xcc,0xcd,0xcd,0xcc,0xcd,0xce,0xcc,0xcd,0xcf,0xd1,0xcb,0xcd,0xd2,0xd5,0xd2,
0xce,0xcd,0xcc,0xcd,0xce,0xcd,0xcc,0xca,0xcb,0xcc,0xcb,0xc9,0xc9,0xc8,0xc5,0xc7,
0xc8,0xcb,0xcd,0xc5,0xcb,0xd5,0xd3,0xce,0xcc,0xc8,0xca,0xd7,0xc8,0xcd,0xcc,0xc9,
0xcb,0xcd,0xcd,0xcd,0xcb,0xcc,0xcf,0xd1,0xcf,0xcf,0xd4,0xd7,0xd6,0xd3,0xd6,0xd7,
0xd3,0x80,0x80,0xc0,0xbb,0xbf,0xc1,0xc1,0xc0,0xbd,0xb8,0xb5,0xac,0xa8,0xa7,0xa6,
0xa9,0xa9,0xa7,0xa8,0xa7,0xa7,0xa7,0xa6,0xa5,0xa5,0xa5,0xa7,0xa6,0xa5,0xa6,0xa7,
0xa7,0xa5,0xa7,0xa9,0xa6,0xa6,0xa5,0xa4,0xa4,0xa5,0xa4,0xa5,0xa2,0xa2,0xa5,0xa5,
0xa4,0xa3,0xa4,0xa3,0xa4,0xa5,0xa3,0xa2,0xa4,0xa6,0xa5,0xa4,0xa2,0xa1,0xa1,0xa2,
0xa4,0xa5,0xa5,0xa6,0xa6,0xa5,0xa5,0xa5,0xa3,0xa3,0xa4,0xa3,0xa4,0xa5,0xa5,0xa4,
0xa5,0xa4,0xa4,0xa4,0xa5,0xa2,0xa2,0xa2,0xa4,0xa5,0xa4,0xa4,0xa4,0xa2,0xa4,0xa4,
0xa4,0xa4,0xa4,0xa5,0xa4,0xa4,0xa5,0xa4,0xa4,0xa6,0xa7,0xa6,0xa8,0xa8,0xa7,0xa6,
0xa6,0xa7,0xa7,0xa9,0xa9,0xa8,0xa7,0xa7,0xa4,0xa2,0xa2,0x9f,0xa1,0x9d,0xa5,0xfb,
0x3b,0x12,0x10,0x07,0x21,0x13,0x02,0xe2,0xc0,0xc3,0x97,0xba,0xe2,0xca,0x9f,0xac,
0xcf,0x2a,0x38,0x32,0x05,0xf6,0x01,0x04,0xe9,0xcf,0xb0,0xbc,0xe6,0xdc,0xf4,0xee,
0xc6,0xb2,0xb7,0xbf,0xda,0xeb,0xbb,0xb0,0xc7,0xf0,0xf5,0xf5,0xf7,0xf8,0xf9,0xfa,
0xfb,0xfb,0xfc,0xfd,0xfe,0xff,0xff,0x00,0x00,0x02,0x02,0x02,0x03,0x03,0x04,0x05,
0x05,0x06,0x06,0x06,0x07,0x07,0x07,0x06,0x07,0x07,0x06,0x06,0x05,0x04,0x03,0x02,
0x01,0x01,0x01,0x01,0x00,0x01,0x00,0x00,0xff,0xfd,0xfc,0xfb,0xf9,0xf8,0xf6,0xf4,
0xf0,0xee,0xed,0xeb,0xea,0xe6,0xe2,0xe0,0xdf,0xde,0xba,0x97,0x98,0x9b,0x9d,0xa4,
0xa7,0xa7,0xa7,0xa8,0xa8,0xa7,0xa8,0xa9,0xa9,0xaa,0xaf,0xb6,0xbb,0xbf,0xba,0xab,
0xc2,0xc9,0xcb,0xce,0xcb,0xcb,0xcc,0xce,0xce,0xce,0xcd,0xcf,0xd2,0xd0,0xce,0xd2,
0xd6,0xd3,0xd0,0xce,0xcc,0xce,0xcf,0xcf,0xd0,0xce,0xcd,0xd0,0xd1,0xcc,0xcb,0xc6,
0xc4,0xc4,0xc7,0xc6,0xcc,0xc7,0xc5,0xc8,0xcf,0xce,0xca,0xc8,0xcb,0xce,0xcd,0xca,
0xc7,0xc9,0xca,0xcb,0xcc,0xcb,0xcb,0xcd,0xcf,0xd1,0xce,0xd0,0xd4,0xd5,0xd6,0xd6,
0xd6,0xd8,0xd5,0x80,0x80,0xbd,0xbd,0xbf,0xbe,0xbf,0xbd,0xbc,0xb7,0xb2,0xaa,0xa6,
0xa7,0xa5,0xa8,0xa8,0xa7,0xa8,0xa9,0xa6,0xa6,0xa5,0xa6,0xa5,0xa4,0xa8,0xa8,0xa6,
0xa7,0xa7,0xa6,0xa6,0xa6,0xa4,0xa5,0xa5,0xa4,0xa4,0xa4,0xa4,0xa4,0xa4,0xa2,0xa3,
0xa5,0xa4,0xa3,0xa4,0xa4,0xa3,0xa2,0xa4,0xa4,0xa3,0xa4,0xa4,0xa4,0xa4,0xa4,0xa3,
0xa4,0xa3,0xa3,0xa4,0xa5,0xa4,0xa4,0xa4,0xa5,0xa5,0xa4,0xa3,0xa3,0xa3,0xa4,0xa3,
0xa4,0xa5,0xa5,0xa5,0xa3,0xa3,0xa2,0xa3,0xa3,0xa3,0xa1,0xa4,0xa3,0xa4,0xa5,0xa5,
0xa5,0xa4,0xa4,0xa4,0xa5,0xa7,0xa4,0xa5,0xa5,0xa3,0xa7,0xa7,0xa5,0xa8,0xa7,0xa5,
0xa7,0xa7,0xa8,0xa7,0xa7,0xa8,0xa9,0xa8,0xa6,0xa9,0xae,0xae,0xaf,0xae,0xb1,0xb2,
0xc0,0x0d,0x4f,0x33,0x31,0x1d,0x23,0x05,0xf2,0xf5,0xce,0xc0,0xc6,0xd8,0xd2,0xbf,
0xad,0xca,0x11,0x32,0x34,0x33,0x0c,0xff,0x0d,0xe3,0xdc,0xc0,0x92,0xa1,0xdb,0xbe,
0xa0,0xb5,0xbb,0xab,0xb5,0xbe,0xca,0xef,0xb4,0xc3,0xe3,0xef,0xf4,0xf5,0xf7,0xf7,
0xf9,0xfa,0xfa,0xfb,0xfc,0xfd,0xfe,0xfe,0xff,0x00,0x00,0x01,0x02,0x02,0x03,0x03,
0x04,0x05,0x04,0x05,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x05,0x05,0x04,0x03,0x02,
0x02,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xfe,0xfd,0xfb,0xfa,0xf9,0xf7,
0xf5,0xf2,0xef,0xee,0xed,0xeb,0xe9,0xe7,0xe3,0xe0,0xde,0xdd,0xda,0xb5,0x95,0x95,
0x9f,0xa6,0xa9,0xa9,0xa8,0xa9,0xa8,0xa8,0xaa,0xa9,0xaa,0xab,0xb1,0xb6,0xb9,0xbd,
0xc1,0xb8,0xad,0xcc,0xd0,0xcf,0xce,0xce,0xcf,0xce,0xcd,0xd0,0xd0,0xcf,0xcf,0xd0,
0xd0,0xd3,0xd6,0xd4,0xcf,0xcc,0xcb,0xce,0xcf,0xce,0xd1,0xce,0xc8,0xd0,0xcd,0xcb,
0xc8,0xc4,0xc4,0xc4,0xca,0xc9,0xcd,0xcb,0xc9,0xcc,0xcf,0xcb,0xca,0xcb,0xcc,0xd2,
0xcd,0xcc,0xcb,0xc9,0xc9,0xcb,0xca,0xc5,0xcc,0xcd,0xd0,0xd0,0xce,0xd1,0xd5,0xd7,
0xd7,0xd4,0xd3,0xd7,0xd5,0x80,0x80,0xbd,0xbb,0xbe,0xbe,0xbc,0xbe,0xba,0xb4,0xb1,
0xab,0xa6,0xa6,0xa5,0xa6,0xa6,0xa5,0xa6,0xa9,0xa7,0xa5,0xa4,0xa6,0xa6,0xa7,0xa8,
0xa7,0xa7,0xa7,0xa6,0xa5,0xa7,0xa7,0xa6,0xa5,0xa5,0xa4,0xa3,0xa5,0xa5,0xa3,0xa4,
0xa4,0xa4,0xa4,0xa4,0xa4,0xa5,0xa5,0xa4,0xa2,0xa4,0xa4,0xa4,0xa5,0xa5,0xa5,0xa4,
0xa4,0xa4,0xa4,0xa4,0xa2,0xa4,0xa6,0xa5,0xa4,0xa4,0xa4,0xa6,0xa6,0xa2,0xa2,0xa3,
0xa3,0xa3,0xa4,0xa3,0xa4,0xa5,0xa3,0xa3,0xa1,0xa1,0xa4,0xa3,0xa1,0xa4,0xa5,0xa4,
0xa3,0xa3,0xa4,0xa4,0xa4,0xa4,0xa4,0xa6,0xa5,0xa5,0xa4,0xa4,0xa5,0xa5,0xa4,0xa5,
0xa6,0xa5,0xa5,0xa6,0xa8,0xa6,0xa8,0xa9,0xab,0xac,0xa7,0xa4,0xa4,0xa6,0xa7,0xa6,
0xa8,0xa4,0xb3,0x06,0x54,0x3e,0x3f,0x40,0x2b,0x0e,0x01,0x0e,0x15,0xf1,0xd6,0xc8,
0xb7,0xaa,0xcb,0x1a,0x2b,0x29,0x30,0x30,0x19,0x0d,0xfc,0xd1,0xe8,0xc9,0x98,0xaf,
0xd4,0xab,0xa0,0x9c,0xa4,0x9f,0xa6,0xc1,0xd5,0xff,0xbd,0xde,0xf2,0xf1,0xf3,0xf5,
0xf7,0xf7,0xf8,0xfa,0xfb,0xfb,0xfd,0xfd,0xfe,0xff,0xff,0x00,0x00,0x01,0x01,0x02,
0x03,0x03,0x03,0x04,0x04,0x04,0x05,0x06,0x06,0x06,0x06,0x06,0x05,0x05,0x04,0x04,
0x02,0x02,0x01,0x01,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xfd,0xfc,0xfa,0xf9,
0xf7,0xf6,0xf5,0xf2,0xef,0xee,0xec,0xea,0xe9,0xe8,0xe5,0xe1,0xde,0xdb,0xda,0xd5,
0xb4,0x99,0xa1,0xa7,0xaa,0xa9,0xa9,0xa9,0xa8,0xaa,0xaa,0xaa,0xaa,0xad,0xb4,0xb6,
0xb6,0xba,0xc0,0xc2,0xb7,0xae,0xcb,0xd0,0xcd,0xc4,0xc6,0xcd,0xcf,0xcf,0xd0,0xcf,
0xce,0xcf,0xcf,0xd1,0xd5,0xd6,0xd0,0xcd,0xce,0xcd,0xcd,0xcc,0xcd,0xcf,0xcf,0xcf,
0xcb,0xca,0xc9,0xc7,0xc4,0xc6,0xc8,0xc8,0xc6,0xc8,0xcc,0xcf,0xcc,0xc9,0xcc,0xd0,
0xd1,0xdd,0xd0,0xcc,0xca,0xca,0xcb,0xcd,0xce,0xcd,0xce,0xce,0xd0,0xd0,0xd0,0xd1,
0xd5,0xd6,0xd5,0xd4,0xd2,0xd4,0xd2,0x80,0x80,0xbe,0xbd,0xbd,0xbc,0xbd,0xbb,0xb9,
0xb5,0xb0,0xa9,0xa6,0xa6,0xa6,0xa6,0xa5,0xa6,0xa5,0xa7,0xa6,0xa5,0xa6,0xa6,0xa6,
0xa8,0xa7,0xa6,0xa7,0xa6,0xa6,0xa6,0xa6,0xa7,0xa6,0xa4,0xa4,0xa3,0xa3,0xa3,0xa2,
0xa3,0xa2,0xa3,0xa1,0xa1,0xa2,0xa4,0xa6,0xa4,0xa5,0xa3,0xa3,0xa4,0xa5,0xa4,0xa3,
0xa4,0xa4,0xa3,0xa5,0xa3,0xa2,0xa3,0xa3,0xa3,0xa3,0xa4,0xa4,0xa4,0xa4,0xa4,0xa3,
0xa2,0xa5,0xa3,0xa2,0xa4,0xa2,0xa3,0xa5,0xa4,0xa4,0xa4,0xa3,0xa4,0xa3,0xa3,0xa3,
0xa5,0xa4,0xa3,0xa4,0xa3,0xa3,0xa3,0xa4,0xa5,0xa5,0xa3,0xa4,0xa3,0xa5,0xa6,0xa6,
0xa5,0xa5,0xa8,0xa7,0xa7,0xa7,0xa8,0xa7,0xa7,0xa8,0xa8,0xa8,0xa7,0xa3,0xa1,0xa2,
0xa1,0x9e,0xa3,0xa7,0xb0,0xf3,0x51,0x40,0x3d,0x44,0x3b,0x1d,0x13,0x24,0x29,0x27,
0x1e,0x13,0x03,0xd0,0xef,0x31,0x2b,0x1f,0x2a,0x21,0x2b,0x25,0xf7,0xc4,0xd3,0xe1,
0xba,0xce,0xc3,0x9d,0xac,0xaa,0xa4,0xa3,0xa9,0xbf,0xe4,0xf4,0xcc,0xe8,0xf3,0xf6,
0xf6,0xf7,0xf3,0xf4,0xf8,0xfb,0xfd,0xfb,0xfc,0xfd,0xfe,0xfe,0xff,0x00,0x01,0x01,
0x01,0x02,0x03,0x03,0x03,0x03,0x04,0x04,0x05,0x05,0x05,0x05,0x05,0x04,0x04,0x04,
0x03,0x02,0x02,0x01,0x00,0x00,0x00,0xff,0xff,0xfe,0xff,0xff,0xfe,0xfd,0xfc,0xfa,
0xf9,0xf8,0xf7,0xf5,0xf4,0xf1,0xef,0xed,0xeb,0xea,0xe8,0xe7,0xe6,0xe2,0xde,0xdb,
0xd8,0xd7,0xcc,0xa5,0xa3,0xa6,0xaa,0xaa,0xa9,0xa9,0xa9,0xaa,0xaa,0xaa,0xab,0xaf,
0xb6,0xb7,0xb7,0xbb,0xbf,0xc0,0xc6,0xb8,0xb2,0xcd,0xc8,0xb7,0xc0,0xcd,0xd2,0xcf,
0xcf,0xd2,0xce,0xd1,0xd0,0xd1,0xd5,0xd4,0xd0,0xcd,0xce,0xcd,0xcd,0xca,0xcb,0xce,
0xd0,0xcc,0xc7,0xcb,0xce,0xcb,0xc7,0xc7,0xc3,0xc7,0xc9,0xc8,0xcc,0xcf,0xcb,0xcd,
0xd5,0xd3,0xcf,0xd2,0xd0,0xcd,0xc8,0xca,0xd1,0xd1,0xce,0xd2,0xd3,0xd4,0xd1,0xd0,
0xd0,0xd1,0xd3,0xd5,0xd7,0xd6,0xd3,0xd5,0xd8,0x80,0x80,0xc1,0xbf,0xbc,0xbc,0xba,
0xb8,0xbb,0xb4,0xaf,0xa9,0xa6,0xa6,0xa5,0xa5,0xa5,0xa6,0xa6,0xa5,0xa5,0xa6,0xa6,
0xa3,0xa4,0xa6,0xa7,0xa7,0xa6,0xa6,0xa5,0xa6,0xa4,0xa6,0xa5,0xa3,0xa2,0xa2,0xa4,
0xa3,0xa1,0xa3,0xa2,0xa0,0xa0,0xa1,0xa2,0xa2,0xa2,0xa0,0xa2,0xa3,0xa3,0xa5,0xa2,
0xa3,0xa4,0xa5,0xa6,0xa5,0xa6,0xa4,0xa4,0xa3,0xa3,0xa2,0xa4,0xa4,0xa6,0xa6,0xa6,
0xa4,0xa3,0xa2,0xa3,0xa0,0xa1,0xa1,0xa3,0xa4,0xa4,0xa4,0xa3,0xa2,0xa2,0xa3,0xa2,
0xa2,0xa1,0xa2,0xa4,0xa3,0xa3,0xa3,0xa3,0xa4,0xa4,0xa3,0xa2,0xa4,0xa3,0xa5,0xa7,
0xa5,0xa4,0xa4,0xa4,0xa6,0xa5,0xa6,0xa6,0xa6,0xa6,0xa6,0xa7,0xa7,0xa8,0xa6,0xa1,
0xa1,0x9f,0xa0,0x9f,0x9f,0x9d,0xb0,0xee,0x4f,0x46,0x39,0x43,0x38,0x31,0x28,0x26,
0x29,0x2c,0x2a,0x27,0x25,0x29,0x28,0x35,0x28,0x1e,0x24,0x1d,0x33,0x2e,0xf3,0xe1,
0xc7,0xbb,0xbb,0xb0,0x98,0x9a,0xa0,0x9c,0xa5,0xa7,0xaf,0xbb,0xcc,0x13,0x0e,0x0f,
0x01,0xec,0xcd,0xc8,0xca,0xe5,0x02,0x0d,0xfd,0xfa,0x01,0x00,0xfe,0xff,0xff,0x00,
0x01,0x01,0x01,0x02,0x02,0x03,0x03,0x03,0x04,0x04,0x05,0x05,0x05,0x04,0x04,0x04,
0x03,0x03,0x02,0x01,0x00,0x00,0xff,0xff,0xfe,0xfe,0xfe,0xfd,0xfd,0xfd,0xfc,0xfc,
0xfa,0xf9,0xf8,0xf7,0xf6,0xf4,0xf2,0xf0,0xee,0xec,0xea,0xe8,0xe7,0xe6,0xe5,0xe2,
0xdf,0xdc,0xd7,0xd5,0xc7,0xa7,0xa5,0xa7,0xaa,0xaa,0xaa,0xaa,0xa9,0xa9,0xa9,0xa9,
0xac,0xb0,0xb4,0xb7,0xba,0xbe,0xbf,0xc0,0xc4,0xcb,0xb6,0xb3,0xca,0xcc,0xcd,0xcd,
0xc7,0xcd,0xcb,0xcc,0xcc,0xcf,0xcc,0xce,0xd1,0xd0,0xce,0xd0,0xce,0xcc,0xcb,0xc9,
0xca,0xcc,0xcc,0xc9,0xc7,0xc8,0xcc,0xc9,0xc8,0xc7,0xc3,0xcf,0xd1,0xcf,0xce,0xd2,
0xcd,0xd5,0xde,0xcf,0xcd,0xd1,0xcf,0xcf,0xd0,0xce,0xd4,0xd9,0xd2,0xd2,0xd6,0xda,
0xd1,0xd0,0xd1,0xd3,0xd2,0xd7,0xd8,0xd6,0xd6,0xd8,0xdd,0x80,0x80,0xbc,0xbe,0xbc,
0xbc,0xba,0xb8,0xb6,0xb3,0xae,0xa8,0xa6,0xa7,0xa5,0xa5,0xa4,0xa5,0xa5,0xa7,0xa6,
0xa6,0xa5,0xa7,0xa5,0xa5,0xa7,0xa5,0xa5,0xa8,0xa6,0xa5,0xa6,0xa7,0xa6,0xa5,0xa4,
0xa4,0xa3,0xa2,0xa2,0xa4,0xa2,0xa0,0xa0,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,
0xa2,0xa2,0xa4,0xa4,0xa4,0xa4,0xa5,0xa4,0xa2,0xa3,0xa3,0xa3,0xa3,0xa3,0xa3,0xa5,
0xa4,0xa4,0xa2,0xa0,0xa2,0xa0,0xa1,0xa1,0xa1,0xa1,0xa1,0xa2,0xa2,0xa2,0xa1,0xa3,
0xa3,0xa2,0xa3,0xa2,0xa5,0xa4,0xa3,0xa3,0xa4,0xa4,0xa4,0xa3,0xa2,0xa2,0xa5,0xa4,
0xa5,0xa5,0xa4,0xa5,0xa5,0xa5,0xa6,0xa5,0xa6,0xa7,0xa5,0xa6,0xa6,0xa7,0xa7,0xa7,
0xa0,0xa0,0xa2,0xa2,0xa3,0xa3,0xa5,0xa3,0xa6,0xd9,0x47,0x4c,0x33,0x36,0x30,0x28,
0x2d,0x28,0x25,0x2b,0x30,0x32,0x36,0x38,0x34,0x35,0x29,0x2e,0x2e,0x2c,0x39,0x32,
0x13,0x04,0x12,0x04,0xee,0xbc,0xa1,0x98,0xa4,0xa3,0xb2,0xb1,0xa6,0xac,0xc8,0x26,
0x0e,0xed,0xae,0xa0,0x97,0x96,0x9a,0xab,0xc6,0xca,0xd5,0xf3,0x08,0x0b,0x06,0x00,
0x02,0x01,0x01,0x02,0x02,0x02,0x02,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
0x03,0x03,0x02,0x02,0x01,0x00,0xff,0xff,0xff,0xff,0xfe,0xfd,0xfd,0xfd,0xfd,0xfc,
0xfb,0xfa,0xf9,0xf8,0xf7,0xf6,0xf4,0xf3,0xf1,0xef,0xed,0xec,0xeb,0xe9,0xe7,0xe6,
0xe4,0xe2,0xe0,0xdd,0xd8,0xd5,0xc5,0xa6,0xa5,0xa7,0xab,0xac,0xab,0xaa,0xa9,0xa9,
0xa9,0xa9,0xad,0xb0,0xb4,0xb8,0xbb,0xbf,0xc0,0xc0,0xc3,0xc8,0xcc,0xb9,0xc7,0xd0,
0xcf,0xba,0xb0,0xb3,0xb3,0xb3,0xb2,0xb3,0xb3,0xb4,0xb5,0xb4,0xb5,0xb7,0xb5,0xb5,
0xb3,0xb4,0xb5,0xb6,0xb8,0xb6,0xb7,0xb6,0xb8,0xb6,0xb6,0xb7,0xba,0xbe,0xbe,0xc0,
0xb6,0xb2,0xb3,0xb4,0xba,0xbb,0xba,0xbf,0xc0,0xbe,0xc2,0xc3,0xd4,0xd0,0xc6,0xcc,
0xd1,0xcd,0xcd,0xcd,0xcd,0xcf,0xcb,0xd2,0xd5,0xd2,0xd5,0xd9,0xdb,0x80,0x80,0xbd,
0xba,0xbc,0xb9,0xb7,0xb9,0xb6,0xb2,0xad,0xa7,0xa2,0xa4,0xa3,0xa4,0xa6,0xa5,0xa5,
0xa6,0xa5,0xa4,0xa2,0xa4,0xa4,0xa3,0xa6,0xa2,0xa2,0xa3,0xa2,0xa3,0xa6,0xa6,0xa4,
0xa5,0xa5,0xa4,0xa2,0xa3,0xa3,0xa3,0xa1,0xa1,0xa1,0xa2,0xa3,0xa3,0xa3,0xa3,0xa2,
0xa2,0xa3,0xa1,0xa2,0xa2,0xa3,0xa2,0xa2,0xa2,0xa3,0xa2,0xa2,0xa3,0xa1,0xa1,0xa3,
0xa3,0xa2,0xa3,0xa1,0xa2,0xa1,0xa2,0xa2,0xa1,0xa1,0xa3,0xa2,0xa2,0xa1,0xa3,0xa3,
0xa3,0xa3,0xa3,0xa3,0xa4,0xa6,0xa5,0xa2,0xa3,0xa3,0xa5,0xa4,0xa3,0xa3,0xa4,0xa5,
0xa6,0xa4,0xa5,0xa6,0xa4,0xa5,0xa6,0xa6,0xa6,0xa5,0xa4,0xa3,0xa4,0xa4,0xa6,0xa7,
0xa7,0xa6,0xa2,0xa1,0xa0,0xa0,0xa4,0xa2,0xa4,0xa5,0xa5,0xe5,0x4d,0x4c,0x34,0x2b,
0x28,0x23,0x1f,0x24,0x25,0x2b,0x31,0x34,0x36,0x32,0x33,0x2d,0x33,0x37,0x38,0x37,
0x3a,0x38,0x3c,0x35,0x2a,0x2e,0x34,0x20,0xec,0xbd,0xae,0xc7,0xce,0xc3,0xda,0xb3,
0xdc,0x19,0xe9,0xb4,0x9f,0x9e,0x8b,0x8f,0x98,0xa6,0xaa,0xbb,0xd6,0xf1,0x0d,0x16,
0x13,0x14,0x08,0x04,0x02,0x03,0x03,0x04,0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x04,
0x03,0x03,0x02,0x02,0x01,0x01,0x00,0xff,0xff,0xff,0xfe,0xfe,0xfe,0xfb,0xfc,0xfc,
0xfb,0xfa,0xfa,0xf8,0xf8,0xf7,0xf6,0xf5,0xf3,0xf2,0xf1,0xef,0xed,0xeb,0xea,0xe8,
0xe6,0xe5,0xe4,0xe1,0xdf,0xde,0xd9,0xd5,0xc2,0xa4,0xa5,0xa6,0xaa,0xad,0xab,0xa9,
0xa9,0xa9,0xa9,0xaa,0xad,0xb0,0xb5,0xb8,0xba,0xbf,0xc1,0xc0,0xc1,0xc7,0xce,0xce,
0xcc,0xcf,0xcf,0xb6,0xaf,0xb0,0xb0,0xb0,0xaf,0xaf,0xaf,0xae,0xae,0xae,0xae,0xad,
0xad,0xac,0xac,0xac,0xac,0xab,0xac,0xac,0xac,0xab,0xab,0xac,0xac,0xae,0xb4,0xb5,
0xb4,0xb3,0x8c,0x81,0x84,0x86,0x85,0x86,0x87,0x88,0x89,0x89,0x88,0x8b,0x8d,0x8d,
0x8e,0x90,0x92,0x92,0x94,0x95,0x96,0x98,0x9a,0x9b,0x9c,0x9e,0xa0,0xa2,0xa2,0x80,
0x80,0xbd,0xba,0xbc,0xb8,0xb7,0xb7,0xb4,0xaf,0xab,0xa5,0xa3,0xa4,0xa3,0xa4,0xa4,
0xa3,0xa4,0xa7,0xa4,0xa4,0xa4,0xa4,0xa5,0xa3,0xa5,0xa4,0xa4,0xa4,0xa2,0xa4,0xa4,
0xa4,0xa3,0xa4,0xa6,0xa4,0xa4,0xa3,0xa3,0xa2,0xa3,0xa3,0xa2,0xa2,0xa4,0xa2,0xa2,
0xa3,0xa3,0xa3,0xa3,0xa3,0xa3,0xa3,0xa4,0xa3,0xa2,0xa3,0xa3,0xa2,0xa2,0xa3,0xa2,
0xa3,0xa3,0xa4,0xa2,0xa2,0xa1,0xa2,0xa0,0xa0,0xa0,0xa0,0xa0,0xa2,0xa2,0xa2,0xa1,
0xa1,0xa3,0xa4,0xa1,0xa0,0xa2,0xa4,0xa5,0xa4,0xa3,0xa4,0xa3,0xa4,0xa4,0xa3,0xa3,
0xa4,0xa3,0xa4,0xa3,0xa3,0xa3,0xa3,0xa4,0xa5,0xa5,0xa7,0xa6,0xa5,0xa4,0xa6,0xa5,
0xa6,0xa7,0xa6,0xa5,0xa4,0xa2,0x9f,0xa0,0xa1,0x9e,0x9e,0x9c,0xb6,0x13,0x63,0x4f,
0x34,0x25,0x1e,0x1b,0x1b,0x1e,0x27,0x2c,0x2d,0x2e,0x30,0x2e,0x2b,0x29,0x32,0x2f,
0x35,0x36,0x26,0x27,0x39,0x3b,0x3a,0x39,0x37,0x37,0x2d,0x0d,0x00,0x05,0xd1,0xe7,
0xee,0xd2,0x18,0x23,0xe7,0xb5,0xad,0x8e,0x8f,0x9f,0xc7,0xdc,0xe1,0xf0,0xf2,0xf6,
0xe7,0xe6,0x04,0x06,0x0c,0x12,0x0b,0x0a,0x08,0x06,0x06,0x05,0x05,0x04,0x04,0x04,
0x04,0x04,0x03,0x03,0x02,0x01,0x01,0x00,0xff,0xff,0xfe,0xfe,0xfd,0xfe,0xfd,0xfa,
0xfb,0xfb,0xfa,0xf9,0xf9,0xf8,0xf7,0xf5,0xf5,0xf4,0xf3,0xf2,0xf0,0xee,0xed,0xea,
0xe9,0xe8,0xe7,0xe5,0xe3,0xe1,0xdf,0xdd,0xd9,0xd5,0xbd,0xa3,0xa5,0xa6,0xaa,0xad,
0xab,0xa9,0xa9,0xaa,0xaa,0xaa,0xad,0xaf,0xb3,0xb7,0xba,0xbc,0xc0,0xbf,0xc2,0xc7,
0xd1,0xd1,0xca,0xcc,0xcd,0xb4,0xb0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb0,0xb0,0xaf,0xaf,
0xaf,0xaf,0xae,0xae,0xae,0xae,0xae,0xae,0xae,0xae,0xae,0xad,0xae,0xae,0xae,0xb1,
0xb5,0xb7,0xb8,0xb3,0x8a,0x85,0x87,0x88,0x88,0x87,0x87,0x88,0x88,0x87,0x86,0x87,
0x87,0x88,0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x8b,0x8c,0x8d,0x8e,0x8d,0x8c,
0x90,0x80,0x80,0xba,0xba,0xba,0xb8,0xb7,0xb4,0xb2,0xb0,0xaa,0xa5,0xa4,0xa4,0xa2,
0xa4,0xa5,0xa4,0xa6,0xa6,0xa5,0xa5,0xa4,0xa3,0xa4,0xa4,0xa6,0xa5,0xa5,0xa5,0xa3,
0xa4,0xa5,0xa5,0xa3,0xa4,0xa4,0xa3,0xa3,0xa3,0xa4,0xa3,0xa2,0xa1,0xa1,0xa1,0xa2,
0xa2,0xa1,0xa3,0xa4,0xa3,0xa3,0xa2,0xa2,0xa1,0xa3,0xa3,0xa3,0xa1,0xa2,0xa3,0xa2,
0xa1,0xa3,0xa2,0xa3,0xa4,0xa3,0xa2,0xa1,0xa3,0xa2,0xa3,0xa3,0xa2,0xa2,0xa2,0xa2,
0xa2,0xa3,0xa3,0xa4,0xa5,0xa3,0xa4,0xa4,0xa5,0xa4,0xa4,0xa5,0xa4,0xa4,0xa4,0xa6,
0xa4,0xa4,0xa4,0xa3,0xa5,0xa5,0xa5,0xa2,0xa2,0xa3,0xa3,0xa4,0xa4,0xa5,0xa4,0xa5,
0xa6,0xa4,0xa5,0xa4,0xa5,0xa4,0xa3,0xa1,0x9f,0xa6,0xa9,0xa8,0xa8,0xad,0xe7,0x50,
0x67,0x56,0x35,0x25,0x1b,0x13,0x15,0x1d,0x2a,0x36,0x2f,0x2f,0x34,0x32,0x2e,0x24,
0x20,0x21,0x27,0x2d,0xda,0xf0,0x3c,0x3a,0x3c,0x3b,0x3a,0x36,0x36,0x34,0x31,0x25,
0x1b,0x1c,0xfb,0x14,0x39,0x17,0xc9,0xab,0x94,0x92,0xb1,0xda,0xeb,0xe8,0xd7,0xcb,
0xb7,0xa6,0x9f,0x9c,0xab,0xb1,0xc4,0xd5,0xdf,0xdc,0xe9,0xfd,0x04,0x07,0x08,0x06,
0x05,0x05,0x04,0x04,0x03,0x03,0x02,0x01,0x01,0x00,0xff,0xff,0xff,0xfe,0xfd,0xfd,
0xfd,0xfc,0xfc,0xfb,0xfa,0xf9,0xf8,0xf7,0xf7,0xf5,0xf4,0xf3,0xf2,0xf2,0xf0,0xef,
0xed,0xeb,0xea,0xe8,0xe7,0xe5,0xe4,0xe1,0xdf,0xdd,0xd9,0xd5,0xb9,0xa2,0xa4,0xa5,
0xa9,0xac,0xab,0xa9,0xa9,0xaa,0xaa,0xab,0xad,0xaf,0xb2,0xb5,0xb9,0xbb,0xbd,0xbf,
0xc2,0xc9,0xd2,0xce,0xca,0xd1,0xcb,0xb4,0xb0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,
0xb1,0xb0,0xaf,0xb0,0xaf,0xaf,0xaf,0xaf,0xaf,0xaf,0xaf,0xae,0xae,0xaf,0xaf,0xaf,
0xaf,0xb3,0xb6,0xb8,0xb9,0xb0,0x88,0x86,0x88,0x89,0x89,0x88,0x87,0x88,0x88,0x88,
0x89,0x89,0x89,0x8a,0x8b,0x8b,0x8b,0x8b,0x8d,0x8d,0x8d,0x8d,0x8e,0x8f,0x92,0x93,
0x95,0x9f,0xab,0x80,0x80,0xb8,0xb9,0xb7,0xb7,0xb5,0xb4,0xb2,0xb0,0xaa,0xa4,0xa3,
0xa4,0xa2,0xa3,0xa5,0xa5,0xa4,0xa5,0xa7,0xa6,0xa5,0xa5,0xa2,0xa4,0xa6,0xa5,0xa5,
0xa5,0xa4,0xa4,0xa4,0xa4,0xa4,0xa4,0xa5,0xa5,0xa5,0xa3,0xa2,0xa2,0xa3,0xa3,0xa2,
0xa3,0xa1,0xa1,0xa2,0xa3,0xa3,0xa4,0xa4,0xa3,0xa3,0xa1,0xa1,0xa1,0xa2,0xa1,0xa2,
0xa3,0xa3,0xa0,0xa1,0xa1,0xa2,0xa2,0xa1,0xa1,0x9f,0xa1,0xa2,0xa2,0xa3,0xa2,0xa1,
0xa2,0xa2,0xa1,0xa1,0xa1,0xa1,0xa3,0xa3,0xa5,0xa4,0xa2,0xa3,0xa2,0xa1,0xa1,0xa1,
0xa2,0xa4,0xa3,0xa5,0xa4,0xa3,0xa4,0xa4,0xa4,0xa3,0xa4,0xa4,0xa4,0xa2,0xa3,0xa4,
0xa4,0xa4,0xa5,0xa4,0xa4,0xa5,0xa7,0xa5,0xa4,0xa1,0xa0,0xa0,0x9f,0x9d,0xac,0xda,
0x39,0x62,0x5f,0x5c,0x40,0x2c,0x25,0x20,0x1f,0x26,0x38,0x42,0x3a,0x32,0x31,0x29,
0x0c,0x01,0xf4,0xf8,0x09,0x16,0xb6,0xc2,0x2e,0x3e,0x3c,0x3e,0x3c,0x38,0x35,0x30,
0x2d,0x31,0x3a,0x2d,0x27,0x3d,0x31,0xec,0xbb,0xa2,0x89,0xb2,0xd4,0xde,0xd2,0xb3,
0x97,0x8d,0x8d,0x8e,0x9c,0x96,0xa8,0xae,0xb8,0xb3,0xb2,0xa2,0xae,0xb9,0xc6,0xe1,
0xfd,0x0a,0x09,0x07,0x06,0x04,0x04,0x04,0x02,0x01,0x00,0x00,0xff,0xff,0xff,0xfe,
0xfd,0xfd,0xfc,0xfc,0xfc,0xfb,0xfa,0xf8,0xf8,0xf6,0xf6,0xf5,0xf4,0xf3,0xf2,0xf0,
0xef,0xee,0xed,0xeb,0xe9,0xe8,0xe6,0xe5,0xe3,0xe0,0xde,0xdc,0xd8,0xd4,0xb6,0xa1,
0xa4,0xa5,0xa8,0xaa,0xaa,0xa9,0xa9,0xa8,0xa8,0xa9,0xac,0xaf,0xb3,0xb5,0xb7,0xb9,
0xbc,0xbf,0xc1,0xc8,0xd0,0xc8,0xcb,0xd3,0xcb,0xb3,0xb1,0xb1,0xb1,0xb2,0xb2,0xb2,
0xb2,0xb2,0xb1,0xb0,0xb0,0xb0,0xb0,0xb0,0xb1,0xb0,0xaf,0xaf,0xaf,0xaf,0xaf,0xaf,
0xaf,0xb0,0xb0,0xb3,0xb7,0xb7,0xb9,0xaa,0x86,0x87,0x88,0x8a,0x8b,0x89,0x88,0x89,
0x8a,0x8a,0x8b,0x8b,0x8a,0x8a,0x8c,0x8d,0x8d,0x8c,0x8f,0x8f,0x8d,0x8e,0x93,0x97,
0x9b,0x9f,0xa8,0xb2,0xb8,0x80,0x80,0xb8,0xb6,0xb7,0xb6,0xb5,0xb4,0xb2,0xaf,0xa9,
0xa4,0xa3,0xa3,0xa2,0xa3,0xa4,0xa4,0xa2,0xa5,0xa5,0xa4,0xa5,0xa5,0xa3,0xa3,0xa3,
0xa3,0xa3,0xa6,0xa6,0xa5,0xa5,0xa4,0xa4,0xa4,0xa3,0xa3,0xa1,0xa2,0xa1,0xa3,0xa2,
0xa0,0xa2,0xa3,0xa2,0xa1,0xa3,0xa3,0xa1,0xa3,0xa3,0xa2,0xa2,0xa0,0xa1,0xa1,0xa3,
0xa5,0xa5,0xa4,0xa1,0xa0,0xa0,0xa1,0xa2,0xa2,0xa1,0xa0,0x9f,0xa0,0xa0,0xa2,0xa3,
0xa1,0xa0,0xa2,0xa3,0xa2,0xa2,0xa1,0xa1,0xa2,0xa0,0xa0,0xa3,0xa3,0xa4,0xa3,0xa4,
0xa5,0xa3,0xa2,0xa3,0xa3,0xa4,0xa4,0xa4,0xa4,0xa4,0xa4,0xa3,0xa2,0xa4,0xa6,0xa5,
0xa3,0xa5,0xa6,0xa5,0xa6,0xa5,0xa4,0xa7,0xa8,0xa7,0xa5,0xa1,0xa0,0x9e,0x9d,0x99,
0xa8,0x1b,0x5e,0x5a,0x56,0x5e,0x59,0x34,0x20,0x16,0x12,0x20,0x45,0x4a,0x3c,0x2e,
0x28,0x2f,0xf5,0xcb,0xaa,0xbe,0xde,0xe1,0xa5,0x9f,0xc5,0xf9,0x37,0x3e,0x3d,0x32,
0x2a,0x28,0x27,0x2a,0x28,0x27,0x38,0x3a,0x0d,0xe3,0xbc,0x99,0xbb,0xd6,0xd2,0xc5,
0x9e,0x8c,0x8b,0x8a,0x87,0x9c,0x94,0xa7,0xb7,0xcf,0xd0,0xd1,0xc4,0xa7,0xb3,0xb5,
0xb2,0xb8,0xd1,0xe8,0xfb,0x06,0x07,0x06,0x04,0x03,0x02,0x02,0x00,0xff,0xfe,0xfe,
0xfd,0xfe,0xfd,0xfd,0xfd,0xfc,0xfb,0xfb,0xfa,0xf8,0xf7,0xf6,0xf6,0xf5,0xf3,0xf2,
0xf0,0xef,0xee,0xec,0xeb,0xe9,0xe8,0xe7,0xe5,0xe4,0xe2,0xdf,0xdd,0xdb,0xd7,0xd3,
0xb3,0xa1,0xa4,0xa6,0xa7,0xa9,0xa9,0xa9,0xa8,0xa7,0xa7,0xa8,0xab,0xae,0xb1,0xb5,
0xb7,0xb8,0xba,0xbf,0xc2,0xc6,0xce,0xc8,0xca,0xd0,0xca,0xb3,0xb2,0xb2,0xb2,0xb3,
0xb3,0xb3,0xb3,0xb3,0xb2,0xb2,0xb1,0xb2,0xb2,0xb1,0xb1,0xb1,0xb0,0xb0,0xb0,0xaf,
0xb0,0xb0,0xb0,0xb0,0xb1,0xb3,0xb7,0xb8,0xb9,0xa5,0x86,0x87,0x8a,0x8d,0x8c,0x89,
0x88,0x89,0x8c,0x8d,0x8d,0x8d,0x8b,0x8c,0x8e,0x8e,0x8f,0x8e,0x90,0x90,0x92,0x96,
0x9d,0xa1,0xa5,0xac,0xb5,0xbc,0xbc,0x80,0x80,0xb8,0xb7,0xb5,0xb5,0xb3,0xb3,0xb2,
0xaf,0xa8,0xa3,0xa2,0xa1,0xa2,0xa2,0xa4,0xa4,0xa2,0xa5,0xa7,0xa3,0xa4,0xa3,0xa3,
0xa1,0xa2,0xa3,0xa3,0xa6,0xa6,0xa5,0xa5,0xa3,0xa1,0xa4,0xa4,0xa2,0xa1,0xa2,0x9f,
0xa1,0xa3,0xa0,0xa1,0xa1,0xa1,0x9f,0xa1,0xa2,0xa1,0xa1,0xa2,0xa1,0xa2,0xa2,0xa1,
0xa2,0xa3,0xa2,0xa3,0xa2,0xa0,0xa0,0xa0,0xa1,0xa2,0xa2,0xa2,0xa1,0xa1,0xa0,0x9f,
0x9f,0xa0,0x9f,0x9f,0xa1,0xa3,0xa2,0xa2,0xa3,0xa3,0xa2,0xa0,0xa0,0xa2,0xa2,0xa2,
0xa3,0xa3,0xa1,0xa2,0xa3,0xa3,0xa5,0xa1,0xa2,0xa4,0xa4,0xa3,0xa3,0xa2,0xa3,0xa4,
0xa4,0xa2,0xa4,0xa5,0xa6,0xa4,0xa5,0xa6,0xa4,0xa6,0xa6,0xa3,0xa2,0xa0,0xa0,0x9d,
0x9d,0xa1,0xec,0x4c,0x5b,0x56,0x56,0x5f,0x68,0x59,0x35,0x23,0x1e,0x25,0x49,0x3d,
0x25,0x1c,0x21,0x28,0x21,0xd5,0x9a,0x95,0xbd,0xac,0x96,0x9c,0x9c,0xaf,0x10,0x46,
0x38,0x2a,0x29,0x23,0x1b,0x1a,0x1c,0x27,0x39,0x22,0x13,0xf3,0xac,0xb1,0xc4,0xcd,
0xc5,0xaa,0x91,0x8d,0x97,0x95,0xab,0xb9,0xc7,0xdb,0xe9,0xfe,0xec,0xea,0xc2,0xc6,
0xc8,0xb5,0xa7,0xb7,0xba,0xc1,0xd0,0xe1,0xf8,0x03,0x05,0x03,0x03,0x01,0x00,0xff,
0xfe,0xfd,0xfd,0xfd,0xfc,0xfc,0xfc,0xfb,0xfa,0xf9,0xf9,0xf8,0xf7,0xf5,0xf4,0xf2,
0xf1,0xf0,0xef,0xee,0xed,0xeb,0xe9,0xe8,0xe7,0xe5,0xe3,0xe3,0xe0,0xdd,0xdc,0xda,
0xd7,0xd2,0xb0,0xa2,0xa5,0xa5,0xa6,0xa9,0xa9,0xa9,0xa9,0xa8,0xa7,0xa8,0xaa,0xad,
0xb1,0xb5,0xb6,0xb7,0xba,0xbf,0xc3,0xc6,0xce,0xca,0xcd,0xd0,0xc5,0xb2,0xb2,0xb3,
0xb3,0xb3,0xb4,0xb3,0xb3,0xb3,0xb3,0xb3,0xb2,0xb3,0xb3,0xb3,0xb2,0xb2,0xb1,0xb1,
0xb1,0xb0,0xb1,0xb1,0xb1,0xb2,0xb2,0xb5,0xb6,0xb7,0xb9,0x9f,0x86,0x88,0x8b,0x8c,
0x8c,0x89,0x89,0x8a,0x8c,0x8e,0x8d,0x8d,0x8d,0x8e,0x8f,0x90,0x91,0x91,0x93,0x96,
0x9a,0x9f,0xa4,0xa9,0xaf,0xb5,0xbb,0xbd,0xbd,0x80,0x80,0xb8,0xb5,0xb3,0xb7,0xb4,
0xb2,0xb0,0xad,0xa8,0xa2,0xa1,0xa1,0xa3,0xa3,0xa4,0xa4,0xa1,0xa3,0xa6,0xa2,0xa5,
0xa4,0xa3,0xa2,0xa2,0xa3,0xa4,0xa5,0xa5,0xa3,0xa5,0xa5,0xa2,0xa4,0xa3,0xa3,0xa3,
0xa1,0xa0,0x9f,0xa1,0xa0,0xa3,0xa1,0xa1,0x9f,0xa2,0xa3,0xa3,0xa3,0xa3,0xa3,0xa4,
0xa3,0xa2,0xa2,0xa2,0xa2,0xa1,0xa1,0xa1,0xa0,0xa1,0xa2,0x9f,0xa0,0xa0,0x9f,0xa1,
0xa1,0xa0,0xa1,0xa1,0xa1,0xa1,0xa1,0xa1,0xa2,0xa2,0xa2,0xa1,0xa1,0x9f,0xa0,0xa1,
0xa2,0xa1,0xa2,0xa2,0xa2,0xa1,0xa2,0xa3,0xa3,0xa0,0xa0,0xa2,0xa4,0xa3,0xa4,0xa6,
0xa5,0xa5,0xa6,0xa3,0xa2,0xa4,0xa4,0xa6,0xa6,0xa6,0xa6,0xa6,0xa6,0xa5,0xa2,0xa1,
0xa0,0x9e,0xae,0xc3,0x20,0x5a,0x59,0x56,0x57,0x60,0x63,0x66,0x5f,0x3a,0x19,0x11,
0x2b,0x38,0x27,0x1f,0x1c,0x1f,0x26,0x09,0xcc,0xa7,0xd7,0xc3,0xa3,0x9a,0x9d,0xae,
0x0b,0x4d,0x3e,0x1e,0x19,0x16,0x15,0x18,0x1f,0x31,0x32,0x27,0x10,0xc8,0xb0,0xbe,
0xbe,0xbc,0xba,0x9e,0x98,0xb2,0xba,0xbd,0xd0,0xe3,0xf8,0xe3,0xf2,0xd1,0xc9,0xca,
0xc4,0xc1,0xaf,0xa5,0xb5,0xb6,0xbd,0xb8,0xbf,0xc5,0xd1,0xe5,0xf5,0xfc,0x03,0x01,
0x00,0xff,0xfe,0xfd,0xfd,0xfb,0xfb,0xfa,0xfa,0xf9,0xf8,0xf8,0xf7,0xf6,0xf5,0xf4,
0xf3,0xf1,0xf0,0xef,0xed,0xec,0xeb,0xea,0xe9,0xe7,0xe5,0xe4,0xe3,0xe2,0xdf,0xdc,
0xdb,0xd9,0xd5,0xcf,0xac,0xa2,0xa5,0xa5,0xa6,0xaa,0xa9,0xa8,0xa8,0xa7,0xa7,0xa8,
0xab,0xad,0xb0,0xb4,0xb5,0xb6,0xb9,0xbf,0xc2,0xc6,0xcd,0xc6,0xc9,0xcc,0xc3,0xb1,
0xb3,0xb2,0xb3,0xb4,0xb4,0xb4,0xb5,0xb4,0xb4,0xb4,0xb4,0xb4,0xb4,0xb3,0xb2,0xb2,
0xb2,0xb1,0xb1,0xb1,0xb1,0xb1,0xb2,0xb3,0xb3,0xb5,0xb6,0xb7,0xb8,0x9b,0x86,0x89,
0x8b,0x8c,0x8b,0x8a,0x8a,0x8a,0x8d,0x8e,0x8f,0x8e,0x8f,0x92,0x94,0x94,0x94,0x95,
0x98,0x9c,0xa2,0xa7,0xac,0xb1,0xb5,0xbb,0xbd,0xbd,0xbe,0x80,0x80,0xb6,0xb7,0xb5,
0xb7,0xb2,0xb1,0xb1,0xab,0xa6,0xa1,0xa0,0xa1,0xa4,0xa2,0xa4,0xa4,0xa3,0xa3,0xa4,
0xa3,0xa2,0xa4,0xa4,0xa3,0xa4,0xa3,0xa2,0xa3,0xa3,0xa4,0xa4,0xa5,0xa3,0xa2,0xa2,
0xa3,0xa1,0x9f,0xa1,0xa0,0xa0,0x9f,0x9f,0xa0,0xa0,0x9f,0xa5,0xa3,0x9f,0xa0,0xa0,
0xa1,0xa1,0xa1,0xa1,0xa1,0xa2,0xa1,0xa1,0xa0,0xa2,0xa0,0xa0,0xa1,0xa1,0xa1,0xa0,
0x9f,0x9f,0x9f,0x9e,0x9f,0x9f,0x9f,0xa1,0xa3,0xa3,0xa2,0xa1,0xa1,0xa0,0xa0,0xa0,
0xa1,0xa2,0xa2,0xa1,0xa3,0xa4,0xa3,0xa1,0xa2,0xa3,0xa3,0xa2,0xa3,0xa3,0xa2,0xa2,
0xa5,0xa6,0xa7,0xa5,0xa4,0xa3,0xa2,0xa5,0xa4,0xa6,0xa6,0xa6,0xa5,0xa7,0xa5,0xa5,
0xa2,0x9e,0xa2,0xae,0xa8,0xd6,0x49,0x57,0x4f,0x4e,0x5b,0x60,0x5f,0x5b,0x4f,0x4f,
0x3e,0x1e,0x1c,0x30,0x2a,0x21,0x18,0x19,0x20,0x20,0xeb,0xcf,0x03,0x08,0x00,0xdd,
0xb6,0xca,0x29,0x4a,0x3f,0x26,0x1b,0x11,0x09,0x10,0x24,0x2c,0x20,0x17,0xe8,0xb2,
0xb6,0xb9,0xc3,0xc9,0xb4,0xa9,0xd4,0xdc,0xf6,0xee,0xd9,0xd2,0xb8,0xa7,0xa4,0x9b,
0x9f,0xa1,0xa7,0xa3,0xac,0xaf,0x9f,0xa4,0xaf,0xb1,0xb5,0xc7,0xdb,0xd5,0xd7,0xe5,
0xf8,0x00,0x00,0xff,0xfe,0xfd,0xfc,0xfa,0xfa,0xf9,0xf8,0xf8,0xf7,0xf6,0xf5,0xf5,
0xf4,0xf2,0xf2,0xf0,0xef,0xed,0xec,0xea,0xe9,0xe8,0xe7,0xe6,0xe4,0xe4,0xe3,0xe1,
0xde,0xdb,0xd9,0xd7,0xd4,0xcd,0xa9,0xa2,0xa5,0xa6,0xa7,0xa9,0xa9,0xa8,0xa8,0xa7,
0xa8,0xa9,0xab,0xac,0xaf,0xb3,0xb5,0xb6,0xb8,0xbd,0xc2,0xc6,0xca,0xc3,0xc8,0xc9,
0xbe,0xb1,0xb3,0xb3,0xb4,0xb5,0xb5,0xb5,0xb5,0xb5,0xb5,0xb4,0xb4,0xb4,0xb4,0xb3,
0xb3,0xb3,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb3,0xb4,0xb5,0xb6,0xb6,0xb6,0x96,
0x87,0x8a,0x8b,0x8c,0x8c,0x8b,0x8c,0x8b,0x8e,0x90,0x92,0x91,0x92,0x97,0x99,0x9a,
0x9a,0x9a,0x9d,0xa3,0xaa,0xae,0xb2,0xb5,0xb8,0xbc,0xbd,0xbf,0xc0,0x80,0x80,0xb3,
0xb4,0xb6,0xb6,0xb1,0xb1,0xaf,0xa9,0xa4,0xa1,0xa2,0xa3,0xa2,0xa0,0xa2,0xa2,0xa2,
0xa3,0xa3,0xa4,0xa3,0xa2,0xa2,0xa2,0xa2,0xa2,0xa1,0xa2,0xa3,0xa3,0xa4,0xa4,0xa2,
0xa1,0xa1,0xa1,0xa1,0xa0,0x9f,0x9f,0x9f,0x9f,0x9f,0xa0,0xa1,0xa1,0xa3,0xa2,0xa2,
0xa1,0xa0,0xa1,0xa1,0xa0,0xa1,0xa0,0xa1,0xa1,0x9f,0x9f,0xa1,0x9f,0xa0,0xa0,0xa0,
0xa1,0xa0,0xa0,0xa0,0x9f,0x9f,0x9f,0x9f,0xa0,0xa0,0xa2,0xa2,0xa3,0xa1,0xa0,0xa0,
0xa0,0xa0,0xa1,0xa1,0xa1,0xa1,0xa2,0xa2,0xa1,0xa0,0xa1,0xa0,0x9f,0xa0,0xa2,0xa3,
0xa0,0xa0,0xa2,0xa3,0xa3,0xa2,0xa2,0xa3,0xa5,0xa1,0xa1,0xa3,0xa4,0xa3,0xa5,0xa2,
0xa5,0xa7,0xa3,0xa6,0xa9,0x9f,0xb4,0x1d,0x58,0x4f,0x48,0x54,0x61,0x62,0x5f,0x58,
0x52,0x51,0x51,0x39,0xfb,0xfc,0x12,0x28,0x24,0x19,0x16,0x12,0xef,0xda,0xe9,0x22,
0x2e,0x29,0x1b,0x27,0x3d,0x3b,0x16,0x09,0x0a,0x15,0x26,0x2a,0x30,0x30,0x28,0x03,
0xf2,0xef,0xc3,0xc3,0xca,0xca,0xcd,0xcf,0xd6,0xc5,0xbe,0xa0,0x95,0x96,0x8d,0x86,
0x87,0x8b,0x8b,0x91,0x95,0x9c,0xa4,0x9e,0x9e,0xaa,0xae,0xb9,0xbd,0xbf,0xc2,0xc4,
0xd9,0xe7,0xe6,0xee,0xfa,0xff,0xfe,0xfd,0xfb,0xfa,0xf9,0xf8,0xf8,0xf6,0xf5,0xf3,
0xf4,0xf3,0xf2,0xf1,0xf0,0xee,0xed,0xec,0xeb,0xea,0xe9,0xe7,0xe5,0xe4,0xe2,0xe2,
0xe1,0xe0,0xdd,0xda,0xd8,0xd6,0xd2,0xcb,0xa6,0xa1,0xa5,0xa5,0xa6,0xa8,0xa8,0xa7,
0xa7,0xa7,0xa7,0xa8,0xa9,0xaa,0xae,0xb1,0xb2,0xb6,0xb7,0xbb,0xbf,0xc6,0xc5,0xc0,
0xc4,0xc4,0xbb,0xb2,0xb3,0xb4,0xb5,0xb5,0xb5,0xb5,0xb5,0xb5,0xb5,0xb5,0xb4,0xb4,
0xb4,0xb3,0xb4,0xb3,0xb2,0xb3,0xb3,0xb2,0xb2,0xb3,0xb3,0xb3,0xb4,0xb6,0xb7,0xb7,
0xb4,0x90,0x88,0x8a,0x8b,0x8c,0x8d,0x8c,0x8c,0x8e,0x90,0x94,0x96,0x96,0x97,0x9a,
0x9c,0x9d,0x9e,0x9f,0xa3,0xa9,0xb0,0xb3,0xb5,0xb8,0xba,0xbc,0xbd,0xc0,0xc2,0x80,
0x80,0xb4,0xb2,0xb3,0xb4,0xb1,0xb1,0xaf,0xa9,0xa2,0xa1,0x9f,0x9d,0x9d,0x9e,0xa0,
0xa1,0x9f,0x9f,0x9f,0x9e,0xa0,0x9e,0xa1,0xa0,0x9f,0xa1,0xa0,0xa2,0xa1,0xa1,0xa3,
0xa1,0x9f,0x9e,0x9e,0x9e,0x9f,0x9f,0x9d,0x9e,0x9e,0xa0,0x9f,0x9f,0x9f,0xa0,0xa1,
0xa0,0xa0,0x9f,0x9f,0x9e,0x9d,0x9e,0xa0,0xa0,0xa0,0xa0,0x9f,0x9f,0xa0,0xa0,0x9f,
0xa0,0xa0,0xa0,0xa1,0x9f,0x9e,0x9e,0x9d,0x9d,0x9e,0xa0,0x9e,0xa0,0xa1,0xa1,0x9f,
0x9f,0x9f,0xa2,0xa0,0xa0,0xa0,0x9f,0xa0,0xa1,0xa0,0xa0,0xa1,0xa2,0xa1,0xa1,0xa1,
0xa3,0xa2,0xa0,0xa1,0xa1,0xa1,0xa2,0xa1,0xa0,0xa3,0xa4,0xa2,0xa1,0xa3,0xa4,0xa2,
0xa4,0xa7,0xa8,0xa6,0xa3,0xa7,0x9f,0xa1,0xb9,0x2b,0x58,0x4d,0x4d,0x60,0x64,0x61,
0x59,0x4f,0x4f,0x4c,0x41,0x25,0xfc,0xdc,0xe1,0xde,0x07,0x1e,0x00,0xf2,0xf3,0xf7,
0xfa,0x1c,0x24,0x2c,0x34,0x34,0x24,0x0c,0x0c,0x09,0x03,0x06,0x36,0x40,0x3a,0x4a,
0x4e,0x41,0x31,0x3b,0xf8,0xcf,0xd3,0xd2,0xc2,0xb5,0x9f,0x99,0x8d,0x87,0x88,0x90,
0x91,0x8c,0x95,0x9b,0x96,0x96,0xb5,0xaf,0x94,0x9a,0xa5,0x97,0x9b,0xa5,0xae,0xaf,
0xb9,0xc7,0xd7,0xd2,0xda,0xd9,0xdd,0xf6,0x01,0xfd,0xfb,0xfa,0xf9,0xf8,0xf7,0xf5,
0xf3,0xf1,0xf2,0xf1,0xf0,0xef,0xee,0xec,0xec,0xeb,0xea,0xe9,0xe8,0xe6,0xe4,0xe3,
0xe1,0xe0,0xdf,0xde,0xdb,0xd8,0xd7,0xd4,0xd1,0xc8,0xa3,0xa0,0xa4,0xa5,0xa4,0xa1,
0xa7,0xa6,0xa6,0xa6,0xa7,0xa6,0xa7,0xaa,0xad,0xae,0xb0,0xb4,0xb5,0xb9,0xbc,0xc2,
0xc0,0xbf,0xc3,0xc3,0xb8,0xb1,0xb3,0xb4,0xb4,0xb5,0xb5,0xb6,0xb5,0xb5,0xb5,0xb5,
0xb4,0xb5,0xb5,0xb4,0xb4,0xb4,0xb3,0xb3,0xb3,0xb3,0xb2,0xb3,0xb3,0xb3,0xb4,0xb6,
0xb7,0xb7,0xb1,0x8d,0x88,0x8b,0x8b,0x8c,0x8e,0x8e,0x8f,0x91,0x93,0x97,0x98,0x98,
0x9a,0x9d,0xa0,0xa1,0xa3,0xa4,0xa8,0xad,0xb3,0xb5,0xb8,0xba,0xbb,0xbd,0xbd,0xbf,
0xc1,0x80,0x80,0xb2,0xb1,0xb3,0xb4,0xb1,0xb1,0xad,0xa8,0xa2,0x9f,0xa6,0x9b,0x9a,
0x9c,0x9b,0x9c,0x9c,0x9c,0x9d,0x9d,0x9c,0x9e,0x9e,0x9d,0x9c,0x9c,0x9e,0x9d,0x9d,
0x9f,0x9f,0x9e,0x9c,0x9e,0x9e,0x9d,0x9d,0x9d,0x9c,0x9c,0x9d,0x9f,0x9b,0x9c,0x9d,
0x9e,0x9e,0x9e,0x9e,0x9d,0x9c,0x9b,0x9c,0x9e,0x9e,0x9f,0x9f,0x9e,0x9e,0x9f,0x9e,
0xa0,0x9e,0x9e,0x9f,0x9d,0x9e,0x9d,0x9e,0x9d,0x9c,0x9c,0x9e,0x9f,0x9d,0x9e,0x9d,
0x9d,0x9c,0x9d,0x9d,0x9d,0x9e,0x9e,0x9e,0x9e,0x9f,0x9f,0x9f,0x9e,0x9e,0x9f,0xa0,
0xa0,0xa0,0xa2,0xa1,0xa1,0xa3,0xa1,0xa1,0xa0,0xa0,0xa1,0xa3,0xa1,0xa1,0xa2,0xa2,
0xa3,0xa3,0xa3,0xa3,0xa4,0xa4,0xa0,0x9e,0x9c,0x9c,0xd0,0x46,0x54,0x45,0x53,0x66,
0x68,0x5f,0x52,0x51,0x4a,0x38,0x29,0x3c,0x00,0xc9,0xbf,0xa4,0xca,0xf3,0x10,0x11,
0x0d,0x18,0x26,0x25,0x1e,0x1b,0x1f,0x0e,0x0a,0x0b,0x04,0x13,0x20,0x27,0x41,0x54,
0x4a,0x4c,0x51,0x55,0x52,0x54,0x4e,0x2c,0x0c,0xe9,0xb6,0x97,0x90,0x8b,0x8e,0x99,
0x8f,0x8f,0x90,0x96,0x9a,0x9c,0x8b,0x95,0x99,0x88,0x8a,0x9c,0x92,0x91,0x9b,0xa6,
0xa2,0x9b,0x9a,0xa9,0xb4,0xba,0xcb,0xd7,0xde,0xde,0xe0,0xf4,0xfb,0xfb,0xf8,0xf7,
0xf5,0xf4,0xf3,0xf2,0xf1,0xf0,0xef,0xef,0xee,0xeb,0xeb,0xea,0xe9,0xe8,0xe8,0xe6,
0xe5,0xe3,0xe2,0xe0,0xdf,0xdd,0xdb,0xd8,0xd6,0xd4,0xd1,0xc6,0xa3,0xa2,0xa2,0xa2,
0xa3,0xa4,0xa3,0xa6,0xa5,0xa5,0xa5,0xa5,0xa6,0xa8,0xab,0xab,0xad,0xb2,0xb4,0xb6,
0xb7,0xbd,0xbe,0xbf,0xc1,0xc1,0xb6,0xb2,0xb3,0xb4,0xb4,0xb5,0xb5,0xb6,0xb6,0xb5,
0xb5,0xb5,0xb5,0xb5,0xb4,0xb4,0xb4,0xb4,0xb4,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb4,
0xb5,0xb6,0xb7,0xb7,0xae,0x8b,0x89,0x8c,0x8c,0x8d,0x90,0x90,0x91,0x94,0x95,0x97,
0x9a,0x9c,0x9d,0xa0,0xa2,0xa4,0xa6,0xa8,0xab,0xaf,0xb4,0xb7,0xb9,0xba,0xbb,0xbc,
0xbd,0xbe,0xbf,0x80,0x80,0xb3,0xb2,0xb2,0xb4,0xb1,0xb0,0xad,0xa7,0xa1,0x9b,0x9d,
0x97,0x96,0x97,0x96,0x98,0x99,0x99,0x9a,0x99,0x9b,0x9c,0x9a,0x9a,0x98,0x98,0x98,
0x9a,0x9c,0x9c,0x9b,0x9a,0x99,0x9a,0x9c,0x9d,0x9c,0x9a,0x99,0x99,0x9a,0x9b,0x9a,
0x9b,0x9c,0x9c,0x9d,0x9c,0x9b,0x9b,0x9b,0x99,0x9b,0x9b,0x9c,0x9e,0x9e,0x9c,0x9e,
0x9e,0x9d,0x9c,0x9c,0x9b,0x9b,0x9b,0x9d,0x9c,0x9b,0x9a,0x9a,0x9c,0x9c,0x9d,0x9d,
0x9e,0x9e,0x9d,0x9c,0x9e,0x9d,0x9c,0x9d,0x9f,0x9b,0x9c,0x9b,0x9b,0x9c,0x9c,0x9b,
0x9c,0x9c,0x9e,0x9e,0x9e,0x9e,0x9f,0x9f,0x9f,0x9d,0x9e,0x9f,0xa1,0xa2,0xa3,0x9f,
0x9e,0x9f,0x9f,0x9e,0x9f,0xa0,0x9f,0xa1,0xa0,0xa0,0xa5,0xa6,0xef,0x54,0x4e,0x44,
0x60,0x6c,0x64,0x5c,0x58,0x52,0x40,0x33,0x2f,0x0d,0xf8,0xdd,0xb8,0xad,0xcb,0xe0,
0xf7,0xfc,0x03,0x0d,0x0f,0x08,0xfa,0xf9,0xf8,0xff,0x01,0x1f,0x1e,0x28,0x2f,0x39,
0x46,0x50,0x54,0x4d,0x4b,0x4e,0x50,0x52,0x57,0x55,0x51,0x40,0x33,0x0a,0xe9,0xbe,
0xa0,0x8b,0x8f,0x8f,0x92,0x92,0x93,0x8b,0x8c,0x97,0x90,0x8e,0x97,0x9a,0x98,0x98,
0x9a,0x99,0x94,0x95,0x93,0x99,0x9c,0xb8,0xca,0xd3,0xd3,0xdc,0xdf,0xe9,0x01,0x06,
0x00,0xfd,0xfb,0xf9,0xf9,0xf7,0xf6,0xf6,0xf5,0xf3,0xf2,0xf2,0xf1,0xef,0xed,0xec,
0xeb,0xea,0xe8,0xe5,0xe4,0xe2,0xe0,0xde,0xdb,0xd7,0xd5,0xd3,0xcf,0xc1,0xa0,0x9e,
0x9d,0x9d,0x9f,0x9e,0x9a,0x99,0xa0,0xa2,0xa2,0xa1,0xa3,0xa4,0xa7,0xa7,0xa9,0xad,
0xb1,0xb0,0xb1,0xb6,0xb8,0xbd,0xbe,0xbc,0xb1,0xaf,0xaf,0xaf,0xb1,0xb2,0xb3,0xb4,
0xb5,0xb6,0xb5,0xb5,0xb4,0xb4,0xb5,0xb4,0xb4,0xb4,0xb4,0xb4,0xb3,0xb3,0xb3,0xb3,
0xb3,0xb4,0xb5,0xb7,0xb7,0xb7,0xab,0x8b,0x8a,0x8e,0x8e,0x90,0x92,0x91,0x93,0x94,
0x96,0x9a,0x9c,0x9f,0xa1,0xa2,0xa5,0xa7,0xa9,0xab,0xad,0xb1,0xb6,0xb7,0xb9,0xbb,
0xbb,0xbc,0xbd,0xbd,0xbd,0x80,0x80,0xb3,0xb1,0xb2,0xb2,0xb1,0xb0,0xac,0xa4,0xa0,
0x99,0x92,0x93,0x92,0x91,0x91,0x92,0x95,0x96,0x96,0x98,0x96,0x96,0x96,0x95,0x95,
0x96,0x97,0x97,0x98,0x98,0x97,0x96,0x96,0x95,0x99,0x9a,0x95,0x96,0x97,0x97,0x97,
0x97,0x97,0x97,0x97,0x97,0x97,0x96,0x96,0x96,0x96,0x96,0x97,0x98,0x9a,0x9a,0x9a,
0x9a,0x9c,0x99,0x99,0x99,0x9a,0x98,0x98,0x99,0x9a,0x98,0x98,0x97,0x97,0x97,0x98,
0x98,0x99,0x98,0x99,0x9a,0x9d,0x9b,0x99,0x99,0x9a,0x99,0x99,0x9a,0x99,0x9b,0x9c,
0x9c,0x9a,0x9a,0x99,0x99,0x9b,0x9c,0x9c,0x9e,0x9e,0x9c,0x9c,0x9d,0x9e,0x9f,0xa0,
0xa0,0x9f,0x9d,0x9e,0x9e,0x9e,0x9d,0x9e,0x9e,0x9d,0x9e,0x9c,0xa2,0xb7,0x0e,0x59,
0x4a,0x55,0x69,0x65,0x5f,0x5c,0x54,0x47,0x37,0x34,0x1e,0xf5,0xc6,0xb2,0xbc,0xaa,
0xdf,0xf5,0xf8,0xfa,0xfc,0xfd,0xfd,0xfc,0xf5,0xf8,0xfb,0x06,0x08,0x1b,0x2a,0x38,
0x3e,0x32,0x3a,0x4a,0x4d,0x4a,0x49,0x4a,0x4f,0x4f,0x52,0x54,0x52,0x53,0x4b,0x49,
0x42,0x32,0x13,0xd7,0xa8,0x96,0x8d,0x90,0x8b,0x8c,0x92,0x9c,0x91,0x97,0x9b,0x8d,
0x90,0x9a,0x97,0x8b,0x87,0x87,0x8f,0x9a,0x9f,0xa8,0xa8,0xa7,0xa8,0xb8,0xcc,0xe3,
0xf0,0x15,0x2d,0x2c,0x2b,0x2a,0x27,0x23,0x22,0x21,0x1f,0x1c,0x1a,0x19,0x17,0x15,
0x14,0x12,0x11,0x11,0x0f,0x0d,0x0b,0x09,0x06,0x02,0x00,0xfe,0xfd,0xfa,0xf8,0xf3,
0xeb,0xea,0xe9,0xe8,0xe7,0xe8,0xe6,0xe5,0xe8,0xed,0xef,0xec,0xed,0xef,0xef,0xf1,
0xf2,0xf3,0xf5,0xf4,0xf5,0xf6,0xf9,0xfd,0xf8,0xf5,0xf0,0xea,0xe5,0xdf,0xd7,0xcf,
0xc3,0xbb,0xb5,0xb2,0xb1,0xb2,0xb3,0xb4,0xb4,0xb4,0xb4,0xb5,0xb5,0xb4,0xb4,0xb3,
0xb4,0xb4,0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xa6,0x8a,0x8d,0x91,0x91,0x93,0x94,0x94,
0x93,0x96,0x98,0x9a,0x9d,0xa1,0xa3,0xa5,0xa9,0xaa,0xaa,0xac,0xad,0xb2,0xb7,0xb7,
0xb8,0xba,0xbc,0xbc,0xbd,0xbd,0xbd,0x80,0x80,0xaf,0xb1,0xb4,0xb2,0xb0,0xae,0xab,
0xa5,0x9d,0x97,0x97,0x94,0x95,0x9a,0x9d,0x9a,0x95,0x94,0x94,0x94,0x93,0x91,0x91,
0x91,0x91,0x91,0x93,0x92,0x91,0x92,0x95,0x93,0x92,0x93,0x95,0x96,0x91,0x93,0x93,
0x93,0x93,0x95,0x95,0x94,0x94,0x95,0x94,0x93,0x93,0x93,0x93,0x93,0x94,0x95,0x97,
0x95,0x96,0x96,0x97,0x97,0x99,0x98,0x98,0x96,0x95,0x96,0x96,0x95,0x95,0x95,0x97,
0x96,0x95,0x9f,0x9c,0x95,0x96,0x96,0x97,0x99,0x99,0x97,0x98,0x97,0x96,0x96,0x96,
0x98,0x99,0x98,0x98,0x97,0x98,0x98,0x99,0x9a,0x9a,0x9b,0x9c,0x99,0x9b,0x9a,0x9a,
0x9b,0x9a,0x9c,0x99,0x9b,0x9a,0x9a,0x9b,0x9b,0x9c,0x9c,0x9a,0x9a,0x9c,0xa2,0xbc,
0x25,0x57,0x51,0x64,0x64,0x61,0x5e,0x56,0x4b,0x3b,0x38,0x37,0x0e,0xf0,0xda,0xd2,
0xb9,0xb5,0xee,0xfe,0x04,0x04,0x04,0x04,0x01,0xff,0xfb,0xfd,0x08,0x18,0x1b,0x17,
0x24,0x3c,0x47,0x3d,0x2e,0x3b,0x47,0x43,0x46,0x4c,0x48,0x4b,0x4d,0x50,0x4f,0x4e,
0x4c,0x47,0x4a,0x48,0x41,0x44,0x2f,0xfc,0xc0,0x9f,0x88,0x8a,0x8e,0x88,0x99,0x9a,
0x8b,0x8e,0x8f,0x92,0x98,0xa1,0x93,0x8a,0x8c,0x8e,0x93,0x93,0x9b,0x9d,0xb5,0xc2,
0xb3,0xb9,0xc6,0xe0,0x19,0x31,0x32,0x32,0x32,0x31,0x30,0x2f,0x2e,0x2a,0x27,0x28,
0x28,0x25,0x22,0x21,0x1f,0x1f,0x20,0x20,0x21,0x22,0x22,0x22,0x22,0x24,0x27,0x24,
0x23,0x20,0x1d,0x1b,0x18,0x15,0x14,0x14,0x13,0x12,0x11,0x17,0x19,0x11,0x10,0x10,
0x10,0x11,0x13,0x13,0x12,0x13,0x13,0x14,0x17,0x1f,0x15,0x1b,0x2a,0x18,0x14,0x12,
0x17,0x18,0x13,0x0c,0x01,0xf4,0xe4,0xd2,0xc4,0xb9,0xb2,0xae,0xad,0xae,0xb0,0xb0,
0xb1,0xb2,0xb4,0xb5,0xb6,0xb8,0xb8,0xba,0xbb,0xbd,0xa4,0x8b,0x8e,0x91,0x92,0x94,
0x95,0x95,0x95,0x98,0x9a,0x9c,0x9f,0xa4,0xa6,0xa8,0xab,0xad,0xae,0xad,0xb0,0xb4,
0xb7,0xb8,0xb9,0xbb,0xbb,0xbc,0xbd,0xbd,0xbd,0x80,0x80,0xaf,0xb2,0xb1,0xb2,0xaf,
0xae,0xaa,0xa4,0xa4,0xb5,0xbf,0xc5,0xca,0xd2,0xd0,0xc2,0xb2,0xb1,0xb2,0xb2,0xb2,
0xac,0xa9,0xa7,0xa3,0xa6,0xa5,0xa7,0xa4,0x9b,0x98,0x97,0x99,0x9d,0x9c,0x9c,0x99,
0x97,0x97,0x93,0x91,0x91,0x8e,0x8f,0x8f,0x90,0x8f,0x8f,0x8f,0x90,0x90,0x92,0x94,
0x92,0x92,0x92,0x92,0x93,0x93,0x94,0x94,0x95,0x94,0x94,0x94,0x94,0x93,0x93,0x93,
0x93,0x94,0x94,0x94,0x94,0x96,0x93,0x94,0x94,0x94,0x94,0x96,0x96,0x95,0x94,0x96,
0x96,0x95,0x96,0x96,0x96,0x95,0x95,0x95,0x96,0x98,0x97,0x97,0x97,0x98,0x98,0x9a,
0x98,0x98,0x98,0x97,0x97,0x98,0x97,0x97,0x97,0x97,0x97,0x96,0x94,0x94,0x95,0x96,
0x9f,0xb9,0x30,0x59,0x5c,0x62,0x5d,0x5d,0x5a,0x4f,0x3f,0x3a,0x41,0x2f,0x09,0xf5,
0xe3,0xdc,0xd5,0xe3,0x06,0x0c,0x0d,0x09,0x0a,0x07,0x04,0x01,0x03,0x14,0x1c,0x27,
0x31,0x31,0x2f,0x3a,0x43,0x3f,0x37,0x2f,0x3e,0x43,0x3e,0x42,0x46,0x44,0x44,0x48,
0x4c,0x4a,0x4b,0x4b,0x49,0x4a,0x4a,0x47,0x49,0x43,0x37,0x19,0xe8,0xa3,0x92,0x94,
0x8a,0x8d,0x8c,0x98,0x9c,0x8a,0x95,0x9b,0x97,0x90,0x8f,0x8b,0x8c,0x94,0x9a,0x94,
0x92,0xb4,0xbe,0xb1,0xb4,0xce,0xf5,0x1a,0x1e,0x1b,0x1c,0x1f,0x23,0x20,0x1f,0x1e,
0x1b,0x1d,0x20,0x20,0x1c,0x1a,0x1c,0x1a,0x19,0x1a,0x1b,0x1b,0x1a,0x1d,0x1b,0x1d,
0x1f,0x1e,0x1c,0x1b,0x1b,0x17,0x15,0x12,0x12,0x13,0x13,0x14,0x13,0x18,0x19,0x15,
0x14,0x16,0x17,0x16,0x18,0x16,0x16,0x17,0x1a,0x1b,0x1b,0x1e,0x1a,0x18,0x1b,0x17,
0x15,0x17,0x1a,0x19,0x1a,0x1b,0x1f,0x25,0x2a,0x20,0x15,0x0c,0x01,0xf6,0xe6,0xd4,
0xc6,0xba,0xb4,0xb0,0xb1,0xb2,0xb5,0xb7,0xb9,0xbb,0xbc,0xbf,0xa1,0x8d,0x90,0x92,
0x94,0x95,0x97,0x97,0x96,0x99,0x9c,0x9f,0xa2,0xa5,0xa8,0xab,0xae,0xb0,0xb2,0xb1,
0xb3,0xb4,0xb5,0xb8,0xbb,0xbb,0xbb,0xbc,0xbd,0xbe,0xbd,0x80,0x80,0xaf,0xb2,0xb0,
0xb1,0xb0,0xac,0xa9,0xa4,0xb7,0xd1,0xca,0xc5,0xbd,0xb6,0xaf,0xb4,0xbd,0xbb,0xbd,
0xc0,0xc4,0xc3,0xc7,0xc7,0xc1,0xbe,0xbc,0xb8,0xb8,0xb3,0xab,0xa8,0xb1,0xb4,0xb5,
0xb5,0xbb,0xbd,0xbe,0xbe,0xbf,0xc1,0xb6,0xbb,0xbe,0xad,0xb6,0xb5,0xb2,0xb1,0xb1,
0xb0,0xaf,0xab,0xa7,0xa2,0x9c,0x98,0x96,0x95,0x95,0x95,0x91,0x90,0x91,0x93,0x92,
0x91,0x92,0x92,0x92,0x92,0x92,0x93,0x93,0x92,0x91,0x91,0x91,0x91,0x92,0x93,0x93,
0x93,0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x93,0x92,0x92,0x94,0x94,0x95,0x95,0x95,
0x96,0x97,0x96,0x95,0x95,0x96,0x96,0x96,0x95,0x93,0x92,0x91,0x90,0x91,0x96,0x9b,
0x9d,0x9a,0x9f,0xc2,0x31,0x5e,0x65,0x5f,0x5b,0x5a,0x56,0x4b,0x3c,0x3d,0x3b,0x25,
0x0f,0x09,0x0e,0x1c,0x0d,0x16,0x1b,0x17,0x12,0x0f,0x0d,0x0a,0x04,0xfd,0x0a,0x27,
0x31,0x31,0x35,0x38,0x36,0x33,0x3c,0x3f,0x3b,0x3a,0x39,0x3e,0x42,0x42,0x44,0x44,
0x45,0x46,0x49,0x4a,0x48,0x48,0x4a,0x47,0x45,0x45,0x45,0x47,0x43,0x3e,0x2e,0x03,
0xd6,0xa6,0x9b,0x8f,0x8a,0x87,0x9b,0x96,0x8d,0x94,0x97,0x8b,0x8c,0x8f,0x8d,0x89,
0x96,0xa3,0xa3,0x96,0xab,0xd4,0xc2,0xb6,0xe7,0x20,0x2e,0x22,0x23,0x25,0x25,0x29,
0x28,0x20,0x1c,0x18,0x18,0x19,0x17,0x15,0x14,0x15,0x16,0x18,0x17,0x15,0x10,0x0f,
0x0e,0x0f,0x12,0x14,0x14,0x0d,0x0b,0x0c,0x0d,0x0e,0x10,0x11,0x0b,0x06,0x04,0x03,
0x03,0x04,0x06,0x03,0x00,0x01,0x03,0x05,0x07,0x09,0x09,0x08,0x09,0x0d,0x0e,0x0e,
0x0d,0x0b,0x0d,0x0f,0x12,0x16,0x17,0x19,0x1d,0x24,0x26,0x28,0x21,0x22,0x22,0x27,
0x29,0x29,0x25,0x19,0x0c,0xfa,0xe8,0xd7,0xc8,0xbd,0xb4,0xb1,0xb1,0xb0,0x95,0x8e,
0x90,0x93,0x95,0x97,0x99,0x99,0x9a,0x9b,0x9e,0xa1,0xa3,0xa4,0xa8,0xae,0xaf,0xb0,
0xb3,0xb3,0xb3,0xb4,0xb5,0xb7,0xba,0xbb,0xbc,0xbc,0xbc,0xba,0xb9,0x80,0x80,0xaf,
0xb0,0xb0,0xb0,0xae,0xad,0xa9,0xa3,0xa7,0xac,0xa9,0xaa,0xac,0xb1,0xb8,0xbb,0xc0,
0xbe,0xbe,0xc0,0xc3,0xc7,0xc5,0xc4,0xc1,0xba,0xbb,0xb6,0xb3,0xaf,0xaa,0xac,0xb1,
0xb3,0xb3,0xb3,0xbb,0xbf,0xc2,0xc4,0xc7,0xca,0xcd,0xcf,0xd0,0xc5,0xcc,0xca,0xc3,
0xbc,0xb8,0xb5,0xb4,0xb2,0xb1,0xaf,0xad,0xaa,0xa9,0xa7,0xa6,0xa4,0x9e,0x9d,0x9e,
0x9b,0x96,0x94,0x95,0x94,0x92,0x91,0x91,0x9b,0x9d,0x9c,0x9b,0x99,0x98,0x97,0x95,
0x94,0x94,0x93,0x94,0x95,0x96,0x97,0x97,0x98,0x98,0x99,0x9a,0x9b,0x9c,0x9b,0x9c,
0x9b,0x9b,0x9b,0x9c,0x9f,0x9f,0x9e,0x9d,0x9d,0x9c,0x9c,0x9f,0xac,0xb6,0xbe,0xc6,
0xca,0xca,0xcf,0xc6,0xba,0xcd,0x33,0x61,0x61,0x5b,0x5b,0x57,0x4d,0x43,0x3a,0x33,
0x31,0x24,0x19,0x21,0x2f,0x2f,0x22,0x20,0x1f,0x1b,0x14,0x12,0x0f,0x08,0x07,0x0e,
0x1f,0x32,0x39,0x35,0x32,0x35,0x36,0x33,0x3d,0x41,0x3f,0x3d,0x3c,0x3e,0x41,0x40,
0x3d,0x3c,0x40,0x40,0x40,0x42,0x44,0x41,0x46,0x4c,0x49,0x45,0x45,0x45,0x44,0x41,
0x38,0x0f,0xd2,0xb8,0xab,0xa8,0x9d,0x91,0x91,0x94,0x90,0x92,0x8e,0x8e,0x9a,0x96,
0x8d,0x92,0x89,0x83,0x90,0xa6,0x9f,0xb2,0xd3,0xd0,0xe8,0x2a,0x3b,0x22,0x0f,0x1a,
0x24,0x24,0x1d,0x19,0x1a,0x19,0x16,0x11,0x0a,0x06,0x05,0x06,0x05,0x04,0x04,0x05,
0x06,0x05,0x03,0x01,0x00,0xfe,0xfc,0xf4,0xee,0xee,0xed,0xec,0xeb,0xeb,0xeb,0xee,
0xec,0xeb,0xed,0xee,0xef,0xf1,0xf1,0xf1,0xf3,0xf1,0xf0,0xf1,0xf3,0xf5,0xf6,0xf9,
0xfa,0xf6,0xf2,0xf3,0xf5,0xf6,0xf5,0xf9,0xfd,0x06,0x10,0x1c,0x21,0x22,0x20,0x1e,
0x1f,0x21,0x22,0x26,0x28,0x2a,0x2c,0x2d,0x32,0x2e,0x25,0x1d,0x0c,0xf7,0xe4,0xd0,
0xa7,0x8f,0x8a,0x93,0x96,0x98,0x9a,0x9a,0x9b,0x9c,0x9d,0xa3,0xa4,0x9f,0x9a,0xad,
0xaf,0xb0,0xb3,0xb3,0xb3,0xb5,0xb5,0xb5,0xb7,0xba,0xbb,0xbc,0xbb,0xb9,0xb7,0x80,
0x80,0xae,0xae,0xb2,0xb0,0xae,0xad,0xa9,0xa2,0xae,0xbc,0xc2,0xc5,0xc4,0xbe,0xb8,
0xc1,0xc3,0xc2,0xc1,0xc2,0xc6,0xc8,0xc9,0xc4,0xc0,0xb6,0xb6,0xb5,0xae,0xaa,0xab,
0xaf,0xb0,0xb2,0xb2,0xb2,0xb9,0xbd,0xc0,0xc1,0xc6,0xcd,0xcc,0xcc,0xcd,0xd1,0xce,
0xc9,0xc0,0xb9,0xb6,0xb4,0xb3,0xb1,0xb0,0xae,0xac,0xaa,0xa9,0xa8,0xa7,0xa7,0xa6,
0xa4,0xa3,0x9e,0x96,0x94,0x94,0x92,0x92,0x90,0x95,0xa0,0xa0,0xa0,0xa0,0x9f,0x9f,
0x9e,0x9c,0x9b,0x9a,0x99,0x99,0x99,0x9a,0x9b,0x9c,0x9d,0x9d,0x9e,0x9e,0x9f,0x9f,
0x9f,0x9f,0xa0,0xa0,0xa1,0xa2,0xa2,0xa2,0xa4,0xa4,0xa4,0xa4,0xa3,0xa3,0xba,0xcb,
0xd3,0xd7,0xd5,0xcf,0xd0,0xce,0xd0,0xf0,0x40,0x60,0x5a,0x57,0x58,0x4d,0x46,0x3f,
0x32,0x2b,0x2c,0x23,0x1c,0x25,0x30,0x28,0x21,0x1f,0x1a,0x18,0x14,0x0f,0x09,0x00,
0x0e,0x2d,0x38,0x39,0x35,0x33,0x33,0x34,0x38,0x3a,0x39,0x3f,0x42,0x3f,0x3f,0x40,
0x3e,0x3c,0x3d,0x40,0x3e,0x40,0x44,0x46,0x46,0x46,0x42,0x41,0x45,0x44,0x43,0x45,
0x45,0x38,0x37,0x1c,0xe0,0xab,0x96,0x92,0x94,0x8b,0x89,0x8e,0x93,0x98,0x99,0x88,
0x91,0x96,0x93,0x8b,0x92,0x98,0x84,0x8e,0xa6,0xa6,0x8f,0xb4,0xec,0x2e,0x4e,0x3a,
0x06,0x05,0x0d,0x17,0x25,0x2b,0x2e,0x35,0x3d,0x40,0x3d,0x34,0x29,0x25,0x22,0x23,
0x23,0x23,0x23,0x22,0x21,0x20,0x1e,0x1a,0x18,0x14,0x10,0x0f,0x0d,0x0d,0x0c,0x09,
0x07,0x08,0x07,0x06,0x08,0x0a,0x0b,0x0b,0x0d,0x10,0x11,0x11,0x11,0x10,0x0e,0x0f,
0x0d,0x0d,0x0d,0x0e,0x0c,0x11,0x1b,0x1f,0x22,0x1a,0x15,0x12,0x14,0x18,0x1b,0x20,
0x25,0x2c,0x30,0x33,0x32,0x30,0x2c,0x2b,0x30,0x34,0x33,0x32,0x2f,0x30,0x32,0x33,
0x31,0x2f,0x19,0xfd,0xc2,0x92,0x93,0x98,0x9b,0x9c,0x9c,0x9d,0x9f,0xa4,0xa2,0x99,
0x90,0xa4,0xac,0xb0,0xb4,0xb4,0xb3,0xb4,0xb5,0xb2,0xb3,0xb8,0xba,0xbb,0xbb,0xb9,
0xb7,0x80,0x80,0xad,0xaf,0xaf,0xae,0xad,0xac,0xa8,0xa2,0xb4,0xb7,0xaf,0xab,0xa6,
0xa3,0xa9,0xc4,0xc6,0xc5,0xc4,0xc7,0xc8,0xc9,0xc9,0xc4,0xc1,0xb6,0xb0,0xaf,0xad,
0xab,0xab,0xb0,0xb0,0xb1,0xb2,0xb1,0xb8,0xbc,0xbf,0xbf,0xc1,0xc7,0xc7,0xc5,0xca,
0xda,0xbe,0xaa,0xbc,0xb9,0xb6,0xb4,0xb3,0xb2,0xb0,0xaf,0xad,0xab,0xa9,0xa8,0xa7,
0xa7,0xa5,0xa4,0xa3,0x9b,0x94,0x93,0x94,0x94,0x93,0x91,0x9c,0x9f,0x9f,0x9f,0x9f,
0x9f,0x9e,0x9c,0x9b,0x9a,0x99,0x99,0x98,0x98,0x99,0x9a,0x9b,0x9c,0x9c,0x9d,0x9d,
0x9e,0x9e,0x9e,0x9f,0x9f,0x9f,0xa0,0xa1,0xa2,0xa2,0xa3,0xa3,0xa4,0xa4,0xa3,0xa1,
0xa9,0xc3,0xd0,0xd4,0xd9,0xd5,0xd2,0xd2,0xd3,0xe7,0x41,0x61,0x58,0x55,0x53,0x4a,
0x44,0x3a,0x2e,0x27,0x27,0x20,0x1d,0x22,0x21,0x1b,0x1a,0x1a,0x17,0x16,0x13,0x12,
0x12,0x16,0x28,0x39,0x3b,0x3a,0x3a,0x37,0x35,0x35,0x39,0x39,0x37,0x40,0x43,0x3e,
0x3c,0x38,0x39,0x3f,0x43,0x44,0x44,0x46,0x48,0x46,0x43,0x41,0x43,0x43,0x41,0x43,
0x45,0x41,0x42,0x41,0x37,0x34,0x05,0xc1,0x9e,0x9a,0x9b,0x89,0x85,0x92,0x9f,0x8c,
0x99,0x91,0x87,0x89,0x95,0x8e,0x87,0x9e,0x92,0x85,0x91,0xa8,0xa4,0xa1,0xca,0x1b,
0x51,0x5b,0x25,0x01,0x06,0x11,0x1a,0x20,0x26,0x2a,0x32,0x39,0x3e,0x41,0x40,0x41,
0x3f,0x3e,0x3e,0x3d,0x3e,0x3e,0x3e,0x3e,0x3e,0x3d,0x3d,0x3d,0x3d,0x3c,0x3c,0x3d,
0x3e,0x3d,0x3c,0x3c,0x3c,0x3c,0x3d,0x3d,0x3d,0x3c,0x3d,0x3e,0x3e,0x3f,0x3f,0x40,
0x41,0x44,0x42,0x41,0x42,0x43,0x43,0x49,0x4f,0x52,0x54,0x51,0x4e,0x4b,0x4a,0x48,
0x4a,0x4a,0x49,0x4b,0x49,0x4a,0x4b,0x4b,0x49,0x46,0x44,0x42,0x40,0x3e,0x3c,0x3b,
0x39,0x39,0x37,0x33,0x2e,0x37,0x1e,0xa7,0x93,0x99,0x9c,0x9d,0x9d,0x9d,0xa0,0xa1,
0x9d,0x96,0x99,0xb8,0xae,0xb0,0xb3,0xb4,0xb4,0xb3,0xb6,0xb5,0xb6,0xb8,0xba,0xba,
0xb9,0xb9,0xb9,0x80,0x80,0xac,0xae,0xae,0xae,0xab,0xab,0xa7,0xa0,0xa3,0xa5,0xa6,
0xa7,0xa8,0xa6,0xb3,0xcc,0xca,0xca,0xc8,0xc9,0xca,0xcc,0xcb,0xc6,0xc0,0xb9,0xb2,
0xaf,0xb0,0xaa,0xae,0xb0,0xb0,0xb0,0xb0,0xb1,0xb7,0xbc,0xbf,0xbe,0xb0,0xaf,0xad,
0xb2,0xb9,0xbb,0xa0,0x98,0xb4,0xb8,0xb7,0xb6,0xb3,0xad,0xa6,0xa9,0xac,0xad,0xab,
0xa9,0xa8,0xa7,0xa5,0xa3,0xa2,0x98,0x92,0x93,0x95,0x95,0x93,0x95,0x9f,0x9f,0x9f,
0x9f,0x9e,0x9e,0x9d,0x9c,0x9a,0x9a,0x99,0x98,0x97,0x98,0x99,0x99,0x9b,0x9b,0x9b,
0x9c,0x9d,0x9d,0x9d,0x9e,0x9e,0x9f,0x9f,0xa0,0xa0,0xa2,0xa3,0xa4,0xa4,0xa4,0xa4,
0xa4,0xa2,0xa1,0xb5,0xcd,0xd3,0xd9,0xdb,0xd4,0xd7,0xd8,0xe2,0x2e,0x5e,0x5d,0x56,
0x50,0x48,0x3c,0x33,0x2c,0x25,0x26,0x21,0x1d,0x19,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,
0x1a,0x19,0x1d,0x2e,0x3c,0x3f,0x3d,0x3b,0x39,0x33,0x35,0x38,0x38,0x3b,0x40,0x3f,
0x3c,0x3a,0x39,0x3a,0x3f,0x42,0x45,0x48,0x48,0x47,0x47,0x46,0x45,0x45,0x47,0x44,
0x41,0x41,0x42,0x44,0x40,0x3f,0x3e,0x2c,0x11,0xe7,0xae,0x97,0x8f,0x94,0x87,0x84,
0x9c,0x9f,0x8b,0x94,0x8f,0x87,0x86,0x88,0x8d,0x9d,0x89,0x8d,0x8e,0x90,0x99,0xa5,
0xc3,0xf1,0x37,0x59,0x4e,0x16,0x03,0x0e,0x1b,0x1f,0x24,0x26,0x2a,0x29,0x2b,0x2b,
0x2d,0x31,0x2e,0x29,0x28,0x29,0x29,0x2a,0x2a,0x29,0x29,0x2a,0x28,0x28,0x28,0x29,
0x2a,0x2b,0x2c,0x2e,0x2a,0x29,0x28,0x2a,0x2a,0x2b,0x2b,0x2b,0x2a,0x28,0x29,0x2d,
0x2d,0x2e,0x30,0x32,0x32,0x2c,0x2b,0x2c,0x2d,0x2d,0x2c,0x2a,0x2b,0x2c,0x2c,0x30,
0x32,0x32,0x34,0x35,0x37,0x32,0x2f,0x32,0x33,0x32,0x32,0x32,0x30,0x2e,0x2d,0x2f,
0x2e,0x2d,0x2c,0x2a,0x2a,0x23,0x1f,0x25,0x23,0xb3,0x95,0x9b,0x9c,0x9d,0x9d,0x9e,
0x9f,0x9a,0x96,0x96,0xbf,0xd7,0xb5,0xaf,0xb2,0xb3,0xb3,0xb3,0xb4,0xb6,0xb7,0xb7,
0xb8,0xb7,0xb6,0xb7,0xb9,0x80,0x80,0xae,0xae,0xae,0xab,0xaa,0xaa,0xa5,0xa1,0xa6,
0xa8,0xa8,0xa9,0xa8,0xa6,0xbe,0xcf,0xcd,0xcf,0xcb,0xcc,0xcc,0xcd,0xcc,0xc5,0xc2,
0xbc,0xb5,0xb3,0xae,0xa9,0xae,0xaf,0xb0,0xb0,0xae,0xab,0xb1,0xbb,0xc1,0xbb,0x9d,
0x9a,0x97,0x92,0x9e,0x9f,0x95,0x94,0xad,0xba,0xba,0xae,0x9a,0x8e,0x94,0x8e,0x8c,
0x98,0xa4,0xa9,0xa8,0xa7,0xa6,0xa5,0xa1,0x96,0x92,0x94,0x96,0x95,0x92,0x9b,0x9f,
0x9f,0x9f,0x9f,0x9e,0x9e,0x9d,0x9b,0x9a,0x99,0x96,0x95,0x96,0x97,0x97,0x98,0x9a,
0x9a,0x9b,0x9c,0x9d,0x9d,0x9e,0x9d,0x9e,0x9e,0x9f,0x9f,0xa0,0xa2,0xa3,0xa3,0xa4,
0xa4,0xa4,0xa4,0xa3,0xa1,0xa4,0xc2,0xd3,0xd8,0xdc,0xd5,0xd6,0xd8,0xd8,0x20,0x61,
0x5a,0x51,0x47,0x40,0x39,0x32,0x2c,0x2a,0x29,0x25,0x1a,0x17,0x1b,0x1c,0x1f,0x1f,
0x1f,0x1d,0x1c,0x24,0x34,0x3e,0x43,0x41,0x3f,0x3d,0x39,0x39,0x3c,0x3c,0x39,0x3c,
0x3e,0x3c,0x3d,0x3e,0x3d,0x3f,0x43,0x43,0x42,0x41,0x40,0x42,0x46,0x44,0x47,0x49,
0x46,0x44,0x44,0x41,0x3f,0x3f,0x42,0x41,0x3e,0x37,0x2c,0x1f,0xd7,0xbe,0x97,0x8c,
0x8c,0x88,0x99,0x9d,0x8f,0x8d,0x8f,0x89,0x88,0x88,0x87,0x9c,0x9a,0x90,0x9a,0x97,
0x97,0xa8,0xae,0xdf,0x20,0x49,0x58,0x3a,0x08,0x01,0x0b,0x12,0x19,0x25,0x2b,0x2a,
0x2a,0x2b,0x2d,0x31,0x2b,0x26,0x27,0x28,0x28,0x27,0x27,0x28,0x27,0x27,0x27,0x25,
0x27,0x2a,0x29,0x29,0x2d,0x2f,0x27,0x26,0x25,0x22,0x1b,0x1a,0x1a,0x19,0x19,0x16,
0x1c,0x2a,0x2a,0x2a,0x2e,0x33,0x2d,0x1e,0x1d,0x1e,0x20,0x21,0x22,0x23,0x25,0x24,
0x24,0x25,0x27,0x28,0x2c,0x33,0x37,0x27,0x24,0x25,0x25,0x25,0x25,0x24,0x28,0x28,
0x27,0x26,0x2c,0x2f,0x2e,0x2c,0x2f,0x22,0x20,0x27,0x18,0xaf,0x98,0x9c,0x9d,0x9a,
0x9b,0xa1,0x9e,0x98,0x93,0xb3,0xd2,0xd4,0xc2,0xac,0xaf,0xb0,0xb0,0xb0,0xb1,0xb4,
0xb6,0xb6,0xb4,0xb5,0xb5,0xb5,0xb6,0x80,0x80,0xad,0xad,0xae,0xac,0xac,0xa9,0xa4,
0xa1,0xa7,0xa9,0xa9,0xa9,0xa8,0xa8,0xcb,0xd5,0xd1,0xd0,0xcc,0xcd,0xca,0xcc,0xc9,
0xc4,0xc3,0xbc,0xb7,0xb4,0xac,0xab,0xae,0xac,0xaa,0xaa,0xa8,0xa9,0xb1,0xb8,0xbd,
0xc0,0xa3,0x8f,0x8e,0x8a,0x90,0x92,0x92,0x91,0xad,0xc2,0xb1,0x8f,0x88,0x85,0x87,
0x87,0x84,0x82,0x8b,0xa6,0xa6,0xa4,0xa3,0xa3,0x9b,0x95,0x93,0x94,0x96,0x95,0x96,
0x9e,0x9e,0x9e,0x9e,0x9d,0x9e,0x9d,0x9b,0x99,0x95,0x8b,0x87,0x88,0x92,0x98,0x96,
0x97,0x99,0x9a,0x9b,0x9d,0x9d,0x9e,0x9d,0x9d,0x9d,0x9e,0x9f,0xa0,0xa1,0xa2,0xa3,
0xa4,0xa5,0xa6,0xa6,0xa5,0xa4,0xa3,0xa0,0xb1,0xce,0xd3,0xda,0xd7,0xd2,0xd7,0xe5,
0x30,0x60,0x5a,0x4f,0x42,0x3f,0x3a,0x35,0x33,0x2d,0x25,0x1f,0x19,0x18,0x1a,0x1a,
0x1e,0x22,0x25,0x27,0x29,0x33,0x42,0x48,0x48,0x44,0x43,0x42,0x42,0x45,0x46,0x42,
0x41,0x41,0x43,0x42,0x3f,0x42,0x40,0x3e,0x3e,0x3f,0x42,0x43,0x45,0x43,0x42,0x44,
0x44,0x42,0x44,0x42,0x41,0x47,0x44,0x3d,0x3e,0x41,0x3f,0x35,0x36,0x36,0x27,0xfa,
0xba,0xa3,0x8b,0x8c,0x97,0x87,0x91,0x9e,0x89,0x89,0x88,0x84,0x91,0x96,0x93,0x98,
0x94,0x8d,0x9d,0x97,0xb1,0xda,0x10,0x34,0x50,0x51,0x20,0xfc,0xfb,0xfb,0xfb,0x0e,
0x21,0x20,0x21,0x25,0x2a,0x2e,0x27,0x1f,0x1b,0x18,0x13,0x13,0x0e,0x07,0x04,0x09,
0x11,0x11,0x13,0x13,0x10,0x0f,0x0e,0x0e,0x0c,0x0d,0x0c,0x11,0x1c,0x1d,0x1c,0x20,
0x22,0x22,0x24,0x28,0x26,0x26,0x28,0x28,0x1d,0x18,0x19,0x1c,0x1e,0x1e,0x20,0x20,
0x21,0x21,0x20,0x1e,0x1e,0x21,0x27,0x29,0x1e,0x14,0x0f,0x12,0x0f,0x0f,0x0f,0x0e,
0x0d,0x0e,0x0d,0x0a,0x0d,0x27,0x2f,0x2c,0x2c,0xd4,0xb5,0xb4,0xa5,0x99,0x9c,0x9d,
0x9c,0x99,0x9e,0xa0,0x9b,0x96,0xac,0xce,0xd1,0xd4,0xd1,0xac,0xa9,0xae,0xaf,0xb0,
0xb1,0xb3,0xb5,0xb3,0xb2,0xb3,0xb4,0xb5,0xb6,0x80,0x80,0xac,0xad,0xac,0xaa,0xa9,
0xa7,0xa2,0xa1,0xa9,0xa9,0xa9,0xa9,0xa8,0xaf,0xdd,0xdc,0xd5,0xd2,0xcc,0xce,0xcb,
0xcc,0xc9,0xc4,0xc2,0xbb,0xb8,0xb2,0xa6,0xa8,0xa7,0xa6,0xac,0xb6,0xbc,0xc2,0xc6,
0xcb,0xce,0xd0,0xc5,0xb9,0xb7,0xb9,0xb4,0xb0,0xae,0xb3,0xbc,0xbb,0x97,0x86,0x86,
0x86,0x85,0x85,0x85,0x83,0x93,0xa2,0xa1,0x9f,0x9e,0x9d,0x97,0x94,0x93,0x96,0x96,
0x95,0x96,0x98,0x97,0x96,0x98,0x96,0x96,0x96,0x95,0x95,0x8c,0x85,0x86,0x85,0x91,
0x9a,0x90,0x8f,0x91,0x92,0x93,0x93,0x93,0x93,0x94,0x94,0x95,0x96,0x99,0x9a,0x9b,
0x9c,0x9c,0x9e,0x9f,0xa0,0xa0,0xa0,0xa0,0xa0,0x9e,0x9f,0xc1,0xd1,0xd7,0xdb,0xd2,
0xd8,0xe9,0x28,0x61,0x5f,0x4b,0x40,0x3b,0x3c,0x39,0x37,0x2e,0x23,0x1c,0x1b,0x1a,
0x1b,0x1c,0x27,0x10,0x04,0x01,0xff,0xfb,0x0b,0x10,0x0d,0x11,0x13,0x16,0x1f,0x1f,
0x20,0x24,0x22,0x28,0x2a,0x27,0x2d,0x2e,0x2e,0x32,0x37,0x39,0x3c,0x3e,0x3a,0x3d,
0x45,0x3e,0x3e,0x43,0x42,0x40,0x46,0x42,0x41,0x48,0x45,0x44,0x45,0x42,0x3e,0x44,
0x40,0x29,0x08,0xda,0xad,0xab,0xb1,0x9d,0xa5,0xaa,0x9c,0xa0,0xa5,0x93,0xab,0xae,
0x9a,0xa0,0xb2,0x9f,0xa3,0xac,0xaa,0xd0,0x0c,0x1a,0x37,0x4a,0x31,0x0d,0x04,0x04,
0x07,0x0b,0x0f,0x12,0x10,0x10,0x15,0x14,0x11,0x0d,0xff,0xfa,0xf7,0xf6,0xf7,0xf3,
0xed,0xfa,0xf7,0xf2,0xf3,0xf0,0xec,0xf6,0x09,0xf2,0xf0,0xf2,0xf0,0xf8,0x19,0x22,
0x26,0x28,0x28,0x25,0x21,0x20,0x1e,0x1f,0x22,0x1e,0x1b,0x28,0x31,0x2c,0x2a,0x21,
0x23,0x1c,0x18,0x12,0x1b,0x27,0x2b,0x2a,0x22,0x21,0x22,0x1b,0x09,0xfe,0xfb,0x04,
0x01,0xfd,0xf6,0xf8,0xf9,0xf9,0xf8,0xfd,0x20,0x29,0x23,0xac,0x93,0x97,0x98,0x9c,
0x9c,0x9d,0x9b,0x9d,0x9f,0x9c,0x97,0xa6,0xc9,0xcf,0xd1,0xd4,0xd7,0xc0,0xa8,0xae,
0xaf,0xae,0xb1,0xb3,0xb3,0xb1,0xb0,0xb2,0xb4,0xb5,0xb6,0x80,0x80,0xac,0xab,0xad,
0xac,0xa9,0xa7,0xa1,0xa0,0xaa,0xaa,0xaa,0xaa,0xa8,0xc0,0xee,0xe4,0xda,0xd5,0xcf,
0xcf,0xca,0xc9,0xc9,0xc3,0xbf,0xba,0xb7,0xae,0xab,0xb2,0xb9,0xbf,0xc5,0xc8,0xcb,
0xce,0xcf,0xcf,0xce,0xcb,0xc7,0xc5,0xc0,0xbb,0xb5,0xb2,0xaf,0xaf,0xaa,0xa3,0x88,
0x86,0x86,0x86,0x85,0x85,0x85,0x8d,0x9a,0x9b,0x9a,0x9b,0x9b,0x99,0x95,0x93,0x8f,
0x94,0x94,0x93,0x93,0x93,0x93,0x92,0x91,0x93,0x96,0x95,0x93,0x91,0x8c,0x87,0x86,
0x87,0x95,0x96,0x8c,0x8e,0x8f,0x91,0x92,0x92,0x91,0x90,0x8e,0x90,0x91,0x93,0x94,
0x95,0x96,0x97,0x97,0x97,0x97,0x96,0x97,0x97,0x96,0x97,0x96,0x91,0xab,0xcd,0xd2,
0xdb,0xd5,0xd6,0xe1,0x01,0x51,0x5f,0x48,0x3e,0x3d,0x3e,0x3f,0x37,0x2d,0x21,0x1a,
0x1c,0x22,0x23,0x24,0x1a,0xcd,0xc6,0xcb,0xcb,0xc6,0xd0,0xcf,0xc9,0xd0,0xce,0xc7,
0xcf,0xd4,0xcc,0xcc,0xd5,0xce,0xcd,0xd9,0xd5,0xd1,0xde,0xdb,0xc7,0xdd,0xde,0xc0,
0xdf,0xe0,0xbe,0xd6,0xde,0xbf,0xd0,0xe2,0xc1,0xcd,0xe2,0xc4,0xce,0xe5,0xcb,0xd6,
0xe3,0xd0,0xd2,0xe4,0xd0,0xcf,0xe3,0xc0,0xca,0xdb,0xc9,0xc4,0xd8,0xc6,0xca,0xde,
0xcb,0xcf,0xd6,0xc2,0xca,0xe8,0xd2,0xcc,0xe6,0xf1,0xf0,0xf6,0xec,0xee,0xef,0xe4,
0xe6,0xec,0xe1,0xde,0xe6,0xde,0xde,0xe2,0xd7,0xdf,0xe4,0xd4,0xe0,0xe9,0xe0,0xe8,
0xe7,0xde,0xe1,0xe2,0xdb,0xe3,0xdb,0xd8,0xd7,0xd4,0xf6,0xf1,0xef,0xf1,0xf1,0xf2,
0xf5,0xf7,0xf8,0xef,0xf3,0xed,0xea,0xf1,0xf9,0xff,0x06,0x09,0x0a,0x11,0x17,0x0f,
0x13,0x16,0x1d,0x20,0x25,0x21,0x18,0x1e,0x34,0x38,0x35,0x36,0x37,0x3e,0x40,0x30,
0x21,0x13,0x08,0xfc,0xf8,0xfa,0xfc,0xfc,0xfc,0xfc,0x21,0x28,0x19,0xa6,0x99,0x9c,
0x9c,0x9c,0x9c,0x9e,0x9c,0x9f,0x9d,0x99,0xa1,0xc5,0xcf,0xd0,0xd2,0xd4,0xd7,0xd3,
0xab,0xaa,0xad,0xad,0xb1,0xb4,0xb1,0xb0,0xb0,0xb2,0xb4,0xb6,0xb5,0x80,0x80,0xaa,
0xac,0xad,0xaa,0xa8,0xa5,0x9f,0xa1,0xab,0xab,0xab,0xab,0xa8,0xd7,0xf9,0xe9,0xdf,
0xd6,0xcf,0xce,0xca,0xc5,0xc7,0xc3,0xbf,0xbc,0xb2,0xb3,0xbf,0xc0,0xc1,0xc2,0xc2,
0xc3,0xc1,0xc0,0xbc,0xba,0xb7,0xb3,0xaf,0xac,0xa9,0xa8,0xa7,0xa6,0xa4,0xa0,0xa1,
0x9d,0x88,0x85,0x85,0x85,0x85,0x85,0x87,0x90,0x93,0x95,0x96,0x96,0x95,0x95,0x93,
0x90,0x94,0x97,0x90,0x8e,0x8e,0x8e,0x8d,0x8d,0x8d,0x8e,0x90,0x93,0x94,0x8e,0x8c,
0x86,0x86,0x89,0x8f,0x8a,0x88,0x87,0x87,0x8d,0x8f,0x92,0x90,0x8b,0x89,0x89,0x8e,
0x91,0x93,0x94,0x94,0x94,0x93,0x93,0x93,0x93,0x93,0x92,0x92,0x92,0x93,0x90,0x92,
0xc0,0xcc,0xd4,0xd7,0xd0,0xdc,0x13,0x5a,0x57,0x46,0x46,0x43,0x42,0x41,0x39,0x31,
0x24,0x1f,0x1d,0x22,0x25,0x28,0x08,0xc3,0xc4,0xc6,0xc9,0xca,0xc7,0xc7,0xc9,0xc8,
0xc8,0xc9,0xc8,0xc7,0xc7,0xc7,0xc7,0xc7,0xc8,0xc6,0xc6,0xc5,0xc6,0xc5,0xc6,0xc7,
0xc7,0xc7,0xcd,0xcc,0xc7,0xcd,0xd1,0xc8,0xcc,0xd6,0xc7,0xcf,0xd9,0xd0,0xd2,0xdb,
0xd3,0xd5,0xdb,0xd5,0xd5,0xe4,0xe0,0xde,0xe9,0xe3,0xde,0xe8,0xde,0xde,0xe9,0xe2,
0xe3,0xea,0xe4,0xe3,0xe1,0xdd,0xdf,0xe1,0xdc,0xd9,0xd8,0xd2,0xcd,0xd1,0xd1,0xcd,
0xcd,0xcf,0xcd,0xce,0xcd,0xcb,0xce,0xcf,0xce,0xcf,0xd1,0xd0,0xce,0xcf,0xd1,0xd2,
0xd2,0xd2,0xd2,0xd1,0xd2,0xd4,0xd2,0xd2,0xd3,0xd1,0xd1,0xd3,0xed,0xf0,0xf1,0xf3,
0xf3,0xf4,0xd9,0xd5,0xda,0xdd,0xe1,0xdb,0xdc,0xdd,0xdf,0xe3,0xe6,0xe9,0xe9,0xec,
0xfc,0xfb,0xf5,0xf0,0xf5,0xfd,0x10,0x16,0x0d,0x0b,0x10,0x0d,0x19,0x29,0x33,0x38,
0x37,0x36,0x3e,0x3e,0x31,0x11,0xf9,0xfb,0xfe,0xff,0xff,0x02,0x26,0x29,0x0f,0x9e,
0x98,0x9b,0x9c,0x9c,0x9c,0x9d,0x9c,0x9b,0x97,0x9d,0xbe,0xcd,0xce,0xd0,0xd2,0xd4,
0xd7,0xdc,0xbb,0xa4,0xa8,0xa7,0xb0,0xb1,0xb1,0xb3,0xb2,0xb3,0xb4,0xb5,0xb2,0x80,
0x80,0xaa,0xab,0xab,0xaa,0xa8,0xa4,0x9f,0xa4,0xab,0xac,0xac,0xac,0xab,0xf0,0x01,
0xed,0xe0,0xd4,0xcc,0xce,0xc9,0xc5,0xc8,0xc1,0xbe,0xb9,0xaf,0xb9,0xba,0xb9,0xb6,
0xb3,0xaf,0xad,0xaa,0xa7,0xa5,0xa3,0xa3,0xa2,0xa1,0xa0,0xa0,0xa1,0xa2,0xa2,0xa1,
0xa0,0x9f,0x9b,0x91,0x8b,0x89,0x8a,0x8a,0x8b,0x8c,0x8e,0x90,0x91,0x91,0x92,0x91,
0x91,0x8f,0x8d,0x8c,0x8b,0x8c,0x8d,0x8e,0x8d,0x8e,0x8d,0x8d,0x8d,0x8c,0x8c,0x8b,
0x89,0x88,0x87,0x87,0x87,0x86,0x87,0x83,0x89,0x9b,0x89,0x89,0x8d,0x95,0xaf,0xd4,
0xd2,0x9f,0x90,0x90,0x93,0x94,0x93,0x93,0x93,0x94,0x93,0x92,0x91,0x91,0x91,0x91,
0x90,0x8b,0xa3,0xc7,0xcb,0xd4,0xcc,0xea,0x1e,0x4c,0x53,0x4e,0x46,0x3f,0x41,0x42,
0x3c,0x33,0x27,0x1f,0x1e,0x1d,0x1f,0x23,0x06,0xc3,0xc7,0xcc,0xca,0xca,0xcb,0xc9,
0xca,0xca,0xcb,0xca,0xca,0xcc,0xca,0xca,0xca,0xc9,0xc8,0xca,0xca,0xc8,0xc9,0xc9,
0xc8,0xc8,0xc8,0xc8,0xc6,0xc8,0xc9,0xc6,0xc6,0xc9,0xc9,0xc7,0xca,0xc8,0xc6,0xc9,
0xca,0xc9,0xcc,0xcb,0xcb,0xd0,0xd1,0xd1,0xd5,0xd6,0xd6,0xd8,0xd9,0xd8,0xd8,0xd8,
0xd7,0xd7,0xd6,0xd5,0xd6,0xd5,0xd3,0xd4,0xd3,0xd3,0xd1,0xd2,0xd2,0xd0,0xd1,0xd3,
0xd2,0xd0,0xd0,0xd0,0xcf,0xd0,0xcf,0xcf,0xd0,0xd0,0xd0,0xd2,0xd0,0xd1,0xd1,0xd0,
0xd3,0xd1,0xd2,0xd3,0xd2,0xd3,0xd5,0xd3,0xd3,0xd4,0xd3,0xd2,0xd0,0xe6,0xf2,0xf1,
0xf2,0xf2,0xf3,0xf3,0xd3,0xc9,0xce,0xd2,0xd5,0xd7,0xd6,0xd8,0xd7,0xd8,0xdb,0xde,
0xdf,0xdd,0xdb,0xd8,0xd5,0xdd,0xdf,0xe4,0xef,0x0f,0x23,0x22,0x0d,0x0e,0x12,0x1c,
0x27,0x27,0x29,0x31,0x23,0x1f,0x27,0x2a,0x0a,0xf8,0xfd,0x00,0x00,0x08,0x2b,0x2d,
0x06,0x9b,0x96,0x9a,0x9c,0x9c,0x9c,0x9d,0x9b,0x96,0x98,0xb8,0xca,0xcc,0xcf,0xd1,
0xd3,0xd5,0xd8,0xe0,0xd4,0xa1,0x9e,0xa1,0xa6,0xab,0xae,0xb1,0xb1,0xb1,0xb3,0xb6,
0xb0,0x80,0x80,0xab,0xa9,0xaa,0xa9,0xa7,0xa4,0x9e,0xa6,0xac,0xac,0xad,0xac,0xb3,
0x04,0x04,0xef,0xe1,0xd2,0xcc,0xcc,0xc8,0xc5,0xc7,0xc0,0xbb,0xb2,0xb0,0xb7,0xb4,
0xb1,0xaf,0xab,0xa6,0xa4,0xa2,0xa2,0xa0,0xa2,0xa2,0xa1,0xa1,0xa0,0xa0,0x9f,0x9f,
0xa1,0xa0,0x9f,0x9f,0x9d,0x9b,0x99,0x97,0x96,0x94,0x94,0x94,0x94,0x95,0x95,0x94,
0x94,0x94,0x93,0x92,0x90,0x8f,0x8f,0x8f,0x8e,0x8e,0x8e,0x8e,0x8f,0x8e,0x8e,0x8c,
0x8c,0x8b,0x8a,0x89,0x89,0x88,0x88,0x87,0x82,0x94,0xfa,0x24,0x01,0xdf,0xd4,0x08,
0x3b,0x54,0x55,0x31,0xe5,0xa3,0x8e,0x90,0x93,0x93,0x92,0x92,0x94,0x90,0x90,0x8b,
0x8c,0x8c,0x8b,0x88,0x88,0xb3,0xc8,0xca,0xce,0xe6,0xfa,0x14,0x44,0x48,0x41,0x3f,
0x42,0x43,0x42,0x39,0x2e,0x24,0x1f,0x1d,0x1a,0x22,0xf9,0xc4,0xc7,0xc8,0xcb,0xcc,
0xcc,0xcc,0xcc,0xcb,0xcb,0xcc,0xcc,0xcc,0xcd,0xcc,0xcb,0xcc,0xcc,0xcc,0xcb,0xca,
0xcb,0xcb,0xcb,0xcb,0xca,0xc9,0xca,0xca,0xc9,0xc9,0xc8,0xca,0xca,0xca,0xc9,0xca,
0xca,0xca,0xca,0xca,0xca,0xca,0xcb,0xcc,0xcc,0xd0,0xce,0xd0,0xd1,0xd1,0xd3,0xd5,
0xd3,0xd3,0xd4,0xd5,0xd5,0xd5,0xd5,0xd3,0xd4,0xd3,0xd4,0xd4,0xd2,0xd3,0xd3,0xd0,
0xd2,0xd3,0xd2,0xd1,0xd1,0xd1,0xd0,0xd1,0xd0,0xd2,0xd0,0xcf,0xd2,0xd2,0xd1,0xd0,
0xd1,0xd1,0xd3,0xd3,0xd2,0xd4,0xd2,0xd4,0xd4,0xd2,0xd4,0xd2,0xd2,0xd0,0xd9,0xef,
0xef,0xee,0xee,0xef,0xef,0xf3,0xd5,0xc4,0xcb,0xcf,0xd2,0xd6,0xd9,0xd9,0xd8,0xd5,
0xd8,0xd9,0xd5,0xd2,0xd5,0xd5,0xd9,0xe5,0xf4,0x01,0xff,0x01,0x0e,0x22,0x18,0x16,
0x01,0x11,0x1f,0x27,0x2b,0x2d,0x1d,0xff,0x15,0x19,0x0a,0xf7,0xf4,0xf8,0xf9,0xff,
0x0d,0x1c,0xd8,0x9f,0x9f,0x9e,0x9d,0x9d,0x9f,0x9d,0x99,0x98,0xb1,0xc6,0xca,0xcd,
0xce,0xcf,0xd3,0xd8,0xdd,0xe2,0xe7,0xb6,0x9e,0xa4,0xa5,0xa6,0xa7,0xa9,0xa9,0xad,
0xb4,0xb5,0xad,0x80,0x80,0xaa,0xa9,0xa9,0xa8,0xa7,0xa3,0x9f,0xa7,0xab,0xa9,0xa9,
0xa6,0xbf,0x0d,0x03,0xed,0xdf,0xd1,0xcb,0xcb,0xc9,0xc2,0xc3,0xbd,0xb8,0xae,0xab,
0xaa,0xa6,0xa4,0xa1,0xa0,0xa0,0xa1,0xa0,0xa1,0xa1,0xa2,0xa1,0xa2,0xa1,0xa1,0xa0,
0xa1,0xa2,0xa3,0xa3,0xa2,0xa1,0x9f,0x9d,0x9a,0x99,0x97,0x96,0x96,0x96,0x96,0x96,
0x96,0x96,0x96,0x97,0x96,0x95,0x93,0x92,0x92,0x92,0x91,0x90,0x90,0x91,0x90,0x8f,
0x8f,0x8f,0x8e,0x8d,0x8c,0x8c,0x8c,0x8c,0x8a,0x87,0x8f,0xfd,0x30,0x32,0x36,0x43,
0x57,0x57,0x50,0x4c,0x4d,0x53,0x54,0x33,0xea,0xad,0x95,0x9d,0xa2,0x98,0x98,0xa3,
0x9f,0xa5,0xa6,0xb6,0xb3,0xbb,0xc9,0xdd,0xe8,0xfe,0xfb,0x09,0x0f,0x23,0x41,0x4b,
0x46,0x41,0x42,0x46,0x45,0x3d,0x32,0x26,0x1a,0x1d,0x23,0x2b,0xf8,0xc4,0xc8,0xcb,
0xcc,0xcb,0xce,0xcd,0xca,0xcc,0xcc,0xcc,0xcc,0xcb,0xcd,0xcd,0xcd,0xce,0xcd,0xcc,
0xcc,0xcc,0xcc,0xcc,0xcb,0xcc,0xcc,0xcb,0xcc,0xcc,0xcd,0xcb,0xcb,0xcc,0xcc,0xcc,
0xcb,0xcb,0xcc,0xcc,0xcc,0xcc,0xcd,0xcd,0xcd,0xce,0xce,0xd0,0xcf,0xd2,0xd2,0xd1,
0xd3,0xd5,0xd2,0xd3,0xd3,0xd3,0xd5,0xd5,0xd3,0xd2,0xd3,0xd3,0xd4,0xd3,0xd2,0xd3,
0xd2,0xd1,0xd4,0xd3,0xd1,0xd1,0xd1,0xd2,0xd2,0xd2,0xd2,0xd3,0xd1,0xd0,0xd4,0xd1,
0xd3,0xd2,0xd2,0xd3,0xd4,0xd4,0xd3,0xd3,0xd3,0xd0,0xd2,0xd4,0xd5,0xd1,0xd3,0xd1,
0xe2,0xe5,0xe6,0xe8,0xe9,0xea,0xec,0xf0,0xd8,0xc3,0xcb,0xd1,0xd8,0xd9,0xd9,0xd9,
0xd9,0xda,0xd9,0xd6,0xd8,0xd9,0xd9,0xe4,0xf7,0xff,0xfc,0xf0,0xf4,0xfd,0x02,0x19,
0x0e,0x09,0x04,0x15,0x18,0x1f,0x0f,0x19,0x28,0x17,0x1a,0x12,0x0a,0x00,0xee,0xed,
0xf0,0xf3,0xfb,0x00,0x9d,0x99,0xa1,0xa1,0xa1,0xa0,0x9d,0x98,0x97,0x97,0xa2,0xa7,
0xab,0xaf,0xb0,0xb0,0xb2,0xb9,0xc0,0xc8,0xcf,0xbe,0xa5,0xa9,0xa8,0xa6,0xa8,0xa7,
0xa3,0xa2,0xac,0xaa,0xa1,0x80,0x80,0xa9,0xa9,0xa8,0xa7,0xa4,0xa1,0x9e,0xa3,0xa7,
0xac,0xad,0xab,0xd5,0x10,0x01,0xe9,0xda,0xd0,0xcb,0xcb,0xc7,0xc0,0xc2,0xbd,0xb6,
0xa1,0x9b,0x9b,0x9b,0x9b,0x9c,0x9d,0x9d,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9f,0xa0,
0xa0,0xa0,0xa0,0xa1,0xa1,0xa0,0x9f,0x9f,0x9e,0x9c,0x9a,0x9a,0x98,0x98,0x97,0x96,
0x96,0x96,0x96,0x96,0x96,0x96,0x95,0x94,0x93,0x91,0x92,0x92,0x91,0x91,0x90,0x90,
0x90,0x8f,0x8f,0x8e,0x8e,0x8e,0x8e,0x8d,0x8d,0x8d,0x8c,0x84,0xdd,0x24,0x2d,0x2a,
0x32,0x4f,0x3b,0x38,0x38,0x34,0x30,0x37,0x3d,0x46,0x53,0x41,0x1f,0x1f,0x34,0x30,
0x24,0x30,0x2b,0x2f,0x2a,0x1f,0x20,0x19,0x22,0x30,0x3a,0x47,0x58,0x65,0x68,0x64,
0x63,0x64,0x61,0x5b,0x55,0x4e,0x47,0x3e,0x34,0x29,0x1c,0x16,0x1d,0x33,0xf2,0xc7,
0xca,0xcb,0xcc,0xcc,0xcc,0xcc,0xcc,0xcd,0xcd,0xcd,0xcd,0xcc,0xcc,0xcc,0xce,0xce,
0xce,0xcd,0xcd,0xcc,0xcc,0xcc,0xcc,0xcc,0xcb,0xcb,0xcc,0xcc,0xcb,0xcd,0xcc,0xcb,
0xcd,0xcd,0xcd,0xce,0xce,0xcd,0xce,0xce,0xce,0xcf,0xce,0xcf,0xd1,0xd0,0xd0,0xd1,
0xd2,0xd2,0xd3,0xd3,0xd1,0xd2,0xd3,0xd2,0xd4,0xd2,0xd3,0xd3,0xd1,0xd2,0xd3,0xd3,
0xd2,0xd3,0xd2,0xd2,0xd5,0xd3,0xd2,0xd0,0xd1,0xd2,0xd1,0xd1,0xd3,0xd2,0xd1,0xd2,
0xd2,0xd1,0xd4,0xd4,0xd4,0xd5,0xd4,0xd4,0xd5,0xd4,0xd4,0xd1,0xd1,0xd4,0xd4,0xd2,
0xcf,0xea,0x30,0x12,0xf7,0xe6,0xe1,0xe4,0xe8,0xed,0xdc,0xc5,0xcf,0xd4,0xd5,0xd7,
0xd9,0xd9,0xd7,0xd9,0xe1,0xf0,0xf5,0xee,0xf8,0xfb,0xf4,0xf1,0xed,0xf1,0xf5,0xf1,
0xfb,0x13,0x13,0x03,0x04,0x04,0x08,0x08,0x08,0x10,0x1b,0x1c,0x1a,0x12,0x0c,0x07,
0x04,0xf1,0xf0,0xf1,0x03,0xfc,0x9f,0x9b,0x9d,0x9f,0xa2,0x9d,0x96,0x96,0x9b,0x9d,
0x9d,0xa0,0xa2,0xa5,0xa7,0xaa,0xab,0xad,0xb0,0xb1,0xb4,0xb5,0xa8,0xa8,0xaa,0xa9,
0xaa,0xa9,0xa6,0xa1,0xa3,0xa4,0xa6,0x80,0x80,0xa9,0xa8,0xa9,0xa7,0xa4,0xa0,0x9e,
0xac,0xb0,0xb2,0xb0,0xab,0xed,0x11,0xfd,0xe4,0xd3,0xce,0xca,0xc8,0xc4,0xbe,0xc0,
0xbb,0xad,0x97,0x95,0x96,0x96,0x97,0x98,0x97,0x98,0x99,0x99,0x99,0x9a,0x9a,0x9a,
0x9c,0x9d,0x9e,0x9f,0x9f,0x9f,0x9f,0xa0,0xa0,0x9f,0x9d,0x9c,0x9a,0x99,0x98,0x97,
0x96,0x95,0x95,0x96,0x95,0x95,0x94,0x94,0x94,0x94,0x93,0x92,0x92,0x91,0x91,0x91,
0x90,0x90,0x90,0x90,0x8f,0x8e,0x8e,0x8f,0x8f,0x8f,0x8f,0x8e,0x8c,0x88,0xfc,0x28,
0x2f,0x2a,0x3f,0x2e,0x21,0x28,0x1b,0x10,0x1f,0x20,0x1a,0x2d,0x43,0x4f,0x57,0x5b,
0x59,0x56,0x54,0x54,0x45,0x38,0x19,0xfb,0xee,0xf0,0xe1,0xe6,0xf6,0xfe,0x22,0x4e,
0x5f,0x5e,0x5d,0x59,0x58,0x57,0x56,0x51,0x4b,0x42,0x36,0x28,0x1a,0x1f,0x2e,0x3b,
0xe5,0xc8,0xc9,0xca,0xca,0xcd,0xcc,0xcc,0xcc,0xcd,0xcd,0xcd,0xcc,0xce,0xcd,0xcd,
0xcf,0xce,0xce,0xce,0xcb,0xcc,0xcb,0xcb,0xcd,0xcd,0xcc,0xcc,0xce,0xcd,0xcc,0xce,
0xcc,0xcb,0xcd,0xce,0xcc,0xce,0xcf,0xcd,0xcf,0xce,0xcf,0xd0,0xce,0xcf,0xd1,0xd1,
0xd0,0xcf,0xd1,0xd1,0xd1,0xd1,0xd2,0xd2,0xd3,0xd2,0xd2,0xd2,0xd1,0xd1,0xd1,0xd3,
0xd3,0xd1,0xd2,0xd2,0xd0,0xd3,0xd3,0xd2,0xd1,0xd0,0xd0,0xd2,0xd1,0xd1,0xd3,0xd1,
0xd2,0xd3,0xd2,0xd1,0xd2,0xd2,0xd3,0xd4,0xd3,0xd3,0xd4,0xd4,0xd4,0xd2,0xd3,0xd3,
0xd0,0xd1,0xcb,0x22,0x58,0x55,0x4b,0x37,0x13,0xf2,0xe3,0xe5,0xdd,0xc8,0xcf,0xd4,
0xd6,0xd9,0xe0,0xea,0xed,0xf0,0xfd,0x0a,0x06,0xf5,0xed,0xe7,0xe8,0xeb,0xec,0xef,
0xeb,0xf1,0xfa,0x08,0x12,0xff,0xfd,0xf6,0xed,0x00,0x15,0x1c,0x1a,0x16,0x08,0x0c,
0x0d,0x09,0x08,0x02,0xf0,0xf0,0x09,0xf0,0xa1,0xa0,0xa2,0xa4,0xa5,0xa3,0xa0,0xa1,
0xa6,0xac,0xaf,0xb0,0xb0,0xb1,0xb2,0xb4,0xb7,0xba,0xbc,0xbd,0xc0,0xc3,0xb5,0xa4,
0xa8,0xa8,0xa8,0xaa,0xaa,0xa8,0xa9,0xa6,0xa4,0x80,0x80,0xa9,0xa9,0xa8,0xa5,0xa3,
0x9f,0x9f,0xae,0xac,0xab,0xa9,0xa9,0xff,0x0f,0xfb,0xe5,0xd3,0xcb,0xc8,0xc7,0xc0,
0xbc,0xbe,0xb7,0x9f,0x94,0x96,0x95,0x96,0x97,0x97,0x98,0x99,0x9b,0x9a,0x9a,0x9a,
0x9b,0x9b,0x9d,0x9d,0x9e,0x9f,0xa0,0x9f,0x9f,0x9f,0x9e,0x9d,0x9d,0x9b,0x99,0x97,
0x96,0x97,0x96,0x95,0x96,0x96,0x96,0x96,0x95,0x95,0x95,0x96,0x95,0x94,0x95,0x94,
0x93,0x93,0x93,0x93,0x92,0x91,0x90,0x8e,0x90,0x8e,0x8e,0x8e,0x8e,0x8d,0x88,0x9e,
0x18,0x32,0x2f,0x31,0x40,0x15,0xf6,0xdb,0xc5,0xc2,0xde,0xe8,0x03,0x25,0x3a,0x46,
0x4b,0x4b,0x45,0x3e,0x3d,0x32,0x15,0x01,0xed,0xcd,0xca,0xcf,0xc4,0xc6,0xd5,0xd7,
0xe2,0x02,0x2f,0x43,0x44,0x44,0x42,0x43,0x44,0x46,0x46,0x41,0x3a,0x32,0x16,0x15,
0x36,0x3a,0xde,0xc5,0xc9,0xc9,0xca,0xca,0xca,0xcb,0xcc,0xcd,0xcd,0xcd,0xcc,0xcc,
0xcc,0xcd,0xcd,0xcd,0xce,0xcf,0xcc,0xcc,0xcc,0xcd,0xcc,0xcc,0xcd,0xcd,0xce,0xce,
0xcd,0xce,0xcd,0xce,0xce,0xcf,0xce,0xce,0xcf,0xd0,0xd0,0xcf,0xcf,0xd0,0xcf,0xd0,
0xd1,0xcf,0xd0,0xd1,0xd0,0xd1,0xd1,0xcf,0xd2,0xd2,0xd1,0xd3,0xd1,0xd3,0xd1,0xd1,
0xd1,0xd2,0xd1,0xd0,0xd1,0xd2,0xd2,0xd4,0xd2,0xd1,0xd1,0xd0,0xd1,0xd1,0xd2,0xd2,
0xd2,0xd1,0xd2,0xd2,0xd1,0xd2,0xd3,0xd2,0xd3,0xd1,0xd3,0xd3,0xd3,0xd4,0xd4,0xd3,
0xd4,0xd2,0xd0,0xcc,0xe9,0x4f,0x4f,0x50,0x54,0x56,0x55,0x4b,0x2e,0x0d,0xeb,0xca,
0xd0,0xd5,0xda,0xde,0xe2,0xf6,0x04,0x0b,0x0d,0x09,0xf7,0xea,0xe7,0xe8,0xe9,0xe7,
0xec,0xef,0xee,0xf1,0xfa,0xfd,0x0c,0xfb,0x01,0xf3,0xf2,0x09,0x1a,0x2c,0x23,0x0f,
0xe8,0x0d,0x16,0x12,0x05,0x0a,0xfd,0xf1,0x0e,0xe0,0x9e,0xa1,0xa1,0xa3,0xa4,0xa5,
0xa5,0xa4,0xa3,0xa8,0xad,0xaf,0xaf,0xb1,0xb3,0xb3,0xb3,0xb4,0xb5,0xb4,0xb5,0xb8,
0xb7,0xa5,0xa5,0xa8,0xa8,0xa6,0xa6,0xa7,0xa7,0xa3,0xa4,0x80,0x80,0xa7,0xa6,0xa6,
0xa6,0xa2,0x9e,0xa2,0xbb,0xb7,0xb3,0xae,0xb8,0x0f,0x0b,0xf3,0xde,0xd0,0xca,0xc9,
0xc7,0xbf,0xba,0xb9,0xac,0x9a,0x99,0x9a,0x9a,0x99,0x99,0x9b,0x9d,0x9e,0x9f,0xa0,
0xa1,0xa2,0xa3,0xa3,0xa3,0xa4,0xa4,0xa3,0xa2,0xa3,0xa2,0xa3,0xa3,0xa3,0xa3,0xa2,
0xa2,0x9f,0x9e,0x9e,0x9e,0x9d,0x9d,0x9b,0x9b,0x9b,0x9b,0x9a,0x9a,0x9a,0x99,0x99,
0x99,0x98,0x96,0x95,0x95,0x94,0x93,0x91,0x90,0x8f,0x94,0x99,0x8d,0x8d,0x8d,0x8c,
0x82,0xdf,0x30,0x35,0x32,0x34,0x3c,0x13,0xae,0xa4,0xa1,0xa1,0xdd,0x16,0x1e,0x1b,
0x1f,0x25,0x2f,0x3a,0x32,0x2f,0x2a,0x11,0x02,0xe7,0xc6,0xc2,0xbc,0xb5,0xbe,0xb8,
0xba,0xc6,0xd3,0xe7,0xfe,0x16,0x24,0x2c,0x2e,0x33,0x35,0x37,0x38,0x38,0x34,0x2f,
0x25,0x27,0x33,0x2b,0xd1,0xc8,0xca,0xc9,0xcb,0xcb,0xcb,0xcb,0xcc,0xce,0xce,0xce,
0xcc,0xcd,0xce,0xcc,0xcc,0xcd,0xcd,0xcd,0xcc,0xcb,0xcc,0xcd,0xce,0xcc,0xcd,0xcd,
0xcd,0xcc,0xcd,0xcd,0xcc,0xcc,0xcd,0xce,0xcf,0xcf,0xce,0xcf,0xd0,0xcf,0xce,0xce,
0xcf,0xd0,0xd0,0xd1,0xd1,0xd1,0xcf,0xd1,0xd1,0xd0,0xd0,0xd0,0xd1,0xd2,0xd0,0xd1,
0xd1,0xce,0xd0,0xd2,0xd0,0xd1,0xd1,0xd1,0xd4,0xd6,0xd1,0xd1,0xd1,0xd0,0xd2,0xd1,
0xd0,0xd2,0xd2,0xd1,0xd2,0xd0,0xd1,0xd2,0xd1,0xd2,0xd2,0xd1,0xd3,0xd4,0xd3,0xd3,
0xd4,0xd2,0xd2,0xd0,0xd2,0xcd,0x29,0x52,0x4f,0x4f,0x50,0x51,0x54,0x56,0x58,0x57,
0x4a,0x2a,0x06,0x07,0x0a,0xfd,0xfd,0x04,0xfe,0xf6,0xf4,0xf0,0xea,0xe4,0xe6,0xe8,
0xea,0xea,0xf9,0xf8,0xe9,0xe9,0xed,0xf0,0xff,0xfe,0x01,0xf3,0xff,0x09,0x1d,0x2e,
0x17,0xed,0xf3,0x0f,0x16,0x22,0x18,0x0d,0x0f,0xfb,0x12,0xd0,0x9e,0xa2,0xa3,0xa3,
0xa4,0xa4,0xa4,0xa3,0xa2,0xa3,0xa5,0xa9,0xab,0xae,0xaf,0xb1,0xb2,0xb2,0xb3,0xb3,
0xb2,0xb0,0xb0,0xab,0xae,0xa9,0xa7,0xaa,0xa9,0xa7,0xa5,0xa1,0xa7,0x80,0x80,0xa7,
0xa7,0xa6,0xa4,0xa1,0x9e,0xa2,0xae,0xac,0xa8,0xa2,0xc4,0x19,0x06,0xec,0xd8,0xca,
0xc8,0xc8,0xc5,0xbe,0xb6,0xaf,0xa5,0x9d,0x9e,0x9f,0xa0,0xa0,0xa1,0xa2,0xa3,0xa3,
0xa4,0xa5,0xa7,0xa8,0xa9,0xaa,0xaa,0xaa,0xaa,0xab,0xac,0xad,0xad,0xaf,0xae,0xad,
0xab,0xa9,0xaa,0xa9,0xa9,0xa9,0xa8,0xa8,0xa8,0xa9,0xa8,0xa7,0xa6,0xa6,0xa4,0xa4,
0xa3,0xa2,0xa0,0x9f,0x9e,0x9c,0x9a,0x98,0x97,0x96,0x94,0x92,0x8f,0x9f,0x8e,0x8b,
0x8a,0x85,0x9b,0x18,0x36,0x34,0x32,0x2e,0x31,0x26,0xc5,0x98,0x86,0x9b,0x04,0x0f,
0x0b,0x09,0x09,0x11,0x11,0x1e,0x25,0x28,0x18,0xfe,0xe9,0xbd,0xad,0xad,0xba,0xb5,
0xa8,0xa9,0xa9,0xb3,0xcb,0xe5,0x00,0x03,0x0a,0x1b,0x19,0x1f,0x24,0x27,0x28,0x2b,
0x29,0x25,0x28,0x2e,0x31,0x21,0xcb,0xc8,0xcb,0xca,0xc9,0xcb,0xcc,0xcc,0xcd,0xcd,
0xcc,0xcd,0xcc,0xcd,0xcd,0xcd,0xcd,0xcd,0xcd,0xcd,0xcd,0xcd,0xcd,0xcc,0xcd,0xcc,
0xcb,0xce,0xcd,0xcd,0xcc,0xcd,0xce,0xce,0xce,0xce,0xce,0xce,0xce,0xd0,0xcf,0xcf,
0xcf,0xcf,0xd0,0xd0,0xcf,0xcf,0xcf,0xd0,0xd0,0xd1,0xcf,0xcf,0xd0,0xcf,0xd1,0xd1,
0xd0,0xd1,0xd2,0xd0,0xd2,0xd2,0xd0,0xd0,0xd1,0xd1,0xd2,0xd3,0xcf,0xce,0xd0,0xd2,
0xd1,0xd0,0xd2,0xd1,0xd1,0xd1,0xd1,0xd1,0xd0,0xd2,0xd0,0xd2,0xd2,0xd2,0xd3,0xd3,
0xd4,0xd3,0xd2,0xd2,0xd1,0xd1,0xcd,0xf1,0x50,0x4f,0x4f,0x4f,0x4f,0x50,0x52,0x52,
0x54,0x55,0x57,0x59,0x59,0x50,0x47,0x3a,0x1c,0xf8,0xe6,0xe5,0xe8,0xe9,0xe6,0xe0,
0xdf,0xe2,0xe3,0xe1,0xee,0xed,0xe2,0xde,0xdd,0xe0,0xf1,0xf7,0xef,0xea,0xed,0xf0,
0xf8,0xfe,0xf1,0xe1,0xfe,0x0a,0x12,0x22,0x2d,0x25,0x1d,0x03,0x13,0xc2,0xa1,0xa5,
0xa5,0xa4,0xa4,0xa4,0xa3,0xa1,0xa1,0xa2,0xa2,0xa4,0xa6,0xa7,0xaa,0xab,0xac,0xac,
0xaf,0xae,0xac,0xab,0xaa,0xa9,0xb6,0xb2,0xb2,0xba,0xb9,0xae,0xaa,0xa4,0xaf,0x80,
0x80,0xa7,0xa6,0xa6,0xa4,0xa0,0x9d,0xa3,0xaa,0xa9,0xa7,0xa2,0xdc,0x1a,0xff,0xe4,
0xd3,0xcb,0xc7,0xc6,0xc2,0xbe,0xb5,0xae,0xa8,0xa7,0xa7,0xa8,0xab,0xab,0xab,0xad,
0xae,0xaf,0xaf,0xae,0xb0,0xb0,0xb2,0xb3,0xb4,0xb4,0xb5,0xb6,0xb9,0xb8,0xb9,0xbb,
0xb9,0xb6,0xb4,0xb4,0xb4,0xb3,0xb4,0xb2,0xb1,0xb0,0xaf,0xaf,0xae,0xab,0xaa,0xa8,
0xa7,0xa6,0xa5,0xa3,0xa0,0x9f,0x9e,0x9d,0x9b,0x9a,0x98,0x95,0x92,0x91,0x8c,0x99,
0x94,0x88,0x87,0x82,0xe9,0x2e,0x39,0x36,0x36,0x32,0x2a,0x11,0xd1,0x9a,0x83,0x92,
0xec,0xf0,0xfb,0xff,0xff,0xfc,0xfa,0x08,0x11,0x18,0x04,0xef,0xcf,0xab,0xa4,0xaa,
0xb1,0xb5,0xac,0xa2,0x9a,0xa5,0xbb,0xe3,0x01,0x0c,0x0e,0x18,0x15,0x15,0x12,0x16,
0x18,0x19,0x1b,0x1e,0x23,0x27,0x2a,0x17,0xc7,0xc7,0xc9,0xc9,0xc9,0xcb,0xcb,0xcd,
0xcc,0xcc,0xcd,0xcd,0xcb,0xcc,0xcd,0xcc,0xcc,0xcd,0xcd,0xcc,0xce,0xcd,0xcd,0xcc,
0xcd,0xcc,0xcc,0xcd,0xcd,0xcd,0xcd,0xcd,0xcd,0xcd,0xce,0xce,0xce,0xce,0xcc,0xcd,
0xce,0xcf,0xcd,0xce,0xcf,0xcf,0xcf,0xcf,0xce,0xcf,0xd0,0xd0,0xcf,0xd0,0xd1,0xcf,
0xd1,0xd0,0xcf,0xd0,0xcd,0xcf,0xd1,0xcf,0xd0,0xd0,0xd0,0xd1,0xd3,0xd0,0xd0,0xd0,
0xcf,0xd1,0xd2,0xd1,0xd1,0xd1,0xd0,0xd2,0xd1,0xd0,0xd3,0xd3,0xd3,0xd2,0xd2,0xd2,
0xd3,0xd2,0xd3,0xd2,0xd2,0xd2,0xd1,0xd2,0xcf,0x30,0x53,0x4f,0x4f,0x50,0x50,0x4f,
0x50,0x51,0x53,0x54,0x55,0x54,0x54,0x56,0x5a,0x54,0x47,0x40,0x01,0xdd,0xdf,0xe2,
0xe1,0xd9,0xd7,0xd8,0xd9,0xda,0xe2,0xe1,0xd8,0xd3,0xd2,0xd8,0xea,0xef,0xdf,0xde,
0xdb,0xd3,0xd2,0xd1,0xd0,0xd7,0xf1,0xef,0xfc,0x1b,0x28,0x1e,0x02,0x00,0x0f,0xb8,
0xa4,0xa7,0xa7,0xa7,0xa8,0xa8,0xa7,0xa7,0xa6,0xa7,0xa7,0xa7,0xa9,0xaa,0xab,0xad,
0xaf,0xb0,0xb1,0xb1,0xb0,0xb0,0xad,0xa9,0xa7,0xab,0xb0,0xbb,0xc5,0xbb,0xbe,0xb0,
0xa8,0x80,0x80,0xa8,0xa6,0xa5,0xa2,0x9f,0x9d,0xa2,0xa5,0xa4,0xa5,0xa1,0xf2,0x15,
0xf9,0xdf,0xce,0xc7,0xc6,0xc4,0xc1,0xbe,0xb3,0xac,0xad,0xaf,0xaf,0xb0,0xb3,0xb5,
0xb5,0xb6,0xb7,0xbc,0xb9,0xb8,0xba,0xba,0xba,0xbb,0xbd,0xbf,0xbf,0xbe,0xbf,0xbe,
0xbd,0xbd,0xbd,0xbc,0xb9,0xb8,0xb8,0xb8,0xb7,0xb6,0xb7,0xb3,0xb1,0xb0,0xaf,0xaf,
0xac,0xaa,0xaa,0xa8,0xa5,0xa3,0xa1,0x9f,0x9e,0x9e,0x9b,0x9a,0x96,0x93,0x91,0x90,
0x8c,0x91,0x9f,0x8a,0x85,0xc1,0x21,0x37,0x37,0x37,0x37,0x38,0x39,0x33,0x10,0xd6,
0xa4,0x8d,0xb3,0xdf,0xed,0xf2,0xf4,0xf3,0xf1,0xf9,0x03,0x00,0xf2,0xe6,0xc8,0xb0,
0xa2,0xa3,0xa4,0xa3,0xa3,0xa4,0xa5,0x9b,0xa3,0xc7,0xf4,0x02,0x0a,0x17,0x0f,0x0d,
0x14,0x0e,0x09,0x0a,0x10,0x18,0x1b,0x1f,0x2e,0x15,0xc5,0xc9,0xc9,0xca,0xca,0xca,
0xcb,0xcb,0xcc,0xcc,0xcc,0xcd,0xce,0xcc,0xcc,0xcc,0xcc,0xcc,0xcd,0xcc,0xca,0xcb,
0xcc,0xcc,0xcd,0xcc,0xcd,0xcc,0xcc,0xcd,0xcd,0xcd,0xcd,0xce,0xcd,0xce,0xce,0xcd,
0xcc,0xcd,0xcd,0xce,0xcd,0xcd,0xcd,0xcd,0xcd,0xce,0xce,0xcf,0xcf,0xce,0xcf,0xd0,
0xcf,0xce,0xd0,0xcf,0xce,0xce,0xcc,0xce,0xd0,0xcf,0xce,0xd1,0xcf,0xd0,0xd3,0xd1,
0xd0,0xd0,0xd0,0xd1,0xd2,0xd0,0xd1,0xd1,0xd1,0xd0,0xd0,0xd0,0xd0,0xd0,0xd1,0xd2,
0xd1,0xd2,0xd1,0xd2,0xd3,0xd1,0xd1,0xd1,0xd0,0xcb,0xfb,0x55,0x50,0x4e,0x4e,0x4f,
0x50,0x50,0x52,0x50,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x58,0x5b,0x5d,0x57,0x2a,
0xfc,0xde,0xd0,0xcf,0xcf,0xd0,0xd4,0xd4,0xd5,0xd3,0xcc,0xc9,0xc9,0xd0,0xe3,0xeb,
0xdf,0xdd,0xd5,0xcd,0xc9,0xca,0xcd,0xd3,0xe7,0xd8,0xe2,0x13,0x17,0xf7,0xef,0xff,
0x08,0xb2,0xaa,0xa9,0xa9,0xa8,0xa9,0xa9,0xa8,0xa9,0xaa,0xaa,0xab,0xad,0xaf,0xaf,
0xaf,0xb0,0xb2,0xb4,0xb4,0xb6,0xb7,0xb8,0xb6,0xb3,0xb3,0xb1,0xb2,0xb3,0xb4,0xb4,
0xb0,0xa1,0x9e,0x80,0x80,0xa6,0xa6,0xa4,0xa1,0x9f,0x9e,0xa0,0xa1,0xa1,0xa1,0xa6,
0x06,0x0d,0xf0,0xd9,0xcb,0xc7,0xc4,0xc3,0xbe,0xb4,0xaf,0xac,0xac,0xad,0xad,0xaf,
0xb1,0xb3,0xb4,0xb5,0xb5,0xb7,0xb6,0xb7,0xb8,0xb8,0xb8,0xba,0xbc,0xbc,0xbb,0xbd,
0xbe,0xbb,0xba,0xbb,0xb8,0xb7,0xb6,0xb6,0xb6,0xb4,0xb3,0xb2,0xb1,0xb0,0xb0,0xaf,
0xae,0xae,0xab,0xa9,0xa8,0xa7,0xa5,0xa3,0xa1,0xa0,0x9f,0x9e,0x9b,0x99,0x97,0x94,
0x91,0x8f,0x8d,0x8a,0xa6,0x8d,0xc7,0x11,0x2c,0x3b,0x38,0x36,0x36,0x39,0x38,0x3b,
0x40,0x39,0x1b,0xeb,0xbc,0xa8,0xb8,0xcb,0xd8,0xdd,0xe3,0xe7,0xec,0xe3,0xd8,0xdb,
0xc8,0xb5,0xad,0xa6,0xa2,0x9f,0x97,0x9b,0xac,0xa1,0x9d,0xa9,0xc4,0xe7,0xec,0x01,
0x15,0x01,0x12,0x13,0x0f,0x0f,0x02,0xea,0xd0,0xcc,0x04,0x04,0xc5,0xc9,0xc9,0xca,
0xc9,0xca,0xcc,0xcc,0xcb,0xcc,0xcc,0xcc,0xcc,0xcb,0xcc,0xcc,0xcc,0xcc,0xcb,0xca,
0xcb,0xcb,0xcb,0xcd,0xcc,0xc8,0xc9,0xcb,0xcb,0xcb,0xcd,0xcd,0xcc,0xcc,0xcb,0xcd,
0xcd,0xcd,0xce,0xcd,0xcc,0xcd,0xcd,0xcb,0xcc,0xcd,0xcc,0xce,0xce,0xcd,0xcd,0xcd,
0xd0,0xcf,0xcd,0xcd,0xce,0xce,0xcf,0xce,0xce,0xcf,0xce,0xcd,0xcf,0xcf,0xcf,0xcf,
0xcf,0xd0,0xd0,0xd0,0xcf,0xd2,0xd1,0xd0,0xd2,0xd0,0xd2,0xd0,0xd0,0xd1,0xd0,0xd1,
0xd0,0xd1,0xd1,0xd1,0xd0,0xd2,0xd2,0xd1,0xd1,0xd0,0xcd,0xd3,0x3c,0x53,0x4e,0x4e,
0x4f,0x4e,0x50,0x4e,0x4e,0x50,0x51,0x52,0x51,0x52,0x52,0x55,0x56,0x55,0x55,0x56,
0x55,0x5b,0x5a,0x49,0x22,0xfe,0xeb,0xcb,0xcb,0xca,0xc8,0xc8,0xc5,0xc5,0xc5,0xc9,
0xdd,0xe3,0xde,0xdd,0xd3,0xd0,0xcb,0xce,0xd4,0xd9,0xe3,0xe0,0xed,0x00,0xf2,0xea,
0xef,0x03,0xff,0xb0,0xaf,0xb0,0xae,0xac,0xab,0xa9,0xa9,0xa9,0xa9,0xa9,0xa9,0xaa,
0xaa,0xa9,0xab,0xad,0xaf,0xb1,0xb3,0xb3,0xb3,0xb3,0xb3,0xb4,0xb3,0xb3,0xb4,0xb8,
0xb8,0xb9,0xba,0xbb,0xbe,0x80,0x80,0xa5,0xa5,0xa3,0xa0,0x9e,0x9e,0xa3,0xa5,0xa6,
0xa4,0xb9,0x14,0x04,0xe8,0xd4,0xc9,0xc4,0xc2,0xc1,0xba,0xb0,0xaf,0xad,0xae,0xaf,
0xb1,0xb2,0xb4,0xb4,0xb3,0xb4,0xb4,0xb3,0xb4,0xb5,0xb5,0xb5,0xb5,0xb6,0xb6,0xb5,
0xb4,0xb5,0xb4,0xb4,0xb4,0xb2,0xb1,0xb1,0xaf,0xae,0xad,0xab,0xaa,0xa9,0xa8,0xa8,
0xa5,0xa7,0xa5,0xa2,0xa2,0xa0,0xa1,0xa0,0x9d,0x9c,0x9b,0x9a,0x99,0x98,0x96,0x95,
0x94,0x92,0x8f,0x8e,0x8b,0x8c,0xa7,0xf2,0x20,0x1e,0x39,0x39,0x39,0x35,0x36,0x38,
0x37,0x3a,0x3d,0x3d,0x41,0x3e,0x2b,0x0d,0xe7,0xc6,0xb5,0xad,0xb0,0xb8,0xbf,0xbb,
0xb0,0xb6,0xbe,0xb9,0xa9,0xa7,0xa4,0xa0,0x99,0x94,0xa5,0xa4,0xa0,0xa0,0xa2,0xb1,
0xc6,0xd5,0xfe,0x05,0x04,0x14,0x01,0xcb,0xad,0x9f,0xa6,0xa7,0xe9,0x02,0xc6,0xc9,
0xca,0xc9,0xca,0xcb,0xcb,0xca,0xcb,0xcc,0xcc,0xcd,0xcb,0xcb,0xcb,0xcb,0xc9,0xca,
0xcb,0xca,0xcb,0xcb,0xcc,0xcb,0xcb,0xc9,0xca,0xca,0xcc,0xcb,0xcb,0xca,0xcb,0xcb,
0xcb,0xcb,0xcc,0xcb,0xcc,0xcc,0xce,0xcb,0xcc,0xcc,0xcc,0xcc,0xcc,0xcd,0xcd,0xcd,
0xcd,0xcd,0xcf,0xd0,0xce,0xce,0xce,0xcf,0xce,0xce,0xce,0xcf,0xcf,0xcd,0xce,0xce,
0xce,0xce,0xce,0xcf,0xcf,0xce,0xce,0xd1,0xd0,0xd1,0xcf,0xcf,0xcf,0xd0,0xd1,0xd0,
0xcf,0xd1,0xd0,0xd1,0xd1,0xd1,0xd2,0xd1,0xcf,0xd1,0xcf,0xcf,0xc9,0xf7,0x52,0x4e,
0x4e,0x4e,0x4e,0x4e,0x50,0x50,0x4f,0x50,0x50,0x50,0x51,0x52,0x53,0x52,0x53,0x53,
0x53,0x52,0x54,0x53,0x55,0x5a,0x5d,0x59,0x4b,0x23,0xf3,0xe9,0xda,0xd7,0xd2,0xd4,
0xc9,0xd6,0xe3,0xe0,0xdc,0xd9,0xd2,0xc7,0xbc,0xbe,0xc8,0xd0,0xe0,0xfd,0x07,0xf8,
0xf5,0xf9,0xf9,0x0d,0xfe,0xcd,0xd0,0xd4,0xd1,0xcf,0xcf,0xcd,0xcd,0xcc,0xcc,0xcc,
0xcb,0xc9,0xc4,0xc4,0xc4,0xc5,0xc6,0xc6,0xc6,0xc4,0xc2,0xc0,0xbf,0xc0,0xc0,0xc0,
0xc1,0xc3,0xc5,0xc6,0xc6,0xc8,0xc9,0x80,0x80,0xa3,0xa3,0xa1,0xa0,0x9e,0x9e,0xb2,
0xb6,0xb5,0xb1,0xd7,0x18,0xfa,0xe2,0xcd,0xc6,0xc2,0xc1,0xbf,0xb7,0xae,0xb3,0xb7,
0xb6,0xc2,0xd6,0xb8,0xbb,0xbb,0xbc,0xb9,0xb8,0xb7,0xb7,0xb7,0xb8,0xb8,0xb8,0xb8,
0xb8,0xb7,0xb7,0xb6,0xb5,0xb6,0xb6,0xb5,0xb5,0xb4,0xb1,0xb1,0xae,0xad,0xac,0xab,
0xa8,0xa7,0xa4,0xa3,0xa2,0xa0,0x9f,0x9f,0x9d,0x9c,0x9a,0x98,0x96,0x95,0x93,0x92,
0x91,0x90,0x8e,0x8c,0x8a,0x88,0x86,0x81,0xd1,0x2a,0x14,0x2b,0x3d,0x38,0x38,0x37,
0x37,0x39,0x38,0x3a,0x3d,0x3c,0x3b,0x40,0x44,0x45,0x3e,0x2b,0x10,0xf5,0xda,0xc1,
0xab,0x9a,0x91,0x95,0xa4,0xad,0xb4,0xaf,0xad,0x9c,0x9f,0x98,0x9f,0x9e,0xa5,0xa0,
0x9f,0x97,0xad,0xbc,0xd3,0xfc,0x08,0x0d,0x13,0xc2,0x94,0x96,0x90,0xa1,0x19,0xfb,
0xc6,0xc8,0xc9,0xc9,0xc9,0xc9,0xca,0xca,0xcb,0xcb,0xcb,0xcb,0xcc,0xcb,0xca,0xca,
0xca,0xca,0xcc,0xcb,0xca,0xcb,0xcb,0xca,0xcc,0xca,0xca,0xca,0xca,0xca,0xca,0xca,
0xca,0xca,0xcb,0xcb,0xcc,0xca,0xcb,0xca,0xcb,0xcc,0xcb,0xcc,0xcd,0xcb,0xcb,0xcc,
0xcb,0xcc,0xcb,0xcb,0xcd,0xcd,0xcb,0xcc,0xcd,0xcc,0xcb,0xcc,0xcd,0xce,0xcf,0xce,
0xcb,0xcb,0xcd,0xcd,0xcd,0xce,0xcd,0xce,0xce,0xce,0xce,0xce,0xcd,0xce,0xce,0xce,
0xd0,0xd0,0xd0,0xd1,0xcf,0xcf,0xcf,0xd0,0xd0,0xcf,0xd0,0xcf,0xce,0xcd,0xcb,0x34,
0x51,0x4e,0x4e,0x4e,0x4e,0x4c,0x4d,0x4f,0x4f,0x50,0x51,0x51,0x51,0x52,0x52,0x51,
0x51,0x53,0x52,0x52,0x52,0x53,0x53,0x54,0x54,0x54,0x56,0x5a,0x57,0x55,0x4f,0x36,
0x06,0xe9,0xce,0xe8,0xe3,0xdd,0xd8,0xd8,0xd6,0xd9,0xd1,0xd0,0xd2,0xd4,0xdc,0xe9,
0xf7,0x01,0xff,0xfc,0x01,0x14,0xf9,0xdd,0xe1,0xe3,0xe4,0xe5,0xe6,0xe9,0xe9,0xe7,
0xe8,0xe9,0xe8,0xe6,0xe3,0xe6,0xeb,0xed,0xed,0xed,0xec,0xeb,0xec,0xeb,0xe7,0xe6,
0xe6,0xe8,0xe4,0xe5,0xe6,0xe6,0xe6,0xe7,0xe5,0x80,0x80,0xa2,0xa2,0xa1,0x9f,0x9c,
0xa1,0xc9,0xca,0xc6,0xbe,0xf2,0x11,0xf3,0xda,0xc8,0xc3,0xc3,0xbf,0xbc,0xb0,0xcf,
0xd9,0xc1,0xc1,0xd0,0xc8,0xb9,0xbb,0xb9,0xb8,0xb8,0xb7,0xb7,0xb7,0xb4,0xb2,0xb1,
0xb1,0xaf,0xad,0xae,0xad,0xac,0xac,0xab,0xad,0xae,0xac,0xac,0xac,0xaa,0xa9,0xa8,
0xa7,0xa7,0xa5,0xa2,0xa0,0xa1,0xa0,0x9e,0x9d,0x9d,0x9b,0x9a,0x99,0x97,0x95,0x94,
0x93,0x91,0x90,0x90,0x8f,0x8d,0x8c,0x8a,0x89,0xa3,0x14,0x1f,0x18,0x38,0x37,0x37,
0x37,0x37,0x38,0x38,0x3c,0x3e,0x3e,0x3d,0x3c,0x3d,0x3f,0x42,0x43,0x47,0x44,0x3c,
0x31,0x23,0x09,0xde,0xb2,0x8f,0x8a,0x94,0xa8,0xb2,0xb6,0xa5,0x97,0x9d,0x9c,0x9b,
0x9d,0x9f,0x9f,0x9d,0x99,0xb3,0xba,0xd8,0x03,0x09,0x12,0x0f,0xb7,0x89,0x9e,0xfb,
0x42,0xdd,0xc6,0xc9,0xc9,0xc9,0xc9,0xca,0xc9,0xc9,0xca,0xca,0xc9,0xca,0xcb,0xcb,
0xca,0xca,0xc9,0xcb,0xca,0xca,0xcb,0xca,0xca,0xca,0xca,0xca,0xc9,0xc8,0xc8,0xc9,
0xc9,0xca,0xc9,0xc9,0xca,0xcb,0xcb,0xcb,0xcb,0xc9,0xca,0xcb,0xc9,0xca,0xca,0xca,
0xca,0xcb,0xcb,0xcb,0xca,0xcb,0xcd,0xcb,0xcb,0xcb,0xcb,0xcb,0xcc,0xcb,0xcc,0xcd,
0xcc,0xce,0xcd,0xcb,0xcd,0xcc,0xcb,0xcc,0xcc,0xcd,0xcf,0xce,0xcd,0xcc,0xcc,0xcf,
0xcd,0xce,0xce,0xcf,0xd0,0xcd,0xce,0xcf,0xcd,0xcf,0xce,0xce,0xcf,0xcd,0xce,0xc8,
0xf3,0x51,0x4d,0x4d,0x4e,0x4d,0x4d,0x4d,0x4d,0x4e,0x4e,0x50,0x52,0x52,0x52,0x51,
0x54,0x54,0x52,0x52,0x53,0x53,0x53,0x51,0x52,0x50,0x50,0x51,0x52,0x57,0x57,0x47,
0x36,0x1f,0xfb,0xd3,0xbf,0xc8,0xd4,0xda,0xd8,0xda,0xdd,0x0c,0x24,0x23,0x23,0x23,
0x24,0x23,0x25,0x2c,0x2e,0x27,0x10,0x12,0xf3,0xdd,0xe0,0xe1,0xe3,0xe8,0xec,0xef,
0xf0,0xf1,0xf0,0xee,0xef,0xef,0xec,0xec,0xee,0xf0,0xf1,0xef,0xec,0xec,0xed,0xf1,
0xf4,0xf6,0xf8,0xfa,0xf6,0xf2,0xf1,0xee,0xee,0xed,0xed,0x80,0x80,0xa1,0xa1,0xa0,
0x9e,0x9b,0xa7,0xd7,0xd9,0xd6,0xce,0x08,0x0b,0xeb,0xd0,0xc6,0xc2,0xc1,0xbf,0xb6,
0xb0,0xce,0xd3,0xcb,0xc7,0xc6,0xc7,0xc8,0xcc,0xc9,0xc7,0xc3,0xc4,0xc7,0xc5,0xc5,
0xc3,0xc1,0xbd,0xbb,0xbb,0xb9,0xb8,0xb7,0xb6,0xb5,0xb4,0xb2,0xb0,0xaf,0xae,0xae,
0xad,0xab,0xa7,0xa5,0xa3,0xa1,0x9f,0x9e,0x9c,0x9a,0x9a,0x98,0x97,0x96,0x94,0x93,
0x92,0x91,0x90,0x8f,0x8e,0x8e,0x8e,0x8c,0x89,0x88,0x8b,0xb7,0x18,0x1b,0x2d,0x3d,
0x3a,0x3c,0x39,0x39,0x3a,0x3a,0x3a,0x3d,0x3c,0x40,0x3f,0x3f,0x40,0x3f,0x3d,0x40,
0x40,0x42,0x41,0x3c,0x35,0x26,0x10,0xd6,0x98,0x87,0x89,0x99,0xaa,0xaf,0x9c,0x98,
0x9b,0xa0,0x96,0xa3,0x9f,0x9f,0x9b,0x9d,0xb8,0xc2,0xe5,0xfc,0x05,0x0c,0x05,0xc3,
0xef,0x30,0x42,0xd5,0xc7,0xc8,0xca,0xca,0xca,0xcb,0xcb,0xca,0xc9,0xcb,0xc9,0xca,
0xcb,0xcb,0xca,0xcb,0xca,0xca,0xc9,0xca,0xca,0xca,0xca,0xc8,0xc9,0xc8,0xc8,0xc7,
0xc6,0xc7,0xc8,0xc8,0xc7,0xca,0xca,0xca,0xca,0xcb,0xcb,0xca,0xca,0xca,0xc9,0xca,
0xca,0xca,0xca,0xca,0xca,0xca,0xca,0xca,0xcb,0xca,0xcb,0xcb,0xcb,0xcc,0xcc,0xcc,
0xcc,0xcc,0xcc,0xcc,0xca,0xcb,0xcc,0xcb,0xcc,0xcc,0xcc,0xce,0xcd,0xcd,0xcd,0xcc,
0xcd,0xce,0xcd,0xcf,0xce,0xce,0xcf,0xce,0xce,0xce,0xce,0xcf,0xce,0xcd,0xcd,0xcc,
0xcc,0xcd,0x35,0x51,0x4f,0x4d,0x4c,0x4d,0x4d,0x4e,0x4d,0x4e,0x4f,0x4f,0x4f,0x51,
0x52,0x54,0x55,0x55,0x56,0x56,0x56,0x54,0x54,0x54,0x54,0x53,0x52,0x53,0x56,0x46,
0x22,0x04,0xe9,0xcb,0xbc,0xbf,0xc6,0xcc,0xd2,0xd9,0xda,0xdd,0xe3,0x0b,0x21,0x20,
0x22,0x23,0x25,0x26,0x27,0x28,0x2a,0x2f,0x15,0x0e,0xed,0xdf,0xe1,0xe2,0xe4,0xe8,
0xe9,0xeb,0xeb,0xf0,0xf3,0xf4,0xf4,0xf4,0xf3,0xf2,0xf3,0xf6,0xf4,0xf1,0xee,0xef,
0xee,0xef,0xf1,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf3,0xf0,0xee,0xee,0x80,0x80,0x9f,
0x9f,0xa0,0x9e,0x9b,0xac,0xd2,0xd1,0xcd,0xd2,0x12,0x03,0xe2,0xcc,0xc4,0xc2,0xc1,
0xbd,0xb3,0xb7,0xbe,0xbd,0xc3,0xc2,0xc3,0xc2,0xc2,0xc3,0xc0,0xc0,0xbd,0xbe,0xc0,
0xc1,0xc0,0xc1,0xc1,0xc0,0xbf,0xc0,0xc0,0xc1,0xbe,0xbb,0xba,0xb9,0xb9,0xb8,0xb4,
0xb1,0xb7,0xb4,0xb3,0xb0,0xae,0xad,0xaa,0xa7,0xa7,0xa6,0xa5,0xa4,0xa3,0xa0,0x9f,
0x9d,0x9a,0x9a,0x99,0x98,0x97,0x98,0x96,0x94,0x93,0x92,0x91,0x8b,0x97,0x19,0x2a,
0x46,0x41,0x3d,0x3e,0x3c,0x3b,0x3b,0x3a,0x3c,0x3e,0x3d,0x3d,0x3d,0x3e,0x40,0x3f,
0x3e,0x3d,0x3b,0x3b,0x3e,0x3d,0x38,0x31,0x28,0x20,0xf0,0xaf,0x96,0x8b,0x8b,0x9c,
0xa2,0x96,0x9b,0x9a,0x98,0x9e,0x9d,0x9a,0x9b,0x98,0xa3,0xb0,0xbe,0xdb,0xea,0xf8,
0x00,0x0c,0x08,0x32,0x36,0xcc,0xc7,0xc9,0xcb,0xc9,0xc9,0xca,0xc9,0xca,0xcb,0xca,
0xca,0xca,0xca,0xc9,0xca,0xc9,0xc8,0xca,0xc9,0xc9,0xca,0xca,0xcb,0xc9,0xc8,0xca,
0xc9,0xc8,0xc9,0xc9,0xc6,0xc8,0xc7,0xc8,0xca,0xc9,0xca,0xca,0xca,0xca,0xcb,0xca,
0xca,0xca,0xc9,0xc9,0xca,0xc9,0xc9,0xc9,0xc9,0xca,0xca,0xcc,0xcd,0xca,0xcb,0xcb,
0xcb,0xcd,0xcb,0xca,0xca,0xcc,0xc9,0xcc,0xcc,0xca,0xcc,0xcb,0xcc,0xcd,0xcc,0xce,
0xcf,0xcc,0xce,0xce,0xcd,0xce,0xcd,0xcf,0xce,0xcf,0xce,0xcd,0xce,0xce,0xcd,0xcd,
0xcb,0xcb,0xc5,0xf8,0x51,0x4e,0x4d,0x4e,0x4f,0x4d,0x4c,0x4c,0x4d,0x4f,0x50,0x51,
0x51,0x52,0x53,0x54,0x56,0x56,0x56,0x57,0x56,0x56,0x54,0x53,0x55,0x57,0x59,0x53,
0x2b,0xf9,0xe8,0x04,0xcb,0xba,0xc0,0xc7,0xcb,0xcd,0xd1,0xd7,0xdb,0xdf,0xe8,0x06,
0x1d,0x1d,0x1e,0x20,0x22,0x23,0x23,0x25,0x27,0x29,0x0f,0x0d,0xec,0xe6,0xe7,0xe9,
0xec,0xee,0xee,0xee,0xef,0xf0,0xf3,0xf8,0xfd,0x00,0x01,0x04,0x05,0x06,0x06,0x07,
0x05,0x05,0x03,0x03,0x03,0x06,0x07,0x07,0x09,0x0b,0x0c,0x0a,0x08,0x08,0x08,0x80,
0x80,0x9e,0x9e,0x9e,0x9e,0x9c,0xb3,0xd3,0xcf,0xcc,0xdf,0x16,0xfa,0xdc,0xc9,0xc3,
0xc0,0xbf,0xb4,0xad,0xbf,0xc3,0xc1,0xc1,0xc0,0xbe,0xbe,0xbe,0xbb,0xba,0xbb,0xbc,
0xbb,0xb9,0xb8,0xb7,0xb6,0xb7,0xb7,0xb7,0xb6,0xb6,0xb5,0xb3,0xb3,0xb3,0xb1,0xb0,
0xab,0xa5,0xa2,0x9f,0x9d,0x9c,0x9d,0x9c,0x9a,0x99,0x98,0x97,0x96,0x94,0x92,0x92,
0x92,0x92,0x91,0x91,0x90,0x90,0x8f,0x8f,0x8f,0x8f,0x90,0x8f,0x8e,0x8e,0x8a,0xa6,
0xe0,0xd9,0x08,0x31,0x46,0x46,0x43,0x40,0x3e,0x3e,0x3f,0x3f,0x40,0x40,0x40,0x3f,
0x3f,0x40,0x3d,0x3b,0x3b,0x3c,0x3d,0x3a,0x3a,0x34,0x2f,0x2b,0x23,0xf5,0xc1,0xac,
0xa4,0xa3,0xa8,0xa0,0x90,0x99,0x9b,0xa0,0x9f,0x97,0x97,0x96,0x90,0x9e,0xa9,0xba,
0xcd,0xd8,0xd5,0xf0,0x11,0x36,0x28,0xc5,0xc6,0xc8,0xc9,0xc8,0xc9,0xc9,0xc9,0xc9,
0xca,0xca,0xc9,0xc9,0xc9,0xc9,0xca,0xc9,0xc9,0xca,0xc7,0xc7,0xc8,0xc9,0xc9,0xc8,
0xc7,0xc9,0xc9,0xc6,0xc8,0xc9,0xc6,0xc8,0xc8,0xc8,0xc9,0xca,0xca,0xc9,0xc8,0xc9,
0xc9,0xc8,0xc9,0xc9,0xc9,0xc9,0xc9,0xc8,0xc9,0xc9,0xc8,0xc8,0xc9,0xcd,0xcb,0xca,
0xca,0xc9,0xc9,0xca,0xca,0xca,0xcc,0xcb,0xcc,0xcd,0xc9,0xca,0xcb,0xc9,0xcd,0xcd,
0xcd,0xce,0xcc,0xcd,0xcf,0xce,0xce,0xce,0xcd,0xce,0xce,0xce,0xcd,0xcd,0xcd,0xcc,
0xcd,0xcd,0xca,0xca,0xd0,0x39,0x4e,0x4d,0x4c,0x4d,0x4e,0x4e,0x4d,0x4e,0x4f,0x50,
0x50,0x51,0x52,0x53,0x55,0x57,0x57,0x56,0x56,0x57,0x56,0x55,0x57,0x5c,0x57,0x40,
0x2a,0xf6,0xcf,0xc4,0xbc,0xcc,0x04,0xe4,0xc7,0xc8,0xc6,0xc9,0xcf,0xd6,0xdc,0xde,
0xf3,0x07,0x1f,0x1f,0x20,0x20,0x21,0x22,0x22,0x22,0x26,0x25,0x0c,0x0b,0xe9,0xe9,
0xec,0xef,0xf0,0xf2,0xf2,0xf1,0xf2,0xf2,0xf3,0xf4,0xf8,0xfd,0x02,0x05,0x08,0x09,
0x0d,0x0e,0x10,0x0f,0x0e,0x0e,0x0e,0x0d,0x0d,0x0c,0x0d,0x0e,0x0d,0x0c,0x0d,0x0f,
0x0e,0x80,0x80,0x9e,0x9f,0x9e,0x9d,0x9c,0xc0,0xdd,0xd8,0xd3,0xe9,0x0b,0xe9,0xcd,
0xc2,0xbd,0xba,0xbd,0xb9,0xc1,0xcd,0xcb,0xca,0xca,0xcb,0xca,0xc8,0xc6,0xc3,0xc0,
0xbd,0xbd,0xbc,0xba,0xb8,0xb7,0xb4,0xb3,0xb3,0xb2,0xb0,0xaf,0xad,0xab,0xac,0xac,
0xa8,0xa0,0x9c,0x9a,0x98,0x98,0x97,0x97,0x96,0x96,0x93,0x93,0x92,0x92,0x92,0x90,
0x90,0x8f,0x90,0x91,0x92,0x92,0x91,0x91,0x91,0x91,0x90,0x91,0x91,0x91,0x8f,0x8f,
0x8f,0x91,0x92,0xa4,0xbc,0xe7,0x0e,0x2c,0x3f,0x48,0x48,0x45,0x44,0x42,0x43,0x43,
0x42,0x41,0x42,0x40,0x3f,0x3f,0x3e,0x3c,0x3b,0x3c,0x3b,0x38,0x33,0x2f,0x2d,0x22,
0xf5,0xc9,0xb8,0xb6,0xba,0xc4,0xb2,0x92,0x96,0x9a,0x9d,0x9b,0x9f,0x95,0x92,0x90,
0x9f,0xa9,0xc1,0xc4,0xb8,0xbe,0xf1,0x2a,0x18,0xc3,0xc7,0xc9,0xc9,0xc8,0xca,0xc8,
0xca,0xca,0xc9,0xc9,0xc9,0xc9,0xc9,0xc9,0xc9,0xc9,0xc9,0xc8,0xc7,0xc8,0xc8,0xc8,
0xc9,0xc6,0xc6,0xc9,0xc7,0xc6,0xc8,0xc8,0xc7,0xc7,0xc8,0xc9,0xca,0xc8,0xc8,0xc8,
0xc8,0xc9,0xc9,0xc9,0xc9,0xca,0xc9,0xc9,0xc7,0xc7,0xc8,0xc8,0xc8,0xc8,0xc8,0xcb,
0xc9,0xc9,0xc9,0xc8,0xc9,0xc9,0xc9,0xca,0xca,0xc8,0xcc,0xcb,0xca,0xcb,0xcb,0xcb,
0xcc,0xca,0xcc,0xcb,0xcc,0xcd,0xcc,0xcc,0xcd,0xcd,0xcf,0xcc,0xcc,0xcd,0xcd,0xcd,
0xcd,0xcb,0xcc,0xcb,0xcb,0xc4,0x02,0x4f,0x48,0x4b,0x4b,0x4d,0x4d,0x4d,0x4d,0x4e,
0x50,0x51,0x51,0x52,0x53,0x54,0x55,0x58,0x57,0x57,0x56,0x56,0x5b,0x5c,0x51,0x2c,
0xf8,0xd2,0xd2,0xca,0xcf,0xd0,0xce,0xc8,0xd1,0x02,0xe3,0xce,0xd2,0xd5,0xdc,0xe2,
0xe2,0xdc,0xed,0xfe,0x03,0x08,0x0c,0x0f,0x10,0x15,0x19,0x1d,0x23,0x20,0x0c,0xfe,
0xe6,0xe7,0xea,0xef,0xf1,0xf4,0xf4,0xf5,0xf8,0xf9,0xfb,0xfa,0xf8,0xf9,0xfb,0xfd,
0x00,0x01,0x02,0x04,0x07,0x08,0x0a,0x0a,0x08,0x08,0x07,0x07,0x07,0x05,0x06,0x04,
0x02,0x01,0xff,0x80,0x80,0x9e,0x9d,0x9d,0x9e,0x9d,0xc8,0xe0,0xdb,0xd7,0xd6,0xd7,
0xd0,0xc9,0xbd,0xc1,0xc2,0xb0,0xac,0xab,0xa8,0xa8,0xa6,0xa6,0xa6,0xa6,0xa3,0xa3,
0xa1,0x9f,0x9f,0x9e,0x9d,0x9c,0x9c,0x9c,0x9c,0x9b,0x9b,0x9c,0x9d,0x9d,0x9e,0x9f,
0x9b,0x95,0x96,0x97,0x96,0x95,0x96,0x96,0x96,0x95,0x95,0x96,0x96,0x95,0x95,0x94,
0x93,0x94,0x94,0x95,0x96,0x96,0x96,0x96,0x97,0x97,0x97,0x98,0x97,0x97,0x97,0x97,
0x97,0x96,0x95,0x95,0x94,0x92,0x91,0x96,0xa8,0xc9,0xf3,0x15,0x37,0x4c,0x4c,0x49,
0x44,0x44,0x45,0x44,0x43,0x41,0x41,0x40,0x3e,0x3e,0x3c,0x3d,0x3c,0x3a,0x39,0x33,
0x30,0x2a,0x23,0xfa,0xcd,0xbd,0xbc,0xc8,0xe2,0xc1,0x99,0x95,0x96,0x96,0xa2,0x9f,
0x93,0x93,0x95,0x9f,0xa6,0xb4,0xb4,0xaa,0xbd,0xfe,0x02,0xc6,0xc9,0xc9,0xc8,0xc8,
0xc9,0xc9,0xc8,0xc9,0xc9,0xc8,0xc7,0xc7,0xc8,0xc9,0xc9,0xc9,0xc9,0xc8,0xc8,0xca,
0xc9,0xc8,0xc7,0xc6,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc8,0xc7,0xc7,0xc8,0xc8,0xc7,
0xc7,0xc7,0xc8,0xc9,0xc8,0xc8,0xc8,0xc8,0xc6,0xc6,0xc6,0xc7,0xc8,0xc8,0xc7,0xc7,
0xc7,0xc9,0xc7,0xc8,0xc9,0xc8,0xc8,0xc9,0xc9,0xca,0xc9,0xc9,0xcb,0xc8,0xc9,0xca,
0xc9,0xcb,0xca,0xca,0xcb,0xcb,0xcc,0xcb,0xcb,0xcc,0xcc,0xcb,0xcb,0xcb,0xcd,0xcd,
0xcc,0xcc,0xcb,0xcc,0xc9,0xc9,0xca,0xcd,0x36,0x4b,0x48,0x49,0x4c,0x4d,0x4e,0x4e,
0x4e,0x51,0x4e,0x53,0x53,0x54,0x54,0x54,0x57,0x59,0x57,0x59,0x5f,0x58,0x38,0x13,
0xdf,0xba,0xc1,0xce,0xcb,0xca,0xc8,0xc7,0xc7,0xc3,0xc2,0xb5,0xf0,0xcf,0xab,0xb1,
0xb3,0xb5,0xb8,0xba,0xb9,0xba,0xbd,0xc1,0xc7,0xcd,0xd0,0xd5,0xdc,0xe8,0xfd,0x07,
0x02,0xe9,0xe0,0xe3,0xe6,0xe8,0xe9,0xeb,0xe9,0xeb,0xec,0xf0,0xf0,0xf0,0xf1,0xf3,
0xf6,0xf6,0xf5,0xf4,0xf5,0xf8,0xfb,0xfc,0xfe,0x00,0x03,0x04,0x07,0x06,0x07,0x07,
0x07,0x07,0x06,0x02,0x02,0x80,0x80,0x9c,0x9d,0x9d,0x9d,0x9f,0xcd,0xda,0xd6,0xd2,
0xce,0xcb,0xcb,0xdb,0xc5,0xc1,0xb0,0x94,0x96,0x98,0x98,0x9a,0x9c,0x9d,0x9c,0x9e,
0x9d,0x9d,0x9e,0x9f,0xa1,0xa3,0xa3,0xa4,0xa5,0xa3,0xa3,0xa3,0xa3,0xa4,0xa7,0xa6,
0xa4,0xa2,0xa0,0xa0,0xa0,0xa2,0xa1,0xa1,0xa0,0x9f,0x9e,0x9e,0x9e,0x9e,0xa0,0xa2,
0xa3,0xa3,0xa4,0xa4,0xa5,0xa6,0xa5,0xa4,0xa3,0xa2,0xa0,0x9f,0x9e,0x9f,0xa0,0x9e,
0x9e,0x9e,0x9d,0x9d,0x9f,0x9e,0x9e,0x9e,0x9e,0x9e,0x9d,0x9a,0x9f,0xb5,0xd6,0x03,
0x2e,0x44,0x4b,0x4b,0x4a,0x48,0x45,0x43,0x44,0x46,0x42,0x43,0x43,0x41,0x3e,0x3e,
0x3f,0x3b,0x37,0x33,0x2f,0x28,0x03,0xd3,0xbf,0xbe,0xd0,0xec,0xc3,0x9a,0x98,0x96,
0x9a,0xa0,0x99,0x94,0x96,0x96,0x9b,0x98,0xa3,0xad,0xb6,0xde,0xf4,0xc7,0xca,0xc9,
0xc8,0xc8,0xc9,0xc7,0xc8,0xc9,0xc8,0xc8,0xc9,0xc8,0xc7,0xc8,0xc8,0xc8,0xc9,0xc7,
0xc6,0xc8,0xc7,0xc7,0xc7,0xc6,0xc6,0xc8,0xc7,0xc6,0xc7,0xc7,0xc6,0xc6,0xc7,0xc8,
0xc8,0xc7,0xc8,0xc7,0xc8,0xc8,0xc7,0xc8,0xc7,0xc6,0xc7,0xc6,0xc6,0xc7,0xc7,0xc8,
0xc7,0xc5,0xc7,0xc8,0xc6,0xc7,0xc6,0xc7,0xc8,0xc8,0xc9,0xc9,0xc8,0xc9,0xc9,0xc8,
0xc9,0xc9,0xc9,0xcb,0xc9,0xca,0xcc,0xcb,0xcb,0xca,0xcb,0xcc,0xcb,0xcb,0xca,0xca,
0xcd,0xcb,0xcb,0xcb,0xca,0xcb,0xc8,0xc9,0xc3,0x02,0x4b,0x46,0x48,0x4a,0x4b,0x4b,
0x4c,0x4f,0x52,0x51,0x4f,0x53,0x54,0x55,0x55,0x54,0x57,0x5a,0x5f,0x4f,0x0c,0xf1,
0xc5,0xbb,0xb6,0xb6,0xb3,0xb5,0xb2,0xaf,0xae,0xae,0xaf,0xb1,0xb0,0xa4,0xb3,0xe7,
0xc6,0xae,0xb4,0xb4,0xb3,0xb4,0xb4,0xb5,0xb5,0xb5,0xb6,0xb6,0xb8,0xbb,0xbf,0xcd,
0xd8,0xd7,0xdb,0xe2,0xe3,0xe5,0xe7,0xe8,0xe9,0xeb,0xea,0xe9,0xeb,0xee,0xef,0xf1,
0xf0,0xf2,0xf5,0xf4,0xf5,0xf5,0xf5,0xf6,0xf7,0xf5,0xf5,0xf6,0xf6,0xf6,0xf7,0xfb,
0xfb,0xfc,0xfb,0xfa,0xf7,0xf8,0xf9,0x80,0x80,0x9d,0x9d,0x9d,0x9e,0xa5,0xd3,0xd6,
0xd4,0xd3,0xd4,0xd3,0xd2,0xd0,0xcb,0xc8,0xc4,0xc2,0xc1,0xc2,0xc2,0xc2,0xc1,0xbe,
0xbc,0xba,0xb7,0xb8,0xb8,0xb8,0xb7,0xb7,0xb7,0xb7,0xb8,0xb7,0xb5,0xb4,0xb4,0xb4,
0xb2,0xad,0xac,0xac,0xac,0xab,0xab,0xab,0xa9,0xaa,0xa8,0xa6,0xa4,0xa5,0xa4,0xa3,
0xa2,0xa1,0xa2,0xa3,0xa3,0xa3,0xa2,0xa3,0xa4,0xa4,0xa4,0xa5,0xa4,0xa2,0xa1,0xa1,
0xa1,0xa2,0xa3,0xa2,0xa2,0xa2,0xa3,0xa3,0xa2,0xa4,0xa6,0xa8,0xa8,0xa7,0xa5,0xa3,
0xa0,0xa7,0xbb,0xdf,0x08,0x2b,0x3e,0x45,0x4c,0x4d,0x4a,0x47,0x46,0x48,0x47,0x47,
0x43,0x41,0x3f,0x3e,0x3c,0x39,0x34,0x31,0x2c,0x18,0xe9,0xc4,0xbe,0xca,0xd8,0xb0,
0x98,0x9c,0x97,0x99,0x9a,0x9f,0x9c,0x9a,0x94,0x95,0x91,0x98,0xae,0xd2,0xe4,0xc9,
0xcb,0xc9,0xc8,0xc8,0xc8,0xc8,0xc7,0xc8,0xc8,0xc8,0xc8,0xc7,0xc7,0xc5,0xc7,0xc7,
0xc8,0xc7,0xc6,0xc7,0xc6,0xc6,0xc7,0xc6,0xc7,0xc6,0xc5,0xc5,0xc6,0xc6,0xc6,0xc6,
0xc6,0xc8,0xc7,0xc7,0xc6,0xc4,0xc6,0xc6,0xc5,0xc6,0xc7,0xc6,0xc6,0xc6,0xc6,0xc7,
0xc5,0xc7,0xc7,0xc6,0xc7,0xc7,0xc6,0xc6,0xc5,0xc7,0xc8,0xc7,0xc9,0xc8,0xc6,0xc8,
0xc8,0xc8,0xca,0xc8,0xc9,0xc9,0xc8,0xcb,0xca,0xca,0xc9,0xca,0xcb,0xca,0xca,0xca,
0xca,0xca,0xc9,0xca,0xcb,0xca,0xcb,0xc9,0xc8,0xc8,0xd3,0x3b,0x47,0x46,0x47,0x49,
0x4a,0x4c,0x4d,0x4e,0x4f,0x50,0x52,0x53,0x53,0x55,0x56,0x5b,0x5a,0x41,0x0b,0xdd,
0xc8,0xc0,0xc2,0xc0,0xc0,0xc0,0xbf,0xbb,0xba,0xb8,0xb7,0xb6,0xb9,0xbe,0xbf,0xbf,
0xbe,0xcd,0xfe,0xe3,0xca,0xcc,0xce,0xcf,0xd0,0xd1,0xd0,0xd1,0xd5,0xd4,0xd4,0xd7,
0xd9,0xdb,0xe3,0xe7,0xee,0x04,0x08,0x0b,0x0f,0x0f,0x0f,0x11,0x13,0x10,0x0f,0x0d,
0x0b,0x0c,0x0b,0x0a,0x0b,0x08,0x07,0x05,0x03,0x00,0xfc,0xfa,0xff,0x00,0xfe,0xfd,
0xf6,0xf3,0xf2,0xf4,0xf4,0xf3,0xf4,0xf6,0xf8,0x80,0x80,0x9d,0x9d,0x9e,0xa0,0xaa,
0xd1,0xd0,0xd2,0xd2,0xd2,0xd4,0xd6,0xd5,0xd6,0xd3,0xd1,0xd0,0xcc,0xcb,0xca,0xc8,
0xc5,0xc2,0xc1,0xc0,0xc0,0xc3,0xc1,0xc1,0xc0,0xbf,0xbf,0xc0,0xbf,0xc0,0xc5,0xc2,
0xb8,0xaf,0xae,0xae,0xad,0xad,0xae,0xab,0xab,0xad,0xac,0xab,0xa9,0xa8,0xa8,0xa8,
0xa9,0xa6,0xa5,0xa2,0xa1,0xa0,0x9f,0x9f,0x9d,0x9e,0x9f,0xa0,0x9e,0x9b,0x9b,0x9c,
0x9c,0x9a,0x9a,0x9a,0x9a,0x9a,0x9b,0x9b,0x9d,0x9d,0x9e,0x9f,0x9f,0xa0,0xa0,0xa0,
0xa1,0xa2,0xa2,0xa0,0x9e,0x9c,0xa1,0xb9,0xdf,0xcf,0xe4,0x16,0x39,0x4f,0x51,0x4f,
0x4b,0x47,0x43,0x44,0x43,0x41,0x41,0x3d,0x37,0x35,0x32,0x31,0x24,0xff,0xd0,0xbb,
0xb9,0xc1,0xac,0x9a,0x9e,0x9b,0x98,0x9b,0x99,0x96,0x99,0x94,0x92,0x91,0x96,0xcc,
0xe0,0xc9,0xcc,0xc9,0xc7,0xc8,0xc7,0xc8,0xc8,0xc8,0xc7,0xc7,0xc7,0xc6,0xc6,0xc6,
0xc5,0xc8,0xc8,0xc6,0xc7,0xc7,0xc6,0xc7,0xc6,0xc3,0xc5,0xc6,0xc7,0xc5,0xc4,0xc5,
0xc6,0xc7,0xc6,0xc7,0xc5,0xc6,0xc5,0xc4,0xc5,0xc5,0xc6,0xc5,0xc4,0xc5,0xc5,0xc4,
0xc6,0xc5,0xc5,0xc7,0xc6,0xc5,0xc7,0xc7,0xc6,0xc6,0xc5,0xc7,0xc6,0xc6,0xc7,0xc8,
0xc7,0xc8,0xc7,0xc6,0xc8,0xc8,0xc9,0xc8,0xc9,0xc9,0xc9,0xc9,0xc7,0xca,0xca,0xc9,
0xca,0xca,0xca,0xcb,0xc9,0xc9,0xc9,0xc8,0xc9,0xc8,0xc9,0xc1,0x03,0x46,0x43,0x45,
0x47,0x48,0x48,0x4b,0x4a,0x4f,0x4f,0x50,0x54,0x55,0x5b,0x5d,0x50,0x29,0xf8,0xdf,
0xda,0xe4,0xe9,0xed,0xed,0xf0,0xf1,0xef,0xf0,0xef,0xee,0xed,0xeb,0xe9,0xea,0xea,
0xeb,0xe9,0xe9,0xe7,0xec,0x1a,0x16,0xee,0xe9,0xed,0xf0,0xf0,0xf2,0xf8,0xf9,0xf9,
0xf8,0xf8,0xf7,0xfc,0x00,0x01,0x0c,0x15,0x14,0x15,0x1a,0x1c,0x1e,0x21,0x22,0x22,
0x23,0x26,0x27,0x27,0x27,0x28,0x2a,0x2b,0x2c,0x2c,0x2a,0x2b,0x2b,0x28,0x26,0x22,
0x21,0x1c,0x1c,0x1d,0x1d,0x1e,0x1c,0x1b,0x1c,0x1a,0x1a,0x80,
]
filter_data_raw = [
0xf5,0x81,0xa1,0xc6,0xef,0xdf,0x55,0x3b,0xee,0x0f,0x5b,0x28,0x01,0xf1,0xe8,0x12,
0x94,0x20,0x59,0xbf,0x86,0x79,0x7f,0xad,0xe8,0x37,0x1b,0xd7,0x20,0xd4,0xd1,0x1d,
0x85,0x81,0xa2,0xac,0x92,0xab,0xd1,0x01,0xe3,0x19,0x28,0xec,0xe2,0x99,0x91,0x98,
0x4b,0x4b,0xe8,0xd5,0x55,0x7f,0x13,0xdf,0xe4,0xf7,0xde,0xe3,0xcf,0xd6,0xc6,0xe3,
0x17,0x22,0x1f,0x15,0x0c,0xc3,0xdd,0x14,0xf2,0x81,0xaf,0x0e,0x06,0xdc,0xfd,0x21,
0xed,0x64,0x45,0x3e,0x2e,0x1e,0xc0,0xd0,0x34,0xe4,0x81,0xb3,0x43,0x07,0xec,0xdf,
0xe6,0xe9,0xdc,0xe1,0xf9,0x4b,0x2b,0xec,0x06,0x7f,0x58,0xef,0xf0,0x2a,0x02,0xd5,
0x11,0xfc,0x0c,0x21,0xc7,0x8f,0xac,0xfe,0x91,0x81,0x99,0xf4,0xda,0x91,0xc2,0x0c,
0xf0,0x17,0x1a,0xfb,0x56,0x58,0x08,0xf7,0x49,0xf6,0xbd,0x0b,0xc6,0x81,0xbb,0x1c,
0xea,0xf2,0x18,0xd9,0xba,0x81,0xb8,0xca,0x63,0x28,0xd8,0x0e,0x55,0x19,0xdb,0x16,
0x11,0x03,0xa2,0xb2,0x0a,0xdd,0x81,0xae,0x13,0x0d,0x16,0x44,0x24,0x26,0x3e,0x56,
0x10,0x12,0x1c,0x1c,0xb3,0xd8,0x55,0x4b,0x81,0x87,0x34,0x54,0xde,0xb3,0x0a,0x2c,
0xf9,0xdb,0xd7,0x0d,0x48,0x1f,0xa5,0xbc,0x69,0x7f,0xd4,0xa0,0xf3,0x35,0x07,0xdb,
0x11,0x01,0x25,0xf5,0xea,0xe3,0x68,0x7f,0x05,0x9c,0x8f,0xe8,0x21,0x19,0xe1,0xd9,
0x05,0x02,0xef,0xeb,0x04,0xef,0xae,0x9f,0xfa,0xc2,0x81,0xa1,0x02,0xde,0xa1,0xe2,
0x45,0x19,0xfc,0x0d,0x62,0xd4,0x81,0xd8,0x43,0xd2,0x99,0xf9,0x40,0x08,0x11,0x42,
]
output_data_raw = [
0x80,0xa2,0x80,0x82,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x9b,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x91,0x80,0x80,0x87,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8f,0x80,0x80,0x84,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x95,0x80,0x80,0x8b,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x98,0x80,0x80,0x84,0x80,0x80,0x80,0x8b,0x80,0x87,0x80,0x80,0x8d,
0x80,0x80,0x80,0x93,0x88,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x8f,0x88,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8c,0x89,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x88,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8c,0x8b,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8c,0x8a,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x8b,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8d,0x8a,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x88,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x87,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x87,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x89,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x8a,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x88,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x89,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x89,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x92,0x8b,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x89,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x87,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x91,0x89,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x89,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x89,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x87,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x88,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x90,0x8a,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x87,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x88,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x87,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x89,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x88,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x88,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x88,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x88,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x87,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x86,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x86,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x88,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x87,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x88,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x87,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x86,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x8a,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8c,0x8c,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8a,0x8b,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x83,
0xa2,0x80,0x80,0x80,0x9f,0x80,0x80,0x80,0x80,0x80,0xa8,0xc5,0x80,0x80,0x80,0x83,
0x80,0xbe,0x80,0x80,0x80,0x80,0xce,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0xa9,0x80,0x84,0x93,0x80,0x9e,0x80,0x8a,0x80,0x80,0x80,0x80,0xa9,
0x80,0x80,0x80,0x81,0x80,0x80,0xae,0x80,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x81,0x80,0x80,0xae,0x80,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x99,
0x80,0x80,0x80,0x80,0x80,0x80,0xba,0x80,0x80,0x80,0xa8,0x80,0x80,0x80,0x80,0x8f,
0x83,0x80,0x80,0x80,0x80,0x80,0xbf,0x80,0x80,0x80,0xa4,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x83,0x80,0x80,0xb5,0x80,0x80,0x80,0x94,0x80,0x87,0x80,0x80,0x8c,
0x90,0x80,0x80,0x88,0x80,0x80,0xbf,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x80,
0x80,0x95,0x80,0x82,0x80,0x80,0xc8,0x80,0x80,0x80,0x94,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x85,0x80,0x80,0xca,0x80,0x80,0x80,0x86,0x80,0x9c,0x80,0x80,0x8c,
0x80,0x8c,0x80,0xa4,0x80,0x84,0x9f,0x80,0xa4,0x80,0x80,0x80,0x8e,0x80,0x80,0x97,
0x80,0x80,0x80,0xb0,0x80,0x80,0x9d,0x80,0x80,0x80,0xbd,0x80,0x99,0x80,0x80,0xa0,
0x8d,0x80,0x80,0x80,0x80,0x80,0x94,0x80,0x80,0x8a,0xd0,0x80,0x8c,0x80,0x80,0x94,
0x80,0x88,0x80,0x80,0x80,0x80,0x92,0x80,0x80,0x96,0xa1,0x80,0x99,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x80,0x80,0x9b,0x80,0x8a,0x80,0x80,0x90,
0x80,0x80,0x80,0x8a,0x91,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8b,0x80,0x81,
0x80,0x81,0x80,0x89,0x8a,0x80,0x80,0x80,0x80,0x80,0x8f,0x94,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x86,0x80,0x80,0x88,0x80,0x80,0x80,0x84,0x80,0x89,0x80,0x80,0x88,
0x80,0x89,0x80,0x9f,0x8a,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x98,0x98,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x8a,0x8e,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0x80,0xa1,0x91,0x80,0x80,0x80,0x88,
0x92,0x80,0x80,0x80,0x80,0x80,0x9b,0x80,0x80,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,
0x80,0x83,0x80,0x86,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x90,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa4,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x90,0x80,0x80,0xa5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x90,0x80,0x80,0xa5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x90,0x80,0x80,0xa6,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x90,0x80,0x80,0xa6,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x91,0x80,0x80,0xa6,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x91,0x80,0x80,0xa5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x91,0x80,0x80,0xa5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x91,0x80,0x80,0xa5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x92,0x80,0x80,0xa5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x92,0x80,0x80,0xa5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x92,0x80,0x80,0xa4,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x92,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x91,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x91,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x92,0x80,0x80,0xa1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x93,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x96,0x80,0x80,0x9e,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0x93,0x80,0x80,0x99,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x93,0x80,0x80,0x98,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0xb4,0x80,0x8b,0x9e,0x80,0x82,0x80,0x90,0x80,0xb3,0x80,0x80,0x99,
0x80,0x80,0x80,0x96,0x93,0x80,0x80,0x80,0x80,0x80,0x92,0x80,0x83,0x80,0x80,0x92,
0x80,0x80,0x80,0x8e,0x8e,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x90,0x80,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8a,0x92,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x89,0x92,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x88,0x8e,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8a,0x87,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8b,0x8f,0x80,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8b,0x8c,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x87,0x94,0x80,0x80,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x87,
0x80,0x90,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xa5,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x93,0x80,0x80,0x87,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x92,
0x80,0x80,0x80,0x8d,0x80,0x80,0x89,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x88,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x89,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8d,0x80,0x80,0x87,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8d,0x80,0x80,0x8a,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8d,0x80,0x80,0x89,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8d,0x80,0x80,0x89,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8d,0x80,0x80,0x89,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8a,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8c,0x80,0x80,0x8a,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x80,0x80,0x85,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8e,0x80,0x80,0x86,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8d,0x80,0x80,0x86,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8c,0x80,0x80,0x87,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8d,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x91,0x80,0x80,0x87,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x85,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8a,0x80,0x80,0x86,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8c,0x80,0x80,0x86,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8c,0x80,0x80,0x87,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8c,0x80,0x80,0x89,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8d,0x80,0x80,0x8c,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8b,0x80,0x80,0x8a,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8c,0x80,0x80,0x8b,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x89,0x80,0x80,0x8b,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8d,0x80,0x80,0x8c,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8d,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8c,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8d,0x80,0x80,0x8b,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8b,0x80,0x80,0x8a,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x8a,
0x80,0x9a,0x80,0xa4,0x80,0x80,0xa1,0x80,0x80,0x80,0x86,0x80,0x9d,0x80,0x80,0x85,
0x80,0xa0,0x80,0x82,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x98,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8e,0x80,0x80,0x82,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8c,0x80,0x80,0x85,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x93,0x80,0x80,0x87,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x98,0x80,0x80,0x83,0x80,0x80,0x80,0x8b,0x80,0x82,0x80,0x80,0x8c,
0x80,0x80,0x80,0x92,0x88,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x8d,0x89,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x87,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x88,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x88,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x87,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x89,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8c,0x89,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x88,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x8c,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8d,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x8d,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x89,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x89,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8c,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x88,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x89,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x8c,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x92,0x8c,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x91,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x8c,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x8b,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x89,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x8b,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x88,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x89,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x87,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x90,0x88,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x88,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8c,0x8b,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8a,0x8a,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x85,
0x93,0x80,0x80,0x80,0x96,0x80,0x80,0x80,0x80,0x80,0x80,0xdb,0x80,0x83,0x80,0x80,
0x80,0xb2,0x80,0x8f,0x80,0x80,0xb1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8c,0x80,0x80,0xad,0x80,0x80,0x80,0x84,0x8b,0x80,0x80,0x80,0x83,
0x80,0x91,0x80,0x86,0x80,0x80,0xc5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8c,0x80,0x80,0xc2,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0x91,0x80,0x80,0xbe,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x91,
0x80,0x80,0x80,0x99,0x80,0x80,0xad,0x80,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x8a,
0x80,0x80,0x80,0xc0,0x80,0xac,0x95,0x80,0xae,0x80,0x80,0x80,0xa0,0x8f,0x80,0xa0,
0x80,0x80,0x80,0xb3,0xa0,0xa2,0x80,0x80,0xbb,0x80,0x80,0x8b,0x80,0xa5,0x80,0x8d,
0x80,0x80,0x80,0x96,0x86,0x80,0x80,0x80,0x80,0x80,0x80,0xf7,0x80,0x86,0x80,0x80,
0x80,0x80,0x80,0xb3,0x80,0x93,0xc2,0x80,0x80,0x80,0x80,0x80,0xad,0x80,0x80,0x9a,
0x80,0x80,0x80,0x98,0x80,0x80,0x80,0x80,0x89,0x80,0xa7,0x80,0x80,0x80,0x80,0xa8,
0x80,0x99,0x80,0x83,0x80,0x80,0xb8,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x80,
0x88,0x80,0x80,0x80,0x80,0x80,0xa6,0x80,0x80,0x80,0xa1,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x82,0x80,0x80,0xbc,0x80,0x80,0x80,0xc4,0x80,0xb3,0x80,0x80,0x9e,
0x80,0x80,0x80,0x80,0x80,0x80,0x9c,0x80,0x80,0x96,0xba,0x80,0xbd,0x80,0x80,0xa2,
0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x8f,0x9c,0x80,0x89,0x82,0x80,0x96,
0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x80,0x83,0xa8,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x89,0x80,0x80,0x87,0x80,0x80,0x80,0xad,0x80,0x86,0x80,0x80,0x97,
0x80,0x84,0x80,0x8a,0x80,0x80,0x8a,0x80,0x80,0x8a,0x96,0x80,0x92,0x80,0x80,0x8e,
0x80,0x80,0x80,0x8d,0x92,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x89,
0x80,0x81,0x80,0x83,0x8e,0x80,0x80,0x80,0x80,0x80,0x95,0x84,0x80,0x80,0x80,0x84,
0x8b,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x9c,0xa2,0x80,0x80,0x80,0x80,
0x80,0x9a,0x80,0x80,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x90,0x80,0x80,0x9f,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x90,0x80,0x80,0x9f,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x80,0x80,0x9f,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa4,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x90,0x80,0x80,0xa4,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x90,0x80,0x80,0xa4,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x91,0x80,0x80,0xa5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x90,0x80,0x80,0xa5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x91,0x80,0x80,0xa5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x91,0x80,0x80,0xa4,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x92,0x80,0x80,0xa4,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x92,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x91,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x91,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x91,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x91,0x80,0x80,0xa1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x92,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x92,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x94,0x80,0x80,0x9d,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0x91,0x80,0x80,0x99,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x93,0x80,0x80,0x98,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0xad,0x80,0x8a,0x9a,0x80,0x80,0x80,0x9b,0x80,0xb7,0x80,0x80,0x9e,
0x80,0x80,0x80,0x8f,0x95,0x80,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x92,
0x80,0x80,0x80,0x90,0x8f,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x92,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x92,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x89,0x8f,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x89,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8f,0x85,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8c,0x8c,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8c,0x87,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x86,0x8d,0x80,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x86,
0x80,0x90,0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x9a,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x94,0x80,0x80,0x87,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x90,0x80,0x80,0x8a,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8d,0x80,0x80,0x89,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x89,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8a,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x88,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x80,0x80,0x8b,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x91,0x80,0x80,0x86,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8a,0x80,0x80,0x85,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x86,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x86,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8d,0x80,0x80,0x87,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x86,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8d,0x80,0x80,0x86,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8c,0x80,0x80,0x85,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8a,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8b,0x80,0x80,0x84,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8a,0x80,0x80,0x8e,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8d,0x80,0x80,0x8a,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8d,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8b,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8b,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x80,0x80,0x84,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8d,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8e,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x88,
0x80,0x96,0x80,0xa6,0x80,0x80,0xa6,0x80,0x80,0x80,0x89,0x80,0xa4,0x80,0x80,0x86,
0x80,0x9f,0x80,0x82,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x96,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8c,0x80,0x80,0x83,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x90,0x80,0x80,0x87,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x97,0x80,0x80,0x89,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x97,0x80,0x80,0x81,0x80,0x80,0x80,0x8b,0x80,0x83,0x80,0x80,0x8d,
0x80,0x80,0x80,0x92,0x88,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x88,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x87,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x87,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x88,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x88,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x88,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x88,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x88,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x85,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x90,0x8e,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8d,0x88,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x89,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x8b,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x88,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x8e,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x89,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x88,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x8c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x88,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x87,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x87,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x88,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x86,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x89,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x8d,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8a,0x92,0x80,0x80,0x80,0x80,0x80,0x93,0x84,0x80,0x80,0x80,0x87,
0x96,0x80,0x80,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0xd6,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8e,0x80,0x80,0xb9,0x80,0x80,0x80,0x82,0x80,0x82,0x80,0x80,0x89,
0x80,0x80,0x80,0x88,0x80,0x8f,0x8b,0x80,0x87,0x80,0x80,0x80,0x80,0x85,0x80,0x99,
0x80,0x80,0x80,0x9f,0x80,0x82,0x8b,0x80,0x80,0x80,0x80,0x8f,0x80,0xb8,0x80,0x8a,
0x80,0x80,0x80,0xc0,0x80,0x89,0x99,0x80,0xa8,0x80,0x80,0x80,0x80,0xa4,0x80,0x87,
0x80,0x80,0x80,0xd5,0x80,0x88,0x98,0x80,0xbe,0x80,0x80,0x80,0x80,0xa6,0x80,0x86,
0x80,0x85,0x80,0xc8,0x80,0x80,0x99,0x80,0xc5,0x80,0x80,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0xc3,0x80,0xa0,0x83,0x80,0xa3,0x80,0x86,0x80,0xb8,0x80,0x80,0xab,
0x80,0x80,0x80,0x95,0xa6,0x80,0x80,0x80,0x82,0x80,0x8b,0x87,0x80,0x80,0x80,0x91,
0x8a,0x81,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x80,0x80,0xff,0x80,0x89,0x80,0x80,
0x80,0x89,0x80,0xae,0x80,0x84,0xc9,0x80,0x80,0x80,0x92,0x80,0xaa,0x80,0x80,0x99,
0x80,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x81,0x80,0x80,0x86,0x80,0x96,
0x80,0x89,0x80,0xa1,0x80,0x80,0xac,0x80,0x83,0x80,0x80,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x80,0x80,0x80,0x9f,0x80,0x80,0x80,0x80,0xa4,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x9a,0x80,0x80,0xbb,0x80,0x80,0x80,0x95,0x80,0x80,0x80,0x80,0x92,
0x80,0x80,0x80,0x9c,0x80,0x80,0xc7,0x80,0x80,0x80,0xad,0x80,0xbc,0x80,0x80,0x99,
0x80,0x80,0x80,0x95,0x80,0x8c,0x8c,0x80,0x80,0x8c,0xa1,0x80,0xc3,0x80,0x80,0xa7,
0x8f,0x81,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x80,0x80,0xb8,0x80,0x96,0x80,0x80,
0x8b,0x86,0x80,0x8d,0x80,0x80,0xb0,0x80,0x80,0x80,0x94,0x83,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x98,0x80,0x92,0x9d,0x80,0x80,0x8a,0xa9,0x80,0xd4,0x80,0x80,0xa6,
0x80,0x80,0x80,0x85,0x90,0x80,0x80,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x88,
0x89,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x80,0xa5,0x9f,0x80,0x80,0x80,0x81,
0x80,0x91,0x80,0x80,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8c,0x80,0x80,0x9e,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8f,0x80,0x80,0x9e,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x8f,0x80,0x80,0x9e,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x80,0x80,0x9f,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x8f,0x80,0x80,0x9f,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x90,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x90,0x80,0x80,0xa4,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x90,0x80,0x80,0xa5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x90,0x80,0x80,0xa4,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x91,0x80,0x80,0xa4,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x91,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x91,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x92,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x91,0x80,0x80,0xa1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x90,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x90,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x91,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x91,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x93,0x80,0x80,0x9e,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x94,0x80,0x80,0x9c,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x92,0x80,0x80,0x9a,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x92,0x80,0x80,0x98,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0xa1,0x80,0x80,0xa3,0x80,0x80,0x80,0xad,0x80,0x91,0x80,0x80,0x94,
0x80,0x80,0x80,0x82,0x80,0x80,0x89,0x80,0x80,0x8c,0xa3,0x80,0xb5,0x80,0x80,0x9c,
0x80,0x80,0x80,0x8c,0x91,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x91,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8c,0x92,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x89,0x8e,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x81,
0x80,0x80,0x80,0x8b,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x85,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8c,0x8d,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8d,0x87,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x89,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x85,0x80,0x88,0x8a,0x80,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x8e,0x80,0x80,
0x80,0x80,0x80,0x9a,0x85,0x80,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x90,0x80,0x80,0x8a,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x91,0x80,0x80,0x85,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8e,0x80,0x80,0x85,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x88,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8b,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x87,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8a,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8d,0x80,0x80,0x85,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8c,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x90,0x80,0x80,0x87,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x88,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8d,0x80,0x80,0x8a,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8d,0x80,0x80,0x85,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x8b,0x80,0x80,0x89,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x91,0x80,0x80,0x87,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8e,0x80,0x80,0x85,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8d,0x80,0x80,0x88,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8c,0x80,0x80,0x88,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8a,0x80,0x80,0x8a,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8c,0x80,0x80,0x87,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x88,0x80,0x80,0x85,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x86,
0x80,0x82,0x80,0x92,0x80,0x80,0x95,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x90,0x80,0x80,0x89,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x90,0x80,0x80,0x87,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x90,0x80,0x80,0x88,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x91,0x80,0x80,0x8a,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x87,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x91,0x80,0x80,0x8d,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8b,0x80,0x80,0x8c,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8d,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8a,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x9a,0x80,0xa8,0x80,0x80,0xa4,0x80,0x80,0x80,0x87,0x80,0xa0,0x80,0x80,0x86,
0x80,0xa0,0x80,0x84,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x96,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8f,0x80,0x80,0x84,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x91,0x80,0x80,0x84,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x96,0x80,0x80,0x83,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x98,0x80,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x81,0x80,0x80,0x8c,
0x80,0x80,0x80,0x90,0x87,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x90,0x89,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x88,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x89,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x8b,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8d,0x8b,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8c,0x8d,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x87,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8e,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x8c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8c,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x88,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x8c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x89,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x8b,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x8c,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x8b,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x88,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x91,0x8a,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8d,0x8c,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8d,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x80,0xa3,0x80,0x80,0x80,0x82,0x80,0x96,0x97,0x80,0x80,0x80,0x8c,
0x87,0x8f,0x80,0x80,0x80,0x80,0x9b,0x80,0x80,0x80,0x80,0xcc,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x9a,0x80,0x86,0x9e,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0xa1,
0x80,0x80,0x80,0x8a,0x80,0x80,0xa9,0x80,0x80,0x80,0x94,0x84,0x80,0x80,0x80,0x88,
0x80,0x81,0x80,0x90,0x80,0x80,0xc1,0x80,0x80,0x80,0x86,0x80,0xac,0x80,0x80,0x8f,
0x80,0x80,0x80,0x9e,0x80,0x94,0x89,0x80,0x86,0x80,0x80,0x80,0x91,0x82,0x80,0x9d,
0x80,0x80,0x80,0xad,0x9b,0xa5,0x80,0x80,0x98,0x80,0x80,0x80,0x91,0x80,0x80,0xa3,
0x80,0x80,0x80,0x87,0x9f,0x80,0x80,0x80,0x80,0x80,0x80,0xaf,0x80,0x82,0x80,0x80,
0x80,0x80,0x80,0xab,0x80,0x80,0x87,0x80,0x80,0x80,0x9a,0x80,0x9d,0x80,0x80,0x9c,
0x88,0x80,0x80,0x80,0xa9,0x80,0x80,0x80,0x80,0x80,0xb6,0xa3,0x80,0x80,0x80,0x92,
0x9a,0x99,0x80,0x80,0x80,0x80,0xad,0x80,0x80,0x80,0x80,0xcb,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0xae,0x80,0x8c,0xc1,0x80,0x80,0x80,0x8c,0x80,0xa9,0x80,0x80,0x9f,
0x80,0x80,0x80,0x88,0x80,0x80,0x8e,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x9b,
0x80,0x80,0x80,0x97,0x80,0x80,0xa1,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x8d,
0x80,0x8c,0x80,0x8e,0x80,0x80,0x9c,0x80,0x87,0x80,0x80,0x90,0x80,0x95,0x80,0x80,
0x80,0x80,0x80,0xb2,0x80,0x80,0xa6,0x80,0xb0,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,
0x80,0x90,0x80,0xb8,0x80,0x80,0xc1,0x80,0x9d,0x80,0x82,0x80,0x88,0x80,0x80,0x88,
0x80,0x80,0x80,0xac,0x80,0x84,0xa1,0x80,0x85,0x80,0xaf,0x80,0xda,0x80,0x80,0xad,
0x80,0x80,0x80,0x80,0x9e,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x8f,
0x80,0x96,0x80,0x82,0x8f,0x80,0x80,0x80,0x80,0x80,0x80,0xc0,0x80,0xa0,0x80,0x80,
0x80,0x80,0x80,0xc5,0x80,0x80,0xa7,0x80,0x88,0x80,0x9b,0x80,0xb8,0x80,0x80,0x9b,
0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x80,0xa9,0x85,0x80,0x80,0x80,0x90,
0x8d,0x80,0x80,0x80,0x80,0x80,0x9a,0x80,0x80,0x80,0x84,0x95,0x80,0x80,0x80,0x80,
0x80,0x84,0x80,0x85,0x80,0x80,0x9f,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x80,0x80,0x9c,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x8f,0x80,0x80,0x9d,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x8f,0x80,0x80,0x9e,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8e,0x80,0x80,0x9e,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x8e,0x80,0x80,0x9f,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x90,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x90,0x80,0x80,0xa4,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x91,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x91,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x91,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x91,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x91,0x80,0x80,0xa1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x91,0x80,0x80,0xa1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x90,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x90,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x91,0x80,0x80,0xa1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x91,0x80,0x80,0x9f,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x92,0x80,0x80,0x9e,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x92,0x80,0x80,0x9d,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x93,0x80,0x80,0x9b,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x92,0x80,0x80,0x99,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x92,0x80,0x80,0x98,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x93,0x80,0x80,0x96,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x9e,0x80,0x80,0xa2,0x80,0x80,0x80,0xb0,0x80,0x99,0x80,0x80,0x94,
0x80,0x80,0x80,0x80,0x80,0x80,0x83,0x80,0x80,0x90,0xa1,0x80,0xae,0x80,0x80,0x9a,
0x80,0x80,0x80,0x8a,0x93,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8c,0x92,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x89,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x81,
0x80,0x80,0x80,0x8c,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x88,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8c,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x87,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8a,0x89,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x84,0x86,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x85,
0x80,0x80,0x80,0x96,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8e,0x80,0x80,0x84,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8c,0x80,0x80,0x8a,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x89,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8d,0x80,0x80,0x8c,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8c,0x80,0x80,0x87,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x8c,0x80,0x80,0x8e,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8c,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x8d,0x80,0x80,0x89,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8c,0x80,0x80,0x8a,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8b,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8b,0x80,0x80,0x88,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8c,0x80,0x80,0x89,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x88,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x91,0x80,0x80,0x87,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8d,0x80,0x80,0x86,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8d,0x80,0x80,0x85,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x92,0x80,0x80,0x90,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8b,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8b,0x80,0x80,0x84,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x93,0x80,0x80,0x8c,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x93,0x80,0x80,0x89,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x89,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x90,0x80,0x80,0x89,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8c,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8d,0x80,0x80,0x8a,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8e,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8a,0x80,0x80,0x8c,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x89,
0x80,0x97,0x80,0xa7,0x80,0x80,0xa7,0x80,0x80,0x80,0x88,0x80,0xa5,0x80,0x80,0x86,
0x80,0x9c,0x80,0x84,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x95,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8f,0x80,0x80,0x83,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x92,0x80,0x80,0x83,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x94,0x80,0x80,0x82,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x96,0x82,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x91,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x88,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x87,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x90,0x8a,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x8a,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x87,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8d,0x89,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8c,0x8b,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x8b,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x8c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x8b,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8c,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x8d,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x89,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x88,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x89,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x87,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x88,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x85,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8a,0x82,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x89,0x82,0x80,0x80,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x84,
0x8f,0x80,0x80,0x80,0x98,0x80,0x80,0x80,0x80,0x80,0x9a,0xa7,0x80,0x80,0x80,0x86,
0x8d,0xbc,0x80,0x80,0x80,0x80,0xbd,0x80,0x80,0x80,0x80,0xc2,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x81,0x80,0x80,0xbc,0x80,0x80,0x80,0xaf,0x80,0x95,0x80,0x80,0xa5,
0x80,0x80,0x80,0x80,0x80,0x80,0xb5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0xa5,0x80,0x80,0xa1,0x80,0x80,0x80,0x94,0x80,0x87,0x80,0x80,0xa3,
0x80,0x80,0x80,0x93,0x80,0x80,0x9a,0x80,0x80,0x80,0xb0,0x80,0xa6,0x80,0x80,0xa6,
0x80,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0xbc,0x80,0x86,0x80,0x80,0x9b,
0x80,0xa1,0x80,0x80,0x80,0x80,0x99,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x9e,0x8c,0x80,0x80,0x80,0x9a,0x80,0xb6,0x80,0x80,0x80,0x80,0xa4,
0xaa,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0xaa,0xb5,0x80,0x80,0x80,0x80,
0x80,0xbb,0x80,0x80,0x80,0x80,0xc3,0x80,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0xaa,0x80,0x80,0xbc,0x80,0x80,0x80,0x97,0x80,0x9f,0x80,0x80,0xa2,
0x80,0x80,0x80,0x8b,0x80,0x80,0xab,0x80,0x80,0x80,0x80,0x80,0x81,0x80,0x80,0x8b,
0x80,0x80,0x80,0xa3,0x80,0x8a,0x96,0x80,0x92,0x80,0x80,0x80,0x90,0x80,0x80,0x96,
0x80,0x80,0x80,0xa5,0x9d,0xbc,0x80,0x80,0x98,0x80,0x80,0x80,0x8e,0x92,0x80,0xa6,
0x80,0x80,0x80,0x9b,0xa2,0x80,0x80,0x80,0x80,0x80,0x80,0xb9,0x80,0x96,0x80,0x80,
0x80,0x80,0x80,0xbb,0x9e,0xa4,0x80,0x80,0xaa,0x80,0x80,0x80,0x80,0xbd,0x80,0x92,
0x80,0x80,0x80,0xd4,0x82,0x80,0x83,0x80,0xa4,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x93,0x87,0x80,0x80,0x80,0x89,0x80,0x88,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x80,0x80,0x9f,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0xa7,0x80,0x80,0x9a,0x80,0x80,0x80,0xa0,0x80,0x96,0x80,0x80,0x95,
0x85,0x80,0x80,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x94,0x93,0x80,0x80,0x80,0x81,
0x80,0x93,0x80,0x80,0x80,0x80,0x9d,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8e,0x80,0x80,0x9b,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x8e,0x80,0x80,0x9c,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x8e,0x80,0x80,0x9d,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x8e,0x80,0x80,0x9e,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x8e,0x80,0x80,0x9f,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x8e,0x80,0x80,0x9f,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8e,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8e,0x80,0x80,0xa1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x90,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x90,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x91,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x91,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x91,0x80,0x80,0xa1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x91,0x80,0x80,0xa1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x90,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x90,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x90,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x91,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x91,0x80,0x80,0x9f,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x92,0x80,0x80,0x9e,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x92,0x80,0x80,0x9d,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x93,0x80,0x80,0x9a,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x91,0x80,0x80,0x98,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x91,0x80,0x80,0x97,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x91,0x80,0x80,0x96,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x93,0x80,0x80,0x95,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x9d,0x80,0x80,0xa1,0x80,0x80,0x80,0xb0,0x80,0x9f,0x80,0x80,0x94,
0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x90,0x9d,0x80,0xa5,0x80,0x80,0x97,
0x80,0x80,0x80,0x88,0x96,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x89,0x87,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x81,
0x80,0x80,0x80,0x8c,0x87,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x87,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8c,0x88,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x88,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x88,0x87,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x90,0x80,0x80,0x86,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x85,0x85,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x86,
0x80,0x80,0x80,0x90,0x80,0x80,0x87,0x80,0x80,0x80,0x82,0x85,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8c,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8d,0x80,0x80,0x8b,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8b,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8a,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8c,0x80,0x80,0x8d,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x91,0x80,0x80,0x8d,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8a,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x90,0x80,0x80,0x8b,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x89,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x90,0x80,0x80,0x8d,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x92,0x80,0x80,0x89,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x90,0x80,0x80,0x84,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x8d,0x80,0x80,0x85,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8e,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8c,0x80,0x80,0x85,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x8d,0x80,0x80,0x88,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x92,0x80,0x80,0x87,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x89,0x80,0x80,0x85,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8d,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x88,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8d,0x80,0x80,0x86,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x86,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8c,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8b,0x80,0x80,0x8b,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8e,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8c,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x8a,
0x80,0x9b,0x80,0xab,0x80,0x80,0xa8,0x80,0x80,0x80,0x86,0x80,0xa2,0x80,0x80,0x84,
0x80,0x9a,0x80,0x82,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8f,0x80,0x80,0x82,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x91,0x80,0x80,0x82,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x94,0x80,0x80,0x81,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x95,0x83,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x90,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x8c,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x8b,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x8d,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x89,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x89,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x88,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x92,0x86,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8f,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x93,0x90,0x80,0x80,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x93,0x92,0x80,0x80,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x80,0xa8,0x80,0x80,0x80,0x80,0x80,0x80,0xb1,0x80,0x8e,0x80,0x85,
0x80,0xb6,0x80,0x80,0x80,0x80,0xa5,0x80,0x80,0x80,0x80,0xec,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x94,0x80,0x80,0xbf,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x9b,
0x80,0x80,0x80,0x96,0x80,0x80,0xcd,0x80,0x80,0x80,0x90,0x80,0x8c,0x80,0x80,0x94,
0x80,0x80,0x80,0x88,0x80,0x80,0xae,0x80,0x80,0x80,0xa6,0x80,0x88,0x80,0x80,0xa2,
0x82,0x83,0x80,0x82,0x80,0x80,0xc5,0x80,0x80,0x80,0xb3,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x80,0x80,0x80,0xbf,0x80,0x80,0x80,0xca,0x80,0xaa,0x80,0x80,0x9c,
0x80,0x80,0x80,0x80,0x80,0x80,0xaa,0x80,0x80,0x94,0xcf,0x80,0xad,0x80,0x80,0xa2,
0x90,0x80,0x80,0x80,0x80,0x80,0x82,0x80,0x80,0x82,0xc9,0x80,0x80,0x80,0x80,0x9a,
0x80,0xa5,0x80,0x80,0x80,0x80,0xc8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8e,0x80,0x80,0xb0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x9d,0x80,0x80,0xb5,0x80,0x80,0x80,0x96,0x80,0x80,0x80,0x80,0x98,
0x80,0x83,0x80,0x9a,0x80,0x89,0xba,0x80,0x80,0x80,0x87,0x80,0xb3,0x80,0x80,0x9b,
0x80,0x80,0x80,0xa1,0x80,0x80,0x87,0x80,0x80,0x80,0x87,0x80,0x80,0x86,0x80,0x98,
0x80,0x80,0x80,0xa2,0x80,0x80,0x91,0x80,0x83,0x80,0xa8,0x80,0x9e,0x80,0x80,0x98,
0x80,0xa7,0x80,0x82,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0xa7,0x94,0x80,0x80,0x80,0x92,0x80,0x8c,0x80,0x84,0x80,0x80,0x95,
0x80,0x80,0x80,0x8c,0x8f,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x87,0x98,0x80,0x80,0x80,0x80,0x80,0x88,0x88,0x80,0x80,0x80,0x88,
0x83,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x80,0x82,0xaf,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8d,0x80,0x80,0x9f,0x80,0x80,0x80,0xaf,0x80,0x8c,0x80,0x80,0x93,
0x80,0x87,0x80,0x80,0x80,0x80,0x9f,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x91,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x9d,0x80,0x80,0x9a,0x80,0x96,0x80,0x80,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x92,0x80,0x80,0x98,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8b,0x80,0x80,0xa0,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x8d,0x80,0x80,0x9d,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8d,0x80,0x80,0x9f,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8e,0x80,0x80,0x9f,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8e,0x80,0x80,0xa0,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8e,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8e,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x90,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x90,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x91,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x91,0x80,0x80,0xa1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x90,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x91,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x90,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x90,0x80,0x80,0x9f,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x91,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x91,0x80,0x80,0x9f,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x92,0x80,0x80,0x9d,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x91,0x80,0x80,0x9d,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x92,0x80,0x80,0x9c,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x92,0x80,0x80,0x9a,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x91,0x80,0x80,0x98,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x91,0x80,0x80,0x96,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x92,0x80,0x80,0x97,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x91,0x80,0x80,0x93,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x95,0x80,0x80,0x93,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0xa0,0x80,0x80,0xa0,0x80,0x80,0x80,0xa2,0x80,0xa6,0x80,0x80,0x90,
0x80,0x80,0x80,0x82,0x89,0x80,0x80,0x80,0x80,0x80,0x92,0x80,0x86,0x80,0x80,0x8f,
0x80,0x80,0x80,0x8b,0x88,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8e,0x87,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x87,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x86,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8d,0x88,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x88,0x83,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8b,0x80,0x80,0x81,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x80,0x80,0x86,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x84,0x85,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x85,
0x80,0x80,0x80,0x99,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x84,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8a,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x80,0x80,0x8b,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x90,0x80,0x80,0x8a,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8b,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8b,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x94,0x80,0x80,0x8d,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x86,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x91,0x80,0x80,0x8b,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x92,0x80,0x80,0x88,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x90,0x80,0x80,0x8a,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x88,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8c,0x80,0x80,0x84,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8d,0x80,0x80,0x86,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8b,0x80,0x80,0x86,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8a,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x89,0x80,0x80,0x8b,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8a,0x80,0x80,0x8b,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x94,0x80,0x80,0x8f,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x8a,0x80,0x80,0x88,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8b,0x80,0x80,0x8d,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x89,0x80,0x80,0x8c,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8a,0x80,0x80,0x8d,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8a,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8c,0x80,0x80,0x8a,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8e,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8c,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x8b,
0x80,0x9a,0x80,0xa6,0x80,0x80,0xa7,0x80,0x80,0x80,0x89,0x80,0xa1,0x80,0x80,0x85,
0x80,0x9f,0x80,0x85,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x95,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x90,0x80,0x80,0x82,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x94,0x80,0x80,0x81,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x95,0x84,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x90,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x89,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x89,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8d,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x8e,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x8c,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8d,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x8d,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x8a,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x8b,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8d,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8d,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8d,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x8c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8c,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8c,0x8c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x8c,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x92,0x89,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x91,0x8e,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x8c,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8b,0x8b,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x80,0x80,0xa0,0x80,0x8d,0x80,0x85,
0x80,0xa7,0x80,0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0xff,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x97,0x80,0x80,0xc1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x99,
0x80,0x80,0x80,0xa0,0x80,0x80,0xbc,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0x99,0x80,0x80,0xb7,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8b,0x80,0x80,0xb2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x90,0x80,0x80,0xb8,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x8d,0x80,0x80,0xc5,0x80,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x8e,
0x82,0x80,0x80,0x80,0x80,0x80,0xc7,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x89,
0x80,0x8b,0x80,0x87,0x80,0x80,0xbd,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x86,0x80,0x80,0xb4,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x82,0x80,0x80,0xb6,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0x9e,0x80,0x80,0xbe,0x80,0x80,0x80,0xbb,0x80,0xa4,0x80,0x80,0xa9,
0x80,0x80,0x80,0x80,0x80,0x80,0xa7,0x80,0x80,0x80,0xcd,0x80,0x97,0x80,0x80,0xa5,
0x80,0x80,0x80,0x80,0x80,0x80,0xa0,0x80,0x80,0x91,0xcc,0x80,0xaa,0x80,0x80,0xa5,
0x80,0x80,0x80,0x80,0x80,0x97,0x80,0x80,0x80,0xa3,0xb4,0x80,0xa8,0x80,0x80,0xab,
0x80,0x80,0x80,0x80,0x98,0x80,0x80,0x80,0x80,0x81,0x9c,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x80,0x9e,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,0x87,0xbf,0x80,0x8e,0x80,0x85,
0x80,0x8e,0x80,0x95,0x80,0x80,0xce,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x90,0x80,0xb5,0x80,0x9d,0x99,0x80,0xc2,0x80,0x80,0x80,0x9c,0x9d,0x80,0x8a,
0x80,0x80,0x80,0xca,0xa0,0xa1,0x80,0x80,0xbd,0x80,0x80,0x80,0x80,0x9f,0x80,0x91,
0x80,0x80,0x80,0xb5,0xb4,0x80,0x80,0x80,0xa6,0x80,0x80,0x9f,0x80,0xaa,0x80,0x89,
0x80,0x80,0x80,0xac,0x92,0x80,0x80,0x80,0x96,0x80,0x80,0xb3,0x80,0xb1,0x80,0x80,
0x80,0x80,0x80,0xb1,0x80,0x80,0x84,0x80,0xaa,0x80,0x80,0x95,0x80,0x84,0x80,0x85,
0x80,0x80,0x80,0x90,0x80,0x80,0x9a,0x80,0x80,0x80,0x83,0x8b,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x86,0x80,0x80,0xa6,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0x88,0x80,0x80,0xa2,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0x8c,0x80,0x80,0xa1,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x8e,0x80,0x80,0xa1,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x8e,0x80,0x80,0xa1,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8e,0x80,0x80,0xa2,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8e,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x90,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x90,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x91,0x80,0x80,0xa1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x91,0x80,0x80,0xa1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x91,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x90,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x90,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x90,0x80,0x80,0x9e,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x90,0x80,0x80,0x9f,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x91,0x80,0x80,0x9e,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x92,0x80,0x80,0x9d,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x91,0x80,0x80,0x9c,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x92,0x80,0x80,0x9c,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x92,0x80,0x80,0x9a,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x92,0x80,0x80,0x99,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x91,0x80,0x80,0x97,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x90,0x80,0x80,0x96,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x91,0x80,0x80,0x95,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x92,0x80,0x80,0x93,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x91,0x80,0x80,0x91,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x8d,
0x80,0x82,0x80,0xa1,0x80,0x80,0x96,0x80,0x80,0x80,0x88,0x80,0x93,0x80,0x80,0x8d,
0x80,0x80,0x80,0x96,0x8d,0x80,0x80,0x80,0x81,0x80,0x90,0x80,0x84,0x80,0x80,0x95,
0x80,0x80,0x80,0x8c,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8e,0x85,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x87,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x88,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8c,0x88,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8a,0x84,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8b,0x80,0x80,0x84,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8c,0x80,0x80,0x83,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8b,0x80,0x80,0x80,0x92,0x80,0x81,0x80,0x80,0x8b,
0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8c,0x80,0x80,0x91,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x98,0x82,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x8a,0x80,0x8b,
0x80,0x80,0x80,0xa0,0x87,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x89,0x80,0x85,
0x80,0x80,0x80,0xa0,0x88,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x8b,0x80,0x85,
0x80,0x80,0x80,0xa1,0x87,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x89,0x80,0x85,
0x80,0x80,0x80,0xa1,0x86,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x8c,0x80,0x84,
0x80,0x80,0x80,0xa4,0x86,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x8a,0x80,0x85,
0x80,0x80,0x80,0xa2,0x83,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x87,0x80,0x84,
0x80,0x80,0x80,0xa2,0x85,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x86,0x80,0x85,
0x80,0x80,0x80,0x9f,0x85,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x87,0x80,0x84,
0x80,0x80,0x80,0xa0,0x83,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x85,0x80,0x83,
0x80,0x80,0x80,0xa0,0x83,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x82,0x80,0x86,
0x80,0x80,0x80,0x9d,0x83,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,0x80,0x83,
0x80,0x80,0x80,0xa0,0x83,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x82,0x80,0x85,
0x80,0x80,0x80,0x9a,0x83,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x99,0x80,0x80,0x85,0x80,0x82,0x80,0x80,0x80,0x80,0x82,0x80,0x80,
0x80,0x80,0x80,0xa5,0x80,0x80,0x88,0x80,0x8e,0x80,0x80,0x80,0x80,0x90,0x80,0x80,
0x80,0x80,0x80,0xb2,0x86,0x80,0x80,0x80,0xaf,0x80,0x80,0x83,0x80,0x8e,0x80,0x80,
0x80,0x83,0x80,0xb2,0x81,0x80,0x82,0x80,0xae,0x80,0x80,0x89,0x80,0x8e,0x80,0x80,
0x80,0x80,0x80,0xb4,0x83,0x80,0x80,0x80,0xb1,0x80,0x80,0x80,0x80,0x85,0x80,0x80,
0x80,0x80,0x80,0xb0,0x80,0x80,0x85,0x80,0xaa,0x80,0x80,0x81,0x80,0x82,0x80,0x80,
0x80,0x80,0x80,0xae,0x80,0x80,0x85,0x80,0xaa,0x80,0x80,0x80,0x80,0x81,0x80,0x80,
0x80,0x80,0x80,0xa7,0x80,0x80,0x8a,0x80,0xa5,0x80,0x80,0x86,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0xad,0x80,0x80,0x8d,0x80,0xaf,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0xa9,0x80,0x80,0x8c,0x80,0xa5,0x80,0x80,0x81,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0xad,0x80,0x80,0x8d,0x80,0xaa,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0xa7,0x80,0x80,0x8b,0x80,0xa2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0xa5,0x80,0x80,0x8b,0x80,0xa1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0xa6,0x80,0x80,0x8e,0x80,0x9e,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0xa5,0x80,0x80,0x8e,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0xa9,0x80,0xba,0x80,0x80,0xa7,0x80,0x99,0x80,0x80,0x80,0x99,0x80,0x80,0x80,
0x80,0x9c,0x80,0x84,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x91,0x80,0x80,0x81,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x94,0x80,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x95,0x87,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x8c,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8e,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x8c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x8c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x8c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8d,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8d,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8d,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8d,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x8c,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x8d,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x8d,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x8c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x89,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x8c,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x89,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x8d,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8c,0x8d,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x90,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x88,
0x86,0x80,0x80,0x80,0xac,0x80,0x80,0x80,0x80,0x80,0xb3,0xb7,0x80,0x80,0x80,0x92,
0x90,0xa1,0x80,0x80,0x80,0x80,0xb7,0x80,0x80,0x80,0x80,0xd5,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x98,0x80,0x81,0xc8,0x80,0x80,0x80,0x82,0x80,0x93,0x80,0x80,0x9f,
0x80,0x80,0x80,0x99,0x80,0x80,0xaf,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x97,
0x80,0x80,0x80,0x98,0x80,0x80,0xa7,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x8f,0x80,0x80,0xab,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0x8a,0x80,0x80,0xb5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x90,0x80,0x80,0xb5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0x94,0x80,0x80,0xb5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x95,0x80,0x80,0xb4,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x94,0x80,0x80,0xb9,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0xa2,0x80,0x80,0xbf,0x80,0x87,0x80,0x80,0x80,0x80,0x86,0x80,0x87,
0x80,0x80,0x80,0xa8,0x80,0x80,0xb8,0x80,0x98,0x80,0x80,0x82,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x86,0x80,0x80,0xc7,0x80,0x80,0x80,0x94,0x80,0x80,0x80,0x80,0x90,
0x81,0x80,0x80,0x8b,0x80,0x80,0xd1,0x80,0x80,0x80,0xa8,0x80,0x80,0x80,0x80,0x8b,
0x8f,0x80,0x80,0x88,0x80,0x80,0xdb,0x80,0x80,0x80,0xdf,0x80,0xbd,0x80,0x80,0x9d,
0x8d,0x80,0x80,0x80,0x80,0x80,0xaf,0x80,0x80,0x9f,0xe7,0x80,0xaf,0x80,0x80,0xa3,
0x80,0x84,0x80,0x80,0x80,0x80,0xa5,0x80,0x80,0x96,0xc6,0x80,0x94,0x80,0x80,0x94,
0x86,0x80,0x80,0x80,0x80,0x80,0xa3,0x80,0x80,0x80,0xbc,0x80,0x82,0x80,0x80,0x8f,
0x8c,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0xa1,0x8f,0x80,0x80,0x80,0x87,
0x80,0xb9,0x80,0x9b,0x80,0xac,0xbd,0x80,0x80,0x80,0x80,0x80,0xb0,0x80,0x80,0x8b,
0x80,0x80,0x80,0xb9,0x8c,0x8b,0x80,0x80,0x95,0x80,0x8e,0x80,0x9e,0x80,0x80,0xa5,
0x80,0x80,0x80,0x8f,0xa5,0x80,0x80,0x80,0x86,0x80,0xa4,0x80,0x80,0x80,0x80,0x96,
0x83,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x80,0xb7,0x8e,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x83,0xa3,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x80,0x80,0x80,0x99,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x90,0x80,0x9f,0x80,0x80,0x9c,0x80,0xa6,0x80,0x80,0x85,0x80,0x98,0x80,0x80,
0x80,0x80,0x80,0xc0,0x80,0x80,0x9d,0x80,0xc3,0x80,0x80,0x93,0x80,0x84,0x80,0x80,
0x80,0x80,0x80,0xb2,0x80,0x80,0xa8,0x80,0xb9,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0xa0,0x80,0x80,0xab,0x80,0x98,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x99,0x80,0x80,0xa3,0x80,0x8e,0x80,0x80,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x91,0x80,0x80,0xa4,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x8d,0x80,0x80,0xa3,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x8e,0x80,0x80,0xa2,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x90,0x80,0x80,0xa1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x90,0x80,0x80,0xa1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x90,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x90,0x80,0x80,0x9f,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x90,0x80,0x80,0x9f,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x90,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x80,0x80,0x9d,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x90,0x80,0x80,0x9e,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x91,0x80,0x80,0x9d,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x91,0x80,0x80,0x9c,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x91,0x80,0x80,0x9b,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x91,0x80,0x80,0x9b,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x91,0x80,0x80,0x9a,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x91,0x80,0x80,0x99,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x90,0x80,0x80,0x96,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x91,0x80,0x80,0x95,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x90,0x80,0x80,0x94,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x91,0x80,0x80,0x92,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x93,0x80,0x80,0x92,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0xa4,0x80,0x80,0x95,0x80,0x80,0x80,0x89,0x80,0x99,0x80,0x80,0x90,
0x80,0x80,0x80,0x96,0x8f,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x92,
0x80,0x80,0x80,0x8c,0x8a,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x90,0x84,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x88,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x87,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8b,0x87,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8b,0x85,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x80,0x80,0x82,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8c,0x80,0x80,0x81,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8b,0x80,0x80,0x8a,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8b,0x80,0x80,0x8b,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x8a,
0x80,0x82,0x80,0x96,0x80,0x80,0x91,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x97,0x84,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x84,0x80,0x80,0x94,
0x80,0x80,0x80,0x8e,0x83,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x84,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8e,0x84,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8e,0x86,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8e,0x87,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x87,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x88,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x88,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8e,0x88,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x89,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x89,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8b,0x86,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0xa3,0x8b,0x8f,0x80,0x80,0x85,0x80,0x85,0x80,0x9e,0x80,0x80,0x96,
0x80,0x80,0x80,0x95,0xb3,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x94,0xb0,0x80,0x80,0x88,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x96,0xb3,0x80,0x80,0x89,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x98,0xb3,0x80,0x80,0x87,0x80,0x80,0x80,0x84,0x80,0x81,0x80,0x8a,
0x80,0x80,0x80,0x98,0xb5,0x80,0x80,0x88,0x80,0x80,0x80,0x84,0x80,0x83,0x80,0x8c,
0x80,0x80,0x80,0x97,0xb8,0x81,0x80,0x88,0x80,0x80,0x80,0x89,0x80,0x87,0x80,0x8b,
0x80,0x80,0x80,0x9e,0xb8,0x80,0x80,0x83,0x80,0x80,0x80,0x88,0x80,0x86,0x80,0x8e,
0x80,0x80,0x80,0x9b,0xb6,0x81,0x80,0x80,0x81,0x80,0x80,0x88,0x80,0x88,0x80,0x8b,
0x80,0x80,0x80,0x9e,0xb6,0x80,0x80,0x80,0x81,0x80,0x80,0x88,0x80,0x89,0x80,0x8d,
0x80,0x80,0x80,0x9e,0xb5,0x80,0x80,0x80,0x82,0x80,0x80,0x88,0x80,0x8b,0x80,0x8c,
0x80,0x80,0x80,0x9f,0xb4,0x80,0x80,0x80,0x83,0x80,0x80,0x8a,0x80,0x8c,0x80,0x8b,
0x80,0x80,0x80,0x9e,0xb3,0x80,0x80,0x80,0x84,0x80,0x80,0x8a,0x80,0x8c,0x80,0x8b,
0x80,0x80,0x80,0x9e,0xb4,0x80,0x80,0x80,0x83,0x80,0x80,0x8b,0x80,0x8d,0x80,0x8d,
0x80,0x86,0x80,0xab,0xa4,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x8b,
0x80,0x9b,0x80,0x85,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x93,0x87,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8c,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x8b,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8d,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8c,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x8d,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x8c,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8e,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x8c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8c,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x8d,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x91,0x8b,0x80,0x80,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x81,
0x84,0x80,0x80,0x85,0x9c,0x80,0x80,0x80,0x88,0x80,0xaa,0x95,0x80,0x80,0x80,0x8d,
0xbe,0x80,0x80,0x80,0x80,0x80,0x94,0x80,0x80,0x80,0xaf,0xd6,0x80,0x80,0x80,0x80,
0x80,0xcb,0x80,0x80,0x80,0x80,0xde,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0xa1,0x80,0x80,0xd0,0x80,0x80,0x80,0x90,0x80,0x9a,0x80,0x80,0xa3,
0x80,0x80,0x80,0x90,0x80,0x80,0xb5,0x80,0x80,0x80,0x8b,0x80,0x83,0x80,0x80,0x9e,
0x80,0x80,0x80,0x8c,0x80,0x80,0xaa,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x92,
0x80,0x80,0x80,0x80,0x80,0x80,0xaf,0x80,0x80,0x80,0x86,0x82,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x86,0x80,0x80,0xc4,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0x8e,0x80,0x80,0xb7,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x92,
0x80,0x80,0x80,0xa7,0x80,0x84,0xbb,0x80,0x80,0x80,0x80,0x80,0x89,0x8d,0x80,0x8d,
0x80,0x80,0x80,0xbe,0x80,0x89,0x9a,0x80,0xbb,0x80,0x80,0x80,0x80,0x9b,0x80,0x88,
0x80,0x80,0x80,0xba,0x80,0x80,0x96,0x80,0xb9,0x80,0x80,0x9c,0x80,0x89,0x80,0x80,
0x80,0x80,0x80,0xd1,0x80,0xc0,0x99,0x80,0xbf,0x80,0x80,0x80,0xaa,0x85,0x80,0x9d,
0x80,0x80,0x80,0x9f,0x86,0x80,0x80,0x80,0x97,0x80,0x80,0xf1,0x80,0x9c,0x80,0x80,
0x80,0x80,0x80,0xa3,0x80,0x80,0xb9,0x80,0x9f,0x80,0x80,0x82,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x80,0x80,0xbf,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0x97,0x80,0x80,0xbf,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x92,
0x80,0x80,0x80,0x96,0x80,0x80,0xc2,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0x8d,0x80,0x80,0xcc,0x80,0x80,0x80,0xa3,0x80,0x81,0x80,0x80,0x8c,
0x80,0x80,0x80,0x80,0x80,0x80,0xc2,0x80,0x80,0x80,0xb2,0x80,0x84,0x80,0x80,0x90,
0x80,0x91,0x80,0x80,0x80,0x80,0xd3,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,
0x80,0x80,0x80,0xd1,0x80,0xc0,0x9c,0x80,0xb5,0x80,0x84,0x80,0xc9,0x80,0x80,0xaf,
0x80,0x80,0x80,0xa0,0xa4,0x80,0x80,0x80,0x8e,0x80,0xa8,0x80,0x80,0x80,0x80,0xa6,
0x9e,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0xa2,0x94,0x80,0x80,0x80,0x80,
0x80,0x9a,0x80,0x84,0x80,0x80,0xa4,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,
0x80,0x80,0x80,0xba,0x8b,0x95,0x80,0x80,0xc4,0x80,0x80,0x80,0x85,0x9a,0x80,0x88,
0x80,0x80,0x80,0xbd,0xb5,0x9d,0x80,0x80,0xb3,0x80,0x80,0x85,0x80,0x92,0x80,0x91,
0x80,0x80,0x80,0xad,0xb9,0x8b,0x80,0x80,0x8d,0x80,0x80,0x8c,0x80,0x83,0x80,0x94,
0x80,0x80,0x80,0x8e,0xb9,0x80,0x80,0x80,0x80,0x80,0x80,0x9e,0x80,0x85,0x80,0x91,
0x80,0x80,0x80,0x90,0xa7,0x81,0x80,0x80,0x80,0x80,0x80,0x97,0x80,0x93,0x80,0x90,
0x80,0x80,0x80,0xa5,0x97,0x96,0x80,0x80,0x80,0x80,0x80,0x83,0x80,0xa7,0x80,0x8d,
0x80,0x80,0x80,0xb0,0xa9,0x89,0x80,0x80,0x9a,0x80,0x80,0x9b,0x80,0xb7,0x80,0x8d,
0x80,0x80,0x80,0xb6,0x8b,0x80,0x80,0x80,0x9f,0x80,0x80,0xa2,0x80,0xab,0x80,0x80,
0x80,0x80,0x80,0xae,0x80,0x80,0x91,0x80,0xa0,0x80,0x80,0x9e,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x99,0x80,0x80,0xa4,0x80,0x87,0x80,0x80,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa4,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa2,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa2,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x90,0x80,0x80,0xa1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x90,0x80,0x80,0xa0,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x90,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x90,0x80,0x80,0x9f,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x90,0x80,0x80,0x9f,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x80,0x80,0x9f,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x90,0x80,0x80,0x9e,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x90,0x80,0x80,0x9d,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x90,0x80,0x80,0x9c,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x90,0x80,0x80,0x9b,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x91,0x80,0x80,0x9a,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x92,0x80,0x80,0x9a,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x92,0x80,0x80,0x99,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x91,0x80,0x80,0x97,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x91,0x80,0x80,0x96,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x91,0x80,0x80,0x95,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x92,0x80,0x80,0x92,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x93,0x80,0x80,0x91,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0xa6,0x80,0x80,0x93,0x80,0x80,0x80,0x8d,0x80,0x9d,0x80,0x80,0x92,
0x80,0x80,0x80,0x93,0x90,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x8c,0x8b,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x87,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x88,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x88,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8c,0x85,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8c,0x81,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8c,0x80,0x80,0x81,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8b,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x91,0x80,0x80,0x85,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x8c,
0x80,0x83,0x80,0x97,0x80,0x80,0x94,0x80,0x80,0x80,0x85,0x80,0x83,0x80,0x80,0x86,
0x80,0x80,0x80,0x95,0x84,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x82,0x80,0x80,0x93,
0x80,0x80,0x80,0x8d,0x83,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x82,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x82,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x81,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x83,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8e,0x82,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x82,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x83,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x83,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x84,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x83,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x84,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8b,0x81,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x80,0x80,0x84,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0xa7,0x89,0x80,0x80,0x80,0x89,0x80,0x97,0x80,0x9f,0x80,0x80,0x97,
0x80,0x80,0x80,0x8d,0x9e,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8d,0x99,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8d,0x9c,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8d,0x9b,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8c,0x9a,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8c,0x99,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8c,0x9a,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8c,0x98,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8b,0x98,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8b,0x97,0x80,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x87,0x97,0x80,0x80,0x80,0x80,0x80,0x96,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x82,0x91,0x80,0x80,0x80,0x80,0x80,0x9a,0x80,0x80,0x80,0x80,0x84,
0x82,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x85,
0x80,0x8c,0x80,0x85,0x80,0x80,0x93,0x80,0x80,0x80,0x95,0x80,0x91,0x80,0x80,0x80,
0x80,0x99,0x80,0x85,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x90,0x81,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x94,0x89,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x90,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8d,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8e,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8d,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8e,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x8e,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8d,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x8c,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x8c,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x90,0x8b,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x8e,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x8d,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8d,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8f,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x8e,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8e,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x8f,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x8c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8d,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8c,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x88,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x92,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x90,0x8d,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8b,0x94,0x80,0x80,0x80,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x8b,
0xa3,0x80,0x80,0x80,0x9f,0x80,0x80,0x80,0x80,0x80,0xc0,0xd5,0x80,0x80,0x80,0x86,
0x90,0xb6,0x80,0x80,0x80,0x80,0xd4,0x80,0x80,0x80,0x80,0xab,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8c,0x80,0x80,0xc6,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x97,0x80,0x80,0xd6,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x88,0x80,0x80,0xcb,0x80,0x80,0x80,0xa1,0x80,0xa9,0x80,0x80,0xa9,
0x80,0x80,0x80,0x83,0x80,0x80,0xad,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x9c,
0x80,0x80,0x80,0x81,0x80,0x80,0xb2,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0xa1,0x80,0x80,0xc0,0x80,0x83,0x80,0x80,0x80,0x82,0x80,0x80,0x94,
0x80,0x80,0x80,0x9c,0x80,0x80,0xaa,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x96,
0x80,0x80,0x80,0xa8,0x80,0x80,0xbd,0x80,0x80,0x80,0x95,0x80,0xa7,0x80,0x80,0x9e,
0x80,0x80,0x80,0x98,0x85,0xcb,0x80,0x80,0x80,0x83,0x84,0x80,0xbb,0x90,0x80,0xb8,
0x80,0x80,0x80,0x91,0xad,0x80,0x80,0x80,0x80,0x80,0x80,0xad,0x80,0xa6,0x80,0x87,
0x80,0x80,0x80,0xc4,0x95,0xa3,0x80,0x80,0x8f,0x80,0x86,0x80,0x8b,0x80,0x80,0xa3,
0x80,0x80,0x80,0x80,0xbb,0x84,0x80,0x80,0x84,0x80,0x80,0xaf,0x80,0xb8,0x80,0x80,
0x80,0x80,0x80,0x97,0xa4,0x80,0x80,0x80,0x88,0x80,0x80,0x0b,0x80,0x9c,0x80,0x80,
0x80,0x80,0x80,0x9a,0x80,0x80,0xc7,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x9c,0x80,0x80,0xb1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x97,
0x80,0x80,0x80,0x9b,0x80,0x80,0xab,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x92,
0x80,0x80,0x80,0x97,0x80,0x80,0xa6,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x92,
0x80,0x80,0x80,0x8f,0x80,0x80,0xb5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8b,
0x80,0x84,0x80,0xb1,0x80,0x94,0xc0,0x80,0x80,0x80,0x80,0x80,0x9e,0x80,0x80,0x98,
0x80,0x80,0x80,0xbc,0x80,0x94,0x90,0x80,0x9c,0x80,0xa1,0x80,0xba,0x80,0x80,0xb3,
0x8d,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x80,0x80,0x94,0x83,0x80,0x80,0x80,0x83,
0x80,0x96,0x80,0x89,0x80,0x80,0x95,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0xb0,0x9a,0x96,0x80,0x80,0xa3,0x80,0x83,0x80,0x8e,0x80,0x80,0x9e,
0x80,0x80,0x80,0x94,0xa4,0x80,0x80,0x80,0x80,0x80,0xa6,0x80,0x80,0x80,0x80,0x96,
0x80,0x80,0x80,0x80,0x96,0x80,0x80,0x80,0x80,0x82,0xb9,0x80,0x80,0x80,0x80,0x8f,
0x85,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x84,0xc0,0x80,0x80,0x80,0x80,0x87,
0x95,0x80,0x80,0x80,0x80,0x80,0x97,0x80,0x80,0x80,0xaf,0x80,0x80,0x80,0x80,0x80,
0x89,0x8d,0x80,0x80,0x80,0x80,0xaa,0x80,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x80,
0x80,0x82,0x80,0x92,0x80,0x80,0x9e,0x80,0x80,0x80,0x99,0x80,0x9b,0x80,0x80,0x8a,
0x80,0x80,0x80,0x86,0x80,0x80,0x8a,0x80,0x80,0x80,0x8b,0x80,0x84,0x80,0x80,0x86,
0x80,0x80,0x80,0x8a,0x8c,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x89,0x95,0x80,0x80,0x80,0x80,0x80,0x80,0x98,0x80,0x97,0x80,0x80,
0x80,0x80,0x80,0xa4,0x8a,0x80,0x80,0x80,0x8e,0x80,0x80,0xa2,0x80,0xa2,0x80,0x80,
0x80,0x80,0x80,0xaa,0x80,0x80,0x91,0x80,0x98,0x80,0x80,0x96,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x9c,0x80,0x80,0xa2,0x80,0x89,0x80,0x80,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x92,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x90,0x80,0x80,0xa1,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x90,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x90,0x80,0x80,0x9f,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x90,0x80,0x80,0x9f,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x91,0x80,0x80,0x9f,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x91,0x80,0x80,0x9e,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x91,0x80,0x80,0x9e,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x91,0x80,0x80,0x9d,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x91,0x80,0x80,0x9b,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x92,0x80,0x80,0x9a,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x92,0x80,0x80,0x99,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x92,0x80,0x80,0x98,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x92,0x80,0x80,0x96,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x92,0x80,0x80,0x95,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x92,0x80,0x80,0x94,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x92,0x80,0x80,0x94,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x92,0x80,0x80,0x90,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x94,0x80,0x80,0x90,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0xa7,0x80,0x80,0x90,0x80,0x80,0x80,0x8f,0x80,0x9e,0x80,0x80,0x94,
0x80,0x80,0x80,0x91,0x8e,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x8d,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x87,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x87,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8c,0x8a,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8c,0x86,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8c,0x81,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8b,0x80,0x80,0x82,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8c,0x80,0x80,0x88,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8d,0x80,0x80,0x86,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x8a,
0x80,0x83,0x80,0x9a,0x80,0x80,0x91,0x80,0x80,0x80,0x84,0x80,0x83,0x80,0x80,0x87,
0x80,0x80,0x80,0x95,0x84,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0x8d,0x81,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x81,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8e,0x81,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8d,0x81,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x81,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x81,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x82,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x83,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x82,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8c,0x82,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x95,0x80,0x80,0x87,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0xa4,0x92,0x80,0x80,0x80,0x89,0x80,0x98,0x80,0x9a,0x80,0x80,0x99,
0x80,0x80,0x80,0x8c,0x9c,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x81,
0x80,0x80,0x80,0x8e,0x98,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8e,0x9c,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8c,0x9b,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8d,0x97,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8d,0x99,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8a,0x98,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8b,0x96,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x89,0x96,0x80,0x80,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x86,0x92,0x80,0x80,0x80,0x80,0x80,0x98,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x80,
0x80,0x98,0x80,0x9a,0x80,0x80,0x97,0x80,0x80,0x80,0x89,0x80,0x96,0x80,0x80,0x80,
0x80,0x9b,0x80,0x86,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x90,0x82,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x94,0x82,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x94,0x8b,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x8e,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8d,0x8d,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x8c,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x8c,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x8c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8e,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x8e,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8f,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x8c,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8e,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x8d,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8e,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8e,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8e,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8d,0x8c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x8e,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8e,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8c,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x8d,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x8d,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x88,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x8a,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8d,0x8d,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x86,
0x89,0x80,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x80,0xa7,0x94,0x80,0x80,0x80,0x8c,
0xb4,0x80,0x80,0x80,0x80,0x80,0x98,0x80,0x80,0x80,0x80,0xe9,0x80,0x80,0x80,0x80,
0x80,0xa6,0x80,0x80,0x80,0x80,0xcf,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8e,0x80,0x80,0xc2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8d,0x80,0x80,0xcd,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0xa3,0x80,0x80,0xd4,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x99,
0x80,0x80,0x80,0x8f,0x80,0x80,0xca,0x80,0x80,0x80,0x9c,0x80,0xa1,0x80,0x80,0xa4,
0x80,0x80,0x80,0x81,0x80,0x80,0xa8,0x80,0x80,0x80,0x80,0x80,0x80,0x94,0x80,0x91,
0x80,0x80,0x80,0xac,0x80,0x80,0xb4,0x80,0x91,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x91,0x80,0x80,0xae,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x93,
0x80,0x87,0x80,0x9c,0x80,0x80,0xb4,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0xae,0x80,0x80,0xc2,0x80,0x80,0x80,0xc1,0x80,0xd1,0x80,0x80,0xa6,
0x9e,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0xb7,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x80,0x80,0x80,0xb1,0x80,0x80,0x85,0xe7,0x80,0xb2,0x80,0x80,0x9c,
0x80,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0xb6,0xdc,0x80,0x9f,0x80,0x80,0xa8,
0x96,0x80,0x80,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x82,0xd4,0x80,0x92,0x80,0x80,
0x80,0xa4,0x80,0x94,0x80,0x80,0xd2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0xa0,0x80,0x80,0xab,0x80,0x8f,0x80,0x80,0x80,0x82,0x80,0x80,0x9b,
0x80,0x80,0x80,0x93,0x80,0x80,0xa0,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x97,
0x80,0x80,0x80,0x83,0x80,0x80,0xa6,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x8e,
0x80,0x81,0x80,0x91,0x80,0x80,0xba,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x89,
0x80,0x86,0x80,0xbb,0x80,0x9f,0xac,0x80,0x91,0x80,0x80,0x80,0xa8,0x80,0x80,0xa3,
0x80,0x80,0x80,0xad,0x8a,0x83,0x80,0x80,0x80,0x80,0xa2,0x80,0x94,0x80,0x80,0xaf,
0x80,0x80,0x80,0x81,0x80,0x80,0x81,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x82,0x80,0x91,0x80,0x80,0x84,0x80,0x80,0x80,0x96,0x80,0x84,0x80,0x80,0x90,
0x82,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xb8,0x80,0x80,0x80,0x80,0x90,
0xa2,0x85,0x80,0x80,0x80,0x80,0xa7,0x80,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,
0x94,0x82,0x80,0x82,0x80,0x80,0xa2,0x80,0x89,0x80,0x80,0x80,0x86,0x80,0x80,0x80,
0x80,0x91,0x80,0xa7,0x80,0x80,0x97,0x80,0xae,0x80,0x80,0x80,0x80,0x96,0x80,0x80,
0x80,0x80,0x80,0xbd,0x90,0x85,0x80,0x80,0xc6,0x80,0x80,0x81,0x80,0xa2,0x80,0x80,
0x80,0x80,0x80,0xc4,0xa8,0x8e,0x80,0x80,0xbb,0x80,0x80,0x87,0x80,0x9a,0x80,0x8c,
0x80,0x80,0x80,0xba,0x99,0x80,0x80,0x80,0x9f,0x80,0x80,0x88,0x80,0x8d,0x80,0x86,
0x80,0x80,0x80,0xa6,0x8f,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x98,0x8f,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x82,0x80,0x88,
0x80,0x80,0x80,0x92,0x8c,0x80,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x81,
0x80,0x80,0x80,0x8b,0x8c,0x80,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x89,0x81,0x80,0x80,0x80,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x98,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x91,0x80,0x8c,0x80,0x85,
0x80,0x80,0x80,0x9c,0x80,0x80,0x94,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x97,0x80,0x80,0x9f,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x91,0x80,0x80,0xa0,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x90,0x80,0x80,0x9f,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x91,0x80,0x80,0x9d,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x91,0x80,0x80,0x9d,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x92,0x80,0x80,0x9c,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x92,0x80,0x80,0x9b,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x92,0x80,0x80,0x9b,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x92,0x80,0x80,0x9a,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x92,0x80,0x80,0x99,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x92,0x80,0x80,0x97,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x92,0x80,0x80,0x96,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x92,0x80,0x80,0x95,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x92,0x80,0x80,0x94,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x91,0x80,0x80,0x94,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x92,0x80,0x80,0x93,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x92,0x80,0x80,0x8f,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x94,0x80,0x80,0x8f,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0xa7,0x80,0x80,0x8b,0x80,0x82,0x80,0x90,0x80,0x9e,0x80,0x80,0x96,
0x80,0x80,0x80,0x90,0x8d,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8d,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x87,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x88,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x89,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8c,0x88,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8c,0x87,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x82,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8c,0x81,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8c,0x80,0x80,0x81,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x91,0x80,0x80,0x83,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x9c,0x80,0x80,0x8b,0x80,0x80,0x80,0x86,0x80,0x81,0x80,0x80,0x8a,
0x80,0x80,0x80,0x92,0x85,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8d,0x81,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x81,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8e,0x81,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8e,0x82,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x82,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x82,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x81,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x83,0x80,0x98,0x80,0x80,0x88,0x80,0x80,0x80,0x83,0x80,0x85,0x80,0x80,0x84,
0x80,0x80,0x80,0xa0,0x99,0x80,0x80,0x80,0x8a,0x80,0x97,0x80,0x93,0x80,0x80,0x98,
0x80,0x80,0x80,0x8c,0x9b,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x81,
0x80,0x80,0x80,0x8e,0x99,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8d,0x9a,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8a,0x9a,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8b,0x96,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x89,0x96,0x80,0x80,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x88,0x90,0x80,0x80,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x88,0x8f,0x80,0x80,0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x85,0x90,0x80,0x80,0x80,0x80,0x80,0x94,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x82,0x88,0x80,0x80,0x80,0x80,0x80,0x94,0x80,0x80,0x80,0x80,0x81,
0x80,0x80,0x80,0x82,0x81,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x89,0x80,0x80,0x83,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x92,0x80,0x9f,0x80,0x80,0x97,0x80,0x80,0x80,0x89,0x80,0x96,0x80,0x80,0x83,
0x80,0x97,0x80,0x85,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x91,0x83,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x94,0x83,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x92,0x8d,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x8d,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x92,0x90,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x8e,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x91,0x8f,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x92,0x8f,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x8f,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x8e,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x8e,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x8d,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x8d,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x8b,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x92,0x8f,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x91,0x8f,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x8e,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x90,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8e,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8e,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8e,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x91,0x8d,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x91,0x8d,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x8e,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x90,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8e,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8f,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8d,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x8e,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x8e,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x90,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8e,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8f,0x8f,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x8c,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x8e,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8d,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x8e,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8e,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x8e,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8e,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8d,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x8e,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x8e,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x8f,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8e,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x8c,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x88,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x88,0x80,0x80,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x83,
0x95,0x80,0x80,0x80,0xb0,0x80,0x80,0x80,0x80,0x80,0xa1,0xcb,0x80,0x81,0x80,0x88,
0x8a,0xb3,0x80,0x80,0x80,0x80,0xca,0x80,0x80,0x80,0x80,0xc7,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8e,0x80,0x80,0xbd,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x9b,
0x80,0x80,0x80,0x83,0x80,0x80,0xce,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x94,0x80,0x80,0xce,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x97,
0x80,0x80,0x80,0x9b,0x80,0x80,0xc7,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x97,
0x80,0x80,0x80,0xa5,0x80,0x80,0xc9,0x80,0x81,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0xaf,0x80,0xa4,0xb7,0x80,0x81,0x80,0x80,0x80,0xbc,0x80,0x80,0xa5,
0x80,0x80,0x80,0xab,0x80,0x90,0x85,0x80,0x97,0x80,0x80,0x81,0x80,0xb8,0x80,0x87,
0x80,0x80,0x80,0xbe,0x80,0x80,0x8f,0x80,0xbf,0x80,0x80,0xa9,0x80,0x85,0x80,0x80,
0x80,0x80,0x80,0xa4,0x80,0x80,0xa7,0x80,0x94,0x80,0x80,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0xa6,0x80,0x80,0x9c,0x80,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0xa1,
0x80,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x94,0x80,0x80,0x80,0x80,0x92,
0x80,0x92,0x80,0x85,0x80,0x80,0xbd,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x80,
0x9a,0x80,0x80,0x90,0x80,0x80,0xd1,0x80,0x80,0x80,0xa4,0x80,0x80,0x80,0x80,0x85,
0x80,0x93,0x80,0x80,0x80,0x80,0xc4,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0xb0,0x80,0x8b,0xa2,0x80,0x9e,0x80,0x80,0x80,0x80,0x80,0x80,0x9a,
0x80,0x80,0x80,0x98,0x80,0x80,0x98,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x9b,
0x80,0x80,0x80,0x80,0x80,0x80,0xa7,0x80,0x80,0x80,0x96,0x8e,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x80,0x80,0x80,0xc2,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x82,0x80,0x80,0xca,0x80,0x80,0x80,0xa6,0x80,0x80,0x80,0x80,0x96,
0x80,0x80,0x80,0x80,0x80,0x80,0xc3,0x80,0x80,0x80,0xdc,0x80,0x97,0x80,0x80,0xaa,
0x80,0x80,0x80,0x80,0x80,0x80,0xc4,0x80,0x80,0x8c,0xdc,0x80,0xd2,0x80,0x80,0xa9,
0x80,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x8b,0xb0,0x80,0x88,0x80,0x80,0x9c,
0x80,0x80,0x80,0x8e,0x80,0x80,0x96,0x80,0x80,0x80,0x87,0x80,0x86,0x8a,0x80,0x89,
0x80,0x85,0x80,0xa0,0x81,0x80,0x80,0x80,0x9f,0x80,0x80,0x80,0x80,0x98,0x80,0x80,
0x80,0x80,0x80,0xb5,0xaa,0x99,0x80,0x80,0xaf,0x80,0x80,0x80,0x80,0x90,0x80,0x8e,
0x80,0x80,0x80,0xb3,0xbe,0x93,0x80,0x80,0x8f,0x80,0x80,0x81,0x80,0x8b,0x80,0x99,
0x80,0x80,0x80,0xa5,0xac,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x8f,0xa5,0x80,0x80,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x8a,0x97,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x89,0x90,0x80,0x80,0x80,0x80,0x80,0x87,0x85,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x91,0x8e,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x99,0x92,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x81,
0x80,0x80,0x80,0x91,0x97,0x80,0x80,0x80,0x88,0x80,0x80,0x84,0x80,0x88,0x80,0x80,
0x80,0x80,0x80,0x96,0x88,0x80,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x85,0x80,0x80,
0x80,0x80,0x80,0x98,0x8c,0x80,0x80,0x80,0x91,0x80,0x80,0x89,0x80,0x81,0x80,0x80,
0x80,0x80,0x80,0x97,0x80,0x80,0x83,0x80,0x84,0x80,0x80,0x92,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x97,0x80,0x80,0x87,0x80,0x92,0x80,0x80,0x86,0x80,0x80,0x80,0x81,
0x80,0x80,0x80,0x9a,0x80,0x80,0x88,0x80,0x84,0x80,0x80,0x8a,0x80,0x8a,0x80,0x85,
0x80,0x80,0x80,0x9c,0x80,0x80,0x9c,0x80,0x81,0x80,0x80,0x81,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x94,0x80,0x80,0x9f,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x90,0x80,0x80,0x9e,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x91,0x80,0x80,0x9d,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x91,0x80,0x80,0x9b,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x91,0x80,0x80,0x99,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x92,0x80,0x80,0x99,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x92,0x80,0x80,0x99,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x92,0x80,0x80,0x97,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x91,0x80,0x80,0x97,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x91,0x80,0x80,0x96,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x91,0x80,0x80,0x94,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x91,0x80,0x80,0x93,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x91,0x80,0x80,0x91,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x93,0x80,0x80,0x91,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x92,0x80,0x80,0x8e,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x94,0x80,0x80,0x8e,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0xa6,0x80,0x80,0x87,0x80,0x83,0x80,0x92,0x80,0x9d,0x80,0x80,0x97,
0x80,0x80,0x80,0x8f,0x8e,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x8c,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x8a,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x88,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8f,0x87,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x82,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x93,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x80,0x80,0x81,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x99,0x80,0x80,0x86,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x90,0x84,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8e,0x81,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8e,0x81,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8e,0x81,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x82,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8e,0x81,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x82,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x86,0x80,0x9b,0x80,0x80,0x8a,0x80,0x80,0x80,0x85,0x80,0x8d,0x80,0x80,0x85,
0x80,0x80,0x80,0x9b,0x9f,0x80,0x80,0x80,0x87,0x80,0x96,0x80,0x8b,0x80,0x80,0x97,
0x80,0x80,0x80,0x8c,0x9a,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x81,
0x80,0x80,0x80,0x8d,0x99,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8b,0x98,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x89,0x96,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8a,0x91,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x89,0x91,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x88,0x8d,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x89,0x8a,0x80,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x85,0x89,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x84,0x82,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x81,
0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8a,0x80,0x80,0x81,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8c,0x80,0x80,0x82,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x86,
0x80,0x95,0x80,0xa1,0x80,0x80,0x97,0x80,0x80,0x80,0x86,0x80,0x94,0x80,0x80,0x82,
0x80,0x95,0x80,0x85,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8f,0x81,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x82,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x95,0x84,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x93,0x8e,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x97,0x8f,0x80,0x80,0x80,0x81,0x80,0x85,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x93,0x95,0x80,0x80,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x93,0x96,0x80,0x80,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x93,0x94,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x92,0x92,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x91,0x91,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x93,0x92,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x92,0x95,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x92,0x94,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x92,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x94,0x92,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x92,0x93,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x8f,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x92,0x91,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x93,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x91,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x91,0x93,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x91,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x92,0x90,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x93,0x91,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x92,0x92,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x92,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x90,0x90,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x91,0x90,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x8f,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x91,0x90,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x91,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x92,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x90,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x92,0x91,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x92,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x90,0x90,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x90,0x90,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x90,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x90,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x91,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x8f,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x91,0x91,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x92,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x91,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x92,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x92,0x91,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x91,0x8f,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x91,0x8f,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x8d,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x90,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8e,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x8f,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x91,0x8e,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x8f,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x8f,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x93,0x8e,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x91,0x80,0x80,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x88,
0xa5,0x80,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x80,0x96,0xee,0x80,0x80,0x80,0x80,
0x80,0xc9,0x80,0x80,0x80,0x80,0xd6,0x80,0x80,0x80,0x80,0x96,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x84,0x80,0x80,0xbd,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x8a,0x80,0x80,0xd5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x99,0x80,0x80,0xcc,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x9a,
0x80,0x80,0x80,0x9c,0x80,0x80,0xc5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x99,
0x80,0x80,0x80,0xa6,0x80,0x80,0xbb,0x80,0x80,0x80,0x80,0x80,0x81,0x80,0x80,0x96,
0x80,0x82,0x80,0xcb,0x80,0x92,0xb7,0x80,0xa1,0x80,0x80,0x80,0xa4,0x80,0x80,0x9a,
0x80,0x80,0x80,0xaa,0x80,0x8a,0x84,0x80,0x9f,0x80,0x80,0x80,0xa3,0x80,0x80,0x9f,
0x80,0x80,0x80,0x80,0xaa,0x80,0x80,0x80,0x80,0x80,0x80,0xac,0x80,0x8b,0x80,0x8e,
0x80,0x82,0x80,0x93,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x9d,0x80,0x8e,0x80,0x80,
0x80,0x80,0x80,0x97,0x80,0x80,0xa5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x90,0x80,0x80,0xaf,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0xa0,0x80,0x80,0xa3,0x80,0x95,0x80,0x80,0x80,0x80,0x84,0x80,0x8a,
0x80,0x80,0x80,0xa6,0x80,0x80,0x94,0x80,0x8f,0x80,0x80,0x80,0x80,0x86,0x80,0x90,
0x80,0x80,0x80,0xa2,0x80,0x80,0x94,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x98,
0x80,0x80,0x80,0x87,0x80,0x80,0xa9,0x80,0x80,0x80,0x96,0x80,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0x80,0x80,0x80,0xba,0x80,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x80,0x80,0x80,0xbc,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8d,0x80,0x80,0xcc,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x8c,0x80,0x80,0xc5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0x93,0x80,0x80,0xca,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0x9b,0x80,0x80,0xe0,0x80,0x80,0x80,0xad,0x80,0x80,0x80,0x80,0x90,
0x8b,0x80,0x80,0x80,0x80,0x80,0xe3,0x80,0x80,0x80,0xd3,0x80,0xaf,0x80,0x80,0x9b,
0x80,0x80,0x80,0x80,0x80,0x80,0xcc,0x80,0x80,0x9c,0xfb,0x80,0xce,0x80,0x80,0xad,
0x80,0x80,0x80,0x80,0x80,0x80,0xa2,0x80,0x80,0xcf,0xff,0x80,0xca,0x80,0x80,0xb5,
0x80,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x80,0xc0,0xd4,0x80,0xae,0x80,0x80,0xa8,
0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x98,0xa4,0x80,0x83,0x89,0x80,0x94,
0x80,0x80,0x80,0x89,0x97,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x94,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x94,0x9f,0x80,0x80,0x80,0x84,0x80,0x8c,0x80,0x80,0x80,0x80,0x88,
0x80,0x84,0x80,0x8b,0x98,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x94,0xa2,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x8a,
0x80,0x86,0x80,0x8e,0x93,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8c,0x94,0x80,0x80,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x81,
0x80,0x83,0x80,0x97,0x95,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x81,0x80,0x81,
0x80,0x80,0x80,0x96,0xa5,0x80,0x80,0x80,0x8a,0x80,0x80,0x85,0x80,0x82,0x80,0x86,
0x80,0x80,0x80,0x93,0xa4,0x80,0x80,0x80,0x82,0x80,0x80,0x97,0x80,0x8d,0x80,0x81,
0x80,0x80,0x80,0x97,0x87,0x80,0x80,0x80,0x80,0x80,0x80,0x99,0x80,0x84,0x80,0x80,
0x80,0x80,0x80,0x9c,0x80,0x80,0x88,0x80,0x94,0x80,0x80,0x86,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x98,0x80,0x80,0x84,0x80,0x94,0x80,0x80,0x8c,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x91,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x83,0x80,0x80,0xa1,0x80,0x80,0x80,0x98,0x80,0x80,0x80,0x80,0x92,
0x80,0x80,0x80,0x80,0x80,0x80,0x9d,0x80,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x9a,
0x80,0x80,0x80,0x80,0x80,0x80,0x9c,0x80,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x99,
0x80,0x80,0x80,0x80,0x80,0x80,0x9b,0x80,0x80,0x80,0x9e,0x80,0x80,0x80,0x80,0x99,
0x80,0x80,0x80,0x80,0x80,0x80,0x9b,0x80,0x80,0x80,0x9d,0x80,0x80,0x80,0x80,0x98,
0x80,0x80,0x80,0x80,0x80,0x80,0x99,0x80,0x80,0x80,0x9d,0x80,0x80,0x80,0x80,0x97,
0x80,0x80,0x80,0x80,0x80,0x80,0x99,0x80,0x80,0x80,0x9c,0x80,0x80,0x80,0x80,0x97,
0x80,0x80,0x80,0x80,0x80,0x80,0x97,0x80,0x80,0x80,0x9b,0x80,0x80,0x80,0x80,0x96,
0x80,0x80,0x80,0x80,0x80,0x80,0x96,0x80,0x80,0x80,0x9b,0x80,0x80,0x80,0x80,0x96,
0x80,0x80,0x80,0x80,0x80,0x80,0x96,0x80,0x80,0x80,0x9b,0x80,0x80,0x80,0x80,0x96,
0x80,0x80,0x80,0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x9b,0x80,0x80,0x80,0x80,0x96,
0x80,0x80,0x80,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x99,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x82,0x80,0x80,0x90,0x80,0x80,0x80,0x99,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x82,0x80,0x80,0x8c,0x80,0x80,0x80,0x9a,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x84,0x80,0x80,0x8c,0x80,0x80,0x80,0x9b,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x80,0x80,0xb5,0x80,0x9b,0x80,0x80,0xa7,
0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x80,0xae,0x80,0x80,0x80,0x80,0x98,
0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x80,0xad,0x80,0x80,0x80,0x80,0x97,
0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x80,0xa9,0x80,0x80,0x80,0x80,0x97,
0x80,0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0x80,0xac,0x80,0x80,0x80,0x80,0x97,
0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x80,0xae,0x80,0x80,0x80,0x80,0x97,
0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x80,0xae,0x80,0x80,0x80,0x80,0x98,
0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x80,0xab,0x80,0x80,0x80,0x80,0x96,
0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x80,0xaa,0x80,0x80,0x80,0x80,0x97,
0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x80,0xa7,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x80,0xa4,0x80,0x80,0x80,0x80,0x96,
0x80,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x80,0xa5,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x80,0x80,0xa7,0x80,0x80,0x80,0x80,0x9a,
0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x80,0x9a,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x81,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x81,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8e,0x81,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8d,0x82,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8c,0x81,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x86,0x80,0x9e,0x80,0x80,0x89,0x80,0x80,0x80,0x89,0x80,0x91,0x80,0x80,0x88,
0x80,0x80,0x80,0x96,0xa0,0x80,0x80,0x80,0x83,0x80,0x96,0x80,0x86,0x80,0x80,0x94,
0x80,0x80,0x80,0x8b,0x98,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8a,0x96,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8b,0x96,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8a,0x94,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8a,0x91,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x89,0x8c,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x88,0x8b,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x89,0x87,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x89,0x86,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x88,0x81,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x80,0x80,0x81,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x80,0x80,0x81,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x86,
0x80,0x94,0x80,0xa1,0x80,0x80,0x95,0x80,0x80,0x80,0x87,0x80,0x94,0x80,0x80,0x84,
0x80,0x95,0x80,0x86,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8f,0x81,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x91,0x83,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x95,0x86,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8d,0x94,0x80,0x80,0x80,0x80,0x80,0x9a,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x80,0xa5,0x80,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0x80,0x95,0x80,0x80,0x80,0x80,0x80,0xad,0x80,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x84,0xa3,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x81,0x96,0x80,0x80,0x80,0x80,0x80,0x9a,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x84,0x96,0x80,0x80,0x80,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x86,0x97,0x80,0x80,0x80,0x80,0x80,0x94,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x89,0x98,0x80,0x80,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x89,0x99,0x80,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x89,0x97,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8d,0x98,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x90,0x97,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x99,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x94,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x99,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x90,0x96,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x92,0x96,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x92,0x96,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x93,0x97,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x93,0x98,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x93,0x98,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x92,0x98,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x96,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x92,0x95,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x93,0x96,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x93,0x95,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x91,0x93,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x92,0x94,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x96,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x92,0x95,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x92,0x96,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x95,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8f,0x94,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x91,0x93,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x92,0x96,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x92,0x93,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x91,0x94,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x94,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x95,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x95,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x91,0x92,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x91,0x94,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x95,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x93,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x91,0x92,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x92,0x92,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x91,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x91,0x92,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x93,0x92,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x93,0x92,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x92,0x92,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x92,0x91,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x92,0x90,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x93,0x93,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x89,0x98,0x80,0x80,0x80,0x80,0x80,0x8b,0x8a,0x80,0x80,0x80,0x83,
0xaa,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x80,0x80,0x05,0x80,0x80,0x80,0x80,
0x80,0xa0,0x80,0x80,0x80,0x80,0xd0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x81,0x80,0x80,0xcf,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x98,0x80,0x80,0xce,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x96,
0x80,0x80,0x80,0x9f,0x80,0x80,0xc8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x99,
0x80,0x80,0x80,0xa0,0x80,0x80,0xba,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x9c,
0x80,0x80,0x80,0xa9,0x80,0x8e,0xbd,0x80,0x80,0x80,0x80,0x80,0x9c,0x80,0x80,0x9c,
0x80,0x80,0x80,0xae,0x80,0x93,0x90,0x80,0x86,0x80,0x98,0x80,0xa2,0x80,0x80,0xae,
0x80,0x80,0x80,0x91,0x80,0x80,0x81,0x80,0x80,0x80,0xa5,0x80,0x87,0x80,0x80,0x9e,
0x8a,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x97,0xa2,0x80,0x80,0x80,0x82,
0x80,0x82,0x80,0x80,0x80,0x80,0xa5,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x83,0x80,0x80,0xa0,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x8c,0x80,0x80,0x9e,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0x91,0x80,0x80,0x9a,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x80,0x80,0x80,0x9d,0x80,0x80,0x80,0x95,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x80,0x80,0x80,0xab,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x80,0x80,0x80,0xaa,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x85,0x80,0x80,0xc3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x87,0x80,0x80,0xb5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x95,0x80,0x80,0xb9,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x96,0x80,0x80,0xbd,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x92,0x80,0x80,0xc1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0x93,0x80,0x80,0xc0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0x98,0x80,0x80,0xc6,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x92,
0x80,0x80,0x80,0x9a,0x80,0x80,0xcd,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x94,
0x87,0x80,0x80,0x95,0x80,0x80,0xdc,0x80,0x80,0x80,0xaf,0x80,0x80,0x80,0x80,0x90,
0xa8,0x80,0x80,0x82,0x80,0x80,0xeb,0x80,0x80,0x80,0xe5,0x80,0xac,0x80,0x80,0x95,
0x99,0x80,0x80,0x80,0x80,0x80,0xd8,0x80,0x80,0xa4,0x0a,0x80,0xe0,0x80,0x80,0xa7,
0x80,0x80,0x80,0x80,0x80,0x80,0x9e,0x80,0x80,0xd6,0xf1,0x80,0xd7,0x80,0x80,0xb1,
0x80,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0xb2,0xbc,0x80,0x9e,0x87,0x80,0xa1,
0x80,0x80,0x80,0x80,0x9c,0x80,0x80,0x80,0x80,0x85,0x91,0x80,0x80,0x8c,0x80,0x8c,
0x80,0x80,0x80,0x92,0x96,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x80,
0x80,0x81,0x80,0x90,0x93,0x80,0x80,0x80,0x81,0x80,0x86,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8f,0x9c,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x97,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8e,0x91,0x80,0x80,0x80,0x80,0x80,0x92,0x80,0x86,0x80,0x80,0x89,
0x80,0x80,0x80,0x8a,0x9f,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x83,0x80,0x84,
0x80,0x80,0x80,0x8e,0x9c,0x80,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x85,0x80,0x80,
0x80,0x80,0x80,0x93,0x9f,0x80,0x80,0x80,0x85,0x80,0x80,0x88,0x80,0x84,0x80,0x80,
0x80,0x80,0x80,0x96,0xa3,0x80,0x80,0x80,0x86,0x80,0x80,0x96,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x91,0x89,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x8f,0x80,0x80,
0x80,0x80,0x80,0x99,0x8f,0x80,0x80,0x80,0x8f,0x80,0x80,0xa6,0x80,0xa9,0x80,0x80,
0x80,0x83,0x80,0x9e,0x80,0x80,0x9a,0x80,0x8b,0x80,0x80,0xbd,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x93,0x80,0x80,0xc8,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8b,0x80,0x80,0xc7,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x87,0x80,0x80,0xc6,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x85,0x80,0x80,0xc5,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x85,0x80,0x80,0xc1,0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x83,0x80,0x80,0xc0,0x80,0x80,0x80,0x95,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x82,0x80,0x80,0xbf,0x80,0x80,0x80,0x96,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x82,0x80,0x80,0xbc,0x80,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x82,0x80,0x80,0xbd,0x80,0x80,0x80,0x99,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x80,0x80,0x80,0xbd,0x80,0x80,0x80,0x9d,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x80,0x80,0x80,0xbe,0x80,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x80,0x80,0x80,0xbe,0x80,0x80,0x80,0xa9,0x80,0x81,0x80,0x80,0x8b,
0x85,0x80,0x80,0x80,0x80,0x80,0xc1,0x80,0x80,0x80,0xae,0x80,0x82,0x80,0x80,0x89,
0x88,0x80,0x80,0x80,0x80,0x80,0xc2,0x80,0x80,0x80,0xb4,0x80,0x88,0x80,0x80,0x8b,
0x9c,0x80,0x80,0x80,0x80,0x80,0xc7,0x80,0x80,0x80,0xc8,0x80,0x92,0x80,0x80,0x8c,
0xab,0x80,0x80,0x80,0x80,0x80,0xc8,0x80,0x80,0x80,0xc4,0x80,0x93,0x80,0x80,0x84,
0xa9,0x80,0x80,0x80,0x80,0x80,0xc4,0x80,0x80,0x80,0xc2,0x80,0x8f,0x80,0x80,0x84,
0xaa,0x80,0x80,0x80,0x80,0x80,0xc4,0x80,0x80,0x80,0xc5,0x80,0x8f,0x80,0x80,0x84,
0xab,0x80,0x80,0x80,0x80,0x80,0xc1,0x80,0x80,0x80,0xc1,0x80,0x8a,0x80,0x80,0x83,
0xa9,0x80,0x80,0x80,0x80,0x80,0xc7,0x80,0x80,0x80,0xbf,0x80,0x8b,0x80,0x80,0x81,
0xa6,0x80,0x80,0x80,0x80,0x80,0xc1,0x80,0x80,0x80,0xbd,0x80,0x8d,0x80,0x80,0x86,
0xa4,0x80,0x80,0x80,0x80,0x80,0xc1,0x80,0x80,0x80,0xba,0x80,0x88,0x80,0x80,0x84,
0xa3,0x80,0x80,0x80,0x80,0x80,0xc1,0x80,0x80,0x80,0xb9,0x80,0x87,0x80,0x80,0x83,
0x9e,0x80,0x80,0x80,0x80,0x80,0xc1,0x80,0x80,0x80,0xb5,0x80,0x87,0x80,0x80,0x84,
0x9c,0x80,0x80,0x80,0x80,0x80,0xbf,0x80,0x80,0x80,0xb6,0x80,0x86,0x80,0x80,0x86,
0x9b,0x80,0x80,0x80,0x80,0x80,0xbf,0x80,0x80,0x80,0xb4,0x80,0x80,0x80,0x80,0x84,
0x93,0x80,0x80,0x80,0x80,0x80,0xc4,0x80,0x80,0x80,0xb3,0x80,0x89,0x80,0x80,0x86,
0x9b,0x80,0x80,0x80,0x80,0x80,0xc7,0x80,0x80,0x80,0xbd,0x80,0x89,0x80,0x80,0x85,
0x97,0x80,0x80,0x80,0x80,0x80,0xc0,0x80,0x80,0x80,0xc1,0x80,0x97,0x80,0x80,0x8c,
0x93,0x80,0x80,0x80,0x80,0x80,0xbb,0x80,0x80,0x80,0xc9,0x80,0x8f,0x80,0x80,0x8c,
0x88,0x80,0x80,0x80,0x80,0x80,0xb8,0x80,0x80,0x88,0xd2,0x80,0x9b,0x80,0x80,0x92,
0x80,0x80,0x80,0x80,0x80,0x80,0xaa,0x80,0x80,0x97,0xd6,0x80,0x9d,0x80,0x80,0x99,
0x80,0x80,0x80,0x80,0x80,0x80,0x9b,0x80,0x80,0x99,0xd2,0x80,0x9b,0x80,0x80,0x9e,
0x80,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x92,0xc2,0x80,0x8f,0x80,0x80,0xa0,
0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xb1,0x80,0x81,0x80,0x80,0x9c,
0x80,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x80,0xa1,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x85,0x82,0x80,0x80,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8d,0x82,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x82,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8c,0x80,0x80,0x81,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x86,
0x80,0x83,0x80,0x9f,0x80,0x80,0x8a,0x80,0x80,0x80,0x8e,0x80,0x9a,0x80,0x80,0x8b,
0x80,0x80,0x80,0x92,0x9e,0x80,0x80,0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x8b,0x95,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x81,
0x80,0x80,0x80,0x8b,0x93,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8c,0x94,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8a,0x92,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x89,0x90,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x89,0x8a,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x88,0x87,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x89,0x84,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x89,0x85,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x80,0x80,0x81,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x80,0x80,0x81,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x87,
0x80,0x91,0x80,0xa1,0x80,0x80,0x95,0x80,0x80,0x80,0x88,0x80,0x96,0x80,0x80,0x84,
0x80,0x94,0x80,0x84,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x90,0x83,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x91,0x83,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x92,0x89,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x89,
0x90,0x80,0x80,0x86,0x80,0x80,0x8a,0x80,0x80,0x80,0x90,0x83,0x80,0x80,0x80,0x80,
0x90,0x81,0x80,0x8b,0x80,0x80,0x97,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x80,
0x8b,0x83,0x80,0x91,0x80,0x80,0x90,0x80,0x88,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x97,0x80,0x80,0x8b,0x80,0x84,0x80,0x92,0x80,0x80,0x80,0x80,0x84,
0x85,0x80,0x80,0x87,0x80,0x80,0x8b,0x80,0x80,0x80,0x9d,0x80,0x80,0x80,0x80,0x85,
0x89,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x82,
0x88,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0xa8,0x80,0x82,0x80,0x80,0x84,
0x88,0x80,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0xaa,0x80,0x86,0x80,0x80,0x85,
0x86,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0xa5,0x80,0x86,0x80,0x80,0x86,
0x83,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0xa0,0x80,0x83,0x80,0x80,0x84,
0x80,0x80,0x80,0x83,0x80,0x80,0x87,0x80,0x80,0x80,0x9e,0x80,0x8a,0x80,0x80,0x86,
0x80,0x80,0x80,0x81,0x83,0x80,0x80,0x80,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x88,
0x81,0x80,0x80,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x9f,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0xa4,0x80,0x80,0x80,0x80,0x86,
0x81,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0xac,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x89,0xb3,0x80,0x84,0x80,0x80,0x8a,
0x80,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x8e,0xb5,0x80,0x87,0x80,0x80,0x8b,
0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x92,0xb9,0x80,0x83,0x80,0x80,0x8f,
0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x95,0xb5,0x80,0x88,0x80,0x80,0x8f,
0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8b,0xb3,0x80,0x82,0x80,0x80,0x8b,
0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,0xad,0x80,0x83,0x80,0x80,0x8b,
0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x87,0xa7,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x83,0xa2,0x80,0x83,0x80,0x80,0x88,
0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x81,0x9e,0x80,0x82,0x80,0x80,0x8a,
0x80,0x80,0x80,0x82,0x90,0x80,0x80,0x80,0x80,0x80,0x99,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x85,0x94,0x80,0x80,0x80,0x80,0x80,0x95,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x88,0x94,0x80,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8b,0x99,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8c,0x96,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x97,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x97,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x97,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8d,0x9a,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x97,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8c,0x97,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x98,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x97,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x97,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x95,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8e,0x96,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x96,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x96,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x98,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x96,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x96,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x96,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x94,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x95,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x95,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x95,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8a,0x9a,0x80,0x80,0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x83,0x9b,0x80,0x80,0x80,0x80,0x80,0x9c,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x80,0x99,0x80,0x80,0x80,0x80,0x80,0xa5,0x80,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x80,0xa7,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0x80,0x99,0x80,0x80,0x80,0x80,0x80,0x9a,0x82,0x80,0x81,0x80,0x8d,
0x9e,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x80,0x80,0x0f,0x80,0x8c,0x80,0x80,
0x80,0x83,0x80,0x81,0x80,0x80,0xd3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8f,0x80,0x80,0xcb,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x99,0x80,0x80,0xcb,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x96,
0x80,0x80,0x80,0xa0,0x80,0x80,0xc0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x9d,
0x80,0x80,0x80,0x99,0x80,0x80,0xbf,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x92,
0x80,0x80,0x80,0xa9,0x80,0x80,0xb2,0x80,0x83,0x80,0x98,0x80,0x93,0x80,0x80,0xa6,
0x80,0x80,0x80,0x82,0x80,0x80,0xa7,0x80,0x80,0x80,0xbf,0x80,0x81,0x80,0x80,0x9f,
0x82,0x80,0x80,0x80,0x80,0x80,0xb5,0x80,0x80,0x80,0xcc,0x80,0x8b,0x80,0x80,0x96,
0x8a,0x80,0x80,0x80,0x80,0x80,0xb3,0x80,0x80,0x80,0x95,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x81,0x80,0x80,0xb0,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x8b,0x80,0x80,0xaa,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa5,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0x82,0x80,0x80,0x9c,0x80,0x80,0x80,0x95,0x80,0x80,0x80,0x80,0x92,
0x80,0x80,0x80,0x80,0x80,0x80,0xb9,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x80,0x80,0x80,0xbe,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x84,0x80,0x80,0xbd,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x89,0x80,0x80,0xb8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x94,0x80,0x80,0xbe,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x97,
0x80,0x80,0x80,0x86,0x80,0x80,0xb6,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0x90,0x80,0x80,0xbb,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x91,0x80,0x80,0xbd,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0x92,0x80,0x80,0xbc,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x93,0x80,0x80,0xbf,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0x95,0x80,0x80,0xc1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x92,0x80,0x80,0xc0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x92,0x80,0x80,0xc2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x98,0x80,0x80,0xc9,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x92,
0x95,0x80,0x80,0x9a,0x80,0x80,0xe2,0x80,0x80,0x80,0xc0,0x80,0x8c,0x80,0x80,0x92,
0x9d,0x80,0x80,0x80,0x80,0x80,0xec,0x80,0x80,0x80,0xe6,0x80,0xd9,0x80,0x80,0x98,
0x80,0x80,0x80,0x80,0x80,0x80,0xaf,0x80,0x80,0xbe,0xcb,0x80,0xe3,0x80,0x80,0xa3,
0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x9a,0xa1,0x80,0x99,0x80,0x80,0x93,
0x80,0x80,0x80,0x88,0x99,0x80,0x80,0x80,0x80,0x80,0x93,0x80,0x80,0x81,0x80,0x8a,
0x80,0x83,0x80,0x8d,0x95,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8b,0x99,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x97,0x92,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x81,
0x80,0x80,0x80,0x8e,0x9a,0x80,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8a,0x9a,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x99,0x80,0x80,0x80,0x80,0x80,0x82,0x82,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8a,0x99,0x80,0x80,0x80,0x83,0x80,0x80,0x84,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x93,0x95,0x80,0x80,0x80,0x80,0x80,0x80,0x96,0x80,0x82,0x80,0x80,
0x80,0x80,0x80,0x84,0x80,0x80,0x82,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x80,0x96,0x80,0x80,0x80,0x80,0x80,0x80,0xc5,0x80,0x93,0x80,0x80,
0x80,0x80,0x80,0x88,0x80,0x80,0xb0,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa9,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x97,
0x80,0x80,0x80,0x92,0x80,0x80,0xac,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0x92,0x80,0x80,0xb1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x92,
0x80,0x80,0x80,0x94,0x80,0x80,0xab,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x94,0x80,0x80,0xa9,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0x9b,0x80,0x80,0xab,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x9a,0x80,0x80,0xa8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x9a,0x80,0x80,0xa8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x99,0x80,0x80,0xa9,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x9b,0x80,0x80,0xa7,0x80,0x81,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x9c,0x80,0x80,0xa5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x9e,0x80,0x80,0xa5,0x80,0x83,0x80,0x80,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0xa2,0x80,0x80,0xa9,0x80,0x86,0x80,0x80,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0xa5,0x80,0x80,0xa5,0x80,0x8f,0x80,0x80,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0xa5,0x80,0x80,0xa6,0x80,0x90,0x80,0x80,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0xa1,0x80,0x80,0xa7,0x80,0x8d,0x80,0x80,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0xa1,0x80,0x80,0xa8,0x80,0x8f,0x80,0x80,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0xa1,0x80,0x80,0xa3,0x80,0x8e,0x80,0x80,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0xa4,0x80,0x80,0xa2,0x80,0x90,0x80,0x80,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0xa4,0x80,0x80,0xa3,0x80,0x8d,0x80,0x80,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0xa1,0x80,0x80,0xa3,0x80,0x8c,0x80,0x80,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0xa1,0x80,0x80,0xa2,0x80,0x8a,0x80,0x80,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0xa1,0x80,0x80,0xa3,0x80,0x8a,0x80,0x80,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0xa0,0x80,0x80,0xa5,0x80,0x8b,0x80,0x80,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x9f,0x80,0x80,0xa4,0x80,0x8c,0x80,0x80,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0xa2,0x80,0x80,0xa8,0x80,0x88,0x80,0x80,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x9f,0x80,0x80,0xa6,0x80,0x8c,0x80,0x80,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0xa4,0x80,0x80,0xa4,0x80,0x8b,0x80,0x80,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x9c,0x80,0x80,0xa8,0x80,0x87,0x80,0x80,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x9d,0x80,0x80,0xac,0x80,0x87,0x80,0x80,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x96,0x80,0x80,0xb2,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x88,
0x82,0x80,0x80,0x90,0x80,0x80,0xc5,0x80,0x80,0x80,0x95,0x80,0x80,0x80,0x80,0x84,
0x91,0x80,0x80,0x89,0x80,0x80,0xcd,0x80,0x80,0x80,0xab,0x80,0x8b,0x80,0x80,0x8a,
0x9e,0x80,0x80,0x80,0x80,0x80,0xcc,0x80,0x80,0x80,0xbb,0x80,0x8d,0x80,0x80,0x88,
0x9d,0x80,0x80,0x80,0x80,0x80,0xcc,0x80,0x80,0x80,0xce,0x80,0x98,0x80,0x80,0x8b,
0x90,0x80,0x80,0x80,0x80,0x80,0xc3,0x80,0x80,0x8c,0xde,0x80,0xa5,0x80,0x80,0x93,
0x81,0x80,0x80,0x80,0x80,0x80,0xb2,0x80,0x80,0xa2,0xe2,0x80,0xa7,0x80,0x80,0x9b,
0x80,0x80,0x80,0x80,0x80,0x80,0x9d,0x80,0x80,0xa2,0xd9,0x80,0x9e,0x80,0x80,0xa1,
0x80,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x95,0xc9,0x80,0x90,0x80,0x80,0xa2,
0x80,0x80,0x80,0x80,0x80,0x80,0x81,0x80,0x80,0x81,0xb2,0x80,0x82,0x80,0x80,0x9d,
0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x9a,0x80,0x80,0x86,0x80,0x94,
0x80,0x80,0x80,0x9e,0x80,0x80,0x82,0x80,0x80,0x80,0x96,0x80,0x96,0x80,0x80,0x94,
0x80,0x80,0x80,0x91,0x9c,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x8c,0x95,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x81,
0x80,0x80,0x80,0x8b,0x92,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8b,0x91,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x89,0x90,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8a,0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x81,
0x80,0x80,0x80,0x8d,0x8c,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8c,0x83,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x81,
0x80,0x80,0x80,0x8c,0x81,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8c,0x81,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8c,0x81,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x80,0x80,0x81,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x80,0x80,0x82,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x86,
0x80,0x92,0x80,0xa3,0x80,0x80,0x92,0x80,0x80,0x80,0x86,0x80,0x94,0x80,0x80,0x84,
0x80,0x94,0x80,0x85,0x81,0x80,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x90,0x82,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x92,0x83,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8e,0x8d,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x84,0x88,0x80,0x80,0x80,0x80,0x80,0x82,0x83,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x91,0x80,0x80,0x82,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x89,0x80,0x80,0x87,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x89,0x80,0x80,0x83,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8a,0x80,0x80,0x87,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x94,0x80,0x80,0x83,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x96,0x80,0x80,0x80,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x96,0x86,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x87,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8b,0x83,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8d,0x85,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8e,0x80,0x80,0x84,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8a,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8d,0x80,0x80,0x8e,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x80,0x80,0x93,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x85,
0x80,0x86,0x80,0x8f,0x80,0x80,0x91,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x95,0x80,0x80,0x89,0x80,0x81,0x80,0x89,0x80,0x83,0x80,0x80,0x87,
0x80,0x80,0x80,0x90,0x80,0x80,0x81,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8c,0x81,0x80,0x80,0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x89,0x83,0x80,0x80,0x80,0x80,0x80,0x95,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8c,0x84,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x82,0x80,0x80,0x83,
0x80,0x80,0x80,0x8f,0x92,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x94,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8e,0x98,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x88,0x91,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8b,0x88,0x80,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8a,0x88,0x80,0x80,0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8a,0x89,0x80,0x80,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8a,0x8d,0x80,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8b,0x90,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8b,0x91,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8b,0x8f,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8b,0x8d,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8b,0x8c,0x80,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8a,0x8a,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8b,0x8a,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8b,0x8a,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8a,0x8a,0x80,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8a,0x88,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8a,0x87,0x80,0x80,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x89,0x87,0x80,0x80,0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x89,0x87,0x80,0x80,0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0x84,
0x8f,0x80,0x80,0x81,0x85,0x80,0x80,0x80,0x80,0x80,0x99,0x88,0x80,0x80,0x80,0x80,
0x9a,0x80,0x80,0x80,0x80,0x80,0x96,0x80,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x80,
0x95,0x80,0x80,0x80,0x80,0x80,0x9f,0x80,0x80,0x80,0xa0,0x80,0x81,0x80,0x80,0x80,
0x8d,0x80,0x80,0x80,0x80,0x80,0x9b,0x80,0x80,0x80,0x9d,0x80,0x80,0x80,0x80,0x82,
0x88,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x89,
0x98,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0xe8,0x80,0x80,0x80,0x80,
0x80,0x8d,0x80,0x87,0x80,0x80,0xd1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x98,0x80,0x80,0xc8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x96,
0x80,0x80,0x80,0x9d,0x80,0x80,0xc4,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x99,
0x80,0x80,0x80,0xa0,0x80,0x80,0xbb,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x9a,
0x80,0x80,0x80,0x9c,0x80,0x80,0xb4,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x9a,0x80,0x80,0xaf,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x99,
0x80,0x80,0x80,0x87,0x80,0x80,0xbb,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x95,0x80,0x80,0xb9,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x90,0x80,0x80,0xb1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x95,0x80,0x80,0xad,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x92,
0x80,0x80,0x80,0x92,0x80,0x80,0xa7,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x86,0x80,0x80,0x9d,0x80,0x80,0x80,0x99,0x80,0x80,0x80,0x80,0x96,
0x80,0x80,0x80,0x80,0x80,0x80,0xb9,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x86,
0x80,0x82,0x80,0x80,0x80,0x80,0xbf,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8e,0x80,0x80,0xb7,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8e,0x80,0x80,0xb8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0x8a,0x80,0x80,0xb8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0x90,0x80,0x80,0xc0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0x8e,0x80,0x80,0xbe,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x8f,0x80,0x80,0xbc,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0x90,0x80,0x80,0xba,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x8d,0x80,0x80,0xba,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x8d,0x80,0x80,0xbb,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8f,0x80,0x80,0xbf,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x90,0x80,0x80,0xbd,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x94,0x80,0x80,0xbf,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x92,
0x80,0x80,0x80,0x91,0x80,0x80,0xbf,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x93,0x80,0x80,0xc1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x9f,0x80,0x80,0xc4,0x80,0x80,0x80,0x8c,0x80,0x81,0x80,0x80,0x99,
0x80,0x80,0x80,0xb1,0x80,0x97,0xbb,0x80,0x80,0x80,0xaa,0x80,0xdd,0x80,0x80,0xb1,
0x80,0x80,0x80,0x9a,0x83,0x80,0x80,0x80,0x80,0x81,0x96,0x80,0x9b,0x8c,0x80,0xa0,
0x80,0x80,0x80,0x9a,0x8c,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x81,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x9e,0x80,0x80,0x80,0x82,0x80,0x86,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x91,0x98,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8c,0x91,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8e,0x99,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x83,0x80,0x82,
0x80,0x80,0x80,0x93,0x92,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8a,0x9c,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8b,0x9d,0x80,0x80,0x80,0x80,0x80,0x81,0x80,0x80,0x89,0x80,0x83,
0x80,0x80,0x80,0x8c,0x9e,0x80,0x80,0x80,0x80,0x80,0x80,0x96,0x80,0x80,0x80,0x80,
0x80,0x85,0x80,0x98,0x95,0x80,0x80,0x80,0x86,0x80,0x80,0x8c,0x80,0xa2,0x80,0x80,
0x89,0x80,0x80,0x80,0x94,0x80,0x80,0x80,0x85,0x80,0x80,0xd8,0x80,0x85,0x80,0x80,
0x80,0xa2,0x80,0x80,0x80,0x80,0xc2,0x80,0x80,0x80,0x80,0xa1,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8d,0x80,0x8b,0xb8,0x80,0x80,0x80,0x84,0x80,0xa5,0x80,0x80,0xa4,
0x80,0x80,0x80,0x95,0x80,0x80,0x9c,0x80,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x8e,
0x80,0x80,0x80,0x99,0x80,0x80,0xaa,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8b,0x80,0x80,0xb3,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0x81,0x80,0x80,0xba,0x80,0x80,0x80,0x98,0x80,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0x80,0x80,0x80,0xbe,0x80,0x80,0x80,0xa4,0x80,0x81,0x80,0x80,0x97,
0x80,0x80,0x80,0x80,0x80,0x80,0xb4,0x80,0x80,0x80,0xa5,0x80,0x83,0x80,0x80,0x9c,
0x80,0x80,0x80,0x80,0x80,0x80,0xad,0x80,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x9b,
0x80,0x80,0x80,0x80,0x80,0x80,0xab,0x80,0x80,0x80,0xa1,0x80,0x80,0x80,0x80,0x9b,
0x80,0x80,0x80,0x80,0x80,0x80,0xad,0x80,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x9a,
0x80,0x80,0x80,0x80,0x80,0x80,0xad,0x80,0x80,0x80,0xa5,0x80,0x80,0x80,0x80,0x9b,
0x80,0x80,0x80,0x80,0x80,0x80,0xaa,0x80,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x9c,
0x80,0x80,0x80,0x80,0x80,0x80,0xa6,0x80,0x80,0x80,0xa6,0x80,0x80,0x80,0x80,0x9e,
0x80,0x80,0x80,0x80,0x80,0x80,0xa0,0x80,0x80,0x80,0xac,0x80,0x80,0x80,0x80,0xa3,
0x80,0x80,0x80,0x80,0x80,0x80,0x9d,0x80,0x80,0x80,0xab,0x80,0x80,0x80,0x80,0xa0,
0x80,0x80,0x80,0x80,0x80,0x80,0x9b,0x80,0x80,0x80,0xaa,0x80,0x80,0x80,0x80,0xa1,
0x80,0x80,0x80,0x80,0x80,0x80,0x99,0x80,0x80,0x80,0xac,0x80,0x80,0x80,0x80,0xa2,
0x80,0x80,0x80,0x80,0x80,0x80,0x9c,0x80,0x80,0x80,0xad,0x80,0x80,0x80,0x80,0xa0,
0x80,0x80,0x80,0x80,0x80,0x80,0x9b,0x80,0x80,0x80,0xad,0x80,0x80,0x80,0x80,0x9f,
0x80,0x80,0x80,0x80,0x80,0x80,0x9e,0x80,0x80,0x80,0xab,0x80,0x80,0x80,0x80,0x9e,
0x80,0x80,0x80,0x80,0x80,0x80,0x9f,0x80,0x80,0x80,0xae,0x80,0x80,0x80,0x80,0x9e,
0x80,0x80,0x80,0x80,0x80,0x80,0xa2,0x80,0x80,0x80,0xad,0x80,0x80,0x80,0x80,0x9c,
0x80,0x80,0x80,0x80,0x80,0x80,0xa1,0x80,0x80,0x80,0xad,0x80,0x80,0x80,0x80,0x9e,
0x80,0x80,0x80,0x80,0x80,0x80,0x9f,0x80,0x80,0x80,0xac,0x80,0x80,0x80,0x80,0x9f,
0x80,0x80,0x80,0x80,0x80,0x80,0xa0,0x80,0x80,0x80,0xa9,0x80,0x80,0x80,0x80,0x9e,
0x80,0x80,0x80,0x80,0x80,0x80,0x9f,0x80,0x80,0x80,0xa7,0x80,0x80,0x80,0x80,0x9e,
0x80,0x80,0x80,0x80,0x80,0x80,0x9d,0x80,0x80,0x80,0xad,0x80,0x80,0x80,0x80,0xa2,
0x80,0x80,0x80,0x80,0x80,0x80,0xa0,0x80,0x80,0x80,0xb2,0x80,0x80,0x80,0x80,0x9f,
0x80,0x80,0x80,0x80,0x80,0x80,0xa7,0x80,0x80,0x80,0xb2,0x80,0x80,0x80,0x80,0xa0,
0x80,0x80,0x80,0x80,0x80,0x80,0xa2,0x80,0x80,0x80,0xa8,0x80,0x80,0x80,0x80,0xa1,
0x80,0x80,0x80,0x80,0x80,0x80,0xa0,0x80,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x9b,
0x80,0x80,0x80,0x80,0x80,0x80,0xa7,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x98,
0x80,0x80,0x80,0x81,0x80,0x80,0xad,0x80,0x80,0x80,0x96,0x80,0x80,0x80,0x80,0x9a,
0x80,0x80,0x80,0x80,0x80,0x80,0xb3,0x80,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x98,
0x80,0x80,0x80,0x80,0x80,0x80,0xb5,0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0x97,
0x80,0x80,0x80,0x81,0x80,0x80,0xb6,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x98,
0x80,0x80,0x80,0x85,0x80,0x80,0xbc,0x80,0x80,0x80,0x9b,0x80,0x80,0x80,0x80,0x94,
0x82,0x80,0x80,0x84,0x80,0x80,0xcc,0x80,0x80,0x80,0xa4,0x80,0x80,0x80,0x80,0x8d,
0x96,0x80,0x80,0x80,0x80,0x80,0xd4,0x80,0x80,0x80,0xb3,0x80,0x87,0x80,0x80,0x8c,
0xa0,0x80,0x80,0x80,0x80,0x80,0xd7,0x80,0x80,0x80,0xc8,0x80,0x94,0x80,0x80,0x8c,
0x99,0x80,0x80,0x80,0x80,0x80,0xd1,0x80,0x80,0x80,0xdc,0x80,0xa3,0x80,0x80,0x92,
0x87,0x80,0x80,0x80,0x80,0x80,0xc6,0x80,0x80,0xa7,0xff,0x80,0xc6,0x80,0x80,0xa3,
0x80,0x80,0x80,0x80,0x80,0x80,0xaa,0x80,0x80,0xc5,0xd1,0x80,0xdf,0x80,0x80,0xa0,
0x80,0x83,0x80,0x80,0x95,0x80,0x80,0x80,0x80,0xa4,0x9a,0x80,0x80,0x8d,0x80,0x95,
0x80,0x80,0x80,0x8c,0x92,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8c,0x8f,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8b,0x90,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8f,0x88,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x81,
0x80,0x80,0x80,0x8f,0x9f,0x80,0x80,0x80,0x84,0x80,0x88,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x8c,0x89,0x80,0x80,0x80,0x80,0x80,0x85,0x85,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8d,0x83,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x81,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x84,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x80,0x80,0x81,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x87,
0x80,0x8d,0x80,0xa1,0x80,0x80,0x91,0x80,0x80,0x80,0x89,0x80,0x95,0x80,0x80,0x86,
0x80,0x92,0x80,0x85,0x81,0x80,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x90,0x84,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x92,0x86,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x91,0x8d,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x89,
0x80,0x83,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x81,0x80,0x80,
0x80,0x80,0x80,0x97,0x93,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x93,0x98,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x81,0x82,0x80,0x80,0x80,0x80,0x80,0x88,0x90,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8a,0x80,0x80,0x8a,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x89,0x80,0x80,0x87,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8b,0x80,0x80,0x89,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x91,0x80,0x80,0x8a,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x94,0x80,0x80,0x85,0x80,0x80,0x80,0x8d,0x80,0x83,0x80,0x80,0x8d,
0x80,0x80,0x80,0x8f,0x83,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x90,0x85,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8c,0x84,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8e,0x83,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x85,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x91,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x9c,0x88,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x8f,0x80,0x84,
0x80,0x80,0x80,0xa7,0x8c,0x80,0x80,0x80,0x9a,0x80,0x80,0x84,0x80,0x89,0x80,0x81,
0x80,0x84,0x80,0xa8,0x80,0x80,0x85,0x80,0x94,0x80,0x80,0x80,0x80,0x85,0x80,0x80,
0x80,0x80,0x80,0xaa,0xa1,0x80,0x80,0x80,0xa7,0x80,0x80,0x80,0x80,0x86,0x80,0x94,
0x80,0x80,0x80,0x98,0x83,0x80,0x80,0x80,0x80,0x80,0x83,0x86,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x92,0x80,0x80,0x83,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x9a,0x82,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x9e,0x89,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x9a,0x88,0x80,0x80,0x80,0x8d,0x80,0x81,0x80,0x80,0x80,0x80,0x81,
0x80,0x80,0x80,0x91,0x86,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x88,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x90,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x96,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x82,0x80,0x80,0x88,
0x80,0x80,0x80,0x91,0x98,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8e,0x93,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8a,0x97,0x80,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x87,0x8c,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8f,0x8e,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8e,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x8f,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x91,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x92,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x93,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x93,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8f,0x91,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8f,0x91,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x90,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8f,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x8f,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x8e,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x8d,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8d,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x86,0x96,0x80,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x88,0x80,0x83,
0x80,0x84,0x80,0x8c,0x85,0x80,0x80,0x80,0x80,0x80,0x80,0x9e,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8d,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x80,0x80,0x90,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x86,0x80,0x80,0x8b,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0xe9,0x80,0x91,0x80,0x80,
0x80,0x80,0x80,0x93,0x80,0x80,0xd3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x96,0x80,0x80,0xc8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x97,
0x80,0x80,0x80,0x9e,0x80,0x80,0xc1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x99,
0x80,0x80,0x80,0x9d,0x80,0x80,0xb7,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x9a,
0x80,0x80,0x80,0x93,0x80,0x80,0xb1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x93,0x80,0x80,0xae,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x91,0x80,0x80,0xaa,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x94,0x80,0x80,0xa9,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8f,0x80,0x80,0xac,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x92,
0x80,0x80,0x80,0x8d,0x80,0x80,0xac,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x84,0x80,0x80,0xab,0x80,0x80,0x80,0x9a,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x80,0x80,0x80,0xba,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x80,0x80,0x80,0xc1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x90,0x80,0x80,0xbd,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x8e,0x80,0x80,0xb8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x8b,0x80,0x80,0xb9,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x92,
0x80,0x80,0x80,0x8c,0x80,0x80,0xbb,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0x8e,0x80,0x80,0xbd,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0x92,0x80,0x80,0xb9,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x96,
0x80,0x80,0x80,0x8d,0x80,0x80,0xb9,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8b,0x80,0x80,0xc0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0x8e,0x80,0x80,0xc3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0x8e,0x80,0x80,0xc2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0x90,0x80,0x80,0xbf,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x8e,0x80,0x80,0xc0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8e,0x80,0x80,0xbe,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x91,0x80,0x80,0xbe,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x92,0x80,0x80,0xbe,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x96,0x80,0x80,0xc2,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0xad,0x80,0x80,0xc9,0x80,0x80,0x80,0xba,0x80,0xb3,0x80,0x80,0xa7,
0x80,0x80,0x80,0x8c,0x80,0x86,0x9b,0x80,0x80,0x97,0xc0,0x80,0xda,0x80,0x80,0xb4,
0x80,0x80,0x80,0x87,0x8a,0x80,0x80,0x80,0x80,0x88,0x96,0x80,0x88,0x81,0x80,0x8e,
0x80,0x80,0x80,0x90,0x9a,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x82,0x80,0x80,0x89,
0x80,0x83,0x80,0x89,0x9a,0x80,0x80,0x80,0x80,0x80,0x8a,0x8a,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x90,0x91,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x92,0x96,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x90,0x9f,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x83,0x80,0x83,
0x80,0x80,0x80,0x8e,0xa3,0x80,0x80,0x80,0x80,0x80,0x8b,0x82,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x93,0x8c,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x81,
0x80,0x80,0x80,0x82,0xa2,0x80,0x80,0x80,0x80,0x80,0x82,0x81,0x80,0x85,0x80,0x83,
0x80,0x80,0x80,0x93,0x98,0x80,0x80,0x80,0x80,0x80,0x86,0x86,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x80,0xa4,0x80,0x80,0x80,0x80,0x80,0x80,0xc2,0x80,0x9e,0x80,0x80,
0x80,0xa3,0x80,0x81,0x80,0x80,0x98,0x80,0x80,0x80,0x80,0xec,0x80,0x8b,0x80,0x80,
0x80,0x80,0x80,0xaa,0x80,0x80,0xde,0x80,0x80,0x80,0xa0,0x80,0x9d,0x80,0x80,0x96,
0x80,0x80,0x80,0x80,0x80,0x80,0xa7,0x80,0x80,0x80,0x8a,0x80,0x92,0x80,0x80,0xa2,
0x80,0x80,0x80,0x8b,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x91,0x80,0x80,0xaa,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x90,0x80,0x80,0xad,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x99,0x80,0x80,0xb1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x9d,0x80,0x80,0xb8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x98,0x80,0x80,0xbf,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x98,0x80,0x80,0xba,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x98,0x80,0x80,0xba,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x98,0x80,0x80,0xbb,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x98,0x80,0x80,0xbc,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x98,0x80,0x80,0xbd,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x97,0x80,0x80,0xbe,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x93,0x80,0x80,0xc0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x92,0x80,0x80,0xc2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x92,0x80,0x80,0xc5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x93,0x80,0x80,0xc3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x95,0x80,0x80,0xc4,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x97,0x80,0x80,0xc3,0x80,0x82,0x80,0x80,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x98,0x80,0x80,0xc2,0x80,0x82,0x80,0x80,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x98,0x80,0x80,0xbe,0x80,0x87,0x80,0x80,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x95,0x80,0x80,0xc3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x92,0x80,0x80,0xc3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x93,0x80,0x80,0xca,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x97,0x80,0x80,0xc3,0x80,0x81,0x80,0x80,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x98,0x80,0x80,0xc4,0x80,0x82,0x80,0x80,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x97,0x80,0x80,0xc3,0x80,0x84,0x80,0x80,0x80,0x80,0x81,0x80,0x82,
0x80,0x80,0x80,0xa0,0x80,0x80,0xc2,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,0x80,0x85,
0x80,0x80,0x80,0xa2,0x80,0x80,0xc4,0x80,0x88,0x80,0x80,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x9a,0x80,0x80,0xc6,0x80,0x82,0x80,0x80,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x95,0x80,0x80,0xc4,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x94,0x80,0x80,0xc5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x9a,0x80,0x80,0xbe,0x80,0x83,0x80,0x80,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x9f,0x80,0x80,0xbe,0x80,0x85,0x80,0x80,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0xa1,0x80,0x80,0xbf,0x80,0x86,0x80,0x80,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x9c,0x80,0x80,0xbc,0x80,0x84,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x9c,0x80,0x80,0xb9,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x9a,0x80,0x80,0xb8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x96,0x80,0x80,0xb7,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0x98,0x80,0x80,0xb6,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0x9e,0x80,0x80,0xb4,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x93,
0x80,0x94,0x80,0xbc,0x80,0x80,0xe7,0x80,0x80,0x80,0x9a,0x80,0xc2,0x80,0x80,0x88,
0x80,0x80,0x80,0x98,0x85,0x95,0x80,0x80,0xa0,0x99,0xa7,0x80,0xca,0x80,0x80,0xb9,
0x80,0x80,0x80,0x8a,0x8f,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8e,0x90,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8d,0x8d,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x93,0x96,0x80,0x80,0x80,0x82,0x80,0x8d,0x80,0x80,0x80,0x80,0x89,
0x86,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x80,0xa8,0x93,0x80,0x80,0x80,0x85,
0x80,0x8a,0x80,0x80,0x80,0x80,0x94,0x80,0x80,0x80,0x92,0x80,0x8b,0x80,0x80,0x80,
0x80,0x80,0x80,0x8a,0x84,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x90,0x81,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x82,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x87,
0x80,0x8f,0x80,0xa1,0x80,0x80,0x91,0x80,0x80,0x80,0x88,0x80,0x91,0x80,0x80,0x83,
0x80,0x93,0x80,0x86,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x90,0x84,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x91,0x85,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x91,0x8e,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8b,0x87,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8d,0x86,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x85,0x93,0x80,0x80,0x80,0x80,0x80,0x96,0x85,0x80,0x80,0x80,0x8a,
0x80,0x84,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x87,0x86,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8b,0x80,0x80,0x8d,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8d,0x80,0x80,0x8a,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8e,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x94,0x80,0x80,0x88,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x95,0x80,0x80,0x87,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x92,0x80,0x80,0x82,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x91,0x87,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x85,0x80,0x80,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x90,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x88,0x8d,0x80,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x82,0x85,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x86,
0x80,0x82,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x8c,0x97,0x80,0x80,0x80,0x80,0x80,0x98,0x80,0x8f,0x80,0x80,0x9e,
0x80,0x80,0x80,0x86,0xa7,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x83,0x80,0x93,
0x80,0x80,0x80,0x8e,0xa0,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x84,0x80,0x8c,
0x80,0x80,0x80,0x87,0xa4,0x80,0x80,0x80,0x80,0x80,0x97,0x81,0x80,0x80,0x80,0x91,
0x80,0x87,0x80,0x83,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,
0x80,0x81,0x80,0xa4,0x88,0x83,0x80,0x80,0x96,0x80,0x80,0x80,0x90,0x83,0x80,0x8d,
0x80,0x80,0x80,0xa5,0xab,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x83,0x80,0x8d,
0x80,0x80,0x80,0x9a,0xa8,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x96,0xb0,0x80,0x80,0x82,0x83,0x80,0x80,0x8a,0x80,0x90,0x80,0x85,
0x80,0x80,0x80,0x96,0x9b,0x80,0x80,0x80,0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x93,0x8a,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x94,0x8a,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x98,0x91,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x96,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x93,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8a,0x92,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x81,
0x80,0x80,0x80,0x8f,0x8e,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x81,
0x80,0x80,0x80,0x92,0x8e,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x92,0x8e,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x94,0x8f,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x98,0x97,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x81,0x80,0x84,
0x80,0x80,0x80,0x98,0xa2,0x80,0x80,0x80,0x87,0x80,0x82,0x80,0x80,0x81,0x80,0x84,
0x80,0x80,0x80,0x91,0x96,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x90,0x95,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x91,0x92,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x81,
0x80,0x80,0x80,0x91,0x90,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x81,
0x80,0x80,0x80,0x92,0x8f,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x81,
0x80,0x80,0x80,0x92,0x8f,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x91,0x90,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x90,0x8e,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8f,0x8d,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x90,0x8c,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x90,0x8a,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x90,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x8c,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x83,0x99,0x80,0x80,0x80,0x80,0x80,0x80,0x9d,0x80,0x8d,0x80,0x80,
0x80,0x80,0x80,0x92,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x92,0x80,0x80,0x91,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8a,0x80,0x80,0x88,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xde,0x80,0x83,0x80,0x80,
0x80,0x92,0x80,0x89,0x80,0x80,0xd6,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x9a,0x80,0x80,0xc2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x9d,
0x80,0x80,0x80,0x99,0x80,0x80,0xbc,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x99,
0x80,0x80,0x80,0x92,0x80,0x80,0xba,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x97,
0x80,0x80,0x80,0x91,0x80,0x80,0xb7,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x97,0x80,0x80,0xae,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x8e,0x80,0x80,0xaa,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0x8e,0x80,0x80,0xae,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x94,0x80,0x80,0xb3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x98,0x80,0x80,0xb5,0x80,0x83,0x80,0x80,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x90,0x80,0x80,0xbc,0x80,0x82,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x97,0x80,0x80,0xc8,0x80,0x8e,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0xa2,0x80,0x80,0xc2,0x80,0x94,0x80,0x80,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x9d,0x80,0x80,0xc0,0x80,0x8b,0x80,0x80,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x96,0x80,0x80,0xc3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x96,0x80,0x80,0xc0,0x80,0x82,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x95,0x80,0x80,0xc0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x97,0x80,0x80,0xbe,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x95,0x80,0x80,0xbf,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x91,0x80,0x80,0xbd,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x92,0x80,0x80,0xbc,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0x92,0x80,0x80,0xbd,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x92,
0x80,0x80,0x80,0x91,0x80,0x80,0xbd,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x92,
0x80,0x80,0x80,0x92,0x80,0x80,0xbe,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x93,0x80,0x80,0xc0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x92,
0x80,0x80,0x80,0x91,0x80,0x80,0xbe,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8e,0x80,0x80,0xbf,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x8e,0x80,0x80,0xbc,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x92,0x80,0x80,0xc0,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x96,0x80,0x80,0xc2,0x80,0x80,0x80,0xa1,0x80,0x80,0x80,0x80,0x9a,
0x80,0x80,0x80,0x91,0x80,0x80,0xd4,0x80,0x80,0x80,0xe2,0x80,0xc3,0x80,0x80,0xa7,
0x80,0x80,0x80,0x80,0x80,0x80,0xa7,0x80,0x80,0xb3,0xd7,0x80,0xe1,0x80,0x80,0xae,
0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0xa7,0xb0,0x80,0x96,0x80,0x80,0x9b,
0x80,0x80,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x81,0x80,0x83,
0x80,0x80,0x80,0x8e,0x9e,0x80,0x80,0x80,0x80,0x80,0x9c,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x88,0x90,0x80,0x80,0x80,0x80,0x80,0x98,0x80,0x82,0x80,0x80,0x88,
0x80,0x80,0x80,0x88,0x9a,0x80,0x80,0x80,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x80,0x97,0x82,0x80,0x80,0x80,0x88,
0x80,0x83,0x80,0x8a,0x8e,0x80,0x80,0x80,0x80,0x80,0x95,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x86,0x90,0x80,0x80,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x83,0x99,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x80,0x9f,0x80,0x80,0x80,0x80,0x80,0x80,0xa3,0x80,0x89,0x80,0x80,
0x80,0x85,0x80,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0xe3,0x80,0x93,0x80,0x80,
0x80,0x99,0x80,0x9e,0x80,0x80,0xbf,0x80,0x80,0x80,0x80,0x94,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0xa3,0x80,0x80,0xcd,0x80,0x80,0x80,0x98,0x80,0xbe,0x80,0x80,0xa6,
0x80,0x80,0x80,0x86,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x97,
0x80,0x80,0x80,0x96,0x80,0x80,0x95,0x80,0x80,0x80,0x80,0x82,0x80,0x8c,0x80,0x8d,
0x80,0x80,0x80,0x9a,0x80,0x80,0xa8,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x9b,0x80,0x80,0xaf,0x80,0x81,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x98,0x80,0x80,0xb1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x9e,0x80,0x80,0xb7,0x80,0x82,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0xa0,0x80,0x80,0xaf,0x80,0x86,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0xa6,0x80,0x80,0xaa,0x80,0x92,0x80,0x80,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0xa9,0x80,0x80,0xa7,0x80,0x94,0x80,0x80,0x80,0x80,0x83,0x80,0x89,
0x80,0x80,0x80,0xab,0x80,0x80,0xa0,0x80,0x9a,0x80,0x80,0x80,0x80,0x8a,0x80,0x8b,
0x80,0x80,0x80,0xaa,0x80,0x80,0xa5,0x80,0x90,0x80,0x80,0x80,0x80,0x82,0x80,0x86,
0x80,0x80,0x80,0xa8,0x80,0x80,0xa7,0x80,0x94,0x80,0x80,0x80,0x80,0x82,0x80,0x87,
0x80,0x80,0x80,0xab,0x80,0x80,0xa7,0x80,0x9b,0x80,0x80,0x80,0x80,0x82,0x80,0x87,
0x80,0x80,0x80,0xa8,0x80,0x80,0xa6,0x80,0x93,0x80,0x80,0x80,0x80,0x86,0x80,0x86,
0x80,0x80,0x80,0xad,0x80,0x80,0xa5,0x80,0x98,0x80,0x80,0x80,0x80,0x86,0x80,0x8b,
0x80,0x80,0x80,0xab,0x80,0x80,0xa3,0x80,0x98,0x80,0x80,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x9e,0x80,0x80,0xa2,0x80,0x8b,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa7,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8c,0x80,0x80,0xaa,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x89,0x80,0x80,0xaa,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x92,
0x80,0x80,0x80,0x92,0x80,0x80,0xb2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x94,0x80,0x80,0xb0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x9c,0x80,0x80,0xb0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x92,0x80,0x80,0xa5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x99,
0x80,0x80,0x80,0x8c,0x80,0x80,0xa9,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x91,0x80,0x80,0xab,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x92,
0x80,0x80,0x80,0x94,0x80,0x80,0xad,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x95,0x80,0x80,0xaa,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0x91,0x80,0x80,0xaa,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x92,
0x80,0x80,0x80,0x91,0x80,0x80,0xad,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0x9b,0x80,0x80,0xb2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0xa2,0x80,0x80,0xa6,0x80,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x95,
0x80,0x80,0x80,0xa4,0x80,0x80,0xa2,0x80,0x8c,0x80,0x80,0x80,0x80,0x82,0x80,0x8d,
0x80,0x80,0x80,0xa6,0x80,0x80,0xa3,0x80,0x8a,0x80,0x80,0x80,0x80,0x82,0x80,0x8c,
0x80,0x80,0x80,0xa8,0x80,0x80,0xa2,0x80,0x8e,0x80,0x80,0x80,0x80,0x88,0x80,0x8b,
0x80,0x80,0x80,0xaa,0x80,0x80,0xa4,0x80,0x93,0x80,0x80,0x80,0x80,0x83,0x80,0x8a,
0x80,0x80,0x80,0xa6,0x80,0x80,0xa0,0x80,0x93,0x80,0x80,0x81,0x80,0x89,0x80,0x89,
0x80,0x80,0x80,0x9f,0x80,0x80,0xb1,0x80,0x88,0x80,0x80,0x81,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0xa2,0x80,0x80,0xca,0x80,0x80,0x80,0x80,0x80,0x94,0x81,0x80,0x83,
0x80,0x80,0x80,0xca,0x80,0xc1,0x80,0x80,0xd5,0x80,0x80,0x80,0x80,0xd5,0x80,0x9a,
0x80,0xa8,0x80,0xf6,0x86,0x9c,0x84,0x80,0xe4,0x80,0x80,0x80,0x80,0xa0,0x80,0x87,
0x80,0x80,0x80,0xc6,0xa0,0x80,0x80,0x80,0x9e,0x80,0x95,0x80,0x90,0x80,0x80,0xa8,
0x80,0x80,0x80,0x8c,0x8e,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8d,0x92,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x8e,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x80,0x98,0x80,0x80,0x80,0x80,0x80,0xa6,0x8b,0x80,0x80,0x80,0x89,
0x87,0x88,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x84,0x89,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x97,0x80,0x80,0x98,0x80,0x80,0x80,0x95,0x80,0x8e,0x80,0x80,0x8b,
0x80,0x80,0x80,0x8b,0x87,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x83,0x80,0x80,0x93,
0x80,0x80,0x80,0x90,0x86,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x85,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x81,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x83,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x90,0x83,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x86,
0x80,0x8f,0x80,0x9f,0x80,0x80,0x8e,0x80,0x80,0x80,0x88,0x80,0x90,0x80,0x80,0x83,
0x80,0x93,0x80,0x86,0x82,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x90,0x85,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x92,0x87,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x91,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8c,0x86,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x81,
0x80,0x80,0x80,0x8e,0x86,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x81,0x80,0x80,0x80,0x94,0x80,0x80,0x80,0x80,0x80,0x9b,0x9e,0x80,0x80,0x80,0x87,
0x80,0x94,0x80,0x80,0x80,0x80,0xa3,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8d,0x80,0x80,0x92,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8b,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x90,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x94,0x80,0x80,0x88,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x95,0x80,0x80,0x84,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x94,0x81,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x87,0x87,0x80,0x80,0x80,0x80,0x80,0x98,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x9d,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x98,0x80,0x80,0x80,0x80,0x82,
0x81,0x80,0x80,0x83,0x80,0x80,0x90,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x89,0x80,0x80,0x92,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x80,
0x80,0x85,0x80,0x98,0x80,0x80,0x94,0x80,0x84,0x80,0x81,0x80,0x80,0x80,0x80,0x80,
0x85,0x80,0x80,0x9c,0x80,0x80,0x94,0x80,0x82,0x80,0x96,0x80,0x87,0x80,0x80,0x85,
0x8e,0x80,0x80,0x8c,0x80,0x80,0x92,0x80,0x80,0x80,0x91,0x80,0x85,0x80,0x80,0x80,
0x84,0x80,0x80,0x8d,0x80,0x80,0x8a,0x80,0x80,0x80,0x8f,0x80,0x83,0x80,0x80,0x80,
0x83,0x80,0x80,0x8b,0x80,0x80,0x83,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x80,
0x80,0x93,0x80,0x9a,0x80,0x80,0x82,0x80,0x8a,0x80,0x80,0x80,0x84,0x80,0x80,0x80,
0x80,0x80,0x80,0xa9,0xa6,0x80,0x80,0x80,0x90,0x80,0x90,0x80,0x87,0x80,0x80,0x97,
0x80,0x80,0x80,0x90,0x9e,0x80,0x80,0x82,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8e,0x9f,0x80,0x80,0x83,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x88,0xa0,0x80,0x80,0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0x82,
0x80,0x87,0x80,0x83,0x90,0x80,0x80,0x80,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x96,0x93,0x80,0x80,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x96,0x92,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x95,0x96,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8e,0x97,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x90,0x95,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x91,0x97,0x80,0x80,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x81,
0x80,0x80,0x80,0x95,0x99,0x80,0x80,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x94,0x9a,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x92,0x97,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x94,0x96,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x96,0x9d,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8b,0xa2,0x80,0x80,0x81,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x83,
0x80,0x86,0x80,0x8d,0x91,0x80,0x80,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x94,0x9d,0x80,0x80,0x80,0x82,0x80,0x85,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x91,0x9c,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x91,0x9a,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x93,0x9b,0x80,0x80,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x95,0x9d,0x80,0x80,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x92,0x9b,0x80,0x80,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x92,0x98,0x80,0x80,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x93,0x97,0x80,0x80,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x94,0x97,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x96,0x97,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x97,0x96,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x97,0x96,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8d,0xa1,0x80,0x80,0x80,0x82,0x80,0x80,0x88,0x80,0x8e,0x80,0x83,
0x80,0x89,0x80,0x8e,0x8c,0x80,0x80,0x80,0x80,0x80,0x80,0xae,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x93,0x80,0x80,0x8e,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8b,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x80,0x80,0xd8,0x80,0x9a,0x80,0x80,
0x80,0x94,0x80,0x94,0x80,0x80,0xd3,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x9a,0x80,0x80,0xbe,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0xa1,
0x80,0x80,0x80,0x8f,0x80,0x80,0xbc,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x96,
0x80,0x80,0x80,0x91,0x80,0x80,0xc0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x97,0x80,0x80,0xb6,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x99,
0x80,0x80,0x80,0x91,0x80,0x80,0xab,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8a,0x80,0x80,0xb0,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x9a,0x80,0x80,0xc0,0x80,0x80,0x80,0x80,0x80,0x92,0x81,0x80,0x86,
0x80,0x80,0x80,0xb8,0x86,0xb0,0x80,0x80,0xbb,0x80,0x80,0x80,0x80,0xa9,0x80,0xa0,
0x80,0x80,0x80,0xb9,0x8d,0x93,0x80,0x80,0xa1,0x80,0x80,0x8c,0x80,0x9e,0x80,0x8e,
0x80,0x80,0x80,0xb3,0x95,0x98,0x80,0x80,0x9e,0x80,0x80,0x9a,0x80,0xb0,0x80,0x8b,
0x80,0x80,0x80,0xc4,0x94,0xa2,0x80,0x80,0xad,0x80,0x80,0x94,0x80,0xb0,0x80,0x8f,
0x80,0x80,0x80,0xc5,0x90,0x9d,0x80,0x80,0xa9,0x80,0x80,0x96,0x80,0xb2,0x80,0x8d,
0x80,0x80,0x80,0xc5,0x92,0x99,0x80,0x80,0xae,0x80,0x80,0x9c,0x80,0xbb,0x80,0x8b,
0x80,0x80,0x80,0xcb,0x8c,0x9e,0x80,0x80,0xb6,0x80,0x80,0x94,0x80,0xba,0x80,0x8b,
0x80,0x80,0x80,0xcd,0x8b,0x97,0x80,0x80,0xb5,0x80,0x80,0x99,0x80,0xba,0x80,0x89,
0x80,0x80,0x80,0xcd,0x8a,0x98,0x80,0x80,0xbb,0x80,0x80,0x97,0x80,0xbe,0x80,0x89,
0x80,0x80,0x80,0xcf,0x83,0x94,0x81,0x80,0xb9,0x80,0x80,0x96,0x80,0xbb,0x80,0x87,
0x80,0x80,0x80,0xcf,0x83,0x90,0x82,0x80,0xbe,0x80,0x80,0x99,0x80,0xba,0x80,0x85,
0x80,0x80,0x80,0xd1,0x83,0x95,0x82,0x80,0xc6,0x80,0x80,0x93,0x80,0xc5,0x80,0x87,
0x80,0x80,0x80,0xd5,0x80,0x91,0x8a,0x80,0xbe,0x80,0x80,0x97,0x80,0xc0,0x80,0x80,
0x80,0x80,0x80,0xd4,0x89,0x92,0x80,0x80,0xc8,0x80,0x80,0x9e,0x80,0xc5,0x80,0x87,
0x80,0x80,0x80,0xd6,0x81,0x9d,0x83,0x80,0xcc,0x80,0x80,0x8f,0x80,0xce,0x80,0x89,
0x80,0x80,0x80,0xd9,0x80,0x93,0x88,0x80,0xbd,0x80,0x80,0x99,0x80,0xc4,0x80,0x82,
0x80,0x80,0x80,0xd6,0x8d,0x96,0x80,0x80,0xcd,0x80,0x80,0x9e,0x80,0xcf,0x80,0x8a,
0x80,0x80,0x80,0xd8,0x80,0x9c,0x86,0x80,0xc6,0x80,0x80,0x8f,0x80,0xce,0x80,0x87,
0x80,0x80,0x80,0xd8,0x80,0x8f,0x86,0x80,0xbd,0x80,0x80,0x9e,0x80,0xc7,0x80,0x83,
0x80,0x80,0x80,0xd4,0x88,0x94,0x80,0x80,0xc9,0x80,0x80,0x9a,0x80,0xcf,0x80,0x8b,
0x80,0x80,0x80,0xd6,0x80,0x92,0x8c,0x80,0xc0,0x80,0x80,0x8f,0x80,0xc6,0x80,0x86,
0x80,0x80,0x80,0xd2,0x80,0x86,0x8c,0x80,0xb8,0x80,0x80,0x95,0x80,0xbf,0x80,0x84,
0x80,0x80,0x80,0xd6,0x80,0x82,0x8c,0x80,0xc4,0x80,0x80,0x89,0x80,0xbb,0x80,0x8a,
0x80,0x80,0x80,0xd4,0x80,0x80,0xa6,0x80,0xa2,0x80,0x87,0x80,0x85,0x80,0x80,0x94,
0x81,0x80,0x80,0x94,0x80,0x80,0x9e,0x80,0x80,0x80,0xbc,0x80,0x9d,0x80,0x80,0x97,
0x8c,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x8f,0xbf,0x80,0x84,0x80,0x80,0x8e,
0x8b,0x80,0x80,0x80,0x80,0x80,0x94,0x80,0x80,0x88,0xb8,0x80,0x91,0x80,0x80,0x8c,
0x87,0x80,0x80,0x80,0x80,0x80,0x92,0x80,0x80,0x83,0xc3,0x80,0x85,0x80,0x80,0x8c,
0x91,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x97,0xca,0x80,0x84,0x80,0x80,0x8d,
0x93,0x80,0x80,0x80,0x80,0x80,0x95,0x80,0x80,0x90,0xbc,0x80,0x89,0x80,0x80,0x88,
0x83,0x80,0x80,0x80,0x80,0x80,0x95,0x80,0x80,0x85,0xbd,0x80,0x8e,0x80,0x80,0x8c,
0x8c,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x8e,0xbe,0x80,0x80,0x80,0x80,0x8a,
0x8a,0x80,0x80,0x80,0x80,0x80,0x99,0x80,0x80,0x89,0xb7,0x80,0x90,0x80,0x80,0x89,
0x85,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x83,
0x80,0x91,0x80,0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0x98,0x80,0x95,0x80,0x80,
0x80,0x81,0x80,0xac,0x80,0x80,0x8f,0x80,0xaa,0x80,0x80,0x98,0x80,0xb7,0x80,0x80,
0x80,0x83,0x80,0xe2,0x80,0x82,0x9e,0x80,0xc4,0x80,0x80,0x80,0x80,0x96,0x80,0x88,
0x80,0x80,0x80,0xba,0x80,0x80,0x94,0x80,0xaa,0x80,0x80,0x80,0x80,0x86,0x80,0x8e,
0x80,0x80,0x80,0xa9,0x80,0x80,0x96,0x80,0x99,0x80,0x80,0x80,0x80,0x8d,0x80,0x82,
0x80,0x80,0x80,0xab,0x80,0x80,0x8d,0x80,0xa0,0x80,0x80,0x87,0x80,0x98,0x80,0x81,
0x80,0x80,0x80,0xb7,0x80,0x80,0x89,0x80,0xa6,0x80,0x80,0x84,0x80,0x9b,0x80,0x89,
0x80,0x80,0x80,0xb6,0x80,0x85,0x86,0x80,0xa5,0x80,0x80,0x88,0x80,0xa1,0x80,0x88,
0x80,0x80,0x80,0xbe,0x80,0x84,0x8a,0x80,0xa3,0x80,0x80,0x86,0x80,0x9a,0x80,0x89,
0x80,0x80,0x80,0xb8,0x80,0x80,0x85,0x80,0xa3,0x80,0x80,0x81,0x80,0x8d,0x80,0x8f,
0x80,0x80,0x80,0xac,0x80,0x80,0x8a,0x80,0x93,0x80,0x80,0x80,0x80,0x84,0x80,0x8c,
0x80,0x80,0x80,0xa9,0x80,0x80,0x8e,0x80,0x8d,0x80,0x80,0x80,0x80,0x81,0x80,0x89,
0x80,0x80,0x80,0xa5,0x80,0x80,0x88,0x80,0x8f,0x80,0x80,0x80,0x80,0x85,0x80,0x8d,
0x80,0x80,0x80,0xa3,0x80,0x80,0x8b,0x80,0x8e,0x80,0x80,0x80,0x80,0x87,0x80,0x88,
0x80,0x80,0x80,0xa7,0x80,0x80,0x87,0x80,0x8e,0x80,0x80,0x80,0x80,0x86,0x80,0x8d,
0x80,0x80,0x80,0xa7,0x80,0x80,0x81,0x80,0x8d,0x80,0x80,0x80,0x80,0x8c,0x80,0x8f,
0x80,0x80,0x80,0x9f,0x80,0x80,0x89,0x80,0x82,0x80,0x80,0x94,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x99,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x92,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0x96,0x80,0x80,0x95,0x80,0x80,0x80,0x80,0x84,0x80,0x9e,0x80,0x81,
0x80,0x80,0x80,0xb3,0x80,0x80,0x9c,0x80,0xa4,0x80,0x80,0x83,0x80,0x96,0x80,0x81,
0x80,0x80,0x80,0xb7,0x80,0x80,0x9a,0x80,0xa7,0x80,0x80,0x80,0x80,0x9a,0x80,0x84,
0x80,0x80,0x80,0xb8,0x80,0x80,0x93,0x80,0xa9,0x80,0x80,0x80,0x80,0x9a,0x80,0x89,
0x80,0x80,0x80,0xb4,0x80,0x80,0x95,0x80,0xa0,0x80,0x80,0x88,0x80,0x90,0x80,0x86,
0x80,0x80,0x80,0xae,0x80,0x80,0x9d,0x80,0x9b,0x80,0x80,0x83,0x80,0x86,0x80,0x85,
0x80,0x80,0x80,0xad,0x80,0x80,0xa2,0x80,0x99,0x80,0x80,0x80,0x80,0x82,0x80,0x87,
0x80,0x80,0x80,0xa5,0x80,0x80,0xad,0x80,0x92,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0xa7,0x80,0x80,0xad,0x80,0x95,0x80,0x80,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0xa3,0x80,0x80,0xab,0x80,0x94,0x80,0x80,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x9a,0x80,0x80,0xae,0x80,0x87,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x90,0x80,0x80,0xac,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x94,0x80,0x80,0xb5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x92,0x80,0x80,0xba,0x80,0x83,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x8b,0x80,0x80,0xba,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0x81,0x80,0x80,0xc2,0x80,0x80,0x80,0xa4,0x80,0x86,0x80,0x80,0x97,
0x80,0x80,0x80,0x80,0x80,0x80,0xb0,0x80,0x80,0x80,0xa5,0x80,0x8a,0x80,0x80,0x9f,
0x80,0x80,0x80,0x80,0x80,0x80,0xa9,0x80,0x80,0x80,0x93,0x80,0x82,0x80,0x80,0x9a,
0x80,0x80,0x80,0x8c,0x80,0x80,0x98,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x9a,
0x80,0x80,0x80,0x91,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0x8c,0x80,0x80,0x95,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x92,
0x80,0x80,0x80,0x80,0x80,0x80,0x96,0x80,0x80,0x80,0x80,0x9a,0x80,0x80,0x80,0x86,
0x80,0xa2,0x80,0xb7,0x80,0x95,0xd2,0x80,0x80,0x80,0x80,0x80,0xb4,0x80,0x80,0x8b,
0x80,0x80,0x80,0xb7,0xa3,0xad,0x80,0x80,0xab,0x83,0x9c,0x80,0xb4,0x80,0x80,0xc6,
0x80,0x80,0x80,0x94,0x97,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8e,0x90,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8e,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x8e,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x85,0x99,0x80,0x80,0x80,0x80,0x80,0xa1,0x86,0x80,0x80,0x80,0x8a,
0x8b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x8b,0x8b,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x85,0x80,0x80,0x8d,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x83,
0x80,0x83,0x80,0x92,0x80,0x80,0x92,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x94,0x80,0x80,0x8d,0x80,0x80,0x80,0x97,0x80,0xa4,0x80,0x80,0x96,
0x80,0x80,0x80,0x8d,0x87,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x87,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x81,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x85,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8d,0x82,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x90,0x80,0x9f,0x80,0x80,0x8f,0x80,0x80,0x80,0x88,0x80,0x91,0x80,0x80,0x83,
0x80,0x91,0x80,0x86,0x83,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x91,0x86,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x93,0x87,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8b,0x91,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8b,0x85,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8d,0x85,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x86,
0x8f,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x80,0x8d,0xb9,0x80,0x80,0x80,0x80,
0x80,0x92,0x80,0x86,0x80,0x80,0xab,0x80,0x80,0x80,0x89,0x80,0x81,0x80,0x80,0x84,
0x80,0x80,0x80,0x96,0x80,0x80,0x94,0x80,0x80,0x80,0x88,0x80,0x87,0x80,0x80,0x92,
0x80,0x80,0x80,0x93,0x80,0x80,0x8a,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x91,0x80,0x80,0x86,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x93,0x80,0x80,0x88,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x96,0x80,0x80,0x84,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x83,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8d,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x95,0x80,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x81,0x80,0x82,
0x80,0x80,0x80,0x9d,0x88,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x87,0x80,0x84,
0x80,0x80,0x80,0xa2,0x90,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x89,0x80,0x86,
0x80,0x80,0x80,0xa3,0x96,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x88,0x80,0x89,
0x80,0x80,0x80,0xa2,0x98,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,0x80,0x8a,
0x80,0x80,0x80,0x9e,0x99,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x82,0x80,0x8b,
0x80,0x80,0x80,0x9b,0x97,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x97,0x92,0x80,0x80,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x94,0x92,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x99,0x8d,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x99,0x80,0x80,0x80,0x80,0x80,0x9b,0x80,0x86,0x80,0x80,0x8f,
0x80,0x80,0x80,0x86,0x9a,0x80,0x80,0x80,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x87,0x9a,0x80,0x80,0x80,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x84,0x9a,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8d,0x99,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x91,0x99,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x92,0x98,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x92,0x9a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x91,0x9a,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x92,0x9c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x9b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x9b,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x9b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x91,0x9c,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x95,0x9b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x93,0x9d,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8b,0x9e,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x82,
0x80,0x82,0x80,0x92,0xa1,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x80,0xb3,0x80,0x80,0x80,0x80,0x80,0xc0,0x90,0x80,0x80,0x80,0x98,
0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x96,0xc3,0x80,0x87,0x80,0x80,0x9b,
0x80,0x80,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x93,0xbf,0x80,0x80,0x80,0x80,0x9e,
0x80,0x80,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x86,0xef,0x82,0x80,0x80,0x80,0xa1,
0x80,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0xb1,0xf7,0x80,0x99,0x80,0x80,0xa2,
0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0xbf,0xbd,0x80,0xa0,0x8f,0x80,0xa3,
0x80,0x80,0x80,0x84,0x97,0x80,0x80,0x80,0x80,0x85,0x91,0x80,0x80,0x85,0x80,0x8b,
0x80,0x80,0x80,0x90,0x96,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8f,0x97,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x96,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x97,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x99,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x91,0x99,0x80,0x80,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x83,0xaa,0x80,0x80,0x80,0x85,0x80,0x80,0xac,0x80,0x99,0x80,0x80,
0x80,0x80,0x80,0x98,0x80,0x80,0x84,0x80,0x81,0x80,0x80,0x94,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x90,0x80,0x80,0x84,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x8b,
0x84,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0xc9,0x80,0x8a,0x80,0x80,
0x80,0xab,0x80,0x8f,0x80,0x80,0xca,0x80,0x83,0x80,0x80,0x90,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x99,0x80,0x80,0xc4,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x99,
0x80,0x80,0x80,0x90,0x80,0x80,0xbe,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x93,0x80,0x80,0xc1,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x95,0x80,0x80,0xba,0x80,0x80,0x80,0x88,0x80,0x81,0x80,0x80,0x9a,
0x80,0x80,0x80,0x8d,0x80,0x80,0xae,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8f,0x80,0x80,0xad,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x91,0x80,0xb5,0x80,0x8c,0xc4,0x80,0x80,0x80,0x80,0x80,0xad,0x80,0x80,0x94,
0x80,0x80,0x80,0x9f,0x82,0x80,0x80,0x80,0x89,0x80,0x94,0x80,0x8d,0x80,0x80,0xa9,
0x80,0x80,0x80,0x8c,0x80,0x80,0x88,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8c,0x80,0x80,0x87,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x86,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8e,0x80,0x80,0x87,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8c,0x80,0x80,0x86,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8f,0x80,0x80,0x86,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8c,0x80,0x80,0x85,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8e,0x80,0x80,0x84,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x8f,0x80,0x80,0x84,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x8d,0x80,0x80,0x81,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x91,0x80,0x80,0x82,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x90,0x80,0x80,0x84,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8c,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x97,0x80,0x80,0x84,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x8c,
0x80,0x85,0x80,0x90,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x98,0x80,0x80,0x87,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x8a,
0x80,0x85,0x80,0x8e,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x93,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x98,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x93,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x94,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x99,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x94,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x95,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x97,0x80,0x80,0x96,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x80,0x80,0x94,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x93,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x98,0x80,0x80,0x94,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x95,0x80,0x80,0x93,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x98,0x80,0x80,0x8f,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0x95,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x93,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x92,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x94,0x80,0x80,0x84,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x8f,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x91,0x80,0x80,0x84,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x91,0x80,0x80,0x87,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x91,0x80,0x80,0x87,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x8d,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x91,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x92,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x91,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x91,0x80,0x80,0x88,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x92,0x80,0x80,0x8a,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8d,0x80,0x80,0x84,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x80,0x80,0x80,0x94,0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8f,0x80,0x80,0x99,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x8f,0x80,0x80,0x9a,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x9c,0x80,0x82,0x99,0x80,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x93,
0x80,0x80,0x80,0x9a,0x83,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x85,0x80,0x8e,
0x80,0x80,0x80,0x9b,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x97,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x92,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x97,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x80,0x80,0x81,0x80,0x8b,
0x80,0x80,0x80,0x9d,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x80,0x80,0x82,0x80,0x8c,
0x80,0x80,0x80,0xa1,0x80,0x80,0x85,0x80,0x89,0x80,0x80,0x83,0x80,0x92,0x80,0x89,
0x80,0x80,0x80,0xa9,0x80,0x80,0x81,0x80,0x92,0x80,0x80,0x80,0x80,0x88,0x80,0x91,
0x80,0x80,0x80,0x9a,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x85,0x80,0x92,
0x80,0x80,0x80,0x94,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x93,0x80,0x93,0x80,0x8c,
0x80,0x80,0x80,0x97,0x80,0x80,0xa4,0x80,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x87,0x80,0x80,0xa6,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x94,0x80,0x80,0x9a,0x80,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x92,
0x80,0x80,0x80,0x97,0x80,0x80,0xa8,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x99,0x80,0x80,0xb0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0xa1,0x80,0x80,0xbe,0x80,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x8b,
0x80,0x80,0x80,0xa6,0x80,0x80,0xbb,0x80,0x8f,0x80,0x81,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x96,0x80,0x80,0xb8,0x80,0x80,0x80,0x8d,0x80,0xa0,0x80,0x80,0x98,
0x80,0x80,0x80,0x8c,0x80,0x80,0x9d,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x90,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x80,0x80,0x80,0xa5,0x80,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,
0x80,0xab,0x80,0xc7,0x80,0x97,0xd4,0x80,0x86,0x80,0x80,0x80,0xc7,0x80,0x80,0x8f,
0x80,0x80,0x80,0xae,0x9f,0x83,0x80,0x80,0xa1,0x80,0x9f,0x80,0xad,0x80,0x80,0xb8,
0x80,0x80,0x80,0x8c,0x91,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8d,0x90,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8f,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x88,0x9c,0x80,0x80,0x80,0x80,0x80,0x9c,0x82,0x80,0x80,0x80,0x8b,
0x8b,0x80,0x80,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x8f,0x90,0x80,0x80,0x80,0x80,
0x80,0x86,0x80,0x82,0x80,0x80,0x8c,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8c,0x80,0x80,0x8a,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8a,0x80,0x80,0x8c,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x9b,0x80,0x80,0xa1,0x80,0x80,0x80,0x9e,0x80,0xa1,0x80,0x80,0x90,
0x80,0x80,0x80,0x89,0x8e,0x80,0x80,0x80,0x80,0x81,0x8d,0x80,0x86,0x86,0x80,0x96,
0x80,0x80,0x80,0x90,0x90,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x94,0x88,0x80,0x80,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x92,0x83,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x83,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x85,
0x80,0x8f,0x80,0xa0,0x80,0x80,0x8d,0x80,0x80,0x80,0x88,0x80,0x92,0x80,0x80,0x84,
0x80,0x91,0x80,0x87,0x83,0x80,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x90,0x87,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x93,0x88,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8b,0x8f,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x87,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8b,0x8f,0x80,0x80,0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0x8a,
0x90,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0xc2,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x9a,0x80,0x80,0xa8,0x80,0x80,0x80,0x86,0x80,0x90,0x80,0x80,0x92,
0x80,0x80,0x80,0x9c,0x80,0x80,0x92,0x80,0x80,0x80,0x89,0x80,0x88,0x80,0x80,0x94,
0x80,0x80,0x80,0x92,0x80,0x80,0x88,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x92,0x80,0x80,0x86,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x96,0x80,0x80,0x86,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x9a,0x80,0x80,0x81,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x98,0x89,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x81,0x80,0x82,
0x80,0x80,0x80,0x9e,0x8e,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x9d,0x91,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x97,0x92,0x80,0x80,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x93,0x90,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x91,0x8e,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x8d,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8d,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x8c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8b,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x8b,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8a,0x80,0x80,0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8b,0x8c,0x80,0x80,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8b,0x8f,0x80,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8b,0x90,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8c,0x91,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8c,0x92,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8d,0x91,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8e,0x92,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8c,0x94,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8c,0x94,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8c,0x96,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8d,0x96,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8e,0x97,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8d,0x97,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8d,0x98,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8c,0x99,0x80,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8d,0x98,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x83,
0x8a,0x80,0x80,0x80,0xb5,0x80,0x80,0x80,0x80,0x80,0xce,0xa6,0x80,0x80,0x80,0x94,
0xe7,0x80,0x80,0x80,0x80,0x80,0xb6,0x80,0x80,0x80,0xbe,0xb4,0x80,0x80,0x80,0x80,
0xc2,0x9b,0x80,0x80,0x80,0x80,0xe5,0x80,0x80,0x80,0xe0,0x80,0x93,0x80,0x80,0x80,
0xd0,0x80,0x80,0x80,0x80,0x80,0xe2,0x80,0x80,0x80,0xef,0x80,0x9b,0x80,0x80,0x84,
0xd9,0x92,0x80,0x80,0x80,0x80,0xee,0x80,0x80,0x80,0xa6,0x80,0x80,0x80,0x80,0x80,
0xb4,0xa7,0x80,0x82,0x80,0x80,0xf5,0x80,0x80,0x80,0xa4,0x80,0x80,0x80,0x80,0x80,
0xa7,0x80,0x80,0x84,0x80,0x80,0xf5,0x80,0x80,0x80,0xf8,0x80,0xd3,0x80,0x80,0x9a,
0x80,0x80,0x80,0x80,0x80,0x80,0xb9,0x80,0x80,0xce,0x04,0x80,0xf9,0x80,0x80,0xb6,
0x80,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0xc8,0xe4,0x80,0x9f,0x80,0x80,0xb3,
0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x97,0xdf,0x80,0x80,0x80,0x80,0xa6,
0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0xa6,0xe2,0x80,0x80,0x80,0x80,0xab,
0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0xa0,0xe5,0x80,0x80,0x80,0x80,0xa8,
0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0xa7,0xe7,0x80,0x80,0x80,0x80,0xa6,
0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xab,0xe7,0x80,0x81,0x80,0x80,0xa2,
0x80,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0xa2,0xdb,0x80,0x80,0x80,0x80,0x9f,
0x80,0x83,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x88,0xc9,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x80,0x80,0x80,0x97,0x80,0x80,0x80,0xd3,0x80,0x80,0x80,0x80,0x9f,
0x80,0x80,0x80,0x80,0x80,0x80,0x97,0x80,0x80,0x80,0xa4,0x80,0x80,0x80,0x80,0x96,
0x80,0x80,0x80,0x80,0x80,0x80,0xa7,0x80,0x80,0x80,0x83,0x92,0x80,0x81,0x80,0x8d,
0x80,0x80,0x80,0x8a,0x80,0x80,0xc1,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x9c,
0x80,0x80,0x80,0x85,0x80,0x80,0xbd,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x99,
0x80,0x80,0x80,0x8e,0x80,0x80,0xc4,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x96,0x80,0x80,0xc0,0x80,0x80,0x80,0x86,0x80,0x82,0x80,0x80,0x99,
0x80,0x80,0x80,0x92,0x80,0x80,0xb2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x97,
0x80,0x80,0x80,0x8d,0x80,0x80,0xa9,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x91,
0x80,0x8a,0x80,0xb1,0x80,0x8c,0xc5,0x80,0x80,0x80,0x8a,0x80,0xb8,0x80,0x80,0x98,
0x80,0x80,0x80,0x98,0x80,0x80,0x80,0x80,0x81,0x80,0x91,0x80,0x87,0x80,0x80,0xa1,
0x80,0x80,0x80,0x8d,0x80,0x80,0x88,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8e,0x80,0x80,0x89,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x89,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x89,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x89,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x89,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8a,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8d,0x80,0x80,0x8b,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8a,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8d,0x80,0x80,0x89,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x89,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8a,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8d,0x80,0x80,0x89,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8d,0x80,0x80,0x8a,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8c,0x80,0x80,0x89,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8c,0x80,0x80,0x89,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8c,0x80,0x80,0x89,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8d,0x80,0x80,0x89,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8c,0x80,0x80,0x89,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8c,0x80,0x80,0x89,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8c,0x80,0x80,0x89,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8c,0x80,0x80,0x88,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8d,0x80,0x80,0x89,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8a,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x89,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x91,0x80,0x80,0x8b,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x90,0x80,0x80,0x8b,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x80,0x80,0x8c,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x80,0x80,0x8c,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x90,0x80,0x80,0x8b,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8c,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8c,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8d,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8d,0x80,0x80,0x8b,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8c,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8b,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8c,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8d,0x80,0x80,0x8c,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8c,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8d,0x80,0x80,0x8b,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8b,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8d,0x80,0x80,0x8b,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8c,0x80,0x80,0x8c,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8c,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8d,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8d,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x88,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x9b,0x84,0x80,0x80,0x80,0x8d,
0x80,0x83,0x80,0x80,0x80,0x80,0x98,0x80,0x80,0x80,0x85,0x80,0x80,0x83,0x80,0x8c,
0x80,0x80,0x80,0x93,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x93,0x80,0x80,0x94,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0xa4,0x80,0x80,0xa0,0x80,0x80,0x80,0x8b,0x80,0x94,0x80,0x80,0x92,
0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0x8a,0x80,0x80,0x8b,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8c,0x80,0x80,0x8f,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8f,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8a,0x80,0x80,0x8b,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x87,0x80,0x80,0x8c,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0x82,0x80,0x80,0x89,0x80,0x80,0x80,0x99,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x80,0x80,0x80,0x96,0x80,0x80,0x80,0x99,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x80,0x80,0x80,0xa5,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x81,
0x80,0x80,0x80,0x8a,0x80,0x80,0x9d,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x89,0x80,0x80,0x95,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x9e,0x80,0x80,0xaf,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x94,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x8d,0x80,0x80,0xa6,0x80,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x9c,0x80,0x80,0xa9,0x80,0x86,0x80,0x80,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0xa2,0x80,0x80,0xb0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0x88,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x96,
0x80,0x80,0x80,0xa0,0x80,0x80,0xaa,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x97,
0x80,0x80,0x80,0x8f,0x80,0x80,0x9c,0x80,0x80,0x80,0x83,0x80,0x83,0x80,0x80,0x97,
0x80,0x80,0x80,0x90,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x8b,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x89,0x80,0x88,0x80,0x87,
0x80,0x94,0x80,0xd9,0x80,0xc0,0xa0,0x80,0xa3,0x80,0x80,0x80,0xb9,0x81,0x80,0xa4,
0x80,0x80,0x80,0xac,0x9a,0x80,0x80,0x80,0x82,0x80,0x93,0x80,0x80,0x80,0x80,0x99,
0x80,0x80,0x80,0x8c,0x8a,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8f,0x8c,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x92,0x93,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x85,0x94,0x80,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x8d,0x80,0x80,
0x80,0x8a,0x80,0x95,0x88,0x80,0x80,0x80,0x8b,0x80,0x80,0x89,0x80,0x8e,0x80,0x80,
0x80,0x80,0x80,0xa3,0x89,0x80,0x80,0x80,0x91,0x80,0x80,0x83,0x80,0x8c,0x80,0x82,
0x80,0x80,0x80,0xa2,0x8a,0x80,0x80,0x80,0x90,0x80,0x80,0x85,0x80,0x91,0x80,0x82,
0x80,0x80,0x80,0xa2,0x82,0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x8e,0x80,0x80,
0x80,0x92,0x80,0xb0,0x80,0x80,0x93,0x80,0x94,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0xa0,0x80,0x80,0x81,0x80,0x8a,0x80,0x98,0x80,0x9e,0x80,0x80,0x9a,
0x80,0x80,0x80,0x88,0x87,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8b,0x8b,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x90,0x8c,0x80,0x80,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x92,0x8d,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x81,0x80,0x82,
0x80,0x8b,0x80,0xa6,0x80,0x80,0x84,0x80,0x81,0x80,0x85,0x80,0x8d,0x80,0x80,0x86,
0x80,0x91,0x80,0x87,0x84,0x80,0x80,0x80,0x80,0x80,0x81,0x8b,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x90,0x87,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x92,0x8b,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x88,0x8f,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8a,0x81,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x80,0x95,0x80,0x80,0x80,0x82,0x80,0x9a,0x90,0x80,0x80,0x80,0x8c,
0x80,0x98,0x80,0x80,0x80,0x80,0xa4,0x80,0x80,0x80,0x80,0xaa,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0xa4,0x80,0x80,0xa2,0x80,0x80,0x80,0x86,0x80,0x98,0x80,0x80,0x9b,
0x80,0x80,0x80,0x9c,0x80,0x80,0x8b,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x93,0x80,0x80,0x88,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x95,0x80,0x80,0x84,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x97,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0xa1,0x8b,0x80,0x80,0x80,0x8d,0x80,0x83,0x80,0x8b,0x80,0x80,0x91,
0x80,0x80,0x80,0x97,0x9b,0x80,0x80,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x94,0x99,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x92,0x95,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x91,0x94,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x94,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x91,0x93,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x93,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x90,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8e,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8f,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x8e,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x91,0x8e,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x91,0x90,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x91,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x92,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x94,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x94,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x94,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x95,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x95,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x96,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x96,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8d,0x97,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x97,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x97,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x99,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x97,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8d,0x97,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8f,0x99,0x80,0x80,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x86,
0xc0,0x80,0x80,0x80,0x9d,0x80,0x80,0x80,0x80,0x80,0x98,0xf4,0x80,0x80,0x80,0x80,
0x80,0xb4,0x80,0x80,0x80,0x80,0xc1,0x80,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x88,0x80,0x80,0xb6,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8b,
0x80,0x81,0x80,0xa5,0x80,0x8d,0xb7,0x80,0x91,0x80,0x80,0x80,0x80,0x8d,0x80,0x8a,
0x80,0x80,0x80,0xc5,0x80,0x86,0xac,0x80,0xb7,0x80,0x80,0x80,0x80,0x8e,0x80,0x84,
0x80,0x80,0x80,0xc0,0x80,0x80,0x9d,0x80,0xc6,0x80,0x80,0x8e,0x80,0x82,0x80,0x84,
0x80,0x80,0x80,0xb2,0x80,0x80,0xa1,0x80,0xaf,0x80,0x80,0x8d,0x80,0x85,0x80,0x89,
0x84,0x80,0x80,0xb0,0x80,0x80,0xcd,0x80,0x80,0x80,0x9c,0x80,0x80,0x80,0x80,0x84,
0xc5,0x80,0x80,0x80,0x80,0x80,0xf3,0x80,0x80,0x80,0xd6,0x80,0x9a,0x80,0x80,0x89,
0xd8,0x8a,0x80,0x80,0x80,0x80,0xfb,0x80,0x80,0x80,0xc7,0x80,0x91,0x80,0x80,0x80,
0xd3,0x80,0x80,0x80,0x80,0x80,0xf9,0x80,0x80,0x80,0xc5,0x80,0x9d,0x80,0x80,0x80,
0xc8,0x8c,0x80,0x80,0x80,0x80,0xfb,0x80,0x80,0x80,0xa9,0x80,0xa1,0x80,0x80,0x80,
0xae,0x8e,0x80,0x8d,0x80,0x80,0xe8,0x80,0x87,0x80,0x82,0x80,0xac,0x80,0x80,0x80,
0x98,0x87,0x80,0xa1,0x80,0x80,0xbc,0x80,0xad,0x80,0x80,0x80,0x87,0x83,0x80,0x80,
0x8c,0x80,0x80,0xa4,0x80,0x80,0xb0,0x80,0xa7,0x80,0x80,0x80,0x80,0x99,0x80,0x80,
0x81,0x84,0x80,0xaa,0x80,0x80,0xaa,0x80,0xae,0x80,0x80,0x90,0x80,0xa1,0x80,0x80,
0x8b,0x81,0x80,0xab,0x80,0x80,0xb5,0x80,0xb2,0x80,0x80,0xa3,0x80,0x95,0x80,0x80,
0x8c,0x86,0x80,0x9e,0x80,0x80,0xde,0x80,0x9f,0x80,0x80,0x86,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8c,0x80,0x80,0xdc,0x80,0x86,0x80,0x80,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x9a,0x80,0x80,0xd3,0x80,0x82,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x98,0x80,0x80,0xcf,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0x95,0x80,0x80,0xc9,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x97,0x80,0x80,0xc1,0x80,0x80,0x80,0x84,0x80,0x81,0x80,0x80,0x9a,
0x80,0x80,0x80,0x97,0x80,0x80,0xb3,0x80,0x80,0x80,0x84,0x80,0x81,0x80,0x80,0x9b,
0x80,0x80,0x80,0x82,0x80,0x80,0xa9,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x8e,
0x80,0x8b,0x80,0xb9,0x80,0x9d,0xc9,0x80,0x80,0x80,0x8d,0x80,0xc7,0x80,0x80,0x9e,
0x80,0x80,0x80,0x99,0x80,0x80,0x82,0x80,0x80,0x80,0x8b,0x80,0x81,0x80,0x80,0x99,
0x80,0x80,0x80,0x8e,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8a,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x89,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x89,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x89,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8d,0x80,0x80,0x89,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x89,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8a,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8d,0x80,0x80,0x88,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8a,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8b,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8d,0x80,0x80,0x8a,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8d,0x80,0x80,0x8a,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8b,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8d,0x80,0x80,0x8b,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8b,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8a,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8b,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x8b,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8b,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8b,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x80,0x80,0x8b,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8b,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8c,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x8b,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8b,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8c,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x91,0x80,0x80,0x8c,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8a,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8b,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8b,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8b,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8c,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8b,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8c,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8c,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8c,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8d,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8d,0x80,0x80,0x8b,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x90,0x80,0x80,0x8c,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x80,0xab,0x95,0x80,0x80,0x80,0x96,
0xab,0x85,0x80,0x80,0x80,0x80,0xca,0x80,0x80,0x80,0xab,0xa0,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x80,0x80,0x80,0xd7,0x80,0x80,0x80,0xd1,0x80,0xac,0x80,0x80,0x9d,
0x80,0x80,0x80,0x80,0x80,0x80,0xb8,0x80,0x80,0x86,0xc9,0x80,0xaf,0x80,0x80,0xa7,
0x80,0x80,0x80,0x80,0x80,0x80,0x99,0x80,0x80,0x80,0xa6,0x80,0x88,0x80,0x80,0xa1,
0x80,0x80,0x80,0x92,0x80,0x80,0x9d,0x80,0x80,0x80,0x95,0x80,0x89,0x80,0x80,0x96,
0x80,0x80,0x80,0x89,0x80,0x80,0x83,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0x8a,0x80,0x80,0x8c,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x88,0x80,0x80,0x8c,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x80,0x80,0x80,0x95,0x80,0x80,0x80,0x9f,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x80,0x80,0x80,0x9c,0x80,0x80,0x80,0xa4,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x80,0x80,0x80,0xb2,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8a,0x80,0x80,0xa1,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x80,0x80,0x98,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x96,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x91,0x80,0x80,0x96,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x88,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x89,
0x80,0x84,0x80,0x96,0x80,0x80,0xaa,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x95,0x80,0x80,0x9d,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x95,0x80,0x80,0x90,0x80,0x83,0x80,0x80,0x80,0x80,0x82,0x80,0x91,
0x80,0x80,0x80,0x90,0x80,0x80,0x9b,0x80,0x80,0x80,0x85,0x87,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x85,0x80,0x80,0xae,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x9d,0x80,0x80,0xa7,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x9b,0x80,0x80,0xa8,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x92,0x80,0x80,0xab,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x89,0x80,0x80,0xa2,0x80,0x80,0x80,0x8a,0x80,0x86,0x80,0x80,0x93,
0x80,0x80,0x80,0x87,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0xc2,0x80,0xa7,0x9b,0x80,0x98,0x80,0xa3,0x80,0xcd,0x80,0x80,0xae,
0x80,0x80,0x80,0x8a,0x8d,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8c,0x8a,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8d,0x8c,0x80,0x80,0x80,0x80,0x80,0x95,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x86,0x8b,0x80,0x80,0x80,0x80,0x80,0x96,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x82,0x84,0x80,0x80,0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x83,0x84,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x87,0x85,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x87,0x82,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x87,0x81,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x82,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x97,0x80,0x80,0x86,0x80,0x80,0x80,0x91,0x80,0x8a,0x80,0x80,0x8c,
0x80,0x80,0x80,0x8c,0x8a,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x87,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x85,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8a,0x88,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x86,0x80,0x9b,0x80,0x80,0x82,0x80,0x80,0x80,0x8b,0x80,0x8a,0x80,0x80,0x84,
0x80,0x91,0x80,0x88,0x85,0x80,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x91,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x91,0x8d,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x85,0x88,0x80,0x80,0x80,0x80,0x80,0x88,0x86,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x80,0x98,0xac,0x80,0x80,0x80,0x8c,
0x80,0xb2,0x80,0x80,0x80,0x80,0xb9,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0xaa,0x80,0x80,0x9d,0x80,0x86,0x80,0x86,0x80,0x95,0x80,0x80,0x9b,
0x80,0x80,0x80,0x9a,0x80,0x80,0x89,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x92,
0x80,0x80,0x80,0x93,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x94,0x80,0x80,0x82,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x8b,
0x80,0x82,0x80,0x9e,0x80,0x80,0x83,0x80,0x81,0x80,0x80,0x80,0x85,0x80,0x80,0x88,
0x80,0x80,0x80,0x9b,0x96,0x80,0x80,0x80,0x81,0x80,0x94,0x80,0x82,0x80,0x80,0x92,
0x80,0x80,0x80,0x89,0x90,0x80,0x80,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x89,0x91,0x80,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x89,0x90,0x80,0x80,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x88,0x8d,0x80,0x80,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x88,0x8c,0x80,0x80,0x80,0x80,0x80,0x94,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x86,0x8a,0x80,0x80,0x80,0x80,0x80,0x95,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x86,0x8a,0x80,0x80,0x80,0x80,0x80,0x94,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x87,0x8a,0x80,0x80,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x88,0x8b,0x80,0x80,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x88,0x8b,0x80,0x80,0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x88,0x8b,0x80,0x80,0x80,0x80,0x80,0x94,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x88,0x8a,0x80,0x80,0x80,0x80,0x80,0x94,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x88,0x8b,0x80,0x80,0x80,0x80,0x80,0x96,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x86,0x8d,0x80,0x80,0x80,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x86,0x8d,0x80,0x80,0x80,0x80,0x80,0x98,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x85,0x8e,0x80,0x80,0x80,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x86,0x8f,0x80,0x80,0x80,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x86,0x8f,0x80,0x80,0x80,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x86,0x8f,0x80,0x80,0x80,0x80,0x80,0x95,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x88,0x8f,0x80,0x80,0x80,0x80,0x80,0x95,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x88,0x8f,0x80,0x80,0x80,0x80,0x80,0x94,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x89,0x90,0x80,0x80,0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8a,0x92,0x80,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8c,0x93,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x95,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8b,0x98,0x80,0x80,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8d,0x91,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x90,0x99,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x82,
0x83,0x80,0x80,0x80,0xb6,0x80,0x80,0x80,0x8b,0x80,0xb6,0x9b,0x80,0x80,0x80,0x93,
0xb5,0x80,0x80,0x80,0x80,0x80,0x98,0x80,0x80,0x80,0x80,0xe6,0x80,0x80,0x80,0x80,
0x80,0x87,0x80,0x80,0x80,0x80,0xbe,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x87,
0x80,0x83,0x80,0x91,0x80,0x80,0xbf,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0xbe,0x80,0xe0,0x9c,0x80,0x95,0x80,0x80,0x80,0xcd,0x9b,0x80,0xb0,
0x80,0x80,0x80,0xc9,0xb4,0xba,0x80,0x80,0xb4,0x80,0x80,0x80,0x80,0x9f,0x80,0x9d,
0x80,0x80,0x80,0x93,0xb7,0x80,0x80,0x80,0x87,0x80,0x80,0xd6,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x80,0x80,0x80,0x9d,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8c,0x80,0x80,0xa7,0x80,0x80,0x80,0x80,0x88,0x80,0x8d,0x80,0x80,
0x80,0x80,0x80,0xa6,0x80,0x80,0xac,0x80,0x93,0x80,0x80,0x88,0x80,0x85,0x80,0x86,
0x80,0x80,0x80,0xab,0x80,0x80,0xb4,0x80,0x91,0x80,0x80,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0xaa,0x80,0x86,0xb3,0x80,0x82,0x80,0x80,0x80,0x80,0x81,0x80,0x92,
0x80,0x80,0x80,0xc0,0x80,0xab,0xa4,0x80,0x9d,0x80,0x80,0x80,0x89,0x84,0x80,0x9a,
0x80,0x80,0x80,0xcc,0x80,0xab,0x85,0x80,0xb6,0x80,0x80,0x80,0x85,0x88,0x80,0x9f,
0x80,0x80,0x80,0xb2,0x91,0x80,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x83,0x80,0x95,
0x80,0x80,0x80,0xa6,0x8c,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,0x80,0x8b,
0x80,0x80,0x80,0x9c,0x92,0x80,0x80,0x80,0x91,0x80,0x80,0x8d,0x80,0x8f,0x80,0x85,
0x80,0x80,0x80,0x92,0x99,0x80,0x80,0x80,0x8f,0x80,0x80,0xaa,0x80,0x8d,0x80,0x86,
0x80,0x80,0x80,0x96,0x81,0x80,0x80,0x80,0x80,0x80,0x80,0xc1,0x80,0xa9,0x80,0x80,
0x80,0x80,0x80,0xb2,0x80,0x80,0x9f,0x80,0x92,0x80,0x80,0x98,0x80,0x8c,0x80,0x88,
0x80,0x80,0x80,0xac,0x80,0x80,0xad,0x80,0x8f,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0xa5,0x80,0x80,0xb1,0x80,0x88,0x80,0x80,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0xa4,0x80,0x80,0xb7,0x80,0x84,0x80,0x80,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0xa3,0x80,0x80,0xbc,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x99,0x80,0x80,0xb5,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x9b,
0x80,0x80,0x80,0x80,0x80,0x80,0xb2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0xcb,0x80,0xb0,0xba,0x80,0x97,0x80,0x92,0x80,0xcd,0x80,0x80,0xac,
0x80,0x80,0x80,0x95,0x80,0x80,0x84,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0x8d,0x80,0x80,0x87,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x88,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8d,0x80,0x80,0x88,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8a,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x89,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x8a,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x89,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8a,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x89,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8a,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8a,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8b,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8b,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8b,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8b,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8b,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x80,0x80,0x8b,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x80,0x80,0x8c,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8b,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8b,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x8e,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x8b,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8b,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8b,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8c,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8b,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8b,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8b,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8b,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8c,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8c,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x80,0x80,0x8c,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x8e,
0x95,0x80,0x80,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0xa1,0xc8,0x80,0x80,0x80,0x80,
0x80,0xb8,0x80,0x80,0x80,0x80,0xd1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x94,0x80,0x80,0xc6,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x99,0x80,0x80,0xd7,0x80,0x80,0x80,0x98,0x80,0x80,0x80,0x80,0x90,
0x85,0x80,0x80,0x86,0x80,0x80,0xe5,0x80,0x80,0x80,0xbe,0x80,0x94,0x80,0x80,0x94,
0x80,0x80,0x80,0x80,0x80,0x80,0xda,0x80,0x80,0x80,0xe2,0x80,0xb9,0x80,0x80,0xa2,
0x80,0x80,0x80,0x80,0x80,0x80,0xaf,0x80,0x80,0x9d,0xe1,0x80,0xae,0x80,0x80,0xac,
0x80,0x80,0x80,0x80,0x80,0x80,0xa7,0x80,0x80,0x82,0xca,0x80,0x83,0x80,0x80,0x9c,
0x80,0x80,0x80,0x80,0x80,0x80,0xa4,0x80,0x80,0x80,0xa6,0x80,0x80,0x80,0x80,0x94,
0x80,0x84,0x80,0x83,0x80,0x80,0xa8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x98,0x80,0x80,0xa0,0x80,0x8b,0x80,0x80,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0xa6,0x80,0x80,0x9a,0x80,0x8c,0x80,0x80,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x9c,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0x92,0x80,0x80,0x96,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8c,0x80,0x80,0x97,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x91,0x80,0x80,0x9d,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x92,0x80,0x80,0x94,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x98,0x80,0x80,0x98,0x80,0x84,0x80,0x80,0x83,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x9c,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x90,0x80,0x80,0x99,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x85,0x80,0x80,0xa7,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,
0x80,0x87,0x80,0xa7,0x80,0x80,0xbf,0x80,0x8c,0x80,0x80,0x80,0x85,0x80,0x80,0x81,
0x80,0x80,0x80,0xa2,0x80,0x80,0x8c,0x80,0x9b,0x80,0x82,0x80,0x80,0x80,0x80,0x9f,
0x80,0x82,0x80,0x87,0x80,0x80,0xa8,0x80,0x80,0x80,0x82,0x86,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x89,0x80,0x80,0xb2,0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x89,0x80,0x80,0xb0,0x80,0x80,0x80,0x98,0x80,0x85,0x80,0x80,0x95,
0x80,0x82,0x80,0x88,0x80,0x80,0xaf,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x87,
0x80,0x80,0x80,0xbc,0x80,0xa6,0x83,0x80,0xa1,0x80,0xa2,0x80,0xbe,0x80,0x80,0xb7,
0x80,0x80,0x80,0x8c,0x8c,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8d,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x89,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8d,0x8c,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8f,0x8e,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x93,0x89,0x80,0x80,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x91,0x85,0x80,0x80,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x91,0x84,0x80,0x80,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x91,0x85,0x80,0x80,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x92,0x86,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x9c,0x83,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8e,0x88,0x80,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x88,0x89,0x80,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x89,0x86,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8d,0x88,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x88,
0x80,0x84,0x80,0x98,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x88,0x80,0x80,0x85,
0x80,0x90,0x80,0x88,0x84,0x80,0x80,0x80,0x80,0x80,0x82,0x89,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x91,0x89,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x90,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x88,0x8d,0x80,0x80,0x80,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x97,0x8b,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x8b,0x80,0x80,0x80,0xa1,0x80,0x80,0x80,0x80,0x80,0x8b,0xcc,0x80,0x80,0x80,0x80,
0x80,0xb6,0x80,0x8a,0x80,0x80,0xbd,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0xa8,0x80,0x80,0x92,0x80,0x88,0x80,0x87,0x80,0x91,0x80,0x80,0x9d,
0x80,0x80,0x80,0x96,0x80,0x80,0x86,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x94,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x97,0x80,0x80,0x83,0x80,0x80,0x80,0x87,0x80,0x82,0x80,0x80,0x8c,
0x80,0x80,0x80,0x97,0x87,0x80,0x80,0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x89,0x88,0x80,0x80,0x80,0x80,0x80,0x99,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x83,0x84,0x80,0x80,0x80,0x80,0x80,0x99,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x82,0x82,0x80,0x80,0x80,0x80,0x80,0x9b,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x81,0x81,0x80,0x80,0x80,0x80,0x80,0x9a,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x80,0x80,0x99,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x82,0x81,0x80,0x80,0x80,0x80,0x80,0x98,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x80,0x80,0x98,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x82,0x80,0x80,0x81,0x80,0x80,0x80,0x9a,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x82,0x80,0x80,0x82,0x80,0x80,0x80,0x9a,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x83,0x80,0x80,0x84,0x80,0x80,0x80,0x99,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x84,0x80,0x80,0x86,0x80,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x86,0x80,0x80,0x83,0x80,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x85,0x80,0x80,0x81,0x80,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x85,0x80,0x80,0x82,0x80,0x80,0x80,0x98,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x85,0x80,0x80,0x81,0x80,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x80,0x80,0x95,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x80,0x80,0x94,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8a,0x83,0x80,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8b,0x84,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8d,0x88,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x8a,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x8c,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x8e,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x92,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8d,0x9b,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x94,0x8d,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x81,
0x80,0x80,0x80,0x8b,0xa4,0x80,0x80,0x80,0x80,0x80,0x98,0x80,0x80,0x80,0x80,0x8e,
0xae,0x80,0x80,0x80,0xa7,0x80,0x80,0x80,0x80,0x80,0xbc,0xdd,0x80,0x80,0x80,0x80,
0x80,0xca,0x80,0x80,0x80,0x80,0xc6,0x80,0x80,0x80,0x80,0x9a,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8e,0x80,0x80,0xb9,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x92,0x80,0x80,0xb8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0xc0,0x80,0xa1,0xb9,0x80,0x80,0x80,0xbe,0x80,0xe6,0x80,0x80,0xba,
0x80,0x80,0x80,0x85,0x97,0x93,0x80,0x80,0x80,0x9a,0x9e,0x80,0x9f,0x8d,0x80,0xa7,
0x99,0x84,0x80,0x80,0x99,0x80,0x80,0x80,0x80,0x80,0x80,0xe7,0x80,0xa5,0x80,0x80,
0x80,0x83,0x80,0x9e,0x80,0x80,0x9a,0x80,0x9a,0x80,0x80,0x87,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x9e,0x80,0x80,0x98,0x80,0x83,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x9c,0x80,0x80,0x92,0x80,0x89,0x80,0x80,0x81,0x80,0x89,0x80,0x8c,
0x80,0x80,0x80,0xa3,0x80,0x80,0x9e,0x80,0x84,0x80,0x80,0x8a,0x80,0x84,0x80,0x86,
0x80,0x80,0x80,0xb1,0x80,0x80,0xac,0x80,0x8f,0x80,0x80,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0xbd,0x80,0x9e,0x97,0x80,0x96,0x80,0x80,0x80,0xa1,0x80,0x80,0x9e,
0x80,0x80,0x80,0xb1,0x99,0x89,0x80,0x80,0x94,0x80,0x83,0x80,0x85,0x82,0x80,0xa1,
0x80,0x80,0x80,0x98,0x8c,0x80,0x80,0x80,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x99,0x85,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x94,0x97,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x89,
0x80,0x80,0x80,0x8a,0x9a,0x80,0x80,0x80,0x81,0x80,0x80,0xab,0x80,0x90,0x80,0x80,
0x80,0x80,0x80,0x84,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0xae,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x87,0x80,0x80,0x9d,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x93,0x80,0x80,0xa6,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x98,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x9f,0x80,0x80,0xa5,0x80,0x80,0x80,0x80,0x80,0x80,0x81,0x80,0x8e,
0x80,0x80,0x80,0xa2,0x80,0x80,0xa7,0x80,0x87,0x80,0x80,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x99,0x80,0x80,0xac,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x94,0x80,0x80,0xb7,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0xc5,0x80,0xaa,0xaa,0x80,0x92,0x80,0x9a,0x80,0xc7,0x80,0x80,0xb2,
0x80,0x80,0x80,0x90,0x80,0x80,0x86,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x88,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x89,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x89,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8a,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8a,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x80,0x80,0x89,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x8a,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x8a,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8b,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8a,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x80,0x80,0x8a,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x91,0x80,0x80,0x8a,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x8a,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8b,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8b,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x91,0x80,0x80,0x8a,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x8e,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8c,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8b,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8b,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8b,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8b,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8c,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8c,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8c,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8c,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x80,0x80,0x8b,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x90,0x80,0x80,0x8c,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x80,0xb1,0x9a,0x80,0x80,0x80,0x96,
0x95,0x86,0x80,0x80,0x80,0x80,0xc0,0x80,0x80,0x80,0x80,0xb5,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8a,0x80,0x80,0xc6,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0x8f,0x80,0x80,0xc4,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8e,0x80,0x80,0xc3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x90,0x80,0x80,0xc4,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x96,0x80,0x80,0xcb,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x95,0x80,0x80,0xd9,0x80,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0x82,0x80,0x80,0xe0,0x80,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x80,0x80,0x80,0xd7,0x80,0x80,0x80,0xbc,0x80,0xa0,0x80,0x80,0x9e,
0x80,0x80,0x80,0x80,0x80,0x80,0xb9,0x80,0x80,0x80,0xb7,0x80,0xc0,0x80,0x80,0xae,
0x80,0x80,0x80,0x80,0x80,0x83,0x8f,0x80,0x80,0x80,0x90,0x80,0x80,0x8f,0x80,0x9f,
0x80,0x80,0x80,0x99,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x99,0x80,0x80,0x8c,0x80,0x83,0x80,0x80,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x97,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x94,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x80,0x80,0x81,0x80,0x85,
0x80,0x80,0x80,0xa4,0x80,0x80,0x90,0x80,0x88,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x9a,0x80,0x80,0x85,0x80,0x86,0x80,0x80,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x90,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x9d,0x80,0x80,0x95,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x9b,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x8c,
0x80,0x80,0x80,0xa0,0x81,0x85,0x80,0x80,0x90,0x80,0x80,0x85,0x80,0x9a,0x80,0x89,
0x80,0x80,0x80,0xbb,0x82,0x84,0x81,0x80,0x9d,0x80,0x80,0x80,0x80,0x89,0x80,0x90,
0x80,0x80,0x80,0x98,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x92,0x80,0x8a,0x80,0x85,
0x80,0x80,0x80,0x95,0x80,0x80,0x8f,0x80,0x94,0x80,0x80,0x95,0x80,0x84,0x80,0x84,
0x80,0x80,0x80,0x9c,0x80,0x80,0xb9,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0xa6,0x80,0x80,0xb0,0x80,0x97,0x80,0x80,0x80,0x84,0x80,0x80,0x92,
0x80,0x87,0x80,0xaa,0x80,0x80,0xb8,0x80,0x80,0x80,0x80,0x80,0x95,0x80,0x80,0x87,
0x80,0x80,0x80,0xb2,0x89,0x92,0x80,0x80,0x9c,0x80,0xa3,0x80,0xb0,0x80,0x80,0xb8,
0x80,0x80,0x80,0x8a,0x87,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8b,0x88,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8c,0x88,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8b,0x89,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x89,0x89,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x89,0x8a,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8a,0x89,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8c,0x87,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8b,0x85,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8c,0x84,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8b,0x84,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8b,0x88,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x85,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x85,
0x80,0x81,0x80,0x8d,0x80,0x80,0x8a,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8d,0x80,0x80,0x89,0x80,0x80,0x80,0x92,0x80,0x87,0x80,0x80,0x86,
0x80,0x8c,0x80,0x98,0x80,0x80,0x87,0x80,0x80,0x80,0x88,0x80,0x93,0x80,0x80,0x84,
0x80,0x90,0x80,0x89,0x85,0x80,0x80,0x80,0x80,0x80,0x81,0x89,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x92,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x90,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8c,0x8e,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8f,0x91,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x89,
0x95,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x80,0x80,0xd6,0x80,0x80,0x80,0x80,
0x80,0x9b,0x80,0x9c,0x80,0x80,0xb1,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x89,
0x80,0x80,0x80,0xa4,0x80,0x80,0x8c,0x80,0x86,0x80,0x89,0x80,0x8c,0x80,0x80,0x9a,
0x80,0x80,0x80,0x94,0x80,0x80,0x85,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x95,0x80,0x80,0x86,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x9a,0x81,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x91,0x86,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8d,0x83,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8b,0x81,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8d,0x80,0x80,0x81,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x90,0x80,0x80,0x83,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x80,0x80,0x82,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x80,0x80,0x82,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x80,0x80,0x84,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x91,0x80,0x80,0x85,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x91,0x80,0x80,0x85,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x92,0x80,0x80,0x83,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x94,0x80,0x80,0x82,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x95,0x80,0x80,0x81,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x93,0x80,0x80,0x81,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x94,0x80,0x80,0x80,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x95,0x81,0x80,0x80,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x95,0x82,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x94,0x83,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x95,0x83,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x93,0x87,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x93,0x88,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x93,0x8b,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x91,0x8d,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x92,0x8e,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x92,0x91,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x91,0x95,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x90,0x99,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x8c,0x80,0x87,0x9e,0x80,0x80,0x80,0x80,0x80,0xa0,0x8b,0x80,0x80,0x80,0x86,
0x96,0x80,0x80,0x80,0x95,0x80,0x80,0x80,0x80,0x80,0xe2,0x94,0x80,0x80,0x80,0x94,
0xba,0x90,0x80,0x80,0x80,0x80,0xae,0x80,0x80,0x80,0x88,0xb2,0x80,0x80,0x80,0x80,
0x80,0x8e,0x80,0x80,0x80,0x80,0xc1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x90,0x80,0x80,0xb8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x93,0x80,0x80,0xbf,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0x9e,0x80,0x80,0xd7,0x80,0x80,0x80,0xd1,0x80,0x93,0x80,0x80,0x9b,
0x8b,0x80,0x80,0x80,0x80,0x80,0xcc,0x80,0x80,0x9f,0x09,0x80,0xe3,0x80,0x80,0xb0,
0x80,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0xb8,0xab,0x80,0xa5,0x80,0x80,0xa1,
0x80,0x80,0x80,0x81,0x8c,0x84,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0xb8,0x80,0x8f,
0x80,0x80,0x80,0xaa,0x80,0x80,0x86,0x80,0x86,0x80,0x80,0x88,0x80,0x97,0x80,0x83,
0x80,0x80,0x80,0xae,0x80,0x80,0x8c,0x80,0xa5,0x80,0x80,0x86,0x80,0x83,0x80,0x80,
0x80,0x80,0x80,0xaa,0x80,0x80,0x92,0x80,0xa2,0x80,0x80,0x87,0x80,0x87,0x80,0x80,
0x80,0x80,0x80,0xbd,0x80,0x80,0x8f,0x80,0xaf,0x80,0x80,0x80,0x80,0x83,0x80,0x8a,
0x80,0x80,0x80,0xbb,0x80,0x80,0x91,0x80,0x9c,0x80,0x86,0x80,0x8d,0x80,0x80,0x92,
0x80,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x80,0x80,0x94,0x80,0x8f,0x80,0x80,0x94,
0x80,0x80,0x80,0x8c,0x8c,0x80,0x80,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x97,0x94,0x80,0x80,0x80,0x80,0x80,0x82,0x80,0x80,0x82,0x80,0x88,
0x80,0x80,0x80,0x93,0x8d,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x81,0x9a,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x86,
0x80,0x8b,0x80,0x8e,0x96,0x80,0x80,0x80,0x87,0x80,0x80,0xbd,0x80,0xac,0x80,0x80,
0x80,0x80,0x80,0xad,0x80,0x80,0x8e,0x80,0xa5,0x80,0x80,0xa2,0x80,0x89,0x80,0x80,
0x80,0x80,0x80,0xa4,0x80,0x80,0xa2,0x80,0x93,0x80,0x80,0x89,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x93,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x97,0x80,0x80,0xae,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0xac,0x80,0x80,0xa6,0x80,0x9c,0x80,0x80,0x80,0x80,0x90,0x80,0x81,
0x80,0x80,0x80,0xc7,0x80,0x89,0x8d,0x80,0xd4,0x80,0x80,0x80,0x80,0xab,0x80,0x80,
0x80,0x80,0x80,0xbe,0x80,0x80,0x86,0x80,0xbc,0x80,0x80,0xb4,0x80,0x8a,0x80,0x80,
0x80,0x80,0x80,0xc8,0x80,0x8e,0xa3,0x80,0x99,0x80,0x95,0x80,0xb7,0x80,0x80,0xa8,
0x80,0x80,0x80,0x8d,0x80,0x80,0x88,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8e,0x80,0x80,0x88,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x89,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x87,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x80,0x80,0x88,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x89,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x88,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x89,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x89,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x89,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x80,0x80,0x8a,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8a,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x91,0x80,0x80,0x8b,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8c,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8b,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8b,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8a,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8b,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8b,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x8b,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x85,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x8e,
0x9c,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x98,0xd0,0x80,0x80,0x80,0x80,
0x80,0xb4,0x80,0x80,0x80,0x80,0xd2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x90,0x80,0x80,0xc3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x8f,0x80,0x80,0xc4,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x90,0x80,0x80,0xc3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8f,0x80,0x80,0xc4,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x90,0x80,0x80,0xc4,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x90,0x80,0x80,0xc5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x90,0x80,0x80,0xc6,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x94,0x80,0x80,0xcb,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0xa1,0x80,0x80,0xe0,0x80,0x80,0x80,0xa8,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x80,0x80,0x80,0xe0,0x80,0x80,0x80,0xd9,0x80,0xb2,0x80,0x80,0xa2,
0x80,0x80,0x80,0x80,0x80,0x80,0xc1,0x80,0x80,0x97,0xe0,0x80,0xbe,0x80,0x80,0xab,
0x80,0x80,0x80,0x80,0x80,0x80,0xa0,0x80,0x80,0x91,0xc5,0x80,0xa3,0x80,0x80,0xa9,
0x80,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x9c,0x80,0x80,0x8a,0x80,0x9e,
0x80,0x80,0x80,0x8b,0x80,0x80,0x84,0x80,0x80,0x80,0x82,0x80,0x80,0x81,0x80,0x90,
0x80,0x80,0x80,0x96,0x80,0x80,0x82,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x85,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x98,0x80,0x80,0x94,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x96,0x80,0x80,0x92,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x96,0x80,0x80,0x88,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x85,
0x80,0x82,0x80,0x85,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x8e,
0x80,0x9a,0x80,0x95,0x80,0x80,0x9d,0x80,0x80,0x80,0x80,0x80,0x80,0x81,0x80,0x84,
0x80,0x80,0x80,0xa0,0x80,0x80,0x89,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x9e,
0x80,0xa1,0x80,0xa1,0x80,0x80,0xb6,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x86,
0x80,0x80,0x80,0x9c,0x8c,0x80,0x80,0x80,0x80,0x80,0xaf,0x80,0xa0,0x80,0x80,0xb6,
0x80,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x80,0xa0,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x80,0x9e,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x80,0x9e,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x80,0x9d,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x80,0x9b,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x83,0x85,0x80,0x80,0x80,0x80,0x80,0x95,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x85,0x86,0x80,0x80,0x80,0x80,0x80,0x94,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x85,0x84,0x80,0x80,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x86,0x81,0x80,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x80,0x80,0x94,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x86,0x81,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x80,0x80,0x98,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x91,0x80,0x80,0x8f,0x80,0x80,0x80,0x9c,0x80,0x9c,0x80,0x80,0x8b,
0x80,0x90,0x80,0x89,0x88,0x80,0x80,0x80,0x80,0x80,0x81,0x88,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x92,0x8c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8a,0x96,0x80,0x80,0x80,0x80,0x80,0x96,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x9e,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x80,0xaa,0x80,0x80,0x80,0x80,0x8f,
0x8e,0x8d,0x80,0x80,0x80,0x80,0x9a,0x80,0x80,0x80,0x80,0xb4,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0xaa,0x80,0x8a,0xa2,0x80,0x89,0x80,0x82,0x80,0x9c,0x80,0x80,0x9c,
0x80,0x80,0x80,0xa0,0x80,0x80,0x87,0x80,0x84,0x80,0x88,0x80,0x83,0x80,0x80,0x96,
0x80,0x80,0x80,0x93,0x80,0x80,0x84,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x96,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x89,0x82,0x80,0x80,0x80,0x80,0x80,0x99,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x81,0x81,0x80,0x80,0x80,0x80,0x80,0x9d,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x84,0x80,0x80,0x81,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8a,0x80,0x80,0x82,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x93,0x81,0x80,0x80,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x93,0x83,0x80,0x80,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x93,0x82,0x80,0x80,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x92,0x82,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x92,0x83,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x92,0x86,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x92,0x88,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x92,0x8a,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x93,0x8d,0x80,0x80,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x94,0x8f,0x80,0x80,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x94,0x92,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x93,0x92,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x94,0x93,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x94,0x96,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x94,0x97,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x95,0x99,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x94,0x99,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x94,0x9b,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x91,0xa1,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x87,
0xa8,0x80,0x80,0x80,0xa7,0x80,0x80,0x80,0x80,0x80,0xbb,0xd3,0x80,0x80,0x80,0x80,
0xb3,0x95,0x80,0x80,0x80,0x80,0xc0,0x80,0x80,0x80,0x90,0x8d,0x80,0x80,0x80,0x80,
0x80,0x87,0x80,0x80,0x80,0x80,0xbe,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8f,0x80,0x80,0xbb,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0x8e,0x80,0x80,0xb8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x8d,0x80,0x80,0xb9,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x92,
0x80,0x80,0x80,0x8d,0x80,0x80,0xbb,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0x99,0x80,0x80,0xc6,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x91,
0x99,0x80,0x80,0x94,0x80,0x80,0xdf,0x80,0x80,0x80,0xc3,0x80,0x89,0x80,0x80,0x90,
0x94,0x80,0x80,0x80,0x80,0x80,0xdc,0x80,0x80,0x80,0xde,0x80,0xba,0x80,0x80,0x98,
0x80,0x80,0x80,0x80,0x80,0x80,0xb3,0x80,0x80,0xa3,0xde,0x80,0xbc,0x80,0x80,0xa9,
0x80,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0xa3,0xc4,0x80,0x9e,0x80,0x80,0xad,
0x80,0x80,0x80,0x80,0x85,0x98,0x80,0x80,0x80,0x83,0x98,0x80,0x87,0x8f,0x80,0xa5,
0x80,0x80,0x80,0x99,0xa1,0xa1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xa5,0x80,0x9d,
0x80,0x80,0x80,0xaa,0xa1,0x80,0x80,0x80,0x8b,0x80,0x80,0x8f,0x80,0x96,0x80,0x85,
0x80,0x80,0x80,0xa2,0x88,0x80,0x80,0x80,0x8d,0x80,0x89,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x80,0x80,0x91,0x80,0x84,0x80,0x80,0x87,
0x80,0x80,0x80,0x8f,0x8d,0x80,0x80,0x80,0x80,0x80,0x91,0x80,0x81,0x80,0x80,0x8b,
0x80,0x80,0x80,0x89,0x93,0x80,0x80,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x81,
0x80,0x80,0x80,0x93,0x8e,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x86,0x98,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x81,0x80,0x84,
0x80,0x80,0x80,0x93,0xaa,0x80,0x80,0x80,0x87,0x80,0x80,0xa4,0x80,0x9b,0x80,0x81,
0x80,0x80,0x80,0x9b,0x91,0x80,0x80,0x80,0x90,0x80,0x80,0xb8,0x80,0x9e,0x80,0x80,
0x80,0x80,0x80,0x9c,0x80,0x80,0x98,0x80,0x84,0x80,0x80,0x97,0x80,0x80,0x80,0x80,
0x80,0x89,0x80,0x9b,0x80,0x80,0xad,0x80,0x80,0x80,0x82,0x80,0x8e,0x80,0x80,0x93,
0x80,0x80,0x80,0xa8,0x8c,0xd8,0x80,0x80,0x80,0x80,0x80,0x80,0xb9,0x92,0x80,0xb7,
0x80,0x80,0x80,0xa2,0xc3,0x80,0x80,0x80,0x8e,0x80,0x8a,0x95,0x80,0x83,0x80,0xa1,
0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xca,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0xa4,0x80,0x95,0x9a,0x80,0x82,0x80,0x97,0x80,0xa3,0x80,0x80,0xa5,
0x80,0x80,0x80,0x8e,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x88,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x88,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x87,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x87,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x80,0x80,0x88,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x80,0x80,0x88,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x88,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x91,0x80,0x80,0x89,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x80,0x80,0x89,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x89,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x88,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x8a,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x80,0x80,0x88,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x80,0x80,0x89,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x80,0x80,0x89,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x80,0x80,0x8a,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x91,0x80,0x80,0x89,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x80,0x80,0x89,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x80,0x80,0x8a,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8b,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8b,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x80,0x80,0x8a,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x8b,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x8a,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x91,0x80,0x80,0x8a,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x80,0xaf,0x9e,0x80,0x80,0x80,0x96,
0x8e,0x92,0x80,0x80,0x80,0x80,0xc1,0x80,0x80,0x80,0x80,0xb7,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8e,0x80,0x80,0xc4,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x90,0x80,0x80,0xc3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x90,0x80,0x80,0xc2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x90,0x80,0x80,0xc4,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8e,0x80,0x80,0xc4,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8f,0x80,0x80,0xc4,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x8f,0x80,0x80,0xc5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8f,0x80,0x80,0xc4,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x90,0x80,0x80,0xc5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x8f,0x80,0x80,0xc4,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x92,0x80,0x80,0xc5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x9d,0x80,0x80,0xd5,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x90,
0x8c,0x80,0x80,0x92,0x80,0x80,0xe7,0x80,0x80,0x80,0xb4,0x80,0x86,0x80,0x80,0x8f,
0x8e,0x80,0x80,0x80,0x80,0x80,0xe5,0x80,0x80,0x80,0xe0,0x80,0xb2,0x80,0x80,0x9c,
0x8d,0x80,0x80,0x80,0x80,0x80,0xdc,0x80,0x80,0x91,0xda,0x80,0xaf,0x80,0x80,0x92,
0x80,0x80,0x80,0x80,0x80,0x80,0xc5,0x80,0x80,0x95,0xaf,0x80,0xbf,0x80,0x80,0x92,
0x80,0x80,0x80,0x85,0x80,0x80,0x95,0x80,0x80,0x80,0x90,0x80,0x89,0x80,0x80,0x8f,
0x80,0x82,0x80,0x88,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x94,0x80,0x80,0x90,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x98,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0xb6,0x80,0x82,0x80,0x80,0x9c,
0x80,0x80,0x80,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0xb3,0x80,0x80,0x80,0x80,0x9d,
0x80,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0xa2,0x80,0x80,0x83,0x80,0x95,
0x80,0x80,0x80,0x80,0x80,0x80,0x9a,0x80,0x80,0x80,0x95,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x80,0x80,0x80,0xa1,0x80,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x98,
0x80,0x80,0x80,0x80,0x80,0x80,0xa0,0x80,0x80,0x80,0x94,0x80,0x80,0x80,0x80,0x92,
0x80,0x9c,0x80,0x9d,0x80,0x80,0xba,0x80,0x80,0x80,0x8d,0x80,0x8e,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x80,0x80,0x94,0x80,0x80,0x80,0xa5,0x80,0x89,0x80,0x80,0x9a,
0x85,0x80,0x80,0x80,0x80,0x80,0xa0,0x80,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x85,
0x88,0x80,0x80,0x80,0x80,0x80,0xa0,0x80,0x80,0x80,0xaa,0x80,0x80,0x80,0x80,0x87,
0x8a,0x80,0x80,0x80,0x80,0x80,0xa3,0x80,0x80,0x80,0xad,0x80,0x82,0x80,0x80,0x87,
0x89,0x80,0x80,0x80,0x80,0x80,0xa2,0x80,0x80,0x80,0xae,0x80,0x82,0x80,0x80,0x88,
0x89,0x80,0x80,0x80,0x80,0x80,0xa2,0x80,0x80,0x80,0xae,0x80,0x84,0x80,0x80,0x88,
0x84,0x80,0x80,0x80,0x80,0x80,0x9f,0x80,0x80,0x80,0xb0,0x80,0x86,0x80,0x80,0x8a,
0x88,0x80,0x80,0x80,0x80,0x80,0x9f,0x80,0x80,0x80,0xb1,0x80,0x80,0x80,0x80,0x88,
0x85,0x80,0x80,0x80,0x80,0x80,0xa2,0x80,0x80,0x80,0xb0,0x80,0x83,0x80,0x80,0x88,
0x81,0x80,0x80,0x80,0x80,0x80,0xa1,0x80,0x80,0x80,0xae,0x80,0x84,0x80,0x80,0x89,
0x80,0x80,0x80,0x80,0x80,0x80,0x9e,0x80,0x80,0x80,0xb0,0x80,0x84,0x80,0x80,0x8b,
0x80,0x80,0x80,0x80,0x80,0x80,0x9c,0x80,0x80,0x80,0xb3,0x80,0x86,0x80,0x80,0x8d,
0x80,0x80,0x80,0x80,0x80,0x80,0x9a,0x80,0x80,0x80,0xb5,0x80,0x81,0x80,0x80,0x8e,
0x80,0x80,0x80,0x80,0x80,0x80,0x9b,0x80,0x80,0x80,0xb1,0x80,0x83,0x80,0x80,0x8d,
0x80,0x80,0x80,0x80,0x80,0x80,0x9a,0x80,0x80,0x80,0xac,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x80,0x80,0x80,0x9a,0x80,0x80,0x80,0xa9,0x80,0x80,0x80,0x80,0x8b,
0x80,0x96,0x80,0x8f,0x80,0x80,0xb5,0x80,0x80,0x80,0x99,0x80,0xb4,0x80,0x80,0x83,
0x80,0x8e,0x80,0x89,0x89,0x80,0x80,0x80,0x80,0x80,0x82,0x88,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x91,0x8d,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x80,0x9c,0x80,0x80,0x80,0x80,0x80,0x94,0x94,0x80,0x80,0x80,0x86,
0x80,0x8d,0x80,0x80,0x80,0x80,0x9a,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0xa1,0x80,0x80,0x80,0x80,0x8e,
0x80,0xa7,0x80,0x80,0x80,0x80,0xb5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0xaf,0x80,0x87,0x95,0x80,0x8e,0x80,0x87,0x80,0x9b,0x80,0x80,0xa1,
0x80,0x80,0x80,0x9a,0x80,0x80,0x83,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0x93,0x80,0x80,0x86,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x91,0x87,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x8c,
0x80,0x8c,0x80,0x8e,0x80,0x80,0x96,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8c,0x80,0x80,0x8a,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x89,
0x80,0x89,0x80,0x90,0x80,0x80,0x8b,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x89,0x80,0x80,0x88,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8a,0x80,0x80,0x85,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x88,0x80,0x80,0x88,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x87,0x80,0x80,0x85,0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x87,0x80,0x80,0x82,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x87,0x81,0x80,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x88,0x83,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8b,0x84,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8d,0x87,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8c,0x86,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8c,0x88,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x8b,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x8f,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x8f,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8e,0x92,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x93,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8f,0x94,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8f,0x96,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8e,0x97,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x99,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8d,0x98,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8e,0x99,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x86,
0x82,0x80,0x80,0x88,0xa0,0x80,0x80,0x80,0x80,0x80,0x96,0x84,0x80,0x80,0x80,0x83,
0xba,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xf7,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x80,0x80,0x80,0xaf,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x87,
0x80,0x85,0x80,0x80,0x80,0x80,0xbf,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0xbb,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8d,0x80,0x80,0xba,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x8d,0x80,0x80,0xba,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x92,
0x80,0x80,0x80,0x8e,0x80,0x80,0xbc,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0x8f,0x80,0x80,0xbd,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x8d,0x80,0x80,0xbc,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x92,
0x80,0x80,0x80,0x94,0x80,0x80,0xbe,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x92,
0x80,0x80,0x80,0x9a,0x80,0x80,0xcc,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x8f,
0x8c,0x80,0x80,0x8f,0x80,0x80,0xda,0x80,0x80,0x80,0xaf,0x80,0x86,0x80,0x80,0x8d,
0x9c,0x80,0x80,0x80,0x80,0x80,0xe1,0x80,0x80,0x80,0xd2,0x80,0xab,0x80,0x80,0x92,
0x87,0x80,0x80,0x80,0x80,0x80,0xca,0x80,0x80,0x97,0xee,0x80,0xdc,0x80,0x80,0xa5,
0x80,0x80,0x80,0x80,0x80,0x8d,0x8b,0x80,0x80,0xc0,0xba,0x80,0xd1,0x80,0x80,0xa9,
0x80,0x80,0x80,0x82,0xa5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xa7,0x80,0x8b,
0x80,0x84,0x80,0xa1,0x90,0x80,0x80,0x80,0x88,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x99,0x86,0x80,0x80,0x80,0x84,0x80,0x8b,0x80,0x8b,0x80,0x80,0x88,
0x80,0x80,0x80,0x8d,0x93,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8e,0x93,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x92,0x8b,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x89,0x94,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x87,0x9b,0x80,0x80,0x80,0x80,0x80,0x80,0xa2,0x80,0x8c,0x80,0x80,
0x80,0x89,0x80,0x91,0x84,0x80,0x80,0x80,0x8a,0x80,0x80,0xb8,0x80,0x95,0x80,0x80,
0x80,0x86,0x80,0xa9,0x80,0x80,0xa4,0x80,0x92,0x80,0x80,0x88,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0xab,0x80,0x80,0xbe,0x80,0x80,0x80,0xd1,0x80,0xc4,0x80,0x80,0xa2,
0xa6,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x9d,0xdf,0x80,0x80,0x80,0x80,0x9a,
0x8d,0xd4,0x80,0x80,0x80,0x80,0xe5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0xae,0x80,0xa1,0x82,0x80,0xa5,0x80,0x9c,0x80,0xaf,0x80,0x80,0xbd,
0x80,0x80,0x80,0x8d,0x80,0x80,0x88,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8e,0x80,0x80,0x88,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x89,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x87,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x88,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x85,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x86,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x87,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x88,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x91,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x88,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x88,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8a,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x8a,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x80,0x80,0x89,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x83,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x8e,
0x9a,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x9a,0xcf,0x80,0x80,0x80,0x80,
0x80,0xb6,0x80,0x80,0x80,0x80,0xd1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x90,0x80,0x80,0xc3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x90,0x80,0x80,0xc3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8f,0x80,0x80,0xc3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8e,0x80,0x80,0xc3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8e,0x80,0x80,0xc4,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8f,0x80,0x80,0xc5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8e,0x80,0x80,0xc6,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8e,0x80,0x80,0xc7,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x8d,0x80,0x80,0xc8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x8e,0x80,0x80,0xc7,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x8e,0x80,0x80,0xc5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x96,
0x80,0x80,0x80,0x8d,0x80,0x80,0xc5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x96,
0x80,0x80,0x80,0x99,0x80,0x80,0xcf,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8a,
0x80,0x85,0x80,0xbc,0x80,0x91,0xba,0x80,0xb9,0x80,0x80,0x80,0x80,0x8e,0x80,0x8f,
0x80,0x80,0x80,0xd8,0x80,0xb0,0xa2,0x80,0xbe,0x80,0x80,0x80,0x86,0xaa,0x80,0x93,
0x80,0x80,0x80,0xe2,0x85,0x9f,0x80,0x80,0xca,0x80,0x80,0x80,0x80,0x8e,0x80,0xa1,
0x80,0x80,0x80,0xa9,0x89,0x80,0x80,0x80,0x85,0x80,0x85,0x80,0x80,0x80,0x80,0x9a,
0x80,0x80,0x80,0x8a,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x91,0x80,0x80,0x8d,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x81,0x80,0x80,0x8a,0x80,0x80,0x80,0x8f,0x88,0x80,0x80,0x80,0x88,
0x98,0x8b,0x80,0x80,0x80,0x80,0xbc,0x80,0x80,0x80,0x8d,0x8c,0x80,0x80,0x80,0x80,
0x92,0x80,0x80,0x82,0x80,0x80,0xc9,0x80,0x80,0x80,0x98,0x80,0x80,0x80,0x80,0x82,
0x8c,0x80,0x80,0x80,0x80,0x80,0xc7,0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x80,0x80,0x80,0xc1,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x88,0x80,0x80,0xc2,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8e,0x80,0x80,0xbe,0x80,0x80,0x80,0x85,0x80,0x91,0x80,0x80,0x91,
0x80,0x80,0x80,0xa4,0x80,0x80,0xac,0x80,0x80,0x80,0x88,0x80,0x97,0x80,0x80,0x97,
0x80,0x80,0x80,0x90,0x80,0x80,0x8e,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x89,0x80,0x80,0x91,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x8a,0x80,0x80,0x96,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x98,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8d,0x80,0x80,0x9b,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x88,0x80,0x80,0x9c,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x86,0x80,0x80,0x9d,0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x81,0x80,0x80,0x9b,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x84,0x80,0x80,0x9c,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x86,0x80,0x80,0x99,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x84,0x80,0x80,0x98,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0x86,0x80,0x80,0x9a,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x86,0x80,0x80,0x9d,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x87,0x80,0x80,0x9f,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x83,0x80,0x80,0x9f,0x80,0x80,0x80,0x95,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0x82,0x80,0x80,0x9c,0x80,0x80,0x80,0x94,0x80,0x80,0x80,0x80,0x92,
0x80,0x9f,0x80,0xa5,0x80,0x80,0xbd,0x80,0x80,0x80,0x8f,0x80,0xb4,0x80,0x80,0x89,
0x80,0x8b,0x80,0x89,0x8c,0x80,0x80,0x80,0x80,0x80,0x83,0x87,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x91,0x8e,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x80,0x9c,0x80,0x80,0x80,0x80,0x80,0x8b,0x9e,0x80,0x80,0x80,0x83,
0x80,0x90,0x80,0x83,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x80,0x8b,0x9b,0x80,0x80,0x80,0x8c,
0x80,0xab,0x80,0x94,0x80,0x80,0xba,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0xad,0x80,0x80,0x8d,0x80,0x90,0x80,0x89,0x80,0x94,0x80,0x80,0x9e,
0x80,0x80,0x80,0x96,0x80,0x80,0x83,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x95,0x80,0x80,0x82,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x87,0x86,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x85,0x80,0x80,0x81,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x81,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x8d,0x80,0x80,0x81,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x93,0x81,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x94,0x81,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x96,0x82,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x98,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x96,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x98,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x98,0x80,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x9b,0x82,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x9c,0x8b,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x84,0x80,0x84,
0x80,0x80,0x80,0x9e,0x8e,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x87,0x80,0x81,
0x80,0x80,0x80,0x9f,0x8f,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x84,0x80,0x82,
0x80,0x80,0x80,0x9d,0x8f,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x83,0x80,0x82,
0x80,0x80,0x80,0x9b,0x91,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x81,0x80,0x82,
0x80,0x80,0x80,0x9a,0x91,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x82,0x80,0x81,
0x80,0x80,0x80,0x99,0x93,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x83,0x80,0x82,
0x80,0x80,0x80,0x99,0x95,0x80,0x80,0x80,0x84,0x80,0x81,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x96,0x94,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x94,0x95,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x93,0x95,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x92,0x96,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x91,0x95,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x90,0x95,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x88,0x9d,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x84,
0x83,0x9a,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x80,0x80,0xe0,0x80,0xc8,0x80,0x80,
0x80,0x80,0x80,0xbc,0x80,0x80,0x8e,0x80,0xcf,0x80,0x80,0xc2,0x80,0xa0,0x80,0x80,
0x80,0x80,0x80,0xb0,0x80,0x80,0xb8,0x80,0xac,0x80,0x80,0x94,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x94,0x80,0x80,0xc0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x8a,0x80,0x80,0xbe,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8a,0x80,0x80,0xbc,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8c,0x80,0x80,0xbd,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x8d,0x80,0x80,0xbd,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8e,0x80,0x80,0xbd,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x90,0x80,0x80,0xbd,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8f,0x80,0x80,0xba,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x90,0x80,0x80,0xba,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x95,0x80,0x80,0xbe,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x99,0x80,0x80,0xc3,0x80,0x80,0x80,0x9b,0x80,0x80,0x80,0x80,0x96,
0x83,0x80,0x80,0x9a,0x80,0x80,0xd7,0x80,0x80,0x80,0xdc,0x80,0xbb,0x80,0x80,0x9f,
0x80,0x80,0x80,0x80,0x80,0x80,0xa7,0x80,0x80,0xae,0xd1,0x80,0xe3,0x80,0x80,0xab,
0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x9c,0xa3,0x80,0x87,0x80,0x80,0x95,
0x80,0x80,0x80,0x84,0x8b,0x80,0x80,0x80,0x80,0x80,0x9e,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x84,0x8c,0x80,0x80,0x80,0x80,0x80,0x92,0x80,0x86,0x80,0x80,0x8c,
0x80,0x80,0x80,0x8d,0x95,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8f,0x8d,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x81,
0x80,0x80,0x80,0x90,0x93,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x8a,0x9e,0x80,0x80,0x80,0x80,0x80,0x80,0x81,0x80,0x8d,0x80,0x83,
0x80,0x80,0x80,0x8f,0xa4,0x80,0x80,0x80,0x87,0x80,0x80,0xa5,0x80,0x97,0x80,0x80,
0x80,0x80,0x80,0x9d,0x8f,0x80,0x80,0x80,0x8c,0x80,0x80,0xaa,0x80,0x96,0x80,0x80,
0x80,0x81,0x80,0xb3,0x80,0x80,0x8d,0x80,0x99,0x80,0x80,0x8c,0x80,0x9e,0x80,0x80,
0x85,0x80,0x80,0x8d,0x80,0x80,0x94,0x80,0x92,0x80,0x80,0xae,0x80,0x80,0x80,0x80,
0x80,0xc4,0x80,0xa8,0x80,0x80,0xdb,0x80,0x80,0x80,0x80,0x80,0x95,0x80,0x80,0x80,
0x80,0x80,0x80,0xad,0x84,0x86,0x80,0x80,0x9b,0x80,0x99,0x80,0xa0,0x80,0x80,0xbb,
0x80,0x80,0x80,0x8e,0x80,0x80,0x88,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x86,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x88,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x86,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8f,0x80,0x80,0x86,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x87,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x86,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x8a,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x90,0x80,0x80,0x88,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x80,0x80,0x87,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x88,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x8a,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x8a,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x80,0x80,0x89,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x80,0xb3,0xa3,0x80,0x80,0x80,0x94,
0x92,0x94,0x80,0x80,0x80,0x80,0xc3,0x80,0x80,0x80,0x80,0xb2,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8e,0x80,0x80,0xc4,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x92,
0x80,0x80,0x80,0x90,0x80,0x80,0xc4,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x8f,0x80,0x80,0xc3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x8e,0x80,0x80,0xc3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8d,0x80,0x80,0xc5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8e,0x80,0x80,0xc5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8d,0x80,0x80,0xc6,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8d,0x80,0x80,0xc8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8f,0x80,0x80,0xc7,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x8f,0x80,0x80,0xc7,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x96,
0x80,0x80,0x80,0x91,0x80,0x80,0xcd,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0xa8,0x80,0x80,0xd5,0x80,0x85,0x80,0x80,0x80,0x80,0x81,0x80,0x83,
0x80,0x81,0x80,0xcb,0x80,0x88,0xc0,0x80,0xd2,0x80,0x80,0x80,0x80,0x95,0x80,0x80,
0x80,0x80,0x80,0xe3,0x80,0xc4,0x91,0x80,0xec,0x80,0x80,0x80,0x8a,0x98,0x80,0x9d,
0x80,0x80,0x80,0xcd,0x9f,0xa0,0x80,0x80,0xa7,0x80,0x80,0x80,0x80,0xa6,0x80,0xa3,
0x80,0x80,0x80,0xb3,0x80,0x80,0x8d,0x80,0x85,0x80,0x95,0x82,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0x84,0x80,0x80,0x93,0x80,0x80,0x80,0x9f,0x80,0x9a,0x80,0x80,0x97,
0x80,0x80,0x80,0x83,0x80,0x80,0x86,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x86,0x80,0x80,0x85,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x88,0x80,0x80,0x8e,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x85,
0x80,0x8b,0x80,0x81,0x80,0x80,0xa7,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x97,0x80,0x80,0xad,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x95,0x80,0x80,0xae,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x94,0x80,0x80,0xae,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x91,0x80,0x80,0xaf,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0xa1,0x80,0x80,0xb2,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x97,
0x80,0x80,0x80,0xa7,0x80,0x80,0xa6,0x80,0x81,0x80,0x8a,0x80,0x8f,0x80,0x80,0x99,
0x80,0x80,0x80,0x8e,0x80,0x80,0x96,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x88,0x80,0x80,0x9a,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x89,0x80,0x80,0x9c,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x89,0x80,0x80,0x9a,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x88,0x80,0x80,0x9a,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x8c,0x80,0x80,0x9c,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x8f,0x80,0x80,0xa3,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8c,0x80,0x80,0xa8,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8c,0x80,0x80,0xab,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8b,0x80,0x80,0xaf,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x87,0x80,0x80,0xaf,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x86,0x80,0x80,0xae,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x88,0x80,0x80,0xae,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x89,0x80,0x80,0xad,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8c,0x80,0x80,0xae,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0xae,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x89,
0x80,0xb0,0x80,0xb3,0x80,0x80,0xd7,0x80,0x80,0x80,0x85,0x80,0xc3,0x80,0x80,0x81,
0x80,0x8b,0x80,0x89,0x8c,0x80,0x80,0x80,0x80,0x80,0x84,0x86,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8f,0x8f,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x85,
0x88,0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0x80,0x86,0xaa,0x80,0x80,0x80,0x80,
0x80,0x8b,0x80,0x89,0x80,0x80,0x9a,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x83,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x80,0x80,0x91,0x80,0x82,
0x80,0x97,0x80,0xb1,0x80,0x80,0x90,0x80,0x9c,0x80,0x80,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0xa3,0x80,0x80,0x84,0x80,0x80,0x80,0x8c,0x80,0x84,0x80,0x80,0x98,
0x80,0x80,0x80,0x95,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0xa0,0x85,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x85,0x80,0x85,
0x80,0x80,0x80,0x9d,0x86,0x80,0x80,0x80,0x92,0x80,0x80,0x81,0x80,0x90,0x80,0x80,
0x80,0x80,0x80,0xa9,0x8b,0x80,0x80,0x80,0x9a,0x80,0x80,0x80,0x80,0x8f,0x80,0x81,
0x80,0x80,0x80,0xa8,0x8b,0x80,0x80,0x80,0x96,0x80,0x80,0x80,0x80,0x91,0x80,0x81,
0x80,0x80,0x80,0xa8,0x8b,0x80,0x80,0x80,0x95,0x80,0x80,0x80,0x80,0x8f,0x80,0x82,
0x80,0x80,0x80,0xa7,0x8e,0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0x8d,0x80,0x83,
0x80,0x80,0x80,0xa2,0x92,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x8c,0x80,0x85,
0x80,0x80,0x80,0xa0,0x93,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x8c,0x80,0x85,
0x80,0x80,0x80,0x9f,0x94,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x8b,0x80,0x87,
0x80,0x80,0x80,0x9d,0x94,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x88,0x80,0x87,
0x80,0x80,0x80,0x9b,0x96,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x89,0x80,0x87,
0x80,0x80,0x80,0x9a,0x95,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x87,
0x80,0x80,0x80,0x98,0x94,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x83,0x80,0x88,
0x80,0x80,0x80,0x98,0x94,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x87,
0x80,0x80,0x80,0x9a,0x9a,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x82,0x80,0x89,
0x80,0x80,0x80,0x96,0x9a,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x91,0x99,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x96,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8d,0x97,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8c,0x96,0x80,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x89,0x96,0x80,0x80,0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x88,0x96,0x80,0x80,0x80,0x80,0x80,0x95,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x87,0x96,0x80,0x80,0x80,0x80,0x80,0x98,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x85,0x94,0x80,0x80,0x80,0x80,0x80,0x98,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x86,0x92,0x80,0x80,0x80,0x80,0x80,0x96,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x87,0x92,0x80,0x80,0x80,0x80,0x80,0x96,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x87,0x91,0x80,0x80,0x80,0x80,0x80,0x96,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x87,0x90,0x80,0x80,0x80,0x80,0x80,0x96,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x87,0x91,0x80,0x80,0x80,0x80,0x80,0x95,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x88,0x91,0x80,0x80,0x80,0x80,0x80,0x96,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x84,0x94,0x80,0x80,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x80,0xa6,0x80,0x80,0x80,0x80,0x80,0x80,0x82,0x80,0x84,0x80,0x86,
0x80,0x80,0x80,0x8d,0xbe,0x8c,0x80,0x80,0x80,0x80,0x80,0xa6,0x80,0xb8,0x80,0x85,
0x80,0x81,0x80,0xb2,0xbc,0x92,0x80,0x80,0xa3,0x80,0x80,0xd0,0x80,0xe5,0x80,0x80,
0x80,0x80,0x80,0xd6,0x89,0x80,0x80,0x80,0xc9,0x80,0x80,0xd2,0x80,0xc0,0x80,0x80,
0x80,0x80,0x80,0xc9,0x80,0x80,0xaa,0x80,0xd1,0x80,0x80,0xb0,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0xa4,0x80,0x80,0xc2,0x80,0xa0,0x80,0x80,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8e,0x80,0x80,0xc2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x92,
0x80,0x80,0x80,0x8c,0x80,0x80,0xc0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8d,0x80,0x80,0xc0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8e,0x80,0x80,0xbe,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x8d,0x80,0x80,0xbe,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8d,0x80,0x80,0xbc,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x8f,0x80,0x80,0xbd,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8f,0x80,0x80,0xbd,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x96,
0x80,0x80,0x80,0x92,0x80,0x80,0xbf,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x9b,0x80,0x80,0xcb,0x80,0x80,0x80,0xc9,0x80,0xad,0x80,0x80,0xa2,
0x80,0x80,0x80,0x80,0x80,0x80,0xa9,0x80,0x80,0x91,0xbf,0x80,0xc8,0x80,0x80,0xa5,
0x80,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x9b,0x80,0x80,0x80,0x80,0x8c,
0x87,0x84,0x80,0x87,0x80,0x80,0x97,0x80,0x80,0x80,0xb2,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x80,0x80,0x80,0x86,0x80,0x80,0x95,0xa1,0x80,0xaf,0x80,0x80,0x95,
0x80,0x80,0x80,0x8b,0x96,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x82,0x80,0x88,
0x80,0x80,0x80,0x90,0x90,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8d,0x8e,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x85,0x80,0x80,0x88,
0x80,0x80,0x80,0x86,0x9d,0x80,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x85,0x80,0x81,
0x80,0x80,0x80,0x90,0x98,0x80,0x80,0x80,0x80,0x80,0x80,0x96,0x80,0x91,0x80,0x80,
0x80,0x80,0x80,0xa1,0x90,0x80,0x80,0x80,0x92,0x80,0x80,0x83,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x84,0xab,0x80,0x80,0x80,0x8b,0x80,0x80,0xc5,0x80,0xb8,0x80,0x80,
0x80,0xb6,0x80,0xc6,0x80,0x80,0xb3,0x80,0x8b,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x8a,0x80,0x94,0x80,0x91,0x80,0x80,0xab,
0x80,0x80,0x80,0x8e,0x80,0x80,0x88,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x86,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x88,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x85,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x86,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x87,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x86,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x90,0x80,0x80,0x86,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x86,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x87,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x86,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x86,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x85,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x91,0x80,0x80,0x87,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x86,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x91,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x80,0x80,0x88,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x88,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x80,0x80,0x89,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x80,0x80,0x88,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8e,0x80,0x80,0x81,0x80,0x80,0x80,0x92,0x80,0x80,0x80,0x80,0x8f,
0x9c,0x80,0x80,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x91,0xd0,0x80,0x80,0x80,0x80,
0x80,0xad,0x80,0x80,0x80,0x80,0xcc,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x90,0x80,0x80,0xc1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x8f,0x80,0x80,0xc3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x8e,0x80,0x80,0xc3,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x8d,0x80,0x80,0xc4,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8e,0x80,0x80,0xc6,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8d,0x80,0x80,0xc7,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8d,0x80,0x80,0xc6,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8e,0x80,0x80,0xca,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x9f,0x80,0x80,0xd5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0xc4,0x80,0x82,0xcd,0x80,0xc1,0x80,0x80,0x80,0x80,0x92,0x80,0x80,
0x80,0x82,0x80,0xe9,0x80,0xb8,0xa2,0x80,0xfa,0x80,0x80,0x80,0x88,0xaf,0x80,0x8a,
0x80,0x80,0x80,0xeb,0xa0,0xcc,0x80,0x80,0xe3,0x80,0x80,0x80,0x80,0x94,0x80,0xa4,
0x80,0x80,0x80,0xc6,0x9a,0x94,0x80,0x80,0x9c,0x80,0x80,0x82,0x80,0x85,0x80,0x9b,
0x80,0x80,0x80,0xb3,0x82,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x80,0x80,0x8e,
0x80,0x80,0x80,0x9e,0x80,0x80,0x8a,0x80,0x8b,0x80,0x80,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x91,0x82,0x80,0x80,0x80,0x8c,0x80,0x80,0x82,0x80,0x9e,0x80,0x80,
0x80,0x85,0x80,0xb4,0x80,0x80,0x8b,0x80,0x9a,0x80,0x80,0x8f,0x80,0x80,0x80,0x81,
0x80,0x80,0x80,0x97,0x80,0x80,0x8d,0x80,0x81,0x80,0x80,0x80,0x96,0x89,0x80,0x8d,
0x80,0x80,0x80,0x9d,0x86,0x80,0x80,0x80,0x87,0x80,0x80,0x85,0x80,0x98,0x80,0x82,
0x80,0x80,0x80,0xa6,0x82,0x80,0x80,0x80,0x92,0x80,0x80,0x82,0x80,0x92,0x80,0x81,
0x80,0x80,0x80,0xa1,0x8a,0x80,0x80,0x80,0x94,0x80,0x80,0x8d,0x80,0xa5,0x80,0x81,
0x80,0x80,0x80,0xb2,0x8e,0x85,0x80,0x80,0xa6,0x80,0x80,0x98,0x80,0xb1,0x80,0x80,
0x80,0x80,0x80,0xc2,0x8d,0x85,0x80,0x80,0xae,0x80,0x80,0x99,0x80,0xb0,0x80,0x84,
0x80,0x80,0x80,0xc2,0x84,0x81,0x80,0x80,0xb3,0x80,0x80,0x95,0x80,0xaa,0x80,0x83,
0x80,0x80,0x80,0xc0,0x80,0x80,0x84,0x80,0xb3,0x80,0x80,0x99,0x80,0xa5,0x80,0x82,
0x80,0x80,0x80,0xb7,0x80,0x80,0x94,0x80,0xa6,0x80,0x80,0x98,0x80,0x91,0x80,0x80,
0x80,0x80,0x80,0xbb,0x80,0x80,0xa5,0x80,0xa5,0x80,0x80,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0xaa,0x80,0x80,0x93,0x80,0x92,0x80,0x81,0x80,0x80,0x80,0x80,0x97,
0x80,0x80,0x80,0x8f,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x91,0x80,0x80,0x95,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x94,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x94,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x94,0x80,0x80,0x9a,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x93,0x80,0x80,0x99,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x91,0x80,0x80,0x98,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x94,0x80,0x80,0x98,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x96,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x98,0x80,0x80,0x99,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x9a,0x80,0x80,0x9c,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x9a,0x80,0x80,0x9f,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x98,0x80,0x80,0xa1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x95,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x95,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x95,0x80,0x80,0xa1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8d,
0x80,0xad,0x80,0xbc,0x80,0x87,0xc5,0x80,0x80,0x80,0x80,0x80,0xb4,0x80,0x80,0x88,
0x80,0x8a,0x80,0x89,0x8d,0x80,0x80,0x80,0x80,0x80,0x85,0x86,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8c,0x91,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x85,
0x82,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x80,0x80,0xa8,0x80,0x80,0x80,0x80,
0x80,0x81,0x80,0x90,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x91,0x80,0x80,0x8a,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x8c,0x80,0x80,0x8a,0x80,0x80,0x80,0x8a,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x91,0x80,0x80,0x8f,0x80,0x80,0x80,0x93,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x8b,0x80,0x80,0x89,0x80,0x80,0x80,0xa2,0x80,0x87,0x80,0x80,0x92,
0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x85,0xaf,0x80,0x85,0x80,0x80,0x96,
0x80,0x80,0x80,0x80,0x80,0x80,0x81,0x80,0x80,0x87,0xac,0x80,0x80,0x80,0x80,0x8d,
0x80,0x80,0x80,0x80,0x80,0x80,0x83,0x80,0x80,0x85,0xa7,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x80,0x80,0x80,0x81,0x80,0x80,0x81,0xa4,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xa4,0x80,0x80,0x80,0x80,0x8b,
0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xa4,0x80,0x80,0x80,0x80,0x8a,
0x80,0x80,0x80,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0xa1,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0xa1,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x9d,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x84,0x80,0x80,0x82,0x80,0x80,0x80,0x95,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x80,0x80,0x94,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x89,0x81,0x80,0x80,0x80,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x86,
0x80,0x80,0x80,0x85,0x81,0x80,0x80,0x80,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x80,0x80,0x97,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x87,0x81,0x80,0x80,0x80,0x80,0x80,0x95,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x88,0x85,0x80,0x80,0x80,0x80,0x80,0x95,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x87,0x85,0x80,0x80,0x80,0x80,0x80,0x94,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x88,0x87,0x80,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x8c,0x87,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8d,0x85,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x81,
0x80,0x80,0x80,0x8e,0x85,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x81,
0x80,0x80,0x80,0x8e,0x85,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x81,
0x80,0x80,0x80,0x8e,0x84,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x81,
0x80,0x80,0x80,0x8e,0x85,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8e,0x88,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8e,0x89,0x80,0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8e,0x88,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8e,0x88,0x80,0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8c,0x88,0x80,0x80,0x80,0x80,0x80,0x8e,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8c,0x87,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x8a,0x85,0x80,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x80,0x82,
0x80,0x80,0x80,0x84,0x89,0x80,0x80,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x81,0xa4,0x85,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x82,0x80,0x88,
0x80,0x80,0x80,0x97,0xbd,0x9f,0x80,0x80,0x8a,0x80,0x80,0xb0,0x80,0xc4,0x80,0x82,
0x80,0x80,0x80,0xc6,0xaf,0x8b,0x80,0x80,0xb1,0x80,0x80,0xd4,0x80,0xec,0x80,0x80,
0x80,0x80,0x80,0xdf,0x80,0x80,0x8f,0x80,0xd9,0x80,0x80,0xc8,0x80,0xb0,0x80,0x80,
0x80,0x80,0x80,0xcb,0x80,0x80,0xba,0x80,0xcf,0x80,0x80,0x9a,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0xb7,0x80,0x80,0xbe,0x80,0xc7,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x9d,0x80,0x80,0xc2,0x80,0x97,0x80,0x80,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8d,0x80,0x80,0xc3,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8a,0x80,0x80,0xc3,0x80,0x80,0x80,0x82,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x8c,0x80,0x80,0xc2,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x8e,0x80,0x80,0xc0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x8e,0x80,0x80,0xc0,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x91,0x80,0x80,0xc1,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x97,0x80,0x80,0xcd,0x80,0x80,0x80,0xc5,0x80,0xa0,0x80,0x80,0x9e,
0x80,0x80,0x80,0x80,0x80,0x80,0xb0,0x80,0x80,0x87,0xc2,0x80,0xca,0x80,0x80,0xa7,
0x80,0x80,0x80,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x85,0x80,0x80,0xa1,0x80,0x90,
0x80,0x85,0x80,0xac,0x80,0x80,0x9c,0x80,0x80,0x80,0x9b,0x80,0x87,0x80,0x80,0x89,
0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x80,0x83,0x9b,0x80,0xa2,0x80,0x80,0x94,
0x80,0x80,0x80,0x88,0x93,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x93,0x90,0x80,0x80,0x80,0x80,0x80,0x90,0x80,0x80,0x80,0x80,0x85,
0x80,0x80,0x80,0x8a,0x8d,0x80,0x80,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x83,
0x80,0x80,0x80,0x8b,0x96,0x80,0x80,0x80,0x80,0x80,0x81,0x80,0x80,0x80,0x80,0x84,
0x80,0x80,0x80,0x94,0xa0,0x80,0x80,0x80,0x80,0x80,0x80,0x81,0x80,0x8d,0x80,0x84,
0x80,0x80,0x80,0x87,0xa5,0x80,0x80,0x80,0x85,0x80,0x80,0xab,0x80,0x8a,0x80,0x80,
0x80,0xa7,0x80,0x99,0x80,0x80,0x95,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x9b,0x80,0x80,0x82,0x80,0x80,0x80,0x8d,0x80,0x81,0x80,0x80,0x9a,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x86,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x86,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x85,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x85,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x86,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x87,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x86,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x86,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x85,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x86,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x85,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x90,0x80,0x80,0x87,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x85,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x86,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x86,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x86,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x86,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x86,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x87,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8e,0x80,0x80,0x85,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x86,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x85,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8f,0x80,0x80,0x86,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x86,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x90,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x87,
0x80,0x80,0x80,0x90,0x80,0x80,0x87,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x8f,0x80,0x80,0x88,0x80,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x89,
0x80,0x80,0x80,0x8f,0x80,0x80,0x87,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x91,0x80,0x80,0x88,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x90,0x80,0x80,0x88,0x80,0x80,0x80,0x84,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x91,0x80,0x80,0x88,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x80,0x88,
0x80,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x80,0xb0,0xa7,0x80,0x80,0x80,0x92,
0x8c,0x9b,0x80,0x80,0x80,0x80,0xc4,0x80,0x80,0x80,0x80,0xab,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x8e,0x80,0x80,0xc0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x92,
0x80,0x80,0x80,0x8f,0x80,0x80,0xc1,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x8f,0x80,0x80,0xc2,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x8f,0x80,0x80,0xc4,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x92,
0x80,0x80,0x80,0x8e,0x80,0x80,0xc4,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x8c,0x80,0x80,0xc5,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x91,0x80,0x80,0xcd,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0xa7,0x80,0x80,0xd3,0x80,0x88,0x80,0x80,0x80,0x80,0x80,0x80,0x83,
0x80,0x84,0x80,0xcd,0x80,0x9c,0xb8,0x80,0xd7,0x80,0x80,0x80,0x87,0xa0,0x80,0x89,
0x80,0x80,0x80,0xdd,0x85,0xd2,0x80,0x80,0xd6,0x80,0x80,0x80,0x84,0x92,0x80,0xab,
0x80,0x80,0x80,0xbf,0xa6,0xb9,0x80,0x80,0x86,0x80,0x80,0x80,0x80,0x80,0x80,0xb4,
0x80,0x80,0x80,0x9c,0x93,0x80,0x80,0x80,0x80,0x80,0xa6,0x80,0x80,0x80,0x80,0xa7,
0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xa5,0x80,0x80,0x80,0x80,0x9a,
0x80,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x98,
0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x99,
0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x97,
0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xaa,0x80,0x80,0x80,0x80,0x96,
0x80,0x80,0x80,0x80,0x8b,0x80,0x80,0x80,0x80,0x80,0x8f,0x80,0x80,0x89,0x80,0x91,
0x80,0x81,0x80,0x8b,0x80,0x80,0x97,0x80,0x80,0x80,0xb8,0x80,0x80,0x80,0x80,0x8c,
0x80,0x80,0x80,0x80,0x80,0x80,0x96,0x80,0x80,0x87,0xbb,0x80,0xa1,0x80,0x80,0x99,
0x80,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x82,0xaf,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x80,0x80,0x80,0x89,0x80,0x80,0x80,0xad,0x80,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0x80,0x80,0x80,0x88,0x80,0x80,0x80,0xae,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0xac,0x80,0x80,0x80,0x80,0x93,
0x80,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0xa8,0x80,0x80,0x80,0x80,0x96,
0x80,0x80,0x80,0x80,0x80,0x80,0x83,0x80,0x80,0x80,0x9e,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x80,0x80,0x80,0x85,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x8f,
0x80,0x80,0x80,0x80,0x80,0x80,0x87,0x80,0x80,0x80,0x9c,0x80,0x80,0x80,0x80,0x97,
0x80,0x80,0x80,0x80,0x80,0x80,0xa2,0x80,0x80,0x80,0xa9,0x80,0x80,0x80,0x80,0x91,
0x80,0x80,0x80,0x80,0x80,0x80,0xa8,0x80,0x80,0x80,0xa9,0x80,0x80,0x80,0x80,0x90,
0x80,0x80,0x80,0x80,0x80,0x80,0xa8,0x80,0x80,0x80,0xaa,0x80,0x80,0x80,0x80,0x92,
0x80,0x80,0x80,0x80,0x80,0x80,0xab,0x80,0x80,0x80,0xac,0x80,0x80,0x80,0x80,0x92,
0x80,0x80,0x80,0x80,0x80,0x80,0xa8,0x80,0x80,0x80,0xaa,0x80,0x80,0x80,0x80,0x94,
0x80,0x80,0x80,0x80,0x80,0x80,0xa6,0x80,0x80,0x80,0xa7,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x80,0x80,0x80,0xa6,0x80,0x80,0x80,0xa6,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x80,0x80,0x80,0xa5,0x80,0x80,0x80,0xa3,0x80,0x80,0x80,0x80,0x95,
0x80,0x80,0x80,0x80,0x80,0x80,0xa3,0x80,0x80,0x80,0xa4,0x80,0x80,0x80,0x80,0x98,
0x80,0x80,0x80,0x80,0x80,0x80,0xa2,0x80,0x80,0x80,0xa2,0x80,0x80,0x80,0x80,0x98,
0x80,0x80,0x80,0x80,0x80,0x80,0x9e,0x80,0x80,0x80,0x9d,0x80,0x80,0x80,0x80,0x99,
0x80,0x80,0x80,0x80,0x80,0x80,0x9b,0x80,0x80,0x80,0x9a,0x80,0x80,0x80,0x80,0x99,
0x80,0x80,0x80,0x80,0x80,0x80,0x9c,0x80,0x80,0x80,0x95,0x80,0x80,0x80,0x80,0x97,
0x80,0x80,0x80,0x80,0x80,0x80,0x98,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x99,
0x80,0x80,0x80,0x84,0x80,0x80,0x94,0x80,0x80,0x80,0x8d,0x80,0x80,0x80,0x80,0x98,
0x80,0x80,0x80,0x86,0x80,0x80,0x95,0x80,0x80,0x80,0x8c,0x80,0x80,0x80,0x80,0x98,
0x80,0x80,0x80,0x86,0x80,0x80,0x95,0x80,0x80,0x80,0x8f,0x80,0x80,0x80,0x80,0x99,
0x80,0xa3,0x80,0xab,0x80,0x88,0xc1,0x80,0x80,0x80,0x8c,0x80,0xb2,0x80,0x80,0x8d,
]
data = Conv2DData(
input_dims = [1, 62, 322, 1],
output_dims = [1, 30, 160, 16],
filter_dims = [16, 4, 4, 1],
input_offset = 128,
output_offset = -128,
output_min = -128,
output_max = 127,
stride = 2,
output_multipliers = as_signed_int32_array(output_multipliers_raw),
output_shifts = as_signed_int32_array(output_shift_raw),
output_biases = as_signed_int32_array(output_bias_raw),
raw_input_data = input_data_raw,
input_data = as_unsigned_int32_array(input_data_raw),
filter_data = as_unsigned_int32_array(filter_data_raw),
expected_output_data = as_unsigned_int32_array(output_data_raw))
save_data('sample_conv_06', data)
| 82.294701 | 84 | 0.770969 | 97,524 | 506,277 | 4.001456 | 0.003979 | 0.828602 | 0.773466 | 0.528375 | 0.849256 | 0.804678 | 0.754852 | 0.726849 | 0.682906 | 0.649675 | 0 | 0.537873 | 0.036691 | 506,277 | 6,151 | 85 | 82.30808 | 0.262286 | 0.001679 | 0 | 0.210371 | 0 | 0 | 0.000144 | 0 | 0 | 1 | 0.769374 | 0 | 0 | 1 | 0 | false | 0 | 0.000982 | 0 | 0.000982 | 0.000164 | 0 | 0 | 0 | null | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12 |
9cb10d6f52e4da2abc4109312b4e1777617f11b8 | 6,636 | py | Python | scrumate/people/migrations/0002_historicaldepartment_historicaldesignation_historicaldivision_historicalparty.py | nahidsaikat/scrumate | 11a63f1cc361261a7023eceafc2a27e29561dca0 | [
"MIT"
] | 1 | 2019-04-29T05:44:34.000Z | 2019-04-29T05:44:34.000Z | scrumate/people/migrations/0002_historicaldepartment_historicaldesignation_historicaldivision_historicalparty.py | nahidsaikat/scrumate | 11a63f1cc361261a7023eceafc2a27e29561dca0 | [
"MIT"
] | 27 | 2019-05-20T18:42:28.000Z | 2019-07-20T08:00:46.000Z | scrumate/people/migrations/0002_historicaldepartment_historicaldesignation_historicaldivision_historicalparty.py | nahidsaikat/scrumate | 11a63f1cc361261a7023eceafc2a27e29561dca0 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.2 on 2019-06-21 16:26
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import simple_history.models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('people', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='HistoricalParty',
fields=[
('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
('title', models.IntegerField(blank=True, choices=[(1, 'Mr.'), (2, 'Mrs.'), (3, 'Miss')], default=1, null=True)),
('first_name', models.CharField(max_length=100)),
('last_name', models.CharField(blank=True, max_length=100, null=True)),
('full_name', models.CharField(blank=True, max_length=200)),
('nick_name', models.CharField(blank=True, max_length=100, null=True)),
('email', models.CharField(max_length=100, null=True)),
('phone', models.CharField(max_length=100, null=True)),
('code', models.CharField(blank=True, max_length=100, null=True)),
('address_line_1', models.CharField(max_length=100, null=True)),
('address_line_2', models.CharField(blank=True, max_length=100, null=True)),
('address_line_3', models.CharField(blank=True, max_length=100, null=True)),
('address_line_4', models.CharField(blank=True, max_length=100, null=True)),
('history_id', models.AutoField(primary_key=True, serialize=False)),
('history_date', models.DateTimeField()),
('history_change_reason', models.CharField(max_length=100, null=True)),
('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name': 'historical party',
'ordering': ('-history_date', '-history_id'),
'get_latest_by': 'history_date',
},
bases=(simple_history.models.HistoricalChanges, models.Model),
),
migrations.CreateModel(
name='HistoricalDivision',
fields=[
('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
('name', models.CharField(max_length=100)),
('code', models.CharField(max_length=50)),
('description', models.TextField(default='')),
('history_id', models.AutoField(primary_key=True, serialize=False)),
('history_date', models.DateTimeField()),
('history_change_reason', models.CharField(max_length=100, null=True)),
('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name': 'historical division',
'ordering': ('-history_date', '-history_id'),
'get_latest_by': 'history_date',
},
bases=(simple_history.models.HistoricalChanges, models.Model),
),
migrations.CreateModel(
name='HistoricalDesignation',
fields=[
('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
('name', models.CharField(max_length=100)),
('code', models.CharField(blank=True, max_length=50, null=True)),
('description', models.TextField(blank=True, default='', null=True)),
('rank', models.IntegerField(blank=True, default=None, null=True)),
('history_id', models.AutoField(primary_key=True, serialize=False)),
('history_date', models.DateTimeField()),
('history_change_reason', models.CharField(max_length=100, null=True)),
('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
('department', models.ForeignKey(blank=True, db_constraint=False, default=None, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='people.Department')),
('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
('parent', models.ForeignKey(blank=True, db_constraint=False, default=None, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='people.Designation')),
],
options={
'verbose_name': 'historical designation',
'ordering': ('-history_date', '-history_id'),
'get_latest_by': 'history_date',
},
bases=(simple_history.models.HistoricalChanges, models.Model),
),
migrations.CreateModel(
name='HistoricalDepartment',
fields=[
('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
('name', models.CharField(max_length=100)),
('code', models.CharField(blank=True, max_length=50, null=True)),
('description', models.TextField(blank=True, default='', null=True)),
('history_id', models.AutoField(primary_key=True, serialize=False)),
('history_date', models.DateTimeField()),
('history_change_reason', models.CharField(max_length=100, null=True)),
('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name': 'historical department',
'ordering': ('-history_date', '-history_id'),
'get_latest_by': 'history_date',
},
bases=(simple_history.models.HistoricalChanges, models.Model),
),
]
| 60.327273 | 198 | 0.591621 | 681 | 6,636 | 5.562408 | 0.15859 | 0.052798 | 0.053854 | 0.05491 | 0.826822 | 0.826822 | 0.818638 | 0.777191 | 0.777191 | 0.767687 | 0 | 0.018247 | 0.248493 | 6,636 | 109 | 199 | 60.880734 | 0.741327 | 0.006781 | 0 | 0.61165 | 1 | 0 | 0.161937 | 0.015936 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.038835 | 0 | 0.067961 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
9cd81c670876973161f1170db0c5d06950b8c139 | 188 | py | Python | nice/blocks/__init__.py | cosmo-epfl/nice | 9b620dfaabf29d2f4f8362ae49313dbd57548090 | [
"MIT"
] | 3 | 2021-05-06T13:46:38.000Z | 2021-07-12T02:27:14.000Z | nice/blocks/__init__.py | cosmo-epfl/nice | 9b620dfaabf29d2f4f8362ae49313dbd57548090 | [
"MIT"
] | null | null | null | nice/blocks/__init__.py | cosmo-epfl/nice | 9b620dfaabf29d2f4f8362ae49313dbd57548090 | [
"MIT"
] | null | null | null | from nice.blocks.compressors import *
from nice.blocks.expansioners import *
from nice.blocks.purifiers import *
from nice.blocks.grouping import *
from nice.blocks.miscellaneous import *
| 31.333333 | 39 | 0.81383 | 25 | 188 | 6.12 | 0.36 | 0.261438 | 0.457516 | 0.522876 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.106383 | 188 | 5 | 40 | 37.6 | 0.910714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 8 |
1435da6c6892147519691a6646fb2e42a725cec7 | 231 | py | Python | linnapi/__init__.py | stcstores/linnapi | 88cc1d73444f44b7d901dc1086790a300066ea6e | [
"MIT"
] | null | null | null | linnapi/__init__.py | stcstores/linnapi | 88cc1d73444f44b7d901dc1086790a300066ea6e | [
"MIT"
] | null | null | null | linnapi/__init__.py | stcstores/linnapi | 88cc1d73444f44b7d901dc1086790a300066ea6e | [
"MIT"
] | null | null | null | """linnapi - Linnworks API integration."""
from . import exceptions, inventory
from .session import LinnworksAPISession, linnworks_api_session
__all__ = ["exceptions", "inventory", "LinnworksAPISession", "linnworks_api_session"]
| 33 | 85 | 0.787879 | 22 | 231 | 7.909091 | 0.5 | 0.206897 | 0.356322 | 0.436782 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.099567 | 231 | 6 | 86 | 38.5 | 0.836538 | 0.155844 | 0 | 0 | 0 | 0 | 0.312169 | 0.111111 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.666667 | 0 | 0.666667 | 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 | 1 | 0 | 0 | 7 |
14464f3dd2b67fc61d18079f661c9df2eb8b6a5d | 55,909 | py | Python | tests/test_admin_actions.py | jonathan-s/djangocms-moderation | 76625cf924f19af072ae865dc8901cb1c13dec40 | [
"BSD-3-Clause"
] | null | null | null | tests/test_admin_actions.py | jonathan-s/djangocms-moderation | 76625cf924f19af072ae865dc8901cb1c13dec40 | [
"BSD-3-Clause"
] | null | null | null | tests/test_admin_actions.py | jonathan-s/djangocms-moderation | 76625cf924f19af072ae865dc8901cb1c13dec40 | [
"BSD-3-Clause"
] | null | null | null | import mock
import unittest
from django.contrib.admin import ACTION_CHECKBOX_NAME
from django.contrib.auth.models import Group
from django.test import TransactionTestCase
from django.urls import reverse
from cms.test_utils.testcases import CMSTestCase
from cms.test_utils.util.context_managers import signal_tester
from djangocms_versioning.constants import DRAFT, PUBLISHED
from djangocms_versioning.models import Version
from djangocms_moderation import constants
from djangocms_moderation.admin import ModerationRequestTreeAdmin
from djangocms_moderation.constants import ACTION_REJECTED
from djangocms_moderation.models import (
ModerationRequest,
ModerationRequestTreeNode,
Role,
)
from djangocms_moderation.signals import published
from .utils import factories
def get_url_data(cls, action):
get_resp = cls.client.get(cls.url)
data = {
"action": action,
ACTION_CHECKBOX_NAME: [str(f.pk) for f in get_resp.context['cl'].queryset]
}
return data
class ApproveSelectedTest(CMSTestCase):
def setUp(self):
# Set up the db data
self.role1 = Role.objects.create(name="Role 1", user=factories.UserFactory(is_staff=True, is_superuser=True))
self.role2 = Role.objects.create(name="Role 2", user=factories.UserFactory(is_staff=True, is_superuser=True))
self.collection = factories.ModerationCollectionFactory(
author=self.role1.user, status=constants.IN_REVIEW)
self.collection.workflow.steps.create(role=self.role1, is_required=True, order=1)
self.collection.workflow.steps.create(role=self.role2, is_required=True, order=1)
# NOTE: Setting ids because we want the ids of the requests to be
# different to the ids of the nodes. This will give us confidence
# that the ids of the correct objects are being passed to the
# correct places.
self.moderation_request1 = factories.ModerationRequestFactory(
id=1, collection=self.collection)
self.moderation_request2 = factories.ModerationRequestFactory(
id=2, collection=self.collection)
self.root1 = factories.RootModerationRequestTreeNodeFactory(
id=4, moderation_request=self.moderation_request1)
factories.ChildModerationRequestTreeNodeFactory(
id=5, moderation_request=self.moderation_request2, parent=self.root1)
self.root2 = factories.RootModerationRequestTreeNodeFactory(
id=6, moderation_request=self.moderation_request2)
# Request 1 is approved, request 2 is started
self.moderation_request1.actions.create(by_user=self.role1.user, action=constants.ACTION_STARTED)
self.moderation_request2.actions.create(by_user=self.role1.user, action=constants.ACTION_STARTED)
self.moderation_request1.update_status(constants.ACTION_APPROVED, self.role1.user)
self.moderation_request1.update_status(constants.ACTION_APPROVED, self.role2.user)
# Set up the url data
self.url = reverse("admin:djangocms_moderation_moderationrequesttreenode_changelist")
self.url += "?moderation_request__collection__id={}".format(self.collection.pk)
# Asserts to check data set up is ok. Ideally wouldn't need them, but
# the set up is so complex that it's safer to have them.
self.assertFalse(self.moderation_request2.is_approved())
self.assertTrue(self.moderation_request1.is_approved())
@mock.patch("django.contrib.messages.success")
@mock.patch("djangocms_moderation.admin.notify_collection_moderators")
@mock.patch("djangocms_moderation.admin.notify_collection_author")
def test_approve_selected(self, notify_author_mock, notify_moderators_mock, messages_mock):
# Login as the collection author/role 1
self.client.force_login(self.role1.user)
# Select the approve action from the menu
data = get_url_data(self, "approve_selected")
response = self.client.post(self.url, data)
# And now go to the view the action redirects to. This will
# perform step1 of the approval process (as defined in the
# workflow in the setUp method)
response = self.client.post(response.url)
# Check response
self.assertEqual(response.status_code, 302)
self.assertEqual(response.url, self.url)
self.assertEqual(messages_mock.call_args[0][1], '1 request successfully approved')
messages_mock.reset_mock()
# Check correct users notified
notify_author_mock.assert_called_once_with(
collection=self.collection,
moderation_requests=[self.moderation_request2],
action=self.moderation_request2.get_last_action().action,
by_user=self.role1.user,
)
notify_moderators_mock.assert_called_once_with(
collection=self.collection,
moderation_requests=[self.moderation_request2],
action_obj=self.moderation_request2.get_last_action(),
)
# And reset mocks because we'll be needing to check this again
# for step2
notify_author_mock.reset_mock()
notify_moderators_mock.reset_mock()
# The status of the moderation requests hasn't changed yet
# because there are 2 steps to approval and both are needed
# for status to change
self.assertFalse(self.moderation_request2.is_approved())
self.assertTrue(self.moderation_request1.is_approved())
# Collection status hasn't changed either
self.collection.refresh_from_db()
self.assertEqual(self.collection.status, constants.IN_REVIEW)
# Now login as the user responsible for approving step2
self.client.force_login(self.role2.user)
# Select the approve action from the menu again
data = get_url_data(self, "approve_selected")
response = self.client.post(self.url, data)
# And now go to the view the action redirects to. This will
# perform step2 of the approval process (as defined in the
# workflow in the setUp method)
response = self.client.post(response.url)
# Check response
self.assertEqual(response.status_code, 302)
self.assertEqual(response.url, self.url)
self.assertEqual(messages_mock.call_args[0][1], '1 request successfully approved')
# The status of the previously unapproved request has changed.
# The other request stays as it is
self.assertTrue(self.moderation_request2.is_approved())
self.assertTrue(self.moderation_request1.is_approved())
# The collection has been archived as both requests have been
# approved now
self.collection.refresh_from_db()
self.assertEqual(self.collection.status, constants.ARCHIVED)
# Correct users have been notified
notify_author_mock.assert_called_once_with(
collection=self.collection,
moderation_requests=[self.moderation_request2],
action=self.moderation_request2.get_last_action().action,
by_user=self.role2.user,
)
self.assertFalse(notify_moderators_mock.called)
@mock.patch("django.contrib.messages.success")
@mock.patch("djangocms_moderation.admin.notify_collection_moderators")
def test_approve_selected_sends_correct_emails_to_moderators(self, notify_moderators_mock, messages_mock):
# Set up additional roles and user
user3 = factories.UserFactory(is_staff=True, is_superuser=True)
group = Group.objects.create(name="Group 1")
user3.groups.add(group)
role3 = Role.objects.create(name="Role 3", group=group)
role4 = Role.objects.create(user=self.role1.user)
# Set up two more steps
self.collection.workflow.steps.create(role=role3, is_required=True, order=1)
self.collection.workflow.steps.create(role=role4, is_required=True, order=1)
self.role1.user.groups.add(group)
# Set up one more, partially approved request
moderation_request3 = factories.ModerationRequestFactory(id=3, collection=self.collection)
moderation_request3.actions.create(by_user=self.role1.user, action=constants.ACTION_STARTED)
moderation_request3.update_status(by_user=self.role1.user, action=constants.ACTION_APPROVED)
moderation_request3.update_status(by_user=self.role2.user, action=constants.ACTION_APPROVED)
factories.RootModerationRequestTreeNodeFactory(
id=7, moderation_request=moderation_request3
)
# Login as the collection author/role1 user
self.client.force_login(self.role1.user)
data = get_url_data(self, "approve_selected")
response = self.client.post(self.url, data)
response = self.client.post(response.url)
# Check response
self.assertEqual(response.status_code, 302)
self.assertEqual(response.url, self.url)
self.assertEqual(messages_mock.call_args[0][1], '3 requests successfully approved')
messages_mock.reset_mock()
# First post as role1 user should notify mr1 and mr2 and mr3 moderators
# The notify email will be sent accordingly. As mr1 and mr3 are in
# different stages of approval compared to mr 2,
# we need to send 2 emails to appropriate moderators
self.assertEqual(notify_moderators_mock.call_count, 2)
self.assertEqual(
notify_moderators_mock.call_args_list[1],
mock.call(collection=self.collection,
moderation_requests=[self.moderation_request1, moderation_request3],
action_obj=self.moderation_request1.get_last_action())
)
self.assertEqual(
notify_moderators_mock.call_args_list[0],
mock.call(collection=self.collection,
moderation_requests=[self.moderation_request2],
action_obj=self.moderation_request2.get_last_action())
)
notify_moderators_mock.reset_mock()
# No moderation requests are approved yet
self.assertFalse(self.moderation_request1.is_approved())
self.assertFalse(self.moderation_request2.is_approved())
self.assertFalse(moderation_request3.is_approved())
response = self.client.post(self.url, data)
response = self.client.post(response.url)
# Check response
self.assertEqual(response.status_code, 302)
self.assertEqual(response.url, self.url)
self.assertEqual(messages_mock.call_args[0][1], '2 requests successfully approved')
messages_mock.reset_mock()
# Second post approves m3 and mr1, but as this is the last stage of
# the approval, there is no need for notification emails anymore
self.assertEqual(notify_moderators_mock.call_count, 0)
# moderation request 1 and 3 are now approved. Moderation request
# 2 is not
self.assertTrue(self.moderation_request1.is_approved())
self.assertFalse(self.moderation_request2.is_approved())
self.assertTrue(moderation_request3.is_approved())
# moderation request 2 is not yet approved so collection should
# still be in review
self.collection.refresh_from_db()
self.assertEqual(self.collection.status, constants.IN_REVIEW)
self.client.force_login(self.role2.user)
# user2 can approve only 1 request, mr2, so one notification email
# should go out
response = self.client.post(self.url, data)
response = self.client.post(response.url)
# Check response
self.assertEqual(response.status_code, 302)
self.assertEqual(response.url, self.url)
self.assertEqual(messages_mock.call_args[0][1], '1 request successfully approved')
messages_mock.reset_mock()
notify_moderators_mock.assert_called_once_with(
collection=self.collection,
moderation_requests=[self.moderation_request2],
action_obj=self.moderation_request2.get_last_action(),
)
notify_moderators_mock.reset_mock()
# moderation request 2 is still not yet approved
self.assertTrue(self.moderation_request1.is_approved())
self.assertFalse(self.moderation_request2.is_approved())
self.assertTrue(moderation_request3.is_approved())
# moderation request 2 is not yet approved so collection should
# still be in review
self.collection.refresh_from_db()
self.assertEqual(self.collection.status, constants.IN_REVIEW)
self.client.force_login(user3)
response = self.client.post(self.url, data)
response = self.client.post(response.url)
# Check response
self.assertEqual(response.status_code, 302)
self.assertEqual(response.url, self.url)
self.assertEqual(messages_mock.call_args[0][1], '1 request successfully approved')
messages_mock.reset_mock()
notify_moderators_mock.assert_called_once_with(
collection=self.collection,
moderation_requests=[self.moderation_request2],
action_obj=self.moderation_request2.get_last_action(),
)
notify_moderators_mock.reset_mock()
self.assertTrue(self.moderation_request1.is_approved())
self.assertFalse(self.moderation_request2.is_approved())
self.assertTrue(moderation_request3.is_approved())
# moderation request 2 is not yet approved so collection should
# still be in review
self.collection.refresh_from_db()
self.assertEqual(self.collection.status, constants.IN_REVIEW)
self.client.force_login(self.role1.user)
response = self.client.post(self.url, data)
response = self.client.post(response.url)
# Check response
self.assertEqual(response.status_code, 302)
self.assertEqual(response.url, self.url)
self.assertEqual(messages_mock.call_args[0][1], '1 request successfully approved')
messages_mock.reset_mock()
self.assertEqual(notify_moderators_mock.call_count, 0)
self.assertTrue(self.moderation_request1.is_approved())
self.assertTrue(self.moderation_request2.is_approved())
self.assertTrue(moderation_request3.is_approved())
# moderation request 2 is now approved so collection should
# have been archived
self.collection.refresh_from_db()
self.assertEqual(self.collection.status, constants.ARCHIVED)
def test_404_on_nonexisting_collection(self):
self.client.force_login(self.role1.user)
# Need to access the view directly to test for this
url = reverse("admin:djangocms_moderation_moderationrequest_approve")
url += "?ids=1,2&collection_id=12342"
response = self.client.post(url)
self.assertEqual(response.status_code, 404)
def test_404_on_invalid_collection_id(self):
self.client.force_login(self.role1.user)
# Need to access the view directly to test for this
url = reverse("admin:djangocms_moderation_moderationrequest_approve")
url += "?ids=1,2&collection_id=aaa"
response = self.client.post(url)
self.assertEqual(response.status_code, 404)
@mock.patch("djangocms_moderation.admin.notify_collection_moderators")
@mock.patch("django.contrib.messages.success")
@mock.patch(
"djangocms_moderation.models.ModerationRequest.user_can_take_moderation_action",
mock.Mock(return_value=False)
)
def test_view_doesnt_approve_when_user_cant_approve(self, messages_mock, notify_moderators_mock):
self.client.force_login(self.role1.user)
# Set up the url (need to access the view directly)
url = reverse("admin:djangocms_moderation_moderationrequest_approve")
url += "?ids=%d,%d&collection_id=%d" % (
self.moderation_request1.pk, self.moderation_request2.pk, self.collection.pk)
response = self.client.post(url)
# Check response
self.assertEqual(response.status_code, 302)
self.assertEqual(response.url, self.url)
self.assertEqual(messages_mock.call_args[0][1], '0 requests successfully approved')
# No actions were approved
self.assertFalse(self.moderation_request2.actions.filter(
action=constants.ACTION_RESUBMITTED).exists())
self.assertEqual(notify_moderators_mock.call_count, 0)
def test_approve_view_when_using_get(self):
self.client.force_login(self.role1.user)
# Choose the approve_selected action from the dropdown
data = get_url_data(self, "approve_selected")
response = self.client.post(self.url, data)
# And follow the redirect (with a GET call) to the view that does the approve
response = self.client.get(response.url)
# Smoke test the response. When using a GET call not a lot happens.
self.assertEqual(response.status_code, 200)
self.assertEqual(
response.templates[0].name,
'admin/djangocms_moderation/moderationrequest/approve_confirmation.html'
)
class RejectSelectedTest(CMSTestCase):
def setUp(self):
# Set up the db data
self.user = factories.UserFactory(is_staff=True, is_superuser=True)
self.collection = factories.ModerationCollectionFactory(
author=self.user, status=constants.IN_REVIEW)
self.role1 = Role.objects.create(name="Role 1", user=self.user)
self.role2 = Role.objects.create(name="Role 2", user=factories.UserFactory(is_staff=True, is_superuser=True))
self.collection.workflow.steps.create(role=self.role1, is_required=True, order=1)
self.collection.workflow.steps.create(role=self.role2, is_required=True, order=1)
# NOTE: Setting ids because we want the ids of the requests to be
# different to the ids of the nodes. This will give us confidence
# that the ids of the correct objects are being passed to the
# correct places.
self.moderation_request1 = factories.ModerationRequestFactory(
id=1, collection=self.collection)
self.moderation_request2 = factories.ModerationRequestFactory(
id=2, collection=self.collection)
self.root1 = factories.RootModerationRequestTreeNodeFactory(
id=4, moderation_request=self.moderation_request1)
factories.ChildModerationRequestTreeNodeFactory(
id=5, moderation_request=self.moderation_request2, parent=self.root1)
self.root2 = factories.RootModerationRequestTreeNodeFactory(
id=6, moderation_request=self.moderation_request2)
# Request 1 is approved, request 2 is started
self.moderation_request1.actions.create(by_user=self.user, action=constants.ACTION_STARTED)
self.moderation_request2.actions.create(by_user=self.user, action=constants.ACTION_STARTED)
self.moderation_request1.update_status(constants.ACTION_APPROVED, self.role1.user)
self.moderation_request1.update_status(constants.ACTION_APPROVED, self.role2.user)
# Login as the collection author
self.client.force_login(self.user)
# Set up the url data
self.url = reverse("admin:djangocms_moderation_moderationrequesttreenode_changelist")
self.url += "?moderation_request__collection__id={}".format(self.collection.pk)
# Asserts to check data set up is ok. Ideally wouldn't need them, but
# the set up is so complex that it's safer to have them.
self.assertFalse(self.moderation_request2.is_approved())
self.assertFalse(self.moderation_request2.is_rejected())
self.assertTrue(self.moderation_request2.is_active)
self.assertFalse(self.moderation_request2.actions.get().is_archived)
self.assertTrue(self.moderation_request1.is_approved())
@mock.patch("django.contrib.messages.success")
@mock.patch("djangocms_moderation.admin.notify_collection_moderators")
@mock.patch("djangocms_moderation.admin.notify_collection_author")
def test_reject_selected_rejects_request(self, notify_author_mock, notify_moderators_mock, messages_mock):
# Select the reject action from the menu
data = get_url_data(self, "reject_selected")
response = self.client.post(self.url, data)
# And now go to the view the action redirects to
response = self.client.post(response.url)
# Response is correct
self.assertEqual(response.status_code, 302)
self.assertEqual(response.url, self.url)
self.assertEqual(
messages_mock.call_args[0][1],
'1 request successfully submitted for rework'
)
# The rejected request has indeed been marked rejected. The
# previous action on the rejected request has been archived. The
# previously approved request has not changed its status
self.assertFalse(self.moderation_request2.is_approved())
self.assertTrue(self.moderation_request2.is_rejected())
self.assertTrue(self.moderation_request2.is_active)
moderation_request2_actions = self.moderation_request2.actions.all()
self.assertEqual(moderation_request2_actions.count(), 2)
self.assertTrue(moderation_request2_actions[0].is_archived)
self.assertFalse(moderation_request2_actions[1].is_archived)
self.assertTrue(self.moderation_request1.is_approved())
# Expected users were notified
self.assertFalse(notify_moderators_mock.called)
notify_author_mock.assert_called_once_with(
collection=self.collection,
moderation_requests=[self.moderation_request2],
action=self.moderation_request2.get_last_action().action,
by_user=self.user,
)
# Collection still in review as version2 is still draft
self.collection.refresh_from_db()
self.assertEqual(self.collection.status, constants.IN_REVIEW)
def test_reject_selected_view_when_using_get(self):
# Choose the reject_selected action from the dropdown
data = get_url_data(self, "reject_selected")
response = self.client.post(self.url, data)
# And follow the redirect (with a GET call) to the view that does the publish
response = self.client.get(response.url)
# Smoke test the response. When using a GET call not a lot happens.
self.assertEqual(response.status_code, 200)
self.assertEqual(
response.templates[0].name,
'admin/djangocms_moderation/moderationrequest/rework_confirmation.html'
)
def test_404_on_nonexisting_collection(self):
# Need to access the view directly to test for this
url = reverse("admin:djangocms_moderation_moderationrequest_rework")
url += "?ids=1,2&collection_id=12342"
response = self.client.post(url)
self.assertEqual(response.status_code, 404)
def test_404_on_invalid_collection_id(self):
# Need to access the view directly to test for this
url = reverse("admin:djangocms_moderation_moderationrequest_rework")
url += "?ids=1,2&collection_id=aaa"
response = self.client.post(url)
self.assertEqual(response.status_code, 404)
# TODO: This needs to be verified because unlike with other views
# no code throws a 403 on non-author but the list of actions does
# appear to filter the action dropdown for this user. Hard to say
# what is the correct behaviour or if this test makes correct
# assumptions in user set up.
def test_reject_selected_action_cannot_be_accessed_if_not_collection_author(self):
# Login as a user who is not the collection author
self.client.force_login(self.role2.user)
# Choose the reject_selected action from the dropdown
data = get_url_data(self, "reject_selected")
response = self.client.post(self.url, data)
# The action is not on the page as available to somebody who is not
# the author, therefore django will just return 200 as you're
# trying to choose an action that isn't in the dropdown
# (if anything had been resubmitted it would have been a 302)
self.assertEqual(response.status_code, 200)
@mock.patch("django.contrib.messages.success")
@mock.patch(
"djangocms_moderation.models.ModerationRequest.user_can_take_moderation_action",
mock.Mock(return_value=False)
)
@mock.patch("djangocms_moderation.admin.notify_collection_moderators")
@mock.patch("djangocms_moderation.admin.notify_collection_author")
def test_view_doesnt_reject_when_user_cant_take_moderation_action(
self, notify_author_mock, notify_moderators_mock, messages_mock
):
# Set up the url (need to access the view directly)
url = reverse("admin:djangocms_moderation_moderationrequest_rework")
url += "?ids=%d,%d&collection_id=%d" % (
self.moderation_request1.pk, self.moderation_request2.pk, self.collection.pk)
response = self.client.post(url)
# Check response
self.assertEqual(response.status_code, 302)
self.assertEqual(response.url, self.url)
self.assertEqual(
messages_mock.call_args[0][1],
'0 requests successfully submitted for rework'
)
# The request has not changed
self.assertFalse(self.moderation_request2.is_approved())
self.assertFalse(self.moderation_request2.is_rejected())
# Collection still in review
self.collection.refresh_from_db()
self.assertEqual(self.collection.status, constants.IN_REVIEW)
# Nobody was notified
self.assertFalse(notify_moderators_mock.called)
self.assertFalse(notify_author_mock.called)
class PublishSelectedTest(CMSTestCase):
def setUp(self):
# Set up the db data
self.user = factories.UserFactory(is_staff=True, is_superuser=True)
self.collection = factories.ModerationCollectionFactory(
author=self.user, status=constants.IN_REVIEW)
self.role1 = Role.objects.create(name="Role 1", user=self.user)
self.role2 = Role.objects.create(name="Role 2", user=factories.UserFactory(is_staff=True, is_superuser=True))
self.collection.workflow.steps.create(role=self.role1, is_required=True, order=1)
self.collection.workflow.steps.create(role=self.role2, is_required=True, order=1)
# NOTE: Setting ids because we want the ids of the requests to be
# different to the ids of the nodes. This will give us confidence
# that the ids of the correct objects are being passed to the
# correct places.
self.moderation_request1 = factories.ModerationRequestFactory(
id=1, collection=self.collection)
self.moderation_request2 = factories.ModerationRequestFactory(
id=2, collection=self.collection)
self.root1 = factories.RootModerationRequestTreeNodeFactory(
id=4, moderation_request=self.moderation_request1)
factories.ChildModerationRequestTreeNodeFactory(
id=5, moderation_request=self.moderation_request2, parent=self.root1)
self.root2 = factories.RootModerationRequestTreeNodeFactory(
id=6, moderation_request=self.moderation_request2)
# Request 1 is approved, request 2 is started
self.moderation_request1.actions.create(by_user=self.user, action=constants.ACTION_STARTED)
self.moderation_request2.actions.create(by_user=self.user, action=constants.ACTION_STARTED)
self.moderation_request1.update_status(constants.ACTION_APPROVED, self.role1.user)
self.moderation_request1.update_status(constants.ACTION_APPROVED, self.role2.user)
# Login as the collection author
self.client.force_login(self.user)
# Set up the url data
self.url = reverse("admin:djangocms_moderation_moderationrequesttreenode_changelist")
self.url += "?moderation_request__collection__id={}".format(self.collection.pk)
# Asserts to check data set up is ok. Ideally wouldn't need them, but
# the set up is so complex that it's safer to have them.
self.assertTrue(self.moderation_request1.is_active)
self.assertTrue(self.moderation_request2.is_active)
self.assertEqual(self.moderation_request1.version.state, DRAFT)
self.assertEqual(self.moderation_request2.version.state, DRAFT)
@mock.patch("django.contrib.messages.success")
def test_publish_selected_publishes_approved_request(self, messages_mock):
# Select the publish action from the menu
data = get_url_data(self, "publish_selected")
response = self.client.post(self.url, data)
# And now go to the view the action redirects to
response = self.client.post(response.url)
# Response is correct
self.assertEqual(response.status_code, 302)
self.assertEqual(response.url, self.url)
self.assertEqual(messages_mock.call_args[0][1], '1 request successfully published')
# Check approved request was published and started request was not
# NOTE: We can't do refresh_from_db() for Version, as it complains about
# `state` field being changed directly
version1 = Version.objects.get(pk=self.moderation_request1.version.pk)
version2 = Version.objects.get(pk=self.moderation_request2.version.pk)
self.moderation_request1.refresh_from_db()
self.moderation_request2.refresh_from_db()
self.assertEqual(version1.state, PUBLISHED)
self.assertEqual(version2.state, DRAFT)
self.assertFalse(self.moderation_request1.is_active)
self.assertTrue(self.moderation_request2.is_active)
# Collection still in review as version2 is still draft
self.collection.refresh_from_db()
self.assertEqual(self.collection.status, constants.IN_REVIEW)
def test_signal_when_published(self):
"""
A signal should be sent so further action can be taken when a moderation
collection is being published.
"""
data = get_url_data(self, "publish_selected")
response = self.client.post(self.url, data)
with signal_tester(published) as signal:
# And now go to the view the action redirects to
self.client.post(response.url)
args, kwargs = signal.calls[0]
published_mr = kwargs['moderation_requests']
self.assertEquals(signal.call_count, 1)
self.assertEquals(kwargs['sender'], ModerationRequest)
self.assertEquals(kwargs['collection'], self.collection)
self.assertEquals(kwargs['moderator'], self.collection.author)
self.assertEquals(len(published_mr), 1)
self.assertEquals(published_mr[0], self.moderation_request1)
self.assertEquals(kwargs['workflow'], self.collection.workflow)
@unittest.skip("Skip until collection status bugs fixed")
@mock.patch("django.contrib.messages.success")
def test_publish_selected_sets_collection_to_archived_if_all_requests_published(self, messages_mock):
# Make sure both moderation requests have been approved
self.moderation_request2.update_status(constants.ACTION_APPROVED, self.role1.user)
self.moderation_request2.update_status(constants.ACTION_APPROVED, self.role2.user)
# Select the publish action from the menu
data = get_url_data(self, "publish_selected")
response = self.client.post(self.url, data)
# And now go to the view the action redirects to
response = self.client.post(response.url)
# Response is correct
self.assertEqual(response.status_code, 302)
self.assertEqual(response.url, self.url)
self.assertEqual(messages_mock.call_args[0][1], '2 requests successfully published')
# Check both approved request were published
# NOTE: We can't do refresh_from_db() for Version, as it complains about
# `state` field being changed directly
version1 = Version.objects.get(pk=self.moderation_request1.version.pk)
version2 = Version.objects.get(pk=self.moderation_request2.version.pk)
self.moderation_request1.refresh_from_db()
self.moderation_request2.refresh_from_db()
self.assertEqual(version1.state, PUBLISHED)
self.assertEqual(version2.state, PUBLISHED)
self.assertFalse(self.moderation_request1.is_active)
self.assertFalse(self.moderation_request2.is_active)
# Collection should be archived as both requests are now published
self.collection.refresh_from_db()
self.assertEqual(self.collection.status, constants.ARCHIVED)
def test_publish_selected_view_when_using_get(self):
# Choose the publish_selected action from the dropdown
data = get_url_data(self, "publish_selected")
response = self.client.post(self.url, data)
# And follow the redirect (with a GET call) to the view that does the publish
response = self.client.get(response.url)
# Smoke test the response. When using a GET call not a lot happens.
self.assertEqual(response.status_code, 200)
self.assertEqual(
response.templates[0].name,
'admin/djangocms_moderation/moderationrequest/publish_confirmation.html'
)
def test_404_on_nonexisting_collection(self):
# Need to access the view directly to test for this
url = reverse("admin:djangocms_moderation_moderationrequest_publish")
url += "?ids=1,2&collection_id=12342"
response = self.client.post(url)
self.assertEqual(response.status_code, 404)
def test_404_on_invalid_collection_id(self):
# Need to access the view directly to test for this
url = reverse("admin:djangocms_moderation_moderationrequest_publish")
url += "?ids=1,2&collection_id=aaa"
response = self.client.post(url)
self.assertEqual(response.status_code, 404)
def test_publish_selected_action_cannot_be_accessed_if_not_collection_author(self):
# Login as a user who is not the collection author
self.client.force_login(self.get_superuser())
# Choose the resubmit_selected action from the dropdown
data = get_url_data(self, "publish_selected")
response = self.client.post(self.url, data)
# The action is not on the page as available to somebody who is not
# the author, therefore django will just return 200 as you're
# trying to choose an action that isn't in the dropdown
# (if anything had been resubmitted it would have been a 302)
self.assertEqual(response.status_code, 200)
def test_publish_selected_view_cannot_be_accessed_if_not_collection_author(self):
# Login as a user who is not the collection author
self.client.force_login(self.get_superuser())
# Set up the url (need to access the view directly)
url = reverse("admin:djangocms_moderation_moderationrequest_publish")
url += "?ids=%d,%d&collection_id=%d" % (
self.moderation_request1.pk, self.moderation_request2.pk, self.collection.pk)
# POST directly to the view, don't go through actions
response = self.client.post(url)
# Check response
self.assertEqual(response.status_code, 403)
# Nothing is published
version1 = Version.objects.get(pk=self.moderation_request1.version.pk)
version2 = Version.objects.get(pk=self.moderation_request2.version.pk)
self.moderation_request1.refresh_from_db()
self.moderation_request2.refresh_from_db()
self.assertEqual(version1.state, DRAFT)
self.assertEqual(version2.state, DRAFT)
self.assertTrue(self.moderation_request1.is_active)
self.assertTrue(self.moderation_request2.is_active)
# Collection still in review
self.collection.refresh_from_db()
self.assertEqual(self.collection.status, constants.IN_REVIEW)
@mock.patch("django.contrib.messages.success")
@mock.patch("djangocms_moderation.models.ModerationRequest.version_can_be_published", mock.Mock(return_value=False))
def test_view_doesnt_publish_when_version_cant_be_published(self, messages_mock):
# Set up the url (need to access the view directly)
url = reverse("admin:djangocms_moderation_moderationrequest_publish")
url += "?ids=%d,%d&collection_id=%d" % (
self.moderation_request1.pk, self.moderation_request2.pk, self.collection.pk)
response = self.client.post(url)
# Check response
self.assertEqual(response.status_code, 302)
self.assertEqual(response.url, self.url)
self.assertEqual(messages_mock.call_args[0][1], '0 requests successfully published')
# Nothing is published
version1 = Version.objects.get(pk=self.moderation_request1.version.pk)
version2 = Version.objects.get(pk=self.moderation_request2.version.pk)
self.moderation_request1.refresh_from_db()
self.moderation_request2.refresh_from_db()
self.assertEqual(version1.state, DRAFT)
self.assertEqual(version2.state, DRAFT)
self.assertTrue(self.moderation_request1.is_active)
self.assertTrue(self.moderation_request2.is_active)
# Collection still in review
self.collection.refresh_from_db()
self.assertEqual(self.collection.status, constants.IN_REVIEW)
class ResubmitSelectedTest(CMSTestCase):
def setUp(self):
# Set up the db data
self.user = factories.UserFactory(is_staff=True, is_superuser=True)
self.collection = factories.ModerationCollectionFactory(
author=self.user, status=constants.IN_REVIEW)
# NOTE: Setting ids because we want the ids of the requests to be
# different to the ids of the nodes. This will give us confidence
# that the ids of the correct objects are being passed to the
# correct places.
self.moderation_request1 = factories.ModerationRequestFactory(
id=1, collection=self.collection)
self.moderation_request2 = factories.ModerationRequestFactory(
id=2, collection=self.collection)
# Make self.moderation_request2 rejected
self.moderation_request2.update_status(action=ACTION_REJECTED, by_user=self.user)
self.root1 = factories.RootModerationRequestTreeNodeFactory(
id=4, moderation_request=self.moderation_request1)
factories.ChildModerationRequestTreeNodeFactory(
id=5, moderation_request=self.moderation_request2, parent=self.root1)
self.root2 = factories.RootModerationRequestTreeNodeFactory(
id=6, moderation_request=self.moderation_request2)
# Login as the collection author
self.client.force_login(self.user)
self.url = reverse("admin:djangocms_moderation_moderationrequesttreenode_changelist")
self.url += "?moderation_request__collection__id={}".format(self.collection.pk)
# Asserts to check data set up is ok. Ideally wouldn't need them, but
# the set up is so complex that it's safer to have them.
self.assertTrue(self.moderation_request2.is_rejected())
self.assertTrue(self.moderation_request1.is_approved())
self.assertEqual(self.collection.status, constants.IN_REVIEW)
@mock.patch("djangocms_moderation.admin.notify_collection_moderators")
@mock.patch("djangocms_moderation.admin.notify_collection_author")
@mock.patch("django.contrib.messages.success")
def test_resubmit_selected_resubmits_rejected_request(
self, messages_mock, notify_author_mock, notify_moderators_mock
):
# Choose the resubmit_selected action from the dropdown
data = get_url_data(self, "resubmit_selected")
response = self.client.post(self.url, data)
# And follow the redirect to the view that does the resubmit
response = self.client.post(response.url)
# Response is correct
self.assertEqual(response.status_code, 302)
self.assertEqual(response.url, self.url)
self.assertEqual(messages_mock.call_args[0][1], '1 request successfully resubmitted for review')
# Rejected request was resubmitted and approved request did not change
self.assertFalse(self.moderation_request2.is_rejected())
self.assertTrue(self.moderation_request2.actions.filter(
action=constants.ACTION_RESUBMITTED, by_user=self.user).exists())
self.assertTrue(self.moderation_request1.is_approved())
# Collection status has not changed
self.collection.refresh_from_db()
self.assertEqual(self.collection.status, constants.IN_REVIEW)
# Expected users were notified
self.assertFalse(notify_author_mock.called)
notify_moderators_mock.assert_called_once_with(
collection=self.collection,
moderation_requests=[self.moderation_request2],
action_obj=self.moderation_request2.get_last_action(),
)
def test_resubmit_selected_view_when_using_get(self):
# Choose the resubmit_selected action from the dropdown
data = get_url_data(self, "resubmit_selected")
response = self.client.post(self.url, data)
# And follow the redirect (with a GET call) to the view that does the resubmit
response = self.client.get(response.url)
# Smoke test the response. When using a GET call not a lot happens.
self.assertEqual(response.status_code, 200)
self.assertEqual(
response.templates[0].name,
'admin/djangocms_moderation/moderationrequest/resubmit_confirmation.html'
)
def test_404_on_nonexisting_collection(self):
# Need to access the view directly to test for this
url = reverse("admin:djangocms_moderation_moderationrequest_resubmit")
url += "?ids=1,2&collection_id=12342"
response = self.client.post(url)
self.assertEqual(response.status_code, 404)
def test_404_on_invalid_collection_id(self):
# Need to access the view directly to test for this
url = reverse("admin:djangocms_moderation_moderationrequest_resubmit")
url += "?ids=1,2&collection_id=aaa"
response = self.client.post(url)
self.assertEqual(response.status_code, 404)
@mock.patch("djangocms_moderation.admin.notify_collection_moderators")
@mock.patch("django.contrib.messages.success")
@mock.patch("djangocms_moderation.models.ModerationRequest.user_can_resubmit", mock.Mock(return_value=False))
def test_view_doesnt_resubmit_when_user_cant_resubmit(self, messages_mock, notify_moderators_mock):
# Set up the url (need to access the view directly)
url = reverse("admin:djangocms_moderation_moderationrequest_resubmit")
url += "?ids=%d,%d&collection_id=%d" % (
self.moderation_request1.pk, self.moderation_request2.pk, self.collection.pk)
response = self.client.post(url)
# Check response
self.assertEqual(response.status_code, 302)
self.assertEqual(response.url, self.url)
self.assertEqual(messages_mock.call_args[0][1], '0 requests successfully resubmitted for review')
# No actions were resubmitted
self.assertFalse(self.moderation_request2.actions.filter(
action=constants.ACTION_RESUBMITTED).exists())
self.assertEqual(notify_moderators_mock.call_count, 0)
def test_resubmit_selected_action_cannot_be_accessed_if_not_collection_author(self):
# Login as a user who is not the collection author
self.client.force_login(self.get_superuser())
# Choose the resubmit_selected action from the dropdown
data = get_url_data(self, "resubmit_selected")
response = self.client.post(self.url, data)
# The action is not on the page as available to somebody who is not
# the author, therefore django will just return 200 as you're
# trying to choose an action that isn't in the dropdown
# (if anything had been resubmitted it would have been a 302)
self.assertEqual(response.status_code, 200)
@mock.patch("djangocms_moderation.admin.notify_collection_moderators")
def test_resubmit_selected_view_cannot_be_accessed_if_not_collection_author(self, notify_moderators_mock):
# Login as a user who is not the collection author
self.client.force_login(self.get_superuser())
# Set up the url (need to access the view directly)
url = reverse("admin:djangocms_moderation_moderationrequest_resubmit")
url += "?ids=%d,%d&collection_id=%d" % (
self.moderation_request1.pk, self.moderation_request2.pk, self.collection.pk)
# POST directly to the view, don't go through actions
response = self.client.post(url)
self.assertEqual(response.status_code, 403)
# Nothing is resubmitted
self.assertFalse(self.moderation_request2.actions.filter(
action=constants.ACTION_RESUBMITTED).exists())
# Notifications not sent
self.assertFalse(notify_moderators_mock.called)
class DeleteSelectedTest(CMSTestCase):
def setUp(self):
self.user = factories.UserFactory(is_staff=True, is_superuser=True)
self.collection = factories.ModerationCollectionFactory(
author=self.user, status=constants.IN_REVIEW)
# NOTE: Setting ids because we want the ids of the requests to be
# different to the ids of the nodes. This will give us confidence
# that the ids of the correct objects are being passed to the
# correct places.
self.moderation_request1 = factories.ModerationRequestFactory(
id=1, collection=self.collection)
self.moderation_request2 = factories.ModerationRequestFactory(
id=2, collection=self.collection)
self.root1 = factories.RootModerationRequestTreeNodeFactory(
id=4, moderation_request=self.moderation_request1)
factories.ChildModerationRequestTreeNodeFactory(
id=5, moderation_request=self.moderation_request2, parent=self.root1)
self.root2 = factories.RootModerationRequestTreeNodeFactory(
id=6, moderation_request=self.moderation_request2)
self.url = reverse("admin:djangocms_moderation_moderationrequesttreenode_changelist")
self.url += "?moderation_request__collection__id={}".format(self.collection.pk)
@mock.patch.object(ModerationRequestTreeAdmin, "has_delete_permission", mock.Mock(return_value=True))
def test_delete_selected_action_cannot_be_accessed_if_not_collection_author(self):
# Login as a user who is not the collection author
self.client.force_login(self.get_superuser())
# Choose the delete_selected action from the dropdown
data = get_url_data(self, "delete_selected")
response = self.client.post(self.url, data)
# The action is not on the page as available to somebody who is not
# the author, therefore django will just return 200 as you're
# trying to choose an action that isn't in the dropdown
# (if anything had been deleted it would have been a 302)
self.assertEqual(response.status_code, 200)
@mock.patch.object(ModerationRequestTreeAdmin, "has_delete_permission", mock.Mock(return_value=True))
@mock.patch("djangocms_moderation.admin.notify_collection_author")
def test_delete_selected_view_cannot_be_accessed_if_not_collection_author(self, notify_author_mock):
# Login as a user who is not the collection author
self.client.force_login(self.get_superuser())
# Set up the url
url = reverse("admin:djangocms_moderation_moderationrequesttreenode_delete")
url += "?ids={tree_ids}&collection_id={collection_id}".format(
tree_ids=",".join([str(self.root1.pk), str(self.root2.pk)]),
collection_id=str(self.collection.pk)
)
# POST directly to the view, don't go through actions
response = self.client.post(url)
self.assertEqual(response.status_code, 403)
# Nothing is deleted
self.assertEqual(ModerationRequest.objects.filter(collection=self.collection).count(), 2)
# Collection not modified
self.collection.refresh_from_db()
self.assertEqual(self.collection.status, constants.IN_REVIEW)
# Notifications not sent
self.assertFalse(notify_author_mock.called)
@mock.patch.object(ModerationRequestTreeAdmin, "has_delete_permission", mock.Mock(return_value=False))
def test_delete_selected_action_cannot_be_accessed_without_delete_permission(self):
# Login as the collection author
self.client.force_login(self.user)
# Choose the delete_selected action from the dropdown
data = get_url_data(self, "remove_selected")
response = self.client.post(self.url, data)
self.assertEqual(response.status_code, 403)
@mock.patch.object(ModerationRequestTreeAdmin, "has_delete_permission", mock.Mock(return_value=False))
@mock.patch("djangocms_moderation.admin.notify_collection_author")
def test_delete_selected_view_cannot_be_accessed_without_delete_permission(self, notify_author_mock):
# Login as the collection author
self.client.force_login(self.user)
# Set up url
url = reverse("admin:djangocms_moderation_moderationrequesttreenode_delete")
url += "?ids={tree_ids}&collection_id={collection_id}".format(
tree_ids=",".join([str(self.root1.pk), str(self.root2.pk)]),
collection_id=str(self.collection.pk)
)
# POST directly to the view, don't go through actions
response = self.client.post(url)
self.assertEqual(response.status_code, 403)
# Nothing is deleted
self.assertEqual(ModerationRequest.objects.filter(collection=self.collection).count(), 2)
# Collection not modified
self.collection.refresh_from_db()
self.assertEqual(self.collection.status, constants.IN_REVIEW)
# Notifications not sent
self.assertFalse(notify_author_mock.called)
@mock.patch("django.contrib.messages.success")
@mock.patch.object(ModerationRequestTreeAdmin, "has_delete_permission", mock.Mock(return_value=True))
@mock.patch("djangocms_moderation.admin.notify_collection_moderators")
@mock.patch("djangocms_moderation.admin.notify_collection_author")
def test_delete_selected_deletes_all_relevant_objects(
self, notify_author_mock, notify_moderators_mock, messages_mock
):
"""The selected ModerationRequest and ModerationRequestTreeNode objects should be deleted."""
# Login as the collection author
self.client.force_login(self.user)
# Choose the delete_selected action from the dropdown
data = get_url_data(self, "remove_selected")
response = self.client.post(self.url, data)
self.assertEqual(response.status_code, 302)
# Now do the request the delete_selected action has led us to
response = self.client.post(response.url)
self.assertRedirects(response, self.url)
self.assertEqual(messages_mock.call_args[0][1], '2 requests successfully deleted')
# And check the requests have indeed been deleted
self.assertEqual(ModerationRequest.objects.filter(collection=self.collection).count(), 0)
# And correct notifications sent out
notify_author_mock.assert_called_once_with(
collection=self.collection,
moderation_requests=[self.moderation_request1, self.moderation_request2],
action=constants.ACTION_CANCELLED,
by_user=self.user,
)
self.assertFalse(notify_moderators_mock.called)
# All moderation requests were deleted, so collection should be archived
self.collection.refresh_from_db()
self.assertEqual(self.collection.status, constants.ARCHIVED)
def test_delete_view_when_using_get(self):
# Login as the collection author
self.client.force_login(self.user)
# Choose the delete_selected action from the dropdown
data = get_url_data(self, "remove_selected")
response = self.client.post(self.url, data)
# And follow the redirect (with a GET call) to the view that does the approve
response = self.client.get(response.url)
# Smoke test the response. When using a GET call not a lot happens.
self.assertEqual(response.status_code, 200)
self.assertEqual(
response.templates[0].name,
'admin/djangocms_moderation/moderationrequest/delete_confirmation.html'
)
class DeletedSelectedTransactionTest(TransactionTestCase):
def setUp(self):
# Create db data
self.user = factories.UserFactory(is_staff=True, is_superuser=True)
self.collection = factories.ModerationCollectionFactory(
author=self.user, status=constants.IN_REVIEW)
self.moderation_request1 = factories.ModerationRequestFactory(
collection=self.collection)
self.moderation_request2 = factories.ModerationRequestFactory(
collection=self.collection)
self.root1 = factories.RootModerationRequestTreeNodeFactory(
moderation_request=self.moderation_request1)
self.root2 = factories.RootModerationRequestTreeNodeFactory(
moderation_request=self.moderation_request2)
factories.ChildModerationRequestTreeNodeFactory(
moderation_request=self.moderation_request1, parent=self.root1)
# Login
self.client.force_login(self.user)
# Generate url and POST data
self.url = reverse("admin:djangocms_moderation_moderationrequesttreenode_changelist")
self.url += "?moderation_request__collection__id={}".format(self.collection.pk)
self.data = get_url_data(self, "delete_selected")
def tearDown(self):
"""Clear content type cache for page content's versionable.
This is necessary, because TransactionTestCase clears the
entire database after each test, meaning ContentType objects
are recreated with new IDs. Cache kept old IDs, causing
inability to retrieve versions for a given object.
"""
del self.moderation_request1.version.versionable.content_types
@mock.patch("djangocms_moderation.admin.messages.success")
def test_deleting_is_wrapped_in_db_transaction(self, messages_mock):
class FakeError(Exception):
pass
# Throw an exception to cause a db rollback.
# Throwing FakeError as no actual code will ever throw it and
# therefore catching this later in the test will not cover up a
# genuine issue
messages_mock.side_effect = FakeError
# Choose the delete_selected action from the dropdown
response = self.client.post(self.url, self.data)
self.assertEqual(response.status_code, 302)
# Now do the request the delete_selected action has led us to
try:
self.client.post(response.url, self.data)
except FakeError:
# This is what messages_mock should have thrown,
# but we don't want the test to throw it.
pass
# Check neither the tree nodes nor the requests have been deleted.
# The db transaction should have rolled back.
self.assertEqual(ModerationRequestTreeNode.objects.all().count(), 3)
self.assertEqual(ModerationRequest.objects.all().count(), 2)
| 48.448007 | 120 | 0.709796 | 6,827 | 55,909 | 5.634539 | 0.063425 | 0.052409 | 0.048613 | 0.02974 | 0.845998 | 0.833702 | 0.8154 | 0.79138 | 0.769231 | 0.749942 | 0 | 0.013528 | 0.207999 | 55,909 | 1,153 | 121 | 48.490026 | 0.855194 | 0.197482 | 0 | 0.754508 | 0 | 0 | 0.110463 | 0.087499 | 0 | 0 | 0 | 0.000867 | 0.266297 | 1 | 0.059639 | false | 0.002774 | 0.022191 | 0 | 0.092926 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
0d1b5b3190df56a2f399143c2cb629a8757c34d8 | 54,947 | py | Python | OrderCloud/apis/catalog_api.py | klreeher/python-sdk | b7fe922dcfc3bb73fe4149475fa45fdcb04d956a | [
"Apache-2.0"
] | null | null | null | OrderCloud/apis/catalog_api.py | klreeher/python-sdk | b7fe922dcfc3bb73fe4149475fa45fdcb04d956a | [
"Apache-2.0"
] | null | null | null | OrderCloud/apis/catalog_api.py | klreeher/python-sdk | b7fe922dcfc3bb73fe4149475fa45fdcb04d956a | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
OrderCloud
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 1.0
Contact: ordercloud@four51.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from __future__ import absolute_import
import sys
import os
import re
# python 2 and python 3 compatibility library
from six import iteritems
from ..configuration import Configuration
from ..api_client import ApiClient
class CatalogApi(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
Ref: https://github.com/swagger-api/swagger-codegen
"""
def __init__(self, api_client=None):
config = Configuration()
if api_client:
self.api_client = api_client
else:
if not config.api_client:
config.api_client = ApiClient()
self.api_client = config.api_client
def create(self, catalog, **kwargs):
"""
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.create(catalog, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param Catalog catalog: (required)
:return: Catalog
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.create_with_http_info(catalog, **kwargs)
else:
(data) = self.create_with_http_info(catalog, **kwargs)
return data
def create_with_http_info(self, catalog, **kwargs):
"""
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.create_with_http_info(catalog, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param Catalog catalog: (required)
:return: Catalog
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['catalog']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method create" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'catalog' is set
if ('catalog' not in params) or (params['catalog'] is None):
raise ValueError("Missing the required parameter `catalog` when calling `create`")
resource_path = '/catalogs'.replace('{format}', 'json')
path_params = {}
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'catalog' in params:
body_params = params['catalog']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'text/plain; charset=utf-8'])
# Authentication setting
auth_settings = ['oauth2']
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Catalog',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def delete(self, catalog_id, **kwargs):
"""
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.delete(catalog_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str catalog_id: ID of the catalog. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.delete_with_http_info(catalog_id, **kwargs)
else:
(data) = self.delete_with_http_info(catalog_id, **kwargs)
return data
def delete_with_http_info(self, catalog_id, **kwargs):
"""
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.delete_with_http_info(catalog_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str catalog_id: ID of the catalog. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['catalog_id']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'catalog_id' is set
if ('catalog_id' not in params) or (params['catalog_id'] is None):
raise ValueError("Missing the required parameter `catalog_id` when calling `delete`")
resource_path = '/catalogs/{catalogID}'.replace('{format}', 'json')
path_params = {}
if 'catalog_id' in params:
path_params['catalogID'] = params['catalog_id']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'text/plain; charset=utf-8'])
# Authentication setting
auth_settings = ['oauth2']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def delete_assignment(self, catalog_id, buyer_id, **kwargs):
"""
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.delete_assignment(catalog_id, buyer_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str catalog_id: ID of the catalog. (required)
:param str buyer_id: ID of the buyer. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.delete_assignment_with_http_info(catalog_id, buyer_id, **kwargs)
else:
(data) = self.delete_assignment_with_http_info(catalog_id, buyer_id, **kwargs)
return data
def delete_assignment_with_http_info(self, catalog_id, buyer_id, **kwargs):
"""
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.delete_assignment_with_http_info(catalog_id, buyer_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str catalog_id: ID of the catalog. (required)
:param str buyer_id: ID of the buyer. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['catalog_id', 'buyer_id']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method delete_assignment" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'catalog_id' is set
if ('catalog_id' not in params) or (params['catalog_id'] is None):
raise ValueError("Missing the required parameter `catalog_id` when calling `delete_assignment`")
# verify the required parameter 'buyer_id' is set
if ('buyer_id' not in params) or (params['buyer_id'] is None):
raise ValueError("Missing the required parameter `buyer_id` when calling `delete_assignment`")
resource_path = '/catalogs/{catalogID}/assignments'.replace('{format}', 'json')
path_params = {}
if 'catalog_id' in params:
path_params['catalogID'] = params['catalog_id']
query_params = {}
if 'buyer_id' in params:
query_params['buyerID'] = params['buyer_id']
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'text/plain; charset=utf-8'])
# Authentication setting
auth_settings = ['oauth2']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def delete_product_assignment(self, catalog_id, product_id, **kwargs):
"""
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.delete_product_assignment(catalog_id, product_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str catalog_id: ID of the catalog. (required)
:param str product_id: ID of the product. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.delete_product_assignment_with_http_info(catalog_id, product_id, **kwargs)
else:
(data) = self.delete_product_assignment_with_http_info(catalog_id, product_id, **kwargs)
return data
def delete_product_assignment_with_http_info(self, catalog_id, product_id, **kwargs):
"""
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.delete_product_assignment_with_http_info(catalog_id, product_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str catalog_id: ID of the catalog. (required)
:param str product_id: ID of the product. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['catalog_id', 'product_id']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method delete_product_assignment" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'catalog_id' is set
if ('catalog_id' not in params) or (params['catalog_id'] is None):
raise ValueError("Missing the required parameter `catalog_id` when calling `delete_product_assignment`")
# verify the required parameter 'product_id' is set
if ('product_id' not in params) or (params['product_id'] is None):
raise ValueError("Missing the required parameter `product_id` when calling `delete_product_assignment`")
resource_path = '/catalogs/{catalogID}/productassignments/{productID}'.replace('{format}', 'json')
path_params = {}
if 'catalog_id' in params:
path_params['catalogID'] = params['catalog_id']
if 'product_id' in params:
path_params['productID'] = params['product_id']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'text/plain; charset=utf-8'])
# Authentication setting
auth_settings = ['oauth2']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def get(self, catalog_id, **kwargs):
"""
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get(catalog_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str catalog_id: ID of the catalog. (required)
:return: Catalog
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.get_with_http_info(catalog_id, **kwargs)
else:
(data) = self.get_with_http_info(catalog_id, **kwargs)
return data
def get_with_http_info(self, catalog_id, **kwargs):
"""
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_with_http_info(catalog_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str catalog_id: ID of the catalog. (required)
:return: Catalog
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['catalog_id']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'catalog_id' is set
if ('catalog_id' not in params) or (params['catalog_id'] is None):
raise ValueError("Missing the required parameter `catalog_id` when calling `get`")
resource_path = '/catalogs/{catalogID}'.replace('{format}', 'json')
path_params = {}
if 'catalog_id' in params:
path_params['catalogID'] = params['catalog_id']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'text/plain; charset=utf-8'])
# Authentication setting
auth_settings = ['oauth2']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Catalog',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def list(self, **kwargs):
"""
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.list(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str search: Word or phrase to search for.
:param str search_on: Comma-delimited list of fields to search on.
:param str sort_by: Comma-delimited list of fields to sort by.
:param int page: Page of results to return. Default: 1
:param int page_size: Number of results to return per page. Default: 20, max: 100.
:param dict(str, str) filters: Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???'
:return: ListCatalog
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.list_with_http_info(**kwargs)
else:
(data) = self.list_with_http_info(**kwargs)
return data
def list_with_http_info(self, **kwargs):
"""
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.list_with_http_info(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str search: Word or phrase to search for.
:param str search_on: Comma-delimited list of fields to search on.
:param str sort_by: Comma-delimited list of fields to sort by.
:param int page: Page of results to return. Default: 1
:param int page_size: Number of results to return per page. Default: 20, max: 100.
:param dict(str, str) filters: Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???'
:return: ListCatalog
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['search', 'search_on', 'sort_by', 'page', 'page_size', 'filters']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method list" % key
)
params[key] = val
del params['kwargs']
resource_path = '/catalogs'.replace('{format}', 'json')
path_params = {}
query_params = {}
if 'search' in params:
query_params['search'] = params['search']
if 'search_on' in params:
query_params['searchOn'] = params['search_on']
if 'sort_by' in params:
query_params['sortBy'] = params['sort_by']
if 'page' in params:
query_params['page'] = params['page']
if 'page_size' in params:
query_params['pageSize'] = params['page_size']
if 'filters' in params:
query_params['filters'] = params['filters']
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'text/plain; charset=utf-8'])
# Authentication setting
auth_settings = ['oauth2']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='ListCatalog',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def list_assignments(self, **kwargs):
"""
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.list_assignments(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str catalog_id: ID of the catalog.
:param str buyer_id: ID of the buyer.
:param int page: Page of results to return. Default: 1
:param int page_size: Number of results to return per page. Default: 20, max: 100.
:return: ListCatalogAssignment
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.list_assignments_with_http_info(**kwargs)
else:
(data) = self.list_assignments_with_http_info(**kwargs)
return data
def list_assignments_with_http_info(self, **kwargs):
"""
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.list_assignments_with_http_info(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str catalog_id: ID of the catalog.
:param str buyer_id: ID of the buyer.
:param int page: Page of results to return. Default: 1
:param int page_size: Number of results to return per page. Default: 20, max: 100.
:return: ListCatalogAssignment
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['catalog_id', 'buyer_id', 'page', 'page_size']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method list_assignments" % key
)
params[key] = val
del params['kwargs']
resource_path = '/catalogs/assignments'.replace('{format}', 'json')
path_params = {}
query_params = {}
if 'catalog_id' in params:
query_params['catalogID'] = params['catalog_id']
if 'buyer_id' in params:
query_params['buyerID'] = params['buyer_id']
if 'page' in params:
query_params['page'] = params['page']
if 'page_size' in params:
query_params['pageSize'] = params['page_size']
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'text/plain; charset=utf-8'])
# Authentication setting
auth_settings = ['oauth2']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='ListCatalogAssignment',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def list_product_assignments(self, **kwargs):
"""
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.list_product_assignments(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str catalog_id: ID of the catalog.
:param str product_id: ID of the product.
:param int page: Page of results to return. Default: 1
:param int page_size: Number of results to return per page. Default: 20, max: 100.
:return: ListProductCatalogAssignment
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.list_product_assignments_with_http_info(**kwargs)
else:
(data) = self.list_product_assignments_with_http_info(**kwargs)
return data
def list_product_assignments_with_http_info(self, **kwargs):
"""
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.list_product_assignments_with_http_info(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str catalog_id: ID of the catalog.
:param str product_id: ID of the product.
:param int page: Page of results to return. Default: 1
:param int page_size: Number of results to return per page. Default: 20, max: 100.
:return: ListProductCatalogAssignment
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['catalog_id', 'product_id', 'page', 'page_size']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method list_product_assignments" % key
)
params[key] = val
del params['kwargs']
resource_path = '/catalogs/productassignments'.replace('{format}', 'json')
path_params = {}
query_params = {}
if 'catalog_id' in params:
query_params['catalogID'] = params['catalog_id']
if 'product_id' in params:
query_params['productID'] = params['product_id']
if 'page' in params:
query_params['page'] = params['page']
if 'page_size' in params:
query_params['pageSize'] = params['page_size']
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'text/plain; charset=utf-8'])
# Authentication setting
auth_settings = ['oauth2']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='ListProductCatalogAssignment',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def patch(self, catalog_id, partial_catalog, **kwargs):
"""
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.patch(catalog_id, partial_catalog, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str catalog_id: ID of the catalog. (required)
:param Catalog partial_catalog: (required)
:return: Catalog
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.patch_with_http_info(catalog_id, partial_catalog, **kwargs)
else:
(data) = self.patch_with_http_info(catalog_id, partial_catalog, **kwargs)
return data
def patch_with_http_info(self, catalog_id, partial_catalog, **kwargs):
"""
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.patch_with_http_info(catalog_id, partial_catalog, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str catalog_id: ID of the catalog. (required)
:param Catalog partial_catalog: (required)
:return: Catalog
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['catalog_id', 'partial_catalog']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method patch" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'catalog_id' is set
if ('catalog_id' not in params) or (params['catalog_id'] is None):
raise ValueError("Missing the required parameter `catalog_id` when calling `patch`")
# verify the required parameter 'partial_catalog' is set
if ('partial_catalog' not in params) or (params['partial_catalog'] is None):
raise ValueError("Missing the required parameter `partial_catalog` when calling `patch`")
resource_path = '/catalogs/{catalogID}'.replace('{format}', 'json')
path_params = {}
if 'catalog_id' in params:
path_params['catalogID'] = params['catalog_id']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'partial_catalog' in params:
body_params = params['partial_catalog']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'text/plain; charset=utf-8'])
# Authentication setting
auth_settings = ['oauth2']
return self.api_client.call_api(resource_path, 'PATCH',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Catalog',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def save(self, catalog_id, catalog, **kwargs):
"""
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.save(catalog_id, catalog, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str catalog_id: ID of the catalog. (required)
:param Catalog catalog: (required)
:return: Catalog
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.save_with_http_info(catalog_id, catalog, **kwargs)
else:
(data) = self.save_with_http_info(catalog_id, catalog, **kwargs)
return data
def save_with_http_info(self, catalog_id, catalog, **kwargs):
"""
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.save_with_http_info(catalog_id, catalog, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str catalog_id: ID of the catalog. (required)
:param Catalog catalog: (required)
:return: Catalog
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['catalog_id', 'catalog']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method save" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'catalog_id' is set
if ('catalog_id' not in params) or (params['catalog_id'] is None):
raise ValueError("Missing the required parameter `catalog_id` when calling `save`")
# verify the required parameter 'catalog' is set
if ('catalog' not in params) or (params['catalog'] is None):
raise ValueError("Missing the required parameter `catalog` when calling `save`")
resource_path = '/catalogs/{catalogID}'.replace('{format}', 'json')
path_params = {}
if 'catalog_id' in params:
path_params['catalogID'] = params['catalog_id']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'catalog' in params:
body_params = params['catalog']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'text/plain; charset=utf-8'])
# Authentication setting
auth_settings = ['oauth2']
return self.api_client.call_api(resource_path, 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Catalog',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def save_assignment(self, catalog_assignment, **kwargs):
"""
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.save_assignment(catalog_assignment, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param CatalogAssignment catalog_assignment: (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.save_assignment_with_http_info(catalog_assignment, **kwargs)
else:
(data) = self.save_assignment_with_http_info(catalog_assignment, **kwargs)
return data
def save_assignment_with_http_info(self, catalog_assignment, **kwargs):
"""
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.save_assignment_with_http_info(catalog_assignment, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param CatalogAssignment catalog_assignment: (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['catalog_assignment']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method save_assignment" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'catalog_assignment' is set
if ('catalog_assignment' not in params) or (params['catalog_assignment'] is None):
raise ValueError("Missing the required parameter `catalog_assignment` when calling `save_assignment`")
resource_path = '/catalogs/assignments'.replace('{format}', 'json')
path_params = {}
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'catalog_assignment' in params:
body_params = params['catalog_assignment']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'text/plain; charset=utf-8'])
# Authentication setting
auth_settings = ['oauth2']
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def save_product_assignment(self, product_catalog_assignment, **kwargs):
"""
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.save_product_assignment(product_catalog_assignment, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param ProductCatalogAssignment product_catalog_assignment: (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.save_product_assignment_with_http_info(product_catalog_assignment, **kwargs)
else:
(data) = self.save_product_assignment_with_http_info(product_catalog_assignment, **kwargs)
return data
def save_product_assignment_with_http_info(self, product_catalog_assignment, **kwargs):
"""
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.save_product_assignment_with_http_info(product_catalog_assignment, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param ProductCatalogAssignment product_catalog_assignment: (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['product_catalog_assignment']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method save_product_assignment" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'product_catalog_assignment' is set
if ('product_catalog_assignment' not in params) or (params['product_catalog_assignment'] is None):
raise ValueError("Missing the required parameter `product_catalog_assignment` when calling `save_product_assignment`")
resource_path = '/catalogs/productassignments'.replace('{format}', 'json')
path_params = {}
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'product_catalog_assignment' in params:
body_params = params['product_catalog_assignment']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'text/plain; charset=utf-8'])
# Authentication setting
auth_settings = ['oauth2']
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
| 40.283724 | 195 | 0.564235 | 5,623 | 54,947 | 5.303397 | 0.044638 | 0.064384 | 0.022534 | 0.028973 | 0.948962 | 0.932095 | 0.919788 | 0.904866 | 0.901211 | 0.877268 | 0 | 0.001995 | 0.352285 | 54,947 | 1,363 | 196 | 40.31328 | 0.835909 | 0.329317 | 0 | 0.783019 | 1 | 0 | 0.17604 | 0.042728 | 0 | 0 | 0 | 0 | 0 | 1 | 0.039308 | false | 0 | 0.011006 | 0 | 0.108491 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
0d28b9a7e1646acd65737028891f9803ea77fad1 | 54,021 | py | Python | tests/unit/training/commands_test.py | abeja-inc/abeja-platform-cli | bed60642ee46656a5bfec5577d876e54c88bfd3f | [
"Apache-2.0"
] | 2 | 2020-06-19T23:07:38.000Z | 2021-06-03T10:44:39.000Z | tests/unit/training/commands_test.py | abeja-inc/abeja-platform-cli | bed60642ee46656a5bfec5577d876e54c88bfd3f | [
"Apache-2.0"
] | 20 | 2020-04-07T07:48:42.000Z | 2020-09-07T09:18:43.000Z | tests/unit/training/commands_test.py | abeja-inc/abeja-platform-cli | bed60642ee46656a5bfec5577d876e54c88bfd3f | [
"Apache-2.0"
] | 1 | 2021-06-01T13:38:19.000Z | 2021-06-01T13:38:19.000Z | import json
import re
from unittest.mock import MagicMock, patch
from urllib.parse import urlparse
import pytest
import requests_mock
from click.testing import CliRunner
from ruamel.yaml import YAML
import abejacli.training
from abejacli.config import ORGANIZATION_ENDPOINT
from abejacli.exceptions import ResourceNotFound
from abejacli.training.commands import (
_get_latest_training_version,
create_notebook,
create_training_job,
create_training_version,
create_training_version_from_git,
debug_local,
describe_job_definitions,
describe_jobs,
describe_training_models,
describe_training_versions,
start_notebook,
stop_training_job,
train_local,
update_training_version
)
from tests import get_tmp_training_file_name
TEST_CONFIG_USER_ID = '12345'
TEST_CONFIG_TOKEN = 'ntoken12345'
TEST_CONFIG_ORG_NAME = 'test-inc'
TEST_CONFIG = {
'abeja-platform-user': 'user-{}'.format(TEST_CONFIG_USER_ID),
'personal-access-token': TEST_CONFIG_TOKEN,
'organization-name': TEST_CONFIG_ORG_NAME
}
yaml = YAML()
@pytest.fixture
def runner():
return CliRunner()
@pytest.fixture
def req_mock(request):
m = requests_mock.Mocker()
m.start()
request.addfinalizer(m.stop)
return m
@patch('abejacli.training.commands._describe_training_versions')
def test_get_latest_training_version(m):
m.return_value = {'entries': []}
name = 'dummy'
with pytest.raises(ResourceNotFound):
_get_latest_training_version(name)
@patch('abejacli.training.commands.CONFIG', TEST_CONFIG)
@patch('abejacli.training.CONFIGFILE_NAME', get_tmp_training_file_name())
def test_update_training_version(req_mock, runner):
config_data = {
'name': 'training-1',
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10'
}
with open(abejacli.training.CONFIGFILE_NAME, 'w') as configfile:
yaml.dump(config_data, configfile)
url = "{}/training/definitions/{}/versions/{}".format(
ORGANIZATION_ENDPOINT, config_data['name'], 1)
def match_request_text(request):
return json.loads(request.text) == {
'description': 'dummy description'
}
req_mock.register_uri(
'PATCH', url,
json={"description": "dummy description"},
additional_matcher=match_request_text)
cmd = [
'--version', '1',
'--description', 'dummy description',
]
r = runner.invoke(update_training_version, cmd)
assert not r.exception
@pytest.mark.parametrize(
'cmd,config_data,expected_payload',
[
([],
{
'name': 'training-1',
'image': 'abeja-inc/all-gpu:19.10'
},
{
'notebook_type': 'notebook',
'image': 'abeja-inc/all-gpu:19.10'
}),
(['-t', 'lab'],
{
'name': 'training-1',
'image': 'abeja-inc/all-gpu:19.10'
},
{
'notebook_type': 'lab',
'image': 'abeja-inc/all-gpu:19.10'
}),
(['--instance-type', 'gpu-1'],
{
'name': 'training-1',
'image': 'abeja-inc/all-gpu:19.10'
},
{
'notebook_type': 'notebook',
'image': 'abeja-inc/all-gpu:19.10',
'instance_type': 'gpu-1'
}),
(['--job-definition-name', 'training-1', '--image', 'abeja-inc/all-gpu:19.10'],
{},
{
'notebook_type': 'notebook',
'image': 'abeja-inc/all-gpu:19.10'
}),
(['--datalake', '1234567890123'],
{
'name': 'training-1',
'image': 'abeja-inc/all-gpu:19.10'
},
{
'notebook_type': 'notebook',
'image': 'abeja-inc/all-gpu:19.10',
'datalakes': ['1234567890123']
}),
(['--bucket', '1234567890123'],
{
'name': 'training-1',
'image': 'abeja-inc/all-gpu:19.10'
},
{
'notebook_type': 'notebook',
'image': 'abeja-inc/all-gpu:19.10',
'buckets': ['1234567890123']
}),
(['--datalake', '1234567890123', '--bucket', '1234567890123'],
{
'name': 'training-1',
'image': 'abeja-inc/all-gpu:19.10'
},
{
'notebook_type': 'notebook',
'image': 'abeja-inc/all-gpu:19.10',
'datalakes': ['1234567890123'],
'buckets': ['1234567890123']
}),
(['--dataset', 'train:1600000000000'],
{
'name': 'training-1',
'image': 'abeja-inc/all-gpu:19.10'
},
{
'notebook_type': 'notebook',
'image': 'abeja-inc/all-gpu:19.10',
'datasets': {'train': '1600000000000'}
}),
(['--job-definition-name', 'training-1', '--image', 'abeja-inc/all-gpu:18.10'],
{
'name': 'training-2',
'image': 'abeja-inc/all-gpu:19.10'
},
{
'notebook_type': 'notebook',
'image': 'abeja-inc/all-gpu:18.10'
}),
([],
{
'name': 'training-1',
'image': 'abeja-inc/all-gpu:19.10',
'instance_type': 'gpu-1'
},
{
'notebook_type': 'notebook',
'image': 'abeja-inc/all-gpu:19.10',
'instance_type': 'gpu-1'
}),
([],
{
'name': 'training-1',
'image': 'abeja-inc/all-gpu:19.10',
'dummy': 'dummy'
},
{
'notebook_type': 'notebook',
'image': 'abeja-inc/all-gpu:19.10'
}),
]
)
@patch('abejacli.training.commands.CONFIG', TEST_CONFIG)
@patch('abejacli.training.CONFIGFILE_NAME', get_tmp_training_file_name())
def test_create_notebook(
req_mock, runner, cmd, config_data, expected_payload):
with open(abejacli.training.CONFIGFILE_NAME, 'w') as configfile:
yaml.dump(config_data, configfile)
name = 'training-1'
url = "{}/training/definitions/{}/notebooks".format(
ORGANIZATION_ENDPOINT, name)
req_mock.register_uri(
'POST', url,
json=expected_payload)
r = runner.invoke(create_notebook, cmd)
assert req_mock.called
assert r.exit_code == 0
@pytest.mark.parametrize(
'cmd,config_data,expected_payload',
[
(['--job-definition-name', 'training-1', '-n', '9876543210987'],
{},
{}),
(['-n', '9876543210987', '-t', 'lab'],
{'name': 'training-1'},
{
'notebook_type': 'lab'
}),
(['--job-definition-name', 'training-1', '-n', '9876543210987', '--datalake', '1234567890123'],
{'name': 'training-2'},
{
'datalakes': ['1234567890123']
}),
(['-n', '9876543210987', '--bucket', '1234567890123'],
{'name': 'training-1'},
{
'buckets': ['1234567890123']
}),
(['-n', '9876543210987', '--datalake', '1234567890123', '--bucket', '1234567890123'],
{'name': 'training-1'},
{
'datalakes': ['1234567890123'],
'buckets': ['1234567890123']
}),
(['-n', '9876543210987', '--dataset', 'train:1600000000000'],
{'name': 'training-1'},
{
'datasets': {'train': '1600000000000'}
}),
(['-n', '9876543210987'],
{
'name': 'training-1',
'dummy': 'dummy'
},
{}),
]
)
@patch('abejacli.training.commands.CONFIG', TEST_CONFIG)
@patch('abejacli.training.CONFIGFILE_NAME', get_tmp_training_file_name())
def test_start_notebook(
req_mock, runner, cmd, config_data, expected_payload):
notebook_id = '9876543210987'
with open(abejacli.training.CONFIGFILE_NAME, 'w') as configfile:
yaml.dump(config_data, configfile)
name = 'training-1'
url = "{}/training/definitions/{}/notebooks/{}/start".format(
ORGANIZATION_ENDPOINT, name, notebook_id)
def match_request_text(request):
return json.loads(request.text) == expected_payload
req_mock.register_uri(
'POST', url,
json=expected_payload,
additional_matcher=match_request_text)
r = runner.invoke(start_notebook, cmd)
assert req_mock.called
assert r.exit_code == 0
@pytest.mark.parametrize(
'cmd,config_data,expected_payload',
[
(['--description', 'dummy description'],
{
'name': 'training-1',
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10'
},
{
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10',
'description': 'dummy description'
}),
([
'--job-definition-name', 'training-1',
'--handler', 'train:handler', '--image', 'abeja-inc/all-cpu:18.10',
'--description', 'dummy description', '--environment', 'BATCH_SIZE:32'
],
{},
{
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10',
'description': 'dummy description',
'environment': {'BATCH_SIZE': '32'}
}),
(['--description', 'dummy description'],
{
'name': 'training-1',
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10',
'params': {'key9': 'value9'}
},
{
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10',
'description': 'dummy description',
'environment': {'key9': 'value9'}
}),
(['--job-definition-name', 'training-1', '--description', 'dummy description'],
{
'name': 'training-2',
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10',
'environment': {'key1': 'value1', 'key2': 'value2'}
},
{
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10',
'description': 'dummy description',
'environment': {'key1': 'value1', 'key2': 'value2'}
}),
(['--description', 'dummy description'],
{
'name': 'training-1',
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10',
'environment': {'key1': 'value1', 'key2': 'value2'},
'params': {'key9': 'value9'}
},
{
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10',
'description': 'dummy description',
'environment': {'key1': 'value1', 'key2': 'value2'}
}),
([
'--datasets', 'train:1600000000000',
'--datalake', '1234567890123',
'--bucket', '2345678901234'],
{
'name': 'training-1',
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10',
},
{
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10',
'datasets': {'train': '1600000000000'},
'dataset_premounted': False,
'datalakes': ['1234567890123'],
'buckets': ['2345678901234']
}),
(['--datalake', '1234567890123', '--bucket', '2345678901234', '--dataset-premounted'],
{
'name': 'training-1',
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10',
'datasets': {'train': '1600000000000'},
},
{
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10',
'datasets': {'train': '1600000000000'},
'dataset_premounted': True,
'datalakes': ['1234567890123'],
'buckets': ['2345678901234']
})
]
)
@patch('abejacli.training.commands.version_archive', MagicMock(return_value=None))
@patch('abejacli.training.commands.CONFIG', TEST_CONFIG)
@patch('abejacli.training.CONFIGFILE_NAME', get_tmp_training_file_name())
def test_create_training_version(
req_mock, runner, cmd, config_data, expected_payload):
with open(abejacli.training.CONFIGFILE_NAME, 'w') as configfile:
yaml.dump(config_data, configfile)
name = 'training-1'
url = "{}/training/definitions/{}/versions".format(
ORGANIZATION_ENDPOINT, name)
def match_request_text(request):
return json.loads(request.text) == expected_payload
req_mock.register_uri(
'POST', url,
json=expected_payload,
additional_matcher=match_request_text)
with patch('abejacli.training.commands._create_training_version') as mock:
mock.return_value = {} # dummy response
r = runner.invoke(create_training_version, cmd)
args = mock.call_args[0]
assert args[0] == url
assert args[1] == expected_payload
assert not r.exception
@pytest.mark.parametrize(
'cmd,config_data,expected_payload',
[
([],
{
'name': 'training-1',
'handler': 'train',
'image': 'abeja-inc/all-cpu:20.02a'
},
{
'handler': 'train',
'image': 'abeja-inc/all-cpu:20.02a'
}),
([
'--job-definition-name', 'training-1',
'--handler', 'train',
'--image', 'abeja-inc/all-cpu:20.02a'
],
{},
{
'handler': 'train',
'image': 'abeja-inc/all-cpu:20.02a'
}),
(['--job-definition-name', 'training-1'],
{
'name': 'training-2',
'handler': 'train',
'image': 'abeja-inc/all-cpu:20.02a'
},
{
'handler': 'train',
'image': 'abeja-inc/all-cpu:20.02a'
}),
]
)
@patch('abejacli.training.commands.version_archive', MagicMock(return_value=None))
@patch('abejacli.training.commands.CONFIG', TEST_CONFIG)
@patch('abejacli.training.CONFIGFILE_NAME', get_tmp_training_file_name())
def test_create_training_version_for_2002_image(
req_mock, runner, cmd, config_data, expected_payload):
def match_request_text(request):
return json.loads(request.text) == expected_payload
with open(abejacli.training.CONFIGFILE_NAME, 'w') as configfile:
yaml.dump(config_data, configfile)
name = 'training-1'
url = "{}/training/definitions/{}/versions".format(
ORGANIZATION_ENDPOINT, name)
req_mock.register_uri(
'POST', url,
json=expected_payload,
additional_matcher=match_request_text)
with patch('abejacli.training.commands._create_training_version') as mock:
mock.return_value = {} # dummy response
r = runner.invoke(create_training_version, cmd)
args = mock.call_args[0]
assert args[0] == url
assert args[1] == expected_payload
assert not r.exception
@pytest.mark.parametrize(
'cmd,config_data',
[
([],
{
'name': 'training-1',
'handler': 'train',
'image': 'abeja-inc/all-cpu:18.10'
}),
([
'--job-definition-name', 'training-1',
'--handler', 'train',
'--image', 'abeja-inc/all-cpu:18.10'
],
{}),
([
'--job-definition-name', 'training-1',
'--handler', 'train',
'--image', 'abeja-inc/all-cpu:18.10'
],
{'name': 'training-2'})
]
)
@patch('abejacli.training.commands.version_archive', MagicMock(return_value=None))
@patch('abejacli.training.commands.CONFIG', TEST_CONFIG)
@patch('abejacli.training.CONFIGFILE_NAME', get_tmp_training_file_name())
def test_create_training_version_for_2002_image_invalid(
req_mock, runner, cmd, config_data):
with open(abejacli.training.CONFIGFILE_NAME, 'w') as configfile:
yaml.dump(config_data, configfile)
name = 'training-1'
url = "{}/training/definitions/{}/versions".format(
ORGANIZATION_ENDPOINT, name)
req_mock.register_uri(
'POST', url,
json={})
r = runner.invoke(create_training_version, cmd)
assert r.exception
@pytest.mark.parametrize(
'cmd,config_data,expected_payload',
[
(['--job-definition-name', 'training-1',
'--git-url', 'https://github.com/abeja-inc/platform-template-image-classification.git',
'--description', 'dummy description'],
{
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10'
},
{
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10',
'git_url': 'https://github.com/abeja-inc/platform-template-image-classification.git',
'description': 'dummy description'
}),
(['--git-url', 'https://github.com/abeja-inc/platform-template-image-classification.git',
'--git-branch', 'develop',
'--handler', 'train:handler', '--image', 'abeja-inc/all-cpu:18.10',
'--description', 'dummy description'],
{
'name': 'training-1'
},
{
'git_url': 'https://github.com/abeja-inc/platform-template-image-classification.git',
'git_branch': 'develop',
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10',
'description': 'dummy description'
}),
(['--job-definition-name', 'training-1',
'--git-url', 'https://github.com/abeja-inc/platform-template-image-classification.git',
'--description', 'dummy description', '--environment', 'BATCH_SIZE:32'],
{
'name': 'training-2',
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10'
},
{
'git_url': 'https://github.com/abeja-inc/platform-template-image-classification.git',
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10',
'description': 'dummy description',
'environment': {'BATCH_SIZE': '32'}
}),
(['--git-url', 'https://github.com/abeja-inc/platform-template-image-classification.git',
'--description', 'dummy description'],
{
'name': 'training-1',
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10',
'params': {'key9': 'value9'}
},
{
'git_url': 'https://github.com/abeja-inc/platform-template-image-classification.git',
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10',
'description': 'dummy description',
'environment': {'key9': 'value9'}
}),
(['--git-url', 'https://github.com/abeja-inc/platform-template-image-classification.git',
'--description', 'dummy description'],
{
'name': 'training-1',
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10',
'environment': {'key1': 'value1', 'key2': 'value2'}
},
{
'git_url': 'https://github.com/abeja-inc/platform-template-image-classification.git',
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10',
'description': 'dummy description',
'environment': {'key1': 'value1', 'key2': 'value2'}
}),
(['--git-url', 'https://github.com/abeja-inc/platform-template-image-classification.git',
'--description', 'dummy description'],
{
'name': 'training-1',
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10',
'environment': {'key1': 'value1', 'key2': 'value2'},
'params': {'key9': 'value9'}
},
{
'git_url': 'https://github.com/abeja-inc/platform-template-image-classification.git',
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10',
'description': 'dummy description', 'environment': {'key1': 'value1', 'key2': 'value2'}
}),
([
'--git-url', 'https://github.com/abeja-inc/platform-template-image-classification.git',
'--datasets', 'train:1600000000000',
'--datalake', '1234567890123',
'--bucket', '2345678901234'],
{
'name': 'training-1',
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10',
},
{
'git_url': 'https://github.com/abeja-inc/platform-template-image-classification.git',
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10',
'datasets': {'train': '1600000000000'},
'dataset_premounted': False,
'datalakes': ['1234567890123'],
'buckets': ['2345678901234']
}),
([
'--git-url', 'https://github.com/abeja-inc/platform-template-image-classification.git',
'--datalake', '1234567890123', '--bucket', '2345678901234', '--dataset-premounted'],
{
'name': 'training-1',
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10',
'datasets': {'train': '1600000000000'},
},
{
'git_url': 'https://github.com/abeja-inc/platform-template-image-classification.git',
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10',
'datasets': {'train': '1600000000000'},
'dataset_premounted': True,
'datalakes': ['1234567890123'],
'buckets': ['2345678901234']
})
]
)
@patch('abejacli.training.commands.version_archive', MagicMock(return_value=None))
@patch('abejacli.training.commands.CONFIG', TEST_CONFIG)
@patch('abejacli.training.CONFIGFILE_NAME', get_tmp_training_file_name())
def test_create_training_version_from_git(
req_mock, runner, cmd, config_data, expected_payload):
with open(abejacli.training.CONFIGFILE_NAME, 'w') as configfile:
yaml.dump(config_data, configfile)
name = 'training-1'
url = "{}/training/definitions/{}/git/versions".format(
ORGANIZATION_ENDPOINT, name)
def match_request_text(request):
return json.loads(request.text) == expected_payload
req_mock.register_uri(
'POST', url,
json=expected_payload,
additional_matcher=match_request_text)
r = runner.invoke(create_training_version_from_git, cmd)
assert not r.exception
@pytest.mark.parametrize(
'cmd,config_data,expected_payload',
[
(['--version', '1', '--description', 'dummy description'],
{'name': 'training-1'},
{
'description': 'dummy description'
}),
(['--job-definition-name', 'training-1',
'--version', '1', '--description', 'dummy description',
'--environment', 'BATCH_SIZE:32', '--datasets', 'train:1600000000000'],
{},
{
'description': 'dummy description',
'datasets': {'train': '1600000000000'},
'dataset_premounted': False,
'environment': {'BATCH_SIZE': '32'}
}),
(['--job-definition-name', 'training-1', '--version', '1', '--description', 'dummy description'],
{
'name': 'training-2',
'datasets': {'train': '1600000000000'},
'environment': {'key1': 'value1', 'key2': 'value2'},
'params': {'key9': 'value9'}
},
{
'description': 'dummy description',
'datasets': {'train': '1600000000000'},
'dataset_premounted': False,
'environment': {'key1': 'value1', 'key2': 'value2'}
}),
(['--version', '1', '--description', 'dummy description',
'--environment', 'BATCH_SIZE:32'],
{
'name': 'training-1',
'datasets': {'train': '1600000000000'},
'environment': {'key1': 'value1', 'key2': 'value2'},
'params': {'key9': 'value9'}
},
{
'description': 'dummy description',
'datasets': {'train': '1600000000000'},
'dataset_premounted': False,
'environment': {'key1': 'value1', 'key2': 'value2', 'BATCH_SIZE': '32'}
}),
(['--version', '1', '--description', 'dummy description',
'--environment', 'BATCH_SIZE:32', '--datasets', 'train:1600000000001'],
{
'name': 'training-1',
'datasets': {'train': '1600000000000'},
'environment': {'key1': 'value1', 'key2': 'value2'},
'params': {'key9': 'value9'}
},
{
'description': 'dummy description',
'datasets': {'train': '1600000000001'},
'dataset_premounted': False,
'environment': {'key1': 'value1', 'key2': 'value2', 'BATCH_SIZE': '32'}
}),
(['--version', '1', '--description', 'dummy description',
'--environment', 'BATCH_SIZE:32', '--datasets', 'val:1600000000001',
'--datasets', 'test:1600000000002'],
{
'name': 'training-1',
'datasets': {'train': '1600000000000'},
'environment': {'key1': 'value1', 'key2': 'value2'},
'params': {'key9': 'value9'}
},
{
'description': 'dummy description',
'datasets': {'train': '1600000000000', 'val': '1600000000001', 'test': '1600000000002'},
'dataset_premounted': False,
'environment': {'key1': 'value1', 'key2': 'value2', 'BATCH_SIZE': '32'}
}),
(['--version', '1', '--description', 'dummy description',
'--environment', 'BATCH_SIZE:32', '--datasets', 'val:1600000000001',
'--datasets', 'test:1600000000002', '--instance-type', 'cpu-4'],
{
'name': 'training-1',
'datasets': {'train': '1600000000000'},
'environment': {'key1': 'value1', 'key2': 'value2'},
'params': {'key9': 'value9'}
},
{
'description': 'dummy description',
'datasets': {'train': '1600000000000', 'val': '1600000000001', 'test': '1600000000002'},
'dataset_premounted': False,
'environment': {'key1': 'value1', 'key2': 'value2', 'BATCH_SIZE': '32'},
'instance_type': 'cpu-4'
}),
(['--version', '1', '--description', 'dummy description',
'--environment', 'BATCH_SIZE:32', '--datasets', 'val:1600000000001',
'--datasets', 'test:1600000000002', '--instance-type', 'cpu-4',
'--dataset-premounted'],
{
'name': 'training-1',
'datasets': {'train': '1600000000000'},
'environment': {'key1': 'value1', 'key2': 'value2'},
'params': {'key9': 'value9'}
},
{
'description': 'dummy description',
'datasets': {'train': '1600000000000', 'val': '1600000000001', 'test': '1600000000002'},
'dataset_premounted': True,
'environment': {'key1': 'value1', 'key2': 'value2', 'BATCH_SIZE': '32'},
'instance_type': 'cpu-4'
}),
(['--version', '1', '--description', 'dummy description', '--datalake', '1234567890123'],
{'name': 'training-1'},
{
'description': 'dummy description',
'datalakes': ['1234567890123']
}),
(['--version', '1', '--description', 'dummy description', '--bucket', '2345678901234'],
{'name': 'training-1'},
{
'description': 'dummy description',
'buckets': ['2345678901234']
}),
(['--version', '1', '--description', 'dummy description',
'--datalake', '1234567890123', '--bucket', '2345678901234'],
{'name': 'training-1'},
{
'description': 'dummy description',
'datalakes': ['1234567890123'],
'buckets': ['2345678901234']
}),
(['--version', '1'],
{
'name': 'training-1',
'instance_type': 'gpu-1'
},
{
'instance_type': 'gpu-1'
}),
(['--version', '1', '--instance-type', 'cpu-4'],
{
'name': 'training-1',
'instance_type': 'gpu-1'
},
{
'instance_type': 'cpu-4'
}),
(
['--version', '1', '--export-log'],
{'name': 'training-1'},
{'export_log': True}
),
]
)
@patch('abejacli.training.commands.CONFIG', TEST_CONFIG)
@patch('abejacli.training.CONFIGFILE_NAME', get_tmp_training_file_name())
def test_create_training_job(req_mock, runner, cmd, config_data, expected_payload):
with open(abejacli.training.CONFIGFILE_NAME, 'w') as configfile:
yaml.dump(config_data, configfile)
name = 'training-1'
url = "{}/training/definitions/{}/versions/{}/jobs".format(
ORGANIZATION_ENDPOINT, name, 1)
def match_request_text(request):
return json.loads(request.text) == expected_payload
req_mock.register_uri(
'POST', url,
json=expected_payload,
additional_matcher=match_request_text)
r = runner.invoke(create_training_job, cmd)
assert not r.exception
def test_stop_training_job(req_mock, runner):
config_data = {
'name': 'training-1',
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10'
}
with open(abejacli.training.CONFIGFILE_NAME, 'w') as configfile:
yaml.dump(config_data, configfile)
training_job_id = '1500000000000'
url = "{}/training/definitions/{}/jobs/{}/stop".format(
ORGANIZATION_ENDPOINT, config_data['name'], training_job_id)
def match_request_text(request):
return json.loads(request.text) == {}
req_mock.register_uri(
'POST', url,
json={},
additional_matcher=match_request_text)
r = runner.invoke(stop_training_job, ['--job-id', training_job_id])
assert not r.exception
@pytest.mark.parametrize(
'cmd,config_data,expected_environment,expected_datasets',
[
(['--handler', 'train:handler', '--image', 'abeja-inc/all-cpu:18.10'], {}, {}, {}),
(['--handler', 'train:handler', '--image', 'abeja-inc/all-cpu:18.10'],
{'environment': {'key1': 'value1'}}, {'key1': 'value1'},
{}),
(['--environment', 'key1:updated'],
{
'handler': 'train',
'image': 'abeja-inc/all-cpu:18.10',
'environment': {'key1': 'value1', 'key2': 'value2'}},
{'key1': 'updated', 'key2': 'value2'},
{}),
([],
{
'handler': 'train',
'image': 'abeja-inc/all-cpu:18.10',
'environment': {'key1': 'value1'},
'datasets': {'train': '1600000000000'}},
{'key1': 'value1'}, {'train': '1600000000000'}),
(['--datasets', 'val:1600000000001'],
{
'handler': 'train',
'image': 'abeja-inc/all-cpu:18.10',
'environment': {'key1': 'value1'}, 'datasets': {'train': '1600000000000'}},
{'key1': 'value1'}, {'train': '1600000000000', 'val': '1600000000001'}),
]
)
@patch('abejacli.training.commands.CONFIG', TEST_CONFIG)
@patch('abejacli.training.CONFIGFILE_NAME', get_tmp_training_file_name())
@patch('abejacli.training.commands.TrainingJobDebugRun')
def test_debug_local_params(
mock_debug_job, runner, cmd, config_data,
expected_environment, expected_datasets):
mock_job = MagicMock()
mock_debug_job.return_value = mock_job
config_data = {**config_data, 'ignores': ['.gitignore']}
with open(abejacli.training.CONFIGFILE_NAME, 'w') as configfile:
yaml.dump(config_data, configfile)
default_cmd = [
'--image', 'abeja/all-gpu:18.10', # not `abeja-inc/all-cpu:18.10`
'--organization_id', '1122334455667',
'--volume', '/tmp:/data',
'--volume', '/usr/bin/hoge:/hoge',
'--config', abejacli.training.CONFIGFILE_NAME,
]
r = runner.invoke(debug_local, default_cmd + cmd)
assert r.exit_code == 0, r.output
# command line argument is prioritized
args = mock_debug_job.call_args[1]
# command line argument is prioritized for environment
# and env vars specified in training.yaml are not included.
assert dict(args['environment']) == expected_environment
assert dict(args['datasets']) == expected_datasets
@patch('abejacli.training.commands.CONFIG', TEST_CONFIG)
@patch('abejacli.training.CONFIGFILE_NAME', get_tmp_training_file_name())
@patch('abejacli.training.commands.TrainingJobDebugRun')
def test_debug_local(mock_debug_job, runner):
mock_job = MagicMock()
mock_debug_job.return_value = mock_job
config_data = {
'name': 'training-1',
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10',
'params': {
'param1': 'value1',
'param2': 'value2',
},
'datasets': {'dataset_name1': 'value1'},
'ignores': ['.gitignore']
}
with open(abejacli.training.CONFIGFILE_NAME, 'w') as configfile:
yaml.dump(config_data, configfile)
cmd = [
'--image', 'abeja/all-gpu:18.10', # not `abeja-inc/all-cpu:18.10`
'--organization_id', '1122334455667',
'--environment', 'USER_ID:1234567890123',
'--environment', 'ACCESS_KEY:373be7309f0146c0d283440e500843d8',
'--environment', 'MAX_ITEMS:',
'--volume', '/tmp:/data',
'--volume', '/usr/bin/hoge:/hoge',
'--config', abejacli.training.CONFIGFILE_NAME,
]
r = runner.invoke(debug_local, cmd)
assert r.exit_code == 0
# command line argument is prioritized
args = mock_debug_job.call_args[1]
assert args['image'] == 'abeja/all-gpu:18.10'
# value of training.yaml is used when not specified in command line argument
assert args['handler'] == 'train:handler'
# command line argument is prioritized for environment
# and env vars specified in training.yaml are not included.
environment = dict(args['environment'])
assert environment == {
'USER_ID': '1234567890123',
'ACCESS_KEY': '373be7309f0146c0d283440e500843d8',
'MAX_ITEMS': '',
'param1': 'value1',
'param2': 'value2',
}
volume = dict(args['volume'])
assert volume == {
'/tmp': {
'bind': '/data',
'mode': 'rw'
},
'/usr/bin/hoge': {
'bind': '/hoge',
'mode': 'rw'
}
}
assert args['datasets'] == {
'dataset_name1': 'value1'
}
@patch('abejacli.training.commands.CONFIG', TEST_CONFIG)
@patch('abejacli.training.CONFIGFILE_NAME', get_tmp_training_file_name())
@patch('abejacli.training.commands.TrainingJobDebugRun')
def test_debug_local_with_default_params(mock_debug_job, runner):
mock_job = MagicMock()
mock_debug_job.return_value = mock_job
config_data = {
'name': 'training-1',
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10',
'params': {
'param1': 'value1',
'param2': '',
'param3': None
},
'datasets': {'dataset_name1': 'value1'},
'ignores': ['.gitignore']
}
with open(abejacli.training.CONFIGFILE_NAME, 'w') as configfile:
yaml.dump(config_data, configfile)
r = runner.invoke(debug_local, [
'--organization_id', '1122334455667',
'--config', abejacli.training.CONFIGFILE_NAME
])
assert r.exit_code == 0
args = mock_debug_job.call_args[1]
environment = dict(args['environment'])
assert environment == {
'param1': 'value1',
'param2': '',
'param3': ''
}
@patch('abejacli.training.commands.CONFIG', TEST_CONFIG)
@patch('abejacli.training.CONFIGFILE_NAME', get_tmp_training_file_name())
@patch('abejacli.common.get_organization_id')
@patch('abejacli.training.commands.TrainingJobDebugRun')
def test_debug_local_debug_without_organization_id(
mock_debug_job, mock_get_organization_id, runner):
mock_job = MagicMock()
mock_debug_job.return_value = mock_job
mock_get_organization_id.return_value = '1122334455667'
config_data = {
'name': 'training-1',
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10',
'environment': {
'param1': 'value1', 'param2': 'value2'
},
'datasets': {'dataset_name1': 'value1'},
'ignores': ['.gitignore']
}
with open(abejacli.training.CONFIGFILE_NAME, 'w') as configfile:
yaml.dump(config_data, configfile)
cmd = [
'--image', 'abeja/all-gpu:18.10', # not `abeja-inc/all-cpu:18.10`
# '--organization_id', '1122334455667',
'--environment', 'USER_ID:1234567890123',
'--environment', 'ACCESS_KEY:373be7309f0146c0d283440e500843d8',
'--config', abejacli.training.CONFIGFILE_NAME,
]
r = runner.invoke(debug_local, cmd)
assert r.exit_code == 0, r.output
mock_get_organization_id.assert_called_once_with()
args = mock_debug_job.call_args[1]
assert args['organization_id'] == '1122334455667'
@patch('abejacli.common.get_organization_id')
@patch('abejacli.training.CONFIGFILE_NAME', get_tmp_training_file_name())
@patch('abejacli.training.commands.TrainingJobLocalContainerRun')
def test_train_local_environment(mock_train_local, mock_get_organization_id, runner, req_mock):
mock_job = MagicMock()
mock_train_local.return_value = mock_job
mock_get_organization_id.return_value = '1122334455667'
config_data = {
'name': 'training-1',
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10',
'environment': {
'param1': 'value1', 'param2': 'value2', 'param3': 'value3'
},
'datasets': {'dataset_name1': 'value1'},
'ignores': ['.gitignore']
}
with open(abejacli.training.CONFIGFILE_NAME, 'w') as configfile:
yaml.dump(config_data, configfile)
version_info = {
'job_definition_id': '1111111111111',
'job_definition_version': 1,
'image': 'abeja-inc/all-cpu:18.10',
'environment': {
'param2': 'value22',
'param3': 'value33',
'foo': 'bar'
},
'archived': False
}
url = "{}/training/definitions/{}/versions/{}".format(
ORGANIZATION_ENDPOINT, 'training_def_version_1', 1)
req_mock.register_uri(
'GET', url,
json=version_info)
cmd = [
'--name', 'training_def_version_1',
'--version', '1',
'--environment', 'USER_ID:1234567890123',
'--environment', 'param3:value333',
'--config', abejacli.training.CONFIGFILE_NAME,
]
r = runner.invoke(train_local, cmd)
assert r.exit_code == 0, r.output
mock_get_organization_id.assert_called_once_with()
args = mock_train_local.call_args[1]
assert args['job_definition_name'] == 'training_def_version_1'
expect_environment = {
'param1': 'value1',
'param2': 'value2',
'param3': 'value333',
'USER_ID': '1234567890123',
'foo': 'bar'
}
assert args['environment'] == expect_environment
# Test without `--name`
url = "{}/training/definitions/{}/versions/{}".format(
ORGANIZATION_ENDPOINT, 'training-1', 1)
req_mock.register_uri(
'GET', url,
json=version_info)
cmd = [
'--version', '1',
'--config', abejacli.training.CONFIGFILE_NAME,
]
r = runner.invoke(train_local, cmd)
assert r.exit_code == 0, r.output
args = mock_train_local.call_args[1]
assert args['job_definition_name'] == 'training-1'
# Job definitions
def test_describe_job_definitions(req_mock, runner):
url = "{}/training/definitions".format(ORGANIZATION_ENDPOINT)
re_url = r"^{}.+".format(url)
matcher = re.compile(re_url)
expected_params = {
"filter_archived": ["exclude_archived"],
}
def match_request_url(request):
assert request.qs == expected_params
return request.path == urlparse(url).path
req_mock.register_uri(
'GET', matcher,
json={},
additional_matcher=match_request_url)
cmd = []
r = runner.invoke(describe_job_definitions, cmd)
assert not r.exception
def test_describe_job_definitions_limit_offset(req_mock, runner):
url = "{}/training/definitions".format(ORGANIZATION_ENDPOINT)
re_url = r"^{}.+".format(url)
matcher = re.compile(re_url)
expected_params = {
"filter_archived": ["exclude_archived"],
"limit": ['444'],
"offset": ["333"]
}
def match_request_url(request):
assert request.qs == expected_params
return request.path == urlparse(url).path
req_mock.register_uri(
'GET', matcher,
json={},
additional_matcher=match_request_url)
cmd = ["--limit", "444", "--offset", "333"]
r = runner.invoke(describe_job_definitions, cmd)
assert not r.exception
def test_describe_job_definition(req_mock, runner):
test_job_name = 'test-job'
url = "{}/training/definitions/{}".format(ORGANIZATION_ENDPOINT, test_job_name)
re_url = r"^{}$".format(url)
matcher = re.compile(re_url)
def match_request_url(request):
return request.url == url
req_mock.register_uri(
'GET', matcher,
json={},
additional_matcher=match_request_url)
cmd = ['--job-definition-name', test_job_name]
r = runner.invoke(describe_job_definitions, cmd)
assert not r.exception
def test_describe_job_definitions_include_archived(req_mock, runner):
url = "{}/training/definitions".format(ORGANIZATION_ENDPOINT)
re_url = r"^{}.+".format(url)
matcher = re.compile(re_url)
expected_params = {
"filter_archived": ["include_archived"],
}
def match_request_url(request):
assert request.qs == expected_params
return request.path == urlparse(url).path
req_mock.register_uri(
'GET', matcher,
json={},
additional_matcher=match_request_url)
cmd = ['--include-archived']
r = runner.invoke(describe_job_definitions, cmd)
assert not r.exception
# Job definition versions
def test_describe_job_definition_versions(req_mock, runner):
test_job_name = 'test-job-name'
url = "{}/training/definitions/{}/versions".format(
ORGANIZATION_ENDPOINT, test_job_name)
re_url = r"^{}.+".format(url)
matcher = re.compile(re_url)
expected_params = {
"filter_archived": ["exclude_archived"]
}
def match_request_url(request):
assert request.qs == expected_params
return request.path == urlparse(url).path
req_mock.register_uri(
'GET', matcher,
json={},
additional_matcher=match_request_url)
cmd = ['-j', test_job_name]
r = runner.invoke(describe_training_versions, cmd)
assert not r.exception
@patch('abejacli.training.CONFIGFILE_NAME', get_tmp_training_file_name())
def test_describe_job_definition_versions_from_config(req_mock, runner):
config_data = {
'name': 'training-1',
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10'
}
with open(abejacli.training.CONFIGFILE_NAME, 'w') as configfile:
yaml.dump(config_data, configfile)
url = "{}/training/definitions/{}/versions".format(
ORGANIZATION_ENDPOINT, config_data["name"])
re_url = r"^{}.+".format(url)
matcher = re.compile(re_url)
expected_params = {
"filter_archived": ["exclude_archived"],
}
def match_request_url(request):
assert request.qs == expected_params
return request.path == urlparse(url).path
req_mock.register_uri(
'GET', matcher,
json={},
additional_matcher=match_request_url)
cmd = []
r = runner.invoke(describe_training_versions, cmd)
assert not r.exception
@patch('abejacli.training.CONFIGFILE_NAME', get_tmp_training_file_name())
def test_describe_job_definition_versions_option_overwrites_config(req_mock, runner):
testing_name = 'dummy-name'
config_data = {
'name': 'training-1',
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10'
}
with open(abejacli.training.CONFIGFILE_NAME, 'w') as configfile:
yaml.dump(config_data, configfile)
url = "{}/training/definitions/{}/versions".format(
ORGANIZATION_ENDPOINT, testing_name)
re_url = r"^{}.+".format(url)
matcher = re.compile(re_url)
expected_params = {
"filter_archived": ["exclude_archived"],
}
def match_request_url(request):
assert request.qs == expected_params
return request.path == urlparse(url).path
req_mock.register_uri(
'GET', matcher,
json={},
additional_matcher=match_request_url)
cmd = ['-j', testing_name]
r = runner.invoke(describe_training_versions, cmd)
assert not r.exception
def test_describe_job_definition_versions_include_archived(req_mock, runner):
test_job_name = 'test-job-name'
url = "{}/training/definitions/{}/versions".format(
ORGANIZATION_ENDPOINT, test_job_name)
re_url = r"^{}.+".format(url)
matcher = re.compile(re_url)
expected_params = {
"filter_archived": ["include_archived"],
}
def match_request_url(request):
assert request.qs == expected_params
return request.path == urlparse(url).path
req_mock.register_uri(
'GET', matcher,
json={},
additional_matcher=match_request_url)
cmd = ['-j', test_job_name, '--include-archived']
r = runner.invoke(describe_training_versions, cmd)
assert not r.exception
# Traininig models
def test_describe_training_models(req_mock, runner):
test_job_name = 'test-job-name'
url = "{}/training/definitions/{}/models".format(
ORGANIZATION_ENDPOINT, test_job_name)
re_url = r"^{}.+".format(url)
matcher = re.compile(re_url)
expected_params = {
"filter_archived": ["exclude_archived"],
}
def match_request_url(request):
assert request.qs == expected_params
return request.path == urlparse(url).path
req_mock.register_uri(
'GET', matcher,
json={},
additional_matcher=match_request_url)
cmd = ['-j', test_job_name]
r = runner.invoke(describe_training_models, cmd)
assert not r.exception
@patch('abejacli.training.CONFIGFILE_NAME', get_tmp_training_file_name())
def test_describe_training_models_from_config(req_mock, runner):
config_data = {
'name': 'training-1',
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10'
}
with open(abejacli.training.CONFIGFILE_NAME, 'w') as configfile:
yaml.dump(config_data, configfile)
url = "{}/training/definitions/{}/models".format(
ORGANIZATION_ENDPOINT, config_data["name"])
re_url = r"^{}.+".format(url)
matcher = re.compile(re_url)
expected_params = {
"filter_archived": ["exclude_archived"],
}
def match_request_url(request):
assert request.qs == expected_params
return request.path == urlparse(url).path
req_mock.register_uri(
'GET', matcher,
json={},
additional_matcher=match_request_url)
cmd = []
r = runner.invoke(describe_training_models, cmd)
assert not r.exception
@patch('abejacli.training.CONFIGFILE_NAME', get_tmp_training_file_name())
def test_describe_training_models_option_overwrites_config(req_mock, runner):
testing_name = 'dummy-name'
config_data = {
'name': 'training-1',
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10'
}
with open(abejacli.training.CONFIGFILE_NAME, 'w') as configfile:
yaml.dump(config_data, configfile)
url = "{}/training/definitions/{}/models".format(
ORGANIZATION_ENDPOINT, testing_name)
re_url = r"^{}.+".format(url)
matcher = re.compile(re_url)
expected_params = {
"filter_archived": ["exclude_archived"],
}
def match_request_url(request):
assert request.qs == expected_params
return request.path == urlparse(url).path
req_mock.register_uri(
'GET', matcher,
json={},
additional_matcher=match_request_url)
cmd = ['-j', testing_name]
r = runner.invoke(describe_training_models, cmd)
assert not r.exception
def test_describe_training_models_include_archived(req_mock, runner):
test_job_name = 'test-job-name'
url = "{}/training/definitions/{}/models".format(
ORGANIZATION_ENDPOINT, test_job_name)
re_url = r"^{}.+".format(url)
matcher = re.compile(re_url)
expected_params = {
"filter_archived": ["include_archived"],
}
def match_request_url(request):
assert request.qs == expected_params
return request.path == urlparse(url).path
req_mock.register_uri(
'GET', matcher,
json={},
additional_matcher=match_request_url)
cmd = ['-j', test_job_name, '--include-archived']
r = runner.invoke(describe_training_models, cmd)
assert not r.exception
# Jobs
def test_describe_jobs(req_mock, runner):
test_job_name = 'test-job-name'
url = "{}/training/definitions/{}/jobs".format(
ORGANIZATION_ENDPOINT, test_job_name)
re_url = r"^{}.+".format(url)
matcher = re.compile(re_url)
expected_params = {
"filter_archived": ["exclude_archived"],
}
def match_request_url(request):
assert request.qs == expected_params
return request.path == urlparse(url).path
req_mock.register_uri(
'GET', matcher,
json={},
additional_matcher=match_request_url)
cmd = ['-j', test_job_name]
r = runner.invoke(describe_jobs, cmd)
assert not r.exception
def test_describe_jobs_limit_offset(req_mock, runner):
test_job_name = 'test-job-name'
url = "{}/training/definitions/{}/jobs".format(
ORGANIZATION_ENDPOINT, test_job_name)
re_url = r"^{}.+".format(url)
matcher = re.compile(re_url)
expected_params = {
"filter_archived": ["exclude_archived"],
"limit": ["444"],
"offset": ["333"]
}
def match_request_url(request):
assert request.qs == expected_params
return request.path == urlparse(url).path
req_mock.register_uri(
'GET', matcher,
json={},
additional_matcher=match_request_url)
cmd = ['-j', test_job_name, "--limit", "444", "--offset", "333"]
r = runner.invoke(describe_jobs, cmd)
assert not r.exception
@patch('abejacli.training.CONFIGFILE_NAME', get_tmp_training_file_name())
def test_describe_jobs_from_config(req_mock, runner):
config_data = {
'name': 'training-1',
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10'
}
with open(abejacli.training.CONFIGFILE_NAME, 'w') as configfile:
yaml.dump(config_data, configfile)
url = "{}/training/definitions/{}/jobs".format(
ORGANIZATION_ENDPOINT, config_data["name"])
re_url = r"^{}.+".format(url)
matcher = re.compile(re_url)
expected_params = {
"filter_archived": ["exclude_archived"],
}
def match_request_url(request):
assert request.qs == expected_params
return request.path == urlparse(url).path
req_mock.register_uri(
'GET', matcher,
json={},
additional_matcher=match_request_url)
cmd = []
r = runner.invoke(describe_jobs, cmd)
print(r.output)
assert not r.exception
@patch('abejacli.training.CONFIGFILE_NAME', get_tmp_training_file_name())
def test_describe_jobs_option_overwrites_config(req_mock, runner):
testing_name = 'dummy-name'
config_data = {
'name': 'training-1',
'handler': 'train:handler',
'image': 'abeja-inc/all-cpu:18.10'
}
with open(abejacli.training.CONFIGFILE_NAME, 'w') as configfile:
yaml.dump(config_data, configfile)
url = "{}/training/definitions/{}/jobs".format(
ORGANIZATION_ENDPOINT, testing_name)
re_url = r"^{}.+".format(url)
matcher = re.compile(re_url)
expected_params = {
"filter_archived": ["exclude_archived"],
}
def match_request_url(request):
assert request.qs == expected_params
return request.path == urlparse(url).path
req_mock.register_uri(
'GET', matcher,
json={},
additional_matcher=match_request_url)
cmd = ['-j', testing_name]
r = runner.invoke(describe_jobs, cmd)
assert not r.exception
def test_describe_jobs_include_archived(req_mock, runner):
test_job_name = 'test-job-name'
url = "{}/training/definitions/{}/jobs".format(
ORGANIZATION_ENDPOINT, test_job_name)
re_url = r"^{}.+".format(url)
matcher = re.compile(re_url)
expected_params = {
"filter_archived": ["include_archived"],
}
def match_request_url(request):
assert request.qs == expected_params
return request.path == urlparse(url).path
req_mock.register_uri(
'GET', matcher,
json={},
additional_matcher=match_request_url)
cmd = ['-j', test_job_name, '--include-archived']
r = runner.invoke(describe_jobs, cmd)
assert not r.exception
| 33.080833 | 105 | 0.57548 | 5,484 | 54,021 | 5.473195 | 0.043217 | 0.026387 | 0.030418 | 0.042645 | 0.900716 | 0.877728 | 0.863202 | 0.846477 | 0.826887 | 0.813593 | 0 | 0.055391 | 0.263101 | 54,021 | 1,632 | 106 | 33.101103 | 0.698603 | 0.011329 | 0 | 0.70106 | 0 | 0 | 0.322701 | 0.099195 | 0 | 0 | 0 | 0 | 0.048057 | 1 | 0.040989 | false | 0 | 0.009187 | 0.00636 | 0.068551 | 0.000707 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
0d374b7ee08cf8fec22a1ada3e20dde0627a052b | 3,443 | py | Python | test/features/test_search.py | alphagov/transactions-explorer | 1e780cd8b4f2923f527812e97c581ef2982b6077 | [
"MIT"
] | 1 | 2017-03-31T15:05:42.000Z | 2017-03-31T15:05:42.000Z | test/features/test_search.py | gds-attic/transactions-explorer | 1e780cd8b4f2923f527812e97c581ef2982b6077 | [
"MIT"
] | null | null | null | test/features/test_search.py | gds-attic/transactions-explorer | 1e780cd8b4f2923f527812e97c581ef2982b6077 | [
"MIT"
] | 2 | 2019-08-29T11:33:36.000Z | 2021-04-10T20:07:44.000Z | import unittest
from hamcrest import *
from nose.tools import nottest
from test.features import BrowserTest
from test.features.support.splinter_matchers import has_text, has_class
class test_search(BrowserTest):
def test_search_page(self):
self.browser.visit("http://0.0.0.0:8000/search?keyword=gds")
assert_that(self.browser.find_by_css('#wrapper h1').text,
is_('Search results'))
assert_that(self.browser.find_by_css('tbody tr'), has_length(8))
def test_default_sorting(self):
self.browser.visit("http://0.0.0.0:8000/search?keyword=gds")
assert_that(self.browser.find_by_css('.sorted'), has_text('Transactions per year'))
assert_that(self.browser.find_by_css('.sorted'), has_class('descending'))
def test_sorting_search_results_by_transactional_service(self):
self.browser.visit("http://0.0.0.0:8000/search?keyword=gds")
self.browser.click_link_by_text('Transactional service')
assert_that(self.browser.find_by_css('.sorted'), has_text('Transactional service'))
assert_that(self.browser.find_by_css('.sorted'), has_class('ascending'))
def test_sorting_search_results_by_category(self):
self.browser.visit("http://0.0.0.0:8000/search?keyword=gds")
self.browser.click_link_by_text('Category')
assert_that(self.browser.find_by_css('.sorted'), has_text('Category'))
assert_that(self.browser.find_by_css('.sorted'), has_class('ascending'))
def test_sorting_search_results_by_agency(self):
self.browser.visit("http://0.0.0.0:8000/search?keyword=gds")
self.browser.click_link_by_text('Agency / body')
assert_that(self.browser.find_by_css('.sorted'), has_text('Agency / body'))
assert_that(self.browser.find_by_css('.sorted'), has_class('ascending'))
def test_sorting_twice_the_same_column_reverses_the_order(self):
self.browser.visit("http://0.0.0.0:8000/search?keyword=gds")
self.browser.click_link_by_text('Transactional service')
self.browser.click_link_by_text('Transactional service')
assert_that(self.browser.find_by_css('.sorted'), has_text('Transactional service'))
assert_that(self.browser.find_by_css('.sorted'), has_class('descending'))
def test_default_order_is_ascending_after_changing_column(self):
self.browser.visit("http://0.0.0.0:8000/search?keyword=gds")
self.browser.click_link_by_text('Transactional service')
self.browser.click_link_by_text('Category')
assert_that(self.browser.find_by_css('.sorted'), has_text('Category'))
assert_that(self.browser.find_by_css('.sorted'), has_class('ascending'))
def test_default_volume_order_is_descending(self):
self.browser.visit("http://0.0.0.0:8000/search?keyword=gds")
self.browser.click_link_by_text('Transactional service')
self.browser.click_link_by_text('Transactions per year')
assert_that(self.browser.find_by_css('.sorted'), has_text('Transactions per year'))
assert_that(self.browser.find_by_css('.sorted'), has_class('descending'))
def test_link_column_is_not_sortable(self):
self.browser.visit("http://0.0.0.0:8000/search?keyword=gds")
assert_that(self.browser.find_by_xpath('//th[text()="Web link"]'), has_length(greater_than(0)))
assert_that(self.browser.find_link_by_text("Web link"), has_length(0))
| 41.987805 | 103 | 0.715365 | 496 | 3,443 | 4.663306 | 0.143145 | 0.171206 | 0.023346 | 0.163424 | 0.80588 | 0.777778 | 0.768266 | 0.755296 | 0.755296 | 0.755296 | 0 | 0.025719 | 0.141737 | 3,443 | 81 | 104 | 42.506173 | 0.757022 | 0 | 0 | 0.557692 | 0 | 0 | 0.243392 | 0 | 0 | 0 | 0 | 0 | 0.346154 | 1 | 0.173077 | false | 0 | 0.096154 | 0 | 0.288462 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
b4e5c8df75f7dede229ec3aeb1f58242423b2d33 | 78,078 | py | Python | LegitTrashCan.py | Li-Haowei/3D-Modeling-with-GLSL | a33fe2d297059d83cb2565ed80816db255a690c4 | [
"MIT"
] | null | null | null | LegitTrashCan.py | Li-Haowei/3D-Modeling-with-GLSL | a33fe2d297059d83cb2565ed80816db255a690c4 | [
"MIT"
] | null | null | null | LegitTrashCan.py | Li-Haowei/3D-Modeling-with-GLSL | a33fe2d297059d83cb2565ed80816db255a690c4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sat Nov 27 00:21:30 2021
This is actually a trash can for me to store the old codes.
In case I want some of the old code I can always go back here to get
the old code
@author: Haowei Li
"""
"""self.vtxCoord = np.zeros([length, height, width, 3]) #first store all verices coordinates information in a 3D grid
vl = np.array([
[-length/2, -width/2, -height/2], #back left down
[-length/2, -width/2, height/2], #back left up
[-length/2, width/2, -height/2], #back right down
[-length/2, width/2, height/2], #back right up
[length/2, -width/2, height/2], #front left up
[length/2, -width/2, -height/2], #front left down
[length/2, width/2, -height/2], #front right down
[length/2, width/2, height/2] #front right up
])
#self.vertices = np.zeros([24, 11])
#back, front, left, right, top, bottom
back = np.array([vl[0],vl[1],vl[2],vl[3]])
backAttri = np.array([0,0,-1,*color])
for i in range(len(back)):
print(np.concatenate([back[i],backAttri]))
back[i] = np.concatenate([back[i],backAttri])
front = np.array([vl[4],vl[5],vl[6],vl[7]])
for i in range(len(front)):
front[i] += [0,0,1,*color]
left = np.array([vl[0],vl[1],vl[4],vl[5]])
for i in range(len(left)):
left[i] += [-1,0,0,*color]
right = np.array([vl[2],vl[3],vl[6],vl[7]])
for i in range(len(right)):
right[i] += [1,0,0,*color]
top = np.array([vl[1],vl[3],vl[4],vl[7]])
for i in range(len(right)):
top[i] += [0,1,0,*color]
bot = np.array([vl[1],vl[3],vl[4],vl[7]])
for i in range(len(bot)):
bot[i] += [0,-1,0,*color]
self.vertices = np.array([back,front,left,right,top,bot])
for i in self.vertices:
print(i)"""
"""vl = np.array([
[-length/2, -width/2, -height/2, 0, 0, -1, *color], #back left down
[-length/2, -width/2, height/2, 0, 0, -1, *color], #back left up
[-length/2, width/2, -height/2, 0, 0, -1, *color], #back right down
[-length/2, width/2, height/2, 0, 0, -1, *color], #back right up
[length/2, -width/2, height/2, 0, 0, 1, *color], #front left up
[length/2, -width/2, -height/2, 0, 0, 1, *color], #front left down
[length/2, width/2, -height/2, 0, 0, 1, *color], #front right down
[length/2, width/2, height/2, 0, 0, 1, *color] #front right up
])"""
"""self.vertices = np.zeros([36, 11])
vl = np.array([
# back face
-length/2, -width/2, -height/2, 0, 0, -1, *color,
-length/2, width/2, -height/2, 0, 0, -1, *color,
length/2, width/2, -height/2, 0, 0, -1, *color,
-length / 2, -width / 2, -height / 2, 0, 0, -1, *color,
length / 2, width / 2, -height / 2, 0, 0, -1, *color,
length/2, -width/2, -height/2, 0, 0, -1, *color,
# front face
-length/2, -width/2, height/2, 0, 0, 1, *color,
length/2, -width/2, height/2, 0, 0, 1, *color,
length/2, width/2, height/2, 0, 0, 1, *color,
-length / 2, -width / 2, height / 2, 0, 0, 1, *color,
length / 2, width / 2, height / 2, 0, 0, 1, *color,
-length/2, width/2, height/2, 0, 0, 1, *color,
# left face
-length/2, -width/2, -height/2, -1, 0, 0, *color,
-length/2, -width/2, height/2, -1, 0, 0, *color,
-length/2, width/2, height/2, -1, 0, 0, *color,
-length / 2, -width / 2, -height / 2, -1, 0, 0, *color,
-length / 2, width / 2, height / 2, -1, 0, 0, *color,
-length/2, width/2, -height/2, -1, 0, 0, *color,
# right face
length/2, -width/2, height/2, 1, 0, 0, *color,
length/2, -width/2, -height/2, 1, 0, 0, *color,
length/2, width/2, -height/2, 1, 0, 0, *color,
length / 2, -width / 2, height / 2, 1, 0, 0, *color,
length / 2, width / 2, -height / 2, 1, 0, 0, *color,
length/2, width/2, height/2, 1, 0, 0, *color,
# top face
-length/2, width/2, height/2, 0, 1, 0, *color,
length/2, width/2, height/2, 0, 1, 0, *color,
length/2, width/2, -height/2, 0, 1, 0, *color,
-length / 2, width / 2, height / 2, 0, 1, 0, *color,
length / 2, width / 2, -height / 2, 0, 1, 0, *color,
-length/2, width/2, -height/2, 0, 1, 0, *color,
# bot face
-length/2, -width/2, -height/2, 0, -1, 0, *color,
length/2, -width/2, -height/2, 0, -1, 0, *color,
length/2, -width/2, height/2, 0, -1, 0, *color,
-length / 2, -width / 2, -height / 2, 0, -1, 0, *color,
length / 2, -width / 2, height / 2, 0, -1, 0, *color,
-length/2, -width/2, height/2, 0, -1, 0, *color,
]).reshape((36, 9))
self.vertices[0:36, 0:9] = vl"""
"""back = [0,0,-1,*color]
front = [0,0,1,*color]
top = [0,1,0,*color]
bot = [0,-1,0,*color]
right = [1,0,0,*color]
left = [-1,0,0,*color]
self.indices = np.array([
np.concatenate((vl[0],back)),np.column_stack((vl[1],back)),np.column_stack((vl[2],back)),
np.column_stack((vl[3],back)),np.column_stack((vl[1],back)),np.column_stack((vl[2],back)),#back
np.column_stack((vl[4],front)),np.column_stack((vl[5],front)),np.column_stack((vl[6],front)),
np.column_stack((vl[7],front)),np.column_stack((vl[5],front)),np.column_stack((vl[6],front)),#front
np.column_stack((vl[2],top)),np.column_stack((vl[6],top)),np.column_stack((vl[7],top)),
np.column_stack((vl[2],top)),np.column_stack((vl[3],top)),np.column_stack((vl[7],top)),#top
np.column_stack((vl[0],bot)),np.column_stack((vl[4],bot)),np.column_stack((vl[5],bot)),
np.column_stack((vl[0],bot)),np.column_stack((vl[1],bot)),np.column_stack((vl[5],bot)),#bot
np.column_stack((vl[1],right)),np.column_stack((vl[5],right)),np.column_stack((vl[7],right)),
np.column_stack((vl[1],right)),np.column_stack((vl[3],right)),np.column_stack((vl[7],right)),#right
np.column_stack((vl[2],left)),np.column_stack((vl[4],left)),np.column_stack((vl[6],left)),
np.column_stack((vl[2],left)),np.column_stack((vl[4],left)),np.column_stack((vl[0],left))#left
])"""
"""back = [0,0,-1,*color]
front = [0,0,1,*color]
top = [0,1,0,*color]
bot = [0,-1,0,*color]
right = [1,0,0,*color]
left = [-1,0,0,*color]
self.indices = np.array([
vl[0]+back,vl[1]+back,vl[2]+back,
vl[1]+back,vl[2]+back,vl[3]+back,#back
vl[4]+front,vl[5]+front,vl[6]+front,
vl[5]+front,vl[6]+front,vl[7]+front,#front
vl[2]+top,vl[6]+top,vl[7]+top,
vl[2]+top,vl[3]+top,vl[7]+top,#top
vl[0]+bot,vl[4]+bot,vl[5]+bot,
vl[0]+bot,vl[1]+bot,vl[5]+bot,#bot
vl[1]+right,vl[5]+right,vl[7]+right,
vl[1]+right,vl[3]+right,vl[7]+right,#right
vl[2]+left,vl[4]+left,vl[6]+left,
vl[2]+left,vl[0]+left,vl[4]+left#left
])"""
"""self.indices = np.array([
vl[0],vl[1],vl[2],
vl[1],vl[2],vl[3],#back
vl[4],vl[5],vl[6],
vl[5],vl[6],vl[7],#front
vl[2],vl[6],vl[7],
vl[2],vl[3],vl[7],#top
vl[0],vl[4],vl[5],
vl[0],vl[1],vl[5],#bot
vl[1],vl[5],vl[7],
vl[1],vl[3],vl[7],#right
vl[2],vl[4],vl[6],
vl[2],vl[0],vl[4]#left
])"""
"""vl = [
[-length/2, -width/2, -height/2], #back left down
[-length/2, width/2, -height/2], #back right down
[-length/2, -width/2, height/2], #back left up
[-length/2, width/2, height/2], #back right up
[length/2, -width/2, -height/2], #front left down
[length/2, width/2, -height/2], #front right down
[length/2, -width/2, height/2], #front left up
[length/2, width/2, height/2] #front right up
]
self.indices = np.array([
vl[0],vl[1],vl[2],
vl[1],vl[2],vl[3],#back
vl[4],vl[5],vl[6],
vl[5],vl[6],vl[7],#front
vl[2],vl[6],vl[7],
vl[2],vl[3],vl[7],#top
vl[0],vl[4],vl[5],
vl[0],vl[1],vl[5],#bot
vl[1],vl[5],vl[7],
vl[1],vl[3],vl[7],#right
vl[2],vl[4],vl[6],
vl[0],vl[2],vl[4]#left
])"""
"""self.indices = np.array([
vl[0],vl[1],vl[2],
vl[1],vl[2],vl[3],#back
vl[4],vl[5],vl[6],
vl[5],vl[6],vl[7],#front
vl[0],vl[4],vl[5],
vl[0],vl[1],vl[5],#bot
vl[2],vl[6],vl[7],
vl[2],vl[3],vl[7],#top
vl[2],vl[4],vl[6],
vl[0],vl[2],vl[4],#left
vl[1],vl[5],vl[7],
vl[1],vl[3],vl[7]#right
])"""
"""self.indices = np.array([
0,1,2,
1,2,3,
4,5,6,
5,6,7,
0,1,5,
0,4,5,
2,3,7,
2,6,7,
0,2,6,
0,4,6,
1,5,7,
1,3,7 ])"""
"""self.vertices = np.array([
-length/2, -width/2, -height/2, -1, -1, -1,*color, #back left down
-length/2, width/2, -height/2, 1, -1, -1,*color, #back right down
-length/2, -width/2, height/2, -1, 1, -1,*color, #back left up
-length/2, width/2, height/2, 1, 1, -1,*color, #back right up
length/2, -width/2, -height/2, -1, -1, 1,*color, #front left down
length/2, width/2, -height/2, 1, -1, 1,*color, #front right down
length/2, -width/2, height/2, -1, 1, 1,*color, #front left up
length/2, width/2, height/2, 1, 1, 1,*color #front right up
])"""
"""self.vertices = np.array([
[-length/2, -width/2, -height/2, -1, -1, -1,*color], #back left down
[-length/2, width/2, -height/2, 1, -1, -1,*color], #back right down
[-length/2, -width/2, height/2, -1, 1, -1,*color], #back left up
[-length/2, width/2, height/2, 1, 1, -1,*color], #back right up
[length/2, -width/2, -height/2, -1, -1, 1,*color], #front left down
[length/2, width/2, -height/2, 1, -1, 1,*color], #front right down
[length/2, -width/2, height/2, -1, 1, 1,*color], #front left up
[length/2, width/2, height/2, 1, 1, 1,*color] #front right up
])"""
"""self.vertices = np.array([
-length/2, -width/2, -height/2, -1, -1, -1,*color,0,0, #back left down
-length/2, width/2, -height/2, 1, -1, -1,*color,0,0, #back right down
-length/2, -width/2, height/2, -1, 1, -1,*color,0,0, #back left up
-length/2, width/2, height/2, 1, 1, -1,*color,0,0, #back right up
length/2, -width/2, -height/2, -1, -1, 1,*color,0,0, #front left down
length/2, width/2, -height/2, 1, -1, 1,*color,0,0, #front right down
length/2, -width/2, height/2, -1, 1, 1,*color,0,0, #front left up
length/2, width/2, height/2, 1, 1, 1,*color,0,0 #front right up
]).reshape((8,11))"""
"""
from Displayable import Displayable
from GLBuffer import VAO, VBO, EBO
from Point import Point
import numpy as np
import ColorType
import math
try:
import OpenGL
try:
import OpenGL.GL as gl
import OpenGL.GLU as glu
except ImportError:
from ctypes import util
orig_util_find_library = util.find_library
def new_util_find_library(name):
res = orig_util_find_library(name)
if res:
return res
return '/System/Library/Frameworks/' + name + '.framework/' + name
util.find_library = new_util_find_library
import OpenGL.GL as gl
import OpenGL.GLU as glu
except ImportError:
raise ImportError("Required dependency PyOpenGL not present")
##### TODO 6/BONUS 6: Texture Mapping
# Requirements:
# 1. Set up each object's vertex texture coordinates(2D) to the self.vertices 9:11 columns
# (i.e. the last two columns). Tell OpenGL how to interpret these two columns:
# you need to set up attribPointer in the Displayable object's initialize method.
# 2. Generate texture coordinates for the torus and sphere. Use “./assets/marble.jpg” for the torus and
# “./assets/earth.jpg” for the sphere as the texture image.
# There should be no seams in the resulting texture-mapped model.
class DisplayableDisk(Displayable):
vao = None
vbo = None
ebo = None
shaderProg = None
# stores current torus's information, read-only
nsides = 0
rings = 0
innerRadius = 0
outerRadius = 0
color = None
vertices = None
indices = None
def __init__(self, shaderProg, a=0.25, b=0.5, c=0.25, stacks=18, slices=36, color=ColorType.SOFTBLUE):
super(DisplayableDisk, self).__init__()
self.shaderProg = shaderProg
self.shaderProg.use()
self.vao = VAO()
self.vbo = VBO() # vbo can only be initiate with glProgram activated
self.ebo = EBO()
self.generate(a, b, c, stacks, slices, color)
def generate(self, a=0.25, b=0, c=0.25, stacks=18, slices=36, color=ColorType.SOFTBLUE):
self.a = a
self.b = b
self.c = c
self.stacks = stacks
self.slices = slices
# we need to pad one more row for both nsides and rings, to assign correct texture coord to them
self.vertices = np.zeros([6*(stacks)*(slices), 11])
self.vtxCoord = np.zeros([stacks, slices, 3])
for i in range(stacks):
theta = i/(stacks - 1) * math.pi - math.pi/2 #the stack range will be from -pi/2 to pi/2
for j in range(slices):
phi = j/(slices)*2 * 2*math.pi #the slice range will be from -pi to pi
#it is the formula
self.vtxCoord[i,j,:] = [self.a * math.cos(theta) * math.cos(phi),
self.b * math.cos(theta) * math.sin(phi),
self.c * math.sin(theta)]
for i in range(stacks-1):
for j in range(slices):
gridN = i * slices + j
#store vertex data in our vertices array
self.vertices[6 * gridN + 0, 0:3] = self.vtxCoord[i,j,:]
self.vertices[6 * gridN + 1, 0:3] = self.vtxCoord[i,(j+1)%slices,:]
self.vertices[6 * gridN + 2, 0:3] = self.vtxCoord[i+1,(j+1)%slices,:]
self.vertices[6 * gridN + 3, 0:3] = self.vtxCoord[i,j,:]
self.vertices[6 * gridN + 4, 0:3] = self.vtxCoord[i+1,(j+1)%slices,:]
self.vertices[6 * gridN + 5, 0:3] = self.vtxCoord[i+1,j,:]
#try to set up the color for the vertices in the triangle
self.vertices[6 * gridN + 0: 6 * gridN + 6, 6:9] = [*color]
self.vertices[6 * gridN + 2, 6:9] = [*color]
self.vertices[6 * gridN + 5, 6:9] = [*color]
vl = []
for i in range(6*(stacks-1)*slices):
vl.append(i)
self.indices = np.array(vl)
def draw(self):
self.vao.bind()
self.vbo.draw()
#self.ebo.draw()
self.vao.unbind()
def initialize(self):
self.vao.bind()
self.vbo.setBuffer(self.vertices, 11)
self.ebo.setBuffer(self.indices)
self.vbo.setAttribPointer(self.shaderProg.getAttribLocation("vertexPos"),
stride=11, offset=0, attribSize=3)
self.vbo.setAttribPointer(self.shaderProg.getAttribLocation("vertexNormal"),
stride=11, offset=3, attribSize=3)
self.vbo.setAttribPointer(self.shaderProg.getAttribLocation("vertexColor"),
stride=11, offset=6, attribSize=3)
self.vao.unbind()
"""
#Sphere
"""
from Displayable import Displayable
from GLBuffer import VAO, VBO, EBO
import numpy as np
import ColorType
import math
try:
import OpenGL
try:
import OpenGL.GL as gl
import OpenGL.GLU as glu
except ImportError:
from ctypes import util
orig_util_find_library = util.find_library
def new_util_find_library(name):
res = orig_util_find_library(name)
if res:
return res
return '/System/Library/Frameworks/' + name + '.framework/' + name
util.find_library = new_util_find_library
import OpenGL.GL as gl
import OpenGL.GLU as glu
except ImportError:
raise ImportError("Required dependency PyOpenGL not present")
class DisplayableSphere(Displayable):
vao = None
vbo = None
ebo = None
shaderProg = None
vertices = None # array to store vertices information
indices = None # stores triangle indices to vertices
# stores current cube's information, read-only
radius = None
stacks = None
slices = None
color = None
def __init__(self, shaderProg, radius=1, stacks=18, slices=36, color=ColorType.BLUE):
super().__init__()
self.shaderProg = shaderProg
self.shaderProg.use()
#all classes used here are defined in GLBuffer
self.vao = VAO()
self.vbo = VBO() # vbo can only be initiate with glProgram activated
self.ebo = EBO()
self.generate(radius, stacks, slices, color)
#note: In the start code, we didn't use EBO to draw the triangle mesh but VBO only
#if it is just EBO data not given to OpenGL, try to combine all three vertices and treat it as a child
#Every three vertices used to define a triangle
#because we didn't use EBO
def normalize(self,v1,v2):
nx = v1[1]*v2[2] - v1[2]*v2[1]
ny = v1[2]*v2[0] - v1[0]*v2[2]
nz = v1[0]*v2[1] - v1[1]*v2[0]
v3 = [nx,ny,nz]
def NormalizeData(data):
return (data - np.min(data)) / (np.max(data) - np.min(data))
return NormalizeData(v3)
def generate(self, radius=1, stacks=18, slices=36, color=None):
self.radius = radius
self.stacks = stacks
self.slices = slices
self.color = color
self.vertices = np.zeros([6*(slices)*(stacks-1), 11]) #for every vertex will be used 11 attributes to describe it
#the first number define the number of vertices in the sphere
#first store all verices coordinates information in a 3D grid
self.vtxCoord = np.zeros([stacks, slices, 3])
for i in range(stacks):
phi = i/(stacks - 1) * math.pi - math.pi/2 #the stack range will be from -pi/2 to pi/2
for j in range(slices):
theta = j/(slices)*2 * math.pi #the slice range will be from -pi to pi
#it is the formula
self.vtxCoord[i,j,:] = [self.radius * math.cos(phi) * math.cos(theta),
self.radius * math.cos(phi) * math.sin(theta),
self.radius * math.sin(phi)]
#note: you cannot directly use the displayablesphre in scenes for the ellipsal
#for the vertices normal, you need to use the derivatives along the u and v to compute the vertices, normalized
#then for every triangle on sphere, we set up vertices coordinate and color for it
#the result will be stored into a flattened 2D matrix
#interate through the grids:
vl = []
for i in range(stacks-1):
for j in range(slices):
gridN = i * slices + j
#store vertex data in our vertices array
self.vertices[6 * gridN + 0, 0:3] = self.vtxCoord[i,j,:]
self.vertices[6 * gridN + 1, 0:3] = self.vtxCoord[i,(j+1)%slices,:]
self.vertices[6 * gridN + 2, 0:3] = self.vtxCoord[i+1,(j+1)%slices,:]
#calculating vertex normal
vector1 = self.vertices[6 * gridN + 0, 0:3]-self.vertices[6 * gridN + 1, 0:3]
vector2 = self.vertices[6 * gridN + 0, 0:3]-self.vertices[6 * gridN + 2, 0:3]
normal = self.normalize(vector1,vector2)
self.vertices[6 * gridN + 0, 3:6] = normal
self.vertices[6 * gridN + 1, 3:6] = normal
self.vertices[6 * gridN + 2, 3:6] = normal
self.vertices[6 * gridN + 3, 0:3] = self.vtxCoord[i,j,:]
self.vertices[6 * gridN + 4, 0:3] = self.vtxCoord[i+1,(j+1)%slices,:]
self.vertices[6 * gridN + 5, 0:3] = self.vtxCoord[i+1,j,:]
#calculating vertex normal
vector1 = self.vertices[6 * gridN + 3, 0:3]-self.vertices[6 * gridN + 4, 0:3]
vector2 = self.vertices[6 * gridN + 3, 0:3]-self.vertices[6 * gridN + 5, 0:3]
normal = self.normalize(vector1,vector2)
self.vertices[6 * gridN + 3, 3:6] = normal
self.vertices[6 * gridN + 4, 3:6] = normal
self.vertices[6 * gridN + 5, 3:6] = normal
for k in range(6):
vl.append(6 * gridN + k)
#try to set up the color for the vertices in the triangle
self.vertices[6 * gridN + 0: 6 * gridN + 6, 6:9] = [*color]
self.vertices[6 * gridN + 2, 6:9] = [*color]
self.vertices[6 * gridN + 5, 6:9] = [*color]
self.indices = np.array(vl)
#in toDo1, you will be asked to draw the mesh with EBO
#such as changing 'vbo.draw()' to 'ebo.draw()'
#To do that you need to change the vertives of the matrix and the indices to make it work
def draw(self):
self.vao.bind()
# TODO 1.1 is at here, switch from vbo to ebo
self.ebo.draw()
self.vao.unbind()
def initialize(self):
self.vao.bind()
self.vbo.setBuffer(self.vertices, 11)
self.ebo.setBuffer(self.indices)
self.vbo.setAttribPointer(self.shaderProg.getAttribLocation("vertexPos"),
stride=11, offset=0, attribSize=3)
self.vbo.setAttribPointer(self.shaderProg.getAttribLocation("vertexNormal"),
stride=11, offset=3, attribSize=3)
self.vbo.setAttribPointer(self.shaderProg.getAttribLocation("vertexColor"),
stride=11, offset=6, attribSize=3)
# TODO/BONUS 6.1 is at here, you need to set attribPointer for texture coordinates
# you should check the corresponding variable name in GLProgram and set the pointer
self.vao.unbind()
"""
# new Sphere
"""
from Displayable import Displayable
from GLBuffer import VAO, VBO, EBO
import numpy as np
import ColorType
import math
try:
import OpenGL
try:
import OpenGL.GL as gl
import OpenGL.GLU as glu
except ImportError:
from ctypes import util
orig_util_find_library = util.find_library
def new_util_find_library(name):
res = orig_util_find_library(name)
if res:
return res
return '/System/Library/Frameworks/' + name + '.framework/' + name
util.find_library = new_util_find_library
import OpenGL.GL as gl
import OpenGL.GLU as glu
except ImportError:
raise ImportError("Required dependency PyOpenGL not present")
class DisplayableSphere(Displayable):
vao = None
vbo = None
ebo = None
shaderProg = None
vertices = None # array to store vertices information
indices = None # stores triangle indices to vertices
# stores current cube's information, read-only
radius = None
stacks = None
slices = None
color = None
def __init__(self, shaderProg, radius=1, stacks=18, slices=36, color=ColorType.BLUE):
super().__init__()
self.shaderProg = shaderProg
self.shaderProg.use()
#all classes used here are defined in GLBuffer
self.vao = VAO()
self.vbo = VBO() # vbo can only be initiate with glProgram activated
self.ebo = EBO()
self.generate(radius, stacks, slices, color)
#note: In the start code, we didn't use EBO to draw the triangle mesh but VBO only
#if it is just EBO data not given to OpenGL, try to combine all three vertices and treat it as a child
#Every three vertices used to define a triangle
#because we didn't use EBO
def normalize(self,v1,v2):
nx = v1[1]*v2[2] - v1[2]*v2[1]
ny = v1[2]*v2[0] - v1[0]*v2[2]
nz = v1[0]*v2[1] - v1[1]*v2[0]
v3 = [nx,ny,nz]
def NormalizeData(data):
return (data - np.min(data)) / (np.max(data) - np.min(data))
return NormalizeData(v3)
def generate(self, radius=1, stacks=18, slices=36, color=None):
self.radius = radius
self.stacks = stacks
self.slices = slices
self.color = color
self.vertices = []
for i in range(stacks):
phi = i/(stacks - 1) * math.pi - math.pi/2
for j in range(slices):
theta = j/(slices)*2 * math.pi
self.vertices.append([self.radius * math.cos(phi) * math.cos(theta),
self.radius * math.cos(phi) * math.sin(theta),
self.radius * math.sin(phi), 0,0,0,*color,0,0])
self.vertices = np.array(self.vertices)
vl = []
for i in range(stacks):
for j in range(slices):
if i<stacks-1 and j<slices-1:
#calculating normal ([i][j],[i][j+1],[i+1][j+1])
vector1 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i)+(j+1)*stacks][0:3]
vector2 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i+1)+(j+1)*stacks][0:3]
normal1 = self.normalize(vector1,vector2)
self.vertices[(i)+(j)*stacks][3:6] = (self.vertices[(i)+(j)*stacks][3:6]+np.array(normal1))/2
self.vertices[(i)+(j+1)*stacks][3:6] = (self.vertices[(i)+(j+1)*stacks][3:6]+np.array(normal1))/2
self.vertices[(i+1)+(j+1)*stacks][3:6] = (self.vertices[(i+1)+(j+1)*stacks][3:6]+np.array(normal1))/2
#add vertices location into ebo
vl += [(i)+(j)*stacks,(i)+(j+1)*stacks, (i+1)+(j+1)*stacks]
#calculating normal ([i][j],[i+1][j],[i+1][j+1])
vector3 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i+1)+(j)*stacks][0:3]
vector4 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i+1)+(j+1)*stacks][0:3]
normal2 = self.normalize(vector3,vector4)
self.vertices[(i)+(j)*stacks][3:6] = (self.vertices[(i)+(j)*stacks][3:6]+np.array(normal2))/2
self.vertices[(i+1)+(j)*stacks][3:6] = (self.vertices[(i+1)+(j)*stacks][3:6]+np.array(normal2))/2
self.vertices[(i+1)+(j+1)*stacks][3:6] = (self.vertices[(i+1)+(j+1)*stacks][3:6]+np.array(normal2))/2
#add vertices location into ebo
vl += [(i)+(j)*stacks,(i+1)+(j)*stacks, (i+1)+(j+1)*stacks]
elif i==stacks-1 and j<slices-1:
#calculating normal ([i][j],[i][j+1],[0][j+1])
vector1 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i)+(j+1)*stacks][0:3]
vector2 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(0)+(j+1)*stacks][0:3]
normal1 = self.normalize(vector1,vector2)
self.vertices[(i)+(j)*stacks][3:6] = (self.vertices[(i)+(j)*stacks][3:6]+np.array(normal1))/2
self.vertices[(i)+(j+1)*stacks][3:6] = (self.vertices[(i)+(j+1)*stacks][3:6]+np.array(normal1))/2
self.vertices[(0)+(j+1)*stacks][3:6] = (self.vertices[(0)+(j+1)*stacks][3:6]+np.array(normal1))/2
#add vertices location into ebo
vl += [(i)+(j)*stacks,(i)+(j+1)*stacks, (0)+(j+1)*stacks]
#calculating normal ([i][j],[0][j],[0][j+1])
vector3 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(0)+(j)*stacks][0:3]
vector4 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(0)+(j+1)*stacks][0:3]
normal2 = self.normalize(vector3,vector4)
self.vertices[(i)+(j)*stacks][3:6] = (self.vertices[(i)+(j)*stacks][3:6]+np.array(normal2))/2
self.vertices[(0)+(j)*stacks][3:6] = (self.vertices[(0)+(j)*stacks][3:6]+np.array(normal2))/2
self.vertices[(0)+(j+1)*stacks][3:6] = (self.vertices[(0)+(j+1)*stacks][3:6]+np.array(normal2))/2
#add vertices location into ebo
vl += [(i)+(j)*stacks,(0)+(j)*stacks, (0)+(j+1)*stacks]
elif i<stacks-1 and j==slices-1:
#calculating normal ([i][j],[i][0],[i+1][0])
vector1 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i)+(0)*stacks][0:3]
vector2 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i+1)+(0)*stacks][0:3]
normal1 = self.normalize(vector1,vector2)
self.vertices[(i)+(j)*stacks][3:6] = (self.vertices[(i)+(j)*stacks][3:6]+np.array(normal1))/2
self.vertices[(i)+(0)*stacks][3:6] = (self.vertices[(i)+(0)*stacks][3:6]+np.array(normal1))/2
self.vertices[(i+1)+(0)*stacks][3:6] = (self.vertices[(i+1)+(0)*stacks][3:6]+np.array(normal1))/2
#add vertices location into ebo
vl += [(i)+(j)*stacks,(i)+(0)*stacks, (i+1)+(0)*stacks]
#calculating normal ([i][j],[i+1][j],[i+1][0])
vector3 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i+1)+(j)*stacks][0:3]
vector4 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i+1)+(0)*stacks][0:3]
normal2 = self.normalize(vector3,vector4)
self.vertices[(i)+(j)*stacks][3:6] = (self.vertices[(i)+(j)*stacks][3:6]+np.array(normal2))/2
self.vertices[(i+1)+(j)*stacks][3:6] = (self.vertices[(i+1)+(j)*stacks][3:6]+np.array(normal2))/2
self.vertices[(i+1)+(0)*stacks][3:6] = (self.vertices[(i+1)+(0)*stacks][3:6]+np.array(normal2))/2
#add vertices location into ebo
vl += [(i)+(j)*stacks,(i+1)+(j)*stacks, (i+1)+(0)*stacks]
elif i==stacks-1 and j==slices-1:
#calculating normal ([i][j],[i][0],[0][0])
vector1 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i)+(0)*stacks][0:3]
vector2 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(0)+(0)*stacks][0:3]
normal1 = self.normalize(vector1,vector2)
self.vertices[(i)+(j)*stacks][3:6] = (self.vertices[(i)+(j)*stacks][3:6]+np.array(normal1))/2
self.vertices[(i)+(0)*stacks][3:6] = (self.vertices[(i)+(0)*stacks][3:6]+np.array(normal1))/2
self.vertices[(0)+(0)*stacks][3:6] = (self.vertices[(0)+(0)*stacks][3:6]+np.array(normal1))/2
#add vertices location into ebo
vl += [(i)+(j)*stacks,(i)+(0)*stacks, (0)+(0)*stacks]
#calculating normal ([i][j],[0][j],[0][0])
vector3 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(0)+(j)*stacks][0:3]
vector4 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(0)+(0)*stacks][0:3]
normal2 = self.normalize(vector3,vector4)
self.vertices[(i)+(j)*stacks][3:6] = (self.vertices[(i)+(j)*stacks][3:6]+np.array(normal2))/2
self.vertices[(0)+(j)*stacks][3:6] = (self.vertices[(0)+(j)*stacks][3:6]+np.array(normal2))/2
self.vertices[(0)+(0)*stacks][3:6] = (self.vertices[(0)+(0)*stacks][3:6]+np.array(normal2))/2
#add vertices location into ebo
vl += [(i)+(j)*stacks,(0)+(j)*stacks, (0)+(0)*stacks]
self.indices = np.array(vl)
#in toDo1, you will be asked to draw the mesh with EBO
#such as changing 'vbo.draw()' to 'ebo.draw()'
#To do that you need to change the vertives of the matrix and the indices to make it work
def draw(self):
self.vao.bind()
# TODO 1.1 is at here, switch from vbo to ebo
self.ebo.draw()
self.vao.unbind()
def initialize(self):
self.vao.bind()
self.vbo.setBuffer(self.vertices, 11)
self.ebo.setBuffer(self.indices)
self.vbo.setAttribPointer(self.shaderProg.getAttribLocation("vertexPos"),
stride=11, offset=0, attribSize=3)
self.vbo.setAttribPointer(self.shaderProg.getAttribLocation("vertexNormal"),
stride=11, offset=3, attribSize=3)
self.vbo.setAttribPointer(self.shaderProg.getAttribLocation("vertexColor"),
stride=11, offset=6, attribSize=3)
# TODO/BONUS 6.1 is at here, you need to set attribPointer for texture coordinates
# you should check the corresponding variable name in GLProgram and set the pointer
self.vao.unbind()"""
""" def generate(self, innerRadius=0.25, outerRadius=0.5, stacks=36, slices=36, color=ColorType.SOFTBLUE):
self.innerRadius = innerRadius
self.outerRadius = outerRadius
self.stacks = stacks
self.slices = slices
self.color = color
#color = ColorType.ColorType(0,0,0)
self.vertices = []
for i in range(stacks):
phi = i/(stacks)*2*2*math.pi #2*math.pi/nsides #i / (nsides - 1) * math.pi - math.pi/2
for j in range(slices):
theta = j/(slices)*2*2*math.pi
# =============================================================================
# r,g,b = color.getRGB()
# r+=0.001
# g+=0.001
# b+=0.001
# color = ColorType.ColorType(r,g,b)
# =============================================================================
self.vertices.append([(self.outerRadius + self.innerRadius * math.cos(theta)) * math.cos(phi),
(self.outerRadius + self.innerRadius * math.cos(theta)) * math.sin(phi),
self.innerRadius * math.sin(theta), 0,0,0,*color,0,0])
self.vertices = np.array(self.vertices)
vl = []
for i in range(stacks):
for j in range(slices):
if i<stacks-1 and j<slices-1:
#calculating normal ([i][j],[i][j+1],[i+1][j+1])
vector1 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i)+(j+1)*stacks][0:3]
vector2 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i+1)+(j+1)*stacks][0:3]
normal1 = self.normalize(vector1,vector2)
self.vertices[(i)+(j)*stacks][3:6] = normal1
self.vertices[(i)+(j+1)*stacks][3:6] = normal1
self.vertices[(i+1)+(j+1)*stacks][3:6] = normal1
#add vertices location into ebo
vl += [(i)+(j)*stacks,(i)+(j+1)*stacks, (i+1)+(j+1)*stacks]
#calculating normal ([i][j],[i+1][j],[i+1][j+1])
vector3 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i+1)+(j)*stacks][0:3]
vector4 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i+1)+(j+1)*stacks][0:3]
normal2 = self.normalize(vector3,vector4)
self.vertices[(i)+(j)*stacks][3:6] = normal2
self.vertices[(i+1)+(j)*stacks][3:6] = normal2
self.vertices[(i+1)+(j+1)*stacks][3:6] = normal2
#add vertices location into ebo
vl += [(i)+(j)*stacks,(i+1)+(j)*stacks, (i+1)+(j+1)*stacks]
elif i==stacks-1 and j<slices-1:
#calculating normal ([i][j],[i][j+1],[0][j+1])
vector1 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i)+(j+1)*stacks][0:3]
vector2 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(0)+(j+1)*stacks][0:3]
normal1 = self.normalize(vector1,vector2)
self.vertices[(i)+(j)*stacks][3:6] = normal1
self.vertices[(i)+(j+1)*stacks][3:6] = normal1
self.vertices[(0)+(j+1)*stacks][3:6] = normal1
#add vertices location into ebo
vl += [(i)+(j)*stacks,(i)+(j+1)*stacks, (0)+(j+1)*stacks]
#calculating normal ([i][j],[0][j],[0][j+1])
vector3 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(0)+(j)*stacks][0:3]
vector4 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(0)+(j+1)*stacks][0:3]
normal2 = self.normalize(vector3,vector4)
self.vertices[(i)+(j)*stacks][3:6] = normal2
self.vertices[(0)+(j)*stacks][3:6] = normal2
self.vertices[(0)+(j+1)*stacks][3:6] = normal2
#add vertices location into ebo
vl += [(i)+(j)*stacks,(0)+(j)*stacks, (0)+(j+1)*stacks]
elif i<stacks-1 and j==slices-1:
#calculating normal ([i][j],[i][0],[i+1][0])
vector1 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i)+(0)*stacks][0:3]
vector2 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i+1)+(0)*stacks][0:3]
normal1 = self.normalize(vector1,vector2)
self.vertices[(i)+(j)*stacks][3:6] = normal1
self.vertices[(i)+(0)*stacks][3:6] = normal1
self.vertices[(i+1)+(0)*stacks][3:6] = normal1
#add vertices location into ebo
vl += [(i)+(j)*stacks,(i)+(0)*stacks, (i+1)+(0)*stacks]
#calculating normal ([i][j],[i+1][j],[i+1][0])
vector3 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i+1)+(j)*stacks][0:3]
vector4 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i+1)+(0)*stacks][0:3]
normal2 = self.normalize(vector3,vector4)
self.vertices[(i)+(j)*stacks][3:6] = normal2
self.vertices[(i+1)+(j)*stacks][3:6] = normal2
self.vertices[(i+1)+(0)*stacks][3:6] = normal2
#add vertices location into ebo
vl += [(i)+(j)*stacks,(i+1)+(j)*stacks, (i+1)+(0)*stacks]
elif i==stacks-1 and j==slices-1:
#calculating normal ([i][j],[i][0],[0][0])
vector1 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i)+(0)*stacks][0:3]
vector2 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(0)+(0)*stacks][0:3]
normal1 = self.normalize(vector1,vector2)
self.vertices[(i)+(j)*stacks][3:6] = normal1
self.vertices[(i)+(0)*stacks][3:6] = normal1
self.vertices[(0)+(0)*stacks][3:6] = normal1
#add vertices location into ebo
vl += [(i)+(j)*stacks,(i)+(0)*stacks, (0)+(0)*stacks]
#calculating normal ([i][j],[0][j],[0][0])
vector3 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(0)+(j)*stacks][0:3]
vector4 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(0)+(0)*stacks][0:3]
normal2 = self.normalize(vector3,vector4)
self.vertices[(i)+(j)*stacks][3:6] = normal2
self.vertices[(0)+(j)*stacks][3:6] = normal2
self.vertices[(0)+(0)*stacks][3:6] = normal2
#add vertices location into ebo
vl += [(i)+(j)*stacks,(0)+(j)*stacks, (0)+(0)*stacks]
self.indices = np.array(vl)"""
""" def normalize(self,A,B):
v1 = [A[1]*B[2]-B[1]*A[2],-(A[0]*B[2]-B[0]*A[2]),A[0]*B[1]-B[0]*A[1]]
def NormalizeData(data):
return (data - np.min(data)) / (np.max(data) - np.min(data))
v1[0] = (v1[0]+1)/2
v1[1] = (v1[1]+1)/2
v1[2] = (v1[2]+1)/2
print(v1)
v1 = np.array(v1)
return NormalizeData(v1)"""
""" if ((renderingFlag >> 0 & 0x1) == 1){{
vec4 result = vec4(vColor, 1.0);
////////// TODO 3: Illuminate your meshes
// Requirements:
// Use the illumination equations we learned in the lecture to implement components for Diffuse,
// Specular, and Ambient. You’ll implement the missing part in the Fragment shader source code.
// This part will be implemented in OpenGL Shading Language. Your code should iterate through
// all lights in the Light array. //vec3 temp = light[i].position;
//for(int i=0; i<MAX_LIGHT_NUM; i+=1)
//vec4 result = light[1].color;
//for(int i; i<4;i+=1)
//vColor[i] *= (1.0+material.ambient[i]);
//vColor *= material.ambient
// vec4 result=vec4(
// vColor[0]*(1+material.ambient[0]),
// vColor[1]*(1+material.ambient[1]),
// vColor[2]*(1+material.ambient[2]),1.0);
// vec3 lightVector=vec3(
// light[0].position[0]-vPos[0],
// light[0].position[1]-vPos[1],
// light[0].position[2]-vPos[2]);
// float dot = (lightVector[0]*vNormal[0]+lightVector[1]*vNormal[1]+lightVector[2]*vNormal[2]);
// float left = sqrt(pow(lightVector[0],2.0)+pow(lightVector[1],2.0)+pow(lightVector[2],2.0));
// float right= sqrt(pow(vNormal[0],2.0) + pow(vNormal[1],2.0) + pow(vNormal[2],2.0));
// float angle = dot/(left*right);
// if(angle>0)
// vec4 result=vec4(
// vColor[0]*(material.diffuse[0]),
// vColor[1]*(material.diffuse[1]),
// vColor[2]*(material.diffuse[2]),1.0);
// if(angle<=0)
// vec4 result=vec4(0.0,0.0,0.0,1.0);
//vec4 result = material.ambient;
////////// TODO 4: Set up lights
// Requirements:
// * Use the Light struct which is defined above and the provided Light class to implement
// illumination equations for 3 different light sources: Point light, Infinite light,
// Spotlight with radial and angular attenuation
// * In the Sketch.py file Interrupt_keyboard method, bind keyboard interfaces that allows
// the user to toggle on/off specular, diffuse, and ambient with keys S, D, A.
results[ri] = result;
ri+=1;
}}"""
"""# =============================================================================
# self.vertices = np.zeros([36, 11])
# vl = np.array([
# # back face
# -length/2, -width/2, -height/2, 0.5, 0.5, 0, *color,
# -length/2, width/2, -height/2, 0.5, 0.5, 0, *color,
# length/2, width/2, -height/2, 0.5, 0.5, 0, *color,
# -length / 2, -width / 2, -height / 2, 0.5,0.5, 0, *color,
# length / 2, width / 2, -height / 2, 0.5,0.5, 0, *color,
# length/2, -width/2, -height/2, 0.5, 0.5, 0, *color,
# # front face
# -length/2, -width/2, height/2, 0.5, 0.5, 1, *color,
# length/2, -width/2, height/2, 0.5, 0.5, 1, *color,
# length/2, width/2, height/2, 0.5, 0.5, 1, *color,
# -length / 2, -width / 2, height / 2, 0.5, 0.5, 1, *color,
# length / 2, width / 2, height / 2, 0.5, 0.5, 1, *color,
# -length/2, width/2, height/2, 0.5, 0.5, 1, *color,
# # left face
# -length/2, -width/2, -height/2, 0, 0.5, 0.5, *color,
# -length/2, -width/2, height/2, 0, 0.5, 0.5, *color,
# -length/2, width/2, height/2, 0, 0.5, 0.5, *color,
# -length / 2, -width / 2, -height / 2, 0, 0.5, 0.5, *color,
# -length / 2, width / 2, height / 2, 0, 0.5, 0.5, *color,
# -length/2, width/2, -height/2, 0, 0.5, 0.5, *color,
# # right face
# length/2, -width/2, height/2, 1, 0.5, 0.5, *color,
# length/2, -width/2, -height/2, 1, 0.5, 0.5, *color,
# length/2, width/2, -height/2, 1, 0.5, 0.5, *color,
# length / 2, -width / 2, height / 2, 1, 0.5, 0.5, *color,
# length / 2, width / 2, -height / 2, 1, 0.5, 0.5, *color,
# length/2, width/2, height/2, 1, 0.5, 0.5, *color,
# # top face
# -length/2, width/2, height/2, 0.5, 1, 0.5, *color,
# length/2, width/2, height/2, 0.5, 1, 0.5, *color,
# length/2, width/2, -height/2, 0.5, 1, 0.5, *color,
# -length / 2, width / 2, height / 2, 0.5, 1, 0.5, *color,
# length / 2, width / 2, -height / 2, 0.5, 1, 0.5, *color,
# -length/2, width/2, -height/2, 0.5, 1, 0.5, *color,
# # bot face
# -length/2, -width/2, -height/2, 0.5, 0, 0.5, *color,
# length/2, -width/2, -height/2, 0.5, 0, 0.5, *color,
# length/2, -width/2, height/2, 0.5, 0, 0.5, *color,
# -length / 2, -width / 2, -height / 2, 0.5, 0, 0.5, *color,
# length / 2, -width / 2, height / 2, 0.5, 0, 0.5, *color,
# -length/2, -width/2, height/2, 0.5, 0, 0.5, *color,
# ]).reshape((36, 9))
# self.vertices[0:36, 0:9] = vl
# vl = []
# for i in range(36):
# vl.append(i)
# self.indices = np.array(vl)
# ============================================================================="""
"""for(int i=0;i<MAX_LIGHT_NUM;i++)
{{
if({self.attribs["light"]}[i].infiniteOn){{
vec3 infinite_light_vector = {self.attribs["light"]}[i].infiniteDirection - vPos;
float infinite_dot_product = dot(infinite_light_vector,vNormal);
if(infinite_dot_product>0){{
result+={self.attribs["light"]}[i].color
}}
}}
}}"""
"""
from Displayable import Displayable
from GLBuffer import VAO, VBO, EBO
import numpy as np
import ColorType
import math
try:
import OpenGL
try:
import OpenGL.GL as gl
import OpenGL.GLU as glu
except ImportError:
from ctypes import util
orig_util_find_library = util.find_library
def new_util_find_library(name):
res = orig_util_find_library(name)
if res:
return res
return '/System/Library/Frameworks/' + name + '.framework/' + name
util.find_library = new_util_find_library
import OpenGL.GL as gl
import OpenGL.GLU as glu
except ImportError:
raise ImportError("Required dependency PyOpenGL not present")
class DisplayableSphere(Displayable):
vao = None
vbo = None
ebo = None
shaderProg = None
vertices = None # array to store vertices information
indices = None # stores triangle indices to vertices
# stores current cube's information, read-only
radius = None
stacks = None
slices = None
color = None
def __init__(self, shaderProg, radius=1, stacks=18, slices=36, color=ColorType.BLUE):
super().__init__()
self.shaderProg = shaderProg
self.shaderProg.use()
#all classes used here are defined in GLBuffer
self.vao = VAO()
self.vbo = VBO() # vbo can only be initiate with glProgram activated
self.ebo = EBO()
self.generate(radius, stacks, slices, color)
#note: In the start code, we didn't use EBO to draw the triangle mesh but VBO only
#if it is just EBO data not given to OpenGL, try to combine all three vertices and treat it as a child
#Every three vertices used to define a triangle
#because we didn't use EBO
def normalize(self,A,B):
def unit(A):
length = math.sqrt(A[0]*A[0]+A[1]*A[1]+A[2]*A[2])
A[0] = A[0]/length
A[1] = A[1]/length
A[2] = A[2]/length
return A
v1 = [A[1]*B[2]-A[2]*B[1],A[2]*B[0]-A[0]*B[2],A[0]*B[1]-A[1]*B[0]]
v1 = unit(v1)
v1[0] = (v1[0]+1)/2
v1[1] = (v1[1]+1)/2
v1[2] = (v1[2]+1)/2
return np.array(v1)
def generate(self, radius=1, stacks=18, slices=36, color=None):
self.radius = radius
self.stacks = stacks
self.slices = slices
self.color = color
self.vertices = []
for i in range(stacks):
phi = i/(stacks - 1) * math.pi - math.pi/2 #0≤ϕ≤π
for j in range(slices):
theta = j/(slices-1)*2 * math.pi #0≤θ≤2π
a = math.cos(phi) * math.cos(theta)
b = math.cos(phi) * math.sin(theta)
c = math.sin(theta)
#texture coordinates generation
x = self.radius * math.cos(phi) * math.cos(theta)
y = self.radius * math.cos(phi) * math.sin(theta)
z = self.radius * math.sin(phi)
u = math.atan2(x, z) / (2*math.pi)
v = math.asin(y)/math.pi-0.5
self.vertices.append([x,y,z, a,b,c,*color,u,v])
self.vertices = np.array(self.vertices)
vl = []
for i in range(stacks):
for j in range(slices):
if i<stacks-1 and j<slices-1:
#calculating normal ([i][j],[i][j+1],[i+1][j+1])
vector1 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i)+(j+1)*stacks][0:3]#-self.vertices[(i)+(j)*stacks][0:3]
vector2 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i+1)+(j+1)*stacks][0:3]
normal1 = self.normalize(vector1,vector2)
self.vertices[(i)+(j)*stacks][3:6] = normal1
self.vertices[(i)+(j+1)*stacks][3:6] = normal1
#uv
#add vertices location into ebo
vl += [(i)+(j)*stacks,(i)+(j+1)*stacks, (i+1)+(j+1)*stacks]
#calculating normal ([i][j],[i+1][j],[i+1][j+1])
vector3 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i+1)+(j)*stacks][0:3]
vector4 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i+1)+(j+1)*stacks][0:3]
normal2 = self.normalize(vector3,vector4)
self.vertices[(i)+(j)*stacks][3:6] = normal2
#add vertices location into ebo
vl += [(i)+(j)*stacks,(i+1)+(j)*stacks, (i+1)+(j+1)*stacks]
elif i==stacks-1 and j<slices-1:
#calculating normal ([i][j],[i][j+1],[0][j+1])
vector1 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i)+(j+1)*stacks][0:3]
vector2 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(0)+(j+1)*stacks][0:3]
normal1 = self.normalize(vector1,vector2)
self.vertices[(i)+(j)*stacks][3:6] = normal1
self.vertices[(i)+(j+1)*stacks][3:6] = normal1
#add vertices location into ebo
vl += [(i)+(j)*stacks,(i)+(j+1)*stacks, (0)+(j+1)*stacks]
#calculating normal ([i][j],[0][j],[0][j+1])
vector3 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(0)+(j)*stacks][0:3]
vector4 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(0)+(j+1)*stacks][0:3]
normal2 = self.normalize(vector3,vector4)
self.vertices[(i)+(j)*stacks][3:6] = normal2
#add vertices location into ebo
vl += [(i)+(j)*stacks,(0)+(j)*stacks, (0)+(j+1)*stacks]
elif i<stacks-1 and j==slices-1:
#calculating normal ([i][j],[i][0],[i+1][0])
vector1 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i)+(0)*stacks][0:3]
vector2 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i+1)+(0)*stacks][0:3]
normal1 = self.normalize(vector1,vector2)
self.vertices[(i)+(j)*stacks][3:6] = normal1
#add vertices location into ebo
vl += [(i)+(j)*stacks,(i)+(0)*stacks, (i+1)+(0)*stacks]
#calculating normal ([i][j],[i+1][j],[i+1][0])
vector3 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i+1)+(j)*stacks][0:3]
vector4 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i+1)+(0)*stacks][0:3]
normal2 = self.normalize(vector3,vector4)
self.vertices[(i)+(j)*stacks][3:6] = normal2
#add vertices location into ebo
vl += [(i)+(j)*stacks,(i+1)+(j)*stacks, (i+1)+(0)*stacks]
elif i==stacks-1 and j==slices-1:
#calculating normal ([i][j],[i][0],[0][0])
vector1 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i)+(0)*stacks][0:3]
vector2 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(0)+(0)*stacks][0:3]
normal1 = self.normalize(vector1,vector2)
self.vertices[(i)+(j)*stacks][3:6] = normal1
#add vertices location into ebo
vl += [(i)+(j)*stacks,(i)+(0)*stacks, (0)+(0)*stacks]
#calculating normal ([i][j],[0][j],[0][0])
vector3 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(0)+(j)*stacks][0:3]
vector4 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(0)+(0)*stacks][0:3]
normal2 = self.normalize(vector3,vector4)
#self.vertices[(i)+(j)*stacks][3:6] = normal2
#add vertices location into ebo
vl += [(i)+(j)*stacks,(0)+(j)*stacks, (0)+(0)*stacks]
total = [0.67,0.45,0.9]
for i in range(slices):
self.vertices[(i)+(35)*stacks][3:6] = total
self.indices = np.array(vl)
#in toDo1, you will be asked to draw the mesh with EBO
#such as changing 'vbo.draw()' to 'ebo.draw()'
#To do that you need to change the vertives of the matrix and the indices to make it work
def draw(self):
self.vao.bind()
# TODO 1.1 is at here, switch from vbo to ebo
self.ebo.draw()
self.vao.unbind()
def initialize(self):
self.vao.bind()
self.vbo.setBuffer(self.vertices, 11)
self.ebo.setBuffer(self.indices)
self.vbo.setAttribPointer(self.shaderProg.getAttribLocation("vertexPos"),
stride=11, offset=0, attribSize=3)
self.vbo.setAttribPointer(self.shaderProg.getAttribLocation("vertexNormal"),
stride=11, offset=3, attribSize=3)
self.vbo.setAttribPointer(self.shaderProg.getAttribLocation("vertexColor"),
stride=11, offset=6, attribSize=3)
self.vbo.setAttribPointer(self.shaderProg.getAttribLocation("vertexTexture"),
stride=11, offset=9, attribSize=2)
# TODO/BONUS 6.1 is at here, you need to set attribPointer for texture coordinates
# you should check the corresponding variable name in GLProgram and set the pointer
self.vao.unbind()
"""
"""from Displayable import Displayable
from GLBuffer import VAO, VBO, EBO
from Point import Point
import numpy as np
import ColorType
import math
try:
import OpenGL
try:
import OpenGL.GL as gl
import OpenGL.GLU as glu
except ImportError:
from ctypes import util
orig_util_find_library = util.find_library
def new_util_find_library(name):
res = orig_util_find_library(name)
if res:
return res
return '/System/Library/Frameworks/' + name + '.framework/' + name
util.find_library = new_util_find_library
import OpenGL.GL as gl
import OpenGL.GLU as glu
except ImportError:
raise ImportError("Required dependency PyOpenGL not present")
##### TODO 6/BONUS 6: Texture Mapping
# Requirements:
# 1. Set up each object's vertex texture coordinates(2D) to the self.vertices 9:11 columns
# (i.e. the last two columns). Tell OpenGL how to interpret these two columns:
# you need to set up attribPointer in the Displayable object's initialize method.
# 2. Generate texture coordinates for the torus and sphere. Use “./assets/marble.jpg” for the torus and
# “./assets/earth.jpg” for the sphere as the texture image.
# There should be no seams in the resulting texture-mapped model.
class DisplayableTorus(Displayable):
vao = None
vbo = None
ebo = None
shaderProg = None
# stores current torus's information, read-only
nsides = 0
rings = 0
innerRadius = 0
outerRadius = 0
color = None
vertices = None
indices = None
def __init__(self, shaderProg, innerRadius=0.25, outerRadius=0.5, nsides=36, rings=36, color=ColorType.SOFTBLUE):
super(DisplayableTorus, self).__init__()
self.shaderProg = shaderProg
self.shaderProg.use()
self.vao = VAO()
self.vbo = VBO() # vbo can only be initiate with glProgram activated
self.ebo = EBO()
self.generate(innerRadius, outerRadius, nsides, rings, color)
def normalize(self,A,B):
def unit(A):
length = math.sqrt(A[0]*A[0]+A[1]*A[1]+A[2]*A[2])
A[0] = A[0]/length
A[1] = A[1]/length
A[2] = A[2]/length
return A
v1 = [A[1]*B[2]-A[2]*B[1],A[2]*B[0]-A[0]*B[2],A[0]*B[1]-A[1]*B[0]]
v1 = unit(v1)
v1[0] = (v1[0]+1)/2
v1[1] = (v1[1]+1)/2
v1[2] = (v1[2]+1)/2
return np.array(v1)
def generate(self, innerRadius=0.25, outerRadius=0.5, stacks=36, slices=36, color=ColorType.SOFTBLUE):
self.innerRadius = innerRadius
self.outerRadius = outerRadius
self.stacks = stacks
self.slices = slices
self.color = color
self.vertices = []
for i in range(stacks):
phi = i/(stacks)*2*2*math.pi #2*math.pi/nsides #i / (nsides - 1) * math.pi - math.pi/2
for j in range(slices):
theta = j/(slices)*2*2*math.pi
x = (self.outerRadius + self.innerRadius * math.cos(theta)) * math.sin(phi)
y = (self.outerRadius + self.innerRadius * math.cos(theta)) * math.cos(phi)
z = self.innerRadius * math.sin(theta)
u = math.atan2(x, z) / (2*math.pi) + 0.5
v = y*0.5 + 0.5
self.vertices.append([x,y,z, 0,0,0,*color,u,v])
self.vertices = np.array(self.vertices)
vl = []
for i in range(stacks):
for j in range(slices):
if i<stacks-1 and j<slices-1:
#calculating normal ([i][j],[i][j+1],[i+1][j+1])
vector1 = self.vertices[(i)+(j+1)*stacks][0:3]-self.vertices[(i)+(j)*stacks][0:3]
vector2 = self.vertices[(i+1)+(j+1)*stacks][0:3]-self.vertices[(i)+(j)*stacks][0:3]
normal1 = self.normalize(vector1,vector2)
self.vertices[(i)+(j)*stacks][3:6] = normal1
self.vertices[(i)+(j+1)*stacks][3:6] = normal1
#add vertices location into ebo
vl += [(i)+(j)*stacks,(i)+(j+1)*stacks, (i+1)+(j+1)*stacks]
#calculating normal ([i][j],[i+1][j],[i+1][j+1])
vector3 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i+1)+(j)*stacks][0:3]
vector4 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i+1)+(j+1)*stacks][0:3]
normal2 = self.normalize(vector3,vector4)
self.vertices[(i)+(j)*stacks][3:6] = normal2
#add vertices location into ebo
vl += [(i)+(j)*stacks,(i+1)+(j)*stacks, (i+1)+(j+1)*stacks]
elif i==stacks-1 and j<slices-1:
#calculating normal ([i][j],[i][j+1],[0][j+1])
vector1 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i)+(j+1)*stacks][0:3]
vector2 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(0)+(j+1)*stacks][0:3]
normal1 = self.normalize(vector1,vector2)
self.vertices[(i)+(j)*stacks][3:6] = normal1
self.vertices[(i)+(j+1)*stacks][3:6] = normal1
#add vertices location into ebo
vl += [(i)+(j)*stacks,(i)+(j+1)*stacks, (0)+(j+1)*stacks]
#calculating normal ([i][j],[0][j],[0][j+1])
vector3 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(0)+(j)*stacks][0:3]
vector4 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(0)+(j+1)*stacks][0:3]
normal2 = self.normalize(vector3,vector4)
self.vertices[(i)+(j)*stacks][3:6] = normal2
#add vertices location into ebo
vl += [(i)+(j)*stacks,(0)+(j)*stacks, (0)+(j+1)*stacks]
elif i<stacks-1 and j==slices-1:
#calculating normal ([i][j],[i][0],[i+1][0])
vector1 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i)+(0)*stacks][0:3]
vector2 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i+1)+(0)*stacks][0:3]
normal1 = self.normalize(vector1,vector2)
self.vertices[(i)+(j)*stacks][3:6] = normal1
#add vertices location into ebo
vl += [(i)+(j)*stacks,(i)+(0)*stacks, (i+1)+(0)*stacks]
#calculating normal ([i][j],[i+1][j],[i+1][0])
vector3 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i+1)+(j)*stacks][0:3]
vector4 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i+1)+(0)*stacks][0:3]
normal2 = self.normalize(vector3,vector4)
self.vertices[(i)+(j)*stacks][3:6] = normal2
#add vertices location into ebo
vl += [(i)+(j)*stacks,(i+1)+(j)*stacks, (i+1)+(0)*stacks]
elif i==stacks-1 and j==slices-1:
#calculating normal ([i][j],[i][0],[0][0])
vector1 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i)+(0)*stacks][0:3]
vector2 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(0)+(0)*stacks][0:3]
normal1 = self.normalize(vector1,vector2)
self.vertices[(i)+(j)*stacks][3:6] = normal1
#add vertices location into ebo
vl += [(i)+(j)*stacks,(i)+(0)*stacks, (0)+(0)*stacks]
#calculating normal ([i][j],[0][j],[0][0])
vector3 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(0)+(j)*stacks][0:3]
vector4 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(0)+(0)*stacks][0:3]
normal2 = self.normalize(vector3,vector4)
self.vertices[(i)+(j)*stacks][3:6] = normal2
#add vertices location into ebo
vl += [(i)+(j)*stacks,(0)+(j)*stacks, (0)+(0)*stacks]
self.indices = np.array(vl)
def draw(self):
self.vao.bind()
#self.vbo.draw()
self.ebo.draw()
self.vao.unbind()
def initialize(self):
self.vao.bind()
self.vbo.setBuffer(self.vertices, 11)
self.ebo.setBuffer(self.indices)
self.vbo.setAttribPointer(self.shaderProg.getAttribLocation("vertexPos"),
stride=11, offset=0, attribSize=3)
self.vbo.setAttribPointer(self.shaderProg.getAttribLocation("vertexNormal"),
stride=11, offset=3, attribSize=3)
self.vbo.setAttribPointer(self.shaderProg.getAttribLocation("vertexColor"),
stride=11, offset=6, attribSize=3)
self.vbo.setAttribPointer(self.shaderProg.getAttribLocation("vertexTexture"),
stride=11, offset=9, attribSize=2)
self.vao.unbind()
"""
# =============================================================================
# """
#
# Student Name: Haowei Li
# Student ID: U32332746
# Class: CS480
# Assignment Number: 4
# Due Date: Tuesday 12/07, 11:59 PM
# no collabrations
#
# """
#
# from Displayable import Displayable
# from GLBuffer import VAO, VBO, EBO
# from Point import Point
# import numpy as np
# import ColorType
# import math
# try:
# import OpenGL
#
# try:
# import OpenGL.GL as gl
# import OpenGL.GLU as glu
# except ImportError:
# from ctypes import util
#
# orig_util_find_library = util.find_library
#
#
# def new_util_find_library(name):
# res = orig_util_find_library(name)
# if res:
# return res
# return '/System/Library/Frameworks/' + name + '.framework/' + name
#
#
# util.find_library = new_util_find_library
# import OpenGL.GL as gl
# import OpenGL.GLU as glu
# except ImportError:
# raise ImportError("Required dependency PyOpenGL not present")
#
# ##### TODO 6/BONUS 6: Texture Mapping
# # Requirements:
# # 1. Set up each object's vertex texture coordinates(2D) to the self.vertices 9:11 columns
# # (i.e. the last two columns). Tell OpenGL how to interpret these two columns:
# # you need to set up attribPointer in the Displayable object's initialize method.
# # 2. Generate texture coordinates for the torus and sphere. Use “./assets/marble.jpg” for the torus and
# # “./assets/earth.jpg” for the sphere as the texture image.
# # There should be no seams in the resulting texture-mapped model.
#
# class DisplayableEllipsoid(Displayable):
# vao = None
# vbo = None
# ebo = None
# shaderProg = None
#
# # stores current torus's information, read-only
# nsides = 0
# rings = 0
# innerRadius = 0
# outerRadius = 0
# color = None
#
# vertices = None
# indices = None
#
# def __init__(self, shaderProg, a=0.25, b=0.5, c=0.25, stacks=36, slices=36, color=ColorType.SOFTBLUE):
# super(DisplayableEllipsoid, self).__init__()
# self.shaderProg = shaderProg
# self.shaderProg.use()
#
# self.vao = VAO()
# self.vbo = VBO() # vbo can only be initiate with glProgram activated
# self.ebo = EBO()
#
# self.generate(a, b, c, stacks, slices, color)
# def normalize(self,A,B):
# def unit(A):
# length = math.sqrt(A[0]*A[0]+A[1]*A[1]+A[2]*A[2])
# A[0] = A[0]/length
# A[1] = A[1]/length
# A[2] = A[2]/length
# return A
# v1 = [A[1]*B[2]-A[2]*B[1],A[2]*B[0]-A[0]*B[2],A[0]*B[1]-A[1]*B[0]]
# v1 = unit(v1)
# v1[0] = (v1[0]+1)/2
# v1[1] = (v1[1]+1)/2
# v1[2] = (v1[2]+1)/2
# return np.array(v1)
#
# def generate(self, a=0.25, b=0.5, c=0.25, stacks=36, slices=36, color=ColorType.SOFTBLUE):
# self.a = a
# self.b = b
# self.c = c
# self.stacks = stacks
# self.slices = slices
#
# self.vertices = []
# for i in range(stacks):
# theta = i/(stacks - 1) * math.pi - math.pi/2 #the stack range will be from -pi/2 to pi/2
# for j in range(slices):
# phi = j/(slices)*2 * 2*math.pi #the slice range will be from -pi to pi
# #it is the formula
# self.vertices.append([self.a * math.cos(theta) * math.cos(phi),
# self.b * math.cos(theta) * math.sin(phi),
# self.c * math.sin(theta), 0,0,0,*color,0,0])
# self.vertices = np.array(self.vertices)
# vl = []
# for i in range(stacks):
# for j in range(slices):
# if i<stacks-1 and j<slices-1:
# #calculating normal ([i][j],[i][j+1],[i+1][j+1])
# vector1 = self.vertices[(i)+(j+1)*stacks][0:3]-self.vertices[(i)+(j)*stacks][0:3]
# vector2 = self.vertices[(i+1)+(j+1)*stacks][0:3]-self.vertices[(i)+(j)*stacks][0:3]
# normal1 = self.normalize(vector1,vector2)
# self.vertices[(i)+(j)*stacks][3:6] = normal1
# self.vertices[(i)+(j+1)*stacks][3:6] = normal1
# #add vertices location into ebo
# vl += [(i)+(j)*stacks,(i)+(j+1)*stacks, (i+1)+(j+1)*stacks]
#
# #calculating normal ([i][j],[i+1][j],[i+1][j+1])
# vector3 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i+1)+(j)*stacks][0:3]
# vector4 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i+1)+(j+1)*stacks][0:3]
# normal2 = self.normalize(vector3,vector4)
# self.vertices[(i)+(j)*stacks][3:6] = normal2
# #add vertices location into ebo
# vl += [(i)+(j)*stacks,(i+1)+(j)*stacks, (i+1)+(j+1)*stacks]
# elif i==stacks-1 and j<slices-1:
# #calculating normal ([i][j],[i][j+1],[0][j+1])
# vector1 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i)+(j+1)*stacks][0:3]
# vector2 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(0)+(j+1)*stacks][0:3]
# normal1 = self.normalize(vector1,vector2)
# self.vertices[(i)+(j)*stacks][3:6] = normal1
# self.vertices[(i)+(j+1)*stacks][3:6] = normal1
# #add vertices location into ebo
# vl += [(i)+(j)*stacks,(i)+(j+1)*stacks, (0)+(j+1)*stacks]
#
# #calculating normal ([i][j],[0][j],[0][j+1])
# vector3 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(0)+(j)*stacks][0:3]
# vector4 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(0)+(j+1)*stacks][0:3]
# normal2 = self.normalize(vector3,vector4)
# self.vertices[(i)+(j)*stacks][3:6] = normal2
# #add vertices location into ebo
# vl += [(i)+(j)*stacks,(0)+(j)*stacks, (0)+(j+1)*stacks]
# elif i<stacks-1 and j==slices-1:
# #calculating normal ([i][j],[i][0],[i+1][0])
# vector1 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i)+(0)*stacks][0:3]
# vector2 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i+1)+(0)*stacks][0:3]
# normal1 = self.normalize(vector1,vector2)
# self.vertices[(i)+(j)*stacks][3:6] = normal1
# #add vertices location into ebo
# vl += [(i)+(j)*stacks,(i)+(0)*stacks, (i+1)+(0)*stacks]
#
# #calculating normal ([i][j],[i+1][j],[i+1][0])
# vector3 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i+1)+(j)*stacks][0:3]
# vector4 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i+1)+(0)*stacks][0:3]
# normal2 = self.normalize(vector3,vector4)
# self.vertices[(i)+(j)*stacks][3:6] = normal2
# #add vertices location into ebo
# vl += [(i)+(j)*stacks,(i+1)+(j)*stacks, (i+1)+(0)*stacks]
# elif i==stacks-1 and j==slices-1:
# #calculating normal ([i][j],[i][0],[0][0])
# vector1 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(i)+(0)*stacks][0:3]
# vector2 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(0)+(0)*stacks][0:3]
# normal1 = self.normalize(vector1,vector2)
# self.vertices[(i)+(j)*stacks][3:6] = normal1
# #add vertices location into ebo
# vl += [(i)+(j)*stacks,(i)+(0)*stacks, (0)+(0)*stacks]
#
# #calculating normal ([i][j],[0][j],[0][0])
# vector3 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(0)+(j)*stacks][0:3]
# vector4 = self.vertices[(i)+(j)*stacks][0:3]-self.vertices[(0)+(0)*stacks][0:3]
# normal2 = self.normalize(vector3,vector4)
# self.vertices[(i)+(j)*stacks][3:6] = normal2
# #add vertices location into ebo
# vl += [(i)+(j)*stacks,(0)+(j)*stacks, (0)+(0)*stacks]
# total = [0.67,0.45,0.9]
# for i in range(slices):
# self.vertices[(i)+(35)*stacks][3:6] = total
# self.indices = np.array(vl)
#
# def draw(self):
# self.vao.bind()
# #self.vbo.draw()
# self.ebo.draw()
# self.vao.unbind()
#
# def initialize(self):
# """
# Remember to bind VAO before this initialization. If VAO is not bind, program might throw an error
# in systems which don't enable a default VAO after GLProgram compilation
# """
# self.vao.bind()
# self.vbo.setBuffer(self.vertices, 11)
# self.ebo.setBuffer(self.indices)
#
# self.vbo.setAttribPointer(self.shaderProg.getAttribLocation("vertexPos"),
# stride=11, offset=0, attribSize=3)
# self.vbo.setAttribPointer(self.shaderProg.getAttribLocation("vertexNormal"),
# stride=11, offset=3, attribSize=3)
# self.vbo.setAttribPointer(self.shaderProg.getAttribLocation("vertexColor"),
# stride=11, offset=6, attribSize=3)
#
# self.vao.unbind()
#
# =============================================================================
| 48.76827 | 139 | 0.491918 | 10,580 | 78,078 | 3.613611 | 0.041399 | 0.106089 | 0.073786 | 0.055294 | 0.91413 | 0.901392 | 0.897808 | 0.889255 | 0.87929 | 0.876151 | 0 | 0.063062 | 0.333846 | 78,078 | 1,600 | 140 | 48.79875 | 0.671922 | 0.123044 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0.00875 | null | 1 | null | true | 0 | 0 | null | null | null | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
2eff55ffc51e9a40570ef042662a4d866cdeb9a5 | 14,958 | py | Python | 03/solve.py | OscarDahlqvist/aoc2020 | 5724a7cd975bf93be6f00052d2308118507a7e24 | [
"Unlicense"
] | null | null | null | 03/solve.py | OscarDahlqvist/aoc2020 | 5724a7cd975bf93be6f00052d2308118507a7e24 | [
"Unlicense"
] | null | null | null | 03/solve.py | OscarDahlqvist/aoc2020 | 5724a7cd975bf93be6f00052d2308118507a7e24 | [
"Unlicense"
] | null | null | null | class RepArr:
def __getitem__(self, key):
return self.content[key%len(self.content)]
def out(self,int):
return self.content*int
def __init__(self, array):
self.content = array
def __str__(self):
return str(self.content*(self.printrep))
def travel(arr,dx,dy):
x = 0
y = 0
trees = 0
while y < len(arr)-1:
x+=dx
y+=dy
if(arr[y][x] == "#"):
trees+=1
return trees
s1 = [
RepArr("..##......."),
RepArr("#...#...#.."),
RepArr(".#....#..#."),
RepArr("..#.#...#.#"),
RepArr(".#...##..#."),
RepArr("..#.##....."),
RepArr(".#.#.#....#"),
RepArr(".#........#"),
RepArr("#.##...#..."),
RepArr("#...##....#"),
RepArr(".#..#...#.#")]
s2 = [
RepArr(".........#....#.###.........##."),
RepArr("..###.#......#......#.......##."),
RepArr("##....#.#.......#.....#........"),
RepArr("#........#..........#.#...#...#"),
RepArr("#....###...##.....#........#..."),
RepArr("###..............##..#.....#..."),
RepArr(".................##.#.........."),
RepArr(".........##......#..###.....#.#"),
RepArr("..#..#...#.#.#...#.#.#.##...#.."),
RepArr("..............#.#.#..#..#..#..."),
RepArr(".#.#.#....#.........#.........#"),
RepArr("..#.#....##..#...#.....#..##..#"),
RepArr("............#.....#.........##."),
RepArr("...#.#..#..........#.##.....#.."),
RepArr("#......#...##.......###........"),
RepArr(".....#....#.#..............#..."),
RepArr(".....#.......#..##.###.....#.#."),
RepArr(".#.....#....##.#......##......#"),
RepArr("..##...##.........#..#.#..#...."),
RepArr("............#.......#.....#...."),
RepArr(".......................#...####"),
RepArr(".#.#.......#..#....#....##..#.#"),
RepArr("..#.##.#.#...............#....."),
RepArr("#..##..#...#.....##..#...##.#.."),
RepArr("##...#....#####.....##...#...##"),
RepArr(".#..##..#..#.#..##.#.#........#"),
RepArr("....#..#........##......#.#...."),
RepArr("..#......#...##.#..##.......#.."),
RepArr(".#.#....#.#..#.....#..#...#...."),
RepArr(".....#.#.................#....."),
RepArr("##.#........#.....#...........#"),
RepArr("#............#.....#..#.#...##."),
RepArr("..#.#..#......#.......#......##"),
RepArr("....#.#....#...#....#.........."),
RepArr(".........#...#.##..#...#...#..."),
RepArr("....#...#...#.................."),
RepArr("..##...#.#....#...#......#....."),
RepArr("#....#.......##..#...#..#......"),
RepArr(".#....##..#.#....#...##...#...."),
RepArr("#.................#...#.#...#.."),
RepArr(".#.....#..........#.......#...."),
RepArr(".#..........#.##....#.##......#"),
RepArr("#.#.....##.##..#.......#..#...."),
RepArr(".....#...#............#..##...."),
RepArr("...#.#.##.#..........#.#....#.."),
RepArr(".......#...#............#.....#"),
RepArr("..........#...##..#....###....#"),
RepArr("............#....#......###...."),
RepArr("...................####..#.##.."),
RepArr("...#.#.##.........#..#.#......."),
RepArr("...........#.........#..###...."),
RepArr(".........#.........#...#...###."),
RepArr(".#.#.##....#.#...........#.#..."),
RepArr("..###.....#...#.#.......##..#.."),
RepArr(".....#.#........#.#....#....##."),
RepArr("......#...#........#.........#."),
RepArr("...............#.........#.#..."),
RepArr("..#...#...#...#.###..###....#.."),
RepArr("#..#.......#..###.##.......#..."),
RepArr("#.#.........##..#.....###..#..#"),
RepArr("...#....#....#.#..#............"),
RepArr("..###..##....................#."),
RepArr("..#.......#..........#.##......"),
RepArr("..##........#...###..##.#......"),
RepArr("......#.#...#.....#..##..#....."),
RepArr("#........#......#.............."),
RepArr("........#........#.......#....#"),
RepArr(".....#.......#......#........##"),
RepArr("#.#......#.#...##.#.......#...."),
RepArr("#...................##...#....."),
RepArr("..#.#...#..#...#..#.....#..#..."),
RepArr(".......##..................##.."),
RepArr(".............#..##.#......##..#"),
RepArr("###...........##.#....###..#..."),
RepArr(".#..........##...#..#......#..."),
RepArr("..#.###.#....#........#........"),
RepArr("....#....###.....#.......#....."),
RepArr(".....##....#..##...#..#........"),
RepArr(".##...#..#....#..#.........#..."),
RepArr("#.........##....#..##..##......"),
RepArr(".#.#.............#.....##......"),
RepArr("..#.#............#.......##.#.."),
RepArr("..#.##..#.........#......#.#.#."),
RepArr(".#...#...#..#....#...#....#.#.#"),
RepArr("....#...#..#.##..##.......##..."),
RepArr(".#.....#.....#............#...."),
RepArr("..........#....#..#..#......#.."),
RepArr(".............#....#..#........."),
RepArr("....#.#.#.......#....#.#......."),
RepArr("..##....#.#....#...#........###"),
RepArr("#...#..........#..........###.."),
RepArr("...#..#...#...#..##......#...#."),
RepArr(".....................#...#..#.#"),
RepArr("#..#............#.........#.##."),
RepArr("..#...#...........#.......#...."),
RepArr(".....##..........#...##.....##."),
RepArr(".#.....#.#........##..........."),
RepArr("..#....#..#.#..##...#.........#"),
RepArr(".........#.###.##....#..###...."),
RepArr(".........#...##...##.#.#....##."),
RepArr("...#..##.#...........#....#...."),
RepArr("..........#.#...........##....."),
RepArr("...........#..........#...##..."),
RepArr(".........#..........#...#.#...#"),
RepArr("......#..#.................#..."),
RepArr(".....#...........#..#...#..###."),
RepArr(".....#..#....#.#.##...##....##."),
RepArr("...##.###.#.#..#.#....##.#.#..."),
RepArr("###.....#.....#........#...#..."),
RepArr(".#....#........#.#....#..#...##"),
RepArr("##.....#.....#......#.#..#...##"),
RepArr(".##....#...............#......."),
RepArr("#.#.....#.#....#.........#....."),
RepArr("..#...............#.......##..."),
RepArr("#...#.###..#....#.#.#..#.#....."),
RepArr("##.###....##...#....#.....#...."),
RepArr(".......#................##....."),
RepArr("....#....##..#....#..#......#.."),
RepArr("...#.........#...#........##.##"),
RepArr(".#..............#.............."),
RepArr("..##.......#.###..##.#........."),
RepArr("..#...#...#...#...#...#.....##."),
RepArr(".....#..##...#.....##..#.#....."),
RepArr("..#.............#...#.........#"),
RepArr("#.........................#..##"),
RepArr(".............#..###........#..."),
RepArr("......#..#....#.##.......#..#.."),
RepArr("...#..#..#...#....#..#...##...#"),
RepArr(".##............#.......###.#..."),
RepArr(".#........#..#................."),
RepArr("#.#.#.....##....##...#.....#.#."),
RepArr("...##.......#.#......#...#.#..."),
RepArr("#.##....#.........#.....##...#."),
RepArr("#...#..#....#.......#.##...##.."),
RepArr(".................##.#..##.#.#.#"),
RepArr("..#.............#.......#.#.##."),
RepArr("#....##..................#...##"),
RepArr("..........#.......#..##........"),
RepArr("......#.#..#......#.#.........#"),
RepArr("#.#........#####......#.#.#...."),
RepArr("#..#........#.#..#.....#......."),
RepArr("...#.............#............."),
RepArr(".....#.......#......#..#.##..#."),
RepArr("..#.........#..........#.##...#"),
RepArr("#.....#.#####......#.......###."),
RepArr(".......#.....#...#.....#.#..#.."),
RepArr("#...#.#........#.#..#..#...#..#"),
RepArr("...#....#....##.....#.........."),
RepArr(".#.......##.......##..........."),
RepArr("...#.##.#.#..#....#...##....##."),
RepArr(".#...#...#.........#..........."),
RepArr(".#.#.##..#.......#.#...#..#...."),
RepArr(".#....##.#.#...#......#......#."),
RepArr("##..#..#..#..#.......#......#.."),
RepArr(".........#.#...........#....#.#"),
RepArr("........#....#.#...#.#..#......"),
RepArr("#.......#.#.................##."),
RepArr(".....#..#..#....#.#........#.##"),
RepArr(".#..###..#....#..#........#.#.."),
RepArr("#...........#...#........#....."),
RepArr("........#..#.#.#.#.......#....#"),
RepArr("....#..#..........#.#..#.....#."),
RepArr("..####..........#.............."),
RepArr("....###.#..#........##..#......"),
RepArr(".#..#......##..........#...#..."),
RepArr(".#.....#....#......##.##...#.##"),
RepArr("..##.#.#......#.......##......."),
RepArr("....##.......#..............#.."),
RepArr("........#.....##..............#"),
RepArr(".#...#....##.....#....#.......#"),
RepArr("....#.......###.......#.#.#...."),
RepArr("##.....##........#.....##......"),
RepArr("..........#.....#...##.#..#.#.."),
RepArr("..........#.#......#..........#"),
RepArr("..........#...#..#...#...#....."),
RepArr(".#.......#..##................."),
RepArr(".#........##..............#..#."),
RepArr(".##...................#...#...."),
RepArr(".##....#.##.##........#........"),
RepArr("...##.....####.....#..#.......#"),
RepArr("...##.#...##...#.##............"),
RepArr("##.......#.....###..#..#...##.."),
RepArr("#.####...#...#...##..#..#....#."),
RepArr("...#........##........#........"),
RepArr("#....#.#....##..#..#.##...#...."),
RepArr("...##....##....#.......#..###.."),
RepArr("..........#..#..........#..#.#."),
RepArr("#..#....#.......#.......#....#."),
RepArr("......#......#.....##..##.#..#."),
RepArr("##.#.....#....#.......#...#...#"),
RepArr("..##..#.#...#...#.....###..##.."),
RepArr("....#..#.......#............##."),
RepArr("#..##.#.#.....#####....#....#.."),
RepArr(".#........#...#.#..##.#.####.#."),
RepArr("#...#...#.............#.#......"),
RepArr(".........#.....##..........#..."),
RepArr(".##....#....#........#......#.#"),
RepArr("#..###...#....#..........#....."),
RepArr(".#...##.........#..#..#.#...#.."),
RepArr("#.#.#.......................#.."),
RepArr("#.....#..#.#............###...."),
RepArr("#...#.....#.....###..#..#.#.##."),
RepArr("............#.........#.#.##..."),
RepArr("...#.......###......##......#.."),
RepArr(".#....#.#....##......##.#...#.."),
RepArr(".........#.......#....#...##..#"),
RepArr("................#.#.....#....#."),
RepArr(".##......#....#..#..###..#...#."),
RepArr("....##....#..#....#.##..#......"),
RepArr(".......#.#.....#..#............"),
RepArr("..........#....#....#..#..#...."),
RepArr("..#....#.....#.......#........."),
RepArr("......#.........#.##..#....##.#"),
RepArr("..#..#.#.......##..#...##......"),
RepArr("...##..#.#.#...............##.."),
RepArr("..#.#.#......#....#.....#.##..."),
RepArr("..#.....#.#...........#....##.."),
RepArr("###.....##....................."),
RepArr(".......#..#.................#.."),
RepArr(".#.#..#..#.........#......#...#"),
RepArr("##.......#.##.......#.........."),
RepArr("#..#.....#.....#.....#.......#."),
RepArr("#..#.....#.....#..........#.#.."),
RepArr(".#....##....#.....#.......#.##."),
RepArr(".....#.#......##..##.#........."),
RepArr("#....##......#..#....#..##..#.."),
RepArr("#.##..#..#..............#...#.."),
RepArr(".#......#......#..#...........#"),
RepArr("..#.......#........#....#..#..."),
RepArr(".....##.#.......##....#.#....#."),
RepArr("........#....................#."),
RepArr("........#..#..........#........"),
RepArr("......#.#.....#.#.....#......#."),
RepArr("#......##......###.##......#..."),
RepArr("...........###..#...#.......#.."),
RepArr("..#...###...#.....#....#...#..#"),
RepArr(".....##......#.#......##..#.#.."),
RepArr("#.#......##...#.....##...#...#."),
RepArr(".#.#........#.......#.........#"),
RepArr("....#....#...##..........#.#..."),
RepArr(".#..##.#...#.#.....##......##.."),
RepArr(".#.....#..##....#....#....#..#."),
RepArr("..#.......#.#.#..........#..#.."),
RepArr("#.#..#....#.##....#.......#...."),
RepArr("........##.........#..#.#......"),
RepArr(".......#.....#.##..##......#.#."),
RepArr(".........................#.#.#."),
RepArr("..#..............##.........#.."),
RepArr(".......###.#.#.......#........."),
RepArr("#........#.....#.......#..#...#"),
RepArr("##....#..#....#...........#...."),
RepArr("..#..#.#.#.....#.#..#....#....."),
RepArr(".#..##....#.##..#.............."),
RepArr("...#....##..#..#.##....#.#....."),
RepArr("...##....#......##..#........#."),
RepArr("....#......#....#....#........#"),
RepArr("...#..#...#.#...........#..#..#"),
RepArr("....#.#.#.........#...#...#...."),
RepArr("..........#....#......##....#.#"),
RepArr("..##..#...##.#...###.#.##......"),
RepArr("#........#.##......##.#........"),
RepArr("..#...#.##...#..........#.#...#"),
RepArr("...........#...........#......."),
RepArr("......###....#..###..##........"),
RepArr("...#........#..#.#............."),
RepArr("....#.#.....#.#............#..#"),
RepArr("##.#.....#........#....##.....#"),
RepArr(".......#.#...#..##.......#.#.#."),
RepArr("#......##..#..#...#.....#..#.#."),
RepArr(".#......###.....#..#.....#...#."),
RepArr("....#.#.............#.##......."),
RepArr("......#....#.....#.......#..#.."),
RepArr("#..#.#.#..#......#...#..#.#...."),
RepArr("#..............#.#....#...#...."),
RepArr("..#......#...##.#......#..#..#."),
RepArr(".......##..#.##..#.#...#.....##"),
RepArr(".....#...........#....#.......#"),
RepArr(".#.........#..#..........##...."),
RepArr("#..##..#.#......##.......#..#.."),
RepArr("...#....#...........##.#.#.#..#"),
RepArr("#..#..#..#...........#....#.#.#"),
RepArr(".....##......#......#.#...#...."),
RepArr(".....#..##....###.....#....##.."),
RepArr("........#...##......#.....#..#."),
RepArr("..#.#..#.#....#...#.......#...."),
RepArr("#.....#...#.....#.#.......#...."),
RepArr("......#...#.......#..##....#..."),
RepArr("#............#.....#....#......"),
RepArr("..##...#.....#..#......#...#..."),
RepArr("...#..#...#..#.......#........#"),
RepArr("...##.#.#........#........#...."),
RepArr("#.#..#......##.#..#..#......#.."),
RepArr("#.......#..#..................."),
RepArr("#.....#....#......#...........#"),
RepArr(".##.#...#.#...#..............##"),
RepArr("...###........#........#..##.#."),
RepArr("..##....#.#.#.##..#.#......#..."),
RepArr("..#.#........#..............#.."),
RepArr(".......#.................##...."),
RepArr("..................#............"),
RepArr("....#.....#.#..............#.##"),
RepArr("......#.....#..#......#...#...."),
RepArr("..#....##......#...####....#.#."),
RepArr("..........#...##...........##.#"),
RepArr("...#.#..#....#......#..#....#.."),
RepArr("#.........###...#.....#..#....#"),
RepArr(".#.#......##.#.....#..........."),
RepArr("...............#.#....##..#..#."),
RepArr("..........#.#.#.#...#....##...#"),
RepArr("...#....##.................##.."),
RepArr("#..##..#...##.##.#......#.#.###"),
RepArr("#..#...#..#.....#...#.#..##...#"),
RepArr("..#................#...##....#."),
RepArr("...#.....#.##.......##....#.#.."),
RepArr("....#.....#..#....##..........."),
RepArr("...............#..........#...."),
RepArr("....#...#........##...#........"),
RepArr("...#....#...#.###.............."),
RepArr("#.#....#.......#..#.##.##......"),
RepArr(".#.....#..#..#......#....#.#..."),
RepArr("...#..........................#"),
RepArr("............#.#..#.##......#..."),
RepArr(".....#..........#.#........#.#.")
]
| 41.434903 | 50 | 0.150956 | 401 | 14,958 | 5.600998 | 0.069825 | 1.77382 | 2.644702 | 3.504898 | 0.892253 | 0.892253 | 0.892253 | 0.892253 | 0.892253 | 0.892253 | 0 | 0.000495 | 0.055288 | 14,958 | 360 | 51 | 41.55 | 0.158446 | 0 | 0 | 0 | 0 | 0 | 0.677564 | 0.669408 | 0 | 0 | 0 | 0 | 0 | 1 | 0.014045 | false | 0 | 0 | 0.008427 | 0.02809 | 0.002809 | 0 | 0 | 0 | null | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12 |
d33301a0facdfde5afb843b25b378ac103562699 | 37,905 | py | Python | pyboto3/dlm.py | gehad-shaat/pyboto3 | 4a0c2851a8bc04fb1c71c36086f7bb257e48181d | [
"MIT"
] | 91 | 2016-12-31T11:38:37.000Z | 2021-09-16T19:33:23.000Z | pyboto3/dlm.py | gehad-shaat/pyboto3 | 4a0c2851a8bc04fb1c71c36086f7bb257e48181d | [
"MIT"
] | 7 | 2017-01-02T18:54:23.000Z | 2020-08-11T13:54:02.000Z | pyboto3/dlm.py | gehad-shaat/pyboto3 | 4a0c2851a8bc04fb1c71c36086f7bb257e48181d | [
"MIT"
] | 26 | 2016-12-31T13:11:00.000Z | 2022-03-03T21:01:12.000Z | '''
The MIT License (MIT)
Copyright (c) 2016 WavyCloud
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
'''
def can_paginate(operation_name=None):
"""
Check if an operation can be paginated.
:type operation_name: string
:param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo').
"""
pass
def create_lifecycle_policy(ExecutionRoleArn=None, Description=None, State=None, PolicyDetails=None, Tags=None):
"""
Creates a policy to manage the lifecycle of the specified AWS resources. You can create up to 100 lifecycle policies.
See also: AWS API Documentation
Exceptions
:example: response = client.create_lifecycle_policy(
ExecutionRoleArn='string',
Description='string',
State='ENABLED'|'DISABLED',
PolicyDetails={
'PolicyType': 'EBS_SNAPSHOT_MANAGEMENT',
'ResourceTypes': [
'VOLUME'|'INSTANCE',
],
'TargetTags': [
{
'Key': 'string',
'Value': 'string'
},
],
'Schedules': [
{
'Name': 'string',
'CopyTags': True|False,
'TagsToAdd': [
{
'Key': 'string',
'Value': 'string'
},
],
'VariableTags': [
{
'Key': 'string',
'Value': 'string'
},
],
'CreateRule': {
'Interval': 123,
'IntervalUnit': 'HOURS',
'Times': [
'string',
],
'CronExpression': 'string'
},
'RetainRule': {
'Count': 123,
'Interval': 123,
'IntervalUnit': 'DAYS'|'WEEKS'|'MONTHS'|'YEARS'
},
'FastRestoreRule': {
'Count': 123,
'Interval': 123,
'IntervalUnit': 'DAYS'|'WEEKS'|'MONTHS'|'YEARS',
'AvailabilityZones': [
'string',
]
},
'CrossRegionCopyRules': [
{
'TargetRegion': 'string',
'Encrypted': True|False,
'CmkArn': 'string',
'CopyTags': True|False,
'RetainRule': {
'Interval': 123,
'IntervalUnit': 'DAYS'|'WEEKS'|'MONTHS'|'YEARS'
}
},
]
},
],
'Parameters': {
'ExcludeBootVolume': True|False
}
},
Tags={
'string': 'string'
}
)
:type ExecutionRoleArn: string
:param ExecutionRoleArn: [REQUIRED]\nThe Amazon Resource Name (ARN) of the IAM role used to run the operations specified by the lifecycle policy.\n
:type Description: string
:param Description: [REQUIRED]\nA description of the lifecycle policy. The characters ^[0-9A-Za-z _-]+$ are supported.\n
:type State: string
:param State: [REQUIRED]\nThe desired activation state of the lifecycle policy after creation.\n
:type PolicyDetails: dict
:param PolicyDetails: [REQUIRED]\nThe configuration details of the lifecycle policy.\n\nPolicyType (string) --The valid target resource types and actions a policy can manage. The default is EBS_SNAPSHOT_MANAGEMENT.\n\nResourceTypes (list) --The resource type. Use VOLUME to create snapshots of individual volumes or use INSTANCE to create multi-volume snapshots from the volumes for an instance.\n\n(string) --\n\n\nTargetTags (list) --The single tag that identifies targeted resources for this policy.\n\n(dict) --Specifies a tag for a resource.\n\nKey (string) -- [REQUIRED]The tag key.\n\nValue (string) -- [REQUIRED]The tag value.\n\n\n\n\n\nSchedules (list) --The schedule of policy-defined actions.\n\n(dict) --Specifies a backup schedule.\n\nName (string) --The name of the schedule.\n\nCopyTags (boolean) --Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.\n\nTagsToAdd (list) --The tags to apply to policy-created resources. These user-defined tags are in addition to the AWS-added lifecycle tags.\n\n(dict) --Specifies a tag for a resource.\n\nKey (string) -- [REQUIRED]The tag key.\n\nValue (string) -- [REQUIRED]The tag value.\n\n\n\n\n\nVariableTags (list) --A collection of key/value pairs with values determined dynamically when the policy is executed. Keys may be any valid Amazon EC2 tag key. Values must be in one of the two following formats: $(instance-id) or $(timestamp) . Variable tags are only valid for EBS Snapshot Management \xe2\x80\x93 Instance policies.\n\n(dict) --Specifies a tag for a resource.\n\nKey (string) -- [REQUIRED]The tag key.\n\nValue (string) -- [REQUIRED]The tag value.\n\n\n\n\n\nCreateRule (dict) --The creation rule.\n\nInterval (integer) --The interval between snapshots. The supported values are 1, 2, 3, 4, 6, 8, 12, and 24.\n\nIntervalUnit (string) --The interval unit.\n\nTimes (list) --The time, in UTC, to start the operation. The supported format is hh:mm.\nThe operation occurs within a one-hour window following the specified time. If you do not specify a time, Amazon DLM selects a time within the next 24 hours.\n\n(string) --\n\n\nCronExpression (string) --The schedule, as a Cron expression. The schedule interval must be between 1 hour and 1 year. For more information, see Cron expressions in the Amazon CloudWatch User Guide .\n\n\n\nRetainRule (dict) --The retention rule.\n\nCount (integer) --The number of snapshots to retain for each volume, up to a maximum of 1000.\n\nInterval (integer) --The amount of time to retain each snapshot. The maximum is 100 years. This is equivalent to 1200 months, 5200 weeks, or 36500 days.\n\nIntervalUnit (string) --The unit of time for time-based retention.\n\n\n\nFastRestoreRule (dict) --The rule for enabling fast snapshot restore.\n\nCount (integer) --The number of snapshots to be enabled with fast snapshot restore.\n\nInterval (integer) --The amount of time to enable fast snapshot restore. The maximum is 100 years. This is equivalent to 1200 months, 5200 weeks, or 36500 days.\n\nIntervalUnit (string) --The unit of time for enabling fast snapshot restore.\n\nAvailabilityZones (list) -- [REQUIRED]The Availability Zones in which to enable fast snapshot restore.\n\n(string) --\n\n\n\n\nCrossRegionCopyRules (list) --The rule for cross-Region snapshot copies.\n\n(dict) --Specifies a rule for cross-Region snapshot copies.\n\nTargetRegion (string) -- [REQUIRED]The target Region.\n\nEncrypted (boolean) -- [REQUIRED]To encrypt a copy of an unencrypted snapshot if encryption by default is not enabled, enable encryption using this parameter. Copies of encrypted snapshots are encrypted, even if this parameter is false or if encryption by default is not enabled.\n\nCmkArn (string) --The Amazon Resource Name (ARN) of the AWS KMS customer master key (CMK) to use for EBS encryption. If this parameter is not specified, your AWS managed CMK for EBS is used.\n\nCopyTags (boolean) --Copy all user-defined tags from the source snapshot to the copied snapshot.\n\nRetainRule (dict) --The retention rule.\n\nInterval (integer) --The amount of time to retain each snapshot. The maximum is 100 years. This is equivalent to 1200 months, 5200 weeks, or 36500 days.\n\nIntervalUnit (string) --The unit of time for time-based retention.\n\n\n\n\n\n\n\n\n\n\n\nParameters (dict) --A set of optional parameters for the policy.\n\nExcludeBootVolume (boolean) --[EBS Snapshot Management \xe2\x80\x93 Instance policies only] Indicates whether to exclude the root volume from snapshots created using CreateSnapshots . The default is false.\n\n\n\n\n
:type Tags: dict
:param Tags: The tags to apply to the lifecycle policy during creation.\n\n(string) --\n(string) --\n\n\n\n
:rtype: dict
ReturnsResponse Syntax
{
'PolicyId': 'string'
}
Response Structure
(dict) --
PolicyId (string) --
The identifier of the lifecycle policy.
Exceptions
DLM.Client.exceptions.InvalidRequestException
DLM.Client.exceptions.LimitExceededException
DLM.Client.exceptions.InternalServerException
:return: {
'PolicyId': 'string'
}
:returns:
DLM.Client.exceptions.InvalidRequestException
DLM.Client.exceptions.LimitExceededException
DLM.Client.exceptions.InternalServerException
"""
pass
def delete_lifecycle_policy(PolicyId=None):
"""
Deletes the specified lifecycle policy and halts the automated operations that the policy specified.
See also: AWS API Documentation
Exceptions
:example: response = client.delete_lifecycle_policy(
PolicyId='string'
)
:type PolicyId: string
:param PolicyId: [REQUIRED]\nThe identifier of the lifecycle policy.\n
:rtype: dict
ReturnsResponse Syntax{}
Response Structure
(dict) --
Exceptions
DLM.Client.exceptions.ResourceNotFoundException
DLM.Client.exceptions.InternalServerException
DLM.Client.exceptions.LimitExceededException
:return: {}
:returns:
DLM.Client.exceptions.ResourceNotFoundException
DLM.Client.exceptions.InternalServerException
DLM.Client.exceptions.LimitExceededException
"""
pass
def generate_presigned_url(ClientMethod=None, Params=None, ExpiresIn=None, HttpMethod=None):
"""
Generate a presigned url given a client, its method, and arguments
:type ClientMethod: string
:param ClientMethod: The client method to presign for
:type Params: dict
:param Params: The parameters normally passed to\nClientMethod.
:type ExpiresIn: int
:param ExpiresIn: The number of seconds the presigned url is valid\nfor. By default it expires in an hour (3600 seconds)
:type HttpMethod: string
:param HttpMethod: The http method to use on the generated url. By\ndefault, the http method is whatever is used in the method\'s model.
"""
pass
def get_lifecycle_policies(PolicyIds=None, State=None, ResourceTypes=None, TargetTags=None, TagsToAdd=None):
"""
Gets summary information about all or the specified data lifecycle policies.
To get complete information about a policy, use GetLifecyclePolicy .
See also: AWS API Documentation
Exceptions
:example: response = client.get_lifecycle_policies(
PolicyIds=[
'string',
],
State='ENABLED'|'DISABLED'|'ERROR',
ResourceTypes=[
'VOLUME'|'INSTANCE',
],
TargetTags=[
'string',
],
TagsToAdd=[
'string',
]
)
:type PolicyIds: list
:param PolicyIds: The identifiers of the data lifecycle policies.\n\n(string) --\n\n
:type State: string
:param State: The activation state.
:type ResourceTypes: list
:param ResourceTypes: The resource type.\n\n(string) --\n\n
:type TargetTags: list
:param TargetTags: The target tag for a policy.\nTags are strings in the format key=value .\n\n(string) --\n\n
:type TagsToAdd: list
:param TagsToAdd: The tags to add to objects created by the policy.\nTags are strings in the format key=value .\nThese user-defined tags are added in addition to the AWS-added lifecycle tags.\n\n(string) --\n\n
:rtype: dict
ReturnsResponse Syntax
{
'Policies': [
{
'PolicyId': 'string',
'Description': 'string',
'State': 'ENABLED'|'DISABLED'|'ERROR',
'Tags': {
'string': 'string'
}
},
]
}
Response Structure
(dict) --
Policies (list) --
Summary information about the lifecycle policies.
(dict) --
Summary information about a lifecycle policy.
PolicyId (string) --
The identifier of the lifecycle policy.
Description (string) --
The description of the lifecycle policy.
State (string) --
The activation state of the lifecycle policy.
Tags (dict) --
The tags.
(string) --
(string) --
Exceptions
DLM.Client.exceptions.ResourceNotFoundException
DLM.Client.exceptions.InvalidRequestException
DLM.Client.exceptions.InternalServerException
DLM.Client.exceptions.LimitExceededException
:return: {
'Policies': [
{
'PolicyId': 'string',
'Description': 'string',
'State': 'ENABLED'|'DISABLED'|'ERROR',
'Tags': {
'string': 'string'
}
},
]
}
:returns:
(string) --
(string) --
"""
pass
def get_lifecycle_policy(PolicyId=None):
"""
Gets detailed information about the specified lifecycle policy.
See also: AWS API Documentation
Exceptions
:example: response = client.get_lifecycle_policy(
PolicyId='string'
)
:type PolicyId: string
:param PolicyId: [REQUIRED]\nThe identifier of the lifecycle policy.\n
:rtype: dict
ReturnsResponse Syntax{
'Policy': {
'PolicyId': 'string',
'Description': 'string',
'State': 'ENABLED'|'DISABLED'|'ERROR',
'StatusMessage': 'string',
'ExecutionRoleArn': 'string',
'DateCreated': datetime(2015, 1, 1),
'DateModified': datetime(2015, 1, 1),
'PolicyDetails': {
'PolicyType': 'EBS_SNAPSHOT_MANAGEMENT',
'ResourceTypes': [
'VOLUME'|'INSTANCE',
],
'TargetTags': [
{
'Key': 'string',
'Value': 'string'
},
],
'Schedules': [
{
'Name': 'string',
'CopyTags': True|False,
'TagsToAdd': [
{
'Key': 'string',
'Value': 'string'
},
],
'VariableTags': [
{
'Key': 'string',
'Value': 'string'
},
],
'CreateRule': {
'Interval': 123,
'IntervalUnit': 'HOURS',
'Times': [
'string',
],
'CronExpression': 'string'
},
'RetainRule': {
'Count': 123,
'Interval': 123,
'IntervalUnit': 'DAYS'|'WEEKS'|'MONTHS'|'YEARS'
},
'FastRestoreRule': {
'Count': 123,
'Interval': 123,
'IntervalUnit': 'DAYS'|'WEEKS'|'MONTHS'|'YEARS',
'AvailabilityZones': [
'string',
]
},
'CrossRegionCopyRules': [
{
'TargetRegion': 'string',
'Encrypted': True|False,
'CmkArn': 'string',
'CopyTags': True|False,
'RetainRule': {
'Interval': 123,
'IntervalUnit': 'DAYS'|'WEEKS'|'MONTHS'|'YEARS'
}
},
]
},
],
'Parameters': {
'ExcludeBootVolume': True|False
}
},
'Tags': {
'string': 'string'
},
'PolicyArn': 'string'
}
}
Response Structure
(dict) --
Policy (dict) --Detailed information about the lifecycle policy.
PolicyId (string) --The identifier of the lifecycle policy.
Description (string) --The description of the lifecycle policy.
State (string) --The activation state of the lifecycle policy.
StatusMessage (string) --The description of the status.
ExecutionRoleArn (string) --The Amazon Resource Name (ARN) of the IAM role used to run the operations specified by the lifecycle policy.
DateCreated (datetime) --The local date and time when the lifecycle policy was created.
DateModified (datetime) --The local date and time when the lifecycle policy was last modified.
PolicyDetails (dict) --The configuration of the lifecycle policy
PolicyType (string) --The valid target resource types and actions a policy can manage. The default is EBS_SNAPSHOT_MANAGEMENT.
ResourceTypes (list) --The resource type. Use VOLUME to create snapshots of individual volumes or use INSTANCE to create multi-volume snapshots from the volumes for an instance.
(string) --
TargetTags (list) --The single tag that identifies targeted resources for this policy.
(dict) --Specifies a tag for a resource.
Key (string) --The tag key.
Value (string) --The tag value.
Schedules (list) --The schedule of policy-defined actions.
(dict) --Specifies a backup schedule.
Name (string) --The name of the schedule.
CopyTags (boolean) --Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.
TagsToAdd (list) --The tags to apply to policy-created resources. These user-defined tags are in addition to the AWS-added lifecycle tags.
(dict) --Specifies a tag for a resource.
Key (string) --The tag key.
Value (string) --The tag value.
VariableTags (list) --A collection of key/value pairs with values determined dynamically when the policy is executed. Keys may be any valid Amazon EC2 tag key. Values must be in one of the two following formats: $(instance-id) or $(timestamp) . Variable tags are only valid for EBS Snapshot Management \xe2\x80\x93 Instance policies.
(dict) --Specifies a tag for a resource.
Key (string) --The tag key.
Value (string) --The tag value.
CreateRule (dict) --The creation rule.
Interval (integer) --The interval between snapshots. The supported values are 1, 2, 3, 4, 6, 8, 12, and 24.
IntervalUnit (string) --The interval unit.
Times (list) --The time, in UTC, to start the operation. The supported format is hh:mm.
The operation occurs within a one-hour window following the specified time. If you do not specify a time, Amazon DLM selects a time within the next 24 hours.
(string) --
CronExpression (string) --The schedule, as a Cron expression. The schedule interval must be between 1 hour and 1 year. For more information, see Cron expressions in the Amazon CloudWatch User Guide .
RetainRule (dict) --The retention rule.
Count (integer) --The number of snapshots to retain for each volume, up to a maximum of 1000.
Interval (integer) --The amount of time to retain each snapshot. The maximum is 100 years. This is equivalent to 1200 months, 5200 weeks, or 36500 days.
IntervalUnit (string) --The unit of time for time-based retention.
FastRestoreRule (dict) --The rule for enabling fast snapshot restore.
Count (integer) --The number of snapshots to be enabled with fast snapshot restore.
Interval (integer) --The amount of time to enable fast snapshot restore. The maximum is 100 years. This is equivalent to 1200 months, 5200 weeks, or 36500 days.
IntervalUnit (string) --The unit of time for enabling fast snapshot restore.
AvailabilityZones (list) --The Availability Zones in which to enable fast snapshot restore.
(string) --
CrossRegionCopyRules (list) --The rule for cross-Region snapshot copies.
(dict) --Specifies a rule for cross-Region snapshot copies.
TargetRegion (string) --The target Region.
Encrypted (boolean) --To encrypt a copy of an unencrypted snapshot if encryption by default is not enabled, enable encryption using this parameter. Copies of encrypted snapshots are encrypted, even if this parameter is false or if encryption by default is not enabled.
CmkArn (string) --The Amazon Resource Name (ARN) of the AWS KMS customer master key (CMK) to use for EBS encryption. If this parameter is not specified, your AWS managed CMK for EBS is used.
CopyTags (boolean) --Copy all user-defined tags from the source snapshot to the copied snapshot.
RetainRule (dict) --The retention rule.
Interval (integer) --The amount of time to retain each snapshot. The maximum is 100 years. This is equivalent to 1200 months, 5200 weeks, or 36500 days.
IntervalUnit (string) --The unit of time for time-based retention.
Parameters (dict) --A set of optional parameters for the policy.
ExcludeBootVolume (boolean) --[EBS Snapshot Management \xe2\x80\x93 Instance policies only] Indicates whether to exclude the root volume from snapshots created using CreateSnapshots . The default is false.
Tags (dict) --The tags.
(string) --
(string) --
PolicyArn (string) --The Amazon Resource Name (ARN) of the policy.
Exceptions
DLM.Client.exceptions.ResourceNotFoundException
DLM.Client.exceptions.InternalServerException
DLM.Client.exceptions.LimitExceededException
:return: {
'Policy': {
'PolicyId': 'string',
'Description': 'string',
'State': 'ENABLED'|'DISABLED'|'ERROR',
'StatusMessage': 'string',
'ExecutionRoleArn': 'string',
'DateCreated': datetime(2015, 1, 1),
'DateModified': datetime(2015, 1, 1),
'PolicyDetails': {
'PolicyType': 'EBS_SNAPSHOT_MANAGEMENT',
'ResourceTypes': [
'VOLUME'|'INSTANCE',
],
'TargetTags': [
{
'Key': 'string',
'Value': 'string'
},
],
'Schedules': [
{
'Name': 'string',
'CopyTags': True|False,
'TagsToAdd': [
{
'Key': 'string',
'Value': 'string'
},
],
'VariableTags': [
{
'Key': 'string',
'Value': 'string'
},
],
'CreateRule': {
'Interval': 123,
'IntervalUnit': 'HOURS',
'Times': [
'string',
],
'CronExpression': 'string'
},
'RetainRule': {
'Count': 123,
'Interval': 123,
'IntervalUnit': 'DAYS'|'WEEKS'|'MONTHS'|'YEARS'
},
'FastRestoreRule': {
'Count': 123,
'Interval': 123,
'IntervalUnit': 'DAYS'|'WEEKS'|'MONTHS'|'YEARS',
'AvailabilityZones': [
'string',
]
},
'CrossRegionCopyRules': [
{
'TargetRegion': 'string',
'Encrypted': True|False,
'CmkArn': 'string',
'CopyTags': True|False,
'RetainRule': {
'Interval': 123,
'IntervalUnit': 'DAYS'|'WEEKS'|'MONTHS'|'YEARS'
}
},
]
},
],
'Parameters': {
'ExcludeBootVolume': True|False
}
},
'Tags': {
'string': 'string'
},
'PolicyArn': 'string'
}
}
:returns:
(string) --
"""
pass
def get_paginator(operation_name=None):
"""
Create a paginator for an operation.
:type operation_name: string
:param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo').
:rtype: L{botocore.paginate.Paginator}
ReturnsA paginator object.
"""
pass
def get_waiter(waiter_name=None):
"""
Returns an object that can wait for some condition.
:type waiter_name: str
:param waiter_name: The name of the waiter to get. See the waiters\nsection of the service docs for a list of available waiters.
:rtype: botocore.waiter.Waiter
"""
pass
def list_tags_for_resource(ResourceArn=None):
"""
Lists the tags for the specified resource.
See also: AWS API Documentation
Exceptions
:example: response = client.list_tags_for_resource(
ResourceArn='string'
)
:type ResourceArn: string
:param ResourceArn: [REQUIRED]\nThe Amazon Resource Name (ARN) of the resource.\n
:rtype: dict
ReturnsResponse Syntax{
'Tags': {
'string': 'string'
}
}
Response Structure
(dict) --
Tags (dict) --Information about the tags.
(string) --
(string) --
Exceptions
DLM.Client.exceptions.InternalServerException
DLM.Client.exceptions.InvalidRequestException
DLM.Client.exceptions.ResourceNotFoundException
:return: {
'Tags': {
'string': 'string'
}
}
:returns:
DLM.Client.exceptions.InternalServerException
DLM.Client.exceptions.InvalidRequestException
DLM.Client.exceptions.ResourceNotFoundException
"""
pass
def tag_resource(ResourceArn=None, Tags=None):
"""
Adds the specified tags to the specified resource.
See also: AWS API Documentation
Exceptions
:example: response = client.tag_resource(
ResourceArn='string',
Tags={
'string': 'string'
}
)
:type ResourceArn: string
:param ResourceArn: [REQUIRED]\nThe Amazon Resource Name (ARN) of the resource.\n
:type Tags: dict
:param Tags: [REQUIRED]\nOne or more tags.\n\n(string) --\n(string) --\n\n\n\n
:rtype: dict
ReturnsResponse Syntax
{}
Response Structure
(dict) --
Exceptions
DLM.Client.exceptions.InternalServerException
DLM.Client.exceptions.InvalidRequestException
DLM.Client.exceptions.ResourceNotFoundException
:return: {}
:returns:
(dict) --
"""
pass
def untag_resource(ResourceArn=None, TagKeys=None):
"""
Removes the specified tags from the specified resource.
See also: AWS API Documentation
Exceptions
:example: response = client.untag_resource(
ResourceArn='string',
TagKeys=[
'string',
]
)
:type ResourceArn: string
:param ResourceArn: [REQUIRED]\nThe Amazon Resource Name (ARN) of the resource.\n
:type TagKeys: list
:param TagKeys: [REQUIRED]\nThe tag keys.\n\n(string) --\n\n
:rtype: dict
ReturnsResponse Syntax
{}
Response Structure
(dict) --
Exceptions
DLM.Client.exceptions.InternalServerException
DLM.Client.exceptions.InvalidRequestException
DLM.Client.exceptions.ResourceNotFoundException
:return: {}
:returns:
(dict) --
"""
pass
def update_lifecycle_policy(PolicyId=None, ExecutionRoleArn=None, State=None, Description=None, PolicyDetails=None):
"""
Updates the specified lifecycle policy.
See also: AWS API Documentation
Exceptions
:example: response = client.update_lifecycle_policy(
PolicyId='string',
ExecutionRoleArn='string',
State='ENABLED'|'DISABLED',
Description='string',
PolicyDetails={
'PolicyType': 'EBS_SNAPSHOT_MANAGEMENT',
'ResourceTypes': [
'VOLUME'|'INSTANCE',
],
'TargetTags': [
{
'Key': 'string',
'Value': 'string'
},
],
'Schedules': [
{
'Name': 'string',
'CopyTags': True|False,
'TagsToAdd': [
{
'Key': 'string',
'Value': 'string'
},
],
'VariableTags': [
{
'Key': 'string',
'Value': 'string'
},
],
'CreateRule': {
'Interval': 123,
'IntervalUnit': 'HOURS',
'Times': [
'string',
],
'CronExpression': 'string'
},
'RetainRule': {
'Count': 123,
'Interval': 123,
'IntervalUnit': 'DAYS'|'WEEKS'|'MONTHS'|'YEARS'
},
'FastRestoreRule': {
'Count': 123,
'Interval': 123,
'IntervalUnit': 'DAYS'|'WEEKS'|'MONTHS'|'YEARS',
'AvailabilityZones': [
'string',
]
},
'CrossRegionCopyRules': [
{
'TargetRegion': 'string',
'Encrypted': True|False,
'CmkArn': 'string',
'CopyTags': True|False,
'RetainRule': {
'Interval': 123,
'IntervalUnit': 'DAYS'|'WEEKS'|'MONTHS'|'YEARS'
}
},
]
},
],
'Parameters': {
'ExcludeBootVolume': True|False
}
}
)
:type PolicyId: string
:param PolicyId: [REQUIRED]\nThe identifier of the lifecycle policy.\n
:type ExecutionRoleArn: string
:param ExecutionRoleArn: The Amazon Resource Name (ARN) of the IAM role used to run the operations specified by the lifecycle policy.
:type State: string
:param State: The desired activation state of the lifecycle policy after creation.
:type Description: string
:param Description: A description of the lifecycle policy.
:type PolicyDetails: dict
:param PolicyDetails: The configuration of the lifecycle policy. You cannot update the policy type or the resource type.\n\nPolicyType (string) --The valid target resource types and actions a policy can manage. The default is EBS_SNAPSHOT_MANAGEMENT.\n\nResourceTypes (list) --The resource type. Use VOLUME to create snapshots of individual volumes or use INSTANCE to create multi-volume snapshots from the volumes for an instance.\n\n(string) --\n\n\nTargetTags (list) --The single tag that identifies targeted resources for this policy.\n\n(dict) --Specifies a tag for a resource.\n\nKey (string) -- [REQUIRED]The tag key.\n\nValue (string) -- [REQUIRED]The tag value.\n\n\n\n\n\nSchedules (list) --The schedule of policy-defined actions.\n\n(dict) --Specifies a backup schedule.\n\nName (string) --The name of the schedule.\n\nCopyTags (boolean) --Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.\n\nTagsToAdd (list) --The tags to apply to policy-created resources. These user-defined tags are in addition to the AWS-added lifecycle tags.\n\n(dict) --Specifies a tag for a resource.\n\nKey (string) -- [REQUIRED]The tag key.\n\nValue (string) -- [REQUIRED]The tag value.\n\n\n\n\n\nVariableTags (list) --A collection of key/value pairs with values determined dynamically when the policy is executed. Keys may be any valid Amazon EC2 tag key. Values must be in one of the two following formats: $(instance-id) or $(timestamp) . Variable tags are only valid for EBS Snapshot Management \xe2\x80\x93 Instance policies.\n\n(dict) --Specifies a tag for a resource.\n\nKey (string) -- [REQUIRED]The tag key.\n\nValue (string) -- [REQUIRED]The tag value.\n\n\n\n\n\nCreateRule (dict) --The creation rule.\n\nInterval (integer) --The interval between snapshots. The supported values are 1, 2, 3, 4, 6, 8, 12, and 24.\n\nIntervalUnit (string) --The interval unit.\n\nTimes (list) --The time, in UTC, to start the operation. The supported format is hh:mm.\nThe operation occurs within a one-hour window following the specified time. If you do not specify a time, Amazon DLM selects a time within the next 24 hours.\n\n(string) --\n\n\nCronExpression (string) --The schedule, as a Cron expression. The schedule interval must be between 1 hour and 1 year. For more information, see Cron expressions in the Amazon CloudWatch User Guide .\n\n\n\nRetainRule (dict) --The retention rule.\n\nCount (integer) --The number of snapshots to retain for each volume, up to a maximum of 1000.\n\nInterval (integer) --The amount of time to retain each snapshot. The maximum is 100 years. This is equivalent to 1200 months, 5200 weeks, or 36500 days.\n\nIntervalUnit (string) --The unit of time for time-based retention.\n\n\n\nFastRestoreRule (dict) --The rule for enabling fast snapshot restore.\n\nCount (integer) --The number of snapshots to be enabled with fast snapshot restore.\n\nInterval (integer) --The amount of time to enable fast snapshot restore. The maximum is 100 years. This is equivalent to 1200 months, 5200 weeks, or 36500 days.\n\nIntervalUnit (string) --The unit of time for enabling fast snapshot restore.\n\nAvailabilityZones (list) -- [REQUIRED]The Availability Zones in which to enable fast snapshot restore.\n\n(string) --\n\n\n\n\nCrossRegionCopyRules (list) --The rule for cross-Region snapshot copies.\n\n(dict) --Specifies a rule for cross-Region snapshot copies.\n\nTargetRegion (string) -- [REQUIRED]The target Region.\n\nEncrypted (boolean) -- [REQUIRED]To encrypt a copy of an unencrypted snapshot if encryption by default is not enabled, enable encryption using this parameter. Copies of encrypted snapshots are encrypted, even if this parameter is false or if encryption by default is not enabled.\n\nCmkArn (string) --The Amazon Resource Name (ARN) of the AWS KMS customer master key (CMK) to use for EBS encryption. If this parameter is not specified, your AWS managed CMK for EBS is used.\n\nCopyTags (boolean) --Copy all user-defined tags from the source snapshot to the copied snapshot.\n\nRetainRule (dict) --The retention rule.\n\nInterval (integer) --The amount of time to retain each snapshot. The maximum is 100 years. This is equivalent to 1200 months, 5200 weeks, or 36500 days.\n\nIntervalUnit (string) --The unit of time for time-based retention.\n\n\n\n\n\n\n\n\n\n\n\nParameters (dict) --A set of optional parameters for the policy.\n\nExcludeBootVolume (boolean) --[EBS Snapshot Management \xe2\x80\x93 Instance policies only] Indicates whether to exclude the root volume from snapshots created using CreateSnapshots . The default is false.\n\n\n\n\n
:rtype: dict
ReturnsResponse Syntax
{}
Response Structure
(dict) --
Exceptions
DLM.Client.exceptions.ResourceNotFoundException
DLM.Client.exceptions.InvalidRequestException
DLM.Client.exceptions.InternalServerException
DLM.Client.exceptions.LimitExceededException
:return: {}
:returns:
(dict) --
"""
pass
| 36.482194 | 4,633 | 0.595067 | 4,170 | 37,905 | 5.392566 | 0.108633 | 0.00925 | 0.007204 | 0.006404 | 0.818562 | 0.790368 | 0.772935 | 0.769778 | 0.760084 | 0.740695 | 0 | 0.012995 | 0.309748 | 37,905 | 1,038 | 4,634 | 36.517341 | 0.846468 | 0.962274 | 0 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.5 | false | 0.5 | 0 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 10 |
d39b9ac3e5a366764ec74d0e00065d2614adb7b0 | 396,347 | py | Python | projects/src/main/python/CodeJam/Y14R5P1/kmod/generated_py_7dc49709f898498f84f675bec2caf8df.py | DynamicCodeSearch/CodeSeer | ee985ece7691691585952eb88565f0e08bdc9113 | [
"MIT"
] | 5 | 2020-04-05T18:04:13.000Z | 2021-04-13T20:34:19.000Z | projects/src/main/python/CodeJam/Y14R5P1/kmod/generated_py_7dc49709f898498f84f675bec2caf8df.py | DynamicCodeSearch/CodeSeer | ee985ece7691691585952eb88565f0e08bdc9113 | [
"MIT"
] | 1 | 2020-04-29T21:42:26.000Z | 2020-05-01T23:45:45.000Z | projects/src/main/python/CodeJam/Y14R5P1/kmod/generated_py_7dc49709f898498f84f675bec2caf8df.py | DynamicCodeSearch/CodeSeer | ee985ece7691691585952eb88565f0e08bdc9113 | [
"MIT"
] | 3 | 2020-01-27T16:02:14.000Z | 2021-02-08T13:25:15.000Z | import sys
sys.path.append('/home/george2/Raise/ProgramRepair/CodeSeer/projects/src/main/python')
from CodeJam.Y14R5P1.kmod.a import *
def func_f2e9048a30bb4d57b9cba1ad5c24ea36(N, p, sums, total):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
return needed
def func_b4f88e429f634b7fa0dde3accc3be9d7(N, p, sums, total):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
return i
def func_950278540eba404aa9ab5a6d55680528(needed, sums, total, j):
if total - sums[j + 1] <= needed:
return True
return False
def func_17be0a55b65d44b494fd4b9e968b7046(p, sums, total, N):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
return i
def func_73ce7a1ca2a54251b6bb1b93c8eb0fdd(p, sums, total, N):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
return needed
def func_d16021bb583e4e81abddde50aaf91cca(needed, i, sums, total):
if total - sums[i] <= needed:
return True
return False
def func_67c03a0a7c9e482c86be05763e4a9119(i, transistors, sums):
sums.append(t)
t += transistors[i]
return t
def func_e831239b16fe438ab73c44baea43624b():
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return low
def func_46e83c7c6f074d1d8512030839b954f5():
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return high
def func_223c8f15d7de4a1cad339bfb4a493d80():
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return g
def func_8c5621b0f9c64b06848c6643e4fc4830(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
return N
def func_1f09232c3e2b45fd9e06ec976b95dea1(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
return r
def func_bf4549ceb4784ab8b1d3c3aa70eff544(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
return q
def func_dd1d8e83f62d490c8eddf66fa9a98cc7(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
return transistors
def func_e6e290e4e278485b81b13d91fe7ea75b(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
return p
def func_076031b77573469c81d2b7eeb7f781b6(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
return i
def func_500420a79b6a4bb481ab5c8c7ba0d38a(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
return s
def func_2e6c74cd2c444cea9dc09f25bb0aa0bb(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
return i
def func_d04a1c3ac30841ba8d977e98d879078c(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
return transistors
def func_9008167b779d4ffcad47e4782a9244f2(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
return total
def func_73f0bbb727824422802b0161905d228d(transistors):
total = sum(transistors)
sums = []
return sums
def func_42ba69ea24604bddbf989de31d8784e3(transistors):
total = sum(transistors)
sums = []
return total
def func_d530bb5c019d44cea76fddab481bcee9():
sums = []
t = 0
return sums
def func_ba16ca66f9f8479e98ebb3d482450660():
sums = []
t = 0
return t
def func_9ee455e4a2e149a8916a85b23cd53007(N, transistors, sums):
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
return i
def func_8550f8e589254e96afa8663a84f647fd(N, transistors, sums):
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
return t
def func_6828e1de41ac4ac6a416ecbac3f75fde(N, transistors, sums):
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
return i
def func_5bbee9f240014fd58385c30d54db9818(N, transistors, sums):
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
return t
def func_213ced9b685f4c949d9cf3272ed61b46(N, sums, total):
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
return i
def func_03f8eb9b31b64a65893babe13c48ece6(N, sums, total):
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return i
def func_0c7d6ed09c614f4e90147c647d057073(N, sums, total):
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return low
def func_e045c607483241da89ffb933e82933ad():
low = 0.0
high = 1.0
return high
def func_815005d230db4a6197a7d4159dfbaa41():
low = 0.0
high = 1.0
return low
def func_f647256238a24aa1a2f5c4c83d6c2431():
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return low
def func_d18f51b604a54ca4b7c1c9fcb22eb3f4():
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return i
def func_b9de5024a1a64dd3bdbbdc388d921f57():
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return high
def func_c07af56c194748e6b23c07ea4129cc8c():
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return g
def func_19b2bc528db34cc8937042c309ab6487(_T):
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return low
def func_ca07ae3a2c134b63aca8bbd07357b245(_T):
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return i
def func_23678f4cf1314d5587420baa1513f007(_T):
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return high
def func_774bb6b9e6124796b3f808343fcaf835(_T):
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return g
def func_a9ff04f9c64e4e32a14b4a35db7a5c48(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
return N
def func_739d1768e65a4bcf966516095bcb5367(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
return s
def func_7ea1860c8da849b0b1c7e0f80b9dabd4(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
return total
def func_07fb508d411e43829f9b654edea479e0(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
return transistors
def func_5b6ef9caa4634c51b93be1c87894fe58(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
return r
def func_dd2f6464e5d4472c8aecb0a805fdd1dd(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
return i
def func_5710589c428644e0badcba5c4f962f6b(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
return q
def func_e56c38484df64590a958ef6506da2421(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
return p
def func_2f18c02f15634bb1b4b8fefabc7d4a79(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
return i
def func_cff4ce68a3eb48a3bac9e298b4a9022d(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
return total
def func_d934b4abc87848dc933f47c5463fecdd(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
return transistors
def func_a7e107bfac0f4210b402f90622d366b0(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
return sums
def func_8720222c9a6645a3870a57ee02668c3b(transistors):
total = sum(transistors)
sums = []
t = 0
return sums
def func_def6229e546247e7822a7802cfea743d(transistors):
total = sum(transistors)
sums = []
t = 0
return t
def func_721374bb49b6444b8f2b83d968b3be75(transistors):
total = sum(transistors)
sums = []
t = 0
return total
def func_77153f093967430d9bf3bbf80ebc01f2(N, transistors):
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
return sums
def func_6a6f5f35b1e649b6b8c64ff742c2e486(N, transistors):
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
return t
def func_7246b94dceeb4f9389c27e8e798b621d(N, transistors):
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
return i
def func_232d9c47ab014645ab9119a397f5874a(N, transistors, sums):
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
return t
def func_7a72e8b16a6444ca8e7989799796018b(N, transistors, sums):
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
return i
def func_18ed7f20b66044a78a63835835950f03(N, transistors, sums, total):
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
return i
def func_0e93e3504cc14f8b8f347f3e75d6fa4d(N, transistors, sums, total):
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
return t
def func_db8e91f4f5c248989fff917d9356bd37(N, sums, t, total):
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
return i
def func_1313c5ebf7e94e51900033cbb66b194c(N, sums, total):
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return low
def func_0b555bce51694926a4572e3889d4974d(N, sums, total):
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return i
def func_9220f6daca7a49a6a9611188bfbe1d9a(N, sums, total):
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return low
def func_923b53def9c14227836ee6032cb52723(N, sums, total):
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return i
def func_553ed036dbde43759771aaeacea852c5(N, sums, total):
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return high
def func_757d8c207a2c4d1eb5cf95bd0d83a8e2():
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return g
def func_c237f993433a40a587748f2897041ce1():
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return low
def func_2c18588015834736a76356413cc1c7e0():
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return high
def func_5887cca7ee5e47baacd4fb4099d25e73():
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return i
def func_d586ba8f21c643e8832c254840157226(_T):
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return high
def func_290dccf6b7064c0f8555c1f824cab83a(_T):
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return low
def func_6a7e40b526d94e31b8d87ac5233b4fc9(_T):
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return i
def func_7761b5b95ec942b9867d03023b75f495(_T):
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return g
def func_916345ff75dc4fc2970fba1b8f752a2b(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
return N
def func_f626b952595e44f9ad2770e7d61a4ed1(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
return s
def func_722f139bfb1f4a88bbf2df630826f57e(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
return total
def func_a612480ff30742d8815b42c06d5d6c48(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
return transistors
def func_683b9997d9fb48a9a61ed2fbeb7dac1b(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
return r
def func_83734f0a72ce48179d95a361be02dda4(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
return i
def func_30116dd5cbc949f1bc790f4106763108(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
return sums
def func_30c795c02e10437da8a52ddfb8780056(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
return q
def func_58fbbf01ea27440bacf94d26bd1ee12a(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
return p
def func_a45e95ffc3c443e28c13dee964ea09fe(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
return total
def func_5b1d3dcc00914206bd1f61c019bae7ad(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
return transistors
def func_32a7ac2579d74950bcc9c0226f11b7d5(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
return t
def func_fe13ab0abdf24f71a500967ed68edbd9(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
return i
def func_5972758096e54dada12aa5c5f9413d15(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
return sums
def func_a979d1e88ca54848a7afd8ee177d9938(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
return t
def func_431e7dfbbb4e4dbd84501e06f40b318e(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
return sums
def func_3200f747c9314d98b86fc2f04df551b5(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
return total
def func_f156e89054104feb91656d213897198e(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
return i
def func_6cc922d4165f47d3891b463de93f4b1b(N, transistors):
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
return sums
def func_2df969a6b3cd4f7f9c1158337afdde1a(N, transistors):
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
return t
def func_f2f3f2508f2f4f88ba2314fc4df88fff(N, transistors):
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
return i
def func_54bf4a285ca648c28409be617f815af4(N, transistors, sums, total):
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
return i
def func_636011e10b2b45eba6c7f314b80e2353(N, transistors, sums, total):
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
return t
def func_a98dc55151ee4c81add8d15867bef2df(N, transistors, sums, total):
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
return i
def func_28d9248070674af59debfa610928c55e(N, transistors, sums, total):
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
return t
def func_cebd71508bca4625b2d5b07eb0ac029a(N, sums, t, total):
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
return i
def func_18dccc9aa2c24ada8f0fbdc87645b355(N, sums, total):
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return low
def func_cc914ad60ee94be2b5882f12cf0a0a94(N, sums, total):
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return i
def func_63b3a4cedbb442e0a844af16fcc9f383(N, sums, total):
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return high
def func_b3df0b478e8947019f89f579efa57066(N, sums, total):
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return g
def func_2fad288ea8694b1abe761f1dba8b4fa4(N, sums, total):
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return i
def func_96baee259f404ecd8eda934150336b57(N, sums, total):
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return high
def func_ac32e7481fe244f08d4e72c4a42110a3(N, sums, total):
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return low
def func_00023d4268cd49679d32d0028cfc895b(_T):
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return low
def func_353a95daca594f749b29ae35e32d6805(_T):
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return high
def func_a28a313ce5b446d1b1f1948fc734efe3(_T):
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return g
def func_0bffac17d175443c87c66e6798127a64(_T):
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return i
def func_b3dff63ca29147e5a38083c698bdddb3(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
return p
def func_44503af3ac3344bdbbe31000c17a8ae6(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
return i
def func_afc8c17a9c9645859ac1087d90ace900(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
return transistors
def func_7188c1233e4c4942a09a48be5803bd1c(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
return N
def func_24a16bacb9d8475fa97e41565f7859ad(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
return t
def func_5afc91bb62ab4c819720830def281f07(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
return q
def func_c533737dd8f04fc7954b64ada59e7598(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
return r
def func_7576b180fe3a4b67af41eac147d9891c(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
return s
def func_532cd346e4f445b4a0ee94655350a16c(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
return total
def func_107138b7683a4620b4d08c9c5cbc0347(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
return sums
def func_40b19f87096a49f99be36a0448ef0ce6(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
return t
def func_5232f6f3096a4ed0b47b9900c3a9d072(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
return transistors
def func_f55c0d6e5698478aa80e996058f18307(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
return total
def func_d6f1e6162db4402b9b47b7b0b1678d6b(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
return i
def func_e0514bfac02040b5b64575151a3664a8(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
return sums
def func_fa89fc5f522e499589a8b97c49850ce0(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
return t
def func_a113c897af1c443da8e82033c7a92260(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
return i
def func_88e3e7bedc9f437ca0fd41b24d959edb(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
return total
def func_24a164acc11841d7887212d7a08ce950(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
return sums
def func_2b26a487325244c8bcc66cb532ad9a62(N, transistors, total):
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
return t
def func_5802e58848994c24a1400123a3a70ddc(N, transistors, total):
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
return i
def func_d7486682b46c400a90c44475f31df285(N, transistors, total):
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
return sums
def func_22b880c7a3604426b4a4ba2c74d7a55f(N, transistors, sums, total):
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
return i
def func_e59f08aedcb6496c93d179b151b105bb(N, transistors, sums, total):
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
return t
def func_3acb04f8a8454544a285fefa5aeefb91(N, transistors, sums, total):
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
return i
def func_09131d8262ab4870b3c021b255ea94cd(N, transistors, sums, total):
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
return t
def func_e8c55748191646bd8d9cdae7fca77021(N, sums, t, total):
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return low
def func_673d2beda43046178a0a67469d809774(N, sums, t, total):
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return i
def func_c854a98c64bf4694b0f996e96a4e5a4b(N, sums, total):
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return low
def func_5b8b4968b85744e6acbc99328888c1fa(N, sums, total):
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return high
def func_8d4f2b3fda6544f28fa1b45f03174667(N, sums, total):
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return g
def func_fb7e50aa5915413c8ee5e919d2a09a38(N, sums, total):
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return i
def func_ab09dbade9894a4c811f6738a8b1b844(N, _T, sums, total):
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return low
def func_12c068d7edcd45ec947994835a6ce5fd(N, _T, sums, total):
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return g
def func_1754fb0473994c75a85c4e92f5d5070d(N, _T, sums, total):
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return i
def func_07ed1d175be043eeb74339276c0a0b82(N, _T, sums, total):
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return high
def func_eb8f079ea9fe4534a859b51c1ca0d172(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
return N
def func_275b9c8c7eed4c1e8ef0b6aaf32c886d(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
return t
def func_f902d863381e43e485c54d0f69e21fed(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
return p
def func_eddaab61fca5418aa76dfe56f95d24be(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
return s
def func_cfdafc098ffb4df4917457c77b45f4fd(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
return i
def func_ba88ec5ee1254df7884b5186631d415f(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
return total
def func_3886f5d53bb54e2aa10a44d7f221ccd9(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
return sums
def func_bc689c3d1bfe4201bc856384d0bfccb9(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
return q
def func_e20c51a7ae4e4bd4bb5f2b13ba77e70d(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
return transistors
def func_155aa495319148c688e923ae41da913e(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
return r
def func_71bcfaac54704ef38189fa3984c1c9c5(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
return i
def func_90c274fec15240d5aff75998732abfbc(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
return total
def func_32e2642937424e318f4c8b0f0b1cbdc0(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
return t
def func_7a81763a340d4e72bc2ec5640baf5c17(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
return sums
def func_89321204b20a411a977ace1019f4b08c(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
return transistors
def func_54a26b0ebbdc41c68a80c8bd8c1ad255(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
return t
def func_97ea4dafb4a945d191bcc4a530136db9(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
return i
def func_aa4a1f3a653648df96cb59334f973009(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
return total
def func_7bb6b60e095a41e3a727848867d3bdd3(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
return sums
def func_c99ab0d07b50425fb6fbc94c272a187b(N, transistors, total):
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
return i
def func_895bdb5f3a104c1580b9c1fe61c27b4e(N, transistors, total):
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
return t
def func_197c3003347f40d79c9668bc535031c6(N, transistors, total):
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
return sums
def func_444315af7ac0494f87fa80c3546e878c(N, transistors, sums, total):
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
return i
def func_fcaf6c65c1974d87bbfff66d76924061(N, transistors, sums, total):
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
return t
def func_15ecded040f840d2993da2bed2215000(N, transistors, sums, total):
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return i
def func_6ff9b97a79484294a1503621cbb9fdaa(N, transistors, sums, total):
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return low
def func_6f16ea411467446485c2274d287afa75(N, transistors, sums, total):
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return t
def func_a0eb36fbbfe747ed9fe5f3d83d9d46ee(N, sums, t, total):
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return low
def func_8924d5ba3b874f9a97f441b48df777fe(N, sums, t, total):
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return i
def func_dc4b0a312f94407a9f59da3c75284a7c(N, sums, t, total):
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return high
def func_35c279a599784014b757c913c928b630(N, _T, sums, total):
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return i
def func_317decdd48324b819df8b1c3b08e3b22(N, _T, sums, total):
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return g
def func_2d72d3f68d5c44818f92d0c3ba821341(N, _T, sums, total):
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return low
def func_1c69a68b263141329db4f801db471375(N, _T, sums, total):
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return high
def func_9f3f2b3ef2c14683ba552ef8d0b79584(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
return p
def func_1daba1a708c548739e1d8c408f1043ca(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
return q
def func_7b8c294ae2934009b0309590e20f294b(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
return sums
def func_b5518c8e4d954696961c52d42869cb9f(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
return r
def func_06c01d00be89471395a2560c13cd679f(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
return transistors
def func_6b84b588b87f474b910f7f063f7a5d62(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
return s
def func_62fc4fa759ff402bac384a0ae27feda8(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
return i
def func_706fca2e9c7a4c42bece497bc5ffc978(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
return total
def func_e7e395f426e24b28bf032e943cd26f77(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
return t
def func_de41cb1256d84faa9ae9a9206064348b(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
return N
def func_9b31a08e9f424b2abf59cea13e74a0dc(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
return sums
def func_3f8b99a48a694a36bf534848a49e35f6(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
return t
def func_ef749bc7dc5c495cac097a184aafee83(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
return i
def func_f5b17b05521341e19d6de7c76a9cfa3c(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
return transistors
def func_198a83eed6b9472ab0bccc623e80c1d4(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
return total
def func_c5959606c09a4e54a0481006969729d7(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
return sums
def func_448cf81fea8048de8544153399e3d4e4(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
return i
def func_e39f34fedaa24b96820110f5fca3fd7a(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
return total
def func_a790eb11f6534d239e6534f8b93d6df6(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
return t
def func_44419de3e661461ca2b95819531b2ac1(N, transistors, total):
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
return sums
def func_737273929de84b51946b16581358f68c(N, transistors, total):
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
return i
def func_0b7689c762eb41b79bebbe869427b6f2(N, transistors, total):
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
return t
def func_314f9cfb399e4aa59efd75fa15d3e150(N, transistors, sums, total):
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return i
def func_4234d92f3b884a6eb2d8a29be3b1f3c4(N, transistors, sums, total):
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return t
def func_ba0e08b4344549a6aa21fa4481d68208(N, transistors, sums, total):
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return low
def func_a02e0ef5276347b8b7cf0d09037edd15(N, transistors, sums, total):
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return low
def func_db1c0ae10ce740f6aa91aa07d4d19d6f(N, transistors, sums, total):
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return high
def func_87dff2615d704fe8a128c3983fbb2c9b(N, transistors, sums, total):
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return t
def func_a478e807fd0549b4a2cc8f67d3d875f8(N, transistors, sums, total):
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return i
def func_99519b71325a461bae728b1c905c352a(N, sums, t, total):
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return g
def func_41c20654d28a46bebe2afbab517d8e36(N, sums, t, total):
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return i
def func_cfd87fea760a468ea9c4fce203226cf8(N, sums, t, total):
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return low
def func_c4e6c7a63778450ca35cf751556084d1(N, sums, t, total):
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return high
def func_4b90037009804e339ba4a807a85f95b1(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
return q
def func_d96bb2e4163f43e3b3b2f6278a67ff38(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
return p
def func_8c88731d5bca4651a19ffe7015ef2b13(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
return i
def func_d772f88aa98a4385b2022699f0310f26(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
return sums
def func_becf6704db564e9fa9c43690ed494758(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
return s
def func_45d4c59bf64f4fef8aab154f9e2ba33f(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
return N
def func_3e335b58993246a188946ac9f882e695(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
return t
def func_b45364018f4f4d2db8cd4f569750192b(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
return transistors
def func_a4f74b39acc9439696f15a7dba22c55d(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
return r
def func_8fe7e6889eb84f07a6cf760517560b6e(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
return total
def func_c0f3340300e14e51a014b59a9bc8e808(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
return total
def func_afba7e867b264205a94ba315354dd4ff(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
return transistors
def func_1b9404662ccf4d6b87a4909f256bf913(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
return t
def func_5aa781eab9564173805cde044dd08d54(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
return sums
def func_85704098c50d4752bd8c1219cd75927d(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
return i
def func_cb33bedcd6784c73b7e4dd3304c3f291(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
return total
def func_e8a3e706602049c5b43f1b626962c867(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
return t
def func_f4e74c5bd7ab43e5b2c2217714b6cc66(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
return i
def func_a0ad955a8d034618875b1c89b6deae45(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
return sums
def func_41d5d5d73e434b9697a0fe58ef36af0b(N, transistors, total):
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return t
def func_7d74df7ceb12468b8d28260c34b0e45e(N, transistors, total):
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return low
def func_48f8ed0cf4f24b49b1809b6bbde96f01(N, transistors, total):
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return sums
def func_f4d2d87d032741349f462ede29962d1d(N, transistors, total):
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return i
def func_700d39ade5aa459f98d2a362bf26b8a2(N, transistors, sums, total):
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return low
def func_9fcbb02ea34240369c4880de50e7ff7f(N, transistors, sums, total):
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return i
def func_102ac875308040a888c1c3871a5c261f(N, transistors, sums, total):
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return t
def func_a250f678fd934decab5b3beb8064f442(N, transistors, sums, total):
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return high
def func_28fb951b53f74751bd828f3a314b4177(N, transistors, sums, total):
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return t
def func_53b5274404b2428e9cf70918f8dd50e8(N, transistors, sums, total):
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return low
def func_c1d51955331e4134bccb01326a5b2a1b(N, transistors, sums, total):
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return i
def func_ba621a344f504b108e359aa836f55fba(N, transistors, sums, total):
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return g
def func_ce841cb4413c44c39efbc346edbe8b42(N, transistors, sums, total):
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return high
def func_ccccdff8e3784ea1b310c9a700e9a6ee(N, _T, sums, t, total):
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return low
def func_64e3f9027d21465ca42f8dedb8ef4ae9(N, _T, sums, t, total):
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return high
def func_0248b7333f284f2dbc8faaa9bad62ce0(N, _T, sums, t, total):
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return g
def func_78784f0237e84375a18a6bcb167d300d(N, _T, sums, t, total):
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return i
def func_f5c3c59866e24bf2b2efc45ca1df41e3(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
return r
def func_1737ac79b9bd449990f6374d0ab04db3(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
return sums
def func_2f7d71c57db64832ac45787a4f0c5d6f(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
return transistors
def func_87c40d1745d54a5cb148301f7ca48393(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
return t
def func_729e4ee5d59f4df6adb5a55c30973696(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
return N
def func_cc27a4c27e4945ffa88dbf3760cf3c23(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
return i
def func_d3ec6690fd604f0a9dd3829c0c24dc0d(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
return s
def func_4dee6d3d0aea4e1c88ea2b95579a6f65(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
return total
def func_27de583ee3584b548db996b629d84eb1(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
return p
def func_2519e0dabb90430eb8fea7cd28d0e4ce(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
return q
def func_b7a9519b03be408e8f0fb4ede44dd7dd(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
return total
def func_e09c3e9619c64029ba1266149e548287(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
return i
def func_268efdb15abc428e811651f2e275d48c(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
return t
def func_3848188ca8d9418e916a9e9f2756eaaf(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
return sums
def func_9c28c4dbfac346e9860431997ee6f7fa(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
return transistors
def func_55b90c71799a497a80e16f445c2bb813(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return total
def func_abae12d6ee1640579ca25cf81b34243a(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return i
def func_05db5b439c1e430faf6fbaa01b653f46(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return sums
def func_bec515a3aa2343979970254189bafc05(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return t
def func_47ad62cead2e4f73aff522faa4488e9f(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return low
def func_58eddff995144e0181205c0983393079(N, transistors, total):
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return high
def func_fd6bccde82914176b26dae8e02192419(N, transistors, total):
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return i
def func_fb71f2c1c6694f80a24a30e6bd3c869a(N, transistors, total):
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return t
def func_c44a74a810d24e9f8004e6038fabfb31(N, transistors, total):
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return sums
def func_6ddfc6bccd14405c9c2463c4072e5057(N, transistors, total):
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return low
def func_4c950b6ae06a40fd82459cdf89b2a960(N, transistors, sums, total):
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return high
def func_ab4530bd01834581b7bfb0631fd8c001(N, transistors, sums, total):
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return i
def func_fc66c2237b664fa3bee11a3ea9ee9b6b(N, transistors, sums, total):
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return g
def func_d69e58e04a184be5a6c355d617dbcb41(N, transistors, sums, total):
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return low
def func_ddcadc1172e04ecbaa4d863692ba2065(N, transistors, sums, total):
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return t
def func_0417c1bfb62e4ddb895b981543f823ee(N, _T, transistors, sums, total):
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return low
def func_61610c5fcdd447dba062589e7a3460c4(N, _T, transistors, sums, total):
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return i
def func_e2abd3a5f32d40dcbf2ccf882c91c068(N, _T, transistors, sums, total):
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return g
def func_d7ccc9126a92464a8e27ade13df9e6b0(N, _T, transistors, sums, total):
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return t
def func_5505ccc810814964805db82cdf586001(N, _T, transistors, sums, total):
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return high
def func_592d93ed032c42db853dffc7961e615a(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
return t
def func_6bcfa74901994e47a72f0cf7e81d332b(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
return total
def func_f0546dcd1fd6472a9546accbb830ceb9(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
return transistors
def func_c789df0f3a51475d8aca0ce68f3a8c04(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
return N
def func_4053758794dc46ffb5b6b701a1e52265(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
return sums
def func_bc131c039055450fae4110c3c34b3daf(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
return s
def func_8fe4e0c5ccb44bb2a0e0a338a40dee4c(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
return q
def func_c2674b46c4cc40deba7810a4f117911d(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
return r
def func_d6135b9535cc4208b49c97316647d1c2(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
return i
def func_a95af946a8f046fca8343c6999cb3061(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
return p
def func_52e6f8a70b5940a5aa36b8c246707ec1(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return i
def func_5248f9d9087e477aae27a13e7a0920d5(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return low
def func_933423fd5d0848b4b0cba1b9d9a18d94(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return total
def func_19ae218fdaa74f7484be5f4ba54b6d30(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return sums
def func_209b75d493d34876aec6e35bee6adabc(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return t
def func_8ff9352344de40d8b2e200d64faf43f9(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return transistors
def func_73a1e9cf502d464da551b335f70a5309(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return low
def func_491038346738410ea775d0d56fce4509(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return total
def func_45635945dcb24a4883970606c7b19560(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return i
def func_72dbfc12ac434ed0a5777f390c0946a0(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return sums
def func_899ac934109246cf8002e77293cedd9d(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return high
def func_cf1dba23f5904130945bedbccb493943(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return t
def func_bf8210c8991e4ccbbed9e29f3c4c75a4(N, transistors, total):
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return g
def func_4e84035626c44a55a6e406a14c453df6(N, transistors, total):
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return low
def func_77923edff9a3491a8e4be68de23e6560(N, transistors, total):
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return high
def func_142420fc0381422fb1f9e203a0eff259(N, transistors, total):
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return t
def func_35253495dcd247c7a5d071c7f80e07ee(N, transistors, total):
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return sums
def func_9a862420570e4cc9b85c35945ae86d57(N, transistors, total):
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return i
def func_cd21fcad2b6b4154a77b291378ced2b7(N, _T, transistors, sums, total):
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return i
def func_7101ce34b51c4ec3b17083c355c4e787(N, _T, transistors, sums, total):
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return high
def func_4991c31ea39e4d4da294ce5afb4e6405(N, _T, transistors, sums, total):
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return low
def func_ffb74b60076f40c0bdcf2836d0b75d5f(N, _T, transistors, sums, total):
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return g
def func_8a858a43772f4c53916465ed9d8174d5(N, _T, transistors, sums, total):
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return t
def func_c5bf51851d444486bb6c6f65679eeece(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return t
def func_099133a239f04effa1b65d8ab4b53ff7(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return p
def func_1cd6dfd838804f08ac82fab8eb28562d(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return i
def func_c873552856144ab78a9e79f1e919ea90(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return q
def func_c8c057b209384cb690d2d880bb1ef2b2(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return low
def func_707346fb0b1e47fd9d01c61c9077d3ed(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return N
def func_737aa04f347b4b22b5db988b12c0a3d0(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return sums
def func_20182c5226ea48a19cfcdd8b7f798b2b(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return s
def func_89afd346eefc4682a8393d936596fddd(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return transistors
def func_8271c4a6e4d04a9585f2edf84e5761c3(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return r
def func_6f52eb0abd184a2abf3f9063c0316849(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
return total
def func_d2f109d9f47a47cb93890285d29163c7(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return i
def func_7bbb35128676454fbaa48b0416578eb0(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return total
def func_90060887ad7942f3a4aeb785fd9a67d9(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return t
def func_4555bf6b8d5b45dbb1dd38b8aa397bd9(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return sums
def func_9f299c109ddb42fe9df337c6750a63c4(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return transistors
def func_32df59dd0c8947748d7aaa351e939d8b(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return high
def func_32e265f732bd4c1cafd0de7db5662eed(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return low
def func_b89e4d6a039e4cb4908cdfc0a96b8fb2(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return low
def func_7875360d11014cd582a348b33b273aa8(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return i
def func_939c8b9db8ec40f0a6d476890ffd5661(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return high
def func_58099a53222e43a9ae02010e93258017(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return t
def func_03cc28bf86ec431394bd4837840a80b1(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return sums
def func_9d3c10d545114daa956780e3061c6e23(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return g
def func_3d49299dc3004a3a9ab4cc744a8bc3b6(N, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return total
def func_c14625b6c45649e390e86446d39e64de(N, _T, transistors, total):
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return low
def func_3be11b7a16eb484d8f9f253a03ca14ad(N, _T, transistors, total):
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return g
def func_84b4c17df803494b86564aec89723426(N, _T, transistors, total):
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return i
def func_e60cabfbd90c4ec8afe374d834b72590(N, _T, transistors, total):
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return sums
def func_0461cd42609f4e5099a942043e7406b2(N, _T, transistors, total):
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return high
def func_4a9540fc812341d887dee3fff3d9abf6(N, _T, transistors, total):
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return t
def func_a995a6b1601d41c4af7213a107d9571d(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return total
def func_9e10e41a4c6a4b6b819a82b311537928(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return sums
def func_79af2ee43b5b416d8ffe892e468dbcbb(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return i
def func_5ce4b56523e34507b44d6ff9b6b5f229(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return transistors
def func_e4ccc92165b244d2a7dbaa1e47053148(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return q
def func_bf3fd880f88f414abc433327c13fb45e(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return N
def func_bc04976cc6ff47f28251ee51d8127a9d(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return r
def func_1e685d49250e4affa45ec1498c2dfb31(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return s
def func_5eb21083a26645808fa3de643dfef698(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return p
def func_a46e447ba8464a87812264436d027fc6(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return low
def func_f0c40fbf6de54d27ba69cc976e7c090b(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return t
def func_5f01fdd49ede47c5a6f649f4d697e775(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
return high
def func_aa56cff15b80458eb181338417c395a4(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return sums
def func_d7b54064ebc54b57a878900e12825c53(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return i
def func_14345da5342d4a35bd89701e07ff8b0f(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return transistors
def func_b3c59a2b7cde4e69b8c3fa290e1608d9(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return total
def func_f0ae085a462447a08c651cfb8876cfaa(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return t
def func_0494fdb03fed48dda584b2ca3690793b(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return low
def func_368178fcddd34c628e3410f84e51899b(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return high
def func_d8abc5f5ebd648b8aa389f165475f063(p, r, N, q, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return g
def func_db473563c8fc4b6db59747df5271753f(N, _T, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return sums
def func_d3c50c88c8544f5bb86d1adfa1d9e137(N, _T, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return total
def func_043b71cf39de4a82ac5ccf6ee65eccd4(N, _T, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return i
def func_488bdfff2ebc4cf59f6783bd355da12f(N, _T, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return t
def func_d610387401914c4083af196670802ba8(N, _T, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return low
def func_d9adce8018d74dc3bfabbaa0b4bd46d2(N, _T, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return high
def func_af8e5f9e60d3460dad40271667b885b4(N, _T, transistors):
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return g
def func_1e22ba66b7054ea1ab8fcdcdbdc607f1(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return g
def func_ac79f2d6e875474fa4cb8c0c4378b0b4(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return r
def func_f518284684354368b1a434097ad7830f(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return t
def func_854176f9baca479c8b00d18836744a3a(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return i
def func_1a0c8074d4f84a41a0c6e2594d935bd1(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return low
def func_85cd693fe0a247dfafd66dd3d93aa471(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return total
def func_83dbe1edfd234ca6ad6355a23ed5207a(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return p
def func_e091d67f5476407791f3006c9c5503f4(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return high
def func_0062502a4baf4200aa01c007b4ab9c05(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return s
def func_ae8836fe8c414d99ad9c581c70e7d3a6(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return N
def func_565638b775fc4dbca7103c875101d92e(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return q
def func_745a22d16f4645069a1020591abe2ef1(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return sums
def func_0d410c9ab2154ef69e16414f94362814(f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
return transistors
def func_cadbd0d94ce6447c8f0f91657d81fccf(p, r, N, q, _T, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return transistors
def func_f5f751a0ab0845ac82d177c832b5711c(p, r, N, q, _T, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return total
def func_2743f2b00ae9488a866adc4dfad2e2f1(p, r, N, q, _T, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return high
def func_250a2aa00f8d4c0a90865265f3f3f59a(p, r, N, q, _T, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return g
def func_285e071749934dcc87feddf380ac846a(p, r, N, q, _T, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return low
def func_3f9667aa2d5a42db9465b0352de25d72(p, r, N, q, _T, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return i
def func_bfe6582e1a074e7f9566ad0fb0c97298(p, r, N, q, _T, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return sums
def func_07bd68f170fc42a798b28632bda0a50b(p, r, N, q, _T, s):
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return t
def func_a8cf67d625914e8f955d8f81b466993f(_T, f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return low
def func_e56e801e65624b07b42bd4792f3a83d9(_T, f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return transistors
def func_8329c9c83b2d4cccb3852edd5d21e1a5(_T, f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return total
def func_21fc48b828ee429ead1bf56238123854(_T, f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return p
def func_648cd5eeb7dd42d49050c4b3a75c9c3b(_T, f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return high
def func_38015401d264458ba430b4ea2ba3e7b6(_T, f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return N
def func_63b42e8da9c94c61a3104131a8ea24a4(_T, f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return r
def func_d0f4cf211c1649db842c6c22cc926bc8(_T, f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return sums
def func_040a33732e8c4837b493ba8abc2cb62f(_T, f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return t
def func_87a04cafa7b94a3fa2216026c34f2559(_T, f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return g
def func_dddbd07caccc4dc5a275859237c39c8f(_T, f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return i
def func_b49b8ab214a248b0a7d06123999ff574(_T, f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return s
def func_a3647081d30f458bb735064c036b5249(_T, f):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)(t == total)
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g('Case #%d: %.10f' % (_T + 1, low))
return q
def func_eeaffa6ba2a040c0ac61d00ed96c6173():
f = open('codejam/test_files/Y14R5P1/A.in')
T = int(f.readline())
return f
def func_723577baf95d4a148dbf50916da3bea0():
f = open('codejam/test_files/Y14R5P1/A.in')
T = int(f.readline())
return T
def func_07271f4d5b104fbe87faa3b46a48493e(f):
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
return N
def func_6e3e74d8082142dbbbf41401a751f7bd(f):
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
return g
def func_0ea056c6065642c580aeca4a5f0f45d6(f):
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
return low
def func_22d50bc4a0b74fa998340ed29f3bdd12(f):
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
return t
def func_e15fe6608b294c0499db143e09ef39b0(f):
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
return s
def func_f432480877f7417687bb661ac26a249d(f):
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
return q
def func_7b45bf5cd0e448a98b4327ec818eccdb(f):
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
return high
def func_4931a50c39294270b0be2e3340b9aaad(f):
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
return r
def func_0b248f9567ac46d9b4feabf1b537cf83(f):
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
return _T
def func_c716a86d0c144f70879215c92b26ff9a(f):
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
return p
def func_aab1a6dc4a024278b355b4a1b0bcfc72(f):
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
return T
def func_f2a6ca1c65bf4f40a81829cdf41179f6(f):
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
return i
def func_3109ec7aaf0648f9a9b38860fa100f2c(f):
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
return total
def func_21b0d7f58d6349bca3a8a497b3837209(f):
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
return transistors
def func_7c2da7c6c32b4da49aa5bcc96a2c5b1a(f):
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
return sums
def func_58f023c32a7c4fc6a8446855ad19ca32(T, f):
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return q
def func_3921128d2589485ca51bc18f849690a0(T, f):
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return p
def func_fdfe355f57a64505b76f7ad01909453e(T, f):
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return total
def func_790035a0d12b4739a2242f2042b42de3(T, f):
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return g
def func_b3ba331c8dc94ac5a7762f27cf14bee3(T, f):
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return N
def func_71c368b303aa421883eb640fe772863d(T, f):
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return transistors
def func_9c3becca727a46cf8fedfea6f23b6b30(T, f):
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return i
def func_0771b1f949d044b69cb81cabafdaa038(T, f):
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return low
def func_6a0bef61e96b4b128e37b418295434b3(T, f):
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return r
def func_4f80d56676054c6fa5a35e463bb686f3(T, f):
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return s
def func_53d4e54b4e1e47668df79c75088eaec4(T, f):
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return _T
def func_65febc065c584cb483a106c79060417e(T, f):
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return high
def func_a6b836105f504aa59d22b95061f1f514(T, f):
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return sums
def func_379330cdaf5e4ff8813b1ca258400b6e(T, f):
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return t
def func_c547feda7bb340308043c1b9115561f4():
f = open('codejam/test_files/Y14R5P1/A.in')
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
return t
def func_b061b574984f4694bb99e17e7656af75():
f = open('codejam/test_files/Y14R5P1/A.in')
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
return high
def func_114636c3110d4c7ba5c7d9a735e2eac2():
f = open('codejam/test_files/Y14R5P1/A.in')
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
return s
def func_cefb9af1bac04775b5860ae570f04d72():
f = open('codejam/test_files/Y14R5P1/A.in')
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
return sums
def func_242ed4de7f5d45148fcc633bf9c53ef4():
f = open('codejam/test_files/Y14R5P1/A.in')
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
return r
def func_ed9ef8c355d04f4c83dd0125cee84420():
f = open('codejam/test_files/Y14R5P1/A.in')
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
return p
def func_845f617532fb450681a82e90f7ba736e():
f = open('codejam/test_files/Y14R5P1/A.in')
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
return transistors
def func_4c90080b4a1d48c68f5e50d33f403e8d():
f = open('codejam/test_files/Y14R5P1/A.in')
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
return q
def func_3a051ab13ff141a5b9705d6ca7a904ed():
f = open('codejam/test_files/Y14R5P1/A.in')
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
return N
def func_e99eb3de608b47798b089c6607e30585():
f = open('codejam/test_files/Y14R5P1/A.in')
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
return total
def func_43d220fe5e484585b711e7d5ce9a260b():
f = open('codejam/test_files/Y14R5P1/A.in')
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
return _T
def func_e8068433c43249589c928a0880433af0():
f = open('codejam/test_files/Y14R5P1/A.in')
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
return T
def func_0e88f835127e450db8bd1b8b812aedfb():
f = open('codejam/test_files/Y14R5P1/A.in')
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
return low
def func_3e0f05f6965a4cdc9de324bf7fc75157():
f = open('codejam/test_files/Y14R5P1/A.in')
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
return g
def func_cdfac37c60da41c3bd9e533eb2941833():
f = open('codejam/test_files/Y14R5P1/A.in')
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
return f
def func_c18f73aa0b634175aff8723fd1d8afa2():
f = open('codejam/test_files/Y14R5P1/A.in')
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
return i
def func_2e8b66e37ffd4b9596da15a381453b74(f):
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return sums
def func_11ea5cf5586d451a9cc4319192a6a6ad(f):
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return high
def func_6799ff71329a45c1824b31f3ba7a8c63(f):
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return t
def func_d1a0c4ef96fb497aa0a2b1314806c84d(f):
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return i
def func_9e30a8015dfb492d834759ed14cded6e(f):
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return low
def func_ab9a4337cc1445f48bdc6545587f90a0(f):
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return T
def func_250a448e21b14f7f9265d8da32d6b7e6(f):
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return r
def func_11579dfb7a4a472f9ad7e780738ff198(f):
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return N
def func_d55ee79f498149648f8816a78ee05844(f):
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return p
def func_9df9e7d2d07b45818ae23a4b70a4a9dc(f):
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return transistors
def func_d233fe3f142743a69ea02b1d9c3596f4(f):
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return s
def func_2253c43eeb8b4a318320945eb094e8f5(f):
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return g
def func_035e5befbfb44c54bf63dc97a70e710c(f):
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return q
def func_481418223ea2471495df4ae429b3f216(f):
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return total
def func_43ef8324ba11453e8f0459282401d061(f):
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return _T
def func_a2c2b9c9cc524666bc7c43a3076550f4():
f = open('codejam/test_files/Y14R5P1/A.in')
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return i
def func_04ce46e477cc4967af767c96e5855274():
f = open('codejam/test_files/Y14R5P1/A.in')
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return low
def func_172cc9b2869d4c76bc3146a7564b1c5f():
f = open('codejam/test_files/Y14R5P1/A.in')
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return p
def func_799b34b00cd945d195c4989835fea6bb():
f = open('codejam/test_files/Y14R5P1/A.in')
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return s
def func_089aadb257aa47d1ab1438f009aac162():
f = open('codejam/test_files/Y14R5P1/A.in')
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return f
def func_e753bb3f7ea64b889871ccaf3c63ff76():
f = open('codejam/test_files/Y14R5P1/A.in')
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return sums
def func_7feb00abda964db48a15eb9aab54cdfe():
f = open('codejam/test_files/Y14R5P1/A.in')
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return _T
def func_63357f9673ea4fb3b90b1c293ec73574():
f = open('codejam/test_files/Y14R5P1/A.in')
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return high
def func_a0c267f86eea43a985b5b817364b264b():
f = open('codejam/test_files/Y14R5P1/A.in')
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return r
def func_25a6246053f54cc68ff50e0df2f37270():
f = open('codejam/test_files/Y14R5P1/A.in')
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return N
def func_efd4b8a745d143d78182df5046992619():
f = open('codejam/test_files/Y14R5P1/A.in')
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return transistors
def func_0ac9703dab8e4e548e6135ca9e85ef8c():
f = open('codejam/test_files/Y14R5P1/A.in')
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return t
def func_69c0364b23614087a2efe95f426e202e():
f = open('codejam/test_files/Y14R5P1/A.in')
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return total
def func_da8baf6d31b043908382c4259a4e8a71():
f = open('codejam/test_files/Y14R5P1/A.in')
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return T
def func_d696187c87eb4041b30d29a2b5428f1f():
f = open('codejam/test_files/Y14R5P1/A.in')
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return g
def func_3dd31426b6c3410782917e1abf8f2db8():
f = open('codejam/test_files/Y14R5P1/A.in')
T = int(f.readline())
for _T in xrange(T):
N, p, q, r, s = map(int, f.readline().split())
transistors = [((i * p + q) % r + s) for i in xrange(N)]
total = sum(transistors)
sums = []
t = 0
for i in xrange(N):
sums.append(t)
t += transistors[i]
sums.append(t)
assert t == total
def can3(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
for j in xrange(N - 1, i - 1, -1):
if sums[j + 1] - sums[i] <= needed:
break
else:
return False
if total - sums[j + 1] <= needed:
return True
return False
def can2(p):
needed = (1 - p) * total
for i in xrange(N - 1, 0, -1):
if sums[i] <= needed:
break
else:
return False
if total - sums[i] <= needed:
return True
return False
low = 0.0
high = 1.0
for i in xrange(40):
g = (low + high) * 0.5
if can3(g) or can2(g):
low = g
else:
high = g
print 'Case #%d: %.10f' % (_T + 1, low)
f.close()
return q
| 25.635276 | 86 | 0.437016 | 50,920 | 396,347 | 3.385546 | 0.010939 | 0.086129 | 0.082069 | 0.101977 | 0.905947 | 0.905251 | 0.905123 | 0.90481 | 0.904149 | 0.903458 | 0 | 0.081085 | 0.443987 | 396,347 | 15,460 | 87 | 25.636934 | 0.701185 | 0 | 0 | 0.964366 | 0 | 0 | 0.008278 | 0.002828 | 0 | 0 | 0 | 0 | 0.005482 | 0 | null | null | 0 | 0.000144 | null | null | 0.005482 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
6cc2b5f16a73311f98edcb7a8b037d31471161d7 | 12,165 | py | Python | src/tfchain/types/transactions/AuthCoin.py | GlenDC/threefold-wallet-electron | 440662a793d98781eb3bbf415ba8a482abed0288 | [
"MIT"
] | null | null | null | src/tfchain/types/transactions/AuthCoin.py | GlenDC/threefold-wallet-electron | 440662a793d98781eb3bbf415ba8a482abed0288 | [
"MIT"
] | 201 | 2019-05-20T15:06:05.000Z | 2019-07-16T12:48:59.000Z | src/tfchain/types/transactions/AuthCoin.py | GlenDC/threefold-wallet-electron | 440662a793d98781eb3bbf415ba8a482abed0288 | [
"MIT"
] | 1 | 2019-12-20T21:45:39.000Z | 2019-12-20T21:45:39.000Z | from tfchain.types.transactions.Base import TransactionBaseClass, TransactionVersion
from tfchain.types import FulfillmentTypes, ConditionTypes
from tfchain.types.FulfillmentTypes import FulfillmentBaseClass, FulfillmentSingleSignature
from tfchain.types.ConditionTypes import ConditionBaseClass, ConditionNil, UnlockHash
from tfchain.types.PrimitiveTypes import BinaryData, Currency
from tfchain.types.IO import CoinInput, CoinOutput
from tfchain.encoding.rivbin import RivineBinaryEncoder
from tfchain.polyfill.crypto import random as crandom
import tfchain.polyfill.encoding.str as jsstr
import tfchain.polyfill.encoding.object as jsobj
import tfchain.polyfill.array as jsarr
class TransactionV176(TransactionBaseClass):
_SPECIFIER = b'auth addr update'
def __init__(self):
self._auth_addresses = []
self._deauth_addresses = []
self._auth_fulfillment = None
self._data = None
self._nonce = BinaryData(crandom(8), strencoding='base64')
# current auth condition
self._parent_auth_condition = None
super().__init__()
def _custom_version_getter(self):
return TransactionVersion.COIN_AUTH_ADDRESS_UPDATE
def _custom_data_getter(self):
"""
Optional binary data attached to this Transaction,
with a max length of 83 bytes.
"""
if self._data == None:
return BinaryData(strencoding='base64')
return self._data
def _custom_data_setter(self, value):
if value == None:
self._data = None
return
if isinstance(value, BinaryData):
value = value.value
elif isinstance(value, str):
value = jsstr.to_utf8(value)
if len(value) > 83:
raise ValueError(
"arbitrary data can have a maximum bytes length of 83, {} exceeds this limit".format(len(value)))
self._data = BinaryData(value=value, strencoding='base64')
@property
def parent_auth_condition(self):
"""
Retrieve the parent auth condition which will be set
"""
if self._parent_auth_condition == None:
return ConditionNil()
return self._parent_auth_condition
@parent_auth_condition.setter
def parent_auth_condition(self, value):
if value == None:
self._parent_auth_condition = None
return
if not isinstance(value, ConditionBaseClass):
raise TypeError(
"CoinAuthAddressUpdate (v176) Transaction's parent auth condition has to be a subtype of ConditionBaseClass, not {}".format(type(value)))
self._parent_auth_condition = value
def auth_fulfillment_defined(self):
return self._auth_fulfillment != None
@property
def auth_fulfillment(self):
"""
Retrieve the current auth fulfillment
"""
if self._auth_fulfillment == None:
return FulfillmentSingleSignature()
return self._auth_fulfillment
@auth_fulfillment.setter
def auth_fulfillment(self, value):
if value == None:
self._auth_fulfillment = None
return
if not isinstance(value, FulfillmentBaseClass):
raise TypeError(
"MintDefinition (v176) Transaction's auth fulfillment has to be a subtype of FulfillmentBaseClass, not {}".format(type(value)))
self._auth_fulfillment = value
def _signature_hash_input_get(self, *extra_objects):
e = RivineBinaryEncoder()
# encode the transaction version
e.add_byte(self.version.value)
# encode the specifier
e.add_array(TransactionV176._SPECIFIER)
# encode nonce
e.add_array(self._nonce.value)
# extra objects if any
if extra_objects:
e.add_all(*extra_objects)
# encode the address update info
e.add_all(
self._auth_addresses,
self._deauth_addresses,
)
# encode custom data
e.add(self.data)
# return the encoded data
return e.data
def _id_input_compute(self):
return jsarr.concat(TransactionV176._SPECIFIER, self._binary_encode_data())
def _binary_encode_data(self):
encoder = RivineBinaryEncoder()
encoder.add_array(self._nonce.value)
encoder.add_all(
self._auth_addresses,
self._deauth_addresses,
self.data,
self.auth_fulfillment,
)
return encoder.data
def _from_json_data_object(self, data):
self._nonce = BinaryData.from_json(
data.get_or('nonce', ''), strencoding='base64')
self._auth_addresses = [UnlockHash.from_json(uh) for uh in data.get_or('authaddresses', []) or []]
self._deauth_addresses = [UnlockHash.from_json(uh) for uh in data.get_or('deauthaddresses', []) or []]
self._auth_fulfillment = FulfillmentTypes.from_json(
data.get_or('authfulfillment', jsobj.new_dict()))
self._data = BinaryData.from_json(
data.get_or('arbitrarydata', None) or '', strencoding='base64')
def _json_data_object(self):
return {
'nonce': self._nonce.json(),
'authaddresses': [uh.json() for uh in self._auth_addresses],
'deauthaddresses': [uh.json() for uh in self._deauth_addresses],
'arbitrarydata': self.data.json(),
'authfulfillment': self._auth_fulfillment.json(),
}
def _extra_signature_requests_new(self):
if self._parent_auth_condition == None:
return [] # nothing to be signed
return self.auth_fulfillment.signature_requests_new(
# no extra objects are to be included within txn scope
input_hash_func=self.signature_hash_get,
parent_condition=self._parent_auth_condition,
)
def _extra_is_fulfilled(self):
if self._parent_auth_condition == None:
return False
return self.auth_fulfillment.is_fulfilled(parent_condition=self._parent_auth_condition)
class TransactionV177(TransactionBaseClass):
_SPECIFIER = b'auth cond update'
def __init__(self):
self._auth_fulfillment = None
self._auth_condition = None
self._miner_fees = []
self._data = None
self._nonce = BinaryData(crandom(8), strencoding='base64')
# current auth condition
self._parent_auth_condition = None
super().__init__()
def _custom_version_getter(self):
return TransactionVersion.COIN_AUTH_CONDITION_UPDATE
def _custom_miner_fees_getter(self):
"""
Miner fees, paid to the block creator of this Transaction,
funded by this Transaction's coin inputs.
"""
return self._miner_fees
def _custom_data_getter(self):
"""
Optional binary data attached to this Transaction,
with a max length of 83 bytes.
"""
if self._data == None:
return BinaryData(strencoding='base64')
return self._data
def _custom_data_setter(self, value):
if value == None:
self._data = None
return
if isinstance(value, BinaryData):
value = value.value
elif isinstance(value, str):
value = jsstr.to_utf8(value)
if len(value) > 83:
raise ValueError(
"arbitrary data can have a maximum bytes length of 83, {} exceeds this limit".format(len(value)))
self._data = BinaryData(value=value, strencoding='base64')
@property
def auth_condition(self):
"""
Retrieve the new auth condition which will be set
"""
if self._auth_condition == None:
return ConditionNil()
return self._auth_condition
@auth_condition.setter
def auth_condition(self, value):
if value == None:
self._auth_condition = None
return
if not isinstance(value, ConditionBaseClass):
raise TypeError(
"MintDefinition (v177) Transaction's auth condition has to be a subtype of ConditionBaseClass, not {}".format(type(value)))
self._auth_condition = value
@property
def parent_auth_condition(self):
"""
Retrieve the parent auth condition which will be set
"""
if self._parent_auth_condition == None:
return ConditionNil()
return self._parent_auth_condition
@parent_auth_condition.setter
def parent_auth_condition(self, value):
if value == None:
self._parent_auth_condition = None
return
if not isinstance(value, ConditionBaseClass):
raise TypeError(
"MintDefinition (v177) Transaction's parent auth condition has to be a subtype of ConditionBaseClass, not {}".format(type(value)))
self._parent_auth_condition = value
def auth_fulfillment_defined(self):
return self._auth_fulfillment != None
@property
def auth_fulfillment(self):
"""
Retrieve the current auth fulfillment
"""
if self._auth_fulfillment == None:
return FulfillmentSingleSignature()
return self._auth_fulfillment
@auth_fulfillment.setter
def auth_fulfillment(self, value):
if value == None:
self._auth_fulfillment = None
return
if not isinstance(value, FulfillmentBaseClass):
raise TypeError(
"MintDefinition (v177) Transaction's auth fulfillment has to be a subtype of FulfillmentBaseClass, not {}".format(type(value)))
self._auth_fulfillment = value
def miner_fee_add(self, value):
self._miner_fees.append(Currency(value=value))
def _signature_hash_input_get(self, *extra_objects):
e = RivineBinaryEncoder()
# encode the transaction version
e.add_byte(self.version.value)
# encode the specifier
e.add_array(TransactionV177._SPECIFIER)
# encode nonce
e.add_array(self._nonce.value)
# extra objects if any
if extra_objects:
e.add_all(*extra_objects)
# encode new auth condition
e.add(self.auth_condition)
# encode custom data
e.add(self.data)
# return the encoded data
return e.data
def _id_input_compute(self):
return jsarr.concat(TransactionV177._SPECIFIER, self._binary_encode_data())
def _binary_encode_data(self):
encoder = RivineBinaryEncoder()
encoder.add_array(self._nonce.value)
encoder.add_all(
self.data,
self.auth_condition,
self.auth_fulfillment,
)
return encoder.data
def _from_json_data_object(self, data):
self._nonce = BinaryData.from_json(
data.get_or('nonce', ''), strencoding='base64')
self._data = BinaryData.from_json(
data.get_or('arbitrarydata', None) or '', strencoding='base64')
self._auth_condition = ConditionTypes.from_json(
data.get_or('authcondition', jsobj.new_dict()))
self._auth_fulfillment = FulfillmentTypes.from_json(
data.get_or('authfulfillment', jsobj.new_dict()))
def _json_data_object(self):
return {
'nonce': self._nonce.json(),
'arbitrarydata': self.data.json(),
'authcondition': self.auth_condition.json(),
'authfulfillment': self.auth_fulfillment.json(),
}
def _extra_signature_requests_new(self):
if self._parent_auth_condition == None:
return [] # nothing to be signed
return self._auth_fulfillment.signature_requests_new(
# no extra objects are to be included within txn scope
input_hash_func=self.signature_hash_get,
parent_condition=self._parent_auth_condition,
)
def _extra_is_fulfilled(self):
if self._parent_auth_condition == None:
return False
return self.auth_fulfillment.is_fulfilled(parent_condition=self._parent_auth_condition)
| 34.559659 | 153 | 0.644061 | 1,339 | 12,165 | 5.59298 | 0.123973 | 0.07985 | 0.071038 | 0.055281 | 0.814394 | 0.801042 | 0.790359 | 0.777941 | 0.758713 | 0.758713 | 0 | 0.007813 | 0.274065 | 12,165 | 351 | 154 | 34.65812 | 0.840222 | 0.082696 | 0 | 0.756098 | 0 | 0 | 0.090119 | 0.005764 | 0 | 0 | 0 | 0 | 0 | 1 | 0.146341 | false | 0 | 0.044715 | 0.03252 | 0.378049 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
6cdc3cec6b99d74dc4d15d521f054da388f7f806 | 53,906 | py | Python | code/src/lm/BLANC/pytorch_pretrained_bert/dataset_processor.py | noble6emc2/MoCo-SSPT | e6d7cf3f0a3b5a467318dfc32096e4929adbe646 | [
"MIT"
] | null | null | null | code/src/lm/BLANC/pytorch_pretrained_bert/dataset_processor.py | noble6emc2/MoCo-SSPT | e6d7cf3f0a3b5a467318dfc32096e4929adbe646 | [
"MIT"
] | null | null | null | code/src/lm/BLANC/pytorch_pretrained_bert/dataset_processor.py | noble6emc2/MoCo-SSPT | e6d7cf3f0a3b5a467318dfc32096e4929adbe646 | [
"MIT"
] | null | null | null | import logging
import unicodedata
import collections
import json
import re
import gzip
import numpy as np
import six
from pytorch_pretrained_bert.tokenization import BasicTokenizer, BertTokenizer, whitespace_tokenize
from pytorch_pretrained_bert.tokenization import _is_punctuation, _is_whitespace, _is_control
class SquadExample(object):
"""
A single training/test example for the Squad dataset.
For examples without an answer, the start and end position are -1.
"""
def __init__(self,
qas_id,
question_text,
doc_tokens,
orig_answer_text=None,
start_position=None,
end_position=None,
is_impossible=None,
start_positions=None,
end_positions=None,
orig_answer_texts=None):
self.qas_id = qas_id
self.question_text = question_text
self.doc_tokens = doc_tokens
self.orig_answer_text = orig_answer_text
self.start_position = start_position
self.end_position = end_position
self.is_impossible = is_impossible
self.start_positions = start_positions
self.end_positions = end_positions
self.orig_answer_texts = orig_answer_texts
def __str__(self):
return self.__repr__()
def __repr__(self):
s = ""
s += "qas_id: %s" % (self.qas_id)
s += ", question_text: %s" % (
self.question_text)
s += ", doc_tokens: [%s]" % (" ".join(self.doc_tokens))
if self.start_position:
s += ", start_position: %d" % (self.start_position)
if self.end_position:
s += ", end_position: %d" % (self.end_position)
if self.is_impossible:
s += ", is_impossible: %r" % (self.is_impossible)
return s
class MRQAExample(object):
"""
A single training/test example for the MRQA dataset.
For examples without an answer, the start and end position are -1.
"""
def __init__(self,
qas_id,
question_text,
doc_tokens,
paragraph_text,
orig_answer_text=None,
start_positions=None,
end_positions=None,
start_position=None,
end_position=None,
is_impossible=None):
self.qas_id = qas_id
self.question_text = question_text
self.paragraph_text = paragraph_text
self.doc_tokens = doc_tokens
self.orig_answer_text = orig_answer_text
self.start_positions = start_positions
self.end_positions = end_positions
self.start_position = start_position
self.end_position = end_position
self.is_impossible = is_impossible
def __str__(self):
return self.__repr__()
def __repr__(self):
s = ""
s += "qas_id: %s" % (self.qas_id)
s += ", question_text: %s" % (
self.question_text)
s += ", doc_tokens: [%s]" % ("| ".join(self.doc_tokens))
#s += ", paragraph_text: %s" % (
# self.paragraph_text)
if self.start_positions:
s += ", start_positions: %s" % (self.start_positions)
if self.end_positions:
s += ", end_positions: %s" % (self.end_positions)
if self.is_impossible:
s += ", is_impossible: %d" % (self.is_impossible)
return s
class InputFeatures(object):
"""A single set of features of data."""
def __init__(self,
unique_id,
example_index,
doc_span_index,
tokens,
token_to_orig_map,
token_is_max_context,
input_ids,
input_mask,
segment_ids,
start_positions=None,
end_positions=None,
start_position=None,
end_position=None,
is_impossible=None):
self.unique_id = unique_id
self.example_index = example_index
self.doc_span_index = doc_span_index
self.tokens = tokens
self.token_to_orig_map = token_to_orig_map
self.token_is_max_context = token_is_max_context
self.input_ids = input_ids
self.input_mask = input_mask
self.segment_ids = segment_ids
self.start_positions = start_positions
self.end_positions = end_positions
self.start_position = start_position
self.end_position = end_position
self.is_impossible = is_impossible
def __str__(self):
return self.__repr__()
def __repr__(self):
s = ""
s += "*** Feature ***"
s += "\nunique_id: %s" % (self.unique_id)
s += "\nexample_index: %s" % (self.example_index)
s += "\ndoc_span_index: %s" % (self.doc_span_index)
s += "\ntokens: %s" % (" ".join(self.tokens))
s += "\ntoken_to_orig_map: %s" % (" ".join([
"%d:%d" % (x, y) for (x, y) in self.token_to_orig_map.items()]))
s += "\ntoken_is_max_context: %s" % (" ".join([
"%d:%s" % (x, y) for (x, y) in self.token_is_max_context.items()
]))
s += "\ninput_ids: %s" % " ".join([str(x) for x in self.input_ids])
s += "\ninput_mask: %s" % " ".join([str(x) for x in self.input_mask])
s += "\nsegment_ids: %s" % " ".join([str(x) for x in self.segment_ids])
if type(self.start_positions) == int:
s += "\nanswer_span: "+ " ".join(
self.tokens[self.start_positions:(self.end_positions + 1)])
else:
s += "\nanswer_span: "+ " ".join(
self.tokens[self.start_positions[0]:(self.end_positions[0] + 1)])
s += "\nstart_positions: %s" % (self.start_positions)
s += "\nend_positions: %s" % (self.end_positions)
return s
class BaseProcessor(object):
def __init__(self):
self.logger = logging.getLogger(__name__)
@staticmethod
def _improve_answer_span(doc_tokens, input_start, input_end, tokenizer,
orig_answer_text):
"""Returns tokenized answer spans that better match the annotated answer."""
tok_answer_text = " ".join(tokenizer.tokenize(orig_answer_text))
for new_start in range(input_start, input_end + 1):
for new_end in range(input_end, new_start - 1, -1):
text_span = " ".join(doc_tokens[new_start:(new_end + 1)])
if text_span == tok_answer_text:
return (new_start, new_end)
return (input_start, input_end)
@staticmethod
def _check_is_max_context(doc_spans, cur_span_index, position):
"""Check if this is the 'max context' doc span for the token."""
best_score = None
best_span_index = None
for (span_index, doc_span) in enumerate(doc_spans):
end = doc_span.start + doc_span.length - 1
if position < doc_span.start:
continue
if position > end:
continue
num_left_context = position - doc_span.start
num_right_context = end - position
score = min(num_left_context, num_right_context) + 0.01 * doc_span.length
if best_score is None or score > best_score:
best_score = score
best_span_index = span_index
return cur_span_index == best_span_index
def _convert_examples_to_features(self, examples, tokenizer, max_seq_length,
doc_stride, max_query_length, is_training,
first_answer_only):
"""Loads a data file into a list of `InputBatch`s."""
unique_id = 1000000000
features = []
for (example_index, example) in enumerate(examples):
query_tokens = tokenizer.tokenize(example.question_text)
if len(query_tokens) > max_query_length:
query_tokens = query_tokens[0:max_query_length]
tok_to_orig_index = []
orig_to_tok_index = []
all_doc_tokens = []
for (i, token) in enumerate(example.doc_tokens):
orig_to_tok_index.append(len(all_doc_tokens))
sub_tokens = tokenizer.tokenize(token)
for sub_token in sub_tokens:
tok_to_orig_index.append(i)
all_doc_tokens.append(sub_token)
tok_start_positions = []
tok_end_positions = []
if type(example.start_positions) != list:
temp_start_positions = [example.start_positions]
temp_end_positions = [example.end_positions]
else:
temp_start_positions = example.start_positions
temp_end_positions = example.end_positions
for start_position, end_position in zip(temp_start_positions, temp_end_positions):
tok_start_position = -1
tok_end_position = -1
tok_start_position = orig_to_tok_index[start_position]
if end_position < len(example.doc_tokens) - 1:
tok_end_position = orig_to_tok_index[end_position + 1] - 1
else:
tok_end_position = len(all_doc_tokens) - 1
(tok_start_position, tok_end_position) = self._improve_answer_span(
all_doc_tokens, tok_start_position, tok_end_position, tokenizer,
example.orig_answer_text)
tok_start_positions.append(tok_start_position)
tok_end_positions.append(tok_end_position)
# The -3 accounts for [CLS], [SEP] and [SEP]
max_tokens_for_doc = max_seq_length - len(query_tokens) - 3
# We can have documents that are longer than the maximum sequence length.
# To deal with this we do a sliding window approach, where we take chunks
# of the up to our max length with a stride of `doc_stride`.
_DocSpan = collections.namedtuple( # pylint: disable=invalid-name
"DocSpan", ["start", "length"])
doc_spans = []
start_offset = 0
while start_offset < len(all_doc_tokens):
length = len(all_doc_tokens) - start_offset
if length > max_tokens_for_doc:
length = max_tokens_for_doc
doc_spans.append(_DocSpan(start=start_offset, length=length))
if start_offset + length == len(all_doc_tokens):
break
start_offset += min(length, doc_stride)
for (doc_span_index, doc_span) in enumerate(doc_spans):
tokens = []
token_to_orig_map = {}
token_is_max_context = {}
segment_ids = []
tokens.append("[CLS]")
segment_ids.append(0)
for token in query_tokens:
tokens.append(token)
segment_ids.append(0)
tokens.append("[SEP]")
segment_ids.append(0)
for i in range(doc_span.length):
split_token_index = doc_span.start + i
token_to_orig_map[len(tokens)] = tok_to_orig_index[split_token_index]
is_max_context = self._check_is_max_context(doc_spans, doc_span_index,
split_token_index)
token_is_max_context[len(tokens)] = is_max_context
tokens.append(all_doc_tokens[split_token_index])
segment_ids.append(1)
tokens.append("[SEP]")
segment_ids.append(1)
input_ids = tokenizer.convert_tokens_to_ids(tokens)
# The mask has 1 for real tokens and 0 for padding tokens. Only real
# tokens are attended to.
input_mask = [1] * len(input_ids)
# Zero-pad up to the sequence length.
while len(input_ids) < max_seq_length:
input_ids.append(0)
input_mask.append(0)
segment_ids.append(0)
assert len(input_ids) == max_seq_length
assert len(input_mask) == max_seq_length
assert len(segment_ids) == max_seq_length
start_position = None
end_position = None
# For training, if our document chunk does not contain an annotation
# we throw it out, since there is nothing to predict.
doc_start = doc_span.start
doc_end = doc_span.start + doc_span.length - 1
start_positions = []
end_positions = []
for tok_start_position, token_end_position in zip(tok_start_positions, tok_end_positions):
out_of_span = False
if not (tok_start_position >= doc_start and
tok_end_position <= doc_end):
out_of_span = True
if out_of_span or example.is_impossible:
start_position = 0
end_position = 0
else:
doc_offset = len(query_tokens) + 2
start_position = tok_start_position - doc_start + doc_offset
end_position = tok_end_position - doc_start + doc_offset
start_positions.append(start_position)
end_positions.append(end_position)
multimatch_start_labels = np.zeros((max_seq_length,))
multimatch_end_labels = np.zeros((max_seq_length,))
multimatch_start_labels[start_positions] = 1
multimatch_end_labels[end_positions] = 1
if example_index < 0:
self.self.logger.info("*** Example ***")
self.self.logger.info("unique_id: %s" % (unique_id))
self.self.logger.info("example_index: %s" % (example_index))
self.logger.info("doc_span_index: %s" % (doc_span_index))
self.logger.info("tokens: %s" % " ".join(tokens))
self.logger.info("token_to_orig_map: %s" % " ".join([
"%d:%d" % (x, y) for (x, y) in token_to_orig_map.items()]))
self.logger.info("token_is_max_context: %s" % " ".join([
"%d:%s" % (x, y) for (x, y) in token_is_max_context.items()
]))
self.logger.info("input_ids: %s" % " ".join([str(x) for x in input_ids]))
self.logger.info(
"input_mask: %s" % " ".join([str(x) for x in input_mask]))
self.logger.info(
"segment_ids: %s" % " ".join([str(x) for x in segment_ids]))
if is_training:
answer_text = " ".join(tokens[start_positions[0]:(end_positions[0] + 1)])
self.logger.info("start_positions: %s" % (start_positions))
self.logger.info("end_positions: %s" % (end_positions))
self.logger.info("start_labels: %s" % (multimatch_start_labels))
self.logger.info("end_labels: %s" % (multimatch_end_labels))
self.logger.info(
"answer: %s" % (answer_text))
if first_answer_only:
start_positions = start_positions[0]
end_positions = end_positions[0]
features.append(
InputFeatures(
unique_id=unique_id,
example_index=example_index,
doc_span_index=doc_span_index,
tokens=tokens, # Query + Passage Span
token_to_orig_map=token_to_orig_map,
token_is_max_context=token_is_max_context,
input_ids=input_ids, # Mask for max seq length
input_mask=input_mask, # Vocab id list
segment_ids=segment_ids,
start_positions=start_positions, # Answer start pos(Query included)
end_positions=end_positions,
start_position=start_positions,
end_position=end_positions,))
unique_id += 1
return features
def tokenize_chinese(self, text, masking, do_lower_case):
temp_x = ""
text = self.convert_to_unicode(text)
idx = 0
if do_lower_case:
text = text.lower()
while(idx < len(text)):
c = text[idx]
if masking is not None and text[idx: idx + len(masking)] == masking.lower():
temp_x += masking
idx += len(masking)
continue
elif BasicTokenizer._is_chinese_char(ord(c)) or _is_punctuation(c) or \
_is_whitespace(c) or _is_control(c):
temp_x += " " + c + " "
else:
temp_x += c
idx += 1
return temp_x.split()
def convert_to_unicode(self, text):
"""Converts `text` to Unicode (if it's not already), assuming utf-8 input."""
if six.PY3:
if isinstance(text, str):
return text
elif isinstance(text, bytes):
return text.decode("utf-8", "ignore")
else:
raise ValueError("Unsupported string type: %s" % (type(text)))
elif six.PY2:
if isinstance(text, str):
return text.decode("utf-8", "ignore")
elif isinstance(text, unicode):
return text
else:
raise ValueError("Unsupported string type: %s" % (type(text)))
else:
raise ValueError("Not running on Python2 or Python 3?")
def convert_english_examples_to_features(self, *args, **kwargs):
return self._convert_examples_to_features(*args, **kwargs)
def convert_chinese_examples_to_features(self, *args, **kwargs):
return self._convert_examples_to_features(*args, **kwargs)
class PretrainingProcessor(BaseProcessor):
def read_chinese_examples(self, line_list, is_training,
first_answer_only, replace_mask, do_lower_case,
remove_query_in_passage):
"""Read a Chinese json file for pretraining into a list of MRQAExample."""
input_data = [json.loads(line) for line in line_list] #.decode('utf-8').strip()
def is_whitespace(c):
if c == " " or c == "\t" or c == "\r" or c == "\n" or ord(c) == 0x202F:
return True
cat = unicodedata.category(c)
if cat == "Zs":
return True
return False
examples = []
num_answers = 0
for i, article in enumerate(input_data):
for entry in article["paragraphs"]:
paragraph_text = entry["context"].strip()
raw_doc_tokens = self.tokenize_chinese(paragraph_text,
masking = None,
do_lower_case= do_lower_case)
doc_tokens = []
char_to_word_offset = []
prev_is_whitespace = True
k = 0
temp_word = ""
for c in paragraph_text:
if is_whitespace(c):
char_to_word_offset.append(k - 1)
continue
else:
temp_word += c
char_to_word_offset.append(k)
if do_lower_case:
temp_word = temp_word.lower()
if temp_word == raw_doc_tokens[k]:
doc_tokens.append(temp_word)
temp_word = ""
k += 1
if k != len(raw_doc_tokens):
self.logger.info("Warning: paragraph '{}' tokenization error ".format(paragraph_text))
continue
for qa in entry["qas"]:
qas_id = article["id"] + "_" + entry["id"] + "_" + qa["id"]
if qa["question"].find('UNK') == -1:
print(f"WARNING: Cannot Find UNK in Question %s" % qas_id)
continue
if remove_query_in_passage:
query = qa["question"]
mask_start = query.find("UNK")
mask_end = mask_start + 3
pattern = (re.escape(unicodedata.normalize('NFKC', query[:mask_start].strip())) +
".*" + re.escape(unicodedata.normalize('NFKC', query[mask_end:].strip())))
if re.search(pattern,
unicodedata.normalize('NFKC', paragraph_text)) is not None:
#print(f"WARNING: Query in Passage Detected in Question %s" % qas_id)
#print("Question", query, "Passage", paragraph_text)
continue
question_text = qa["question"].replace("UNK", replace_mask)
is_impossible = qa.get('is_impossible', False)
start_position = None
end_position = None
orig_answer_text = None
answers = qa["answers"]
num_answers += sum([len(spans['answer_all_start']) for spans in answers])
# import ipdb
# ipdb.set_trace()
spans = sorted([[start, start + len(ans['text']) - 1, ans['text']]
for ans in answers for start in ans['answer_all_start']])
#print("spans", spans)
# take first span
if first_answer_only:
include_span_num = 1
else:
include_span_num = len(spans)
start_positions = []
end_positions = []
for i in range(min(include_span_num, len(spans))):
char_start, char_end, answer_text = spans[i][0], spans[i][1], spans[i][2]
orig_answer_text = paragraph_text[char_start:char_end+1]
#print("orig_answer_text", orig_answer_text)
if orig_answer_text != answer_text:
self.logger.info("Answer error: {}, Original {}".format(
answer_text, orig_answer_text))
continue
start_position, end_position = char_to_word_offset[char_start], char_to_word_offset[char_end]
#print("start_position", "end_position", start_position, end_position)
#print("doc_tokens", doc_tokens)
start_positions.append(start_position)
end_positions.append(end_position)
if len(spans) == 0:
start_positions.append(0)
end_positions.append(0)
if first_answer_only:
start_positions = start_positions[0]
end_positions = end_positions[0]
example = MRQAExample(
qas_id=qas_id,
question_text=question_text, #question
paragraph_text=paragraph_text, # context text
doc_tokens=doc_tokens, #passage text
orig_answer_text=orig_answer_text, # answer text
start_positions=start_positions, #answer start
end_positions=end_positions, #answer end
is_impossible=is_impossible)
examples.append(example)
#logger.info('Num avg answers: {}'.format(num_answers / len(examples)))
return examples
def read_english_examples(self, line_list, is_training,
first_answer_only, replace_mask, do_lower_case):
"""Read a English json file for pretraining into a list of MRQAExample."""
input_data = [json.loads(line) for line in line_list] #.decode('utf-8').strip()
def is_whitespace(c):
if c == " " or c == "\t" or c == "\r" or c == "\n" or ord(c) == 0x202F:
return True
cat = unicodedata.category(c)
if cat == "Zs":
return True
return False
examples = []
num_answers = 0
for i, article in enumerate(input_data):
paragraph_text = article["passage"].strip()
doc_tokens = []
char_to_word_offset = []
prev_is_whitespace = True
for c in paragraph_text:
if is_whitespace(c):
prev_is_whitespace = True
else:
if prev_is_whitespace:
doc_tokens.append(c)
else:
doc_tokens[-1] += c
prev_is_whitespace = False
char_to_word_offset.append(len(doc_tokens) - 1)
#for a_id, answer in enumerate(article["answers"]):
qas_id = article["qid"]
if article["question"].find('[BLANK]') == -1:
print(f"WARNING: Cannot Find [BLANK] in Question %s" % qas_id)
continue
'''if remove_query_in_passage:
query = qa["question"]
mask_start = query.find("UNK")
mask_end = mask_start + 3
pattern = (re.escape(unicodedata.normalize('NFKC', query[:mask_start].strip())) +
".*" + re.escape(unicodedata.normalize('NFKC', query[mask_end:].strip())))
if re.search(pattern,
unicodedata.normalize('NFKC', paragraph_text)) is not None:
#print(f"WARNING: Query in Passage Detected in Question %s" % qas_id)
#print("Question", query, "Passage", paragraph_text)
continue'''
question_text = article["question"].replace("[BLANK]", replace_mask)
start_position = None
end_position = None
orig_answer_text = None
is_impossible = False
answers = [
{
'text': ans,
'answer_all_start': [m.start()
for m in re.finditer(re.escape(ans), paragraph_text)]
}
for ans in article["answers"]
]
num_answers += sum([len(spans['answer_all_start']) for spans in answers])
# import ipdb
# ipdb.set_trace()
spans = sorted([[start, start + len(ans['text']) - 1, ans['text']]
for ans in answers for start in ans['answer_all_start']])
#print("spans", spans)
# take first span
if first_answer_only:
include_span_num = 1
else:
include_span_num = len(spans)
start_positions = []
end_positions = []
#print("spans length:", len(spans))
#print("article[\"answers\"]", article["answers"])
#input()
for i in range(min(include_span_num, len(spans))):
char_start, char_end, answer_text = spans[i][0], spans[i][1], spans[i][2]
orig_answer_text = paragraph_text[char_start:char_end+1]
#print("orig_answer_text", orig_answer_text)
if orig_answer_text != answer_text:
self.logger.info("Answer error: {}, Original {}".format(
answer_text, orig_answer_text))
continue
start_position, end_position = char_to_word_offset[char_start], char_to_word_offset[char_end]
#print("start_position", "end_position", start_position, end_position)
#print("doc_tokens", doc_tokens)
start_positions.append(start_position)
end_positions.append(end_position)
if len(spans) == 0:
start_positions.append(0)
end_positions.append(0)
orig_answer_text = ''
is_impossible = True
if first_answer_only:
start_positions = start_positions[0]
end_positions = end_positions[0]
example = MRQAExample(
qas_id=qas_id,
question_text=question_text, #question
paragraph_text=paragraph_text, # context text
doc_tokens=doc_tokens, #passage text
orig_answer_text=orig_answer_text, # answer text
start_positions=start_positions, #answer start
end_positions=end_positions, #answer end
is_impossible=is_impossible
)
examples.append(example)
#self.logger.info('Num avg answers: {}'.format(num_answers / len(examples)))
return examples
class MRQAProcessor(BaseProcessor):
def read_mrqa_examples(self, input_file, is_training,
first_answer_only, do_lower_case,
remove_query_in_passage):
"""Read crmc json file for pretraining into a list of MRQAExample."""
with gzip.GzipFile(input_file, 'r') as reader:
# skip header
content = reader.read().decode('utf-8').strip().split('\n')[1:]
input_data = [json.loads(line) for line in content]
def is_whitespace(c):
if c == " " or c == "\t" or c == "\r" or c == "\n" or ord(c) == 0x202F:
return True
return False
examples = []
num_answers = 0
datasets = []
for i, entry in enumerate(input_data):
if i % 1000 == 0:
self.logger.info("Processing %d / %d.." % (i, len(input_data)))
paragraph_text = entry["context"]
doc_tokens = []
char_to_word_offset = []
prev_is_whitespace = True
for c in paragraph_text:
if is_whitespace(c):
prev_is_whitespace = True
else:
if prev_is_whitespace:
doc_tokens.append(c)
else:
doc_tokens[-1] += c
prev_is_whitespace = False
char_to_word_offset.append(len(doc_tokens) - 1)
for qa in entry["qas"]:
qas_id = qa["qid"]
question_text = qa["question"]# .replace("UNK", replace_mask)
is_impossible = qa.get('is_impossible', False)
start_position = None
end_position = None
orig_answer_text = None
answers = qa["detected_answers"]
# import ipdb
# ipdb.set_trace()
spans = sorted([span for spans in answers for span in spans['char_spans']])
# take first span
char_start, char_end = spans[0][0], spans[0][1]
orig_answer_text = paragraph_text[char_start:char_end+1]
start_position, end_position = char_to_word_offset[char_start], char_to_word_offset[char_end]
num_answers += sum([len(spans['char_spans']) for spans in answers])
example = MRQAExample(
qas_id=qas_id,
question_text=question_text, #question
paragraph_text=paragraph_text, # context text
doc_tokens=doc_tokens, #passage text
orig_answer_text=orig_answer_text, # answer text
start_positions=start_position, #answer start
end_positions=end_position, #answer end
start_position=start_position,
end_position=end_position,
is_impossible=is_impossible)
examples.append(example)
self.logger.info('Num avg answers: {}'.format(num_answers / len(examples)))
return examples
def read_examples(self, *args, **kwargs):
return self.read_mrqa_examples(*args, **kwargs)
def convert_mrqa_examples_to_features(self, *args, **kwargs):
return self._convert_examples_to_features(*args, **kwargs)
class SQuADProcessor(BaseProcessor):
def read_squad_examples(self, input_file, is_training, version_2_with_negative):
"""Read a SQuAD json file into a list of SquadExample."""
with open(input_file, "r", encoding='utf-8') as reader:
input_data = json.load(reader)["data"]
def is_whitespace(c):
if c == " " or c == "\t" or c == "\r" or c == "\n" or ord(c) == 0x202F:
return True
return False
examples = []
for entry in input_data:
for paragraph in entry["paragraphs"]:
paragraph_text = paragraph["context"]
doc_tokens = []
char_to_word_offset = []
prev_is_whitespace = True
for c in paragraph_text:
if is_whitespace(c):
prev_is_whitespace = True
else:
if prev_is_whitespace:
doc_tokens.append(c)
else:
doc_tokens[-1] += c
prev_is_whitespace = False
char_to_word_offset.append(len(doc_tokens) - 1)
for qa in paragraph["qas"]:
qas_id = qa["id"]
question_text = qa["question"]
start_position = None
end_position = None
orig_answer_text = None
is_impossible = False
start_positions = []
end_positions = []
orig_answer_texts = []
if is_training:
if version_2_with_negative:
is_impossible = qa["is_impossible"]
if (len(qa["answers"]) != 1) and (not is_impossible):
raise ValueError(
"For training, each question should have exactly 1 answer.")
if not is_impossible:
answer = qa["answers"][0]
orig_answer_text = answer["text"]
answer_offset = answer["answer_start"]
answer_length = len(orig_answer_text)
start_position = char_to_word_offset[answer_offset]
end_position = char_to_word_offset[answer_offset + answer_length - 1]
actual_text = " ".join(doc_tokens[start_position:(end_position + 1)])
cleaned_answer_text = " ".join(
whitespace_tokenize(orig_answer_text))
if actual_text.find(cleaned_answer_text) == -1:
self.logger.warning("Could not find answer: '%s' vs. '%s'",
actual_text, cleaned_answer_text)
continue
else:
start_position = -1
end_position = -1
orig_answer_text = ""
else:
if version_2_with_negative:
is_impossible = qa["is_impossible"]
if not is_impossible:
answers = qa["answers"]
for answer in answers:
orig_answer_text = answer["text"]
answer_offset = answer["answer_start"]
answer_length = len(orig_answer_text)
start_position = char_to_word_offset[answer_offset]
end_position = char_to_word_offset[answer_offset + answer_length - 1]
actual_text = " ".join(doc_tokens[start_position:(end_position + 1)])
cleaned_answer_text = " ".join(
whitespace_tokenize(orig_answer_text))
if actual_text.find(cleaned_answer_text) == -1:
self.logger.warning("Could not find answer: '%s' vs. '%s'",
actual_text, cleaned_answer_text)
continue
start_positions.append(start_position)
end_positions.append(end_position)
orig_answer_texts.append(orig_answer_text)
else:
start_position = -1
end_position = -1
orig_answer_text = ""
start_positions.append(start_position)
end_positions.append(end_position)
orig_answer_texts.append(orig_answer_text)
example = SquadExample(
qas_id=qas_id,
question_text=question_text,
doc_tokens=doc_tokens,
orig_answer_text=orig_answer_text,
start_position=start_position,
end_position=end_position,
is_impossible=is_impossible,
start_positions=start_positions,
end_positions=end_positions,
orig_answer_texts=orig_answer_texts)
examples.append(example)
return examples
def convert_squad_examples_to_features(self, examples, tokenizer, max_seq_length,
doc_stride, max_query_length, is_training):
"""Loads a data file into a list of `InputBatch`s."""
unique_id = 1000000000
features = []
for (example_index, example) in enumerate(examples):
query_tokens = tokenizer.tokenize(example.question_text)
if len(query_tokens) > max_query_length:
query_tokens = query_tokens[0:max_query_length]
tok_to_orig_index = []
orig_to_tok_index = []
all_doc_tokens = []
for (i, token) in enumerate(example.doc_tokens):
orig_to_tok_index.append(len(all_doc_tokens))
sub_tokens = tokenizer.tokenize(token)
for sub_token in sub_tokens:
tok_to_orig_index.append(i)
all_doc_tokens.append(sub_token)
tok_start_position = None
tok_end_position = None
if example.is_impossible:
tok_start_position = -1
tok_end_position = -1
if not example.is_impossible:
tok_start_position = orig_to_tok_index[example.start_position]
if example.end_position < len(example.doc_tokens) - 1:
tok_end_position = orig_to_tok_index[example.end_position + 1] - 1
else:
tok_end_position = len(all_doc_tokens) - 1
(tok_start_position, tok_end_position) = self._improve_answer_span(
all_doc_tokens, tok_start_position, tok_end_position, tokenizer,
example.orig_answer_text)
# The -3 accounts for [CLS], [SEP] and [SEP]
max_tokens_for_doc = max_seq_length - len(query_tokens) - 3
_DocSpan = collections.namedtuple(
"DocSpan", ["start", "length"])
doc_spans = []
start_offset = 0
while start_offset < len(all_doc_tokens):
length = len(all_doc_tokens) - start_offset
if length > max_tokens_for_doc:
length = max_tokens_for_doc
doc_spans.append(_DocSpan(start=start_offset, length=length))
if start_offset + length == len(all_doc_tokens):
break
start_offset += min(length, doc_stride)
for (doc_span_index, doc_span) in enumerate(doc_spans):
tokens = []
token_to_orig_map = {}
token_is_max_context = {}
segment_ids = []
tokens.append("[CLS]")
segment_ids.append(0)
for token in query_tokens:
tokens.append(token)
segment_ids.append(0)
tokens.append("[SEP]")
segment_ids.append(0)
for i in range(doc_span.length):
split_token_index = doc_span.start + i
token_to_orig_map[len(tokens)] = tok_to_orig_index[split_token_index]
is_max_context = self._check_is_max_context(doc_spans, doc_span_index,
split_token_index)
token_is_max_context[len(tokens)] = is_max_context
tokens.append(all_doc_tokens[split_token_index])
segment_ids.append(1)
tokens.append("[SEP]")
segment_ids.append(1)
input_ids = tokenizer.convert_tokens_to_ids(tokens)
input_mask = [1] * len(input_ids)
while len(input_ids) < max_seq_length:
input_ids.append(0)
input_mask.append(0)
segment_ids.append(0)
assert len(input_ids) == max_seq_length
assert len(input_mask) == max_seq_length
assert len(segment_ids) == max_seq_length
start_position = None
end_position = None
if not example.is_impossible:
doc_start = doc_span.start
doc_end = doc_span.start + doc_span.length - 1
out_of_span = False
if not (tok_start_position >= doc_start and
tok_end_position <= doc_end):
out_of_span = True
if out_of_span:
start_position = 0
end_position = 0
else:
doc_offset = len(query_tokens) + 2
start_position = tok_start_position - doc_start + doc_offset
end_position = tok_end_position - doc_start + doc_offset
if example.is_impossible:
start_position = 0
end_position = 0
continue
if example_index < 0:
self.logger.info("*** Example ***")
self.logger.info("unique_id: %s" % (unique_id))
self.logger.info("example_index: %s" % (example_index))
self.logger.info("doc_span_index: %s" % (doc_span_index))
self.logger.info("tokens: %s" % " ".join(tokens))
self.logger.info("token_to_orig_map: %s" % " ".join([
"%d:%d" % (x, y) for (x, y) in token_to_orig_map.items()]))
self.logger.info("token_is_max_context: %s" % " ".join([
"%d:%s" % (x, y) for (x, y) in token_is_max_context.items()
]))
self.logger.info("input_ids: %s" % " ".join([str(x) for x in input_ids]))
self.logger.info(
"input_mask: %s" % " ".join([str(x) for x in input_mask]))
self.logger.info(
"segment_ids: %s" % " ".join([str(x) for x in segment_ids]))
if is_training and example.is_impossible:
self.logger.info("impossible example")
if is_training and not example.is_impossible:
answer_text = " ".join(tokens[start_position:(end_position + 1)])
self.logger.info("start_position: %d" % (start_position))
self.logger.info("end_position: %d" % (end_position))
self.logger.info(
"answer: %s" % (answer_text))
features.append(
InputFeatures(
unique_id=unique_id,
example_index=example_index,
doc_span_index=doc_span_index,
tokens=tokens,
token_to_orig_map=token_to_orig_map,
token_is_max_context=token_is_max_context,
input_ids=input_ids,
input_mask=input_mask,
segment_ids=segment_ids,
start_position=start_position,
end_position=end_position,
is_impossible=example.is_impossible))
unique_id += 1
return features
def read_examples(self, *args, **kwargs):
return self.read_squad_examples(*args, **kwargs)
class CMRCProcessor(BaseProcessor):
def read_cmrc_examples(self, input_file, is_training,
first_answer_only, do_lower_case,
remove_query_in_passage):
"""Read crmc json file for pretraining into a list of MRQAExample."""
with open(input_file, 'r', encoding='utf-8') as fin:
# skip header
input_js = json.load(fin)
input_data = input_js["data"]
def is_whitespace(c):
if c == " " or c == "\t" or c == "\r" or c == "\n" or ord(c) == 0x202F:
return True
cat = unicodedata.category(c)
if cat == "Zs":
return True
return False
examples = []
num_answers = 0
datasets = []
for i, article in enumerate(input_data):
for entry in article["paragraphs"]:
paragraph_text = entry["context"].strip()
raw_doc_tokens = self.tokenize_chinese(paragraph_text,
masking = None,
do_lower_case= do_lower_case)
doc_tokens = []
char_to_word_offset = []
prev_is_whitespace = True
k = 0
temp_word = ""
for c in paragraph_text:
if is_whitespace(c):
char_to_word_offset.append(k - 1)
continue
else:
temp_word += c
char_to_word_offset.append(k)
if do_lower_case:
temp_word = temp_word.lower()
if temp_word == raw_doc_tokens[k]:
doc_tokens.append(temp_word)
temp_word = ""
k += 1
if k != len(raw_doc_tokens):
self.logger.info("Warning: paragraph '{}' tokenization error'{}'".format(paragraph_text))
continue
for qa in entry["qas"]:
qas_id = qa["id"]
'''if qa["question"].find('UNK') == -1:
logger.info(f"WARNING: Cannot Find UNK in Question %s" % qas_id)
continue'''
if remove_query_in_passage:
query = qa["question"]
mask_start = query.find("UNK")
mask_end = mask_start + 3
pattern = (re.escape(unicodedata.normalize('NFKC', query[:mask_start].strip())) +
".*" + re.escape(unicodedata.normalize('NFKC', query[mask_end:].strip())))
if re.search(pattern,
unicodedata.normalize('NFKC', paragraph_text)) is not None:
#print(f"WARNING: Query in Passage Detected in Question %s" % qas_id)
#print("Question", query, "Passage", paragraph_text)
continue
question_text = qa["question"]# .replace("UNK", replace_mask)
is_impossible = qa.get('is_impossible', False)
start_position = None
end_position = None
orig_answer_text = None
answers = qa["answers"]
num_answers += len(answers)
# import ipdb
# ipdb.set_trace()
'''
[
[ans['answer_start'] + 1,
ans['answer_start'] + len(ans['text']),
ans['text']]
for ans in answers]
'''
ans_list = []
answer_text_list = []
for ans in answers:
answer_text_list.append(ans['text'])
if ans['answer_start'] == -1:
continue
if paragraph_text[ans['answer_start']:].startswith(ans['text']):
ans_list.append([ans['answer_start'],
ans['answer_start'] + len(ans['text']) - 1,
ans['text']]
)
elif paragraph_text[ans['answer_start'] - 2:].startswith(ans['text']):
ans_list.append([ans['answer_start'] - 2,
ans['answer_start'] + len(ans['text']) - 3,
ans['text']]
)
else:
ans_list.append([ans['answer_start'] - 1,
ans['answer_start'] + len(ans['text']) - 2,
ans['text']]
)
spans = sorted(ans_list)
#print("spans", spans)
# take first span
if first_answer_only:
include_span_num = 1
else:
include_span_num = len(spans)
start_positions = []
end_positions = []
for i in range(min(include_span_num, len(spans))):
char_start, char_end, answer_text = spans[i][0], spans[i][1], spans[i][2]
orig_answer_text = paragraph_text[char_start:char_end+1]
#print("orig_answer_text", orig_answer_text)
if orig_answer_text != answer_text:
self.logger.info("Answer error: {}, Original {}".format(
answer_text, orig_answer_text))
print(paragraph_text[char_start:])
continue
start_position, end_position = char_to_word_offset[char_start], char_to_word_offset[char_end]
#print("start_position", "end_position", start_position, end_position)
#print("doc_tokens", doc_tokens)
start_positions.append(start_position)
end_positions.append(end_position)
if len(spans) == 0:
start_positions.append(0)
end_positions.append(0)
if first_answer_only:
start_positions = start_positions[0]
end_positions = end_positions[0]
datasets.append({'qid': qas_id, 'answers': answer_text_list})
example = MRQAExample(
qas_id=qas_id,
question_text=question_text, #question
paragraph_text=paragraph_text, # context text
doc_tokens=doc_tokens, #passage text
orig_answer_text=orig_answer_text, # answer text
start_positions=start_positions, #answer start
end_positions=end_positions, #answer end
start_position=start_positions,
end_position=end_positions,
is_impossible=is_impossible)
examples.append(example)
#logger.info('Num avg answers: {}'.format(num_answers / len(examples)))
return examples, datasets
def read_examples(self, *args, **kwargs):
return self.read_cmrc_examples(*args, **kwargs) | 44.513625 | 117 | 0.505621 | 5,600 | 53,906 | 4.548571 | 0.058571 | 0.035843 | 0.02858 | 0.015075 | 0.801311 | 0.769904 | 0.736063 | 0.723186 | 0.702301 | 0.673014 | 0 | 0.006851 | 0.407042 | 53,906 | 1,211 | 118 | 44.513625 | 0.790045 | 0.060606 | 0 | 0.733126 | 0 | 0 | 0.046589 | 0.001316 | 0.002077 | 0 | 0.000607 | 0 | 0.006231 | 1 | 0.033229 | false | 0.006231 | 0.010384 | 0.009346 | 0.093458 | 0.003115 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
9f2d8c15eaf6ebf44b54d27a3cb64fde91cf3226 | 231 | py | Python | yangs/nokia-nsp/nokia-nsp-l3vpn/python/nokia_nsp_l3vpn/__init__.py | janlindblad/eantc21 | 8dd3e564538555a7461a98ea7129619b73eb56ee | [
"BSD-3-Clause"
] | null | null | null | yangs/nokia-nsp/nokia-nsp-l3vpn/python/nokia_nsp_l3vpn/__init__.py | janlindblad/eantc21 | 8dd3e564538555a7461a98ea7129619b73eb56ee | [
"BSD-3-Clause"
] | null | null | null | yangs/nokia-nsp/nokia-nsp-l3vpn/python/nokia_nsp_l3vpn/__init__.py | janlindblad/eantc21 | 8dd3e564538555a7461a98ea7129619b73eb56ee | [
"BSD-3-Clause"
] | null | null | null | #
# BEWARE BEWARE BEWARE BEWARE BEWARE BEWARE BEWARE BEWARE BEWARE
# This file has been auto-generated by the confdc compiler.
# Source: ../load-dir/l3vpn-svc.fxs
# BEWARE BEWARE BEWARE BEWARE BEWARE BEWARE BEWARE BEWARE BEWARE
#
| 28.875 | 64 | 0.774892 | 34 | 231 | 5.264706 | 0.5 | 1.072626 | 1.407821 | 1.608939 | 0.603352 | 0.603352 | 0.603352 | 0.603352 | 0.603352 | 0 | 0 | 0.005128 | 0.155844 | 231 | 7 | 65 | 33 | 0.912821 | 0.939394 | 0 | null | 1 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
980cab6798733cc9f37b8f34fda569217620fcd7 | 7,655 | py | Python | south/tests/autodetection.py | nimalegebihahaha/my_blog | 5cf718e11a708d3268c340cbd1b35a25fb03240b | [
"BSD-3-Clause"
] | 5 | 2016-01-15T08:09:48.000Z | 2018-07-07T13:20:33.000Z | south/tests/autodetection.py | nimalegebihahaha/my_blog | 5cf718e11a708d3268c340cbd1b35a25fb03240b | [
"BSD-3-Clause"
] | null | null | null | south/tests/autodetection.py | nimalegebihahaha/my_blog | 5cf718e11a708d3268c340cbd1b35a25fb03240b | [
"BSD-3-Clause"
] | 4 | 2015-06-09T08:44:35.000Z | 2019-07-31T00:13:11.000Z | import unittest
from south.management.commands import startmigration
class TestComparison(unittest.TestCase):
"""
Tests the comparison methods of startmigration.
"""
def test_no_change(self):
"Test with a completely unchanged definition."
self.assertEqual(
startmigration.different_attributes(
('django.db.models.fields.related.ForeignKey', [], {'to': "orm['southdemo.Lizard']"}),
('django.db.models.fields.related.ForeignKey', [], {'to': "orm['southdemo.Lizard']"}),
),
False,
)
self.assertEqual(
startmigration.different_attributes(
('django.db.models.fields.related.ForeignKey', ['ohhai', 'there'], {'to': "somewhere", "from": "there"}),
('django.db.models.fields.related.ForeignKey', ['ohhai', 'there'], {"from": "there", 'to': "somewhere"}),
),
False,
)
def test_pos_change(self):
"Test with a changed positional argument."
self.assertEqual(
startmigration.different_attributes(
('django.db.models.fields.CharField', ['hi'], {'to': "foo"}),
('django.db.models.fields.CharField', [], {'to': "foo"}),
),
True,
)
self.assertEqual(
startmigration.different_attributes(
('django.db.models.fields.CharField', [], {'to': "foo"}),
('django.db.models.fields.CharField', ['bye'], {'to': "foo"}),
),
True,
)
self.assertEqual(
startmigration.different_attributes(
('django.db.models.fields.CharField', ['pi'], {'to': "foo"}),
('django.db.models.fields.CharField', ['pi'], {'to': "foo"}),
),
False,
)
self.assertEqual(
startmigration.different_attributes(
('django.db.models.fields.CharField', ['pisdadad'], {'to': "foo"}),
('django.db.models.fields.CharField', ['pi'], {'to': "foo"}),
),
True,
)
self.assertEqual(
startmigration.different_attributes(
('django.db.models.fields.CharField', ['hi'], {}),
('django.db.models.fields.CharField', [], {}),
),
True,
)
self.assertEqual(
startmigration.different_attributes(
('django.db.models.fields.CharField', [], {}),
('django.db.models.fields.CharField', ['bye'], {}),
),
True,
)
self.assertEqual(
startmigration.different_attributes(
('django.db.models.fields.CharField', ['pi'], {}),
('django.db.models.fields.CharField', ['pi'], {}),
),
False,
)
self.assertEqual(
startmigration.different_attributes(
('django.db.models.fields.CharField', ['pi'], {}),
('django.db.models.fields.CharField', ['45fdfdf'], {}),
),
True,
)
def test_kwd_change(self):
"Test a changed keyword argument"
self.assertEqual(
startmigration.different_attributes(
('django.db.models.fields.CharField', ['pi'], {'to': "foo"}),
('django.db.models.fields.CharField', ['pi'], {'to': "blue"}),
),
True,
)
self.assertEqual(
startmigration.different_attributes(
('django.db.models.fields.CharField', [], {'to': "foo"}),
('django.db.models.fields.CharField', [], {'to': "blue"}),
),
True,
)
self.assertEqual(
startmigration.different_attributes(
('django.db.models.fields.CharField', ['b'], {'to': "foo"}),
('django.db.models.fields.CharField', ['b'], {'to': "blue"}),
),
True,
)
self.assertEqual(
startmigration.different_attributes(
('django.db.models.fields.CharField', [], {'to': "foo"}),
('django.db.models.fields.CharField', [], {}),
),
True,
)
self.assertEqual(
startmigration.different_attributes(
('django.db.models.fields.CharField', ['a'], {'to': "foo"}),
('django.db.models.fields.CharField', ['a'], {}),
),
True,
)
self.assertEqual(
startmigration.different_attributes(
('django.db.models.fields.CharField', [], {}),
('django.db.models.fields.CharField', [], {'to': "foo"}),
),
True,
)
self.assertEqual(
startmigration.different_attributes(
('django.db.models.fields.CharField', ['a'], {}),
('django.db.models.fields.CharField', ['a'], {'to': "foo"}),
),
True,
)
def test_backcompat_nochange(self):
"Test that the backwards-compatable comparison is working"
self.assertEqual(
startmigration.different_attributes(
('models.CharField', [], {}),
('django.db.models.fields.CharField', [], {}),
),
False,
)
self.assertEqual(
startmigration.different_attributes(
('models.CharField', ['ack'], {}),
('django.db.models.fields.CharField', ['ack'], {}),
),
False,
)
self.assertEqual(
startmigration.different_attributes(
('models.CharField', [], {'to':'b'}),
('django.db.models.fields.CharField', [], {'to':'b'}),
),
False,
)
self.assertEqual(
startmigration.different_attributes(
('models.CharField', ['hah'], {'to':'you'}),
('django.db.models.fields.CharField', ['hah'], {'to':'you'}),
),
False,
)
self.assertEqual(
startmigration.different_attributes(
('models.CharField', ['hah'], {'to':'you'}),
('django.db.models.fields.CharField', ['hah'], {'to':'heh'}),
),
True,
)
self.assertEqual(
startmigration.different_attributes(
('models.CharField', ['hah'], {}),
('django.db.models.fields.CharField', [], {'to':"orm['appname.hah']"}),
),
False,
)
self.assertEqual(
startmigration.different_attributes(
('models.CharField', ['hah'], {}),
('django.db.models.fields.CharField', [], {'to':'hah'}),
),
True,
)
self.assertEqual(
startmigration.different_attributes(
('models.CharField', ['hah'], {}),
('django.db.models.fields.CharField', [], {'to':'rrr'}),
),
True,
)
self.assertEqual(
startmigration.different_attributes(
('models.CharField', ['hah'], {}),
('django.db.models.fields.IntField', [], {'to':'hah'}),
),
True,
) | 32.854077 | 121 | 0.458132 | 564 | 7,655 | 6.157801 | 0.12766 | 0.09905 | 0.173337 | 0.247625 | 0.873596 | 0.854305 | 0.834437 | 0.797581 | 0.729053 | 0.727613 | 0 | 0.00042 | 0.377531 | 7,655 | 233 | 122 | 32.854077 | 0.728437 | 0.029001 | 0 | 0.689119 | 0 | 0 | 0.277888 | 0.19755 | 0 | 0 | 0 | 0 | 0.134715 | 1 | 0.020725 | false | 0 | 0.010363 | 0 | 0.036269 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
e21d0e4f5e19d33070031612f4cceabee3da4eaa | 5,211 | py | Python | snippets/create-Selenium-python-wd-unittest.py | boisde/Greed_Island | 9c4f0195fb7bfaeb6c29e8e9638c7b0ffd9ad90b | [
"MIT"
] | null | null | null | snippets/create-Selenium-python-wd-unittest.py | boisde/Greed_Island | 9c4f0195fb7bfaeb6c29e8e9638c7b0ffd9ad90b | [
"MIT"
] | null | null | null | snippets/create-Selenium-python-wd-unittest.py | boisde/Greed_Island | 9c4f0195fb7bfaeb6c29e8e9638c7b0ffd9ad90b | [
"MIT"
] | 2 | 2016-09-10T08:13:06.000Z | 2021-05-12T18:57:05.000Z | # -*- coding: utf-8 -*-
import unittest
from selenium import webdriver
from selenium.webdriver.support.wait import WebDriverWait
def every_downloads_chrome(driver):
if not driver.current_url.startswith("chrome://downloads"):
driver.get("chrome://downloads/")
return driver.execute_script("""
var elements = document.querySelector('downloads-manager')
.shadowRoot.querySelector('#downloadsList')
.items
if (elements.every(e => e.state === 'COMPLETE'))
return elements.map(e => e.filePath || e.file_path || e.fileUrl || e.file_url);
""")
# class Create(unittest.TestCase):
# def setUp(self):
# chrome_options = webdriver.ChromeOptions()
# prefs = {'download.default_directory': '/Users/chenxinlu/Downloads/tron-wallet/'}
# chrome_options.add_experimental_option('prefs', prefs)
# self.driver = webdriver.Chrome(options=chrome_options, executable_path="/usr/local/bin/chromedriver")
# self.driver.implicitly_wait(10)
# self.verificationErrors = []
# self.accept_next_alert = True
#
# def test_create(self):
# driver = self.driver
# # Label: Test
# driver.get("https://tronscan.org/#/walletwizard")
# driver.find_element_by_name("password_input").click()
# driver.find_element_by_name("password_input").clear()
# driver.find_element_by_name("password_input").send_keys(
# "innocentkitfaithpaperhorsearmysaydistancekingdomboardtouristmeat")
# driver.find_element_by_css_selector("button.btn.btn-dark.btn-lg.ml-auto > span").click()
# driver.find_element_by_css_selector("button.btn.btn-lg.btn-block > span").click()
# # waits for all the files to be completed and returns the paths
# paths = WebDriverWait(driver, 120, 1).until(every_downloads_chrome)
# print(paths)
#
# def is_element_present(self, how, what):
# try:
# self.driver.find_element(by=how, value=what)
# except NoSuchElementException as e:
# return False
# return True
#
# def is_alert_present(self):
# try:
# self.driver.switch_to_alert()
# except NoAlertPresentException as e:
# return False
# return True
#
# def close_alert_and_get_its_text(self):
# try:
# alert = self.driver.switch_to_alert()
# alert_text = alert.text
# if self.accept_next_alert:
# alert.accept()
# else:
# alert.dismiss()
# return alert_text
# finally:
# self.accept_next_alert = True
#
# def tearDown(self):
# # self.driver.quit()
# # self.driver.close()
# self.assertEqual([], self.verificationErrors)
class Create(object):
def __init__(self):
chrome_options = webdriver.ChromeOptions()
prefs = {'download.default_directory': '/Users/chenxinlu/Downloads/tron-wallet/'}
chrome_options.add_experimental_option('prefs', prefs)
self.driver = webdriver.Chrome(options=chrome_options, executable_path="/usr/local/bin/chromedriver")
self.driver.implicitly_wait(10)
# self.accept_next_alert = True
# self.verificationErrors = []
def test_create(self):
driver = self.driver
# Label: Test
driver.get("https://tronscan.org/#/walletwizard")
driver.find_element_by_name("password_input").click()
driver.find_element_by_name("password_input").clear()
driver.find_element_by_name("password_input").send_keys(
"innocentkitfaithpaperhorsearmysaydistancekingdomboardtouristmeat")
driver.find_element_by_css_selector("button.btn.btn-dark.btn-lg.ml-auto > span").click()
driver.find_element_by_css_selector("button.btn.btn-lg.btn-block > span").click()
# waits for all the files to be completed and returns the paths
paths = WebDriverWait(driver, 120, 1).until(every_downloads_chrome)
print(paths[0])
def close(self):
self.driver.quit()
# def is_element_present(self, how, what):
# try:
# self.driver.find_element(by=how, value=what)
# except NoSuchElementException as e:
# return False
# return True
#
# def is_alert_present(self):
# try:
# self.driver.switch_to_alert()
# except NoAlertPresentException as e:
# return False
# return True
#
# def close_alert_and_get_its_text(self):
# try:
# alert = self.driver.switch_to_alert()
# alert_text = alert.text
# if self.accept_next_alert:
# alert.accept()
# else:
# alert.dismiss()
# return alert_text
# finally:
# self.accept_next_alert = True
#
# def tearDown(self):
# # self.driver.quit()
# # self.driver.close()
# self.assertEqual([], self.verificationErrors)
if __name__ == "__main__":
create_wallet = Create()
for i in range(0, 100):
create_wallet.test_create()
create_wallet.close()
| 37.76087 | 111 | 0.62464 | 573 | 5,211 | 5.453752 | 0.247819 | 0.0608 | 0.06528 | 0.07296 | 0.8064 | 0.80032 | 0.79296 | 0.79296 | 0.79296 | 0.79296 | 0 | 0.004651 | 0.25734 | 5,211 | 137 | 112 | 38.036496 | 0.802842 | 0.580119 | 0 | 0 | 0 | 0.026316 | 0.308943 | 0.144907 | 0 | 0 | 0 | 0 | 0 | 1 | 0.105263 | false | 0.078947 | 0.078947 | 0 | 0.263158 | 0.026316 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 7 |
e26beb30f95fa753672dd4dbae88852d3ecda7fe | 31 | py | Python | array/revPrint.py | ankit0305/algorithms | da306fd71cf3656337bd088f6c2d3ea21d492e9b | [
"MIT"
] | null | null | null | array/revPrint.py | ankit0305/algorithms | da306fd71cf3656337bd088f6c2d3ea21d492e9b | [
"MIT"
] | null | null | null | array/revPrint.py | ankit0305/algorithms | da306fd71cf3656337bd088f6c2d3ea21d492e9b | [
"MIT"
] | null | null | null | a=[1,2,3,4,5,6]
print(a[::-1])
| 10.333333 | 15 | 0.451613 | 10 | 31 | 1.4 | 0.8 | 0.285714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.241379 | 0.064516 | 31 | 2 | 16 | 15.5 | 0.241379 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.5 | 1 | 1 | 1 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 8 |
2c4c2dcfa4dff7a4cfa0cd7461943ae6ce8302b4 | 7,618 | py | Python | DNADataset.py | csbio-njust-edu/msdensenet | 07819c00251cf70e6270a8013ef272b6a9b0e487 | [
"MIT"
] | null | null | null | DNADataset.py | csbio-njust-edu/msdensenet | 07819c00251cf70e6270a8013ef272b6a9b0e487 | [
"MIT"
] | null | null | null | DNADataset.py | csbio-njust-edu/msdensenet | 07819c00251cf70e6270a8013ef272b6a9b0e487 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
train and test dataset
Fault-tolerant coding(FTC)
author Yu-Hang Yin
"""
import os
import numpy as np
from torch.utils.data import Dataset
import torch
def embed0(seq, mapper, word_dim):
mat = np.asarray([mapper[element] if element in mapper else np.ones(word_dim) for element in seq])
return mat
def embed(seq, mapper, word_dim):
mat = np.asarray([mapper[seq[i:i+2]] if seq[i:i+2] in mapper else np.ones(word_dim) for i in range(len(seq)-1)])
return mat
class DNADataset(Dataset):
def __init__(self, dataset_path, dataset_type="train", transform=None):
filename = dataset_type + ".data"
dataset_load = os.path.join(dataset_path, filename)
print("Dataset load from ", dataset_load)
with open(dataset_load, 'r') as dna_file:
data = dna_file.readlines()
self.seqs = []
self.labels = []
for line in data:
temp_seq = line.strip().split()
self.seqs.append(temp_seq[1])
self.labels.append(temp_seq[2])
self.transform = transform
def __len__(self):
return len(self.seqs)
def __getitem__(self, index):
mapper1 = {'A': [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
'C': [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
'G': [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0],
'T': [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0]}
mapper2 = {
'AA': [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0],
'CA': [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0],
'GA': [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0],
'TA': [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0],
'AC': [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0],
'CC': [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0],
'GC': [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0],
'TC': [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0],
'AG': [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0],
'CG': [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0],
'GG': [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0],
'TG': [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0],
'AT': [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0],
'CT': [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0],
'GT': [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0],
'TT': [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0]
}
mapper3 = {
'AA': [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0],
'AC': [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0],
'AG': [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0],
'AT': [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0],
'CA': [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0],
'CC': [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0],
'CG': [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0],
'CT': [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0],
'GA': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
'GC': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
'GG': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
'GT': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
'TA': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
'TC': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
'TG': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
'TT': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
}
seq1 = embed0(self.seqs[index], mapper1, len(mapper1['A']))
seq2 = embed(self.seqs[index], mapper2, len(mapper2['AA']))
seq3 = embed(self.seqs[index], mapper3, len(mapper3['AA']))
seqtemp = np.append(seq1, seq2, axis=0)
seq = np.append(seqtemp, seq3, axis=0)
seq = np.asarray(seq)
label = np.asarray(int(self.labels[index]))
sample = {'seq': seq, 'label': label}
if self.transform:
sample = self.transform(sample)
return sample
class ToTensor(object):
def __call__(self, sample):
seq, label = sample['seq'], sample['label']
# numpy seq: H * W * C
# torch seq: C * H * W
seq = seq.transpose((1, 0))
return {'seq': torch.from_numpy(seq),
'label': torch.from_numpy(label)}
class DNADataset_for_prediction(Dataset):
def __init__(self, seq_file, transform=None):
print("Dataset load from ", seq_file)
with open(seq_file, 'r') as dna_file:
data = dna_file.readlines()
self.seqs = []
for line in data:
x_str = "".join(line)
if x_str.strip() == "":
continue
if x_str[0] == '>':
continue
# self.seqs.append(list(x_str.strip().split()[0]))
temp_seq = line.strip().split()
self.seqs.append(temp_seq[0])
self.transform = transform
def __len__(self):
return len(self.seqs)
def __getitem__(self, index):
mapper1 = {'A': [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
'C': [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
'G': [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0],
'T': [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0]}
mapper2 = {
'AA': [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0],
'CA': [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0],
'GA': [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0],
'TA': [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0],
'AC': [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0],
'CC': [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0],
'GC': [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0],
'TC': [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0],
'AG': [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0],
'CG': [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0],
'GG': [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0],
'TG': [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0],
'AT': [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0],
'CT': [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0],
'GT': [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0],
'TT': [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0]
}
mapper3 = {
'AA': [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0],
'AC': [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0],
'AG': [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0],
'AT': [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0],
'CA': [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0],
'CC': [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0],
'CG': [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0],
'CT': [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0],
'GA': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
'GC': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
'GG': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
'GT': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
'TA': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
'TC': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
'TG': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
'TT': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
}
seq1 = embed0(self.seqs[index], mapper1, len(mapper1['A']))
seq2 = embed(self.seqs[index], mapper2, len(mapper2['AA']))
seq3 = embed(self.seqs[index], mapper3, len(mapper3['AA']))
seqtemp = np.append(seq1, seq2, axis=0)
seq = np.append(seqtemp, seq3, axis=0)
seq = np.asarray(seq)
sample = {'seq': seq}
if self.transform:
sample = self.transform(sample)
return sample
class ToTensor_for_prediction(object):
def __call__(self, sample):
seq = sample['seq']
# numpy seq: H * W * C
# torch seq: C * H * W
seq = seq.transpose((1, 0))
return {'seq': torch.from_numpy(seq)} | 36.625 | 116 | 0.396561 | 1,393 | 7,618 | 2.121321 | 0.081838 | 0.445347 | 0.542132 | 0.568528 | 0.730964 | 0.730964 | 0.713367 | 0.713367 | 0.671404 | 0.671404 | 0 | 0.193112 | 0.378708 | 7,618 | 208 | 117 | 36.625 | 0.431228 | 0.029404 | 0 | 0.751592 | 0 | 0 | 0.030886 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.063694 | false | 0 | 0.025478 | 0.012739 | 0.165605 | 0.012739 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 |
2c88619b7cd7fbc786dd2f560c7884bc38783013 | 252 | py | Python | Python/OneLang/Generator/IGenerator.py | onelang/OneLang-CrossCompiled | ed67f2b57e7181712c7d8c2ba85f23b3812d8e3a | [
"MIT"
] | 2 | 2020-11-15T23:38:23.000Z | 2020-11-16T00:54:25.000Z | Python/OneLang/Generator/IGenerator.py | onelang/OneLang-CrossCompiled | ed67f2b57e7181712c7d8c2ba85f23b3812d8e3a | [
"MIT"
] | null | null | null | Python/OneLang/Generator/IGenerator.py | onelang/OneLang-CrossCompiled | ed67f2b57e7181712c7d8c2ba85f23b3812d8e3a | [
"MIT"
] | null | null | null | from onelang_core import *
import OneLang.Generator.GeneratedFile as genFile
import OneLang.One.Ast.Types as types
import OneLang.One.ITransformer as iTrans
import OneLang.Generator.IGeneratorPlugin as iGenPlug
import OneLang.One.Ast.Interfaces as ints | 42 | 53 | 0.857143 | 36 | 252 | 5.972222 | 0.472222 | 0.302326 | 0.223256 | 0.176744 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.09127 | 252 | 6 | 54 | 42 | 0.938865 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 8 |
3923eb082241fb127fbc15dca02c9e143510e036 | 52,924 | py | Python | applications/cpfecys/controllers/notification.py | SIMBitGt-Company/RepoRepo | b84c39d9643a0c5e51291d5e62e36b6080a7e622 | [
"BSD-3-Clause"
] | null | null | null | applications/cpfecys/controllers/notification.py | SIMBitGt-Company/RepoRepo | b84c39d9643a0c5e51291d5e62e36b6080a7e622 | [
"BSD-3-Clause"
] | null | null | null | applications/cpfecys/controllers/notification.py | SIMBitGt-Company/RepoRepo | b84c39d9643a0c5e51291d5e62e36b6080a7e622 | [
"BSD-3-Clause"
] | null | null | null | #***************************************************************
#*******************NOTIFICATIONS OF STUDENT********************
#***************************************************************
#***************************************************************
#*******************REGISTER OF NOTIFICATIONS*******************
#***************************************************************
@auth.requires_login()
@auth.requires_membership('Teacher')
def teacher_register_mail_notifications():
#Obtain the current period of the system and all the register periods
period = cpfecys.current_year_period()
periods_temp = db(db.period_year).select()
periods = []
for period_temp in periods_temp:
if auth.has_membership('Student') or auth.has_membership('Teacher'):
try:
if db((db.user_project.assigned_user == auth.user.id) & ((db.user_project.period <= period_temp.id) & ((db.user_project.period + db.user_project.periods) > period_temp.id)) ).select().first() is not None:
periods.append(period_temp)
except:
None
#Check if the period is change
if request.vars['period'] !=None:
period = request.vars['period']
period = db(db.period_year.id==period).select().first()
#show the page resiter_mail_notifications.html
response.view='notification/teacher_register_mail_notifications.html'
#obtain the projects where the student is register and is of the select semester
projects = db(((db.user_project.period <= period) & ((db.user_project.period + db.user_project.periods) > period)) & (db.user_project.assigned_user == auth.user.id)).select()
# dest=[]
# for student in allProject:
# dest.append(student.project)
# projects = db(db.project.id.belongs(dest)).select()
#obtain the names of the projects that thas register the user
def obtain_nameProjects(userP):
p = db(db.project.id==userP).select()
nameP = ''
for p2 in p:
nameP=p2.name
return nameP
def obtain_period(periodo):
semester = db(db.period.id==periodo).select()
nameS = ''
for s in semester:
nameS=s.name
return nameS
#obtain all the registers of the send notices of the student
def obtain_notices(project):
#name project
n=obtain_nameProjects(project.project)
#name of the year
anio = db(db.period_year.id==project.period).select()
nameY = ''
idP = ''
for a in anio:
nameY=a.yearp
idP = a.period
#name of period
nameS=obtain_period(idP)
#obtain all the notices that has the user has register
notices = db((db.notification_general_log4.emisor==project.assigned_user.username) & (db.notification_general_log4.course==n)&(db.notification_general_log4.period==nameS)&(db.notification_general_log4.yearp==nameY)).select()
return notices
def obtain_Persons(project):
persons = db((db.user_project.assigned_user!=auth.user.id)\
&(db.user_project.project == project.project)\
&(((db.user_project.period <= project.period)\
& ((db.user_project.period + db.user_project.periods) > project.period))\
&(db.auth_membership.user_id==db.user_project.assigned_user)&(db.auth_membership.group_id==2)) ).select()
return persons
def obtain_PersonsA(project):
persons = db((db.user_project.assigned_user==auth.user.id) & (db.user_project.project == project.project)&((db.user_project.period <= project.period) & ((db.user_project.period + db.user_project.periods) > project.period)) ).select()
return persons
return dict(obtain_PersonsA=obtain_PersonsA,obtain_Persons=obtain_Persons, obtain_nameProjects=obtain_nameProjects,periods=periods, projects=projects, obtain_notices=obtain_notices)
#obtain all the registers of the send notices of the student
def teacher_register_mail():
notices=None
tipoD=0
period = db(db.period_year.id == request.vars["period"]).select().first()
if request.vars['userN'] != None and request.vars['project']!=None:
usuario = db(db.auth_user.id==request.vars['userN']).select().first()
project = request.vars['project']
userproject = db(db.user_project.id==project).select().first()
notices = db((db.notification_general_log4.emisor==usuario.username) & (db.notification_general_log4.course==userproject.project.name)&(db.notification_general_log4.period==period.period.name)&(db.notification_general_log4.yearp==period.yearp)).select()
tipoD=1
else:
if request.vars['project']!=None:
project = request.vars['project']
userproject = db(db.user_project.id==project).select().first()
notices = db((db.notification_general_log4.emisor==auth.user.username) & (db.notification_general_log4.course==userproject.project.name)&(db.notification_general_log4.period==period.period.name)&(db.notification_general_log4.yearp==period.yearp)).select()
tipoD=2
return dict(notices=notices, tipoD=tipoD)
def teacher_register_mail_detail():
if request.vars['notice'] != None:
noticia = db(db.notification_general_log4.id==request.vars['notice']).select().first()
listadoC = db(db.notification_log4.register==request.vars['notice']).select()
return dict(noticia=noticia,listadoC = listadoC, log=listadoC.first())
def teacher_search_destination():
all_n=None
tipoD = 0
if request.vars['notice'] != None:
if request.vars['search_input'] != None:
mail_var = db((db.notification_log4.register==request.vars['notice']) & (db.notification_log4.username.like('%'+request.vars['search_input']+'%'))).select()
else:
mail_var = db(db.notification_log4.register==request.vars['notice']).select()
return dict(all_n=mail_var, tipoD=tipoD)
#*********************************************************
#**********************ENVIAR AVISOS**********************
#*********************************************************
@auth.requires_login()
@auth.requires(auth.has_membership('Student') or auth.has_membership('Teacher'))
def teacher_send_mail_to_students(users1, users2, message, subject, check, semester, year):
#Obtener valores reales (no ids)
nameS2 = check.assigned_user.first_name+" "+check.assigned_user.last_name
nameU = check.assigned_user.username
nameP = check.project.name
attachment_m = '<br><br><b>' + T('Attachments') +":</b><br>"
if session.attachment_list != []:
for attachment_list_var in session.attachment_list:
for attachment_var in attachment_list_var:
attachment_m = attachment_m + '<a href="' + cpfecys.get_domain() + URL('default/download', attachment_var.file_data) +'" target="blank"> '+ attachment_var.name + '</a> <br>'
else:
attachment_m = ''
try:
(nameP, projectSection) = str(nameP).split('(')
(nameS,garbage) = str(projectSection).split(')')
nameP=nameP+' - '+nameS
except:
None
period = T(semester)+' '+str(year)
message = message.replace("\n","<br>")
if auth.has_membership('Student'):
messageC = '<html>' + message + attachment_m + '<br><br>Tutor Academico: '+str(nameS2)+'<br>'+str(period)+'<br>'+str(nameP)+'<br>Sistema de Seguimiento de La Escuela de Ciencias y Sistemas<br> Facultad de Ingeniería - Universidad de San Carlos de Guatemala</html>'
else:
messageC = '<html>' + message + attachment_m + '<br><br>Catedrático:'+str(nameS2)+'<br>'+str(period)+'<br>'+str(nameP)+'<br>Sistema de Seguimiento de La Escuela de Ciencias y Sistemas<br> Facultad de Ingeniería - Universidad de San Carlos de Guatemala</html>'
#variable de control
control = 0
#Log General del Envio
row = db.notification_general_log4.insert(subject=subject,
sent_message=message + attachment_m,
emisor=check.assigned_user.username,
course=check.project.name,
yearp=year,
period=semester)
#Ciclo para el envio de correos para estudiantes
ListadoCorreos = None
email_list_log=""
if users1 != None:
for user in users1:
if user.email != None and user.email != '':
if ListadoCorreos == None:
ListadoCorreos = []
ListadoCorreos.append(user.email)
email_list_log=""
email_list_log=str(user.email)
else:
ListadoCorreos.append(user.email)
email_list_log=email_list_log+","+str(user.email)
if users2 != None:
for user in users2:
if user.email != None and user.email != '':
if ListadoCorreos == None:
ListadoCorreos = []
ListadoCorreos.append(user.email)
email_list_log=""
email_list_log=str(user.email)
else:
ListadoCorreos.append(user.email)
email_list_log=email_list_log+","+str(user.email)
ListadoCorreos.append(auth.user.email)
was_sent = mail.send(to='dtt.ecys@dtt-ecys.org',subject=subject,message=messageC, bcc=ListadoCorreos)
##Notification LOG GENERAL
db.mailer_log.insert(sent_message = messageC, destination = email_list_log, result_log = str(mail.error or '') + ':' + str(mail.result), success = was_sent, emisor=str(check.assigned_user.username))
##Notification LOG
email_list =str(email_list_log).split(",")
for email_temp in email_list:
user_var = db((db.auth_user.email == email_temp)).select().first()
if user_var != None:
username_var = user_var.username
else:
user_var = db((db.academic.email == email_temp)).select().first()
if user_var != None:
username_var = user_var.carnet
else:
username_var = 'None'
db.notification_log4.insert(destination = email_temp,
username = username_var,
result_log = str(mail.error or '') + ':' + str(mail.result),
success = was_sent,
register=row.id)
if was_sent==False:
control=control+1
session.attachment_list = []
session.attachment_list_temp = []
session.attachment_list_temp2 = []
session.notification_subject = ''
session.notification_message = ''
return control
@auth.requires_login()
@auth.requires_membership('Teacher')
def teacher_mail_notifications():
import cpfecys
#Obtener la asignacion del estudiante
assignation = request.vars['assignation']
#Obtener el periodo
year = db.period_year(id=request.vars["period"])
year_semester = db.period(id=year.period)
period = year.id
#Obtener al tutor del proyecto
check = db((db.user_project.assigned_user==auth.user.id)&\
(db.user_project.id == assignation)&\
((db.user_project.period <= year.id) & \
((db.user_project.period + db.user_project.periods) > year.id))).select(db.user_project.ALL).first()
failCheck = True
if (check is None):
failCheck = False
elif cpfecys.assignation_is_locked(check):
failCheck = False
if failCheck == False:
session.flash = T('Not valid Action.')
redirect(URL('default','index'))
var=""
if (request.args(0) == 'send'):
#Tipo estudiante al que se le enviara el correo
tipoes = request.vars['tipoe']
#Obtener listado alumnos a enviar mensaje
listado = request.vars['listado']
listado2 = request.vars['listado2']
#Mensaje que se enviara
message = request.vars['message']
#Asunto del mensaje que se enviara
subject = request.vars['subject']
#Check that the user select only one group of students
if not tipoes or count_selectItems(tipoes)!=1:
session.flash = T('You must select only one group of students')
redirect(URL('notification', 'teacher_mail_notifications',vars = dict(period=year.id, assignation=check.id)))
return
#Obtener la lista de destinatarios en base a los usuarios presionados
if ((tipoes=='specific' and (listado!= None or listado2!= None)) or (tipoes!='specific')) and message != '' and subject != '':
rol=2
users1 = None
users2 = None
count1 = db.academic_course_assignation.id.count()
count2 = db.auth_user.id.count()
user1 = None
user2 = None
totalC1 = 0
totalC2 = 0
if tipoes =='all' or tipoes=='cl' or tipoes =='sl' or tipoes =='fp':
if tipoes =='cl':
users1 = db((db.academic.id==db.academic_course_assignation.carnet)&(db.academic_course_assignation.semester == period) & (db.academic_course_assignation.assignation==check.project) & (db.academic_course_assignation.laboratorio=='True')).select(count1)
totalC1 = count_Items(users1,count1)
elif tipoes =='sl':
users1 = db((db.academic.id==db.academic_course_assignation.carnet)&(db.academic_course_assignation.semester == period) & (db.academic_course_assignation.assignation==check.project) & (db.academic_course_assignation.laboratorio=='False')).select(count1)
totalC1 = count_Items(users1,count1)
elif tipoes =='fp':
users2 = db((db.auth_user.id==db.user_project.assigned_user)&((db.user_project.period <= period) & ((db.user_project.period + db.user_project.periods) > period))& (db.user_project.project==check.project)&(db.auth_membership.user_id==db.user_project.assigned_user)&(db.auth_membership.group_id==rol)).select(count2)
totalC2 = count_Items(users2,count2)
else:
users1 = db((db.academic.id==db.academic_course_assignation.carnet)&(db.academic_course_assignation.semester == period) & (db.academic_course_assignation.assignation==check.project)).select(count1)
users2 = db((db.auth_user.id==db.user_project.assigned_user)&((db.user_project.period <= period) & ((db.user_project.period + db.user_project.periods) > period)) & (db.user_project.project==check.project)&(db.auth_membership.user_id==db.user_project.assigned_user)&(db.auth_membership.group_id==rol)).select(count2)
totalC1 = count_Items(users1,count1)
totalC2 = count_Items(users2,count2)
if tipoes=='all' and (totalC1>0 or totalC2>0):
if totalC1>0:
user1 = []
users1 = db((db.academic.id==db.academic_course_assignation.carnet)&(db.academic_course_assignation.semester == period) & (db.academic_course_assignation.assignation==check.project)).select()
for user in users1:
user1.append(user.academic)
if totalC2 >0:
user2 = []
users2 = db((db.auth_user.id==db.user_project.assigned_user)&((db.user_project.period <= period) & ((db.user_project.period + db.user_project.periods) > period)) & (db.user_project.project==check.project)&(db.auth_membership.user_id==db.user_project.assigned_user)&(db.auth_membership.group_id==rol)).select()
for user in users2:
user2.append(user.auth_user)
elif tipoes =='cl' and totalC1 > 0:
user1 = []
users1 = db((db.academic.id==db.academic_course_assignation.carnet)&(db.academic.id==db.academic_course_assignation.carnet)&(db.academic_course_assignation.semester == period) & (db.academic_course_assignation.assignation==check.project) & (db.academic_course_assignation.laboratorio=='True')).select()
for user in users1:
user1.append(user.academic)
elif tipoes =='sl' and totalC1 > 0:
user1 = []
users1 = db((db.academic.id==db.academic_course_assignation.carnet)&(db.academic.id==db.academic_course_assignation.carnet)&(db.academic_course_assignation.semester == period) & (db.academic_course_assignation.assignation==check.project) & (db.academic_course_assignation.laboratorio=='False')).select()
for user in users1:
user1.append(user.academic)
elif tipoes =='fp' and totalC2 > 0:
user2 = []
users2 = db((db.auth_user.id==db.user_project.assigned_user)&((db.user_project.period <= period) & ((db.user_project.period + db.user_project.periods) > period)) & (db.user_project.project==check.project)&(db.auth_membership.user_id==db.user_project.assigned_user)&(db.auth_membership.group_id==rol)).select()
for user in users2:
user2.append(user.auth_user)
else:
#Obtain the list of destination for the students
if listado != None:
dest=[]
students = request.vars['listado']
try:
students.append(-1)
students.remove(-1)
for student in students:
dest.append(student)
#consultar a la base de datos para obtener a los usuarios a los que enviaremos
user1 = db(db.academic.id.belongs(dest)).select()
except:
#consultar a la base de datos para obtener a los usuarios a los que enviaremos
user1 = db(db.academic.id==request.vars['listado']).select()
#obtain the list of destination for the final practices students
if listado2 != None:
dest=[]
students = request.vars['listado2']
try:
students.append(-1)
students.remove(-1)
for student in students:
dest.append(student)
#consultar a la base de datos para obtener a los usuarios a los que enviaremos
user2 = db(db.auth_user.id.belongs(dest)).select()
except:
#consultar a la base de datos para obtener a los usuarios a los que enviaremos
user2 = db(db.auth_user.id==request.vars['listado2']).select()
if user1 != None or user2 != None:
#Realizar el envio de mensajes
fail = teacher_send_mail_to_students(user1,user2,message,subject,check,year_semester.name,year.yearp)
if fail > 0:
session.flash = T('Avisos enviados - Existen '+str(fail) + ' avisos fallidos, revise el registro de avisos')
else:
session.flash = T('Notices Sent')
redirect(URL('notification', 'teacher_mail_notifications',vars = dict(period=year.id, assignation=check.id)))
else:
session.flash = T('No recipient who sent the message')
redirect(URL('notification', 'teacher_mail_notifications',vars = dict(period=year.id, assignation=check.id)))
else:
session.flash = T('Fill all fields of notification')
redirect(URL('notification', 'teacher_mail_notifications',vars = dict(period=year.id, assignation=check.id)))
def get_projects(grupo):
#Obtener la asignacion del estudiante
assignation = request.vars['assignation']
#Obtener al tutor
check = db.user_project(id = assignation, assigned_user = auth.user.id)
if (check is None):
#check if there is no assignation or if it is locked (shouldn't be touched)
if (session.last_assignation is None):
redirect(URL('default','index'))
return
else:
check = db.user_project(id = session.last_assignation)
if cpfecys.assignation_is_locked(check):
redirect(URL('default','index'))
return
else:
session.last_assignation = check.id
if grupo == 1:
#Obtener los estudiantes del tutor y asignados al proyecto
students = db((db.academic_course_assignation.semester == period) & (db.academic_course_assignation.assignation==check.project) & (db.academic_course_assignation.laboratorio=='True')).select()
return students
else:
if grupo==2:
#Obtener los estudiantes del tutor y asignados al proyecto
students = db((db.academic_course_assignation.semester == period) & (db.academic_course_assignation.assignation==check.project) & (db.academic_course_assignation.laboratorio=='False')).select()
return students
else:
#obtain the final practice students assigned in the course where the user is the manager
students = db((db.user_project.project==check.project)&((db.user_project.period <= period) & ((db.user_project.period + db.user_project.periods) > period))&(db.user_project.assigned_user!=check.assigned_user)&(db.auth_membership.user_id==db.user_project.assigned_user)&(db.auth_membership.group_id==2)).select()
return students
if session.notification_subject == None:
session.notification_subject = ''
if session.notification_message == None:
session.notification_message = ''
upload_form = FORM(INPUT(_name='file_name',_type='text'),
INPUT(_name='file_upload',_type='file',requires=[IS_UPLOAD_FILENAME(extension = '(pdf|rar|zip)',error_message='Solo se aceptan archivos con extension zip|pdf|rar'),IS_LENGTH(2097152,error_message='El tamaño máximo del archivo es 2MB')]),
INPUT(_name='file_description',_type='text'),
INPUT(_name='file_visible',_type='checkbox'))
if upload_form.accepts(request.vars,formname='upload_form'):
try:
if ( upload_form.vars.file_name is "" ) or ( upload_form.vars.file_upload is "") or ( upload_form.vars.file_description is ""):
response.flash = T('You must enter all fields.')
else:
exists = db.library((db.library.name == upload_form.vars.file_name) & (db.library.project == check.project.id) & (db.library.owner_file==auth.user.id) )
if exists is None:
file_var = db.library.file_data.store(upload_form.vars.file_upload.file, upload_form.vars.file_upload.filename)
var_visible = 'False'
if upload_form.vars.file_visible:
var_visible = 'True'
id = db.library.insert(file_data=file_var,
name=upload_form.vars.file_name,
description=upload_form.vars.file_description,
visible=var_visible,
period=cpfecys.current_year_period(),
project=check.project.id,
owner_file=auth.user.id)
session.attachment_list.append( db(db.library.id==id).select() )
response.flash = T('File loaded successfully.')
else:
response.flash = T('File already exists.')
except:
response.flash = T('Error loading file.')
attach_form = FORM()
if attach_form.accepts(request.vars,formname='attach_form'):
if session.attachment_list_temp != None:
for var in session.attachment_list_temp:
session.attachment_list.append(var)
session.attachment_list_temp = []
else:
session.attachment_list_temp = []
remove_form = FORM()
if remove_form.accepts(request.vars,formname='remove_form'):
list_tempo = []
if session.attachment_list_temp2 != None and len(session.attachment_list_temp2) > 0:
for var_list in session.attachment_list:
for tempo1 in var_list:
cambiar = 'false'
for var_list_2 in session.attachment_list_temp2:
for tempo2 in var_list_2:
if (tempo1.id == tempo2.id):
cambiar = 'true'
if(cambiar == 'false'):
list_tempo.append(var_list)
session.attachment_list = list_tempo
session.attachment_list_temp2 = []
else:
session.attachment_list_temp2 = []
session.project_id = check.project.id
return dict(get_projects=get_projects,
markmin_settings = cpfecys.get_markmin,
name = check.project.name,
semester = year_semester.name,
year = year.yearp,
assignation=assignation,
attachment_list=session.attachment_list)
#***************************************************************
#*******************NOTIFICATIONS OF STUDENT********************
#***************************************************************
#***************************************************************
#*******************REGISTER OF NOTIFICATIONS*******************
#***************************************************************
@auth.requires_login()
@auth.requires_membership('Student')
def register_mail_notifications():
#Obtain the current period of the system and all the register periods
period = cpfecys.current_year_period()
periods_temp = db(db.period_year).select()
periods = []
for period_temp in periods_temp:
if auth.has_membership('Student') or auth.has_membership('Teacher'):
try:
if db((db.user_project.assigned_user == auth.user.id) & ((db.user_project.period <= period_temp.id) & ((db.user_project.period + db.user_project.periods) > period_temp.id)) ).select().first() is not None:
periods.append(period_temp)
except:
None
#Check if the period is change
if request.vars['period'] !=None:
period = request.vars['period']
period = db(db.period_year.id==period).select().first()
#show the page resiter_mail_notifications.html
response.view='notification/register_mail_notifications.html'
#obtain the projects where the student is register and is of the select semester
projects = db(((db.user_project.period <= period) & ((db.user_project.period + db.user_project.periods) > period)) & (db.user_project.assigned_user==auth.user.id) ).select()
def obtain_nameProjects(userP):
p = db(db.project.id==userP).select()
nameP = ''
for p2 in p:
nameP=p2.name
return nameP
return dict(obtain_nameProjects=obtain_nameProjects,periods=periods, projects=projects)
#obtain all the registers of the send notices of the student
def register_mail():
notices=None
if request.vars['project'] != None:
project = request.vars['project']
period = db(db.period_year.id == request.vars['period']).select().first()
userproject = db(db.user_project.id==project).select().first()
notices = db((db.notification_general_log4.emisor==auth.user.username) & (db.notification_general_log4.course==userproject.project.name)&(db.notification_general_log4.period==period.period.name)&(db.notification_general_log4.yearp==period.yearp)).select()
return dict(notices=notices)
def register_mail_detail():
if request.vars['notice'] != None:
notice = db(db.notification_general_log4.id==request.vars['notice']).select().first()
listadoC = db(db.notification_log4.register==request.vars['notice']).select()
return dict(notice=notice,listadoC = listadoC, log=listadoC.first())
def search_destination():
all_n=None
tipoD = 0
if request.vars['notice'] != None:
if request.vars['search_input'] != None:
mail_var = db((db.notification_log4.register==request.vars['notice']) & (db.notification_log4.username.like('%'+request.vars['search_input']+'%'))).select()
else:
mail_var = db(db.notification_log4.register==request.vars['notice']).select()
return dict(all_n=mail_var, tipoD=tipoD)
#*********************************************************
#**********************ENVIAR AVISOS**********************
#*********************************************************
@auth.requires_login()
@auth.requires_membership('Student')
def send_mail_to_students(users, message, subject, check, semester, year):
#Obtener valores reales (no ids)
nameS2 = check.assigned_user.first_name+" "+check.assigned_user.last_name
nameU = check.assigned_user.username
nameP = check.project.name
attachment_m = '<br><br><b>' + T('Attachments') +":</b><br>"
attachments_list = []
if session.attachment_list != []:
for attachment_list_var in session.attachment_list:
for attachment_var in attachment_list_var:
try:
attachments_list.append(mail.Attachment(cpfecys.get_domain() + URL('default/download', attachment_var.file_data)))
except:
None
attachment_m = attachment_m + '<a href="'+ cpfecys.get_domain() + URL('default/download', attachment_var.file_data) +'" target="blank"> '+ attachment_var.name + '</a> <br>'
else:
attachment_m = ''
try:
(nameP, projectSection) = str(nameP).split('(')
(nameS,garbage) = str(projectSection).split(')')
nameP=nameP+' - '+nameS
except:
None
period = T(semester)+' '+str(year)
message = message.replace("\n","<br>")
messageC = '<html>' + message + attachment_m + '<br><br>Tutor Academico: '+str(nameS2)+'<br>'+str(period)+'<br>'+str(nameP)+'<br>Sistema de Seguimiento de La Escuela de Ciencias y Sistemas<br> Facultad de Ingeniería - Universidad de San Carlos de Guatemala</html>'
#variable de control
control = 0
#Log General del Envio
row = db.notification_general_log4.insert(subject=subject,
sent_message=message + attachment_m,
emisor=check.assigned_user.username,
course=check.project.name,
yearp=year,
period=semester)
#Ciclo para el envio de correos
ListadoCorreos = None
email_list_log=""
for user in users:
if user.email != None and user.email != '':
if ListadoCorreos == None:
ListadoCorreos = []
ListadoCorreos.append(user.email)
email_list_log=""
email_list_log=str(user.email)
else:
ListadoCorreos.append(user.email)
ListadoCorreos.append(user.email)
email_list_log=email_list_log+","+str(user.email)
ListadoCorreos.append(auth.user.email)
was_sent = mail.send(to='dtt.ecys@dtt-ecys.org',subject=subject,message=messageC, bcc=ListadoCorreos)
#MAILER LOG
db.mailer_log.insert(sent_message = messageC,
destination = email_list_log,
result_log = str(mail.error or '') + ':' + \
str(mail.result),
success = was_sent, emisor=str(check.assigned_user.username))
##Notification LOG
email_list =str(email_list_log).split(",")
for email_temp in email_list:
user_var = db((db.auth_user.email == email_temp)).select().first()
if user_var != None:
username_var = user_var.username
else:
user_var = db((db.academic.email == email_temp)).select().first()
if user_var != None:
username_var = user_var.carnet
else:
username_var = 'None'
db.notification_log4.insert(destination = email_temp,
username = username_var,
result_log = str(mail.error or '') + ':' + str(mail.result),
success = was_sent,
register=row.id)
if was_sent==False:
control=control+1
session.attachment_list = []
session.attachment_list_temp = []
session.attachment_list_temp2 = []
session.notification_message = ''
session.notification_subject = ''
return control
@auth.requires_login()
@auth.requires_membership('Student')
def mail_notifications():
import cpfecys
#Obtener la asignacion del estudiante
assignation = request.vars['assignation']
#Obtener el periodo
year = db.period_year(id=request.vars["period"])
year_semester = db.period(id=year.period)
period = year.id
#Obtener al tutor del proyecto
check = db((db.user_project.assigned_user==auth.user.id)&\
(db.user_project.id == assignation)&\
((db.user_project.period <= year.id) & \
((db.user_project.period + db.user_project.periods) > year.id))).select(db.user_project.ALL).first()
failCheck = True
if (check is None):
failCheck = False
elif cpfecys.assignation_is_locked(check):
failCheck = False
if failCheck == False:
session.flash = T('Not valid Action.')
redirect(URL('default','index'))
var=""
if (request.args(0) == 'send'):
#Tipo estudiante al que se le enviara el correo
tipoes = request.vars['tipoe']
#Obtener listado alumnos a enviar mensaje
listado = request.vars['listado']
listado2 = request.vars['listado2']
#Mensaje que se enviara
message = request.vars['message']
#Asunto del mensaje que se enviara
subject = request.vars['subject']
#Check that the user select only one group of students
if not tipoes or count_selectItems(tipoes)!=1:
session.flash = T('You must select only one group of students')
redirect(URL('notification', 'mail_notifications',vars = dict(period = year.id, assignation=check.id) ))
return
#Obtener la lista de destinatarios en base a los usuarios presionados
if ((tipoes=='specific' and (listado!= None or listado2!= None)) or (tipoes!='specific')) and message != '' and subject != '':
rol=3
users1 = None
users2 = None
count1 = db.academic_course_assignation.id.count()
count2 = db.auth_user.id.count()
user1 = None
user2 = None
totalC1 = 0
totalC2 = 0
if tipoes =='all' or tipoes=='cl' or tipoes =='sl' or tipoes =='fp':
if tipoes =='cl':
users1 = db((db.academic.id==db.academic_course_assignation.carnet)&(db.academic_course_assignation.semester == period) & (db.academic_course_assignation.assignation==check.project) & (db.academic_course_assignation.laboratorio=='True')).select(count1)
totalC1 = count_Items(users1,count1)
elif tipoes =='sl':
users1 = db((db.academic.id==db.academic_course_assignation.carnet)&(db.academic_course_assignation.semester == period) & (db.academic_course_assignation.assignation==check.project) & (db.academic_course_assignation.laboratorio=='False')).select(count1)
totalC1 = count_Items(users1,count1)
elif tipoes =='fp':
users2 = db((db.auth_user.id==db.user_project.assigned_user)&((db.user_project.period <= period) & ((db.user_project.period + db.user_project.periods) > period))& (db.user_project.project==check.project)&(db.auth_membership.user_id==db.user_project.assigned_user)&(db.auth_membership.group_id==rol)).select(count2)
totalC2 = count_Items(users2,count2)
else:
users1 = db((db.academic.id==db.academic_course_assignation.carnet)&(db.academic_course_assignation.semester == period) & (db.academic_course_assignation.assignation==check.project)).select(count1)
users2 = db((db.auth_user.id==db.user_project.assigned_user)&((db.user_project.period <= period) & ((db.user_project.period + db.user_project.periods) > period)) & (db.user_project.project==check.project)&(db.auth_membership.user_id==db.user_project.assigned_user)&(db.auth_membership.group_id==rol)).select(count2)
totalC1 = count_Items(users1,count1)
totalC2 = count_Items(users2,count2)
if tipoes=='all' and (totalC1>0 or totalC2>0):
if totalC1>0:
user1 = []
users1 = db((db.academic.id==db.academic_course_assignation.carnet)&(db.academic_course_assignation.semester == period) & (db.academic_course_assignation.assignation==check.project)).select()
for user in users1:
user1.append(user.academic)
if totalC2 >0:
user2 = []
users2 = db((db.auth_user.id==db.user_project.assigned_user)&((db.user_project.period <= period) & ((db.user_project.period + db.user_project.periods) > period)) & (db.user_project.project==check.project)&(db.auth_membership.user_id==db.user_project.assigned_user)&(db.auth_membership.group_id==rol)).select()
for user in users2:
user2.append(user.auth_user)
elif tipoes =='cl' and totalC1 > 0:
user1 = []
users1 = db((db.academic.id==db.academic_course_assignation.carnet)&(db.academic.id==db.academic_course_assignation.carnet)&(db.academic_course_assignation.semester == period) & (db.academic_course_assignation.assignation==check.project) & (db.academic_course_assignation.laboratorio=='True')).select()
for user in users1:
user1.append(user.academic)
elif tipoes =='sl' and totalC1 > 0:
user1 = []
users1 = db((db.academic.id==db.academic_course_assignation.carnet)&(db.academic.id==db.academic_course_assignation.carnet)&(db.academic_course_assignation.semester == period) & (db.academic_course_assignation.assignation==check.project) & (db.academic_course_assignation.laboratorio=='False')).select()
for user in users1:
user1.append(user.academic)
elif tipoes =='fp' and totalC2 > 0:
user2 = []
users2 = db((db.auth_user.id==db.user_project.assigned_user)&((db.user_project.period <= period) & ((db.user_project.period + db.user_project.periods) > period)) & (db.user_project.project==check.project)&(db.auth_membership.user_id==db.user_project.assigned_user)&(db.auth_membership.group_id==rol)).select()
for user in users2:
user2.append(user.auth_user)
else:
#Obtain the list of destination for the students
if listado != None:
dest=[]
students = request.vars['listado']
try:
students.append(-1)
students.remove(-1)
for student in students:
dest.append(student)
#consultar a la base de datos para obtener a los usuarios a los que enviaremos
user1 = db(db.academic.id.belongs(dest)).select()
except:
#consultar a la base de datos para obtener a los usuarios a los que enviaremos
user1 = db(db.academic.id==request.vars['listado']).select()
#obtain the list of destination for the final practices students
if listado2 != None:
dest=[]
students = request.vars['listado2']
try:
students.append(-1)
students.remove(-1)
for student in students:
dest.append(student)
#consultar a la base de datos para obtener a los usuarios a los que enviaremos
user2 = db(db.auth_user.id.belongs(dest)).select()
except:
#consultar a la base de datos para obtener a los usuarios a los que enviaremos
user2 = db(db.auth_user.id==request.vars['listado2']).select()
if user1 != None or user2 != None:
#Realizar el envio de mensajes
fail = teacher_send_mail_to_students(user1,user2,message,subject,check,year_semester.name,year.yearp)
if fail > 0:
session.flash = T('Avisos enviados - Existen '+str(fail) + ' avisos fallidos, revise el registro de avisos')
else:
session.flash = T('Notices Sent')
redirect(URL('notification', 'mail_notifications',vars = dict(period=year.id, assignation=check.id)))
else:
session.flash = T('No recipient who sent the message')
redirect(URL('notification', 'mail_notifications',vars = dict(period=year.id, assignation=check.id)))
else:
session.flash = T('Fill all fields of notification')
redirect(URL('notification', 'mail_notifications',vars = dict(period=year.id, assignation=check.id) ))
def get_projects(grupo):
import cpfecys
#Obtener la asignacion del estudiante
assignation = request.vars['assignation']
#Obtener al tutor
check = db.user_project(id = assignation, assigned_user = auth.user.id)
if grupo == 1:
import cpfecys
if (check is None):
#check if there is no assignation or if it is locked (shouldn't be touched)
if (session.last_assignation is None):
redirect(URL('default','index'))
return
else:
check = db.user_project(id = session.last_assignation)
if cpfecys.assignation_is_locked(check):
redirect(URL('default','index'))
return
else:
session.last_assignation = check.id
#Obtener los estudiantes del tutor y asignados al proyecto
students = db((db.academic_course_assignation.semester == period) & (db.academic_course_assignation.assignation==check.project) & (db.academic_course_assignation.laboratorio=='True')).select()
return students
elif grupo == 3:
#obtain the final practice students assigned in the course where the user is the manager
students = db((db.user_project.project==check.project)&((db.user_project.period <= period) & ((db.user_project.period + db.user_project.periods) > period))&(db.user_project.assigned_user!=check.assigned_user)&(db.auth_membership.user_id==db.user_project.assigned_user)&(db.auth_membership.group_id==3)).select()
return students
else:
#Obtener la asignacion del estudiante
assignation = request.vars['assignation']
#Obtener al tutor
check = db.user_project(id = assignation, assigned_user = auth.user.id)
import cpfecys
if (check is None):
#check if there is no assignation or if it is locked (shouldn't be touched)
if (session.last_assignation is None):
redirect(URL('default','index'))
return
else:
check = db.user_project(id = session.last_assignation)
if cpfecys.assignation_is_locked(check):
redirect(URL('default','index'))
return
else:
session.last_assignation = check.id
#Obtener los estudiantes del tutor y asignados al proyecto
students = db((db.academic_course_assignation.semester == period) & (db.academic_course_assignation.assignation==check.project) & (db.academic_course_assignation.laboratorio=='False')).select()
return students
#db.library.period.default = check.project
db.library.period.writable = False
db.library.period.readable = False
#db.library.project.default = check.project
db.library.project.writable = False
db.library.project.readable = False
#db.library.owner_file.default = check.project
db.library.owner_file.writable = False
db.library.owner_file.readable = False
if session.notification_subject == None:
session.notification_subject = ''
if session.notification_message == None:
session.notification_message = ''
upload_form = FORM(INPUT(_name='file_name',_type='text'),
INPUT(_name='file_upload',_type='file',requires=[IS_UPLOAD_FILENAME(extension = '(pdf|rar|zip)',error_message='Solo se aceptan archivos con extension zip|pdf|rar'),IS_LENGTH(2097152,error_message='El tamaño máximo del archivo es 2MB')]),
INPUT(_name='file_description',_type='text'),
INPUT(_name='file_visible',_type='checkbox'))
if upload_form.accepts(request.vars,formname='upload_form'):
try:
if ( upload_form.vars.file_name is "" ) or ( upload_form.vars.file_upload is "") or ( upload_form.vars.file_description is ""):
response.flash = T('You must enter all fields.')
else:
exists = db.library((db.library.name == upload_form.vars.file_name) & (db.library.project == check.project.id) & (db.library.owner_file==auth.user.id) )
if exists is None:
file_var = db.library.file_data.store(upload_form.vars.file_upload.file, upload_form.vars.file_upload.filename)
var_visible = 'False'
if upload_form.vars.file_visible:
var_visible = 'True'
id = db.library.insert(file_data=file_var,
name=upload_form.vars.file_name,
description=upload_form.vars.file_description,
visible=var_visible,
period=cpfecys.current_year_period(),
project=check.project.id,
owner_file=auth.user.id)
session.attachment_list.append( db(db.library.id==id).select() )
response.flash = T('File loaded successfully.')
else:
response.flash = T('File already exists.')
except:
response.flash = T('Error loading file.')
attach_form = FORM()
if attach_form.accepts(request.vars,formname='attach_form'):
if session.attachment_list_temp != None:
for var in session.attachment_list_temp:
session.attachment_list.append(var)
session.attachment_list_temp = []
else:
session.attachment_list_temp = []
remove_form = FORM()
if remove_form.accepts(request.vars,formname='remove_form'):
list_tempo = []
if session.attachment_list_temp2 != None and len(session.attachment_list_temp2) > 0:
for var_list in session.attachment_list:
for tempo1 in var_list:
cambiar = 'false'
for var_list_2 in session.attachment_list_temp2:
for tempo2 in var_list_2:
if (tempo1.id == tempo2.id):
cambiar = 'true'
if(cambiar == 'false'):
list_tempo.append(var_list)
session.attachment_list = list_tempo
session.attachment_list_temp2 = []
else:
session.attachment_list_temp2 = []
session.project_id = check.project.id
return dict(get_projects=get_projects,
markmin_settings = cpfecys.get_markmin,
name = check.project.name,
semester = year_semester.name,
year = year.yearp,
assignation=assignation,
attachment_list=session.attachment_list
)
def files_check():
return dict(var='');
def notification_functions():
return dict(var='');
def attachment_files():
return dict(attachment_list=session.attachment_list)
def search_files():
if request.vars['search_input'] is None:
import cpfecys
#projects = db((db.project.id==db.user_project.project)&(db.period.id==db.user_project.period)&(db.user_project.assigned_user==auth.user.id)).select()
#all_list = db((db.library.owner_file==auth.user.id) or ((db.library.project == session.project_id) & (db.library.visible==True)) ).select()
all_list = db((db.library.visible==True)&(db.library.owner_file!=auth.user.id)\
&(db.library.project==db.project.id)&(db.project.id==db.user_project.project)&\
(db.user_project.assigned_user==auth.user.id)&((db.user_project.period <= cpfecys.current_year_period().id ) \
& ((db.user_project.period + db.user_project.periods) > cpfecys.current_year_period().id))\
&(db.library.period == db.user_project.period) ).select()
p=[]
for a in all_list:
p.append(a.library)
all_list = db((db.library.owner_file==auth.user.id)).select()
for a in all_list:
p.append(a)
else:
#all_list = db((db.library.visible==True)&(db.library.project==db.project.id)&(db.period.id==db.user_project.period)&(db.project.id==db.user_project.project)&(db.user_project.assigned_user==auth.user.id)).select()
#all_list = db((db.library.owner_file==auth.user.id) or ((db.library.project == session.project_id) & (db.library.visible==True)) ).select()
#all_list = db( ((db.library.owner_file==auth.user.id) or ((db.library.project == session.project_id) & (db.library.visible==True) & (db.library.owner_file!=auth.user.id)) ) & (db.library.name.like('%'+request.vars['search_input']+'%'))).select()
import cpfecys
all_list = db((db.library.name.like('%'+request.vars['search_input']+'%'))&(db.library.visible==True)&(db.library.owner_file!=auth.user.id)\
&(db.library.project==db.project.id)&(db.project.id==db.user_project.project)&\
(db.user_project.assigned_user==auth.user.id)&((db.user_project.period <= cpfecys.current_year_period().id ) \
& ((db.user_project.period + db.user_project.periods) > cpfecys.current_year_period().id))\
&(db.library.period == db.user_project.period) ).select()
p=[]
for a in all_list:
p.append(a.library)
all_list = db((db.library.name.like('%'+request.vars['search_input']+'%'))&(db.library.owner_file==auth.user.id)).select()
for a in all_list:
p.append(a)
return dict(all_list=p)
#Function use to obtain the count of the items
def count_selectItems(items):
count = 0
try:
items.append(-1)
items.remove(-1)
for item in items:
count = count + 1
except:
if items==None:
count = 0
else:
count = 1
return count
def count_Items(notices,count):
total = 0
for s in notices:
total = s[count]
return total | 52.765703 | 335 | 0.590243 | 5,966 | 52,924 | 5.073416 | 0.05414 | 0.024977 | 0.054117 | 0.055306 | 0.940663 | 0.92834 | 0.924475 | 0.919189 | 0.909971 | 0.896987 | 0 | 0.007636 | 0.277454 | 52,924 | 1,003 | 336 | 52.765703 | 0.783891 | 0.107777 | 0 | 0.862644 | 0 | 0.003851 | 0.063041 | 0.005179 | 0 | 0 | 0 | 0 | 0 | 1 | 0.033376 | false | 0 | 0.008986 | 0.003851 | 0.091142 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
3942481490157ff8c8f26d6c869799dc13be3d5a | 28,854 | py | Python | tests/test_fields.py | se7entyse7en/mongo-dynamic-fixture | 95ae0fd402dbc81dd67b1f2b5e4819ce94a3d55a | [
"MIT"
] | 12 | 2015-10-26T06:54:43.000Z | 2016-08-09T01:29:15.000Z | tests/test_fields.py | se7entyse7en/mongo-dynamic-fixture | 95ae0fd402dbc81dd67b1f2b5e4819ce94a3d55a | [
"MIT"
] | 10 | 2015-10-24T11:15:53.000Z | 2015-10-29T17:07:50.000Z | tests/test_fields.py | se7entyse7en/mongo-dynamic-fixture | 95ae0fd402dbc81dd67b1f2b5e4819ce94a3d55a | [
"MIT"
] | 3 | 2015-10-29T20:25:58.000Z | 2017-03-04T02:28:40.000Z | import string
import random
import unittest
try:
import mock
except ImportError:
from unittest import mock
from mongo_dynamic_fixture.fields import BaseField
from mongo_dynamic_fixture.fields import IntegerField
from mongo_dynamic_fixture.fields import DoubleField
from mongo_dynamic_fixture.fields import BooleanField
from mongo_dynamic_fixture.fields import StringField
from mongo_dynamic_fixture.fields import ArrayField
from mongo_dynamic_fixture.fields import ObjectField
from mongo_dynamic_fixture.exceptions import NotGeneratedException
FIELDS_RANDOM_MODULE = 'mongo_dynamic_fixture.fields.random'
class BaseFieldTestCase(unittest.TestCase):
def test_not_implemented(self):
v = BaseField()
with self.assertRaises(NotImplementedError):
v.generate()
class IntegerFieldTestCase(unittest.TestCase):
def test_default(self):
v = IntegerField()
self.assertTrue(0 <= v.generate() <= 100)
def test_min_max_values(self):
v = IntegerField(min_value=-100, max_value=0)
self.assertTrue(-100 <= v.generate() <= 0)
v = IntegerField(min_value=0, max_value=0)
self.assertEqual(v.generate(), 0)
v = IntegerField(min_value=100, max_value=0)
with self.assertRaises(ValueError):
v.generate()
def test_not_required(self):
v = IntegerField(required=False, not_present_prob=0)
self.assertTrue(0 <= v.generate() <= 100)
v = IntegerField(required=False, not_present_prob=1)
with self.assertRaises(NotGeneratedException):
v.generate()
v = IntegerField(required=False, not_present_prob=0.5)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 0
with self.assertRaises(NotGeneratedException):
v.generate()
v = IntegerField(required=False, not_present_prob=0.5)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 1
mocked_random.randint = random.randint
self.assertTrue(0 <= v.generate() <= 100)
def test_nullable(self):
v = IntegerField(null=True, null_prob=0.5)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 1
mocked_random.randint = random.randint
self.assertTrue(0 <= v.generate() <= 100)
v = IntegerField(null=True, null_prob=0.5)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 0
mocked_random.randint = random.randint
self.assertIsNone(v.generate())
def test_blankable(self):
v = IntegerField(blank=True, blank_prob=0.5)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 1
mocked_random.randint = random.randint
self.assertTrue(0 <= v.generate() <= 100)
v = IntegerField(blank=True, blank_prob=0.5)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 0
mocked_random.randint = random.randint
self.assertEqual(v.generate(), 0)
def test_choices(self):
choices = [1, 5, 10]
v = IntegerField(choices=choices)
self.assertIn(v.generate(), choices)
def test_nullable_blankable(self):
v = IntegerField(null=True, null_prob=0.3,
blank=True, blank_prob=0.3)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 0
mocked_random.randint = random.randint
self.assertIsNone(v.generate())
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 0.5
mocked_random.randint = random.randint
self.assertEqual(v.generate(), 0)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 1
mocked_random.randint = random.randint
self.assertTrue(0 <= v.generate() <= 100)
def test_nullable_blankable_choices(self):
choices = [1, 5, 10]
v = IntegerField(null=True, null_prob=0.3,
blank=True, blank_prob=0.3,
choices=choices)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 0
mocked_random.choice = random.choice
self.assertIsNone(v.generate())
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 0.5
mocked_random.choice = random.choice
self.assertEqual(v.generate(), 0)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 1
mocked_random.choice = random.choice
self.assertIn(v.generate(), choices)
class DoubleFieldTestCase(unittest.TestCase):
def test_default(self):
v = DoubleField()
self.assertTrue(0 <= v.generate() <= 1)
def test_min_max_values(self):
v = DoubleField(min_value=-2.5, max_value=0)
self.assertTrue(-2.5 <= v.generate() <= 0)
v = DoubleField(min_value=0, max_value=0)
self.assertEqual(v.generate(), 0)
v = DoubleField(min_value=2.5, max_value=0)
self.assertTrue(0 <= v.generate() <= 2.5)
def test_not_required(self):
v = DoubleField(required=False, not_present_prob=0)
self.assertTrue(0 <= v.generate() <= 1)
v = DoubleField(required=False, not_present_prob=1)
with self.assertRaises(NotGeneratedException):
v.generate()
v = DoubleField(required=False, not_present_prob=0.5)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 0
with self.assertRaises(NotGeneratedException):
v.generate()
v = DoubleField(required=False, not_present_prob=0.5)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 1
mocked_random.uniform = random.uniform
self.assertTrue(0 <= v.generate() <= 1)
def test_nullable(self):
v = DoubleField(null=True, null_prob=0.5)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 1
mocked_random.uniform = random.uniform
self.assertTrue(0 <= v.generate() <= 1)
v = DoubleField(null=True, null_prob=0.5)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 0
mocked_random.uniform = random.uniform
self.assertIsNone(v.generate())
def test_blankable(self):
v = DoubleField(blank=True, blank_prob=0.5)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 1
mocked_random.uniform = random.uniform
self.assertTrue(0 <= v.generate() <= 1)
v = DoubleField(blank=True, blank_prob=0.5)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 0
mocked_random.uniform = random.uniform
self.assertEqual(v.generate(), 0)
def test_choices(self):
choices = [1, 5, 10]
v = DoubleField(choices=choices)
self.assertIn(v.generate(), choices)
def test_nullable_blankable(self):
v = DoubleField(null=True, null_prob=0.3, blank=True, blank_prob=0.3)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 0
mocked_random.uniform = random.uniform
self.assertIsNone(v.generate())
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 0.5
mocked_random.uniform = random.uniform
self.assertEqual(v.generate(), 0)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 1
mocked_random.uniform = random.uniform
self.assertTrue(0 <= v.generate() <= 1)
def test_nullable_blankable_choices(self):
choices = [1, 5, 10]
v = DoubleField(null=True, null_prob=0.3, blank=True, blank_prob=0.3,
choices=choices)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 0
mocked_random.choice = random.choice
self.assertIsNone(v.generate())
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 0.5
mocked_random.choice = random.choice
self.assertEqual(v.generate(), 0)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 1
mocked_random.choice = random.choice
self.assertIn(v.generate(), choices)
class BooleanFieldTestCase(unittest.TestCase):
def test_default(self):
v = BooleanField()
self.assertIn(v.generate(), [True, False])
def test_not_required(self):
v = BooleanField(required=False, not_present_prob=0)
self.assertIn(v.generate(), [True, False])
v = BooleanField(required=False, not_present_prob=1)
with self.assertRaises(NotGeneratedException):
v.generate()
v = BooleanField(required=False, not_present_prob=0.5)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 0
with self.assertRaises(NotGeneratedException):
v.generate()
v = BooleanField(required=False, not_present_prob=0.5)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 1
mocked_random.choice = random.choice
self.assertIn(v.generate(), [True, False])
def test_nullable(self):
v = BooleanField(null=True, null_prob=0.5)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 1
mocked_random.choice = random.choice
self.assertIn(v.generate(), [True, False])
v = BooleanField(null=True, null_prob=0.5)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 0
mocked_random.choice = random.choice
self.assertIsNone(v.generate())
def test_blankable(self):
v = BooleanField(blank=True, blank_prob=0.5)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 1
mocked_random.choice = random.choice
self.assertIn(v.generate(), [True, False])
v = BooleanField(blank=True, blank_prob=0.5)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 0
mocked_random.choice = random.choice
self.assertFalse(v.generate())
def test_nullable_blankable(self):
v = BooleanField(null=True, null_prob=0.3, blank=True, blank_prob=0.3)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 0
mocked_random.choice = random.choice
self.assertIsNone(v.generate())
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 0.5
mocked_random.choice = random.choice
self.assertFalse(v.generate())
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 1
mocked_random.choice = random.choice
self.assertIn(v.generate(), [True, False])
class StringFieldTestCase(unittest.TestCase):
def test_default(self):
v = StringField()
generated = v.generate()
self.assertTrue(1 <= len(generated) <= 10)
self.assertTrue(all([s in (string.ascii_letters + string.digits)
for s in generated]))
def test_min_max_length(self):
v = StringField(min_length=5, max_length=10)
generated = v.generate()
self.assertTrue(5 <= len(generated) <= 10)
self.assertTrue(all([s in (string.ascii_letters + string.digits)
for s in generated]))
v = StringField(min_length=0, max_length=0)
generated = v.generate()
self.assertEqual(generated, '')
v = StringField(min_length=10, max_length=5)
with self.assertRaises(ValueError):
generated = v.generate()
def test_charset(self):
charset = '!@#$%^&*()_'
v = StringField(charset=charset)
generated = v.generate()
self.assertTrue(1 <= len(generated) <= 10)
self.assertTrue(all([s in charset for s in generated]))
def test_not_required(self):
v = StringField(required=False, not_present_prob=0)
generated = v.generate()
self.assertTrue(1 <= len(generated) <= 10)
self.assertTrue(all([s in (string.ascii_letters + string.digits)
for s in generated]))
v = StringField(required=False, not_present_prob=1)
with self.assertRaises(NotGeneratedException):
v.generate()
v = StringField(required=False, not_present_prob=0.5)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 0
with self.assertRaises(NotGeneratedException):
v.generate()
v = StringField(required=False, not_present_prob=0.5)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 1
mocked_random.choice = random.choice
mocked_random.randint = random.randint
generated = v.generate()
self.assertTrue(1 <= len(generated) <= 10)
self.assertTrue(all([s in (string.ascii_letters + string.digits)
for s in generated]))
def test_nullable(self):
v = StringField(null=True, null_prob=0.5)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 1
mocked_random.choice = random.choice
mocked_random.randint = random.randint
generated = v.generate()
self.assertTrue(1 <= len(generated) <= 10)
self.assertTrue(all([s in (string.ascii_letters + string.digits)
for s in generated]))
v = StringField(null=True, null_prob=0.5)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 0
generated = v.generate()
self.assertIsNone(generated)
def test_blankable(self):
v = StringField(blank=True, blank_prob=0.5)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 1
mocked_random.choice = random.choice
mocked_random.randint = random.randint
generated = v.generate()
self.assertTrue(1 <= len(generated) <= 10)
self.assertTrue(all([s in (string.ascii_letters + string.digits)
for s in generated]))
v = StringField(blank=True, blank_prob=0.5)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 0
generated = v.generate()
self.assertEqual(generated, '')
def test_choices(self):
choices = ['a', 'b', 'c']
v = StringField(choices=choices)
self.assertIn(v.generate(), choices)
def test_nullable_blankable(self):
v = StringField(null=True, null_prob=0.3, blank=True, blank_prob=0.3)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 0
generated = v.generate()
self.assertIsNone(generated)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 0.5
generated = v.generate()
self.assertEqual(generated, '')
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 1
mocked_random.choice = random.choice
mocked_random.randint = random.randint
generated = v.generate()
self.assertTrue(1 <= len(generated) <= 10)
self.assertTrue(all([s in (string.ascii_letters + string.digits)
for s in generated]))
def test_nullable_blankable_choices(self):
choices = ['a', 'b', 'c']
v = StringField(null=True, null_prob=0.3, blank=True, blank_prob=0.3,
choices=choices)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 0
generated = v.generate()
self.assertIsNone(generated)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 0.5
mocked_random.choice = random.choice
self.assertEqual(v.generate(), '')
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 1
mocked_random.choice = random.choice
self.assertIn(v.generate(), choices)
class ArrayFieldTestCase(unittest.TestCase):
def test_default(self):
v = ArrayField(IntegerField())
generated = v.generate()
self.assertTrue(1 <= len(generated) <= 10)
self.assertTrue(all([isinstance(i, int) for i in generated]))
int_field = mock.Mock(wraps=IntegerField())
int_field.generate = lambda: 0
str_field = mock.Mock(wraps=StringField())
str_field.generate = lambda: 'string'
v = ArrayField([int_field, str_field])
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.randint.return_value = 2
mocked_random.choice.side_effect = [int_field, str_field]
generated = v.generate()
self.assertEqual(len(generated), 2)
self.assertEqual(generated[0], 0)
self.assertTrue(generated[1], 'string')
def test_min_max_length(self):
v = ArrayField(IntegerField(), min_length=5, max_length=10)
generated = v.generate()
self.assertTrue(5 <= len(generated) <= 10)
self.assertTrue(all([isinstance(i, int) for i in generated]))
v = ArrayField(IntegerField(), min_length=0, max_length=0)
generated = v.generate()
self.assertEqual(generated, [])
v = ArrayField(IntegerField(), min_length=10, max_length=5)
with self.assertRaises(ValueError):
generated = v.generate()
def test_not_required(self):
v = ArrayField(IntegerField(), required=False, not_present_prob=0)
generated = v.generate()
self.assertTrue(1 <= len(generated) <= 10)
self.assertTrue(all([isinstance(i, int) for i in generated]))
v = ArrayField(IntegerField(), required=False, not_present_prob=1)
with self.assertRaises(NotGeneratedException):
v.generate()
v = ArrayField(IntegerField(), required=False, not_present_prob=0.5)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 0
with self.assertRaises(NotGeneratedException):
v.generate()
v = ArrayField(IntegerField(), required=False, not_present_prob=0.5)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 1
mocked_random.choice = random.choice
mocked_random.randint = random.randint
generated = v.generate()
self.assertTrue(1 <= len(generated) <= 10)
self.assertTrue(all([isinstance(i, int) for i in generated]))
def test_nullable(self):
v = ArrayField(IntegerField(), null=True, null_prob=0.5)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 1
mocked_random.choice = random.choice
mocked_random.randint = random.randint
generated = v.generate()
self.assertTrue(1 <= len(generated) <= 10)
self.assertTrue(all([isinstance(i, int) for i in generated]))
v = ArrayField(IntegerField(), null=True, null_prob=0.5)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 0
mocked_random.choice = random.choice
mocked_random.randint = random.randint
self.assertIsNone(v.generate())
def test_blankable(self):
v = ArrayField(IntegerField(), blank=True, blank_prob=0.5)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 1
mocked_random.choice = random.choice
mocked_random.randint = random.randint
generated = v.generate()
self.assertTrue(1 <= len(generated) <= 10)
self.assertTrue(all([isinstance(i, int) for i in generated]))
v = ArrayField(IntegerField(), blank=True, blank_prob=0.5)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 0
mocked_random.choice = random.choice
mocked_random.randint = random.randint
self.assertEqual(v.generate(), [])
def test_nullable_blankable(self):
v = ArrayField(IntegerField(), null=True, null_prob=0.3,
blank=True, blank_prob=0.3)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 0
mocked_random.choice = random.choice
mocked_random.randint = random.randint
self.assertIsNone(v.generate())
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 0.5
mocked_random.choice = random.choice
mocked_random.randint = random.randint
self.assertEqual(v.generate(), [])
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 1
mocked_random.choice = random.choice
mocked_random.randint = random.randint
generated = v.generate()
self.assertTrue(1 <= len(generated) <= 10)
self.assertTrue(all([isinstance(i, int) for i in generated]))
class ObjectFieldTestCase(unittest.TestCase):
simple_schema = {
'integer': IntegerField(),
'string': StringField(),
'boolean': BooleanField()
}
complex_schema = {
'array': ArrayField(IntegerField()),
'nest-1': {
'nest-2': {
'string': StringField()
},
'integer': IntegerField()
}
}
nested_schema = {
'simple': ObjectField(simple_schema),
'complex': ObjectField(complex_schema)
}
def assertEqualSimpleSchema(self, value):
self.assertEqual(set(value.keys()), set(self.simple_schema.keys()))
self.assertTrue(0 <= value['integer'] <= 100)
self.assertTrue(0 <= len(value['string']) <= 10)
self.assertTrue(all([s in (string.ascii_letters + string.digits)
for s in value['string']]))
self.assertTrue(isinstance(value['boolean'], bool))
def assertEqualComplexSchema(self, value):
self.assertEqual(set(value.keys()), set(self.complex_schema.keys()))
self.assertTrue(0 <= len(value['array']) <= 10)
self.assertTrue(all([isinstance(i, int) for i in value['array']]))
self.assertEqual(set(value['nest-1'].keys()),
set(self.complex_schema['nest-1'].keys()))
self.assertTrue(0 <= value['nest-1']['integer'] <= 100)
self.assertEqual(set(value['nest-1']['nest-2'].keys()),
set(self.complex_schema['nest-1']['nest-2'].keys()))
self.assertTrue(0 <= len(value['nest-1']['nest-2']['string']) <= 10)
self.assertTrue(all([s in (string.ascii_letters + string.digits)
for s in value['nest-1']['nest-2']['string']]))
def test_default_simple_schema(self):
v = ObjectField(self.simple_schema)
self.assertEqualSimpleSchema(v.generate())
def test_default_complex_schema(self):
v = ObjectField(self.complex_schema)
self.assertEqualComplexSchema(v.generate())
def test_default_nested_schema(self):
v = ObjectField(self.nested_schema)
generated = v.generate()
self.assertEqual(set(generated.keys()), set(self.nested_schema.keys()))
self.assertEqualSimpleSchema(generated['simple'])
self.assertEqualComplexSchema(generated['complex'])
def test_not_required(self):
v = ObjectField(self.simple_schema, required=False, not_present_prob=0)
self.assertEqualSimpleSchema(v.generate())
v = ObjectField(self.simple_schema, required=False, not_present_prob=1)
with self.assertRaises(NotGeneratedException):
v.generate()
v = ObjectField(self.simple_schema, required=False,
not_present_prob=0.5)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 0
with self.assertRaises(NotGeneratedException):
v.generate()
v = ObjectField(self.simple_schema, required=False,
not_present_prob=0.5)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 1
mocked_random.choice = random.choice
mocked_random.randint = random.randint
self.assertEqualSimpleSchema(v.generate())
def test_nullable(self):
v = ObjectField(self.simple_schema, null=True, null_prob=0.5)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 1
mocked_random.choice = random.choice
mocked_random.randint = random.randint
self.assertEqualSimpleSchema(v.generate())
v = ObjectField(self.simple_schema, null=True, null_prob=0.5)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 0
mocked_random.choice = random.choice
mocked_random.randint = random.randint
self.assertIsNone(v.generate())
def test_blankable(self):
v = ObjectField(self.simple_schema, blank=True, blank_prob=0.5)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 1
mocked_random.choice = random.choice
mocked_random.randint = random.randint
self.assertEqualSimpleSchema(v.generate())
v = ObjectField(self.simple_schema, blank=True, blank_prob=0.5)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 0
mocked_random.choice = random.choice
mocked_random.randint = random.randint
self.assertEqual(v.generate(), {})
def test_nullable_blankable(self):
v = ObjectField(self.simple_schema, null=True, null_prob=0.3,
blank=True, blank_prob=0.3)
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 0
mocked_random.choice = random.choice
mocked_random.randint = random.randint
self.assertIsNone(v.generate())
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 0.5
mocked_random.choice = random.choice
mocked_random.randint = random.randint
self.assertEqual(v.generate(), {})
with mock.patch(FIELDS_RANDOM_MODULE) as mocked_random:
mocked_random.random.return_value = 1
mocked_random.choice = random.choice
mocked_random.randint = random.randint
self.assertEqualSimpleSchema(v.generate())
| 40.468443 | 79 | 0.63648 | 3,391 | 28,854 | 5.225597 | 0.033324 | 0.136117 | 0.066027 | 0.068623 | 0.913713 | 0.892269 | 0.857054 | 0.834763 | 0.806941 | 0.79447 | 0 | 0.017702 | 0.261905 | 28,854 | 712 | 80 | 40.525281 | 0.81434 | 0 | 0 | 0.773913 | 0 | 0 | 0.009046 | 0.001213 | 0 | 0 | 0 | 0 | 0.234783 | 1 | 0.08 | false | 0 | 0.024348 | 0 | 0.121739 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
1a32d7137b654d451e0fd2940731354e0967eaa0 | 15,372 | py | Python | tests/test_ImputationKernel.py | AnotherSamWilson/miceforest | 2305f0894225608655c18365aded7ca5f431affa | [
"MIT"
] | 119 | 2020-08-28T03:21:11.000Z | 2022-03-20T20:22:13.000Z | tests/test_ImputationKernel.py | AnotherSamWilson/miceforest | 2305f0894225608655c18365aded7ca5f431affa | [
"MIT"
] | 36 | 2020-08-28T00:19:11.000Z | 2022-03-10T15:25:49.000Z | tests/test_ImputationKernel.py | AnotherSamWilson/miceforest | 2305f0894225608655c18365aded7ca5f431affa | [
"MIT"
] | 18 | 2020-11-13T21:31:29.000Z | 2022-01-14T14:48:44.000Z |
from sklearn.datasets import load_boston
import pandas as pd
import numpy as np
import miceforest as mf
from datetime import datetime
from miceforest.mean_matching_functions import mean_match_kdtree_classification
from matplotlib.pyplot import close
# Make random state and load data
# Define data
random_state = np.random.RandomState(5)
boston = pd.DataFrame(load_boston(return_X_y=True)[0])
boston.columns = [str(i) for i in boston.columns]
boston["3"] = boston["3"].map({0: 'a', 1: 'b'}).astype('category')
boston["8"] = boston["8"].astype("category")
boston_amp = mf.ampute_data(boston, perc=0.25, random_state=random_state)
def test_defaults_pandas():
new_data = boston_amp.loc[range(10), :].copy()
kernel = mf.ImputationKernel(
data=boston_amp,
datasets=2,
mean_match_function=mean_match_kdtree_classification
)
kernel.mice(iterations=2)
kernel2 = mf.ImputationKernel(
data=boston_amp,
datasets=1,
mean_match_function=mean_match_kdtree_classification
)
kernel2.mice(iterations=2)
# Test appending and then test kernel.
kernel.append(kernel2)
# Test mice after appendage
kernel.mice(1)
kernel.complete_data(0, inplace=True)
assert all(kernel.working_data.isnull().sum() == 0)
assert kernel.models[0][0][3].params['objective'] == 'regression'
assert kernel.models[0][3][3].params['objective'] == 'binary'
assert kernel.models[0][8][3].params['objective'] == 'multiclass'
# Make sure we didn't touch the original data
assert all(boston_amp.isnull().sum() > 0)
imp_ds = kernel.impute_new_data(new_data)
imp_ds.complete_data(2,inplace=True)
assert all(imp_ds.working_data.isnull().sum(0) == 0)
assert new_data.isnull().sum().sum() > 0
def test_complex_pandas():
working_set = boston_amp.copy()
# Switch our category columns to integer codes.
# Replace -1 with np.NaN or lightgbm will complain.
working_set["3"] = working_set["3"].cat.codes
working_set["8"] = working_set["8"].cat.codes
working_set["3"].replace(-1,np.NaN, inplace=True)
working_set["8"].replace(-1, np.NaN, inplace=True)
new_data = working_set.loc[range(10), :].copy()
# Customize everything.
vs = {"1": ["2","3","4","5"], "2": ["6","7"], "3": ["1","2","8"], "4": ["8","9","10"]}
mmc = {"1": 4, "2": 0.01, "3": 0}
ds = {"2": 100, "3": 0.5}
io = ["2", "3", "1"]
imputed_var_names = io
non_imputed_var_names = [str(x) for x in range(13) if str(x) not in io]
def mmf(
mmc,
model,
candidate_features,
bachelor_features,
candidate_values,
random_state
):
if mmc > 0:
imp_values = random_state.choice(candidate_values, size=bachelor_features.shape[0])
else:
bachelor_preds = model.predict(bachelor_features)
imp_values = bachelor_preds
return imp_values
kernel = mf.ImputationKernel(
data=working_set,
datasets=2,
variable_schema=vs,
imputation_order=io,
train_nonmissing=True,
mean_match_candidates=mmc,
data_subset=ds,
mean_match_function=mmf,
categorical_feature=[3,8],
copy_data=False
)
kernel2 = mf.ImputationKernel(
data=working_set,
datasets=1,
variable_schema=vs,
imputation_order=io,
train_nonmissing=True,
mean_match_candidates=mmc,
data_subset=ds,
mean_match_function=mmf,
categorical_feature=[3,8],
copy_data=False
)
assert kernel.mean_match_candidates == {1: 4, 2: 3, 3: 0, 4: 5}, "mean_match_candidates initialization failed"
assert kernel.data_subset == {1: 380, 2: 100, 3: 190, 4: 380}, "mean_match_subset initialization failed"
assert kernel.iteration_count() == 0, "iteration initialization failed"
assert kernel.categorical_variables == [3, 8], "categorical recognition failed."
nround = 2
kernel.mice(nround - 1, variable_parameters={"1": {"n_estimators": 15}}, n_estimators=10, verbose=True)
kernel2.mice(nround - 1, variable_parameters={"1": {"n_estimators": 15}}, n_estimators=10, verbose=True)
kernel.append(kernel2)
assert kernel.models[0][1][nround - 1].params['num_iterations'] == 15
assert kernel.models[0][2][nround - 1].params['num_iterations'] == 10
kernel.mice(1, variable_parameters={1: {"n_estimators": 15}}, n_estimators=10, verbose=True)
assert kernel.iteration_count() == nround, "iteration counting is incorrect."
assert kernel.models[0][1][nround].params['num_iterations'] == 15
assert kernel.models[0][2][nround].params['num_iterations'] == 10
# Make sure we only impute variables in variable_schema
compdat = kernel.complete_data(0)
assert all(compdat[imputed_var_names].isnull().sum() == 0)
assert all(compdat[non_imputed_var_names].isnull().sum() > 0)
# Test the ability to tune parameters with custom setup
optimization_steps = 2
op, ol = kernel.tune_parameters(
dataset=0,
optimization_steps=optimization_steps,
variable_parameters={1: {"bagging_fraction": 0.9, "feature_fraction_bynode": (0.85, 0.9)}},
bagging_fraction=0.8,
feature_fraction_bynode=(0.70,0.75),
verbose=True
)
assert op[1]["bagging_fraction"] == 0.9
assert op[2]["bagging_fraction"] == 0.8
assert (op[1]["feature_fraction_bynode"] >= 0.85) and (op[1]["feature_fraction_bynode"] <= 0.9)
assert (op[2]["feature_fraction_bynode"] >= 0.70) and (op[2]["feature_fraction_bynode"] <= 0.75)
kernel.mice(1, variable_parameters=op, verbose=True)
model_2_params = kernel.models[0][2][nround + 1].params
model_1_params = kernel.models[0][1][nround + 1].params
assert model_2_params["bagging_fraction"] == 0.8
assert model_1_params["bagging_fraction"] == 0.9
assert (model_2_params["feature_fraction_bynode"] >= 0.70) and (model_2_params["feature_fraction_bynode"] <= 0.75)
assert (model_1_params["feature_fraction_bynode"] >= 0.85) and (model_1_params["feature_fraction_bynode"] <= 0.9)
new_imp_dat = kernel.impute_new_data(new_data=new_data, verbose=True)
new_imp_complete = new_imp_dat.complete_data(0)
assert all(new_imp_complete[["1","2","3","4"]].isnull().sum() == 0)
# Plotting on multiple imputed dataset
new_imp_dat.plot_mean_convergence()
close()
new_imp_dat.plot_imputed_distributions()
close()
# Plotting on Multiple Imputed Kernel
kernel.plot_feature_importance(0)
close()
kernel.plot_mean_convergence()
close()
kernel.plot_imputed_distributions()
close()
def test_defaults_numpy():
working_set = boston_amp.copy()
working_set["3"] = working_set["3"].cat.codes
working_set["8"] = working_set["8"].cat.codes
working_set["3"].replace(-1,np.NaN, inplace=True)
working_set["8"].replace(-1, np.NaN, inplace=True)
new_data = working_set.loc[range(10), :].copy()
working_set = working_set.values
new_data = new_data.values
s = datetime.now()
kernel = mf.ImputationKernel(
data=working_set,
datasets=3,
categorical_feature=[3,8],
mean_match_function=mean_match_kdtree_classification
)
kernel.mice(iterations=1, verbose=True)
# Complete data with copy.
comp_dat = kernel.complete_data(0, inplace=False)
# We didn't complete data in place. Make sure we created
# a copy, and did not affect internal data or original data.
assert all(np.isnan(comp_dat).sum(0) == 0)
assert all(np.isnan(kernel.working_data).sum(0) > 0)
assert all(np.isnan(working_set).sum(0) > 0)
# Complete data in place
kernel.complete_data(0, inplace=True)
# We completed data in place. Make sure we only affected
# the kernel.working_data and not the original data.
assert all(np.isnan(kernel.working_data).sum(0) == 0)
assert all(np.isnan(working_set).sum(0) > 0)
imp_ds = kernel.impute_new_data(new_data)
imp_ds.complete_data(0,inplace=True)
assert all(np.isnan(imp_ds.working_data).sum(0) == 0)
assert np.isnan(new_data).sum() > 0
print(datetime.now() - s)
def test_complex_numpy():
working_set = boston_amp.copy()
# Switch our category columns to integer codes.
# Replace -1 with np.NaN or lightgbm will complain.
working_set["3"] = working_set["3"].cat.codes
working_set["8"] = working_set["8"].cat.codes
working_set["3"].replace(-1,np.NaN, inplace=True)
working_set["8"].replace(-1, np.NaN, inplace=True)
new_data = working_set.loc[range(100), :].copy()
working_set = working_set.values
new_data = new_data.values
# Specify that models should be built for variables 1, 2, 3, 4
vs = {1: [2,3,4,5], 2: [6,7], 3: [1,2,8], 4: [8,9,10]}
mmc = {1: 4, 2: 0.01, 3: 0}
ds = {2: 100, 3: 0.5}
# Only variables 1, 2, 3 should be imputed using mice.
io = [2,3,1]
niv = np.setdiff1d(np.arange(working_set.shape[1]), io)
nivs = np.setdiff1d(np.arange(working_set.shape[1]), list(vs))
def mmf(
mmc,
model,
candidate_features,
bachelor_features,
candidate_values,
random_state
):
if mmc > 0:
imp_values = random_state.choice(candidate_values, size=bachelor_features.shape[0])
else:
bachelor_preds = model.predict(bachelor_features)
imp_values = bachelor_preds
return imp_values
kernel = mf.ImputationKernel(
data=working_set,
datasets=2,
variable_schema=vs,
imputation_order=io,
train_nonmissing=True,
mean_match_candidates=mmc,
data_subset=ds,
mean_match_function=mmf,
categorical_feature=[3,8],
copy_data=False
)
kernel2 = mf.ImputationKernel(
data=working_set,
datasets=1,
variable_schema=vs,
imputation_order=io,
train_nonmissing=True,
mean_match_candidates=mmc,
data_subset=ds,
mean_match_function=mmf,
categorical_feature=[3,8],
copy_data=False
)
assert kernel.mean_match_candidates == {2: 3, 3: 0, 1: 4, 4: 5}, "mean_match_candidates initialization failed"
assert kernel.data_subset == {2: 100, 3: 190, 1: 380, 4: 380}, "mean_match_subset initialization failed"
assert kernel.iteration_count() == 0, "iteration initialization failed"
assert kernel.categorical_variables == [3, 8], "categorical recognition failed."
nround = 2
kernel.mice(nround - 1, variable_parameters={1: {"n_estimators": 15}}, n_estimators=10, verbose=True)
kernel2.mice(nround - 1, variable_parameters={1: {"n_estimators": 15}}, n_estimators=10, verbose=True)
kernel.append(kernel2)
assert kernel.models[0][1][nround - 1].params['num_iterations'] == 15
assert kernel.models[0][2][nround - 1].params['num_iterations'] == 10
kernel.mice(1, variable_parameters={1: {"n_estimators": 15}}, n_estimators=10, verbose=True)
assert kernel.iteration_count() == nround, "iteration counting is incorrect."
assert kernel.models[0][1][nround].params['num_iterations'] == 15
assert kernel.models[0][2][nround].params['num_iterations'] == 10
# Complete data with copy. Make sure only correct datasets and variables were affected.
compdat = kernel.complete_data(0, inplace=False)
assert all(np.isnan(compdat[:,io]).sum(0) == 0)
assert all(np.isnan(compdat[:,niv]).sum(0) > 0)
# Should have no affect on working_data
assert all(np.isnan(kernel.working_data).sum(0) > 0)
# Should have no affect on working_set
assert all(np.isnan(working_set).sum(0) > 0)
# Now complete the data in place
kernel.complete_data(0, inplace=True)
# Should have affect on working_data and original data
assert all(np.isnan(kernel.working_data[:, io]).sum(0) == 0)
assert all(np.isnan(working_set[:, io]).sum(0) == 0)
assert all(np.isnan(kernel.working_data[:, niv]).sum(0) > 0)
assert all(np.isnan(working_set[:, niv]).sum(0) > 0)
# Test the ability to tune parameters with custom setup
optimization_steps = 2
op, ol = kernel.tune_parameters(
dataset=0,
optimization_steps=optimization_steps,
variable_parameters={1: {"bagging_fraction": 0.9, "feature_fraction_bynode": (0.85, 0.9)}},
bagging_fraction=0.8,
feature_fraction_bynode=(0.70,0.75),
verbose=True
)
assert op[1]["bagging_fraction"] == 0.9
assert op[2]["bagging_fraction"] == 0.8
assert (op[1]["feature_fraction_bynode"] >= 0.85) and (op[1]["feature_fraction_bynode"] <= 0.9)
assert (op[2]["feature_fraction_bynode"] >= 0.70) and (op[2]["feature_fraction_bynode"] <= 0.75)
kernel.mice(1, variable_parameters=op, verbose=True)
model_2_params = kernel.models[0][2][nround + 1].params
model_1_params = kernel.models[0][1][nround + 1].params
assert model_2_params["bagging_fraction"] == 0.8
assert model_1_params["bagging_fraction"] == 0.9
assert (model_2_params["feature_fraction_bynode"] >= 0.70) and (model_2_params["feature_fraction_bynode"] <= 0.75)
assert (model_1_params["feature_fraction_bynode"] >= 0.85) and (model_1_params["feature_fraction_bynode"] <= 0.9)
new_imp_dat = kernel.impute_new_data(new_data=new_data, copy_data=True, verbose=True)
# Not in place
new_imp_complete = new_imp_dat.complete_data(0, inplace=False)
assert all(np.isnan(new_imp_complete[:, list(vs)]).sum(0) == 0)
assert all(np.isnan(new_imp_complete[:, nivs]).sum(0) > 0)
# Should have no affect on working_data or original data
assert all(np.isnan(new_imp_dat.working_data).sum(0) > 0)
assert all(np.isnan(new_data[:, list(vs)]).sum(0) > 0)
# complete data in place
new_imp_dat.complete_data(0, inplace=True)
assert all(np.isnan(new_imp_dat.working_data[:, list(vs)]).sum(0) == 0)
assert all(np.isnan(new_data[:, nivs]).sum(0) > 0)
# Alter in place
new_imp_dat = kernel.impute_new_data(new_data=new_data, copy_data=False, verbose=True)
# Before completion, nan's should still exist in data:
assert all(np.isnan(new_data).sum(0) > 0)
assert all(np.isnan(new_imp_dat.working_data).sum(0) > 0)
# Complete data not in place
new_imp_complete = new_imp_dat.complete_data(0, inplace=False)
assert all(np.isnan(new_imp_complete[:, nivs]).sum(0) > 0)
assert all(np.isnan(new_imp_complete[:, list(vs)]).sum(0) == 0)
assert all(np.isnan(new_data).sum(0) > 0)
assert all(np.isnan(new_imp_dat.working_data).sum(0) > 0)
# Complete data in place
new_imp_dat.complete_data(0, inplace=True)
assert all(np.isnan(new_data[:, nivs]).sum(0) > 0)
assert all(np.isnan(new_data[:, list(vs)]).sum(0) == 0)
assert all(np.isnan(new_imp_dat.working_data[:, nivs]).sum(0) > 0)
assert all(np.isnan(new_imp_dat.working_data[:, list(vs)]).sum(0) == 0)
# Plotting on multiple imputed dataset
new_imp_dat.plot_mean_convergence()
close()
new_imp_dat.plot_imputed_distributions()
close()
# Plotting on Multiple Imputed Kernel
kernel.plot_feature_importance(0)
close()
kernel.plot_mean_convergence()
close()
kernel.plot_imputed_distributions()
close() | 37.955556 | 118 | 0.666732 | 2,221 | 15,372 | 4.411076 | 0.102656 | 0.04185 | 0.015821 | 0.048995 | 0.828927 | 0.814535 | 0.785036 | 0.771461 | 0.75666 | 0.719914 | 0 | 0.042522 | 0.19529 | 15,372 | 405 | 119 | 37.955556 | 0.749475 | 0.0981 | 0 | 0.708054 | 0 | 0 | 0.089259 | 0.032984 | 0 | 0 | 0 | 0 | 0.251678 | 1 | 0.020134 | false | 0 | 0.030201 | 0 | 0.057047 | 0.003356 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
46c6a9754ae1f181cf9b9764ef14dc427cd4261b | 17,227 | py | Python | digits.py | Yian17/Face-and-handwritten-digit-recognition | 95c5a92021013711b340c109411e6efe7880b942 | [
"MIT"
] | 2 | 2020-07-22T21:46:56.000Z | 2020-07-26T03:21:34.000Z | digits.py | Yian17/ML---Face-and-handwritten-digit-recognition | 95c5a92021013711b340c109411e6efe7880b942 | [
"MIT"
] | null | null | null | digits.py | Yian17/ML---Face-and-handwritten-digit-recognition | 95c5a92021013711b340c109411e6efe7880b942 | [
"MIT"
] | null | null | null | from pylab import *
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.pyplot import imsave
import matplotlib.cbook as cbook
import time
from scipy.misc import imread
from scipy.misc import imresize
import matplotlib.image as mpimg
from scipy.ndimage import filters
import urllib
from numpy import random as random
import random as rd
import cPickle
import os
from scipy.io import loadmat
#Load the MNIST digit data
M = loadmat("mnist_all.mat")
# =========================== PART 1 ==========================================
def part1():
f, axarr = plt.subplots(10, 10, sharex='all', sharey='all')
rd.seed(1)
for ax1 in range(10):
lst = rd.sample(M["train"+str(ax1)], 10)
for ax2 in range(10):
axarr[ax1, ax2].imshow(lst[ax2].reshape((28,28)), cmap=cm.gray)
axarr[ax1, ax2].axis('off')
plt.show()
plt.savefig("part1.jpg")
# part1()
# =========================== PART 2 ==========================================
def softmax(y):
'''Return the output of the softmax function for the matrix of output y. y
is an NxM matrix where N is the number of outputs for a single case, and M
is the number of cases'''
return exp(y)/tile(sum(exp(y), 0), (len(y), 1))
def part2(x, W, b):
# I recommend you divide the data by 255.0
#x /= 255.
# x: (784, ) -> (784, 1)
if x.shape == (784, ):
x = x[:, np.newaxis]
# initialize Weight and bias matrix to all zero
# W = np.zeros((784, 10))
# b = np.zeros((10, 1))
return softmax(np.dot(W.T, x) + b)
# =========================== PART 3 ==========================================
def cf(x, y, W, b):
p = part2(x, W, b)
return -sum(y * log(p))
# computes the gradient of the cost function with respect to the weights and biases of the network
def df(x, y, W, b):
p = part2(x, W, b)
partial_Co = p - y # (10, 1)
if x.shape == (784, ):
x = x[:, np.newaxis]
# x -> (784, 1) partial_Co -> (1, 10)
partial_CW = dot(x, partial_Co.T) #reshape((1, 10))
partial_Cb = dot(partial_Co, ones((partial_Co.shape[1], 1)))
return partial_CW, partial_Cb
def cost_part3(x, y, W, b):
if x.shape == (784, ):
x = x[:, np.newaxis]
p = softmax(np.dot(W.T, x) + b)
cost_val = -sum(y * log(p))
return cost_val
def part3():
# I recommend you divide the data by 255.0
x = M["test0"][10].T/255. # x -> (784, )
y = np.zeros((10, 1)) # true value of output
y[0] = 1
W = np.random.randn(784, 10) * 10e-5
b = np.zeros((10, 1))
par_CW, par_Cb = df(x, y, W, b)
np.random.seed(5)
for i in range(5):
m = np.random.randint(0, 784)
n = np.random.randint(0, 10)
h = 0.00000001
# respect to Weights
weight_h = np.zeros((784, 10))
weight_h[m][n] = h
fd_weight = (cost_part3(x, y, W + weight_h, b) - cost_part3(x, y, W, b)) / h
# respect to Bias
bias_h = np.zeros((10, 1))
bias_h[n][0] = h
fd_bias = (cost_part3(x, y, W, b + bias_h) - cost_part3(x, y, W, b)) / h
print "================================================================"
print "at coordinates:(" + str(m) + ", " + str(n) + " )"
print "finite difference with respect to weight: " + str(fd_weight)
print "gradient of cost function with respect to the weights: " + str(par_CW[m][n])
print "finite difference with respect to bias: " + str(fd_bias)
print "gradient of cost function with respect to the bias: " + str(par_Cb[n][0])
# part3()
# =========================== PART 4 ==========================================
def gradient_descent(x, y, W, b, alpha, itr):
EPS = 1e-5
prev_w = W - 10 * EPS
W_cp = W.copy()
b_cp = b.copy()
i = 0
results = []
while norm(W_cp - prev_w) > EPS and i < itr:
i += 1
prev_w = W_cp.copy()
partial_CW, partial_Cb = df(x, y, W_cp, b_cp)
W_cp -= alpha * partial_CW
b_cp -= alpha * partial_Cb
if i % 100 == 0:
print "Iteration: ", i
curr_W, curr_b = W_cp.copy(), b_cp.copy()
results.append([i, curr_W, curr_b])
return results, W_cp, b_cp
def part4():
W = np.random.randn(784, 10) * 10e-5
b = np.zeros((10, 1))
training = np.empty((784, 0))
tests = np.empty((784, 0))
y_training = np.empty((10, 0))
y_test = np.empty((10, 0))
for i in range(0, 10):
training = np.hstack((training, M["train"+str(i)].T/255.0))
tests = np.hstack((tests, M["test"+str(i)].T/255.0))
training_size = len(M["train"+str(i)])
test_size = len(M["test"+str(i)])
# one hot vector
o_vector = np.zeros((10, 1))
o_vector[i] = 1
y_training = np.hstack((y_training, tile(o_vector, (1, training_size))))
y_test = np.hstack((y_test, tile(o_vector, (1, test_size))))
# calculating performance
alpha = 0.00001
plot_data, end_W, end_b = gradient_descent(training, y_training, W, b, alpha, 3000)
train_accuracy, test_accuracy, itr_idx = [], [], []
for i in plot_data:
itr_idx.append(i[0])
curr_w, curr_b = i[1], i[2]
training_size, test_size = training.shape[1], tests.shape[1]
train_correct, test_correct = 0, 0
train_x = part2(training, curr_w, curr_b)
test_x = part2(tests, curr_w, curr_b)
for j in range(training_size):
if y_training[:, j].argmax() == train_x[:, j].argmax():
train_correct += 1
for k in range(test_size):
if y_test[:, k].argmax() == test_x[:, k].argmax():
test_correct += 1
train_accuracy.append(float(train_correct)/float(training_size))
test_accuracy.append(float(test_correct)/float(test_size))
plt.figure()
plt.plot(itr_idx, train_accuracy, color='blue', marker='o', label="Training")
plt.plot(itr_idx, test_accuracy, color='green', marker='o', label="Test")
plt.legend(loc="best")
plt.xlabel("Number of Iterations")
plt.ylabel("Performance on Accuracy")
savefig('part4_learning_curves')
plt.figure()
plt.axis('off')
for i in range(0, 10):
plt.subplot(1, 10, i + 1).axis('off')
number = end_W[:, i].reshape((28, 28))
plt.imshow(number, cmap="coolwarm")
savefig("part4_weights.png")
# part4()
# =========================== PART 5 ==========================================
def grad_descent_m(x, y, W, b, alpha, itr, momentum):
EPS = 1e-5
prev_w = W - 10 * EPS
W_cp = W.copy()
b_cp = b.copy()
i = 0
results = []
while norm(W_cp - prev_w) > EPS and i < itr:
i += 1
prev_w = W_cp.copy()
partial_CW, partial_Cb = df(x, y, W_cp, b_cp)
W2, b2 = W.copy(), b.copy()
W_cp -= alpha * partial_CW + momentum * W2
b_cp -= alpha * partial_Cb + momentum * b2
if i % 100 == 0:
print "Iteration: ", i
curr_W, curr_b = W_cp.copy(), b_cp.copy()
# print "=======In while======="
# print curr_W, curr_b
results.append([i, curr_W, curr_b])
return results, W_cp, b_cp
def part5():
np.random.seed(1)
W = np.random.randn(784, 10) * 10e-5
b = np.zeros((10, 1))
training = np.empty((784, 0))
tests = np.empty((784, 0))
y_training = np.empty((10, 0))
y_test = np.empty((10, 0))
for i in range(0, 10):
training = np.hstack((training, M["train"+str(i)].T/255.0))
tests = np.hstack((tests, M["test"+str(i)].T/255.0))
training_size = len(M["train"+str(i)])
test_size = len(M["test"+str(i)])
# one hot vector
o_vector = np.zeros((10, 1))
o_vector[i] = 1
y_training = np.hstack((y_training, tile(o_vector, (1, training_size))))
y_test = np.hstack((y_test, tile(o_vector, (1, test_size))))
# calculating performance
alpha = 0.00001
momentum = 0.99
plot_data, end_W, end_b = grad_descent_m(training, y_training, W, b, alpha, 3000, momentum)
print "===========plot data============"
train_accuracy, test_accuracy, itr_idx = [], [], []
for i in plot_data:
itr_idx.append(i[0])
curr_w, curr_b = i[1], i[2]
training_size, test_size = training.shape[1], tests.shape[1]
train_correct, test_correct = 0, 0
train_x = part2(training, curr_w, curr_b)
test_x = part2(tests, curr_w, curr_b)
for j in range(training_size):
if y_training[:, j].argmax() == train_x[:, j].argmax():
train_correct += 1
for k in range(test_size):
if y_test[:, k].argmax() == test_x[:, k].argmax():
test_correct += 1
train_accuracy.append(float(train_correct)/float(training_size))
test_accuracy.append(float(test_correct)/float(test_size))
plt.figure()
plt.plot(itr_idx, train_accuracy, color='blue', marker='o', label="Training")
plt.plot(itr_idx, test_accuracy, color='green', marker='o', label="Test")
plt.legend(loc="best")
plt.xlabel("Number of Iterations")
plt.ylabel("Performance on Accuracy")
plt.savefig('part5_learning_curves.png')
return plot_data, [end_W, end_b]
# part5()
# =========================== PART 6 ==========================================
def grad_descent_compare(x, y, W, b, alpha, itr, momentum, if_m):
EPS = 1e-5
prev_w = W - 10 * EPS
W_cp = W.copy()
b_cp = b.copy()
i = 0
results = []
while norm(W_cp - prev_w) > EPS and i < itr:
i += 1
prev_w = W_cp.copy()
partial_CW, partial_Cb = df(x, y, W_cp, b_cp)
W2, b2 = W.copy(), b.copy()
if if_m:
W_cp -= alpha * partial_CW + momentum * W2
b_cp -= alpha * partial_Cb + momentum * b2
else:
W_cp -= alpha * partial_CW
b_cp -= alpha * partial_Cb
curr_W, curr_b = W_cp.copy(), b_cp.copy()
results.append([i, curr_W, curr_b])
if i % 100 == 0:
print "Iteration: ", i
#curr_W, curr_b = W_cp.copy(), b_cp.copy()
#results.append([i, curr_W, curr_b])
return results, W_cp, b_cp
def part6a():
np.random.seed(1)
W = np.random.randn(784, 10) * 10e-5
b = np.zeros((10, 1))
training = np.empty((784, 0))
tests = np.empty((784, 0))
y_training = np.empty((10, 0))
y_test = np.empty((10, 0))
for i in range(0, 10):
training = np.hstack((training, M["train"+str(i)].T/255.0))
tests = np.hstack((tests, M["test"+str(i)].T/255.0))
training_size = len(M["train"+str(i)])
test_size = len(M["test"+str(i)])
# one hot vector
o_vector = np.zeros((10, 1))
o_vector[i] = 1
y_training = np.hstack((y_training, tile(o_vector, (1, training_size))))
y_test = np.hstack((y_test, tile(o_vector, (1, test_size))))
alpha = 0.00005
momentum = 0.99
part5_r, part5_end_W, part5_end_b = grad_descent_compare(training, y_training, W, b, alpha, 3000, momentum, True)
loc1, loc2 = (380, 0), (381, 0)
# w1rs, w2rs = part5_end_W[(375,)], part5_end_W[(385,)]
# np.random.seed(3)
# w1rs = np.random.uniform(0, 2, 10) * 10e-5
# w2rs = np.random.uniform(0, 2, 10) * 10e-5
w1rs = np.arange(-0, 3, 0.05)
w2rs = np.arange(-0, 3, 0.05)
w1z, w2z = np.meshgrid(w1rs, w2rs)
c = np.zeros([w1rs.size, w2rs.size])
#b.shape # itr 200: (7840, 60000)
#w1z, w2z = np.meshgrid(w1rs, w2rs)
for i, w1 in enumerate(w1rs):
for j, w2 in enumerate(w2rs):
weights_cp = part5_end_W.copy()
weights_cp[loc1], weights_cp[loc2] = w1, w2
c[j, i] = cf(training, y_training, weights_cp, part5_end_b)
plt.figure()
plt.contour(w1z, w2z, c, cmap="coolwarm")
plt.title("Contour Plot")
plt.legend(loc="best")
plt.savefig("part6a_contour.png")
# cPickle.dump(fig_object, file("part6a.pickle", 'w'))
#part6a()
def part6b():
np.random.seed(1)
W = np.random.randn(784, 10) * 10e-5
b = np.zeros((10, 1))
training = np.empty((784, 0))
tests = np.empty((784, 0))
y_training = np.empty((10, 0))
y_test = np.empty((10, 0))
for i in range(0, 10):
training = np.hstack((training, M["train"+str(i)].T/255.0))
tests = np.hstack((tests, M["test"+str(i)].T/255.0))
training_size = len(M["train"+str(i)])
test_size = len(M["test"+str(i)])
# one hot vector
o_vector = np.zeros((10, 1))
o_vector[i] = 1
y_training = np.hstack((y_training, tile(o_vector, (1, training_size))))
y_test = np.hstack((y_test, tile(o_vector, (1, test_size))))
loc1, loc2 = (380, 0), (381, 0)
alpha = 0.0005
momentum = 0.99
part5_r, part5_end_W, part5_end_b = grad_descent_compare(training, y_training, W, b, alpha, 20, momentum, False)
w1rs, w2rs, gd_traj = [], [], [(0, 0)]
for i in part5_r:
w1rs.append(i[1][loc1])
w2rs.append(i[1][loc2])
gd_traj.append((i[1][loc1], i[1][loc2]))
w1z, w2z = np.meshgrid(w1rs, w2rs)
c = np.zeros([w1rs.size, w2rs.size])
for i, w1 in enumerate(w1rs):
for j, w2 in enumerate(w2rs):
weights_cp = part5_end_W.copy()
weights_cp[loc1], weights_cp[loc2] = w1, w2
c[j, i] = cf(training, y_training, weights_cp, part5_end_b)
plt.figure()
plt.contour(w1z, w2z, c, cmap="coolwarm")
plt.plot([a for a, b in gd_traj], [b for a, b in gd_traj], 'yo-', label="No Momentum")
plt.title("Trajectory Plot")
plt.legend(loc="best")
plt.savefig("part6b.png")
#part6b()
def part6c():
np.random.seed(1)
W = np.random.randn(784, 10) * 10e-5
b = np.zeros((10, 1))
training = np.empty((784, 0))
tests = np.empty((784, 0))
y_training = np.empty((10, 0))
y_test = np.empty((10, 0))
for i in range(0, 10):
training = np.hstack((training, M["train"+str(i)].T/255.0))
tests = np.hstack((tests, M["test"+str(i)].T/255.0))
training_size = len(M["train"+str(i)])
test_size = len(M["test"+str(i)])
# one hot vector
o_vector = np.zeros((10, 1))
o_vector[i] = 1
y_training = np.hstack((y_training, tile(o_vector, (1, training_size))))
y_test = np.hstack((y_test, tile(o_vector, (1, test_size))))
loc1, loc2 = (380, 0), (381, 0)
alpha = 0.0005
momentum = 0.99
part5_r, part5_end_W, part5_end_b = grad_descent_compare(training, y_training, W, b, alpha, 20, momentum, True)
w1rs, w2rs, mo_traj = [], [], [(0, 0)]
for i in part5_r:
w1rs.append(i[1][loc1])
w2rs.append(i[1][loc2])
mo_traj.append((i[1][loc1], i[1][loc2]))
w1z, w2z = np.meshgrid(w1rs, w2rs)
c = np.zeros([w1rs.size, w2rs.size])
for i, w1 in enumerate(w1rs):
for j, w2 in enumerate(w2rs):
weights_cp = part5_end_W.copy()
weights_cp[loc1], weights_cp[loc2] = w1, w2
c[j, i] = cf(training, y_training, weights_cp, part5_end_b)
plt.figure()
plt.contour(w1z, w2z, c, cmap="coolwarm")
plt.plot([a for a, b in mo_traj], [b for a, b in mo_traj], 'go-', label="With Momentum")
plt.title("Trajectory Plot")
plt.legend(loc="best")
plt.savefig("part6c.png")
#part6c()
def part6e():
np.random.seed(1)
W = np.random.randn(784, 10) * 10e-5
b = np.zeros((10, 1))
training = np.empty((784, 0))
tests = np.empty((784, 0))
y_training = np.empty((10, 0))
y_test = np.empty((10, 0))
for i in range(0, 10):
training = np.hstack((training, M["train"+str(i)].T/255.0))
tests = np.hstack((tests, M["test"+str(i)].T/255.0))
training_size = len(M["train"+str(i)])
test_size = len(M["test"+str(i)])
# one hot vector
o_vector = np.zeros((10, 1))
o_vector[i] = 1
y_training = np.hstack((y_training, tile(o_vector, (1, training_size))))
y_test = np.hstack((y_test, tile(o_vector, (1, test_size))))
loc1, loc2 = (100, 0), (600, 0)
alpha = 0.0005
momentum = 0.99
part5_r, part5_end_W, part5_end_b = grad_descent_compare(training, y_training, W, b, alpha, 3000, momentum, True)
gd_traj, mo_traj = [], []
for i in part5_r:
gd_traj.append((i[1][loc1], i[1][loc2]))
mo_traj.append((i[1][loc1], i[1][loc2]))
w1rs = np.arange(1, 4, 0.05)
w2rs = np.arange(1, 4, 0.05)
w1z, w2z = np.meshgrid(w1rs, w2rs)
c = np.zeros([w1rs.size, w2rs.size])
#b.shape # itr 200: (7840, 60000)
for i, w1 in enumerate(w1rs):
for j, w2 in enumerate(w2rs):
weights_cp = part5_end_W.copy()
weights_cp[loc1], weights_cp[loc2] = w1, w2
c[j, i] = cf(training, y_training, weights_cp, part5_end_b)
plt.figure()
plt.contour(w1z, w2z, c, cmap="coolwarm")
plt.plot([a for a, b in gd_traj], [b for a,b in gd_traj], 'yo-', label="No Momentum")
plt.plot([a for a, b in mo_traj], [b for a,b in mo_traj], 'go-', label="Momentum")
plt.title("Contour Plot")
plt.legend(loc="best")
plt.savefig("part6e.png")
#part6e()
| 32.320826 | 117 | 0.554595 | 2,713 | 17,227 | 3.379285 | 0.095835 | 0.02945 | 0.015707 | 0.017452 | 0.779123 | 0.773342 | 0.753054 | 0.726876 | 0.715532 | 0.696117 | 0 | 0.062793 | 0.255819 | 17,227 | 532 | 118 | 32.381579 | 0.65234 | 0.090672 | 0 | 0.729659 | 0 | 0 | 0.058911 | 0.007129 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.041995 | null | null | 0.026247 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
46f9ac4fbf2e3b3b9b76f2ceccd93a36c9b82e5d | 2,469 | py | Python | icon.py | BeenLi/BookRentalSystem | ad4ce864c70a1fadd38d5736d612f23a0463a29c | [
"MIT"
] | null | null | null | icon.py | BeenLi/BookRentalSystem | ad4ce864c70a1fadd38d5736d612f23a0463a29c | [
"MIT"
] | null | null | null | icon.py | BeenLi/BookRentalSystem | ad4ce864c70a1fadd38d5736d612f23a0463a29c | [
"MIT"
] | null | null | null | img = b'AAABAAEAICAAAAEAGAAdBwAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAAgAAAAIAgGAAAAc3p69AAAAAFzUkdCAK7OHOkAAAAEZ0FNQQAAsY8L/GEFAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAGsklEQVRYR72XC1BUVRjHd+/ex7JPdnkIIoimkspmSiD45inIw/AFZuILUV4aIhCSiZpmTgk4hCb5yGxqCrXGZnR8pD0cRpvEx4iWo/m2rMaUWEWW/XfOZXdbVlZXmenOfHPuvefc7/+73/edc+6VSLp2+HEy6UXiwq9rbiQSD7lac5rleaPgpspx0ZlMwTF1vlrepBaYneQZmYvPdTrstRfiU1qK9tWD5YVmuxHl5Jya42FQCbLLoT1VTRfKh4C29JoMMjwGwpkv8ZE4hbuu2RCX9IBE4qQLb/IsAE90G0tGLCCmJ5ZNrMRi+aSdTGwwMd7Oiy0Fyo4p0JExyRKGeZNXqmvl7rqdtCXXi55IQAYMJDaNGKYUluLl3ILWuBmZLYYRY4x63+5GUiMPNR6e9aQ/ywJqX4RRgkZzhBWEB34hYXfC5y0wxS59G0lrqzF2+VpQnxbfVMPpUS5VqB7SwV/evo+dxOp+bzd6/uml2yiq3YGIxPGkWBX35Ur1+2TsCEGlqdf4+jWNW11pLjhxESXnf3vEqE+Lb1oLzgHY8EiRlgJ8dMuIymvNNqsi5zXXjai9aUR1wwWMm5MjwkYWLzMVn73RqbAVho6z+HYdYNGO3YjOWYTY/CJMq/wQJQd/xLrL92xA6wkQdWwVmbX7IIaR8b1HRUHt4wuSDrByOYrOXhfHPTXAm18fQXLpSiQsXorByZPg1bsvNN4+iM4uwMqGX0UQ6njhsfPwDw2H1s8f4Vn5mLhhO7IP/4TFp6+K4hTwmQC2Xm/CmsZbHdJQ9t0pjM7MQ0rZKhsAFZi0cQcc0zB1+y5QexJAX2tFuPHsFvsamFC8FIJKJdJ7BPTCoMRUTFpVgVWnrtqg7FPgWHydAVANxwq8YLnhy8qYVitA9Q8NWLJ7vyhE8156uAEZ1VsRkpoGpU6PyaurOkSgs8qn99K31WHuvqO2FFANoufzyDRQ8NxGQme2Amg0ajzX//kO4bfOiBUnLoGmwloDzsTpfZ+eAVBrNTYAqqGUczWOAH6kw5gZYwCj94Knhw57VmVBSx60n4adnT8uBRRAIDNh75ps6HVayDy9kRltANXqEAW1nK0lHS2xgwIxoE8AbnyxEg2bShDQK7DLAJ4+3XBuWxmufrYcQb17YOyLvTA7MrjFPgo9WIYxBXpr8UrUEBj3vgfzoSqkjg5BwpzsLgOEpr2KtJgw0Wfz3ncxedQg9Oqmha0WlHJ2MyOVYvWcJHGQ6WAlMhIiEBQcjJrG610GyK9vRI9+/TA7aQTaiH+qsXxmAqRSCcQo8KzM9NVbc4Fv1qNlfwUShw8SC+bjc9ceWYpdqYGFx39G2pbPEVmyDOFz88SFKe/706LP1DFD8JBoUK268tkg2q0UoI3eoLY6MxnKgECne4FTgHO3xNWvZ8RICBotWRUjEDI9E6ML3xBBrAuRyj8A63JSRS1qUhL5DgCvT40BG2R4agD61gFDh2N8ZS0KT10RBYsbbyLv6BnMO3BMbGkEZH0HYNmMBOcAJz4oRlx4OwA1TqGEoHWHV9BADEgYj3iyJyza8y0qrjR1uhLSzShk5jzo+gSBYVlwai0EMvVYlVr0lzRyMM5sLnUOYA1NzNBgcFGJkOeWQZhfAn5qFrj4ieDDRkLerTvc9J6Izi0CXZCo4xk798N/+BjwHl7gyXbOp2WKzwmzCyBk5IMbFo2UUUNswk5TYO3YVJgOmUwGjmPbo8ELRqZH4F02ItIkzMgXnQohEWDdFO2RcteLgFSQDRvVInXX3yGfYA8ljMyoUSnA8xw+KctwHWDHkgxkjAlG2cShbQzDLCMi/sTiJTJuvYTj/pLqve5xyekQ5haJkRKyS8leH9UqYblm0r+BjH2JGEP+GdYuTxtmTh/ZH7tWZLoOUJGbiqLxoUgfHkQ/0edZ1u2xpF1oWULTidAV+tbyghXgopNJlPgzpC/AYY3Pnz56gHFBYgg2FExxHcB8YB3+2JoDb63iH+KQfg3H6RVsc7JB16KRy05bRHKtxWppKRw9/GQcZ/1bCuuuUzb9uS0X5oPt89/eHpmG1k7T3jWonBXZpnbjGolDKX3zFIPuQf1iAwSWsf9xcXhhkiSFok7bzdckKNX0b4klq92lmqwYs2nfO64D5KWEt8p59m/iwPoJ7UHe/CQVd2OZ+Y6qlmuDoFRd7jk4tKn8+C+gLb0mfZOJr7uFE0aYXIoAXY5lDGMmD3o7EbLeLicn1KyHMwD6u+ZL0+QyANmp2p4g7qz7vxQolI4/rP8LgGMR2oOKAOZDlaQgq2x7wb8yx4Gv9m5HUQAAAABJRU5ErkJggg==' | 2,469 | 2,469 | 0.970433 | 64 | 2,469 | 37.4375 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.147142 | 0.00081 | 2,469 | 1 | 2,469 | 2,469 | 0.824078 | 0 | 0 | 0 | 0 | 1 | 0.995951 | 0.995951 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
64487bc4336c5fc07f304984dc6e79308aa2afeb | 4,046 | py | Python | QBG/Model/tools/fitting_tools.py | GYMS-PKU/Daily-Frequency-Quant | 808eda9930efecff04ecf98abf617404cadd0003 | [
"MIT"
] | 3 | 2021-11-21T04:35:04.000Z | 2022-03-04T09:19:53.000Z | QBG/Model/tools/fitting_tools.py | GYMS-PKU/Daily-Frequency-Quant | 808eda9930efecff04ecf98abf617404cadd0003 | [
"MIT"
] | null | null | null | QBG/Model/tools/fitting_tools.py | GYMS-PKU/Daily-Frequency-Quant | 808eda9930efecff04ecf98abf617404cadd0003 | [
"MIT"
] | 5 | 2021-10-03T00:00:22.000Z | 2022-03-07T09:02:00.000Z | # Copyright (c) 2022 Dai HBG
"""
定义了多种模型的拟合函数
"""
import random
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.nn.init as init
import torch.optim as optim
def fit_daily_gpu(model, x: np.array, y: np.array, top: np.array, optimizer, loss_func, batch: bool = True,
batch_size: int = 1, epochs: int = 5, verbose: bool = True, device: str = 'cuda',
shuffle: bool = True): # 后缀_gpu表示x和y在显存中,并且保证输入全是合法的
"""
:param model:
:param x: 三维矩阵,days * stocks_num * input_dim
:param y:
:param top:
:param optimizer:
:param loss_func:
:param batch:
:param batch_size:
:param epochs:
:param verbose:
:param device:
:param shuffle:
"""
if batch:
model.train()
for epoch in range(epochs):
order = [i for i in range(x.shape[0])]
if shuffle:
random.shuffle(order)
for i in range(x.shape[0] // batch_size):
optimizer.zero_grad()
loss = 0
for j in order[batch_size * i:batch_size * (i + 1)]:
out = model(x[j, top[j]])
loss += loss_func(out, y[j:j + 1, top[j]].T)
loss /= batch_size
loss.backward()
optimizer.step()
if x.shape[0] - batch_size * (i + 1) >= 1:
optimizer.zero_grad()
loss = 0
for j in order[batch_size * (i + 1):]:
out = model(x[j, top[j]])
loss += loss_func(out, y[j:j + 1, top[j]].T)
loss /= (x.shape[0] - batch_size * (i + 1))
loss.backward()
optimizer.step()
if verbose:
print('loss: {:.4f}'.format(float(loss)))
else:
return
def fit_daily(model, x: np.array, y: np.array, top: np.array, optimizer, loss_func, batch: bool = True,
batch_size: int = 1, epochs: int = 5, verbose: bool = True, device: str = 'cuda',
shuffle: bool = True): # 后缀_cpu表示x和y在内存中
"""
:param model:
:param x: 三维矩阵,days * stocks_num * input_dim
:param y:
:param top:
:param optimizer:
:param loss_func:
:param batch:
:param batch_size:
:param epochs:
:param verbose:
:param device:
:param shuffle:
"""
if batch:
model.train()
for epoch in range(epochs):
order = [i for i in range(x.shape[0])]
if shuffle:
random.shuffle(order)
for i in range(x.shape[0] // batch_size):
optimizer.zero_grad()
loss = 0
for j in order[batch_size * i:batch_size * (i + 1)]:
x_tmp = x[j, top[j]]
x_tmp[np.isnan(x_tmp)] = 0
out = model(torch.Tensor(x_tmp).to(device))
y_tmp = y[j:j + 1, top[j]].T
y_tmp[~np.isnan(y_tmp)] -= np.nanmean(y_tmp[~np.isnan(y_tmp)])
y_tmp[~np.isnan(y_tmp)] /= np.nanstd(y_tmp[~np.isnan(y_tmp)])
y_tmp[np.isnan(y_tmp)] = 0
loss += loss_func(out, torch.Tensor(y_tmp).to(device))
loss /= batch_size
loss.backward()
optimizer.step()
if x.shape[0] - batch_size * (i + 1) >= 1:
optimizer.zero_grad()
loss = 0
for j in order[batch_size * (i + 1):]:
x_tmp = x[j, top[j]]
x_tmp[np.isnan(x_tmp)] = 0
out = model(torch.Tensor(x_tmp).to(device))
y_tmp = y[j:j + 1, top[j]].T
loss += loss_func(out, torch.Tensor(y_tmp).to(device))
loss /= (x.shape[0] - batch_size * (i + 1))
loss.backward()
optimizer.step()
if verbose:
print('loss: {:.4f}'.format(float(loss)))
else:
return
| 32.629032 | 107 | 0.483688 | 523 | 4,046 | 3.625239 | 0.156788 | 0.085443 | 0.052743 | 0.046414 | 0.87711 | 0.87711 | 0.87711 | 0.867089 | 0.867089 | 0.867089 | 0 | 0.015707 | 0.386307 | 4,046 | 123 | 108 | 32.894309 | 0.747886 | 0.125556 | 0 | 0.846154 | 0 | 0 | 0.009384 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.025641 | false | 0 | 0.089744 | 0 | 0.141026 | 0.025641 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
64509206f4dc7f9088516fc165ae476109748e78 | 336 | py | Python | PDA/extra_assignments/3.M. If/else_ Minimum of five numbers/solution/main.py | EMbeDS-education/StatsAndComputing20212022 | 971e418882b206a1b5606d15d222cef1a5a04834 | [
"MIT"
] | 2 | 2022-02-24T09:35:15.000Z | 2022-03-14T20:34:33.000Z | PDA/extra_assignments/3.M. If/else_ Minimum of five numbers/solution/main.py | GeorgiosArg/StatsAndComputing20212022 | 798d39af6aa5ef5eef49d5d6f43191351e8a49f3 | [
"MIT"
] | null | null | null | PDA/extra_assignments/3.M. If/else_ Minimum of five numbers/solution/main.py | GeorgiosArg/StatsAndComputing20212022 | 798d39af6aa5ef5eef49d5d6f43191351e8a49f3 | [
"MIT"
] | 2 | 2022-03-15T21:40:35.000Z | 2022-03-26T14:51:31.000Z | least = int(input())
new_integer = int(input())
if new_integer < least:
least = new_integer
new_integer = int(input())
if new_integer < least:
least = new_integer
new_integer = int(input())
if new_integer < least:
least = new_integer
new_integer = int(input())
if new_integer < least:
least = new_integer
print(least) | 17.684211 | 26 | 0.699405 | 49 | 336 | 4.55102 | 0.142857 | 0.538117 | 0.233184 | 0.32287 | 0.896861 | 0.896861 | 0.896861 | 0.896861 | 0.896861 | 0.896861 | 0 | 0 | 0.184524 | 336 | 19 | 27 | 17.684211 | 0.813869 | 0 | 0 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.071429 | 0 | 0 | 0 | null | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 |
64a0ade8a590bc3b60175a0737b2c84f937bb79c | 105 | py | Python | tests/paradrop/test_general.py | lhartung/paradrop-test | 22a491bf3198bf61bcabaedfaecde5b9be97e76f | [
"Apache-2.0"
] | 76 | 2015-08-24T18:15:20.000Z | 2021-12-06T20:03:19.000Z | tests/paradrop/test_general.py | leilei1881/Paradrop | 546464e075f8a226b9eb4fe444390dc5c8527ad9 | [
"Apache-2.0"
] | 35 | 2015-07-07T22:27:49.000Z | 2022-03-01T17:13:40.000Z | tests/paradrop/test_general.py | lhartung/paradrop-test | 22a491bf3198bf61bcabaedfaecde5b9be97e76f | [
"Apache-2.0"
] | 27 | 2016-02-03T22:00:09.000Z | 2021-09-26T16:59:38.000Z | '''
General tests for stability
'''
import paradrop
def testParadropImportable():
import paradrop
| 10.5 | 29 | 0.733333 | 10 | 105 | 7.7 | 0.8 | 0.363636 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.180952 | 105 | 9 | 30 | 11.666667 | 0.895349 | 0.257143 | 0 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | true | 0 | 1 | 0 | 1.333333 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 7 |
64dbaa47491570e12032ca1fb2f96286950cd3c0 | 201 | py | Python | hackr/__init__.py | minseopark1/hackr | 1cfdf2ff48085b7f521c80ef676088449c5c0f0e | [
"Apache-2.0"
] | 1 | 2022-01-10T05:15:06.000Z | 2022-01-10T05:15:06.000Z | hackr/__init__.py | minseopark1/hackr | 1cfdf2ff48085b7f521c80ef676088449c5c0f0e | [
"Apache-2.0"
] | null | null | null | hackr/__init__.py | minseopark1/hackr | 1cfdf2ff48085b7f521c80ef676088449c5c0f0e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from . import generator
from . import object_generator
from . import web
from . import actions
from . import image
| 20.1 | 38 | 0.746269 | 28 | 201 | 5.142857 | 0.571429 | 0.347222 | 0.263889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.005917 | 0.159204 | 201 | 9 | 39 | 22.333333 | 0.846154 | 0.208955 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 7 |
b3ce1e18e64658321acff8126cc0233999cf0fb9 | 907 | py | Python | CompNeuroPy/__init__.py | Olimaol/CompNeuroPy | 6112dd34bcae9191e496bda85fabdf5ea7be4818 | [
"MIT"
] | null | null | null | CompNeuroPy/__init__.py | Olimaol/CompNeuroPy | 6112dd34bcae9191e496bda85fabdf5ea7be4818 | [
"MIT"
] | null | null | null | CompNeuroPy/__init__.py | Olimaol/CompNeuroPy | 6112dd34bcae9191e496bda85fabdf5ea7be4818 | [
"MIT"
] | null | null | null | """import CompNeuroPy.analysis_functions
import CompNeuroPy.extra_functions
import CompNeuroPy.generate_model
import CompNeuroPy.model_functions
import CompNeuroPy.neuron_models
import CompNeuroPy.opt_Izh_07
import CompNeuroPy.simulation_functions
import CompNeuroPy.system_functions
import CompNeuroPy.Monitors
import CompNeuroPy.Experiment"""
from CompNeuroPy.analysis_functions import *
from CompNeuroPy.extra_functions import *
from CompNeuroPy.model_functions import *
from CompNeuroPy.neuron_models import *
from CompNeuroPy.simulation_functions import *
from CompNeuroPy.system_functions import *
from CompNeuroPy.simulation_requirements import *
from CompNeuroPy.opt_neuron import opt_neuron
from CompNeuroPy.Monitors import Monitors
from CompNeuroPy.Experiment import Experiment
from CompNeuroPy.generate_model import generate_model
from CompNeuroPy.generate_simulation import generate_simulation
| 37.791667 | 63 | 0.885336 | 105 | 907 | 7.438095 | 0.171429 | 0.230474 | 0.18822 | 0.192061 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.002387 | 0.076075 | 907 | 23 | 64 | 39.434783 | 0.929594 | 0.372657 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 7 |
37402be3a821a207a9314c6b499032a387470164 | 4,055 | py | Python | x_Attack_Setups.py | norbnorbnorb/6.00.1x-Community-Game | 50da0247cc9c36369270c25f1d15e326d72e91ce | [
"MIT"
] | 4 | 2019-06-17T20:38:20.000Z | 2019-08-22T11:16:51.000Z | x_Attack_Setups.py | norbnorbnorb/6.00.1x-Community-Game | 50da0247cc9c36369270c25f1d15e326d72e91ce | [
"MIT"
] | 4 | 2019-06-21T10:39:18.000Z | 2019-08-14T13:43:00.000Z | x_Attack_Setups.py | norbnorbnorb/6.00.1x-Community-Game | 50da0247cc9c36369270c25f1d15e326d72e91ce | [
"MIT"
] | 5 | 2019-06-17T20:37:05.000Z | 2019-08-13T18:37:30.000Z | weapon_setups1 = {
'single_attack_setup': {
'target_num': 1,
'splash_dmg': 0,
'primary': True,
'primary_pct': 100,
'rnd_target': True,
'dmg_type': 'physical',
},
'multi_attack_setup': {
'target_num': 'all',
'splash_dmg': 50,
'primary': False,
'primary_pct': 100,
'rnd_target': True,
'dmg_type': 'physical',
},
'multi_attack_setup_prim_true': {
'target_num': 2,
'splash_dmg': 10,
'primary': True,
'primary_pct': 100,
'rnd_target': True,
'dmg_type': 'magic',
},
}
single = {'target_num': 1,
'splash_dmg': 0,
'primary': True,
'primary_pct': 100,
'rnd_target': True,
'dmg_type': 'physical'
}
all_enemies = {'target_num': 'all',
'splash_dmg': 50,
'primary': False,
'primary_pct': 100,
'rnd_target': True,
'dmg_type': 'physical'
}
weapon_setups = {
'single_attack_setup': {
'target_num': 1,
'splash_dmg': 0,
'primary': True,
'primary_pct': 100,
'rnd_target': True,
'dmg_base': 'dex',
'can_crit': True,
'can_dodge': True,
'vamp': 0,
'elemental': 'physical'
},
'multi_attack_setup': {
'target_num': 'all',
'splash_dmg': 50,
'primary': False,
'primary_pct': 100,
'rnd_target': True,
'dmg_base': 'str',
'can_crit': True,
'vamp': 0,
'elemental': 'physical'
},
'multi_attack_setup_prim_true': {
'target_num': 2,
'splash_dmg': 10,
'primary': True,
'primary_pct': 100,
'rnd_target': True,
'dmg_base': 'dex',
'vamp': 0,
'can_crit': True,
'elemental': 'true'
},
'single_attack_vamp': {
'target_num': 1,
'splash_dmg': 0,
'primary': True,
'primary_pct': 100,
'rnd_target': True,
'dmg_base': 'int',
'can_crit': True,
'vamp': 25,
'elemental': 'physical'
},
}
basic_heal = {
'target_num': 1,
'splash_dmg': 0,
'primary': True,
'primary_pct': 100,
'rnd_target': True,
'dmg_base': 'magic',
'is_heal': True
}
basic_vamp = {
'target_num': 1,
'splash_dmg': 0,
'primary': True,
'primary_pct': 100,
'rnd_target': True,
'dmg_base': 'magic',
'vamp': 100
}
basic_self_vamp = {
'target_num': 1,
'splash_dmg': 0,
'primary': True,
'primary_pct': 100,
'rnd_target': True,
'dmg_base': 'magic',
'elemental': 'fire',
'vamp': -100,
}
single = {
'target_num': 1,
'splash_dmg': 0,
'primary': True,
'primary_pct': 100,
'rnd_target': True,
'dmg_base': 'magic',
'can_crit': True,
'vamp': 0,
'elemental': 'fire'
}
half_maxhp = {
'target_num': 1,
'splash_dmg': 0,
'primary': True,
'primary_pct': 100,
'rnd_target': True,
'dmg_base': 'magic',
'can_crit': True,
'vamp': 0,
'elemental': 'physical',
'wpn_dmg_pct': 0,
'max_hp_pct_dmg': 50,
}
full_setup = {
'target_num': 1,
'primary': True,
'primary_pct': 100,
'rnd_target': True,
'splash_dmg': 0,
'elemental': 'physical',
'vamp': 0,
'can_crit': True,
'dmg_base': 'int_based',
'wpn_dmg_pct': 100,
'max_hp_pct_dmg': 0,
'c_hp_pct_dmg': 0,
'can_dodge': True,
}
chp_vamp = {
'target_num': 1,
'primary': True,
'primary_pct': 100,
'rnd_target': True,
'splash_dmg': 0,
'elemental': 'physical',
'vamp': 0,
'can_crit': True,
'dmg_base': 'magic',
'wpn_dmg_pct': 100,
'max_hp_pct_dmg': 0,
'c_hp_pct_dmg': 0,
}
all_enemies = {'target_num': 'all',
'splash_dmg': 50,
'primary': False,
'primary_pct': 100,
'rnd_target': True,
'dmg_base': 'physical'
}
| 21.230366 | 37 | 0.493218 | 446 | 4,055 | 4.154709 | 0.116592 | 0.061522 | 0.119266 | 0.146789 | 0.860227 | 0.851592 | 0.851592 | 0.843497 | 0.824069 | 0.824069 | 0 | 0.043139 | 0.336868 | 4,055 | 190 | 38 | 21.342105 | 0.645965 | 0 | 0 | 0.748571 | 0 | 0 | 0.388903 | 0.01381 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
377df983d6c86384d5a1584ed8396090c966c4c7 | 8,270 | py | Python | ZConfig/tests/test_pygments.py | derFreitag/ZConfig | 276cae67e983f7c92ccfaf337327b950061b223e | [
"ZPL-2.1"
] | 7 | 2016-06-20T20:23:14.000Z | 2021-04-09T03:28:48.000Z | ZConfig/tests/test_pygments.py | derFreitag/ZConfig | 276cae67e983f7c92ccfaf337327b950061b223e | [
"ZPL-2.1"
] | 64 | 2015-07-15T23:03:18.000Z | 2021-09-09T07:54:16.000Z | ZConfig/tests/test_pygments.py | derFreitag/ZConfig | 276cae67e983f7c92ccfaf337327b950061b223e | [
"ZPL-2.1"
] | 8 | 2015-04-03T06:42:24.000Z | 2021-09-15T04:40:25.000Z | ##############################################################################
#
# Copyright (c) 2019 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""\
Tests for ZConfig.pygments.ZConfigLexer.
"""
from __future__ import print_function, absolute_import
import unittest
try:
import pygments.lexer
import pygments.token
except ImportError:
pygments = None
else:
import ZConfig.pygments
class ZConfigLexerTestCase(unittest.TestCase):
def setUp(self):
if pygments is None:
self.skipTest('pygments is not available')
def test_comment(self):
expected = [
(pygments.token.Text, ' '),
(pygments.token.Comment, '# some crazy text'),
(pygments.token.Text, '\n'),
]
t = list(ZConfig.pygments.ZConfigLexer().get_tokens(
' # some crazy text\n'))
self.assertEqual(t, expected)
def test_option_without_substitutions(self):
expected = [
(pygments.token.Name, 'logdir'),
(pygments.token.Whitespace, ' \t'),
(pygments.token.String, '/var/log/myapp'),
(pygments.token.Text, '\n'),
]
t = list(ZConfig.pygments.ZConfigLexer().get_tokens(
'logdir \t/var/log/myapp\n'))
self.assertEqual(t, expected)
def test_option_with_substitutions(self):
expected = [
(pygments.token.Name, 'logdir'),
(pygments.token.Whitespace, ' \t'),
(pygments.token.String, '/var/log/'),
(pygments.token.String.Escape, '$$'),
(pygments.token.String, '-'),
(pygments.token.String.Interpol, '$'),
(pygments.token.Name, 'conf'),
(pygments.token.String, '-'),
(pygments.token.String.Interpol, '${'),
(pygments.token.Name, 'fnoc'),
(pygments.token.String.Interpol, '}'),
(pygments.token.String, '-monthly'),
(pygments.token.Text, '\n'),
]
t = list(ZConfig.pygments.ZConfigLexer().get_tokens(
'logdir \t/var/log/$$-$conf-${fnoc}-monthly\n'))
self.assertEqual(t, expected)
def test_named_section(self):
expected = [
(pygments.token.Name.Tag, '<sect'),
(pygments.token.Whitespace, ' '),
(pygments.token.Name, 'name'),
(pygments.token.Name.Tag, '>'),
(pygments.token.Text, '\n '),
(pygments.token.Name, 'option'),
(pygments.token.Whitespace, ' '),
(pygments.token.String, 'value'),
(pygments.token.Text, '\n'),
(pygments.token.Name.Tag, '</sect'),
(pygments.token.Name.Tag, '>'),
(pygments.token.Text, '\n'),
]
text = ('<sect name>\n'
' option value\n'
'</sect>\n')
t = list(ZConfig.pygments.ZConfigLexer().get_tokens(text))
self.assertEqual(t, expected)
def test_unnamed_section(self):
expected = [
(pygments.token.Name.Tag, '<sect'),
(pygments.token.Name.Tag, '>'),
(pygments.token.Text, '\n '),
(pygments.token.Name, 'option'),
(pygments.token.Whitespace, ' '),
(pygments.token.String, 'value'),
(pygments.token.Text, '\n'),
(pygments.token.Name.Tag, '</sect'),
(pygments.token.Name.Tag, '>'),
(pygments.token.Text, '\n'),
]
text = ('<sect>\n'
' option value\n'
'</sect>\n')
t = list(ZConfig.pygments.ZConfigLexer().get_tokens(text))
self.assertEqual(t, expected)
def test_empty_named_section(self):
expected = [
(pygments.token.Name.Tag, '<sect'),
(pygments.token.Whitespace, ' '),
(pygments.token.Name, 'name'),
(pygments.token.Name.Tag, '/>'),
(pygments.token.Text, '\n'),
]
t = list(ZConfig.pygments.ZConfigLexer().get_tokens('<sect name/>'))
self.assertEqual(t, expected)
def test_empty_unnamed_section(self):
expected = [
(pygments.token.Name.Tag, '<sect/'),
(pygments.token.Name.Tag, '>'),
(pygments.token.Text, '\n'),
]
t = list(ZConfig.pygments.ZConfigLexer().get_tokens('<sect/>'))
self.assertEqual(t, expected)
def test_define_without_substitutions(self):
expected = [
(pygments.token.Keyword, '%define'),
(pygments.token.Whitespace, ' '),
(pygments.token.Name, 'logdir'),
(pygments.token.Whitespace, ' \t'),
(pygments.token.String, '/var/log/myapp'),
(pygments.token.Text, '\n'),
]
t = list(ZConfig.pygments.ZConfigLexer().get_tokens(
'%define logdir \t/var/log/myapp\n'))
self.assertEqual(t, expected)
def test_define_with_substitutions(self):
expected = [
(pygments.token.Keyword, '%define'),
(pygments.token.Whitespace, ' '),
(pygments.token.Name, 'logdir'),
(pygments.token.Whitespace, ' \t'),
(pygments.token.String, '/var/log/'),
(pygments.token.String.Escape, '$$'),
(pygments.token.String, '-'),
(pygments.token.String.Interpol, '$'),
(pygments.token.Name, 'conf'),
(pygments.token.String, '-'),
(pygments.token.String.Interpol, '${'),
(pygments.token.Name, 'fnoc'),
(pygments.token.String.Interpol, '}'),
(pygments.token.String, '-monthly'),
(pygments.token.Text, '\n'),
]
t = list(ZConfig.pygments.ZConfigLexer().get_tokens(
'%define logdir \t/var/log/$$-$conf-${fnoc}-monthly\n'))
self.assertEqual(t, expected)
def test_import_without_substitutions(self):
expected = [
(pygments.token.Keyword, '%import'),
(pygments.token.Whitespace, ' '),
(pygments.token.String, 'ZConfig.components.logger'),
(pygments.token.Text, '\n'),
]
t = list(ZConfig.pygments.ZConfigLexer().get_tokens(
'%import ZConfig.components.logger\n'))
self.assertEqual(t, expected)
def test_import_with_substitutions(self):
expected = [
(pygments.token.Keyword, '%import'),
(pygments.token.Whitespace, ' '),
(pygments.token.String, 'ZConfig.components.'),
(pygments.token.String.Interpol, '${'),
(pygments.token.Name, 'module'),
(pygments.token.String.Interpol, '}'),
(pygments.token.Text, '\n'),
]
t = list(ZConfig.pygments.ZConfigLexer().get_tokens(
'%import ZConfig.components.${module}\n'))
self.assertEqual(t, expected)
def test_include_without_substitutions(self):
expected = [
(pygments.token.Keyword, '%include'),
(pygments.token.Whitespace, ' '),
(pygments.token.String, 'somefile.conf'),
(pygments.token.Text, '\n'),
]
t = list(ZConfig.pygments.ZConfigLexer().get_tokens(
'%include somefile.conf\n'))
self.assertEqual(t, expected)
def test_include_with_substitutions(self):
expected = [
(pygments.token.Keyword, '%include'),
(pygments.token.Whitespace, ' '),
(pygments.token.String.Interpol, '$'),
(pygments.token.Name, 'basename'),
(pygments.token.String, '.conf'),
(pygments.token.Text, '\n'),
]
t = list(ZConfig.pygments.ZConfigLexer().get_tokens(
'%include $basename.conf\n'))
self.assertEqual(t, expected)
| 37.252252 | 78 | 0.543652 | 791 | 8,270 | 5.615676 | 0.151707 | 0.272175 | 0.115489 | 0.068888 | 0.813147 | 0.813147 | 0.797163 | 0.75529 | 0.71792 | 0.71792 | 0 | 0.00101 | 0.281983 | 8,270 | 221 | 79 | 37.420814 | 0.747053 | 0.060218 | 0 | 0.664865 | 0 | 0 | 0.105714 | 0.020537 | 0 | 0 | 0 | 0 | 0.07027 | 1 | 0.075676 | false | 0 | 0.064865 | 0 | 0.145946 | 0.005405 | 0 | 0 | 0 | null | 1 | 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 | 7 |
378ce67c543a8a88b8e433d7d81bdbda81c11270 | 6,888 | py | Python | tests/test_all_modules.py | aali1987/mbtest | 2cb925b96d4e05e3273b742efd82d82cd69b3c59 | [
"MIT"
] | null | null | null | tests/test_all_modules.py | aali1987/mbtest | 2cb925b96d4e05e3273b742efd82d82cd69b3c59 | [
"MIT"
] | null | null | null | tests/test_all_modules.py | aali1987/mbtest | 2cb925b96d4e05e3273b742efd82d82cd69b3c59 | [
"MIT"
] | null | null | null | import unittest
from Meter.Meter import Meter
from Broker.Broker import Broker
from PV_Simulator.PV_Simulator import PV_Simulator
import asyncio
import aio_pika
import json
try:
with open("../metadata.json", 'r') as write:
metadata = json.loads(write.readlines()[0])
except FileNotFoundError:
with open("metadata.json", 'r') as write:
metadata = json.loads(write.readlines()[0])
class Test_Meter_Class(unittest.TestCase):
address = metadata['connectng_address' ]
queue_name = metadata['queue_name']
min_power_value = metadata['METER_MIN_POW']
max_power_value = metadata['METER_MAX_POW']
delay_time = metadata["DELAY_TIME"]
power_value = 3
broker = Broker(address, queue_name) # initalize broker
meter = Meter(min_power_value, max_power_value, broker, delay_time)
def test_generate_power_value(self):
self.meter.generate_random_power_value()
self.assertTrue(type(self.meter.meter_value), float )
self.assertTrue(int(self.meter.meter_value) in range(int(self.min_power_value), int(self.max_power_value)))
def test_send_message_before_connection(self):
try:
loop = asyncio.get_event_loop()
loop.run_until_complete(self.meter.send_message(self.power_value))
except:
pass
def test_send_message_after_connection_not_string(self):
try:
loop = asyncio.get_event_loop()
loop.run_until_complete(self.meter.connection_enable())
loop.run_until_complete(self.meter.send_message(self.power_value))
loop.run_until_complete(self.meter.connection_disable())
except ConnectionError:
pass
except Exception as e :
self.assertEqual(str(e), "'int' object has no attribute 'encode'")
def test_send_message_after_connection_string(self):
try:
loop = asyncio.get_event_loop()
loop.run_until_complete(self.meter.connection_enable())
loop.run_until_complete(self.meter.send_message('35'))
loop.run_until_complete(self.meter.connection_disable())
except ConnectionError:
pass
except Exception as e :
self.assertEqual(str(e), "'int' object has no attribute 'encode'")
def test_publish_data_after_connection_string(self):
try:
loop = asyncio.get_event_loop()
loop.run_until_complete(self.meter.connection_enable())
loop.run_until_complete(self.meter.publish_data(interupt_timeout=True))
except ConnectionError:
pass
except Exception as e :
self.assertEqual(str(e), "'int' object has no attribute 'encode'")
def test_connection_enable_disable(self):
try:
loop = asyncio.get_event_loop()
loop.run_until_complete(self.meter.connection_enable())
loop.run_until_complete(self.meter.connection_disable())
except ConnectionError:
pass
class Test_Broker_Class(unittest.TestCase):
address = metadata['connectng_address' ]
queue_name = metadata['queue_name']
broker = Broker(address, queue_name) # initalize broker
def test_connections_enable(self):
try:
loop = asyncio.get_event_loop()
loop.run_until_complete(self.broker.connect())
except ConnectionError:
pass
def test_connections_disable(self):
try:
loop = asyncio.get_event_loop()
loop.run_until_complete(self.broker.connect())
loop.run_until_complete(self.broker.close())
except ConnectionError:
pass
def test_receive_message_without_connection(self):
def call_me(self):
pass
try:
loop = asyncio.get_event_loop()
loop.run_until_complete(self.broker.receive_command(call_me))
except ConnectionError:
pass
except Exception as e:
self.assertEqual(str(e), "'NoneType' object has no attribute 'consume'")
def test_receive_message_with_connection(self):
def call_me(self):
pass
try:
loop = asyncio.get_event_loop()
loop.run_until_complete(self.broker.connect())
loop.run_until_complete(self.broker.receive_command(call_me))
except ConnectionError:
pass
except Exception as e:
self.assertEqual(str(e), "'NoneType' object has no attribute 'consume'")
def test_send_message_without_connection(self):
def call_me(self):
pass
try:
loop = asyncio.get_event_loop()
loop.run_until_complete(self.broker.send_command("hehllo0"))
except ConnectionError:
pass
except Exception as e:
self.assertEqual(str(e), "'NoneType' object has no attribute 'default_exchange'")
def test_send_message_with_connection(self):
def call_me(self):
pass
try:
loop = asyncio.get_event_loop()
loop.run_until_complete(self.broker.connect())
loop.run_until_complete(self.broker.send_command("call_me"))
except ConnectionError:
pass
except Exception as e:
self.assertEqual(str(e), "'NoneType' object has no attribute 'consume'")
class Test_PV_Simulator(unittest.TestCase):
min_power_value = metadata['PV_SIM_MIN_POW']
max_power_value = metadata['PV_SIM_MAX_POW']
address = metadata['connectng_address' ]
queue_name = metadata['queue_name']
broker = Broker(address, queue_name) # initalize broker
pv_simulator = PV_Simulator(address, queue_name, broker, min_power_value,
max_power_value, 'testlog.txt') # initialize meter
def test_generate_pv_value(self):
self.pv_simulator.generate_simulated_pv_value()
self.assertTrue(type(self.pv_simulator.sim_pv_value), float )
def test_receive_message_before_connection(self):
try:
loop = asyncio.get_event_loop()
loop.run_until_complete(self.pv_simulator.consume_data())
except Exception as e:
self.assertEqual(str(e), "'NoneType' object has no attribute 'consume'")
def test_receive_message_after_connection(self):
try:
loop = asyncio.get_event_loop()
loop.run_until_complete(self.pv_simulator.connection_enable())
loop.run_until_complete(self.pv_simulator.consume_data())
except ConnectionError:
pass
def test_write_log_message(self):
try:
loop = asyncio.get_event_loop()
loop.run_until_complete(self.pv_simulator.write_output_file())
except Exception as e:
print(e)
def test_consume_data_without_connection(self):
try:
loop = asyncio.get_event_loop()
loop.run_until_complete(self.pv_simulator.consume_data())
except Exception as e:
self.assertEqual(str(e), "'NoneType' object has no attribute 'consume'")
def test_consume_data_with_connection(self):
try:
loop = asyncio.get_event_loop()
loop.run_until_complete(self.pv_simulator.connection_enable())
loop.run_until_complete(self.pv_simulator.consume_data())
except ConnectionError:
pass
def test_processed_message(self):
try:
loop = asyncio.get_event_loop()
loop.run_until_complete(self.pv_simulator.connection_enable())
aa = aio_pika.Message(body = "32".encode('utf-8'))
loop.run_until_complete(self.pv_simulator.process_message(aa))
except ConnectionError:
pass
def test_connections_enable_disable(self):
try:
loop = asyncio.get_event_loop()
loop.run_until_complete(self.pv_simulator.connection_enable())
loop.run_until_complete(self.pv_simulator.connection_disable())
except ConnectionError:
pass | 32.490566 | 109 | 0.769309 | 959 | 6,888 | 5.221064 | 0.114703 | 0.043339 | 0.074296 | 0.123827 | 0.805672 | 0.776513 | 0.729379 | 0.713801 | 0.708808 | 0.708808 | 0 | 0.001495 | 0.126016 | 6,888 | 212 | 110 | 32.490566 | 0.830233 | 0.009727 | 0 | 0.681081 | 0 | 0 | 0.087575 | 0 | 0 | 0 | 0 | 0 | 0.064865 | 1 | 0.12973 | false | 0.102703 | 0.037838 | 0 | 0.275676 | 0.005405 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 7 |
37a8b564733c77d6775846dc9ab46c93a9005817 | 19,346 | py | Python | secretsauce/apps/portal/tests/test_crud_api.py | sutd-rms/secret_sauce | de49eb4cb8e6bdc92209e9f4c6c53b1b4c2c465f | [
"MIT"
] | null | null | null | secretsauce/apps/portal/tests/test_crud_api.py | sutd-rms/secret_sauce | de49eb4cb8e6bdc92209e9f4c6c53b1b4c2c465f | [
"MIT"
] | 16 | 2020-03-28T14:54:45.000Z | 2022-03-12T00:36:23.000Z | secretsauce/apps/portal/tests/test_crud_api.py | sutd-rms/secret_sauce | de49eb4cb8e6bdc92209e9f4c6c53b1b4c2c465f | [
"MIT"
] | null | null | null | import json
from django.test import TestCase, Client
from django.urls import reverse
from rest_framework import status
from rest_framework.test import APITestCase
from secretsauce.utils import reverse_args
from secretsauce.apps.account.models import *
from secretsauce.apps.account.serializers import *
from secretsauce.apps.portal.models import *
from secretsauce.apps.portal.views import *
class ProjectCRUDTest(APITestCase):
def setUp(self):
self.admin = User.objects.create_superuser("admin@rms.com", "pw123123")
self.company = Company.objects.create(
name="McDonald's"
)
self.user = User.objects.create_user(
"user1@mcdonald.com",
"pw123123",
company=self.company,
)
self.p1 = Project.objects.create(
title="Admin Project",
company=self.company
)
self.p1.owners.add(self.admin)
self.p2 = Project.objects.create(
title="User Project",
company=self.company
)
self.p2.owners.add(self.user)
self.list_url = reverse('project-list')
self.detail_url = reverse_args('project-detail')
def test_list(self):
"""
Test the List function for Project views
"""
# Admin can see all Projects
self.client.force_authenticate(user=self.admin)
response = self.client.get(self.list_url)
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(len(response.data), 2)
# User can only see
self.client.force_authenticate(user=self.user)
response = self.client.get(self.list_url)
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(len(response.data), 1)
def test_create(self):
self.client.force_authenticate(user=self.admin)
response = self.client.post(self.list_url, data={
'title': "My new project",
'company': self.company.id,
'owners': [self.admin.id],
}, format='json')
self.assertEqual(response.status_code, status.HTTP_201_CREATED)
self.client.force_authenticate(user=self.user)
response = self.client.post(self.list_url, data={
'title': "My other new project",
'company': self.company.id,
'owners': [self.user.id],
}, format='json')
self.assertEqual(response.status_code, status.HTTP_201_CREATED)
def test_retrieve(self):
# Admin can retrieve any project
self.client.force_authenticate(user=self.admin)
response = self.client.get(self.detail_url(self.p1.id))
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.data.get('id'), str(self.p1.id))
response = self.client.get(self.detail_url(self.p2.id))
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.data.get('id'), str(self.p2.id))
# User can only retrieve their projects
self.client.force_authenticate(user=self.user)
response = self.client.get(self.detail_url(self.p1.id))
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
response = self.client.get(self.detail_url(self.p2.id))
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.data.get('id'), str(self.p2.id))
def test_update(self):
# Admin update any project
self.client.force_authenticate(user=self.admin)
response = self.client.put(self.detail_url(self.p1.id), data={
'title': "New name",
'company': self.company.id,
'owners': [self.admin.id],
}, format='json')
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.data.get('title'), "New name")
response = self.client.put(self.detail_url(self.p2.id), data={
'title': "New name 2",
'company': self.company.id,
'owners': [self.user.id],
}, format='json')
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.data.get('title'), "New name 2")
# User
self.client.force_authenticate(user=self.user)
response = self.client.put(self.detail_url(self.p1.id), data={
'title': "New name 2",
'company': self.company.id,
'owners': [self.admin.id],
}, format='json')
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
response = self.client.put(self.detail_url(self.p2.id), data={
'title': "New name 2",
'company': self.company.id,
'owners': [self.user.id],
}, format='json')
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.data.get('title'), "New name 2")
def test_partial_update(self):
# Admin update any project
self.client.force_authenticate(user=self.admin)
response = self.client.patch(self.detail_url(self.p1.id), data={
'title': "New name",
}, format='json')
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.data.get('title'), "New name")
response = self.client.patch(self.detail_url(self.p2.id), data={
'title': "New name 2",
}, format='json')
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.data.get('title'), "New name 2")
# User
self.client.force_authenticate(user=self.user)
response = self.client.patch(self.detail_url(self.p1.id), data={
'title': "New name 3",
}, format='json')
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
response = self.client.patch(self.detail_url(self.p2.id), data={
'title': "New name 4",
}, format='json')
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.data.get('title'), "New name 4")
def test_destroy(self):
self.client.force_authenticate(user=self.user)
response = self.client.delete(self.detail_url(self.p1.id))
response = self.client.delete(self.detail_url(self.p2.id))
self.assertEqual(len(Project.objects.all()), 1)
self.client.force_authenticate(user=self.admin)
response = self.client.delete(self.detail_url(self.p1.id))
self.assertEqual(len(Project.objects.all()), 0)
class PredictionModelCRUDTest(APITestCase):
def setUp(self):
self.admin = User.objects.create_superuser("admin@rms.com", "pw123123")
self.company = Company.objects.create(
name="McDonald's"
)
self.user = User.objects.create_user(
"user1@mcdonald.com",
"pw123123",
company=self.company,
)
self.pred_model = PredictionModel.objects.create(name='XGBoost')
self.list_url = reverse('prediction-model-list')
self.detail_url = reverse_args('prediction-model-detail')
def test_list(self):
self.client.force_authenticate(user=self.admin)
response = self.client.get(self.list_url)
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(len(response.data), 1)
self.client.force_authenticate(user=self.user)
response = self.client.get(self.list_url)
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(len(response.data), 1)
def test_create(self):
self.client.force_authenticate(user=self.admin)
response = self.client.post(self.list_url, data={
'name': "Neural Network"
}, format='json')
self.assertEqual(response.status_code, status.HTTP_201_CREATED)
self.assertEqual(len(PredictionModel.objects.all()), 2)
self.client.force_authenticate(user=self.user)
response = self.client.post(self.list_url, data={
'name': "Another model"
}, format='json')
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
self.assertEqual(len(PredictionModel.objects.all()), 2)
def test_retrieve(self):
self.client.force_authenticate(user=self.admin)
response = self.client.get(self.detail_url(self.pred_model.id))
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.client.force_authenticate(user=self.user)
response = self.client.get(self.detail_url(self.pred_model.id))
self.assertEqual(response.status_code, status.HTTP_200_OK)
def test_update(self):
self.client.force_authenticate(user=self.admin)
response = self.client.put(self.detail_url(self.pred_model.id), data={
'name': "NN",
'description': ""
}, format='json')
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.data.get('name'), "NN")
self.client.force_authenticate(user=self.user)
response = self.client.put(self.detail_url(self.pred_model.id), data={
'name': "NN2",
'description': ""
}, format='json')
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
def test_partial_update(self):
self.client.force_authenticate(user=self.admin)
response = self.client.patch(self.detail_url(self.pred_model.id), data={
'description': "This is a neural network"
}, format='json')
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.data.get('description'), "This is a neural network")
self.client.force_authenticate(user=self.user)
response = self.client.patch(self.detail_url(self.pred_model.id), data={
'description': "This is a neural network 2"
}, format='json')
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
def test_destroy(self):
self.client.force_authenticate(user=self.user)
response = self.client.delete(self.detail_url(self.pred_model.id))
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
self.client.force_authenticate(user=self.admin)
response = self.client.delete(self.detail_url(self.pred_model.id))
self.assertEqual(response.status_code, status.HTTP_204_NO_CONTENT)
self.assertEqual(len(PredictionModel.objects.all()), 0)
class ModelTagCRUDTest(APITestCase):
def setUp(self):
self.admin = User.objects.create_superuser("admin@rms.com", "pw123123")
self.company = Company.objects.create(
name="McDonald's"
)
self.user = User.objects.create_user(
"user1@mcdonald.com",
"pw123123",
company=self.company,
)
self.pred_model1 = PredictionModel.objects.create(name="Attention Neural Net")
self.pred_model2 = PredictionModel.objects.create(name="Gradient Boosted Decision Tree")
self.model_tag = ModelTag.objects.create(name="Neural Network")
self.model_tag.models.add(self.pred_model1)
self.list_url = reverse('model-tag-list')
self.detail_url = reverse_args('model-tag-detail')
def test_list(self):
self.client.force_authenticate(user=self.admin)
response = self.client.get(self.list_url)
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(len(response.data), 1)
self.client.force_authenticate(user=self.user)
response = self.client.get(self.list_url)
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(len(response.data), 1)
def test_create(self):
self.client.force_authenticate(user=self.admin)
response = self.client.post(self.list_url, data={
'name': "Decision Tree",
})
self.assertEqual(response.status_code, status.HTTP_201_CREATED)
self.assertEqual(len(ModelTag.objects.all()), 2)
self.client.force_authenticate(user=self.user)
response = self.client.post(self.list_url, data={
'name': "New Tag"
})
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
def test_retrieve(self):
self.client.force_authenticate(user=self.user)
response = self.client.get(self.detail_url(self.model_tag.pk))
self.assertEqual(response.status_code, status.HTTP_200_OK)
def test_update(self):
self.client.force_authenticate(user=self.admin)
response = self.client.put(self.detail_url(self.model_tag.pk), data={
'name': "Neural Network!!!",
'description': "These are neural networks",
'models': [model.id for model in self.model_tag.models.all()]
})
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.client.force_authenticate(user=self.user)
response = self.client.put(self.detail_url(self.model_tag.pk), data={
'name': "Neural Network!!!",
'description': "These are neural networks!!",
'models': self.model_tag.models
})
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
def test_partial_update(self):
self.client.force_authenticate(user=self.admin)
response = self.client.patch(self.detail_url(self.model_tag.pk), data={
'description': "These are neural networks",
})
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.client.force_authenticate(user=self.user)
response = self.client.patch(self.detail_url(self.model_tag.pk), data={
'description': "These are neural networks!!",
})
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
def test_destroy(self):
self.client.force_authenticate(user=self.user)
response = self.client.delete(self.detail_url(self.model_tag.pk))
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
self.client.force_authenticate(user=self.admin)
response = self.client.delete(self.detail_url(self.model_tag.pk))
self.assertEqual(response.status_code, status.HTTP_204_NO_CONTENT)
self.assertEqual(len(ModelTag.objects.all()), 0)
# class DataBlockCRUDTest(APITestCase):
# def setUp(self):
# pass
# def test_list(self):
# pass
# def test_create(self):
# pass
# def test_retrieve(self):
# pass
# def test_update(self):
# pass
# def test_partial_update(self):
# pass
# def test_destroy(self):
# pass
class ConstraintBlockCRUDTest(APITestCase):
def setUp(self):
self.admin = User.objects.create_superuser("admin@rms.com", "pw123123")
self.company = Company.objects.create(
name="McDonald's"
)
self.user = User.objects.create_user(
"user1@mcdonald.com",
"pw123123",
company=self.company,
)
self.project = Project.objects.create(title="First project", company=self.company)
self.project.owners.add(self.user)
self.constraint_block = ConstraintBlock.objects.create(name="Block 1", project=self.project)
self.list_url = reverse('constraint-block-list')
self.detail_url = reverse_args('constraint-block-detail')
def test_list(self):
self.client.force_authenticate(user=self.admin)
response = self.client.get(self.list_url, data={
'project': self.project.id
}, format='json')
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(len(response.data), 1)
self.client.force_authenticate(user=self.user)
response = self.client.get(self.list_url, data={
'project': self.project.id
}, format='json')
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(len(response.data), 1)
def test_create(self):
self.client.force_authenticate(user=self.admin)
response = self.client.post(self.list_url, data={
'name': "Block 2",
'project': self.project.id,
}, format='json')
self.assertEqual(response.status_code, status.HTTP_201_CREATED)
self.assertEqual(len(ConstraintBlock.objects.all()), 2)
self.client.force_authenticate(user=self.user)
response = self.client.post(self.list_url, data={
'name': "Block 3",
'project': self.project.id,
}, format='json')
self.assertEqual(response.status_code, status.HTTP_201_CREATED)
self.assertEqual(len(ConstraintBlock.objects.all()), 3)
def test_retrieve(self):
self.client.force_authenticate(user=self.user)
response = self.client.get(self.detail_url(self.constraint_block.id))
self.assertEqual(response.status_code, status.HTTP_200_OK)
def test_update(self):
self.client.force_authenticate(user=self.user)
response = self.client.put(self.detail_url(self.constraint_block.id), data={
'name': "New name",
'project': self.project.id
}, format='json')
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.data.get('name'), "New name")
def test_partial_update(self):
self.client.force_authenticate(user=self.user)
response = self.client.patch(self.detail_url(self.constraint_block.id), data={
'name': "New name",
}, format='json')
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.data.get('name'), "New name")
def test_destroy(self):
self.client.force_authenticate(user=self.user)
response = self.client.delete(self.detail_url(self.constraint_block.id))
self.assertEqual(response.status_code, status.HTTP_204_NO_CONTENT)
self.assertEqual(len(ConstraintBlock.objects.all()), 0)
# class ConstraintCRUDTest(APITestCase):
# def setUp(self):
# pass
# def test_list(self):
# pass
# def test_create(self):
# pass
# def test_retrieve(self):
# pass
# def test_update(self):
# pass
# def test_partial_update(self):
# pass
# def test_destroy(self):
# pass
# class ConstraintParameterCRUDTest(APITestCase):
# def setUp(self):
# pass
# def test_list(self):
# pass
# def test_create(self):
# pass
# def test_retrieve(self):
# pass
# def test_update(self):
# pass
# def test_partial_update(self):
# pass
# def test_destroy(self):
# pass
# class ConstraintParameterRelationshipCRUDTest(APITestCase):
# def setUp(self):
# pass
# def test_list(self):
# pass
# def test_create(self):
# pass
# def test_retrieve(self):
# pass
# def test_update(self):
# pass
# def test_partial_update(self):
# pass
# def test_destroy(self):
# pass
| 37.27553 | 100 | 0.645973 | 2,354 | 19,346 | 5.162702 | 0.058199 | 0.076524 | 0.113552 | 0.112153 | 0.895334 | 0.872213 | 0.853863 | 0.844647 | 0.83683 | 0.83683 | 0 | 0.016825 | 0.228885 | 19,346 | 518 | 101 | 37.34749 | 0.797828 | 0.079293 | 0 | 0.769886 | 0 | 0 | 0.080357 | 0.004966 | 0 | 0 | 0 | 0 | 0.221591 | 1 | 0.079545 | false | 0 | 0.028409 | 0 | 0.119318 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
37a8c78a4b69e21243d23b5127895b79814ad227 | 147 | py | Python | basket/views.py | oyekamal/Ecommerce-Store | 05db16deb80f46ea5c85e02a87f1f093a856d877 | [
"MIT"
] | null | null | null | basket/views.py | oyekamal/Ecommerce-Store | 05db16deb80f46ea5c85e02a87f1f093a856d877 | [
"MIT"
] | null | null | null | basket/views.py | oyekamal/Ecommerce-Store | 05db16deb80f46ea5c85e02a87f1f093a856d877 | [
"MIT"
] | null | null | null | from django.shortcuts import render
# Create your views here.
def basket_summary(request):
return render(request, 'store/basket/summary.html') | 29.4 | 55 | 0.782313 | 20 | 147 | 5.7 | 0.8 | 0.22807 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.122449 | 147 | 5 | 55 | 29.4 | 0.883721 | 0.156463 | 0 | 0 | 0 | 0 | 0.203252 | 0.203252 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.333333 | 0.333333 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 7 |
37ab7766c814609dc62ed48faa6809f3dd519848 | 65 | py | Python | user/utils/token.py | concric-inc/healthcare | 70b062a0b8a413fd3470cc0b528909abbfd51b7d | [
"MIT"
] | null | null | null | user/utils/token.py | concric-inc/healthcare | 70b062a0b8a413fd3470cc0b528909abbfd51b7d | [
"MIT"
] | null | null | null | user/utils/token.py | concric-inc/healthcare | 70b062a0b8a413fd3470cc0b528909abbfd51b7d | [
"MIT"
] | null | null | null | import secrets
def Token():
return secrets.token_urlsafe(16) | 16.25 | 36 | 0.753846 | 9 | 65 | 5.333333 | 0.777778 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.036364 | 0.153846 | 65 | 4 | 36 | 16.25 | 0.836364 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | true | 0 | 0.333333 | 0.333333 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 7 |
37b9403b69b01cb5a2024baff2ab01dfe74678bf | 2,496 | py | Python | Hackathon 4.0_2021-01-08_09-13-08.py | ClointFusion-Community/CFC-Projects | c6381738ade07e6e8979bbae37400ec2b4e626c5 | [
"MIT"
] | null | null | null | Hackathon 4.0_2021-01-08_09-13-08.py | ClointFusion-Community/CFC-Projects | c6381738ade07e6e8979bbae37400ec2b4e626c5 | [
"MIT"
] | null | null | null | Hackathon 4.0_2021-01-08_09-13-08.py | ClointFusion-Community/CFC-Projects | c6381738ade07e6e8979bbae37400ec2b4e626c5 | [
"MIT"
] | null | null | null | # This code is generated automatically by ClointFusion BOT Builder Tool.
import ClointFusion as cf
import time
cf.window_show_desktop()
cf.mouse_click(int(cf.pg.size()[0]/2),int(cf.pg.size()[1]/2))
try:
cf.mouse_click(*cf.mouse_search_snip_return_coordinates_x_y(r'C:\Users\mrmay\AppData\Local\Temp\cf_log_y18lz6ln_generator\Images\Snips\1--336_39.png',conf=0.7, wait=10),left_or_right='left', single_double_triple = 'single')
except:
cf.mouse_click(336,39,left_or_right='left', single_double_triple = 'single')
time.sleep(0)
try:
cf.mouse_click(*cf.mouse_search_snip_return_coordinates_x_y(r'C:\Users\mrmay\AppData\Local\Temp\cf_log_y18lz6ln_generator\Images\Snips\2-NewTabGoogleChrome-336_39.png',conf=0.7, wait=12),left_or_right='left', single_double_triple = 'single')
except:
cf.mouse_click(336,39,left_or_right='left', single_double_triple = 'single')
time.sleep(2)
cf.key_write_enter('radhe',key='')
time.sleep(0)
cf.key_press('enter')
time.sleep(4)
try:
cf.mouse_click(*cf.mouse_search_snip_return_coordinates_x_y(r'C:\Users\mrmay\AppData\Local\Temp\cf_log_y18lz6ln_generator\Images\Snips\3-radheGoogleSearchGoogleChrome-395_79.png',conf=0.7, wait=13),left_or_right='left', single_double_triple = 'single')
except:
cf.mouse_click(395,79,left_or_right='left', single_double_triple = 'single')
time.sleep(3)
try:
cf.mouse_click(*cf.mouse_search_snip_return_coordinates_x_y(r'C:\Users\mrmay\AppData\Local\Temp\cf_log_y18lz6ln_generator\Images\Snips\4-NewTabGoogleChrome-1864_64.png',conf=0.7, wait=12),left_or_right='left', single_double_triple = 'single')
except:
cf.mouse_click(1864,64,left_or_right='left', single_double_triple = 'single')
time.sleep(2)
try:
cf.mouse_click(*cf.mouse_search_snip_return_coordinates_x_y(r'C:\Users\mrmay\AppData\Local\Temp\cf_log_y18lz6ln_generator\Images\Snips\5-NewTabGoogleChrome-588_24.png',conf=0.7, wait=14),left_or_right='left', single_double_triple = 'single')
except:
cf.mouse_click(588,24,left_or_right='left', single_double_triple = 'single')
time.sleep(4)
try:
cf.mouse_click(*cf.mouse_search_snip_return_coordinates_x_y(r'C:\Users\mrmay\AppData\Local\Temp\cf_log_y18lz6ln_generator\Images\Snips\6-radheGoogleSearchGoogleChrome-1894_22.png',conf=0.7, wait=10),left_or_right='left', single_double_triple = 'single')
except:
cf.mouse_click(1894,22,left_or_right='left', single_double_triple = 'single')
time.sleep(0)
cf.window_close_windows('radhe - Google Search - Google Chrome') | 46.222222 | 257 | 0.786859 | 419 | 2,496 | 4.381862 | 0.202864 | 0.07244 | 0.084967 | 0.098039 | 0.775599 | 0.761438 | 0.761438 | 0.755991 | 0.755991 | 0.755991 | 0 | 0.053219 | 0.066506 | 2,496 | 54 | 258 | 46.222222 | 0.734764 | 0.028045 | 0 | 0.538462 | 1 | 0.153846 | 0.32866 | 0.259794 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.051282 | 0 | 0.051282 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
8065129c2f30ddf70c9983de05ce8be6ee94ef8b | 106 | py | Python | gs_chunked_io/__init__.py | justindujardin/gs-chunked-io | 44a04263500fc527610cfc989e920218d9084423 | [
"MIT"
] | null | null | null | gs_chunked_io/__init__.py | justindujardin/gs-chunked-io | 44a04263500fc527610cfc989e920218d9084423 | [
"MIT"
] | null | null | null | gs_chunked_io/__init__.py | justindujardin/gs-chunked-io | 44a04263500fc527610cfc989e920218d9084423 | [
"MIT"
] | null | null | null | from gs_chunked_io.reader import Reader, AsyncReader
from gs_chunked_io.writer import Writer, AsyncWriter
| 35.333333 | 52 | 0.867925 | 16 | 106 | 5.5 | 0.5625 | 0.136364 | 0.295455 | 0.340909 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.09434 | 106 | 2 | 53 | 53 | 0.916667 | 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 | 1 | 0 | 0 | 7 |
80a6750d9e65b722465cd9c38b452c2d02daec5c | 8,539 | py | Python | src/genie/libs/parser/iosxr/tests/ShowIpv6VrfAllInterface/cli/equal/golden_output2_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 204 | 2018-06-27T00:55:27.000Z | 2022-03-06T21:12:18.000Z | src/genie/libs/parser/iosxr/tests/ShowIpv6VrfAllInterface/cli/equal/golden_output2_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 468 | 2018-06-19T00:33:18.000Z | 2022-03-31T23:23:35.000Z | src/genie/libs/parser/iosxr/tests/ShowIpv6VrfAllInterface/cli/equal/golden_output2_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 309 | 2019-01-16T20:21:07.000Z | 2022-03-30T12:56:41.000Z | expected_output = {
"GigabitEthernet0/0/0/0": {
"enabled": True,
"int_status": "up",
"ipv6": {
"2001:db8:8548:1::2/64": {
"ipv6": "2001:db8:8548:1::2",
"ipv6_prefix_length": "64",
"ipv6_subnet": "2001:db8:8548:1::",
},
"complete_glean_adj": "1",
"complete_protocol_adj": "1",
"dad_attempts": "1",
"dropped_glean_req": "0",
"dropped_protocol_req": "0",
"icmp_redirects": "disabled",
"icmp_unreachables": "enabled",
"incomplete_glean_adj": "0",
"incomplete_protocol_adj": "0",
"ipv6_groups": [
"ff02::1:ff00:2",
"ff02::1:ffca:3efd",
"ff02::2",
"ff02::1",
"ff02::5",
"ff02::6",
],
"ipv6_link_local": "fe80::f816:3eff:feca:3efd",
"ipv6_mtu": "1514",
"ipv6_mtu_available": "1500",
"nd_adv_retrans_int": "0",
"nd_cache_limit": "1000000000",
"nd_dad": "enabled",
"nd_reachable_time": "0",
"stateless_autoconfig": True,
"table_id": "0xe0800000",
},
"ipv6_enabled": True,
"oper_status": "up",
"vrf": "default",
"vrf_id": "0x60000000",
},
"GigabitEthernet0/0/0/1": {
"enabled": True,
"int_status": "up",
"ipv6": {
"2001:db8:888c:1::2/64": {
"ipv6": "2001:db8:888c:1::2",
"ipv6_prefix_length": "64",
"ipv6_subnet": "2001:db8:888c:1::",
},
"complete_glean_adj": "2",
"complete_protocol_adj": "0",
"dad_attempts": "1",
"dropped_glean_req": "0",
"dropped_protocol_req": "0",
"icmp_redirects": "disabled",
"icmp_unreachables": "enabled",
"incomplete_glean_adj": "0",
"incomplete_protocol_adj": "0",
"ipv6_groups": [
"ff02::1:ff00:2",
"ff02::1:ff20:fa5b",
"ff02::2",
"ff02::1",
"ff02::5",
"ff02::6",
],
"ipv6_link_local": "fe80::f816:3eff:fe20:fa5b",
"ipv6_mtu": "1514",
"ipv6_mtu_available": "1500",
"nd_adv_duration": "160-240",
"nd_adv_retrans_int": "0",
"nd_cache_limit": "1000000000",
"nd_dad": "enabled",
"nd_reachable_time": "0",
"nd_router_adv": "1800",
"stateless_autoconfig": True,
"table_id": "0xe0800001",
},
"ipv6_enabled": True,
"oper_status": "up",
"vrf": "VRF1",
"vrf_id": "0x60000001",
},
"GigabitEthernet0/0/0/2": {
"enabled": True,
"int_status": "up",
"ipv6": {
"2001:db8:c56d:4::2/64": {
"ipv6": "2001:db8:c56d:4::2",
"ipv6_prefix_length": "64",
"ipv6_subnet": "2001:db8:c56d:4::",
},
"complete_glean_adj": "1",
"complete_protocol_adj": "1",
"dad_attempts": "1",
"dropped_glean_req": "0",
"dropped_protocol_req": "0",
"icmp_redirects": "disabled",
"icmp_unreachables": "enabled",
"incomplete_glean_adj": "0",
"incomplete_protocol_adj": "0",
"ipv6_groups": [
"ff02::1:ff00:2",
"ff02::1:ff82:6320",
"ff02::2",
"ff02::1",
"ff02::5",
"ff02::6",
],
"ipv6_link_local": "fe80::f816:3eff:fe82:6320",
"ipv6_mtu": "1514",
"ipv6_mtu_available": "1500",
"nd_adv_duration": "160-240",
"nd_adv_retrans_int": "0",
"nd_cache_limit": "1000000000",
"nd_dad": "enabled",
"nd_reachable_time": "0",
"nd_router_adv": "1800",
"stateless_autoconfig": True,
"table_id": "0xe0800000",
},
"ipv6_enabled": True,
"oper_status": "up",
"vrf": "default",
"vrf_id": "0x60000000",
},
"GigabitEthernet0/0/0/3": {
"enabled": True,
"int_status": "up",
"ipv6": {
"2001:db8:c8d1:4::2/64": {
"ipv6": "2001:db8:c8d1:4::2",
"ipv6_prefix_length": "64",
"ipv6_subnet": "2001:db8:c8d1:4::",
},
"complete_glean_adj": "1",
"complete_protocol_adj": "1",
"dad_attempts": "1",
"dropped_glean_req": "0",
"dropped_protocol_req": "0",
"icmp_redirects": "disabled",
"icmp_unreachables": "enabled",
"incomplete_glean_adj": "0",
"incomplete_protocol_adj": "0",
"ipv6_groups": [
"ff02::1:ff00:2",
"ff02::1:ff8b:59c9",
"ff02::2",
"ff02::1",
"ff02::5",
"ff02::6",
],
"ipv6_link_local": "fe80::f816:3eff:fe8b:59c9",
"ipv6_mtu": "1514",
"ipv6_mtu_available": "1500",
"nd_adv_duration": "160-240",
"nd_adv_retrans_int": "0",
"nd_cache_limit": "1000000000",
"nd_dad": "enabled",
"nd_reachable_time": "0",
"nd_router_adv": "1800",
"stateless_autoconfig": True,
"table_id": "0xe0800001",
},
"ipv6_enabled": True,
"oper_status": "up",
"vrf": "VRF1",
"vrf_id": "0x60000001",
},
"Loopback0": {
"enabled": True,
"int_status": "up",
"ipv6": {
"2001:2:2::2/128": {
"ipv6": "2001:2:2::2",
"ipv6_prefix_length": "128",
"ipv6_subnet": "2001:2:2::2",
},
"complete_glean_adj": "0",
"complete_protocol_adj": "0",
"dad_attempts": "0",
"dropped_glean_req": "0",
"dropped_protocol_req": "0",
"icmp_redirects": "disabled",
"incomplete_glean_adj": "0",
"incomplete_protocol_adj": "0",
"ipv6_groups": [
"ff02::1:ff00:2",
"ff02::1:ffbd:853e",
"ff02::2",
"ff02::1",
],
"ipv6_link_local": "fe80::6983:ecff:febd:853e",
"ipv6_mtu": "1500",
"ipv6_mtu_available": "1500",
"nd_adv_retrans_int": "0",
"nd_cache_limit": "0",
"nd_dad": "disabled",
"nd_reachable_time": "0",
"stateless_autoconfig": True,
"table_id": "0xe0800000",
},
"ipv6_enabled": True,
"oper_status": "up",
"vrf": "default",
"vrf_id": "0x60000000",
},
"Loopback1": {
"enabled": True,
"int_status": "up",
"ipv6": {
"2001:22:22::22/128": {
"ipv6": "2001:22:22::22",
"ipv6_prefix_length": "128",
"ipv6_subnet": "2001:22:22::22",
},
"complete_glean_adj": "0",
"complete_protocol_adj": "0",
"dad_attempts": "0",
"dropped_glean_req": "0",
"dropped_protocol_req": "0",
"icmp_redirects": "disabled",
"incomplete_glean_adj": "0",
"incomplete_protocol_adj": "0",
"ipv6_groups": [
"ff02::1:ff00:22",
"ff02::1:ffbd:853e",
"ff02::2",
"ff02::1",
],
"ipv6_link_local": "fe80::6983:ecff:febd:853e",
"ipv6_mtu": "1500",
"ipv6_mtu_available": "1500",
"nd_adv_retrans_int": "0",
"nd_cache_limit": "0",
"nd_dad": "disabled",
"nd_reachable_time": "0",
"stateless_autoconfig": True,
"table_id": "0xe0800000",
},
"ipv6_enabled": True,
"oper_status": "up",
"vrf": "default",
"vrf_id": "0x60000000",
},
"MgmtEth0/RP0/CPU0/0": {
"enabled": False,
"int_status": "shutdown",
"ipv6_enabled": False,
"oper_status": "down",
"vrf": "default",
"vrf_id": "0x60000000",
},
}
| 33.225681 | 59 | 0.432955 | 811 | 8,539 | 4.25894 | 0.127004 | 0.026057 | 0.019108 | 0.034742 | 0.923856 | 0.906775 | 0.874349 | 0.837869 | 0.799653 | 0.796468 | 0 | 0.144655 | 0.395245 | 8,539 | 256 | 60 | 33.355469 | 0.524206 | 0 | 0 | 0.765625 | 0 | 0 | 0.448062 | 0.068626 | 0 | 0 | 0.015224 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
80d2eef10c49f0cbb7591ad5ee6ed640dc98e406 | 17,592 | py | Python | WanemManager.py | futamint/EM-uNetPi | 607516ab2fdeab0f2a4ac6ff65b1efe42b52cef5 | [
"MIT"
] | null | null | null | WanemManager.py | futamint/EM-uNetPi | 607516ab2fdeab0f2a4ac6ff65b1efe42b52cef5 | [
"MIT"
] | null | null | null | WanemManager.py | futamint/EM-uNetPi | 607516ab2fdeab0f2a4ac6ff65b1efe42b52cef5 | [
"MIT"
] | null | null | null | import sys, getopt, time, struct, termios, fcntl, sys, os, subprocess
from time import sleep
from RenderManager import RenderManager
class WanemManager:
def __init__(self, pCTX, pRenderManager):
self.pCTX = pCTX
self.pRender = pRenderManager
self.disconnState = 0
self.speedState = 0
self.delayState = 0
self.speedPrevState = 0
self.delayPrevState = 0
self.isDualMode = 0
self.speedLabel = ["nolimit","8Mbps","1Mbps","200Kbps","128Kbps"]
self.delayLabel = ["nolimit","LTE","LTE(Jitter)","3G","3G(Jitter)"]
self.speedValue = ["","limit 1Mb buffer 2Mb rate 1Mbps","limit 128Kb buffer 256Kb rate 128Kbps","limit 25Kb buffer 50Kb rate 25Kbps","limit 16Kb buffer 32Kb rate 16Kbps"]
self.delayValue = ["0msec","25msec","50msec 30msec","100msec","250msec 100msec"]
self.lossValueDef = [0,1,2,1,2]
self.lossValue = ["0%","100%","100%"]
self.InitSingle()
self.upRootDevice = ""
self.dwRootDevice = ""
self.upChildDevice = ""
self.dwChildDevice = ""
cmd = "cat /etc/wanem/wanemmode.prop"
try:
self.wanemMode = int(subprocess.check_output(cmd.strip().split(" ")).replace('\n',''))
except subprocess.CalledProcessError:
self.wanemMode = 0
def InitSingle(self):
self.isDualMode = 0
self.upRootDevice = "eth0 root"
self.dwRootDevice = "wlan0 root"
self.dw2RootDevice = "eth2 root"
cmd = "tc qdisc del dev " + self.upRootDevice
subprocess.call(cmd.strip().split(" "))
cmd = "tc qdisc add dev " + self.upRootDevice + " netem delay " + self.delayValue[self.delayState] + " loss " + self.lossValue[self.disconnState]
subprocess.call(cmd.strip().split(" "))
cmd = "tc qdisc del dev " + self.dwRootDevice
subprocess.call(cmd.strip().split(" "))
cmd = "tc qdisc add dev " + self.dwRootDevice + " netem delay " + self.delayValue[self.delayState] + " loss " + self.lossValue[self.disconnState]
subprocess.call(cmd.strip().split(" "))
if self.pCTX.lanMode == self.pCTX.LAN_MODE_HYBRID:
cmd = "tc qdisc del dev " + self.dw2RootDevice
subprocess.call(cmd.strip().split(" "))
cmd = "tc qdisc add dev " + self.dw2RootDevice + " netem delay " + self.delayValue[self.delayState] + " loss " + self.lossValue[self.disconnState]
subprocess.call(cmd.strip().split(" "))
def InitDual(self, bandValueIdx):
#print "InitDual >> " + str(bandValueIdx)
#print self.speedValue[bandValueIdx]
self.isDualMode = 1
self.upRootDevice = "eth0 root"
self.dwRootDevice = "wlan0 root"
self.dw2RootDevice = "eth2 root"
cmd = "tc qdisc del dev " + self.upRootDevice
subprocess.call(cmd.strip().split(" "))
cmd = "tc qdisc del dev " + self.dwRootDevice
subprocess.call(cmd.strip().split(" "))
if self.pCTX.lanMode == self.pCTX.LAN_MODE_HYBRID:
cmd = "tc qdisc del dev " + self.dw2RootDevice
subprocess.call(cmd.strip().split(" "))
self.upRootDevice = "eth0 root handle 1:"
self.dwRootDevice = "wlan0 root handle 2:"
self.dw2RootDevice = "eth2 root handle 3:"
self.upChildDevice = "eth0 parent 1: handle 10:"
self.dwChildDevice = "wlan0 parent 2: handle 20:"
self.dw2ChildDevice = "eth2 parent 3: handle 30:"
cmd = "tc qdisc add dev " + self.upRootDevice + " tbf " + self.speedValue[bandValueIdx]
subprocess.call(cmd.strip().split(" "))
cmd = "tc qdisc add dev " + self.upChildDevice + " netem delay " + self.delayValue[self.delayState] + " loss " + self.lossValue[self.disconnState]
subprocess.call(cmd.strip().split(" "))
cmd = "tc qdisc add dev " + self.dwRootDevice + " tbf " + self.speedValue[bandValueIdx]
subprocess.call(cmd.strip().split(" "))
cmd = "tc qdisc add dev " + self.dwChildDevice + " netem delay " + self.delayValue[self.delayState] + " loss " + self.lossValue[self.disconnState]
subprocess.call(cmd.strip().split(" "))
if self.pCTX.lanMode == self.pCTX.LAN_MODE_HYBRID:
cmd = "tc qdisc add dev " + self.dw2RootDevice + " tbf " + self.speedValue[bandValueIdx]
subprocess.call(cmd.strip().split(" "))
cmd = "tc qdisc add dev " + self.dw2ChildDevice + " netem delay " + self.delayValue[self.delayState] + " loss " + self.lossValue[self.disconnState]
subprocess.call(cmd.strip().split(" "))
def EmuDisconnPush(self):
print "Push"
self.disconnState = 2
self.pRender.RenderDot(0, 6)
self.Apply(False)
def EmuDisconnRelease(self):
if self.disconnState != 2:
return
print "Release"
self.pRender.RenderDot(0, 5)
self.disconnState = 0
self.Apply(False)
def EmuDisconnToggle(self):
if self.disconnState == 1:
self.disconnState = 0
self.pRender.RenderDot(0, 5)
elif self.disconnState == 0:
self.disconnState = 1
self.pRender.RenderDot(0, 6)
self.Apply(False)
# Call by Only ScManualEx2
def EmuDisconnPushMini(self, upBand, dwBand, upDelay, dwDelay, upLoss, dwLoss):
print "Push"
self.disconnState = 2
self.pRender.RenderDotMini(2, 6)
self.DirectUpdateEx2(upBand, dwBand, upDelay, dwDelay, upLoss, dwLoss)
# Call by Only ScManualEx2
def EmuDisconnReleaseMini(self, upBand, dwBand, upDelay, dwDelay, upLoss, dwLoss):
if self.disconnState != 2:
return
print "Release"
self.pRender.RenderDotMini(2, 5)
self.disconnState = 0
self.DirectUpdateEx2(upBand, dwBand, upDelay, dwDelay, upLoss, dwLoss)
# Call by Only ScManualEx2
def EmuDisconnToggleMini(self, upBand, dwBand, upDelay, dwDelay, upLoss, dwLoss):
if self.disconnState == 1:
self.disconnState = 0
self.pRender.RenderDotMini(2, 5)
elif self.disconnState == 0:
self.disconnState = 1
self.pRender.RenderDotMini(2, 6)
self.DirectUpdateEx2(upBand, dwBand, upDelay, dwDelay, upLoss, dwLoss)
def EmuSpeedChange(self, value):
self.speedPrevState = self.speedState
self.speedState = (self.speedState + value + 5) % 5
self.pRender.RenderDot(1, 7 + self.speedState)
if self.speedState == 0 and self.speedPrevState != 0:
self.InitSingle()
elif self.speedState != 0 and self.speedPrevState == 0:
self.InitDual(self.speedState)
self.Apply(True)
def EmuDelayChange(self, value):
self.delayState = (self.delayState + value + 5) % 5
self.pRender.RenderDot(2, 7 + self.delayState)
self.Apply()
def Clear(self):
self.speedState = 0
self.delayState = 0
self.disconnState = 0
self.Apply(True)
def Apply(self, isLabelUpdate = True):
if isLabelUpdate == True:
#self.pRender.UpdateTitle("Wan Emulation Mode")
self.pRender.UpdateSubTitle("speed:" + self.speedLabel[self.speedState] + ", delay:" + self.delayLabel[self.delayState])
if self.disconnState == 0:
upLossStmt = " loss %d%%" % self.lossValueDef[self.delayState]
dwLossStmt = " loss %d%%" % self.lossValueDef[self.delayState]
else:
upLossStmt = " loss " + self.lossValue[self.disconnState]
dwLossStmt = " loss " + self.lossValue[self.disconnState]
if self.isDualMode == 0:
cmd = "tc qdisc change dev " + self.upRootDevice + " netem delay " + self.delayValue[self.delayState] + upLossStmt
cmd2 = "tc qdisc change dev " + self.dwRootDevice + " netem delay " + self.delayValue[self.delayState] + dwLossStmt
cmd3 = "tc qdisc change dev " + self.dw2RootDevice + " netem delay " + self.delayValue[self.delayState] + dwLossStmt
subprocess.call(cmd.strip().split(" "))
subprocess.call(cmd2.strip().split(" "))
if self.pCTX.lanMode == self.pCTX.LAN_MODE_HYBRID:
subprocess.call(cmd3.strip().split(" "))
else:
#print str(self.speedState) + " >> " + self.speedValue[self.speedState]
cmd = "tc qdisc change dev " + self.upRootDevice + " tbf " + self.speedValue[self.speedState]
cmd2 = "tc qdisc change dev " + self.upChildDevice + " netem delay " + self.delayValue[self.delayState] + upLossStmt
cmd3 = "tc qdisc change dev " + self.dwRootDevice + " tbf " + self.speedValue[self.speedState]
cmd4 = "tc qdisc change dev " + self.dwChildDevice + " netem delay " + self.delayValue[self.delayState] + dwLossStmt
cmd5 = "tc qdisc change dev " + self.dw2RootDevice + " tbf " + self.speedValue[self.speedState]
cmd6 = "tc qdisc change dev " + self.dw2ChildDevice + " netem delay " + self.delayValue[self.delayState] + dwLossStmt
subprocess.call(cmd.strip().split(" "))
subprocess.call(cmd2.strip().split(" "))
subprocess.call(cmd3.strip().split(" "))
subprocess.call(cmd4.strip().split(" "))
if self.pCTX.lanMode == self.pCTX.LAN_MODE_HYBRID:
subprocess.call(cmd5.strip().split(" "))
subprocess.call(cmd6.strip().split(" "))
def DirectApply(self, delay):
if delay >= 0:
param = str(int(delay / 2))
cmd = "tc qdisc change dev eth0 root netem delay " + param + "msec loss 0%"
cmd2 = "tc qdisc change dev wlan0 root netem delay " + param + "msec loss 0%"
cmd3 = "tc qdisc change dev eth2 root netem delay " + param + "msec loss 0%"
subprocess.call(cmd.strip().split(" "))
subprocess.call(cmd2.strip().split(" "))
subprocess.call(cmd3.strip().split(" "))
else:
cmd = "tc qdisc change dev eth0 root netem loss 100%"
cmd2 = "tc qdisc change dev wlan0 root netem loss 100%"
cmd3 = "tc qdisc change dev eth2 root netem loss 100%"
subprocess.call(cmd.strip().split(" "))
subprocess.call(cmd2.strip().split(" "))
subprocess.call(cmd3.strip().split(" "))
def ClearEx(self):
self.upRootDevice = "eth0 root"
self.dwRootDevice = "wlan0 root"
self.dw2RootDevice = "eth2 root"
cmd = "tc qdisc del dev " + self.upRootDevice
subprocess.call(cmd.strip().split(" "))
cmd = "tc qdisc del dev " + self.dwRootDevice
subprocess.call(cmd.strip().split(" "))
if self.pCTX.lanMode == self.pCTX.LAN_MODE_HYBRID:
cmd = "tc qdisc del dev " + self.dw2RootDevice
subprocess.call(cmd.strip().split(" "))
self.pRender.RenderDotMini(2, 5)
self.disconnState = 0
return
def ClearEx2(self):
self.upRootDevice = "eth0 root"
self.dwRootDevice = "wlan0 root"
self.dw2RootDevice = "eth2 root"
cmd = "tc qdisc del dev " + self.upRootDevice
subprocess.call(cmd.strip().split(" "))
cmd = "tc qdisc del dev " + self.dwRootDevice
subprocess.call(cmd.strip().split(" "))
if self.pCTX.lanMode == self.pCTX.LAN_MODE_HYBRID:
cmd = "tc qdisc del dev " + self.dw2RootDevice
subprocess.call(cmd.strip().split(" "))
self.disconnState = 0
return
def DirectApplyEx(self, upBand, dwBand, upDelay, dwDelay, upLoss = 0, dwLoss = 0):
if self.wanemMode == 0:
speedUpValue = "limit %dKb buffer %dKb rate %dKbps" % (4, 8, upBand / 8)
speedDwValue = "limit %dKb buffer %dKb rate %dKbps" % (4, 8, dwBand / 8)
else:
speedUpValue = "limit %dKb buffer %dKb rate %dKbps" % (upBand / 8, upBand /4, upBand / 8)
speedDwValue = "limit %dKb buffer %dKb rate %dKbps" % (dwBand / 8, dwBand /4, dwBand / 8)
delayUpValue = "%dmsec" % upDelay
delayDwValue = "%dmsec" % dwDelay
self.upRootDevice = "eth0 root handle 1:"
self.dwRootDevice = "wlan0 root handle 2:"
self.dw2RootDevice = "eth2 root handle 3:"
self.upChildDevice = "eth0 parent 1: handle 10:"
self.dwChildDevice = "wlan0 parent 2: handle 20:"
self.dw2ChildDevice = "eth2 parent 3: handle 30:"
if self.disconnState == 0:
upLossStmt = " loss %d%%" % upLoss
dwLossStmt = " loss %d%%" % dwLoss
else:
upLossStmt = " loss " + self.lossValue[self.disconnState]
dwLossStmt = " loss " + self.lossValue[self.disconnState]
cmd = "tc qdisc add dev " + self.upRootDevice + " tbf " + speedUpValue
subprocess.call(cmd.strip().split(" "))
cmd = "tc qdisc add dev " + self.upChildDevice + " netem delay " + delayUpValue + upLossStmt
subprocess.call(cmd.strip().split(" "))
cmd = "tc qdisc add dev " + self.dwRootDevice + " tbf " + speedDwValue
subprocess.call(cmd.strip().split(" "))
cmd = "tc qdisc add dev " + self.dwChildDevice + " netem delay " + delayDwValue + dwLossStmt
subprocess.call(cmd.strip().split(" "))
if self.pCTX.lanMode == self.pCTX.LAN_MODE_HYBRID:
cmd = "tc qdisc add dev " + self.dw2RootDevice + " tbf " + speedDwValue
subprocess.call(cmd.strip().split(" "))
cmd = "tc qdisc add dev " + self.dw2ChildDevice + " netem delay " + delayDwValue + dwLossStmt
subprocess.call(cmd.strip().split(" "))
def DirectApplyEx2(self, upBand, dwBand, upDelay, dwDelay, upLoss, dwLoss):
if self.wanemMode == 0:
speedUpValue = "limit %dKb buffer %dKb rate %dKbps" % (4, 8, upBand / 8)
speedDwValue = "limit %dKb buffer %dKb rate %dKbps" % (4, 8, dwBand / 8)
else:
speedUpValue = "limit %dKb buffer %dKb rate %dKbps" % (upBand / 8, upBand /4, upBand / 8)
speedDwValue = "limit %dKb buffer %dKb rate %dKbps" % (dwBand / 8, dwBand /4, dwBand / 8)
delayUpValue = "%dmsec" % upDelay
delayDwValue = "%dmsec" % dwDelay
self.upRootDevice = "eth0 root handle 1:"
self.dwRootDevice = "wlan0 root handle 2:"
self.dw2RootDevice = "eth2 root handle 3:"
self.upChildDevice = "eth0 parent 1: handle 10:"
self.dwChildDevice = "wlan0 parent 2: handle 20:"
self.dw2ChildDevice = "eth2 parent 3: handle 30:"
cmd = "tc qdisc add dev " + self.upRootDevice + " tbf " + speedUpValue
subprocess.call(cmd.strip().split(" "))
cmd = "tc qdisc add dev " + self.upChildDevice + " netem delay " + delayUpValue + " loss " + str(upLoss) + "%"
subprocess.call(cmd.strip().split(" "))
cmd = "tc qdisc add dev " + self.dwRootDevice + " tbf " + speedDwValue
subprocess.call(cmd.strip().split(" "))
cmd = "tc qdisc add dev " + self.dwChildDevice + " netem delay " + delayDwValue + " loss " + str(dwLoss) + "%"
subprocess.call(cmd.strip().split(" "))
if self.pCTX.lanMode == self.pCTX.LAN_MODE_HYBRID:
cmd = "tc qdisc add dev " + self.dw2RootDevice + " tbf " + speedDwValue
subprocess.call(cmd.strip().split(" "))
cmd = "tc qdisc add dev " + self.dw2ChildDevice + " netem delay " + delayDwValue + " loss " + str(dwLoss) + "%"
subprocess.call(cmd.strip().split(" "))
def DirectUpdateEx(self, upBand, dwBand, upDelay, dwDelay):
if self.wanemMode == 0:
speedUpValue = "limit %dKb buffer %dKb rate %dKbps" % (4, 8, upBand / 8)
speedDwValue = "limit %dKb buffer %dKb rate %dKbps" % (4, 8, dwBand / 8)
else:
speedUpValue = "limit %dKb buffer %dKb rate %dKbps" % (upBand / 8, upBand /4, upBand / 8)
speedDwValue = "limit %dKb buffer %dKb rate %dKbps" % (dwBand / 8, dwBand /4, dwBand / 8)
delayUpValue = "%dmsec" % upDelay
delayDwValue = "%dmsec" % dwDelay
self.upRootDevice = "eth0 root handle 1:"
self.dwRootDevice = "wlan0 root handle 2:"
self.dw2RootDevice = "eth2 root handle 3:"
self.upChildDevice = "eth0 parent 1: handle 10:"
self.dwChildDevice = "wlan0 parent 2: handle 20:"
self.dw2ChildDevice = "eth2 parent 3: handle 30:"
cmd = "tc qdisc change dev " + self.upRootDevice + " tbf " + speedUpValue
subprocess.call(cmd.strip().split(" "))
cmd = "tc qdisc change dev " + self.upChildDevice + " netem delay " + delayUpValue + " loss " + self.lossValue[self.disconnState]
subprocess.call(cmd.strip().split(" "))
cmd = "tc qdisc change dev " + self.dwRootDevice + " tbf " + speedDwValue
subprocess.call(cmd.strip().split(" "))
cmd = "tc qdisc change dev " + self.dwChildDevice + " netem delay " + delayDwValue + " loss " + self.lossValue[self.disconnState]
subprocess.call(cmd.strip().split(" "))
if self.pCTX.lanMode == self.pCTX.LAN_MODE_HYBRID:
cmd = "tc qdisc change dev " + self.dw2RootDevice + " tbf " + speedDwValue
subprocess.call(cmd.strip().split(" "))
cmd = "tc qdisc change dev " + self.dw2ChildDevice + " netem delay " + delayDwValue + " loss " + self.lossValue[self.disconnState]
subprocess.call(cmd.strip().split(" "))
def DirectUpdateEx2(self, upBand, dwBand, upDelay, dwDelay, upLoss = 0, dwLoss = 0):
if self.wanemMode == 0:
speedUpValue = "limit %dKb buffer %dKb rate %dKbps" % (4, 8, upBand / 8)
speedDwValue = "limit %dKb buffer %dKb rate %dKbps" % (4, 8, dwBand / 8)
else:
speedUpValue = "limit %dKb buffer %dKb rate %dKbps" % (upBand / 8, upBand /4, upBand / 8)
speedDwValue = "limit %dKb buffer %dKb rate %dKbps" % (dwBand / 8, dwBand /4, dwBand / 8)
delayUpValue = "%dmsec" % upDelay
delayDwValue = "%dmsec" % dwDelay
self.upRootDevice = "eth0 root handle 1:"
self.dwRootDevice = "wlan0 root handle 2:"
self.dw2RootDevice = "eth2 root handle 3:"
self.upChildDevice = "eth0 parent 1: handle 10:"
self.dwChildDevice = "wlan0 parent 2: handle 20:"
self.dw2ChildDevice = "eth2 parent 3: handle 30:"
if self.disconnState == 0:
upLossStmt = " loss %d%%" % upLoss
dwLossStmt = " loss %d%%" % dwLoss
else:
upLossStmt = " loss " + self.lossValue[self.disconnState]
dwLossStmt = " loss " + self.lossValue[self.disconnState]
cmd = "tc qdisc change dev " + self.upRootDevice + " tbf " + speedUpValue
subprocess.call(cmd.strip().split(" "))
cmd = "tc qdisc change dev " + self.upChildDevice + " netem delay " + delayUpValue + upLossStmt
subprocess.call(cmd.strip().split(" "))
cmd = "tc qdisc change dev " + self.dwRootDevice + " tbf " + speedDwValue
subprocess.call(cmd.strip().split(" "))
cmd = "tc qdisc change dev " + self.dwChildDevice + " netem delay " + delayDwValue + dwLossStmt
subprocess.call(cmd.strip().split(" "))
if self.pCTX.lanMode == self.pCTX.LAN_MODE_HYBRID:
cmd = "tc qdisc change dev " + self.dw2RootDevice + " tbf " + speedDwValue
subprocess.call(cmd.strip().split(" "))
cmd = "tc qdisc change dev " + self.dw2ChildDevice + " netem delay " + delayDwValue + dwLossStmt
subprocess.call(cmd.strip().split(" "))
| 43.012225 | 172 | 0.66661 | 2,169 | 17,592 | 5.394191 | 0.083449 | 0.052137 | 0.055556 | 0.092137 | 0.848376 | 0.830427 | 0.810684 | 0.777863 | 0.736068 | 0.694017 | 0 | 0.025551 | 0.187983 | 17,592 | 408 | 173 | 43.117647 | 0.79349 | 0.015121 | 0 | 0.703593 | 0 | 0 | 0.208499 | 0.001444 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.008982 | null | null | 0.011976 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
80d5167276a115b667a74c24e767caa556d01def | 7,934 | py | Python | module/spectralnorm.py | chillingche/thin-dis-gan | de919b0ddaab086b732a8ddc30755a1056ea62de | [
"Apache-2.0"
] | null | null | null | module/spectralnorm.py | chillingche/thin-dis-gan | de919b0ddaab086b732a8ddc30755a1056ea62de | [
"Apache-2.0"
] | null | null | null | module/spectralnorm.py | chillingche/thin-dis-gan | de919b0ddaab086b732a8ddc30755a1056ea62de | [
"Apache-2.0"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.utils import spectral_norm
class SNConv2d(nn.Conv2d):
""" 2D Convolutional layer with spectral normalizaition
Args:
Attributes:
"""
def __init__(self,
in_channels,
out_channels,
kernel_size,
stride=1,
padding=0,
bias=True,
n_power_iterations=1):
if n_power_iterations <= 0:
raise ValueError(
"Expected n_power_iterations to be positive, but got n_power_iterations=%d"
% n_power_iterations)
self.n_power_iterations = n_power_iterations
super(SNConv2d, self).__init__(
in_channels, out_channels, kernel_size, stride, padding, bias=bias)
nn.init.xavier_normal_(self.weight.data)
if not self.is_params_inited():
self.init_params()
def is_params_inited(self):
try:
u = getattr(self, "weight_u")
v = getattr(self, "weight_v")
w = getattr(self, "weight_bar")
return True
except AttributeError:
return False
def init_params(self):
weight = self.weight
with torch.no_grad():
weight_mat = self.reshape_weight_to_matrix(weight)
h, w = weight_mat.size()
u = _l2normalize(weight.new_empty(h).normal_(0, 1))
v = _l2normalize(weight.new_empty(w).normal_(0, 1))
u = nn.Parameter(u, requires_grad=False)
v = nn.Parameter(v, requires_grad=False)
weight = nn.Parameter(weight, requires_grad=True)
del self._parameters["weight"]
self.register_parameter("weight_bar", weight)
setattr(self, "weight", weight.data)
# self.register_parameter("weight_u", u)
# self.register_parameter("weight_v", v)
self.register_buffer("weight_u", u)
self.register_buffer("weight_v", v)
def reshape_weight_to_matrix(self, weight):
""" Conv2d Weight Shape: (out_c, in_c, k, k), Bias Shape: (out_c)
"""
weight_mat = weight
return weight_mat.reshape(weight_mat.size(0), -1)
def compute_weight(self, eps=1e-12, do_power_iteration=False):
weight = getattr(self, "weight_bar")
u = getattr(self, "weight_u")
v = getattr(self, "weight_v")
weight_mat = self.reshape_weight_to_matrix(weight)
W = weight_mat
if do_power_iteration:
with torch.no_grad():
for _ in range(self.n_power_iterations):
# Spectral norm of weight equals to `u^T W v`, where `u` and `v`
# are the first left and right singular vectors.
# This power iteration produces approximations of `u` and `v`.
v.data = _l2normalize(torch.mv(W.t().data, u.data))
u.data = _l2normalize(torch.mv(W.data, v.data))
if self.n_power_iterations > 0:
u, v = u.clone(), v.clone()
sigma = torch.dot(u, torch.mv(W, v))
weight = weight / (sigma + eps)
return weight
def forward(self, input):
weight = self.compute_weight(do_power_iteration=self.training)
return F.conv2d(input, weight, self.bias, self.stride,
self.padding, self.dilation, self.groups)
class SNLinear(nn.Linear):
""" Linear Convolutional layer with spectral normalization
"""
def __init__(self,
in_features,
out_features,
bias=True,
n_power_iterations=1):
if n_power_iterations <= 0:
raise ValueError(
"Expected n_power_iterations to be positive, but got n_power_iterations=%d"
% n_power_iterations)
self.n_power_iterations = n_power_iterations
super(SNLinear, self).__init__(in_features, out_features, bias=bias)
nn.init.xavier_normal_(self.weight.data)
if not self.is_params_inited():
self.init_params()
def is_params_inited(self):
try:
u = getattr(self, "weight_u")
v = getattr(self, "weight_v")
w = getattr(self, "weight_bar")
return True
except AttributeError:
return False
def init_params(self):
weight = self.weight
with torch.no_grad():
weight_mat = self.reshape_weight_to_matrix(weight)
h, w = weight_mat.size()
u = _l2normalize(weight.new_empty(h).normal_(0, 1))
v = _l2normalize(weight.new_empty(w).normal_(0, 1))
u = nn.Parameter(u, requires_grad=False)
v = nn.Parameter(v, requires_grad=False)
weight = nn.Parameter(weight, requires_grad=True)
del self._parameters["weight"]
self.register_parameter("weight_bar", weight)
setattr(self, "weight", weight.data)
# self.register_parameter("weight_u", u)
# self.register_parameter("weight_v", v)
self.register_buffer("weight_u", u)
self.register_buffer("weight_v", v)
def reshape_weight_to_matrix(self, weight):
""" Linear Weight Shape: (out_c, in_c), Bias Shape: (out_c)
"""
weight_mat = weight
return weight_mat.reshape(weight_mat.size(0), -1)
def compute_weight(self, eps=1e-12, do_power_iteration=False):
weight = getattr(self, "weight_bar")
u = getattr(self, "weight_u")
v = getattr(self, "weight_v")
weight_mat = self.reshape_weight_to_matrix(weight)
W = weight_mat
if do_power_iteration:
with torch.no_grad():
for _ in range(self.n_power_iterations):
# Spectral norm of weight equals to `u^T W v`, where `u` and `v`
# are the first left and right singular vectors.
# This power iteration produces approximations of `u` and `v`.
v.data = _l2normalize(torch.mv(W.t().data, u.data))
u.data = _l2normalize(torch.mv(W.data, v.data))
if self.n_power_iterations > 0:
u, v = u.clone(), v.clone()
sigma = torch.dot(u, torch.mv(W, v))
weight = weight / (sigma + eps)
return weight
def forward(self, input):
weight = self.compute_weight(do_power_iteration=self.training)
return F.linear(input, weight, self.bias)
def _l2normalize(v, eps=1e-12):
return v / (v.norm() + eps)
def max_singular_value(weight_mat, device, u=None, n_power_iterations=1):
W = weight_mat
if u is None:
u = torch.randn(W.size(0), device=device)
_u = u
_v = None
with torch.no_grad():
for _ in range(n_power_iterations):
# Spectral norm of weight equals to `u^T W v`, where `u` and `v`
# are the first left and right singular vectors.
# This power iteration produces approximations of `u` and `v`.
_v = _l2normalize(torch.mv(W.t(), _u))
_u = _l2normalize(torch.mv(W, _v))
sigma = torch.dot(_u, torch.mv(W, _v))
return sigma, _u, _v
if __name__ == "__main__":
device = torch.device("cuda")
# W = torch.randn(3, 3).to(device)
# print(max_singular_value(W, device))
# input_t = torch.randn(1, 3, 3, 3).to(device)
# m = SNConv2d(3, 1, 3).to(device)
input_t = torch.randn(1, 100).to(device)
m = SNLinear(100, 1).to(device)
print("weight before SN: \n", m.weight_bar, "\nu: \n", m.weight_u,
"\nv: \n", m.weight_v)
m.train()
output = m(input_t)
print("========================================")
print("weight after SN: \n", m.weight_bar, "\nu: \n", m.weight_u, "\nv: \n",
m.weight_v)
loss = ((output - 1)**2).mean()
loss.backward()
print("loss: %.4f" % loss.item())
| 37.961722 | 91 | 0.581422 | 1,029 | 7,934 | 4.252673 | 0.141885 | 0.050274 | 0.073126 | 0.027422 | 0.809415 | 0.795247 | 0.776508 | 0.753885 | 0.748629 | 0.748629 | 0 | 0.01241 | 0.299219 | 7,934 | 208 | 92 | 38.144231 | 0.77464 | 0.136627 | 0 | 0.713376 | 0 | 0 | 0.066961 | 0.012068 | 0 | 0 | 0 | 0 | 0 | 1 | 0.089172 | false | 0 | 0.025478 | 0.006369 | 0.203822 | 0.025478 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
80dbde4897b66de587865df0c7414128658c9c41 | 13,077 | py | Python | MinecraftDataHelper/Recipes.py | DancingSnow0517/MinecraftDataHelper | a89a48d246b092fe4f47c1cf849f8decb13f3303 | [
"MIT"
] | 1 | 2021-10-30T04:29:21.000Z | 2021-10-30T04:29:21.000Z | MinecraftDataHelper/Recipes.py | DancingSnow0517/MinecraftDataHelper | a89a48d246b092fe4f47c1cf849f8decb13f3303 | [
"MIT"
] | null | null | null | MinecraftDataHelper/Recipes.py | DancingSnow0517/MinecraftDataHelper | a89a48d246b092fe4f47c1cf849f8decb13f3303 | [
"MIT"
] | null | null | null | import os
import json
from MinecraftDataHelper.items import Item
from MinecraftDataHelper.tags import Tag
class allRecipes:
def __init__(self, namespace='gen'):
self.namespace = namespace
self.StoneCutting = StoneCutting(namespace)
self.Smoking = Smoking(namespace)
self.Smelting = Smelting(namespace)
self.Smithing = Smithing(namespace)
self.Campfire = Campfire(namespace)
self.Blasting = Blasting(namespace)
self.CraftingShapeless = CraftingShapeless(namespace)
self.CraftingShaped = CraftingShaped(namespace)
class StoneCutting:
def __init__(self, namespace='gen'):
self.namespace = namespace
self.js = {
"type": "minecraft:stonecutting",
"ingredient": [],
"count": 1,
"result": ''
}
def ingredient(self, s):
if len(self.js["ingredient"]) == 1:
raise Exception('ingredients最多 1 个物品')
if isinstance(s, Item):
self.js["ingredient"].append({"item": s.__str__()})
else:
raise Exception('不能使用非Item对象')
return self
def count(self, count):
if count <= 0 or count > 64:
raise Exception(f'物品数量必须为 1-64 的整数, 你的值 {count}')
else:
self.js["count"] = count
return self
def result(self, x):
if isinstance(x, Item):
self.js["result"] = x.__str__()
return self
def build(self, path):
if not os.path.exists(f'data/{self.namespace}/recipes/'):
os.makedirs(f'data/{self.namespace}/recipes/')
with open(f'data/{self.namespace}/recipes/{path}.json', 'w') as f:
json.dump(self.js, f, indent=4)
self.js = {
"type": "minecraft:stonecutting",
"ingredient": [],
"count": 1,
"result": ''
}
return
class Smoking:
def __init__(self, namespace='gen'):
self.namespace = namespace
self.js = {
"type": "smoking",
"ingredient": [],
"cookingtime": 100,
"experience": 0,
"result": ''
}
def ingredient(self, s):
if len(self.js["ingredient"]) == 1:
raise Exception('ingredients最多 1 个物品')
if isinstance(s, Tag):
self.js["ingredient"].append({"tag": s.__str__()})
elif isinstance(s, Item):
self.js["ingredient"].append({"item": s.__str__()})
else:
raise Exception('不能使用非Tag/Item对象')
return self
def cookingtime(self, time):
if isinstance(time, int) and time > 0:
self.js["cookingtime"] = time
else:
raise Exception(f'cookingtime 必须为大于 0 的整数,得到了 {time}')
return self
def experience(self, exp):
if isinstance(exp, int) and exp >= 0:
self.js["experience"] = exp
else:
raise Exception(f'experience 必须为大于等于 0 的整数,得到了 {exp}')
return self
def result(self, x):
if isinstance(x, Item):
self.js["result"] = x.__str__()
return self
def build(self, path):
if not os.path.exists(f'data/{self.namespace}/recipes/'):
os.makedirs(f'data/{self.namespace}/recipes/')
with open(f'data/{self.namespace}/recipes/{path}.json', 'w') as f:
json.dump(self.js, f, indent=4)
self.js = {
"type": "smoking",
"ingredient": [],
"cookingtime": 100,
"experience": 0,
"result": ''
}
return
class Smithing:
def __init__(self, namespace='gen'):
self.namespace = namespace
self.js = {
"type": "smithing",
"base": {},
"addition": {},
"result": {}
}
def base(self, s):
if isinstance(s, Tag):
self.js["base"]["tag"] = s.__str__()
elif isinstance(s, Item):
self.js["base"]["item"] = s.__str__()
else:
raise Exception('不能使用非Tag/Item对象')
return self
def addition(self, s):
if isinstance(s, Tag):
self.js["addition"]["tag"] = s.__str__()
elif isinstance(s, Item):
self.js["addition"]["item"] = s.__str__()
else:
raise Exception('不能使用非Tag/Item对象')
return self
def result(self, x):
if isinstance(x, Item):
self.js["result"]["item"] = x.__str__()
return self
def build(self, path):
if not os.path.exists(f'data/{self.namespace}/recipes/'):
os.makedirs(f'data/{self.namespace}/recipes/')
with open(f'data/{self.namespace}/recipes/{path}.json', 'w') as f:
json.dump(self.js, f, indent=4)
self.js = {
"type": "smithing",
"base": {},
"addition": {},
"result": {}
}
return
class Smelting:
def __init__(self, namespace='gen'):
self.namespace = namespace
self.js = {
"type": "smelting",
"ingredient": [],
"cookingtime": 100,
"experience": 0,
"result": ''
}
def ingredient(self, s):
if len(self.js["ingredient"]) == 1:
raise Exception('ingredients最多 1 个物品')
if isinstance(s, Tag):
self.js["ingredient"].append({"tag": s.__str__()})
elif isinstance(s, Item):
self.js["ingredient"].append({"item": s.__str__()})
else:
raise Exception('不能使用非Tag/Item对象')
return self
def cookingtime(self, time):
if isinstance(time, int) and time > 0:
self.js["cookingtime"] = time
else:
raise Exception(f'cookingtime 必须为大于 0 的整数,得到了 {time}')
return self
def experience(self, exp):
if isinstance(exp, int) and exp >= 0:
self.js["experience"] = exp
else:
raise Exception(f'experience 必须为大于等于 0 的整数,得到了 {exp}')
return self
def result(self, x):
if isinstance(x, Item):
self.js["result"] = x.__str__()
return self
def build(self, path):
if not os.path.exists(f'data/{self.namespace}/recipes/'):
os.makedirs(f'data/{self.namespace}/recipes/')
with open(f'data/{self.namespace}/recipes/{path}.json', 'w') as f:
json.dump(self.js, f, indent=4)
self.js = {
"type": "smelting",
"ingredient": [],
"cookingtime": 100,
"experience": 0,
"result": ''
}
return
class Campfire:
def __init__(self, namespace='gen'):
self.namespace = namespace
self.js = {
"type": "minecraft:campfire_cooking",
"ingredient": [],
"cookingtime": 100,
"experience": 0,
"result": ''
}
def ingredient(self, s):
if len(self.js["ingredient"]) == 1:
raise Exception('ingredients最多 1 个物品')
if isinstance(s, Tag):
self.js["ingredient"].append({"tag": s.__str__()})
elif isinstance(s, Item):
self.js["ingredient"].append({"item": s.__str__()})
else:
raise Exception('不能使用非Tag/Item对象')
return self
def cookingtime(self, time):
if isinstance(time, int) and time > 0:
self.js["cookingtime"] = time
else:
raise Exception(f'cookingtime 必须为大于 0 的整数,得到了 {time}')
return self
def experience(self, exp):
if isinstance(exp, int) and exp >= 0:
self.js["experience"] = exp
else:
raise Exception(f'experience 必须为大于等于 0 的整数,得到了 {exp}')
return self
def result(self, x):
if isinstance(x, Item):
self.js["result"] = x.__str__()
return self
def build(self, path):
if not os.path.exists(f'data/{self.namespace}/recipes/'):
os.makedirs(f'data/{self.namespace}/recipes/')
with open(f'data/{self.namespace}/recipes/{path}.json', 'w') as f:
json.dump(self.js, f, indent=4)
self.js = {
"type": "minecraft:campfire_cooking",
"ingredient": [],
"cookingtime": 100,
"experience": 0,
"result": ''
}
return
class Blasting:
def __init__(self, namespace='gen'):
self.namespace = namespace
self.js = {
"type": "minecraft:blasting",
"ingredient": [],
"cookingtime": 100,
"experience": 0,
"result": ''
}
def ingredient(self, s):
if len(self.js["ingredient"]) == 1:
raise Exception('ingredients最多 1 个物品')
if isinstance(s, Tag):
self.js["ingredient"].append({"tag": s.__str__()})
elif isinstance(s, Item):
self.js["ingredient"].append({"item": s.__str__()})
else:
raise Exception('不能使用非Tag/Item对象')
return self
def cookingtime(self, time):
if isinstance(time, int) and time > 0:
self.js["cookingtime"] = time
else:
raise Exception(f'cookingtime 必须为大于 0 的整数,得到了 {time}')
return self
def experience(self, exp):
if isinstance(exp, int) and exp >= 0:
self.js["experience"] = exp
else:
raise Exception(f'experience 必须为大于等于 0 的整数,得到了 {exp}')
return self
def result(self, x):
if isinstance(x, Item):
self.js["result"] = x.__str__()
return self
def build(self, path):
if not os.path.exists(f'data/{self.namespace}/recipes/'):
os.makedirs(f'data/{self.namespace}/recipes/')
with open(f'data/{self.namespace}/recipes/{path}.json', 'w') as f:
json.dump(self.js, f, indent=4)
self.js = {
"type": "minecraft:blasting",
"ingredient": [],
"cookingtime": 100,
"experience": 0,
"result": ''
}
return
class CraftingShapeless:
def __init__(self, namespace='gen'):
self.namespace = namespace
self.js = {
"type": "minecraft:crafting_shapeless",
"ingredients": [],
"result": {}
}
def ingredients(self, s):
if len(self.js["ingredients"]) >= 9:
raise Exception('ingredients最多 9 个物品')
if isinstance(s, Tag):
self.js["ingredients"].append({"tag": s.__str__()})
elif isinstance(s, Item):
self.js["ingredients"].append({"item": s.__str__()})
else:
raise Exception('不能使用非Tag/Item对象')
return self
def result(self, x, count=1):
if isinstance(x, Item):
self.js["result"]["item"] = x.__str__()
self.js["result"]["count"] = count
return self
def build(self, path):
if not os.path.exists(f'data/{self.namespace}/recipes/'):
os.makedirs(f'data/{self.namespace}/recipes/')
with open(f'data/{self.namespace}/recipes/{path}.json', 'w') as f:
json.dump(self.js, f, indent=4)
self.js = {
"type": "minecraft:crafting_shapeless",
"ingredients": [],
"result": {}
}
return
class CraftingShaped:
def __init__(self, namespace='gen'):
self.namespace = namespace
self.js = {
"type": "minecraft:crafting_shaped",
"pattern": [],
"key": {},
"result": {}
}
def pattern(self, s):
self.js["pattern"].append(s)
return self
def key(self, k, x):
self.js["key"][k] = {}
if isinstance(x, Tag):
self.js["key"][k]["tag"] = x.__str__()
elif isinstance(x, Item):
self.js["key"][k]["item"] = x.__str__()
return self
def result(self, x, count=1):
if count <= 0 or count > 64:
raise Exception(f'物品数量必须为 1-64 的整数, 你的值 {count}')
if isinstance(x, Item):
self.js["result"]["item"] = x.__str__()
self.js["result"]["count"] = count
return self
def build(self, path):
if not os.path.exists(f'data/{self.namespace}/recipes/'):
os.makedirs(f'data/{self.namespace}/recipes/')
with open(f'data/{self.namespace}/recipes/{path}.json', 'w') as f:
json.dump(self.js, f, indent=4)
self.js = {
"type": "minecraft:crafting_shaped",
"pattern": [],
"key": {},
"result": {}
}
return
| 31.284689 | 75 | 0.499962 | 1,368 | 13,077 | 4.675439 | 0.065789 | 0.06379 | 0.054878 | 0.067542 | 0.879925 | 0.875078 | 0.871326 | 0.859287 | 0.835835 | 0.795966 | 0 | 0.009963 | 0.35528 | 13,077 | 417 | 76 | 31.359712 | 0.748666 | 0 | 0 | 0.834711 | 0 | 0 | 0.208136 | 0.079779 | 0 | 0 | 0 | 0 | 0 | 1 | 0.121212 | false | 0 | 0.011019 | 0 | 0.253444 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.