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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
993b2232d8d8547fe6dd26d247853e7afaf38dbc | 130 | py | Python | modestga/benchmark/functions/__init__.py | krzysztofarendt/modestga | b4a884028d7cd6ad61fa5362a8be3a08b355918c | [
"BSD-2-Clause"
] | 7 | 2018-07-22T14:45:54.000Z | 2021-01-08T14:15:04.000Z | modestga/benchmark/functions/__init__.py | krzysztofarendt/modestga | b4a884028d7cd6ad61fa5362a8be3a08b355918c | [
"BSD-2-Clause"
] | 25 | 2018-06-04T18:35:33.000Z | 2022-03-12T01:03:00.000Z | modestga/benchmark/functions/__init__.py | krzysztofarendt/modestga | b4a884028d7cd6ad61fa5362a8be3a08b355918c | [
"BSD-2-Clause"
] | 1 | 2021-03-25T03:40:52.000Z | 2021-03-25T03:40:52.000Z | from modestga.benchmark.functions.rastrigin import rastrigin
from modestga.benchmark.functions.rastrigin import rastrigin_delayed
| 43.333333 | 68 | 0.892308 | 15 | 130 | 7.666667 | 0.466667 | 0.208696 | 0.365217 | 0.521739 | 0.93913 | 0.93913 | 0.93913 | 0 | 0 | 0 | 0 | 0 | 0.061538 | 130 | 2 | 69 | 65 | 0.942623 | 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 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 10 |
99a213ab8fe0aedd6db2a6512233eb68327215ed | 349 | py | Python | tests/internal/instance_type/test_instance_type_t2_auto.py | frolovv/aws.ec2.compare | 582805823492f833d65c0441c4a14dce697c12aa | [
"Apache-2.0"
] | null | null | null | tests/internal/instance_type/test_instance_type_t2_auto.py | frolovv/aws.ec2.compare | 582805823492f833d65c0441c4a14dce697c12aa | [
"Apache-2.0"
] | null | null | null | tests/internal/instance_type/test_instance_type_t2_auto.py | frolovv/aws.ec2.compare | 582805823492f833d65c0441c4a14dce697c12aa | [
"Apache-2.0"
] | 1 | 2021-12-15T11:58:22.000Z | 2021-12-15T11:58:22.000Z |
# Testing module instance_type.t2
import pytest
import ec2_compare.internal.instance_type.t2
def test_get_internal_data_instance_type_t2_get_instances_list():
assert len(ec2_compare.internal.instance_type.t2.get_instances_list()) > 0
def test_get_internal_data_instance_type_t2_get():
assert len(ec2_compare.internal.instance_type.t2.get) > 0
| 34.9 | 76 | 0.848138 | 56 | 349 | 4.839286 | 0.339286 | 0.265683 | 0.309963 | 0.250923 | 0.826568 | 0.826568 | 0.612546 | 0.612546 | 0.612546 | 0 | 0 | 0.034056 | 0.074499 | 349 | 9 | 77 | 38.777778 | 0.804954 | 0.088825 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.333333 | 1 | 0.333333 | true | 0 | 0.333333 | 0 | 0.666667 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 10 |
511ec8e5c6f999696ba2925daf40e10cf548f4f0 | 9,577 | py | Python | conda_kapsel/internal/test/test_ziputils.py | LaudateCorpus1/kapsel | 736b95d4ef81121bfeb965b989f7c159cf470386 | [
"BSD-3-Clause"
] | 43 | 2016-07-13T19:05:06.000Z | 2021-02-18T08:17:52.000Z | conda_kapsel/internal/test/test_ziputils.py | conda-archive/kapsel | 736b95d4ef81121bfeb965b989f7c159cf470386 | [
"BSD-3-Clause"
] | 13 | 2016-08-04T18:42:27.000Z | 2017-02-21T01:07:03.000Z | conda_kapsel/internal/test/test_ziputils.py | conda-archive/kapsel | 736b95d4ef81121bfeb965b989f7c159cf470386 | [
"BSD-3-Clause"
] | 10 | 2016-07-27T00:40:52.000Z | 2021-08-23T05:42:23.000Z | # -*- coding: utf-8 -*-
# ----------------------------------------------------------------------------
# Copyright © 2016, Continuum Analytics, Inc. All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
# ----------------------------------------------------------------------------
from __future__ import absolute_import, print_function
import codecs
import os
from conda_kapsel.internal.ziputils import unpack_zip
from conda_kapsel.internal.test.tmpfile_utils import (with_directory_contents, with_tmp_zipfile)
def test_unzip_single_file_different_name():
def do_test(zipname, workingdir):
target_path = os.path.join(workingdir, 'boo') # different name from what's in the zip
errors = []
unpack_zip(zipname, target_path, errors)
assert [] == errors
assert os.path.isdir(target_path)
assert codecs.open(os.path.join(target_path, 'foo'), 'r', 'utf-8').read() == "hello world\n"
with_tmp_zipfile(dict(foo="hello world\n"), do_test)
def test_unzip_single_file_same_name():
def do_test(zipname, workingdir):
target_path = os.path.join(workingdir, 'foo') # same name as what's in the zip
errors = []
unpack_zip(zipname, target_path, errors)
assert [] == errors
assert os.path.isfile(target_path)
assert codecs.open(target_path, 'r', 'utf-8').read() == "hello world\n"
with_tmp_zipfile(dict(foo="hello world\n"), do_test)
def test_unzip_two_files():
def do_test(zipname, workingdir):
target_path = os.path.join(workingdir, 'boo')
errors = []
unpack_zip(zipname, target_path, errors)
assert [] == errors
assert os.path.isdir(target_path)
assert codecs.open(os.path.join(target_path, 'foo'), 'r', 'utf-8').read() == "hello world\n"
assert codecs.open(os.path.join(target_path, 'bar'), 'r', 'utf-8').read() == "goodbye world\n"
with_tmp_zipfile(dict(foo="hello world\n", bar="goodbye world\n"), do_test)
def test_unzip_one_directory_different_name():
def do_test(zipname, workingdir):
target_path = os.path.join(workingdir, 'boo') # different name from what's in the zip
errors = []
unpack_zip(zipname, target_path, errors)
assert [] == errors
assert os.path.isdir(target_path)
assert os.path.isdir(os.path.join(target_path, 'foo'))
assert codecs.open(os.path.join(target_path, 'foo', 'bar'), 'r', 'utf-8').read() == "hello world\n"
with_tmp_zipfile({'foo/bar': "hello world\n"}, do_test)
def test_unzip_one_directory_same_name():
def do_test(zipname, workingdir):
target_path = os.path.join(workingdir, 'foo') # same name as what's in the zip
errors = []
unpack_zip(zipname, target_path, errors)
assert [] == errors
assert os.path.isdir(target_path)
assert codecs.open(os.path.join(target_path, 'bar'), 'r', 'utf-8').read() == "hello world\n"
with_tmp_zipfile({'foo/bar': "hello world\n"}, do_test)
def test_unzip_empty_zip():
def do_test(zipname, workingdir):
target_path = os.path.join(workingdir, 'boo')
errors = []
unpack_zip(zipname, target_path, errors)
assert ['Zip archive was empty.'] == errors
assert not os.path.isdir(target_path)
with_tmp_zipfile(dict(), do_test)
# we do rename directories over directories
def test_unzip_target_already_exists_and_is_directory():
def do_test(zipname, workingdir):
target_path = os.path.join(workingdir, 'boo')
os.makedirs(target_path)
errors = []
unpack_zip(zipname, target_path, errors)
assert [] == errors
assert os.path.isdir(target_path)
assert codecs.open(os.path.join(target_path, 'foo'), 'r', 'utf-8').read() == "hello world\n"
assert codecs.open(os.path.join(target_path, 'bar'), 'r', 'utf-8').read() == "goodbye world\n"
with_tmp_zipfile(dict(foo="hello world\n", bar="goodbye world\n"), do_test)
# we do rename directories over directories even if the dir is inside the zip
def test_unzip_target_already_exists_and_is_directory_and_single_dir_in_zip():
def do_test(zipname, workingdir):
target_path = os.path.join(workingdir, 'boo') # different name from dir in zip
os.makedirs(target_path)
errors = []
unpack_zip(zipname, target_path, errors)
assert [] == errors
assert os.path.isdir(target_path)
assert os.path.isdir(os.path.join(target_path, 'foo'))
assert codecs.open(os.path.join(target_path, 'foo', 'bar'), 'r', 'utf-8').read() == "hello world\n"
with_tmp_zipfile({'foo/bar': "hello world\n"}, do_test)
# we do rename directories over directories even if we strip the toplevel dir from the zip
def test_unzip_target_already_exists_and_is_directory_and_single_dir_in_zip_same_name():
def do_test(zipname, workingdir):
target_path = os.path.join(workingdir, 'foo') # same name as dir in zip
os.makedirs(target_path)
errors = []
unpack_zip(zipname, target_path, errors)
assert [] == errors
assert os.path.isdir(target_path)
assert codecs.open(os.path.join(target_path, 'bar'), 'r', 'utf-8').read() == "hello world\n"
with_tmp_zipfile({'foo/bar': "hello world\n"}, do_test)
# we don't rename a file over a directory when we discard the zip's dir due to same name
def test_unzip_target_already_exists_and_is_directory_and_single_file_in_zip_same_name():
def do_test(zipname, workingdir):
target_path = os.path.join(workingdir, 'foo') # same name as file in zip
os.makedirs(target_path)
errors = []
unpack_zip(zipname, target_path, errors)
assert os.path.isdir(target_path)
assert ["%s exists and is a directory, not unzipping a plain file over it." % target_path] == errors
with_tmp_zipfile(dict(foo="hello world\n"), do_test)
# we do rename a directory over a directory if we keep the dir since the file has a different name
def test_unzip_target_already_exists_and_is_directory_and_single_file_in_zip_different_name():
def do_test(zipname, workingdir):
target_path = os.path.join(workingdir, 'boo') # different name from file in zip
os.makedirs(target_path)
errors = []
unpack_zip(zipname, target_path, errors)
assert [] == errors
assert os.path.isdir(target_path)
assert codecs.open(os.path.join(target_path, 'foo'), 'r', 'utf-8').read() == "hello world\n"
with_tmp_zipfile(dict(foo="hello world\n"), do_test)
# we don't rename directories over files even if the dirs are inside the zip
def test_unzip_target_already_exists_and_is_file_and_single_dir_in_zip():
def do_test(zipname, workingdir):
target_path = os.path.join(workingdir, 'boo') # different name so we should keep "foo"
with codecs.open(target_path, 'w', 'utf-8') as f:
f.write("\n")
errors = []
unpack_zip(zipname, target_path, errors)
assert os.path.isfile(target_path)
assert [("%s exists and isn't a directory, not unzipping a directory over it." % target_path)] == errors
with_tmp_zipfile({'foo/bar': "hello world\n"}, do_test)
# we don't rename directories over files if the zip has no root dir
def test_unzip_target_already_exists_and_is_file():
def do_test(zipname, workingdir):
target_path = os.path.join(workingdir, 'boo')
with codecs.open(target_path, 'w', 'utf-8') as f:
f.write("\n")
errors = []
unpack_zip(zipname, target_path, errors)
assert [("%s exists and isn't a directory, not unzipping a directory over it." % target_path)] == errors
with_tmp_zipfile(dict(foo="hello world\n", bar="goodbye world\n"), do_test)
# we do rename files over files if they have the same name
def test_unzip_target_already_exists_and_is_file_and_single_file_in_zip_same_name():
def do_test(zipname, workingdir):
target_path = os.path.join(workingdir, 'foo') # same name
with codecs.open(target_path, 'w', 'utf-8') as f:
f.write("\n")
errors = []
unpack_zip(zipname, target_path, errors)
assert [] == errors
assert os.path.isfile(target_path)
assert codecs.open(target_path, 'r', 'utf-8').read() == "hello world\n"
with_tmp_zipfile(dict(foo="hello world\n"), do_test)
# we don't rename files over files if the name is different
def test_unzip_target_already_exists_and_is_file_and_single_file_in_zip_different_name():
def do_test(zipname, workingdir):
target_path = os.path.join(workingdir, 'boo') # different from the file in the zip
with codecs.open(target_path, 'w', 'utf-8') as f:
f.write("original\n")
errors = []
unpack_zip(zipname, target_path, errors)
assert [("%s exists and isn't a directory, not unzipping a directory over it." % target_path)] == errors
assert os.path.isfile(target_path)
assert codecs.open(target_path, 'r', 'utf-8').read() == "original\n"
with_tmp_zipfile(dict(foo="hello world\n"), do_test)
def test_unzip_bad_zipfile():
def do_test(workingdir):
zipname = os.path.join(workingdir, 'foo')
target_path = os.path.join(workingdir, 'boo')
errors = []
unpack_zip(zipname, target_path, errors)
assert [('Failed to unzip %s: File is not a zip file' % zipname)] == errors
with_directory_contents(dict(foo="not a zip file\n"), do_test)
| 42.376106 | 112 | 0.66075 | 1,389 | 9,577 | 4.336933 | 0.088553 | 0.122842 | 0.048141 | 0.056441 | 0.871514 | 0.849768 | 0.848108 | 0.848108 | 0.836321 | 0.816235 | 0 | 0.002876 | 0.201316 | 9,577 | 225 | 113 | 42.564444 | 0.784547 | 0.135533 | 0 | 0.80625 | 0 | 0 | 0.11985 | 0 | 0 | 0 | 0 | 0 | 0.28125 | 1 | 0.2 | false | 0 | 0.03125 | 0 | 0.23125 | 0.00625 | 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 |
5154ec1a43449777d00578a8fe018497a4133e94 | 11,742 | py | Python | dirigible/sheet/tests/utils/test_cell_name_utils.py | EnoX1/dirigible-spreadsheet | 9a3289c67a93c40190565ad5a555710c50c5f958 | [
"MIT"
] | 168 | 2015-01-03T02:09:30.000Z | 2022-03-31T22:28:00.000Z | dirigible/sheet/tests/utils/test_cell_name_utils.py | EnoX1/dirigible-spreadsheet | 9a3289c67a93c40190565ad5a555710c50c5f958 | [
"MIT"
] | 4 | 2017-03-14T20:49:49.000Z | 2020-04-02T16:13:00.000Z | dirigible/sheet/tests/utils/test_cell_name_utils.py | EnoX1/dirigible-spreadsheet | 9a3289c67a93c40190565ad5a555710c50c5f958 | [
"MIT"
] | 46 | 2015-01-18T04:39:24.000Z | 2022-02-17T22:33:05.000Z | # Copyright (c) 2005-2010 Resolver Systems Ltd, PythonAnywhere LLP
# See LICENSE.md
#
try:
import unittest2 as unittest
except ImportError:
import unittest
import sys
from sheet.utils.cell_name_utils import (
cell_name_to_coordinates, cell_range_as_string_to_coordinates,
cell_ref_as_string_to_coordinates, _col_row_names_to_coordinates,
column_index_to_name, column_name_to_index, coordinates_to_cell_name,
MAX_COL)
class CellNameUtilsTest(unittest.TestCase):
def testColumnNameTo(self):
"test column_name_to_index"
self.assertEquals(column_name_to_index("A"), 1, "incorrect conversion" )
self.assertEquals(column_name_to_index("S"), 19, "incorrect conversion" )
self.assertEquals(column_name_to_index("Z"), 26, "incorrect conversion" )
self.assertEquals(column_name_to_index("AA"), 27, "incorrect conversion" )
self.assertEquals(column_name_to_index("aa"), 27, "incorrect conversion" )
self.assertEquals(column_name_to_index("AZ"), 52, "incorrect conversion" )
self.assertEquals(column_name_to_index("aZ"), 52, "incorrect conversion" )
self.assertEquals(column_name_to_index("BA"), 53, "incorrect conversion" )
self.assertEquals(column_name_to_index("Ba"), 53, "incorrect conversion" )
self.assertEquals(column_name_to_index("mjJ"), 9058, "incorrect conversion" )
self.assertEquals(column_name_to_index("MJJ"), 9058, "incorrect conversion" )
self.assertEquals(column_name_to_index("ZZZ"), 18278, "incorrect conversion")
self.assertIsNone(column_name_to_index("AAAA"), "invalid column not None")
self.assertIsNone(column_name_to_index("HELLO3"), "invalid column not None")
self.assertIsNone(column_name_to_index("SHEET"), "invalid column not None")
self.assertIsNone(column_name_to_index("@"), "invalid column not None")
self.assertIsNone(column_name_to_index("33"), "invalid column not None")
self.assertIsNone(column_name_to_index("FXSHRXX"), "invalid column not None (column too large for 32 bit int)")
def testColumnIndexTo(self):
"test column_index_to_name"
self.assertEquals(column_index_to_name(1), "A", "incorrect conversion")
self.assertEquals(column_index_to_name(19), "S", "incorrect conversion")
self.assertEquals(column_index_to_name(26), "Z", "incorrect conversion")
self.assertEquals(column_index_to_name(27), "AA", "incorrect conversion")
self.assertEquals(column_index_to_name(52), "AZ", "incorrect conversion")
self.assertEquals(column_index_to_name(9058), "MJJ", "incorrect conversion")
self.assertEquals(column_index_to_name(18278), "ZZZ", "incorrect conversion")
self.assertIsNone(column_index_to_name(18279), "invalid column not None")
self.assertIsNone(column_index_to_name(8826682), "invalid column not None")
self.assertIsNone(column_index_to_name(sys.maxint+1), "column too large for 32 bit int not None")
def testColRowNames(self):
"test col row names to coordinates"
self.assertEquals(_col_row_names_to_coordinates("A", "1"), (1, 1), "To coordinates test 1 failed")
self.assertEquals(_col_row_names_to_coordinates("B", "1"), (2, 1), "To coordinates test 2 failed")
self.assertEquals(_col_row_names_to_coordinates("C", "5"), (3, 5), "To coordinates test 3 failed")
self.assertEquals(_col_row_names_to_coordinates("aC", "100"), (29, 100), "To coordinates test 4 failed")
self.assertIsNone(_col_row_names_to_coordinates("A", None), "Invalid coordinates")
self.assertIsNone(_col_row_names_to_coordinates("FXSHRXX", None), "Invalid coordinates")
self.assertIsNone(_col_row_names_to_coordinates(None, None), "Invalid coordinates")
def testCoordinatesToCell(self):
"test coordinates_to_cell_name"
self.assertEquals(coordinates_to_cell_name(1, 1), "A1", "To name test 1 failed")
self.assertEquals(coordinates_to_cell_name(2, 1), "B1", "To name test 2 failed")
self.assertEquals(coordinates_to_cell_name(3, 5), "C5", "To name test 3 failed")
self.assertEquals(coordinates_to_cell_name(29, 100), "AC100", "To name test 4 failed")
self.assertEquals(coordinates_to_cell_name(13057, 1), "SHE1", "To name test 4 failed")
def testCoordinatesToCell2(self):
"test coordinates_to_cell_name with absolution"
self.assertEquals(coordinates_to_cell_name(1, 1, colAbsolute=True), "$A1", "To name test 1 failed")
self.assertEquals(coordinates_to_cell_name(2, 1, rowAbsolute=True), "B$1", "To name test 2 failed")
self.assertEquals(coordinates_to_cell_name(3, 5, colAbsolute=True, rowAbsolute=True), "$C$5",
"To name test 3 failed")
def test_coordinates_to_cell_name_bad(self):
self.assertIsNone(coordinates_to_cell_name(0, 1), "bad")
self.assertIsNone(coordinates_to_cell_name(1, 0), "bad")
self.assertIsNone(coordinates_to_cell_name(0, 0), "bad")
self.assertIsNone(coordinates_to_cell_name(1, -1), "bad")
self.assertIsNone(coordinates_to_cell_name(-1, 1), "bad")
self.assertIsNone(coordinates_to_cell_name(MAX_COL + 1, 1), "bad")
def testCellNameTo(self):
"test cell_name_to_coordinates"
self.assertEquals(cell_name_to_coordinates("A1"), (1, 1), "To coordinates test 1 failed")
self.assertEquals(cell_name_to_coordinates("b1"), (2, 1), "To coordinates test 2 failed")
self.assertEquals(cell_name_to_coordinates("C5"), (3, 5), "To coordinates test 3 failed")
self.assertEquals(cell_name_to_coordinates("ac100"), (29, 100), "To coordinates test 4 failed")
self.assertEquals(cell_name_to_coordinates("A1 "), (1, 1), "To coordinates test 5 failed")
self.assertEquals(cell_name_to_coordinates("She1"), (13057, 1), "To coordinates test 5 failed")
self.assertIsNone(cell_name_to_coordinates("56G"), "To coordinates test 5 failed")
self.assertIsNone(cell_name_to_coordinates("YTGDCJK"), "To coordinates test 6 failed")
self.assertIsNone(cell_name_to_coordinates("54688"), "To coordinates test 7 failed")
self.assertIsNone(cell_name_to_coordinates(""), "To coordinates test 8 failed")
self.assertIsNone(cell_name_to_coordinates("W0mbat"), "To coordinates test 9 failed")
self.assertIsNone(cell_name_to_coordinates(" "), "To coordinates test 10 failed")
self.assertIsNone(cell_name_to_coordinates(";-)"), "To coordinates test 11 failed")
self.assertIsNone(cell_name_to_coordinates(None), "To coordinates test 12 failed")
self.assertIsNone(cell_name_to_coordinates("FXSHRXX1"), "Invalid column name")
self.assertIsNone(cell_name_to_coordinates("A9223372036854775808"), "Invalid row number")
def testAbsoluteCellName(self):
"test absolute cell_name_to_coordinates"
self.assertEquals(cell_name_to_coordinates("$A1"), (1, 1), "To coordinates test 1 failed")
self.assertEquals(cell_name_to_coordinates("A$1"), (1, 1), "To coordinates test 1 failed")
self.assertEquals(cell_name_to_coordinates("$A$1"), (1, 1), "To coordinates test 1 failed")
self.assertEquals(cell_name_to_coordinates("$b1"), (2, 1), "To coordinates test 2 failed")
self.assertEquals(cell_name_to_coordinates("b$1"), (2, 1), "To coordinates test 2 failed")
self.assertEquals(cell_name_to_coordinates("$b$1"), (2, 1), "To coordinates test 2 failed")
self.assertEquals(cell_name_to_coordinates("$C5"), (3, 5), "To coordinates test 3 failed")
self.assertEquals(cell_name_to_coordinates("C$5"), (3, 5), "To coordinates test 3 failed")
self.assertEquals(cell_name_to_coordinates("$C$5"), (3, 5), "To coordinates test 3 failed")
self.assertEquals(cell_name_to_coordinates("$ac100"), (29, 100), "To coordinates test 4 failed")
self.assertEquals(cell_name_to_coordinates("ac$100"), (29, 100), "To coordinates test 4 failed")
self.assertEquals(cell_name_to_coordinates("$ac$100"), (29, 100), "To coordinates test 4 failed")
self.assertEquals(cell_name_to_coordinates("$A1 "), (1, 1), "To coordinates test 5 failed")
self.assertEquals(cell_name_to_coordinates("A$1 "), (1, 1), "To coordinates test 5 failed")
self.assertEquals(cell_name_to_coordinates("$A$1 "), (1, 1), "To coordinates test 5 failed")
self.assertEquals(cell_name_to_coordinates("$She1"), (13057, 1), "To coordinates test 5 failed")
self.assertEquals(cell_name_to_coordinates("She$1"), (13057, 1), "To coordinates test 5 failed")
self.assertEquals(cell_name_to_coordinates("$She$1"), (13057, 1), "To coordinates test 5 failed")
self.assertIsNone(cell_name_to_coordinates("$56G"), "To coordinates test 5 failed")
self.assertIsNone(cell_name_to_coordinates("56$G"), "To coordinates test 5 failed")
self.assertIsNone(cell_name_to_coordinates("$56$G"), "To coordinates test 5 failed")
self.assertIsNone(cell_name_to_coordinates("$$A1"), "To coordinates test 6 failed")
self.assertIsNone(cell_name_to_coordinates("A$$1"), "To coordinates test 6 failed")
self.assertIsNone(cell_name_to_coordinates("$YTGDCJK"), "To coordinates test 6 failed")
self.assertIsNone(cell_name_to_coordinates("546$88"), "To coordinates test 7 failed")
self.assertIsNone(cell_name_to_coordinates(""), "To coordinates test 8 failed")
self.assertIsNone(cell_name_to_coordinates("W0m$bat"), "To coordinates test 9 failed")
self.assertIsNone(cell_name_to_coordinates(" $ "), "To coordinates test 10 failed")
self.assertIsNone(cell_name_to_coordinates(";-$)"), "To coordinates test 11 failed")
self.assertIsNone(cell_name_to_coordinates(None), "To coordinates test 12 failed")
self.assertIsNone(cell_name_to_coordinates("$FXSHRXX$1"), "Invalid column name")
self.assertIsNone(cell_name_to_coordinates("FXSHR$XX1"), "Invalid column name")
self.assertIsNone(cell_name_to_coordinates("A$9223372036854775808"), "Invalid row number")
def test_cell_ref_as_string_to_coordinates(self):
self.assertEquals(cell_ref_as_string_to_coordinates('1, 2'), (1, 2))
self.assertEquals(cell_ref_as_string_to_coordinates(' 10 , 2'), (10, 2))
self.assertEquals(cell_ref_as_string_to_coordinates('(1, 2)'), (1, 2))
self.assertEquals(cell_ref_as_string_to_coordinates(' (10 , 2)'), (10, 2))
self.assertEquals(cell_ref_as_string_to_coordinates('J11'), (10, 11))
self.assertIsNone(cell_ref_as_string_to_coordinates('J, 11'))
self.assertIsNone(cell_ref_as_string_to_coordinates('blurgle'))
def test_cell_range_as_string_to_coordinates(self):
self.assertEquals(cell_range_as_string_to_coordinates('A2:C4'), ((1, 2), (3, 4)))
self.assertEquals(cell_range_as_string_to_coordinates('AA10000:ZZ99999'),
((27, 10000), (26 * 27, 99999)) )
self.assertEquals(cell_range_as_string_to_coordinates('C4:A2'), ((3, 4), (1, 2)))
self.assertIsNone(cell_range_as_string_to_coordinates('A0:C4'))
self.assertIsNone(cell_range_as_string_to_coordinates('A2:C0'))
self.assertIsNone(cell_range_as_string_to_coordinates('A2::C4'))
self.assertIsNone(cell_range_as_string_to_coordinates(':A2:C4'))
self.assertIsNone(cell_range_as_string_to_coordinates('AA:C4:'))
self.assertIsNone(cell_range_as_string_to_coordinates('22:C4'))
self.assertIsNone(cell_range_as_string_to_coordinates('A2:CC'))
self.assertIsNone(cell_range_as_string_to_coordinates('A2:44'))
| 62.791444 | 119 | 0.712911 | 1,573 | 11,742 | 5.026701 | 0.092816 | 0.215379 | 0.065765 | 0.138105 | 0.879221 | 0.857847 | 0.820033 | 0.78968 | 0.687619 | 0.638042 | 0 | 0.046282 | 0.162749 | 11,742 | 186 | 120 | 63.129032 | 0.75801 | 0.026486 | 0 | 0.027397 | 0 | 0 | 0.258557 | 0.010037 | 0 | 0 | 0 | 0 | 0.794521 | 1 | 0.068493 | false | 0 | 0.034247 | 0 | 0.109589 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
5a903a23c5c4bb79477d19c13d2236a00bd52c0b | 281 | py | Python | dress/helper/command_mysql_helper.py | richard-ma/dress | 86e892673635319c0a1860edb33cdba7ed22a7fb | [
"MIT"
] | 2 | 2019-10-23T09:06:47.000Z | 2019-11-07T12:52:42.000Z | dress/helper/command_mysql_helper.py | richard-ma/dress | 86e892673635319c0a1860edb33cdba7ed22a7fb | [
"MIT"
] | 4 | 2017-12-28T01:44:42.000Z | 2017-12-31T13:08:18.000Z | dress/helper/command_mysql_helper.py | richard-ma/dress | 86e892673635319c0a1860edb33cdba7ed22a7fb | [
"MIT"
] | 2 | 2019-10-15T07:42:33.000Z | 2019-10-24T06:49:22.000Z | def command_mysql_helper(database_root_password, sql):
return "mysql -u root -p\'%s\' -e \"%s\"" % (database_root_password,
sql.replace('`', '\\`')
) # fix #1: 将sql语句换为双引号,转义`字符
| 56.2 | 79 | 0.423488 | 26 | 281 | 4.346154 | 0.730769 | 0.212389 | 0.353982 | 0.40708 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.006289 | 0.434164 | 281 | 4 | 80 | 70.25 | 0.704403 | 0.085409 | 0 | 0 | 0 | 0 | 0.122047 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0.5 | 0 | 0.25 | 0.5 | 0 | 1 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 |
5ad8808b0c1d9af4ca6128a56d8c51d4670902d5 | 48 | py | Python | src/amuse/community/mikkola/__init__.py | sibonyves/amuse | 5557bf88d14df1aa02133a199b6d60c0c57dcab7 | [
"Apache-2.0"
] | null | null | null | src/amuse/community/mikkola/__init__.py | sibonyves/amuse | 5557bf88d14df1aa02133a199b6d60c0c57dcab7 | [
"Apache-2.0"
] | 12 | 2021-11-15T09:13:03.000Z | 2022-02-02T14:53:04.000Z | src/amuse/community/mikkola/__init__.py | sibonyves/amuse | 5557bf88d14df1aa02133a199b6d60c0c57dcab7 | [
"Apache-2.0"
] | null | null | null | # generated file
from .interface import Mikkola
| 16 | 30 | 0.8125 | 6 | 48 | 6.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.145833 | 48 | 2 | 31 | 24 | 0.95122 | 0.291667 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 7 |
51a485c4ed9682b47c0b7bc1ca204ef2824dfed6 | 2,248 | py | Python | fetch-schematics.py | cmpute/hexo-minecraft-templates | b12b6bee34dc546337077a765b004d8b7689ef68 | [
"MIT"
] | 8 | 2017-11-09T07:12:19.000Z | 2021-08-23T13:49:59.000Z | fetch-schematics.py | cmpute/hexo-minecraft-templates | b12b6bee34dc546337077a765b004d8b7689ef68 | [
"MIT"
] | null | null | null | fetch-schematics.py | cmpute/hexo-minecraft-templates | b12b6bee34dc546337077a765b004d8b7689ef68 | [
"MIT"
] | null | null | null | import datetime
import json
import re, os
import requests
from bs4 import BeautifulSoup as bs
basic = requests.get('https://minecraft.gamepedia.com/api.php?action=parse&format=json'
'&prop=text%7Cmodules%7Cjsconfigvars&title=Template%3ASchematic'
'&text=%7B%7B%3ATemplate%3ASchematicSprite%2Fids-basic%7D%7D').json()
basic = bs(basic['parse']['text']['*'])
basic = basic.find_all(class_='schematic')
print("// Fetched time: ", datetime.datetime.now())
print("// Basic Identifiers")
for elem in basic:
loc = elem.contents[-1]['style']
name = elem.next_sibling
px = re.findall('(?<=-)[0-9]*(?=px)', loc)
# specific cases
if '?' in name:
name = '???, unknown' # there is invalid char in origin of this name
elemstr = ['"{name}" : [{x}, {y}],'.format(name=sname.lower().strip(),
x=int(int(px[0])/32), y=int(int(px[1])/32))\
for sname in name.split(', ')]
elemstr = ' '.join(elemstr)
if elem.previous_sibling is None:
parent = elem.find_parent('td')
elemstr += ' // ' + ''.join(parent.find_previous_sibling('td').findAll(text=True)).rstrip('\n')
print(elemstr)
basic = requests.get('https://minecraft.gamepedia.com/api.php?action=parse&format=json'
'&prop=text%7Cmodules%7Cjsconfigvars&title=Template%3ASchematic'
'&text=%7B%7B%3ATemplate%3ASchematicSprite%2Fids-redstone%7D%7D').json()
basic = bs(basic['parse']['text']['*'])
basic = basic.find_all(class_='schematic')
print("// Redstone Identifiers")
for elem in basic:
loc = elem.contents[-1]['style']
name = elem.next_sibling
name = re.sub(r' \([\W\w]+\)', '', name)
px = re.findall('(?<=-)[0-9]*(?=px)', loc)
elemstr = ['"{name}" : [{x}, {y}],'.format(name=sname.lower().strip(),
x=int(int(px[0])/32), y=int(int(px[1])/32))\
for sname in name.split(', ')]
elemstr = ' '.join(elemstr)
if elem.previous_sibling is None:
parent = elem.find_parent('td')
elemstr += ' // ' + ''.join(parent.find_previous_sibling('td').findAll(text=True)).rstrip('\n')
print(elemstr)
| 38.758621 | 103 | 0.578737 | 280 | 2,248 | 4.596429 | 0.317857 | 0.018648 | 0.024864 | 0.032634 | 0.826729 | 0.826729 | 0.826729 | 0.798757 | 0.798757 | 0.798757 | 0 | 0.022362 | 0.224199 | 2,248 | 57 | 104 | 39.438596 | 0.715596 | 0.026246 | 0 | 0.711111 | 0 | 0 | 0.279963 | 0.112077 | 0.044444 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.111111 | 0 | 0.111111 | 0.111111 | 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 |
51b243d0132e074759cf53c5a01fee0cb2366aee | 64,170 | py | Python | Brevet_US_4661747_Edwin_Gray_Power_Tube/Version_2/unit_tests.py | Jay4C/Python-Macros-For_FreeCAD | 12ce5441a26731377fa43e86ccd2be675740d3a0 | [
"MIT"
] | null | null | null | Brevet_US_4661747_Edwin_Gray_Power_Tube/Version_2/unit_tests.py | Jay4C/Python-Macros-For_FreeCAD | 12ce5441a26731377fa43e86ccd2be675740d3a0 | [
"MIT"
] | null | null | null | Brevet_US_4661747_Edwin_Gray_Power_Tube/Version_2/unit_tests.py | Jay4C/Python-Macros-For_FreeCAD | 12ce5441a26731377fa43e86ccd2be675740d3a0 | [
"MIT"
] | null | null | null | import os
import time
import unittest
import pywinauto.mouse
import pywinauto.keyboard
class UnitTestsEdwinGrayPowerTubeVersion2(unittest.TestCase):
# ok
def test_part_tank(self):
print("test_part_tank")
if os.path.exists("part_tank.py"):
os.remove("part_tank.py")
else:
print("The file does not exist")
# Writing to file
with open("part_tank.py", "w") as file:
# Writing data to a file
file.write("""import FreeCAD, Part, Drawing, math, Mesh
DOC = FreeCAD.activeDocument()
DOC_NAME = "part_tank"
def clear_doc():
# Clear the active document deleting all the objects
for obj in DOC.Objects:
DOC.removeObject(obj.Name)
def setview():
# Rearrange View
FreeCAD.Gui.SendMsgToActiveView("ViewFit")
FreeCAD.Gui.activeDocument().activeView().viewAxometric()
if DOC is None:
FreeCAD.newDocument(DOC_NAME)
FreeCAD.setActiveDocument(DOC_NAME)
DOC = FreeCAD.activeDocument()
else:
clear_doc()
# EPS= tolerance to use to cut the parts
EPS = 0.10
EPS_C = EPS * -0.5
hauteur_maximal = 960
# tank
tank = Part.makeCylinder(84.5/2, hauteur_maximal)
# Cylinder_1
cylinder_1 = Part.makeCylinder(84.5/2 - 2, hauteur_maximal)
# Tank cut by cylinder_1
cylinder_1_vector = FreeCAD.Vector(0, 0, 0)
cylinder_1.translate(cylinder_1_vector)
tank = tank.cut(cylinder_1)
Part.show(tank)
DOC.recompute()
__objs__ = []
__objs__.append(FreeCAD.getDocument("part_tank").getObject("Shape"))
stl_file = u"part_tank.stl"
Mesh.export(__objs__, stl_file)
setview()
# Generate PNG files
file = 'part_tank_v2_'
# Ombré
Gui.runCommand('Std_DrawStyle',5)
i = 1
Gui.activeDocument().activeView().viewIsometric()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewFront()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewTop()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRight()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRear()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewBottom()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewLeft()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
# Filaire
Gui.runCommand('Std_DrawStyle',2)
i += 1
Gui.activeDocument().activeView().viewIsometric()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewFront()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewTop()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRight()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRear()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewBottom()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewLeft()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
""")
time.sleep(3)
pywinauto.mouse.click(button="left", coords=(460, 750))
time.sleep(3)
pywinauto.mouse.click(button="left", coords=(70, 670))
time.sleep(3)
pywinauto.keyboard.send_keys(
'exec{(}open{(}"part_tank.py"{)}.read{(}{)}{)}'
)
time.sleep(3)
pywinauto.keyboard.send_keys('{ENTER}')
# ok
# https://www.visseriefixations.fr/tiges-filetees/acier-classe-4-6/tige-filetee-acier-4-6-brut-din-975/tige-filetee-m8-acier-4-6-brut-din-975.html
def test_part_tige_filetee_m8_1000l(self):
print("test_part_tige_filetee_m8_1000l")
if os.path.exists("part_tige_filetee_m8_1000l.py"):
os.remove("part_tige_filetee_m8_1000l.py")
else:
print("The file does not exist")
# Writing to file
with open("part_tige_filetee_m8_1000l.py", "w") as file:
# Writing data to a file
file.write("""import FreeCAD, Part, Drawing, math, Mesh
DOC = FreeCAD.activeDocument()
DOC_NAME = "part_tige_filetee_m8_1000l"
def clear_doc():
# Clear the active document deleting all the objects
for obj in DOC.Objects:
DOC.removeObject(obj.Name)
def setview():
# Rearrange View
FreeCAD.Gui.SendMsgToActiveView("ViewFit")
FreeCAD.Gui.activeDocument().activeView().viewAxometric()
if DOC is None:
FreeCAD.newDocument(DOC_NAME)
FreeCAD.setActiveDocument(DOC_NAME)
DOC = FreeCAD.activeDocument()
else:
clear_doc()
# EPS= tolerance to use to cut the parts
EPS = 0.10
EPS_C = EPS * -0.5
# tige_filetee_m8_l1000
tige_filetee_m8_l1000 = Part.makeCylinder(8/2, 1000)
Part.show(tige_filetee_m8_l1000)
DOC.recompute()
__objs__ = []
__objs__.append(FreeCAD.getDocument("part_tige_filetee_m8_1000l").getObject("Shape"))
stl_file = u"part_tige_filetee_m8_1000l.stl"
Mesh.export(__objs__, stl_file)
setview()
# Generate PNG files
file = 'part_tige_filetee_m8_1000l_v2_'
# Ombré
Gui.runCommand('Std_DrawStyle',5)
i = 1
Gui.activeDocument().activeView().viewIsometric()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewFront()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewTop()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRight()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRear()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewBottom()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewLeft()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
# Filaire
Gui.runCommand('Std_DrawStyle',2)
i += 1
Gui.activeDocument().activeView().viewIsometric()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewFront()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewTop()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRight()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRear()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewBottom()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewLeft()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
""")
time.sleep(3)
pywinauto.mouse.click(button="left", coords=(460, 750))
time.sleep(3)
pywinauto.mouse.click(button="left", coords=(70, 670))
time.sleep(3)
pywinauto.keyboard.send_keys(
'exec{(}open{(}"part_tige_filetee_m8_1000l.py"{)}.read{(}{)}{)}'
)
time.sleep(3)
pywinauto.keyboard.send_keys('{ENTER}')
# ok
# https://www.visseriefixations.fr/vis-a-tete-hexagonale/vis-a-tete-hexagonale-standard/acier-8-8-noir/th-acier-8-8-noir-filetage-total-din-933/th-m8x50-acier-8-8-noir-ef-din-933.html
def test_part_vis_metal_m8_50l(self):
print("test_part_vis_metal_m8_50l")
if os.path.exists("part_vis_metal_m8_50l.py"):
os.remove("part_vis_metal_m8_50l.py")
else:
print("The file does not exist")
# Writing to file
with open("part_vis_metal_m8_50l.py", "w") as file:
# Writing data to a file
file.write("""import FreeCAD, Part, Mesh
DOC = FreeCAD.activeDocument()
DOC_NAME = "part_vis_metal_m8_50l"
def clear_doc():
# Clear the active document deleting all the objects
for obj in DOC.Objects:
DOC.removeObject(obj.Name)
def setview():
# Rearrange View
FreeCAD.Gui.SendMsgToActiveView("ViewFit")
FreeCAD.Gui.activeDocument().activeView().viewAxometric()
if DOC is None:
FreeCAD.newDocument(DOC_NAME)
FreeCAD.setActiveDocument(DOC_NAME)
DOC = FreeCAD.activeDocument()
else:
clear_doc()
# EPS= tolerance to use to cut the parts
EPS = 0.10
EPS_C = EPS * -0.5
d1 = 8
L = 50
k = 5.30
e = 14.38
cylinder_1 = Part.makeCylinder(e/2, L + k)
cylinder_2 = Part.makeCylinder(d1/2, L)
cylinder_3 = Part.makeCylinder(e/2, L)
# cylinder_3 cut by cylinder_2
cylinder_3 = cylinder_3.cut(cylinder_2)
# cylinder_1 cut by cylinder_3
cylinder_3_vector = FreeCAD.Vector(0, 0, k)
cylinder_3.translate(cylinder_3_vector)
cylinder_1 = cylinder_1.cut(cylinder_3)
Part.show(cylinder_1)
DOC.recompute()
__objs__=[]
__objs__.append(FreeCAD.getDocument("part_vis_metal_m8_50l").getObject("Shape"))
stl_file = u"part_vis_metal_m8_50l.stl"
Mesh.export(__objs__, stl_file)
setview()
# Generate PNG files
file = 'part_vis_metal_m8_50l_v2_'
# Ombré
Gui.runCommand('Std_DrawStyle',5)
i = 1
Gui.activeDocument().activeView().viewIsometric()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewFront()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewTop()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRight()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRear()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewBottom()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewLeft()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
# Filaire
Gui.runCommand('Std_DrawStyle',2)
i += 1
Gui.activeDocument().activeView().viewIsometric()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewFront()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewTop()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRight()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRear()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewBottom()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewLeft()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
""")
time.sleep(3)
pywinauto.mouse.click(button="left", coords=(460, 750))
time.sleep(3)
pywinauto.mouse.click(button="left", coords=(70, 670))
time.sleep(3)
pywinauto.keyboard.send_keys(
'exec{(}open{(}"part_vis_metal_m8_50l.py"{)}.read{(}{)}{)}'
)
time.sleep(3)
pywinauto.keyboard.send_keys('{ENTER}')
# ok
# https://www.visseriefixations.fr/ecrous/ecrous-autofreines/ecrou-hexagonal-autofreine-nylstop/ecrou-nylstop-acier-zingue-blanc-din-985/ecrou-nylstop-m8-z-blanc-din-985.html
def test_part_ecrou_8m(self):
print("test_part_ecrou_8m")
if os.path.exists("part_ecrou_8m.py"):
os.remove("part_ecrou_8m.py")
else:
print("The file does not exist")
# Writing to file
with open("part_ecrou_8m.py", "w") as file:
# Writing data to a file
file.write("""import FreeCAD, Part, Mesh
DOC = FreeCAD.activeDocument()
DOC_NAME = "part_ecrou_8m"
def clear_doc():
# Clear the active document deleting all the objects
for obj in DOC.Objects:
DOC.removeObject(obj.Name)
def setview():
# Rearrange View
FreeCAD.Gui.SendMsgToActiveView("ViewFit")
FreeCAD.Gui.activeDocument().activeView().viewAxometric()
if DOC is None:
FreeCAD.newDocument(DOC_NAME)
FreeCAD.setActiveDocument(DOC_NAME)
DOC = FreeCAD.activeDocument()
else:
clear_doc()
# EPS= tolerance to use to cut the parts
EPS = 0.10
EPS_C = EPS * -0.5
d1 = 8
e = 14.38
h = 8
cylinder_1 = Part.makeCylinder(e/2, h)
cylinder_2 = Part.makeCylinder(d1/2, h)
cylinder_1 = cylinder_1.cut(cylinder_2)
Part.show(cylinder_1)
DOC.recompute()
__objs__=[]
__objs__.append(FreeCAD.getDocument("part_ecrou_8m").getObject("Shape"))
stl_file = u"part_ecrou_8m.stl"
Mesh.export(__objs__, stl_file)
setview()
# Generate PNG files
file = 'part_ecrou_8m_v2_'
# Ombré
Gui.runCommand('Std_DrawStyle',5)
i = 1
Gui.activeDocument().activeView().viewIsometric()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewFront()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewTop()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRight()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRear()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewBottom()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewLeft()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
# Filaire
Gui.runCommand('Std_DrawStyle',2)
i += 1
Gui.activeDocument().activeView().viewIsometric()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewFront()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewTop()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRight()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRear()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewBottom()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewLeft()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
""")
time.sleep(3)
pywinauto.mouse.click(button="left", coords=(460, 750))
time.sleep(3)
pywinauto.mouse.click(button="left", coords=(70, 670))
time.sleep(3)
pywinauto.keyboard.send_keys(
'exec{(}open{(}"part_ecrou_8m.py"{)}.read{(}{)}{)}'
)
time.sleep(3)
pywinauto.keyboard.send_keys('{ENTER}')
# ok
# https://www.visseriefixations.fr/rondelles-circlips/rondelles-plates/sans-chanfrein/serie-etroite-z/acier/rondelle-z-acier-zingue-blanc-nfe-25513/rondelle-z-0-8-z-blanc-nfe-25513.html
def test_part_rondelle_8m(self):
print("test_part_rondelle_8m")
if os.path.exists("part_rondelle_8m.py"):
os.remove("part_rondelle_8m.py")
else:
print("The file does not exist")
# Writing to file
with open("part_rondelle_8m.py", "w") as file:
# Writing data to a file
file.write("""import FreeCAD, Part, Mesh
DOC = FreeCAD.activeDocument()
DOC_NAME = "part_rondelle_8m"
def clear_doc():
# Clear the active document deleting all the objects
for obj in DOC.Objects:
DOC.removeObject(obj.Name)
def setview():
# Rearrange View
FreeCAD.Gui.SendMsgToActiveView("ViewFit")
FreeCAD.Gui.activeDocument().activeView().viewAxometric()
if DOC is None:
FreeCAD.newDocument(DOC_NAME)
FreeCAD.setActiveDocument(DOC_NAME)
DOC = FreeCAD.activeDocument()
else:
clear_doc()
# EPS= tolerance to use to cut the parts
EPS = 0.10
EPS_C = EPS * -0.5
d1 = 8.40
d2 = 16
s = 1.5
cylinder_1 = Part.makeCylinder(d2/2, s)
cylinder_2 = Part.makeCylinder(d1/2, s)
cylinder_1 = cylinder_1.cut(cylinder_2)
Part.show(cylinder_1)
DOC.recompute()
__objs__=[]
__objs__.append(FreeCAD.getDocument("part_rondelle_8m").getObject("Shape"))
stl_file = u"part_rondelle_8m.stl"
Mesh.export(__objs__, stl_file)
setview()
# Generate PNG files
file = 'part_rondelle_8m_v2_'
# Ombré
Gui.runCommand('Std_DrawStyle',5)
i = 1
Gui.activeDocument().activeView().viewIsometric()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewFront()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewTop()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRight()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRear()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewBottom()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewLeft()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
# Filaire
Gui.runCommand('Std_DrawStyle',2)
i += 1
Gui.activeDocument().activeView().viewIsometric()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewFront()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewTop()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRight()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRear()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewBottom()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewLeft()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
""")
time.sleep(3)
pywinauto.mouse.click(button="left", coords=(460, 750))
time.sleep(3)
pywinauto.mouse.click(button="left", coords=(70, 670))
time.sleep(3)
pywinauto.keyboard.send_keys(
'exec{(}open{(}"part_rondelle_8m.py"{)}.read{(}{)}{)}'
)
time.sleep(3)
pywinauto.keyboard.send_keys('{ENTER}')
# ok
# https://www.visseriefixations.fr/vis-a-tete-hexagonale/vis-a-tete-hexagonale-standard/acier-8-8-noir/th-acier-8-8-noir-filetage-total-din-933/th-m5x20-acier-8-8-noir-ef-din-933.html
def test_part_vis_metal_m5_20l(self):
print("test_part_vis_metal_m5_20l")
if os.path.exists("part_vis_metal_m5_20l.py"):
os.remove("part_vis_metal_m5_20l.py")
else:
print("The file does not exist")
# Writing to file
with open("part_vis_metal_m5_20l.py", "w") as file:
# Writing data to a file
file.write("""import FreeCAD, Part, Mesh
DOC = FreeCAD.activeDocument()
DOC_NAME = "part_vis_metal_m5_20l"
def clear_doc():
# Clear the active document deleting all the objects
for obj in DOC.Objects:
DOC.removeObject(obj.Name)
def setview():
# Rearrange View
FreeCAD.Gui.SendMsgToActiveView("ViewFit")
FreeCAD.Gui.activeDocument().activeView().viewAxometric()
if DOC is None:
FreeCAD.newDocument(DOC_NAME)
FreeCAD.setActiveDocument(DOC_NAME)
DOC = FreeCAD.activeDocument()
else:
clear_doc()
# EPS= tolerance to use to cut the parts
EPS = 0.10
EPS_C = EPS * -0.5
d1 = 5
L = 20
k = 3.5
e = 8.79
cylinder_1 = Part.makeCylinder(e/2, L + k)
cylinder_2 = Part.makeCylinder(d1/2, L)
cylinder_3 = Part.makeCylinder(e/2, L)
# cylinder_3 cut by cylinder_2
cylinder_3 = cylinder_3.cut(cylinder_2)
# cylinder_1 cut by cylinder_3
cylinder_3_vector = FreeCAD.Vector(0, 0, k)
cylinder_3.translate(cylinder_3_vector)
cylinder_1 = cylinder_1.cut(cylinder_3)
Part.show(cylinder_1)
DOC.recompute()
__objs__=[]
__objs__.append(FreeCAD.getDocument("part_vis_metal_m5_20l").getObject("Shape"))
stl_file = u"part_vis_metal_m5_20l.stl"
Mesh.export(__objs__, stl_file)
setview()
# Generate PNG files
file = 'part_vis_metal_m5_20l_v2_'
# Ombré
Gui.runCommand('Std_DrawStyle',5)
i = 1
Gui.activeDocument().activeView().viewIsometric()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewFront()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewTop()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRight()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRear()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewBottom()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewLeft()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
# Filaire
Gui.runCommand('Std_DrawStyle',2)
i += 1
Gui.activeDocument().activeView().viewIsometric()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewFront()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewTop()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRight()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRear()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewBottom()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewLeft()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
""")
time.sleep(3)
pywinauto.mouse.click(button="left", coords=(460, 750))
time.sleep(3)
pywinauto.mouse.click(button="left", coords=(70, 670))
time.sleep(3)
pywinauto.keyboard.send_keys(
'exec{(}open{(}"part_vis_metal_m5_20l.py"{)}.read{(}{)}{)}'
)
time.sleep(3)
pywinauto.keyboard.send_keys('{ENTER}')
# ok
# https://www.visseriefixations.fr/ecrous/ecrous-autofreines/ecrou-hexagonal-autofreine-nylstop/ecrou-nylstop-acier-zingue-blanc-din-985/ecrou-nylstop-m5-z-blanc-din-985.html
def test_part_ecrou_5m(self):
print("test_part_ecrou_5m")
if os.path.exists("part_ecrou_5m.py"):
os.remove("part_ecrou_5m.py")
else:
print("The file does not exist")
# Writing to file
with open("part_ecrou_5m.py", "w") as file:
# Writing data to a file
file.write("""import FreeCAD, Part, Mesh
DOC = FreeCAD.activeDocument()
DOC_NAME = "part_ecrou_5m"
def clear_doc():
# Clear the active document deleting all the objects
for obj in DOC.Objects:
DOC.removeObject(obj.Name)
def setview():
# Rearrange View
FreeCAD.Gui.SendMsgToActiveView("ViewFit")
FreeCAD.Gui.activeDocument().activeView().viewAxometric()
if DOC is None:
FreeCAD.newDocument(DOC_NAME)
FreeCAD.setActiveDocument(DOC_NAME)
DOC = FreeCAD.activeDocument()
else:
clear_doc()
# EPS= tolerance to use to cut the parts
EPS = 0.10
EPS_C = EPS * -0.5
d1 = 5
e = 8.79
h = 5
cylinder_1 = Part.makeCylinder(e/2, h)
cylinder_2 = Part.makeCylinder(d1/2, h)
cylinder_1 = cylinder_1.cut(cylinder_2)
Part.show(cylinder_1)
DOC.recompute()
__objs__ = []
__objs__.append(FreeCAD.getDocument("part_ecrou_5m").getObject("Shape"))
stl_file = u"part_ecrou_5m.stl"
Mesh.export(__objs__, stl_file)
setview()
# Generate PNG files
file = 'part_ecrou_5m_v2_'
# Ombré
Gui.runCommand('Std_DrawStyle',5)
i = 1
Gui.activeDocument().activeView().viewIsometric()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewFront()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewTop()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRight()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRear()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewBottom()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewLeft()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
# Filaire
Gui.runCommand('Std_DrawStyle',2)
i += 1
Gui.activeDocument().activeView().viewIsometric()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewFront()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewTop()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRight()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRear()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewBottom()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewLeft()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
""")
time.sleep(3)
pywinauto.mouse.click(button="left", coords=(460, 750))
time.sleep(3)
pywinauto.mouse.click(button="left", coords=(70, 670))
time.sleep(3)
pywinauto.keyboard.send_keys(
'exec{(}open{(}"part_ecrou_5m.py"{)}.read{(}{)}{)}'
)
time.sleep(3)
pywinauto.keyboard.send_keys('{ENTER}')
# ok
# https://www.visseriefixations.fr/rondelles-circlips/rondelles-plates/sans-chanfrein/serie-etroite-z/acier/rondelle-z-acier-zingue-blanc-nfe-25513/rondelle-z-0-5-z-blanc-nfe-25513.html
def test_part_rondelle_5m(self):
print("test_part_rondelle_5m")
if os.path.exists("part_rondelle_5m.py"):
os.remove("part_rondelle_5m.py")
else:
print("The file does not exist")
# Writing to file
with open("part_rondelle_5m.py", "w") as file:
# Writing data to a file
file.write("""import FreeCAD, Part, Mesh
DOC = FreeCAD.activeDocument()
DOC_NAME = "part_rondelle_5m"
def clear_doc():
# Clear the active document deleting all the objects
for obj in DOC.Objects:
DOC.removeObject(obj.Name)
def setview():
# Rearrange View
FreeCAD.Gui.SendMsgToActiveView("ViewFit")
FreeCAD.Gui.activeDocument().activeView().viewAxometric()
if DOC is None:
FreeCAD.newDocument(DOC_NAME)
FreeCAD.setActiveDocument(DOC_NAME)
DOC = FreeCAD.activeDocument()
else:
clear_doc()
# EPS= tolerance to use to cut the parts
EPS = 0.10
EPS_C = EPS * -0.5
d1 = 5.30
d2 = 10
s = 1
cylinder_1 = Part.makeCylinder(d2/2, s)
cylinder_2 = Part.makeCylinder(d1/2, s)
cylinder_1 = cylinder_1.cut(cylinder_2)
Part.show(cylinder_1)
DOC.recompute()
__objs__=[]
__objs__.append(FreeCAD.getDocument("part_rondelle_5m").getObject("Shape"))
stl_file = u"part_rondelle_5m.stl"
Mesh.export(__objs__, stl_file)
setview()
# Generate PNG files
file = 'part_rondelle_5m_v2_'
# Ombré
Gui.runCommand('Std_DrawStyle',5)
i = 1
Gui.activeDocument().activeView().viewIsometric()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewFront()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewTop()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRight()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRear()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewBottom()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewLeft()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
# Filaire
Gui.runCommand('Std_DrawStyle',2)
i += 1
Gui.activeDocument().activeView().viewIsometric()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewFront()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewTop()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRight()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRear()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewBottom()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewLeft()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
""")
time.sleep(3)
pywinauto.mouse.click(button="left", coords=(460, 750))
time.sleep(3)
pywinauto.mouse.click(button="left", coords=(70, 670))
time.sleep(3)
pywinauto.keyboard.send_keys(
'exec{(}open{(}"part_rondelle_5m.py"{)}.read{(}{)}{)}'
)
time.sleep(3)
pywinauto.keyboard.send_keys('{ENTER}')
# ok
def test_part_support(self):
print("test_part_support")
if os.path.exists("part_support.py"):
os.remove("part_support.py")
else:
print("The file does not exist")
# Writing to file
with open("part_support.py", "w") as file:
# Writing data to a file
file.write("""import FreeCAD, Part, Drawing, math, Mesh
DOC = FreeCAD.activeDocument()
DOC_NAME = "part_support"
def clear_doc():
# Clear the active document deleting all the objects
for obj in DOC.Objects:
DOC.removeObject(obj.Name)
def setview():
# Rearrange View
FreeCAD.Gui.SendMsgToActiveView("ViewFit")
FreeCAD.Gui.activeDocument().activeView().viewAxometric()
if DOC is None:
FreeCAD.newDocument(DOC_NAME)
FreeCAD.setActiveDocument(DOC_NAME)
DOC = FreeCAD.activeDocument()
else:
clear_doc()
# EPS= tolerance to use to cut the parts
EPS = 0.10
EPS_C = EPS * (-0.5)
cote_maximal = 2 + 8 + 8 + 8 + 86 + 8 + 8 + 8 + 2
hauteur_maximal = 1.5 + 1.5 + 6
# part_support
part_support = Part.makeCylinder(cote_maximal/2, hauteur_maximal)
# cylinder_1 for passing electrodes
cylinder_1 = Part.makeCylinder(4, hauteur_maximal)
# part_support cut by cylinder_1
part_support = part_support.cut(cylinder_1)
# cylinder_2 for fixing the tank
cylinder_2 = Part.makeCylinder(86/2, 1.5)
# part_support cut by cylinder_2
cylinder_2_vector = FreeCAD.Vector(0, 0, hauteur_maximal - 1.5)
cylinder_2.translate(cylinder_2_vector)
part_support = part_support.cut(cylinder_2)
# cylinder_3
cylinder_3 = Part.makeCylinder(cote_maximal/2 - 1, hauteur_maximal - 1.5 - 1.5)
# part_support cut by cylinder_3
part_support = part_support.cut(cylinder_3)
# holes for reducing the cost
degre = 15
for i in range(int(360/degre)):
hole = Part.makeCylinder(4, hauteur_maximal)
radius = 86/2 + 8 + 4
alpha=(i*degre*math.pi)/180
hole_vector = FreeCAD.Vector(radius*math.cos(alpha), radius*math.sin(alpha), 0)
hole.translate(hole_vector)
part_support = part_support.cut(hole)
# Cut the holes for the screws fixing the assembly plant
degre = 15
for i in range(int(360/degre)):
for j in range(0, 5):
axe_y = FreeCAD.Vector(0, 1, 0)
axe_z = FreeCAD.Vector(0, 0, 1)
radius_screw = cote_maximal/2 - 5
alpha = (i*degre*math.pi)/180
vector = FreeCAD.Vector(radius_screw*math.cos(alpha), radius_screw*math.sin(alpha), j*0.75)
cylinder = Part.makeCylinder(3, 10, vector, axe_y)
cylinder.rotate(vector, axe_z, alpha*(360/(2*math.pi)) - 90)
part_support = part_support.cut(cylinder)
Part.show(part_support)
DOC.recompute()
__objs__ = []
__objs__.append(FreeCAD.getDocument("part_support").getObject("Shape"))
stl_file = u"part_support.stl"
Mesh.export(__objs__, stl_file)
setview()
# Generate PNG files
file = 'part_support_v2_'
# Ombré
Gui.runCommand('Std_DrawStyle',5)
i = 1
Gui.activeDocument().activeView().viewIsometric()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewFront()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewTop()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRight()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRear()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewBottom()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewLeft()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
# Filaire
Gui.runCommand('Std_DrawStyle',2)
i += 1
Gui.activeDocument().activeView().viewIsometric()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewFront()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewTop()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRight()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRear()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewBottom()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewLeft()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
""")
time.sleep(3)
pywinauto.mouse.click(button="left", coords=(460, 750))
time.sleep(3)
pywinauto.mouse.click(button="left", coords=(70, 670))
time.sleep(3)
pywinauto.keyboard.send_keys(
'exec{(}open{(}"part_support.py"{)}.read{(}{)}{)}'
)
time.sleep(3)
pywinauto.keyboard.send_keys('{ENTER}')
# ok
def test_part_support_laser_cutting(self):
print("test_part_support_laser_cutting")
if os.path.exists("part_support_laser_cutting.py"):
os.remove("part_support_laser_cutting.py")
else:
print("The file does not exist")
# Writing to file
with open("part_support_laser_cutting.py", "w") as file:
# Writing data to a file
file.write("""import FreeCAD, Part, Drawing, math, Mesh, importDXF
DOC = FreeCAD.activeDocument()
DOC_NAME = "part_support_laser_cutting"
def clear_doc():
# Clear the active document deleting all the objects
for obj in DOC.Objects:
DOC.removeObject(obj.Name)
def setview():
# Rearrange View
FreeCAD.Gui.SendMsgToActiveView("ViewFit")
FreeCAD.Gui.activeDocument().activeView().viewAxometric()
if DOC is None:
FreeCAD.newDocument(DOC_NAME)
FreeCAD.setActiveDocument(DOC_NAME)
DOC = FreeCAD.activeDocument()
else:
clear_doc()
# EPS= tolerance to use to cut the parts
EPS = 0.10
EPS_C = EPS * (-0.5)
cote_maximal = 2 + 8 + 8 + 8 + 86 + 8 + 8 + 8 + 2
hauteur_maximal = 2
# part_support_laser_cutting
part_support_laser_cutting = Part.makeCylinder(cote_maximal/2, hauteur_maximal)
# cylinder_1 for passing electrodes
cylinder_1 = Part.makeCylinder(4, hauteur_maximal)
# part_support_laser_cutting cut by cylinder_1
part_support_laser_cutting = part_support_laser_cutting.cut(cylinder_1)
# holes for reducing the cost
degre = 15
for i in range(int(360/degre)):
hole = Part.makeCylinder(4, hauteur_maximal)
radius = 86/2 + 8 + 4
alpha=(i*degre*math.pi)/180
hole_vector = FreeCAD.Vector(radius*math.cos(alpha), radius*math.sin(alpha), 0)
hole.translate(hole_vector)
part_support_laser_cutting = part_support_laser_cutting.cut(hole)
Part.show(part_support_laser_cutting)
DOC.recompute()
__objs__ = []
__objs__.append(FreeCAD.getDocument("part_support_laser_cutting").getObject("Shape"))
stl_file = u"part_support_laser_cutting.stl"
Mesh.export(__objs__, stl_file)
dxf_file = u"part_support_laser_cutting.dxf"
importDXF.export(__objs__, dxf_file)
setview()
# Generate PNG files
file = 'part_support_laser_cutting_v2_'
# Ombré
Gui.runCommand('Std_DrawStyle',5)
i = 1
Gui.activeDocument().activeView().viewIsometric()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewFront()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewTop()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRight()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRear()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewBottom()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewLeft()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
# Filaire
Gui.runCommand('Std_DrawStyle',2)
i += 1
Gui.activeDocument().activeView().viewIsometric()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewFront()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewTop()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRight()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRear()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewBottom()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewLeft()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
""")
time.sleep(3)
pywinauto.mouse.click(button="left", coords=(460, 750))
time.sleep(3)
pywinauto.mouse.click(button="left", coords=(70, 670))
time.sleep(3)
pywinauto.keyboard.send_keys(
'exec{(}open{(}"part_support_laser_cutting.py"{)}.read{(}{)}{)}'
)
time.sleep(3)
pywinauto.keyboard.send_keys('{ENTER}')
# ok
def test_assembly(self):
print("test_assembly")
if os.path.exists("assembly.py"):
os.remove("assembly.py")
else:
print("The file does not exist")
# Writing to file
with open("assembly.py", "w") as file:
# Writing data to a file
file.write("""import FreeCAD, Part, Drawing, math, Mesh
DOC = FreeCAD.activeDocument()
DOC_NAME = "assembly"
def clear_doc():
# Clear the active document deleting all the objects
for obj in DOC.Objects:
DOC.removeObject(obj.Name)
def setview():
# Rearrange View
FreeCAD.Gui.SendMsgToActiveView("ViewFit")
FreeCAD.Gui.activeDocument().activeView().viewAxometric()
if DOC is None:
FreeCAD.newDocument(DOC_NAME)
FreeCAD.setActiveDocument(DOC_NAME)
DOC = FreeCAD.activeDocument()
else:
clear_doc()
# EPS= tolerance to use to cut the parts
EPS = 0.10
EPS_C = EPS * -0.5
# part_tank
Mesh.insert(u"part_tank.stl","assembly")
FreeCADGui.getDocument("assembly").getObject("part_tank").ShapeColor = (0.10,0.10,0.10)
FreeCAD.getDocument("assembly").getObject("part_tank").Placement = App.Placement(App.Vector(0,0,20),App.Rotation(App.Vector(0,0,1),0))
FreeCADGui.getDocument("assembly").getObject("part_tank").Transparency = 80
# part_support_laser_cutting _ 1
Mesh.insert(u"part_support_laser_cutting.stl","assembly")
FreeCADGui.getDocument("assembly").getObject("part_support_laser_cutting").ShapeColor = (1.00,1.00,0.00)
FreeCAD.getDocument("assembly").getObject("part_support_laser_cutting").Placement = App.Placement(App.Vector(0,0,18),App.Rotation(App.Vector(0,1,0),0))
# part_support_laser_cutting _ 2
Mesh.insert(u"part_support_laser_cutting.stl","assembly")
FreeCADGui.getDocument("assembly").getObject("part_support_laser_cutting001").ShapeColor = (1.00,1.00,0.00)
FreeCAD.getDocument("assembly").getObject("part_support_laser_cutting001").Placement = App.Placement(App.Vector(0,0,1000 - 20),App.Rotation(App.Vector(0,1,0),0))
# part_vis_metal_m8_50l
Mesh.insert(u"part_vis_metal_m8_50l.stl","assembly")
FreeCADGui.getDocument("assembly").getObject("part_vis_metal_m8_50l").ShapeColor = (0.60,0.60,0.10)
FreeCAD.getDocument("assembly").getObject("part_vis_metal_m8_50l").Placement = App.Placement(App.Vector(0,0,1000 - 21 - 29 - 5.3),App.Rotation(App.Vector(0,1,0),0))
# part_tige_filetee_m8_1000l for electrode
Mesh.insert(u"part_tige_filetee_m8_1000l.stl","assembly")
FreeCADGui.getDocument("assembly").getObject("part_tige_filetee_m8_1000l").ShapeColor = (0.50,0.50,0.50)
FreeCAD.getDocument("assembly").getObject("part_tige_filetee_m8_1000l").Placement = App.Placement(App.Vector(0,0,- 21 - 29 - 5.3 - 3),App.Rotation(App.Vector(0,0,1),0))
# part_tige_filetee_m8_1000l for fixing the assembly _ 1
Mesh.insert(u"part_tige_filetee_m8_1000l.stl","assembly")
FreeCADGui.getDocument("assembly").getObject("part_tige_filetee_m8_1000l001").ShapeColor = (0.50,0.50,0.50)
FreeCAD.getDocument("assembly").getObject("part_tige_filetee_m8_1000l001").Placement = App.Placement(App.Vector(86/2 + 8 + 4,0,0),App.Rotation(App.Vector(0,0,1),0))
# part_tige_filetee_m8_1000l for fixing the assembly _ 2
Mesh.insert(u"part_tige_filetee_m8_1000l.stl","assembly")
FreeCADGui.getDocument("assembly").getObject("part_tige_filetee_m8_1000l002").ShapeColor = (0.50,0.50,0.50)
FreeCAD.getDocument("assembly").getObject("part_tige_filetee_m8_1000l002").Placement = App.Placement(App.Vector(-86/2 - 8 - 4,0,0),App.Rotation(App.Vector(0,0,1),0))
# Rank 1
# part_rondelle_8m for part_tige_filetee_m8_1000l
Mesh.insert(u"part_rondelle_8m.stl","assembly")
FreeCADGui.getDocument("assembly").getObject("part_rondelle_8m").ShapeColor = (0.30,0.20,0.20)
FreeCAD.getDocument("assembly").getObject("part_rondelle_8m").Placement = App.Placement(App.Vector(0,0,16.5),App.Rotation(App.Vector(0,0,1),0))
# part_rondelle_8m for part_tige_filetee_m8_1000l001
Mesh.insert(u"part_rondelle_8m.stl","assembly")
FreeCADGui.getDocument("assembly").getObject("part_rondelle_8m001").ShapeColor = (0.30,0.20,0.20)
FreeCAD.getDocument("assembly").getObject("part_rondelle_8m001").Placement = App.Placement(App.Vector(86/2 + 8 + 4,0,16.5),App.Rotation(App.Vector(0,0,1),0))
# part_rondelle_8m for part_tige_filetee_m8_1000l002
Mesh.insert(u"part_rondelle_8m.stl","assembly")
FreeCADGui.getDocument("assembly").getObject("part_rondelle_8m002").ShapeColor = (0.30,0.20,0.20)
FreeCAD.getDocument("assembly").getObject("part_rondelle_8m002").Placement = App.Placement(App.Vector(-86/2 - 8 - 4,0,16.5),App.Rotation(App.Vector(0,0,1),0))
# part_ecrou_8m for part_tige_filetee_m8_1000l
Mesh.insert(u"part_ecrou_8m.stl","assembly")
FreeCADGui.getDocument("assembly").getObject("part_ecrou_8m").ShapeColor = (0.25,0.25,0.20)
FreeCAD.getDocument("assembly").getObject("part_ecrou_8m").Placement = App.Placement(App.Vector(0,0,8.5),App.Rotation(App.Vector(0,0,1),0))
# part_ecrou_8m for part_tige_filetee_m8_1000l001
Mesh.insert(u"part_ecrou_8m.stl","assembly")
FreeCADGui.getDocument("assembly").getObject("part_ecrou_8m001").ShapeColor = (0.25,0.25,0.20)
FreeCAD.getDocument("assembly").getObject("part_ecrou_8m001").Placement = App.Placement(App.Vector(86/2 + 8 + 4,0,8.5),App.Rotation(App.Vector(0,0,1),0))
# part_ecrou_8m for part_tige_filetee_m8_1000l002
Mesh.insert(u"part_ecrou_8m.stl","assembly")
FreeCADGui.getDocument("assembly").getObject("part_ecrou_8m002").ShapeColor = (0.25,0.25,0.20)
FreeCAD.getDocument("assembly").getObject("part_ecrou_8m002").Placement = App.Placement(App.Vector(-86/2 - 8 - 4,0,8.5),App.Rotation(App.Vector(0,0,1),0))
# Rank 2
# part_rondelle_8m for part_tige_filetee_m8_1000l
Mesh.insert(u"part_rondelle_8m.stl","assembly")
FreeCADGui.getDocument("assembly").getObject("part_rondelle_8m003").ShapeColor = (0.30,0.20,0.20)
FreeCAD.getDocument("assembly").getObject("part_rondelle_8m003").Placement = App.Placement(App.Vector(0,0,20),App.Rotation(App.Vector(0,0,1),0))
# part_rondelle_8m for part_tige_filetee_m8_1000l001
Mesh.insert(u"part_rondelle_8m.stl","assembly")
FreeCADGui.getDocument("assembly").getObject("part_rondelle_8m004").ShapeColor = (0.30,0.20,0.20)
FreeCAD.getDocument("assembly").getObject("part_rondelle_8m004").Placement = App.Placement(App.Vector(86/2 + 8 + 4,0,20),App.Rotation(App.Vector(0,0,1),0))
# part_rondelle_8m for part_tige_filetee_m8_1000l002
Mesh.insert(u"part_rondelle_8m.stl","assembly")
FreeCADGui.getDocument("assembly").getObject("part_rondelle_8m005").ShapeColor = (0.30,0.20,0.20)
FreeCAD.getDocument("assembly").getObject("part_rondelle_8m005").Placement = App.Placement(App.Vector(-86/2 - 8 - 4,0,20),App.Rotation(App.Vector(0,0,1),0))
# part_ecrou_8m for part_tige_filetee_m8_1000l
Mesh.insert(u"part_ecrou_8m.stl","assembly")
FreeCADGui.getDocument("assembly").getObject("part_ecrou_8m003").ShapeColor = (0.25,0.25,0.20)
FreeCAD.getDocument("assembly").getObject("part_ecrou_8m003").Placement = App.Placement(App.Vector(0,0,21.5),App.Rotation(App.Vector(0,0,1),0))
# part_ecrou_8m for part_tige_filetee_m8_1000l001
Mesh.insert(u"part_ecrou_8m.stl","assembly")
FreeCADGui.getDocument("assembly").getObject("part_ecrou_8m004").ShapeColor = (0.25,0.25,0.20)
FreeCAD.getDocument("assembly").getObject("part_ecrou_8m004").Placement = App.Placement(App.Vector(86/2 + 8 + 4,0,21.5),App.Rotation(App.Vector(0,0,1),0))
# part_ecrou_8m for part_tige_filetee_m8_1000l002
Mesh.insert(u"part_ecrou_8m.stl","assembly")
FreeCADGui.getDocument("assembly").getObject("part_ecrou_8m005").ShapeColor = (0.25,0.25,0.20)
FreeCAD.getDocument("assembly").getObject("part_ecrou_8m005").Placement = App.Placement(App.Vector(-86/2 - 8 - 4,0,21.5),App.Rotation(App.Vector(0,0,1),0))
# Rank 3
# part_rondelle_8m for part_tige_filetee_m8_1000l
Mesh.insert(u"part_rondelle_8m.stl","assembly")
FreeCADGui.getDocument("assembly").getObject("part_rondelle_8m006").ShapeColor = (0.30,0.20,0.20)
FreeCAD.getDocument("assembly").getObject("part_rondelle_8m006").Placement = App.Placement(App.Vector(0,0,1000 - 21.5),App.Rotation(App.Vector(0,0,1),0))
# part_rondelle_8m for part_tige_filetee_m8_1000l001
Mesh.insert(u"part_rondelle_8m.stl","assembly")
FreeCADGui.getDocument("assembly").getObject("part_rondelle_8m007").ShapeColor = (0.30,0.20,0.20)
FreeCAD.getDocument("assembly").getObject("part_rondelle_8m007").Placement = App.Placement(App.Vector(86/2 + 8 + 4,0,1000 - 21.5),App.Rotation(App.Vector(0,0,1),0))
# part_rondelle_8m for part_tige_filetee_m8_1000l002
Mesh.insert(u"part_rondelle_8m.stl","assembly")
FreeCADGui.getDocument("assembly").getObject("part_rondelle_8m008").ShapeColor = (0.30,0.20,0.20)
FreeCAD.getDocument("assembly").getObject("part_rondelle_8m008").Placement = App.Placement(App.Vector(-86/2 - 8 - 4,0,1000 - 21.5),App.Rotation(App.Vector(0,0,1),0))
# part_ecrou_8m for part_tige_filetee_m8_1000l
Mesh.insert(u"part_ecrou_8m.stl","assembly")
FreeCADGui.getDocument("assembly").getObject("part_ecrou_8m006").ShapeColor = (0.25,0.25,0.20)
FreeCAD.getDocument("assembly").getObject("part_ecrou_8m006").Placement = App.Placement(App.Vector(0,0,1000 - 21.5 - 8),App.Rotation(App.Vector(0,0,1),0))
# part_ecrou_8m for part_tige_filetee_m8_1000l001
Mesh.insert(u"part_ecrou_8m.stl","assembly")
FreeCADGui.getDocument("assembly").getObject("part_ecrou_8m007").ShapeColor = (0.25,0.25,0.20)
FreeCAD.getDocument("assembly").getObject("part_ecrou_8m007").Placement = App.Placement(App.Vector(86/2 + 8 + 4,0,1000 - 21.5 - 8),App.Rotation(App.Vector(0,0,1),0))
# part_ecrou_8m for part_tige_filetee_m8_1000l002
Mesh.insert(u"part_ecrou_8m.stl","assembly")
FreeCADGui.getDocument("assembly").getObject("part_ecrou_8m008").ShapeColor = (0.25,0.25,0.20)
FreeCAD.getDocument("assembly").getObject("part_ecrou_8m008").Placement = App.Placement(App.Vector(-86/2 - 8 - 4,0,1000 - 21.5 - 8),App.Rotation(App.Vector(0,0,1),0))
# Rank 4
# part_rondelle_8m for part_tige_filetee_m8_1000l
Mesh.insert(u"part_rondelle_8m.stl","assembly")
FreeCADGui.getDocument("assembly").getObject("part_rondelle_8m009").ShapeColor = (0.30,0.20,0.20)
FreeCAD.getDocument("assembly").getObject("part_rondelle_8m009").Placement = App.Placement(App.Vector(0,0,1000 - 21 + 3),App.Rotation(App.Vector(0,0,1),0))
# part_rondelle_8m for part_tige_filetee_m8_1000l001
Mesh.insert(u"part_rondelle_8m.stl","assembly")
FreeCADGui.getDocument("assembly").getObject("part_rondelle_8m010").ShapeColor = (0.30,0.20,0.20)
FreeCAD.getDocument("assembly").getObject("part_rondelle_8m010").Placement = App.Placement(App.Vector(86/2 + 8 + 4,0,1000 - 21 + 3),App.Rotation(App.Vector(0,0,1),0))
# part_rondelle_8m for part_tige_filetee_m8_1000l002
Mesh.insert(u"part_rondelle_8m.stl","assembly")
FreeCADGui.getDocument("assembly").getObject("part_rondelle_8m011").ShapeColor = (0.30,0.20,0.20)
FreeCAD.getDocument("assembly").getObject("part_rondelle_8m011").Placement = App.Placement(App.Vector(-86/2 - 8 - 4,0,1000 - 21 + 3),App.Rotation(App.Vector(0,0,1),0))
# part_ecrou_8m for part_tige_filetee_m8_1000l
Mesh.insert(u"part_ecrou_8m.stl","assembly")
FreeCADGui.getDocument("assembly").getObject("part_ecrou_8m009").ShapeColor = (0.25,0.25,0.20)
FreeCAD.getDocument("assembly").getObject("part_ecrou_8m009").Placement = App.Placement(App.Vector(0,0,1000 - 21 + 3 + 1.5),App.Rotation(App.Vector(0,0,1),0))
# part_ecrou_8m for part_tige_filetee_m8_1000l001
Mesh.insert(u"part_ecrou_8m.stl","assembly")
FreeCADGui.getDocument("assembly").getObject("part_ecrou_8m010").ShapeColor = (0.25,0.25,0.20)
FreeCAD.getDocument("assembly").getObject("part_ecrou_8m010").Placement = App.Placement(App.Vector(86/2 + 8 + 4,0,1000 - 21 + 3 + 1.5),App.Rotation(App.Vector(0,0,1),0))
# part_ecrou_8m for part_tige_filetee_m8_1000l002
Mesh.insert(u"part_ecrou_8m.stl","assembly")
FreeCADGui.getDocument("assembly").getObject("part_ecrou_8m011").ShapeColor = (0.25,0.25,0.20)
FreeCAD.getDocument("assembly").getObject("part_ecrou_8m011").Placement = App.Placement(App.Vector(-86/2 - 8 - 4,0,1000 - 21 + 3 + 1.5),App.Rotation(App.Vector(0,0,1),0))
setview()
# Export assembly
__objs__=[]
__objs__.append(FreeCAD.getDocument("assembly").getObject("part_rondelle_8m008"))
__objs__.append(FreeCAD.getDocument("assembly").getObject("part_tank"))
__objs__.append(FreeCAD.getDocument("assembly").getObject("part_rondelle_8m011"))
__objs__.append(FreeCAD.getDocument("assembly").getObject("part_rondelle_8m"))
__objs__.append(FreeCAD.getDocument("assembly").getObject("part_tige_filetee_m8_1000l002"))
__objs__.append(FreeCAD.getDocument("assembly").getObject("part_ecrou_8m005"))
__objs__.append(FreeCAD.getDocument("assembly").getObject("part_ecrou_8m007"))
__objs__.append(FreeCAD.getDocument("assembly").getObject("part_rondelle_8m010"))
__objs__.append(FreeCAD.getDocument("assembly").getObject("part_ecrou_8m003"))
__objs__.append(FreeCAD.getDocument("assembly").getObject("part_ecrou_8m006"))
__objs__.append(FreeCAD.getDocument("assembly").getObject("part_rondelle_8m005"))
__objs__.append(FreeCAD.getDocument("assembly").getObject("part_rondelle_8m004"))
__objs__.append(FreeCAD.getDocument("assembly").getObject("part_vis_metal_m8_50l"))
__objs__.append(FreeCAD.getDocument("assembly").getObject("part_ecrou_8m004"))
__objs__.append(FreeCAD.getDocument("assembly").getObject("part_rondelle_8m009"))
__objs__.append(FreeCAD.getDocument("assembly").getObject("part_ecrou_8m010"))
__objs__.append(FreeCAD.getDocument("assembly").getObject("part_ecrou_8m009"))
__objs__.append(FreeCAD.getDocument("assembly").getObject("part_support_laser_cutting001"))
__objs__.append(FreeCAD.getDocument("assembly").getObject("part_rondelle_8m007"))
__objs__.append(FreeCAD.getDocument("assembly").getObject("part_rondelle_8m003"))
__objs__.append(FreeCAD.getDocument("assembly").getObject("part_ecrou_8m008"))
__objs__.append(FreeCAD.getDocument("assembly").getObject("part_tige_filetee_m8_1000l"))
__objs__.append(FreeCAD.getDocument("assembly").getObject("part_ecrou_8m001"))
__objs__.append(FreeCAD.getDocument("assembly").getObject("part_rondelle_8m006"))
__objs__.append(FreeCAD.getDocument("assembly").getObject("part_tige_filetee_m8_1000l001"))
__objs__.append(FreeCAD.getDocument("assembly").getObject("part_ecrou_8m002"))
__objs__.append(FreeCAD.getDocument("assembly").getObject("part_rondelle_8m002"))
__objs__.append(FreeCAD.getDocument("assembly").getObject("part_support_laser_cutting"))
__objs__.append(FreeCAD.getDocument("assembly").getObject("part_rondelle_8m001"))
__objs__.append(FreeCAD.getDocument("assembly").getObject("part_ecrou_8m"))
__objs__.append(FreeCAD.getDocument("assembly").getObject("part_ecrou_8m011"))
Mesh.export(__objs__,u"assembly.stl")
del __objs__
# Generate PNG files
file = 'assembly_v2_'
# Ombré
Gui.runCommand('Std_DrawStyle',5)
i = 1
Gui.activeDocument().activeView().viewIsometric()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewFront()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewTop()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRight()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRear()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewBottom()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewLeft()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
# Filaire
Gui.runCommand('Std_DrawStyle',2)
i += 1
Gui.activeDocument().activeView().viewIsometric()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewFront()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewTop()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRight()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRear()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewBottom()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewLeft()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
""")
time.sleep(3)
pywinauto.mouse.click(button="left", coords=(460, 750))
time.sleep(3)
pywinauto.mouse.click(button="left", coords=(70, 670))
time.sleep(3)
pywinauto.keyboard.send_keys(
'exec{(}open{(}"assembly.py"{)}.read{(}{)}{)}'
)
time.sleep(3)
pywinauto.keyboard.send_keys('{ENTER}')
# ok
def test_assembly_plant(self):
print("test_assembly_plant")
if os.path.exists("assembly_plant.py"):
os.remove("assembly_plant.py")
else:
print("The file does not exist")
# Writing to file
with open("assembly_plant.py", "w") as file:
# Writing data to a file
file.write("""import FreeCAD, Part, Drawing, math, Mesh
DOC = FreeCAD.activeDocument()
DOC_NAME = "assembly_plant"
def clear_doc():
# Clear the active document deleting all the objects
for obj in DOC.Objects:
DOC.removeObject(obj.Name)
def setview():
# Rearrange View
FreeCAD.Gui.SendMsgToActiveView("ViewFit")
FreeCAD.Gui.activeDocument().activeView().viewAxometric()
if DOC is None:
FreeCAD.newDocument(DOC_NAME)
FreeCAD.setActiveDocument(DOC_NAME)
DOC = FreeCAD.activeDocument()
else:
clear_doc()
# EPS= tolerance to use to cut the parts
EPS = 0.10
EPS_C = EPS * -0.5
cote_maximal = 2 + 8 + 8 + 8 + 86 + 8 + 8 + 8 + 2
# assembly
Mesh.insert(u"assembly.stl","assembly_plant")
FreeCADGui.getDocument("assembly_plant").getObject("assembly").ShapeColor = (0.10,0.10,0.10)
FreeCAD.getDocument("assembly_plant").getObject("assembly").Placement = App.Placement(App.Vector(0,0,0),App.Rotation(App.Vector(0,0,1),90))
Mesh.insert(u"assembly.stl","assembly_plant")
FreeCADGui.getDocument("assembly_plant").getObject("assembly001").ShapeColor = (0.0,0.10,0.10)
FreeCAD.getDocument("assembly_plant").getObject("assembly001").Placement = App.Placement(App.Vector(cote_maximal + 1 + 5 + 1,0,0),App.Rotation(App.Vector(0,0,1),90))
setview()
# Generate PNG files
file = 'assembly_plant_v2_'
# Ombré
Gui.runCommand('Std_DrawStyle',5)
i = 1
Gui.activeDocument().activeView().viewIsometric()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewFront()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewTop()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRight()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRear()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewBottom()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewLeft()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
# Filaire
Gui.runCommand('Std_DrawStyle',2)
i += 1
Gui.activeDocument().activeView().viewIsometric()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewFront()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewTop()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRight()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRear()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewBottom()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewLeft()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
""")
time.sleep(3)
pywinauto.mouse.click(button="left", coords=(460, 750))
time.sleep(3)
pywinauto.mouse.click(button="left", coords=(70, 670))
time.sleep(3)
pywinauto.keyboard.send_keys(
'exec{(}open{(}"assembly_plant.py"{)}.read{(}{)}{)}'
)
time.sleep(3)
pywinauto.keyboard.send_keys('{ENTER}')
if __name__ == '__main__':
unittest.main()
| 31.783061 | 189 | 0.706 | 8,687 | 64,170 | 5.059284 | 0.031657 | 0.134608 | 0.213788 | 0.072628 | 0.966689 | 0.948191 | 0.926098 | 0.911081 | 0.87306 | 0.846166 | 0 | 0.061933 | 0.117812 | 64,170 | 2,018 | 190 | 31.798811 | 0.714432 | 0.026897 | 0 | 0.777619 | 0 | 0.170349 | 0.888061 | 0.647788 | 0 | 0 | 0 | 0 | 0 | 1 | 0.008553 | false | 0.001426 | 0.01283 | 0 | 0.022096 | 0.017106 | 0 | 0 | 0 | null | 0 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 |
51c911df5f14a4f362d8aaf03f01d444be24a409 | 18,004 | py | Python | services/web/tests/test_auth_core.py | arsalasif/flask-rest-api | 7e86cf69440f53a57cd49819825e20b0e94f6624 | [
"MIT"
] | 8 | 2020-07-17T16:23:31.000Z | 2022-01-05T01:52:06.000Z | services/web/tests/test_auth_core.py | arsalasif/flask-rest-api | 7e86cf69440f53a57cd49819825e20b0e94f6624 | [
"MIT"
] | null | null | null | services/web/tests/test_auth_core.py | arsalasif/flask-rest-api | 7e86cf69440f53a57cd49819825e20b0e94f6624 | [
"MIT"
] | 3 | 2020-12-24T03:45:29.000Z | 2021-12-09T15:04:30.000Z | import json
import time
from mimesis import Person
from project.api.common.utils.constants import Constants
from tests.base import BaseTestCase
from tests.utils import add_user, add_user_password
class TestAuthCore(BaseTestCase):
"""
Test authentication api api/v1/auth.py core endpoints
Methods include:
/auth/register
/auth/login
/auth/logout
/auth/status
/user --> to get user info
"""
# Generate fake data with mimesis
data_generator = Person('en')
"""
Test /auth/register
"""
def test_auth_register(self):
"""Ensure normal registration works"""
with self.client:
response = self.client.post(
'/v1/auth/register',
data=json.dumps(dict(
username=self.data_generator.username(),
email=self.data_generator.email(),
name=self.data_generator.full_name(),
password=self.data_generator.password()
)),
content_type='application/json',
headers=[('Accept', 'application/json')]
)
data = json.loads(response.data.decode())
self.assertEqual(data['message'], 'Successfully registered.')
self.assertTrue(data['auth_token'])
self.assertEqual(response.content_type, 'application/json')
self.assertEqual(response.status_code, 201)
def test_auth_register_duplicate_email(self):
"""Ensure duplicate email registration is not allowed"""
user = add_user()
with self.client:
response = self.client.post(
'/v1/auth/register',
data=json.dumps(dict(
username=self.data_generator.username(),
email=user.email,
password=self.data_generator.password(),
name=self.data_generator.full_name()
)),
content_type='application/json',
headers=[('Accept', 'application/json')]
)
data = json.loads(response.data.decode())
self.assertEqual(response.status_code, 400)
self.assertEqual(data['message'], 'Validation Error')
self.assertEqual(data['errors'][0]['field'], 'email')
self.assertEqual(data['errors'][0]['message'], 'email already exists')
def test_auth_register_duplicate_username(self):
"""Ensure duplicate username registration is not allowed"""
user = add_user()
with self.client:
response = self.client.post(
'/v1/auth/register',
data=json.dumps(dict(
username=user.username,
email=self.data_generator.email(),
password=self.data_generator.password(),
name=self.data_generator.full_name()
)),
content_type='application/json',
headers=[('Accept', 'application/json')]
)
data = json.loads(response.data.decode())
self.assertEqual(response.status_code, 400)
self.assertEqual(data['message'], 'Validation Error')
self.assertEqual(data['errors'][0]['field'], 'username')
self.assertEqual(data['errors'][0]['message'], 'username already exists')
def test_auth_register_duplicate_allowable(self):
"""Ensure duplicate password/name is allowed"""
user = add_user()
with self.client:
response = self.client.post(
'/v1/auth/register',
data=json.dumps(dict(
username=self.data_generator.username(),
email=self.data_generator.email(),
password=user.password,
name=user.name
)),
content_type='application/json',
headers=[('Accept', 'application/json')]
)
data = json.loads(response.data.decode())
self.assertEqual(data['message'], 'Successfully registered.')
self.assertTrue(data['auth_token'])
self.assertEqual(response.content_type, 'application/json')
self.assertEqual(response.status_code, 201)
def test_auth_register_invalid_json_no_email(self):
"""Ensure registration is not allowed without email"""
with self.client:
response = self.client.post(
'/v1/auth/register',
data=json.dumps(dict(
username=self.data_generator.username(),
password=self.data_generator.password(),
name=self.data_generator.full_name()
)),
content_type='application/json',
headers=[('Accept', 'application/json')]
)
data = json.loads(response.data.decode())
self.assertEqual(response.status_code, 400)
self.assertEqual(data['message'], 'Validation Error')
self.assertEqual(data['errors'][0]['field'], 'email')
def test_auth_register_invalid_json_no_username(self):
"""Ensure registration is not allowed without username"""
with self.client:
response = self.client.post(
'/v1/auth/register',
data=json.dumps(dict(
email=self.data_generator.email(),
password=self.data_generator.password(),
name=self.data_generator.full_name()
)),
content_type='application/json',
headers=[('Accept', 'application/json')]
)
data = json.loads(response.data.decode())
self.assertEqual(response.status_code, 400)
self.assertEqual(data['message'], 'Validation Error')
self.assertEqual(data['errors'][0]['field'], 'username')
def test_auth_register_invalid_json_no_name(self):
"""Ensure registration is not allowed without name"""
with self.client:
response = self.client.post(
'/v1/auth/register',
data=json.dumps(dict(
email=self.data_generator.email(),
password=self.data_generator.password(),
username=self.data_generator.username()
)),
content_type='application/json',
headers=[('Accept', 'application/json')]
)
data = json.loads(response.data.decode())
self.assertEqual(response.status_code, 400)
self.assertEqual(data['message'], 'Validation Error')
self.assertEqual(data['errors'][0]['field'], 'name')
def test_auth_register_invalid_json_no_password(self):
"""Ensure registration is not allowed without password"""
with self.client:
response = self.client.post(
'/v1/auth/register',
data=json.dumps(dict(
email=self.data_generator.email(),
username=self.data_generator.username(),
name=self.data_generator.full_name()
)),
content_type='application/json',
headers=[('Accept', 'application/json')]
)
data = json.loads(response.data.decode())
self.assertEqual(response.status_code, 400)
self.assertEqual(data['message'], 'Validation Error')
self.assertEqual(data['errors'][0]['field'], 'password')
def test_auth_register_empty_json(self):
"""Ensure empty json gives valid error"""
with self.client:
response = self.client.post(
'/v1/auth/register',
data=json.dumps(dict()),
content_type='application/json',
headers=[('Accept', 'application/json')]
)
data = json.loads(response.data.decode())
self.assertEqual(response.status_code, 400)
self.assertEqual('Invalid Payload', data['message'])
"""
Test /auth/login
"""
def test_auth_login(self):
"""Ensure registered user can login"""
user, password = add_user_password()
with self.client:
response = self.client.post(
'/v1/auth/login',
data=json.dumps(dict(
email=user.email,
password=password
)),
content_type='application/json',
headers=[('Accept', 'application/json')]
)
data = json.loads(response.data.decode())
self.assertEqual(data['message'], 'Successfully logged in.')
self.assertTrue(data['auth_token'])
self.assertEqual(response.content_type, 'application/json')
self.assertEqual(response.status_code, 200)
def test_auth_login_no_password(self):
"""Ensure registered user cannot login without password"""
user = add_user()
with self.client:
response = self.client.post(
'/v1/auth/login',
data=json.dumps(dict(
email=user.email
)),
content_type='application/json',
headers=[('Accept', 'application/json')]
)
data = json.loads(response.data.decode())
self.assertEqual(data['message'], 'Validation Error')
self.assertEqual(data['errors'][0]['field'], 'password')
self.assertEqual(response.status_code, 400)
def test_auth_login_no_email(self):
"""Ensure registered user cannot login without email"""
user, password = add_user_password()
with self.client:
response = self.client.post(
'/v1/auth/login',
data=json.dumps(dict(
password=password
)),
content_type='application/json',
headers=[('Accept', 'application/json')]
)
data = json.loads(response.data.decode())
self.assertEqual(data['message'], 'Validation Error')
self.assertEqual(data['errors'][0]['field'], 'email')
self.assertEqual(response.status_code, 400)
def test_auth_login_incorrect_password(self):
"""Ensure registered user cannot login with incorrect password"""
user = add_user()
with self.client:
response = self.client.post(
'/v1/auth/login',
data=json.dumps(dict(
email=user.email,
password=self.data_generator.password()
)),
content_type='application/json',
headers=[('Accept', 'application/json')]
)
data = json.loads(response.data.decode())
self.assertEqual(data['message'], 'Incorrect password.')
self.assertEqual(response.status_code, 400)
def test_auth_login_not_registered(self):
"""Ensure not registered user cannot login"""
with self.client:
response = self.client.post(
'/v1/auth/login',
data=json.dumps(dict(
email=self.data_generator.email(),
password=self.data_generator.password()
)),
content_type='application/json',
headers=[('Accept', 'application/json')]
)
data = json.loads(response.data.decode())
self.assertEqual(data['message'], 'User does not exist.')
self.assertEqual(response.content_type, 'application/json')
self.assertEqual(response.status_code, 404)
"""
Test /auth/logout
"""
def test_auth_logout(self):
"""Ensure auth logout works"""
user, password = add_user_password()
with self.client:
# User login
resp_login = self.client.post(
'/v1/auth/login',
data=json.dumps(dict(
email=user.email,
password=password
)),
content_type='application/json',
headers=[('Accept', 'application/json')]
)
# Valid token logout
response = self.client.get(
'/v1/auth/logout',
headers=[('Accept', 'application/json'),
(Constants.HttpHeaders.AUTHORIZATION,
'Bearer ' + json.loads(resp_login.data.decode())['auth_token'])]
)
data = json.loads(response.data.decode())
self.assertEqual(data['message'], 'Successfully logged out.')
self.assertEqual(response.status_code, 200)
def test_auth_logout_expired_token(self):
"""Ensure logout doesn't work with expired token"""
user, password = add_user_password()
with self.client:
resp_login = self.client.post(
'/v1/auth/login',
data=json.dumps(dict(
email=user.email,
password=password
)),
content_type='application/json',
headers=[('Accept', 'application/json')]
)
# Invalid token logout
time.sleep(4)
response = self.client.get(
'/v1/auth/logout',
headers=[('Accept', 'application/json'),
(Constants.HttpHeaders.AUTHORIZATION,
'Bearer ' + json.loads(resp_login.data.decode())['auth_token'])]
)
data = json.loads(response.data.decode())
self.assertEqual(data['message'], 'Signature expired. Please log in again.')
self.assertEqual(response.status_code, 401)
def test_auth_logout_no_token(self):
"""Ensure logout shows invalid token"""
with self.client:
response = self.client.get(
'/v1/auth/logout',
headers=[('Accept', 'application/json'), (Constants.HttpHeaders.AUTHORIZATION, 'Bearer invalid')])
data = json.loads(response.data.decode())
self.assertEqual(data['message'], 'Invalid token. Please log in again.')
self.assertEqual(response.status_code, 401)
"""
Test /auth/status
"""
def test_auth_status(self):
"""Ensure auth status check works"""
user, password = add_user_password()
with self.client:
resp_login = self.client.post(
'/v1/auth/login',
data=json.dumps(dict(
email=user.email,
password=password
)),
content_type='application/json',
headers=[('Accept', 'application/json')]
)
response = self.client.get(
'/v1/auth/status',
headers=[('Accept', 'application/json'), (
Constants.HttpHeaders.AUTHORIZATION,
'Bearer ' + json.loads(resp_login.data.decode())['auth_token'])]
)
data = json.loads(response.data.decode())
self.assertEqual(data['email'], user.email)
self.assertEqual(data['username'], user.username)
self.assertEqual(data['name'], user.name)
self.assertTrue(data['active'] is True)
self.assertTrue(data['created_at'])
self.assertEqual(response.status_code, 200)
def test_auth_status_invalid(self):
"""Ensure invalid token doesn't work for status check"""
with self.client:
response = self.client.get(
'/v1/auth/status',
headers=[('Accept', 'application/json'), (Constants.HttpHeaders.AUTHORIZATION, 'Bearer invalid')]
)
data = json.loads(response.data.decode())
self.assertEqual(data['message'], 'Invalid token. Please log in again.')
self.assertEqual(response.status_code, 401)
"""
Test /user
"""
def test_user_info(self):
"""Ensure user info works"""
user, password = add_user_password()
with self.client:
resp_login = self.client.post(
'/v1/auth/login',
data=json.dumps(dict(
email=user.email,
password=password
)),
content_type='application/json',
headers=[('Accept', 'application/json')]
)
response = self.client.get(
'/v1/user/',
headers=[('Accept', 'application/json'), (
Constants.HttpHeaders.AUTHORIZATION,
'Bearer ' + json.loads(resp_login.data.decode())['auth_token'])]
)
data = json.loads(response.data.decode())
self.assertEqual(data['email'], user.email)
self.assertEqual(data['username'], user.username)
self.assertEqual(data['name'], user.name)
self.assertEqual(data['social_type'], user.social_type)
self.assertEqual(data['social_id'], user.social_id)
self.assertTrue(data['active'] is True)
self.assertTrue(data['created_at'])
self.assertEqual(response.status_code, 200)
def test_user_info_invalid(self):
"""Ensure invalid token doesn't work for user info"""
with self.client:
response = self.client.get(
'/v1/user/',
headers=[('Accept', 'application/json'),
(Constants.HttpHeaders.AUTHORIZATION, 'Bearer invalid')]
)
data = json.loads(response.data.decode())
self.assertEqual(data['message'], 'Invalid token. Please log in again.')
self.assertEqual(response.status_code, 401) | 41.293578 | 114 | 0.545657 | 1,724 | 18,004 | 5.583527 | 0.072506 | 0.096613 | 0.071058 | 0.07272 | 0.866196 | 0.854457 | 0.846146 | 0.79358 | 0.79171 | 0.768544 | 0 | 0.008312 | 0.33176 | 18,004 | 436 | 115 | 41.293578 | 0.791788 | 0.063597 | 0 | 0.787115 | 0 | 0 | 0.136773 | 0 | 0 | 0 | 0 | 0 | 0.193277 | 1 | 0.058824 | false | 0.078431 | 0.016807 | 0 | 0.081232 | 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 |
51f15748043a7e507db897a6495cf593e136e9ce | 10,088 | py | Python | tests/test_sog_function.py | Megscammell/METOD-Algorithm | 7518145ec100599bddc880f5f52d28f9a3959108 | [
"MIT"
] | null | null | null | tests/test_sog_function.py | Megscammell/METOD-Algorithm | 7518145ec100599bddc880f5f52d28f9a3959108 | [
"MIT"
] | 1 | 2021-11-17T09:03:17.000Z | 2021-11-17T09:03:17.000Z | tests/test_sog_function.py | Megscammell/METOD-Algorithm | 7518145ec100599bddc880f5f52d28f9a3959108 | [
"MIT"
] | null | null | null | import numpy as np
from metod_alg import objective_functions as mt_obj
from metod_alg import check_metod_class as prev_mt_alg
def inefficient_sog_func1(point, p, sigma_sq, store_x0, matrix_test, store_c):
"""
Compute Sum of Gaussians function at a given point with given arguments.
Parameters
----------
point : 1-D array with shape (d, )
A point used to evaluate the function.
p : integer
Number of local minima.
sigma_sq: float or integer
Value of sigma squared.
store_x0 : 2-D array with shape (p, d).
matrix_test : 3-D array with shape (p, d, d).
store_c : 1-D array with shape (p, ).
Returns
-------
float(-function_val) : float
Function value.
"""
function_val = 0
for i in range(p):
function_val += store_c[i] * np.exp((- 1 / (2 * sigma_sq)) *
(np.transpose(point -
store_x0[i])) @ matrix_test[i] @
(point - store_x0[i]))
return float(-function_val)
def test_1():
"""Check prev_mt_alg.sog_func for d = 2."""
d = 2
p = 3
sigma_sq = 0.05
store_c = np.zeros((p, ))
store_rotation = np.zeros((p, d, d))
store_A = np.zeros((p, d, d))
store_x0 = np.zeros((p, d))
store_c[0] = 0.5
store_c[1] = 0.6
store_c[2] = 0.7
store_rotation[0] = np.array([[0.6, -0.3], [0.3, 0.6]])
store_rotation[1] = np.array([[0.4, -0.2], [0.2, 0.4]])
store_rotation[2] = np.array([[0.8, -0.6], [0.6, 0.8]])
store_A[0] = np.array([[1, 0], [0, 10]])
store_A[1] = np.array([[1, 0], [0, 2]])
store_A[2] = np.array([[1, 0], [0, 3]])
store_x0[0] = np.array([0.2, 0.3]).reshape(d, )
store_x0[1] = np.array([0.8, 0.9]).reshape(d, )
store_x0[2] = np.array([0.5, 0.5]).reshape(d, )
x = np.array([0.6, 0.6]).reshape(d,)
matrix = np.transpose(store_rotation, (0, 2, 1)) @ store_A @ store_rotation
cumulative_function = 0
for i in range(p):
c = store_c[i]
matrix_test = matrix[i]
x0 = store_x0[i]
calculation = ((-1 / (2 * sigma_sq)) * (x - x0).T @ matrix_test @ (x -
x0))
individual_function = c * np.exp(calculation)
cumulative_function += individual_function
final_function_val = float(-cumulative_function)
matrix_all = (np.transpose(store_rotation, (0, 2, 1)) @ store_A @
store_rotation)
func_args = p, sigma_sq, store_x0, matrix_all, store_c
test_function_val = prev_mt_alg.sog_func(x, *func_args)
assert(final_function_val == test_function_val)
def test_2():
"""Computational example for prev_mt_alg.sog_func()"""
d = 2
p = 3
sigma_sq = 0.05
store_c = np.zeros((p, ))
store_rotation = np.zeros((p, d, d))
store_A = np.zeros((p, d, d))
store_x0 = np.zeros((p, d))
store_c[0] = 0.5
store_c[1] = 0.6
store_c[2] = 0.7
store_rotation[0] = np.array([[0.6, -0.3], [0.3, 0.6]])
store_rotation[1] = np.array([[0.4, -0.2], [0.2, 0.4]])
store_rotation[2] = np.array([[0.8, -0.6], [0.6, 0.8]])
store_A[0] = np.array([[1, 0], [0, 10]])
store_A[1] = np.array([[1, 0], [0, 2]])
store_A[2] = np.array([[1, 0], [0, 3]])
store_x0[0] = np.array([0.2, 0.3]).reshape(d, )
store_x0[1] = np.array([0.8, 0.9]).reshape(d, )
store_x0[2] = np.array([0.5, 0.5]).reshape(d, )
x = np.array([0.6, 0.6]).reshape(d, )
matrix_all = (np.transpose(store_rotation, (0, 2, 1)) @ store_A @
store_rotation)
func_args = p, sigma_sq, store_x0, matrix_all, store_c
function_val = prev_mt_alg.sog_func(x, *func_args)
vals = (-(0.5 * np.exp(-9.225) + 0.6 * np.exp(-0.516) + 0.7 *
np.exp(-0.592)))
assert(np.round(function_val, 10) == np.round(vals, 10))
def test_3():
"""
Compares results of inefficient_sog_func1() and prev_mt_alg.sog_func().
Results should be the same.
"""
p = 10
d = 20
sigma_sq = 0.8
lambda_1 = 1
lambda_2 = 10
store_A = np.zeros((p, d, d))
store_x0 = np.zeros((p, d))
store_rotation = np.zeros((p, d, d))
store_c = np.zeros((p))
for i in range(p):
diag_vals = np.zeros(d)
diag_vals[:2] = np.array([lambda_1, lambda_2])
diag_vals[2:] = np.random.uniform(lambda_1 + 1,
lambda_2 - 1, (d - 2))
store_A[i] = np.diag(diag_vals)
store_x0[i] = np.random.uniform(0, 1, (d))
store_c[i] = np.random.uniform(0.5, 1)
store_rotation[i] = mt_obj.calculate_rotation_matrix(d, 3)
matrix_test = (np.transpose(store_rotation, (0, 2, 1)) @ store_A @
store_rotation)
func_args = (p, sigma_sq, store_x0, matrix_test, store_c)
x = np.random.uniform(0, 1, (d,))
func_val_1 = inefficient_sog_func1(x, *func_args)
func_val_2 = (prev_mt_alg.sog_func
(x, *func_args))
assert(np.round(func_val_1, 5) == np.round(func_val_2, 5))
def inefficient_sog_func2(point, p, sigma_sq, store_x0, matrix_test, store_c):
"""
Compute Sum of Gaussians function at a given point with given arguments.
Parameters
----------
point : 1-D array with shape (d, )
A point used to evaluate the function.
p : integer
Number of local minima.
sigma_sq: float or integer
Value of sigma squared.
store_x0 : 2-D array with shape (p, d).
matrix_test : 3-D array with shape (p, d, d).
store_c : 1-D array with shape (p, ).
Returns
-------
float(-function_val) : float
Function value.
"""
function_val = 0
for i in range(p):
function_val += store_c[i] * np.exp((- 1 / (2 * sigma_sq)) *
(np.transpose(point -
store_x0[i])) @ matrix_test[i] @
(point - store_x0[i]))
return float(-function_val * sigma_sq)
def test_4():
"""Check mt_obj.sog_function for d = 2."""
d = 2
p = 3
sigma_sq = 0.05
store_c = np.zeros((p, ))
store_rotation = np.zeros((p, d, d))
store_A = np.zeros((p, d, d))
store_x0 = np.zeros((p, d))
store_c[0] = 0.5
store_c[1] = 0.6
store_c[2] = 0.7
store_rotation[0] = np.array([[0.6, -0.3], [0.3, 0.6]])
store_rotation[1] = np.array([[0.4, -0.2], [0.2, 0.4]])
store_rotation[2] = np.array([[0.8, -0.6], [0.6, 0.8]])
store_A[0] = np.array([[1, 0], [0, 10]])
store_A[1] = np.array([[1, 0], [0, 2]])
store_A[2] = np.array([[1, 0], [0, 3]])
store_x0[0] = np.array([0.2, 0.3]).reshape(d, )
store_x0[1] = np.array([0.8, 0.9]).reshape(d, )
store_x0[2] = np.array([0.5, 0.5]).reshape(d, )
x = np.array([0.6, 0.6]).reshape(d,)
matrix = np.transpose(store_rotation, (0, 2, 1)) @ store_A @ store_rotation
cumulative_function = 0
for i in range(p):
c = store_c[i]
matrix_test = matrix[i]
x0 = store_x0[i]
calculation = ((-1 / (2 * sigma_sq)) * (x - x0).T @ matrix_test @ (x -
x0))
individual_function = c * np.exp(calculation)
cumulative_function += individual_function
final_function_val = float(-cumulative_function * sigma_sq)
matrix_all = (np.transpose(store_rotation, (0, 2, 1)) @ store_A @
store_rotation)
func_args = p, sigma_sq, store_x0, matrix_all, store_c
test_function_val = mt_obj.sog_function(x, *func_args)
assert(final_function_val == test_function_val)
def test_5():
"""Computational example for mt_obj.sog_function()"""
d = 2
p = 3
sigma_sq = 0.05
store_c = np.zeros((p, ))
store_rotation = np.zeros((p, d, d))
store_A = np.zeros((p, d, d))
store_x0 = np.zeros((p, d))
store_c[0] = 0.5
store_c[1] = 0.6
store_c[2] = 0.7
store_rotation[0] = np.array([[0.6, -0.3], [0.3, 0.6]])
store_rotation[1] = np.array([[0.4, -0.2], [0.2, 0.4]])
store_rotation[2] = np.array([[0.8, -0.6], [0.6, 0.8]])
store_A[0] = np.array([[1, 0], [0, 10]])
store_A[1] = np.array([[1, 0], [0, 2]])
store_A[2] = np.array([[1, 0], [0, 3]])
store_x0[0] = np.array([0.2, 0.3]).reshape(d, )
store_x0[1] = np.array([0.8, 0.9]).reshape(d, )
store_x0[2] = np.array([0.5, 0.5]).reshape(d, )
x = np.array([0.6, 0.6]).reshape(d, )
matrix_all = (np.transpose(store_rotation, (0, 2, 1)) @ store_A @
store_rotation)
func_args = p, sigma_sq, store_x0, matrix_all, store_c
function_val = mt_obj.sog_function(x, *func_args)
vals = (-(0.5 * np.exp(-9.225) + 0.6 * np.exp(-0.516) + 0.7 *
np.exp(-0.592))) * sigma_sq
assert(np.round(function_val, 10) == np.round(vals, 10))
def test_6():
"""
Compares results of inefficient_sog_func2() and mt_obj.sog_function().
Results should be the same.
"""
p = 10
d = 20
sigma_sq = 0.8
lambda_1 = 1
lambda_2 = 10
store_A = np.zeros((p, d, d))
store_x0 = np.zeros((p, d))
store_rotation = np.zeros((p, d, d))
store_c = np.zeros((p))
for i in range(p):
diag_vals = np.zeros(d)
diag_vals[:2] = np.array([lambda_1, lambda_2])
diag_vals[2:] = np.random.uniform(lambda_1 + 1,
lambda_2 - 1, (d - 2))
store_A[i] = np.diag(diag_vals)
store_x0[i] = np.random.uniform(0, 1, (d))
store_c[i] = np.random.uniform(0.5, 1)
store_rotation[i] = mt_obj.calculate_rotation_matrix(d, 3)
matrix_test = (np.transpose(store_rotation, (0, 2, 1)) @ store_A @
store_rotation)
func_args = (p, sigma_sq, store_x0, matrix_test, store_c)
x = np.random.uniform(0, 1, (d,))
func_val_1 = inefficient_sog_func2(x, *func_args)
func_val_2 = (mt_obj.sog_function
(x, *func_args))
assert(np.round(func_val_1, 5) == np.round(func_val_2, 5))
| 33.73913 | 79 | 0.548771 | 1,658 | 10,088 | 3.140531 | 0.064536 | 0.056462 | 0.043019 | 0.031112 | 0.93912 | 0.917995 | 0.911465 | 0.911465 | 0.908393 | 0.899174 | 0 | 0.070947 | 0.279044 | 10,088 | 298 | 80 | 33.852349 | 0.644988 | 0.133426 | 0 | 0.876847 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.029557 | 1 | 0.039409 | false | 0 | 0.014778 | 0 | 0.064039 | 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 |
cfdfe128af1cbf4261a348dad6294cc8f409ad5a | 18,180 | py | Python | sdk/python/pulumi_f5bigip/ltm/policy.py | pulumi/pulumi-f5bigip | 4bce074f8bd7cb42f359ef4814ca5b437230fd1c | [
"ECL-2.0",
"Apache-2.0"
] | 4 | 2018-12-21T23:30:33.000Z | 2021-10-12T16:38:27.000Z | sdk/python/pulumi_f5bigip/ltm/policy.py | pulumi/pulumi-f5bigip | 4bce074f8bd7cb42f359ef4814ca5b437230fd1c | [
"ECL-2.0",
"Apache-2.0"
] | 61 | 2019-01-09T01:50:19.000Z | 2022-03-31T15:27:17.000Z | sdk/python/pulumi_f5bigip/ltm/policy.py | pulumi/pulumi-f5bigip | 4bce074f8bd7cb42f359ef4814ca5b437230fd1c | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2019-10-05T10:36:30.000Z | 2019-10-05T10:36:30.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
from ._inputs import *
__all__ = ['PolicyArgs', 'Policy']
@pulumi.input_type
class PolicyArgs:
def __init__(__self__, *,
name: pulumi.Input[str],
controls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
published_copy: Optional[pulumi.Input[str]] = None,
requires: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
rules: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyRuleArgs']]]] = None,
strategy: Optional[pulumi.Input[str]] = None):
"""
The set of arguments for constructing a Policy resource.
:param pulumi.Input[str] name: Name of the Policy ( policy name should be in full path which is combination of partition and policy name )
:param pulumi.Input[Sequence[pulumi.Input[str]]] controls: Specifies the controls
:param pulumi.Input[str] published_copy: If you want to publish the policy else it will be deployed in Drafts mode.
:param pulumi.Input[Sequence[pulumi.Input[str]]] requires: Specifies the protocol
:param pulumi.Input[Sequence[pulumi.Input['PolicyRuleArgs']]] rules: Rules can be applied using the policy
:param pulumi.Input[str] strategy: Specifies the match strategy
"""
pulumi.set(__self__, "name", name)
if controls is not None:
pulumi.set(__self__, "controls", controls)
if published_copy is not None:
pulumi.set(__self__, "published_copy", published_copy)
if requires is not None:
pulumi.set(__self__, "requires", requires)
if rules is not None:
pulumi.set(__self__, "rules", rules)
if strategy is not None:
pulumi.set(__self__, "strategy", strategy)
@property
@pulumi.getter
def name(self) -> pulumi.Input[str]:
"""
Name of the Policy ( policy name should be in full path which is combination of partition and policy name )
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: pulumi.Input[str]):
pulumi.set(self, "name", value)
@property
@pulumi.getter
def controls(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
"""
Specifies the controls
"""
return pulumi.get(self, "controls")
@controls.setter
def controls(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "controls", value)
@property
@pulumi.getter(name="publishedCopy")
def published_copy(self) -> Optional[pulumi.Input[str]]:
"""
If you want to publish the policy else it will be deployed in Drafts mode.
"""
return pulumi.get(self, "published_copy")
@published_copy.setter
def published_copy(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "published_copy", value)
@property
@pulumi.getter
def requires(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
"""
Specifies the protocol
"""
return pulumi.get(self, "requires")
@requires.setter
def requires(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "requires", value)
@property
@pulumi.getter
def rules(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['PolicyRuleArgs']]]]:
"""
Rules can be applied using the policy
"""
return pulumi.get(self, "rules")
@rules.setter
def rules(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyRuleArgs']]]]):
pulumi.set(self, "rules", value)
@property
@pulumi.getter
def strategy(self) -> Optional[pulumi.Input[str]]:
"""
Specifies the match strategy
"""
return pulumi.get(self, "strategy")
@strategy.setter
def strategy(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "strategy", value)
@pulumi.input_type
class _PolicyState:
def __init__(__self__, *,
controls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name: Optional[pulumi.Input[str]] = None,
published_copy: Optional[pulumi.Input[str]] = None,
requires: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
rules: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyRuleArgs']]]] = None,
strategy: Optional[pulumi.Input[str]] = None):
"""
Input properties used for looking up and filtering Policy resources.
:param pulumi.Input[Sequence[pulumi.Input[str]]] controls: Specifies the controls
:param pulumi.Input[str] name: Name of the Policy ( policy name should be in full path which is combination of partition and policy name )
:param pulumi.Input[str] published_copy: If you want to publish the policy else it will be deployed in Drafts mode.
:param pulumi.Input[Sequence[pulumi.Input[str]]] requires: Specifies the protocol
:param pulumi.Input[Sequence[pulumi.Input['PolicyRuleArgs']]] rules: Rules can be applied using the policy
:param pulumi.Input[str] strategy: Specifies the match strategy
"""
if controls is not None:
pulumi.set(__self__, "controls", controls)
if name is not None:
pulumi.set(__self__, "name", name)
if published_copy is not None:
pulumi.set(__self__, "published_copy", published_copy)
if requires is not None:
pulumi.set(__self__, "requires", requires)
if rules is not None:
pulumi.set(__self__, "rules", rules)
if strategy is not None:
pulumi.set(__self__, "strategy", strategy)
@property
@pulumi.getter
def controls(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
"""
Specifies the controls
"""
return pulumi.get(self, "controls")
@controls.setter
def controls(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "controls", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
Name of the Policy ( policy name should be in full path which is combination of partition and policy name )
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter(name="publishedCopy")
def published_copy(self) -> Optional[pulumi.Input[str]]:
"""
If you want to publish the policy else it will be deployed in Drafts mode.
"""
return pulumi.get(self, "published_copy")
@published_copy.setter
def published_copy(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "published_copy", value)
@property
@pulumi.getter
def requires(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
"""
Specifies the protocol
"""
return pulumi.get(self, "requires")
@requires.setter
def requires(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "requires", value)
@property
@pulumi.getter
def rules(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['PolicyRuleArgs']]]]:
"""
Rules can be applied using the policy
"""
return pulumi.get(self, "rules")
@rules.setter
def rules(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyRuleArgs']]]]):
pulumi.set(self, "rules", value)
@property
@pulumi.getter
def strategy(self) -> Optional[pulumi.Input[str]]:
"""
Specifies the match strategy
"""
return pulumi.get(self, "strategy")
@strategy.setter
def strategy(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "strategy", value)
class Policy(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
controls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name: Optional[pulumi.Input[str]] = None,
published_copy: Optional[pulumi.Input[str]] = None,
requires: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
rules: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyRuleArgs']]]]] = None,
strategy: Optional[pulumi.Input[str]] = None,
__props__=None):
"""
`ltm.Policy` Configures ltm policies to manage traffic assigned to a virtual server
For resources should be named with their "full path". The full path is the combination of the partition + name of the resource. For example /Common/my-pool.
## Example Usage
```python
import pulumi
import pulumi_f5bigip as f5bigip
mypool = f5bigip.ltm.Pool("mypool",
name="/Common/test-pool",
allow_nat="yes",
allow_snat="yes",
load_balancing_mode="round-robin")
test_policy = f5bigip.ltm.Policy("test-policy",
name="/Common/test-policy",
strategy="first-match",
requires=["http"],
controls=["forwarding"],
rules=[f5bigip.ltm.PolicyRuleArgs(
name="rule6",
actions=[f5bigip.ltm.PolicyRuleActionArgs(
forward=True,
pool=mypool.name,
)],
)],
opts=pulumi.ResourceOptions(depends_on=[mypool]))
```
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[Sequence[pulumi.Input[str]]] controls: Specifies the controls
:param pulumi.Input[str] name: Name of the Policy ( policy name should be in full path which is combination of partition and policy name )
:param pulumi.Input[str] published_copy: If you want to publish the policy else it will be deployed in Drafts mode.
:param pulumi.Input[Sequence[pulumi.Input[str]]] requires: Specifies the protocol
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyRuleArgs']]]] rules: Rules can be applied using the policy
:param pulumi.Input[str] strategy: Specifies the match strategy
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: PolicyArgs,
opts: Optional[pulumi.ResourceOptions] = None):
"""
`ltm.Policy` Configures ltm policies to manage traffic assigned to a virtual server
For resources should be named with their "full path". The full path is the combination of the partition + name of the resource. For example /Common/my-pool.
## Example Usage
```python
import pulumi
import pulumi_f5bigip as f5bigip
mypool = f5bigip.ltm.Pool("mypool",
name="/Common/test-pool",
allow_nat="yes",
allow_snat="yes",
load_balancing_mode="round-robin")
test_policy = f5bigip.ltm.Policy("test-policy",
name="/Common/test-policy",
strategy="first-match",
requires=["http"],
controls=["forwarding"],
rules=[f5bigip.ltm.PolicyRuleArgs(
name="rule6",
actions=[f5bigip.ltm.PolicyRuleActionArgs(
forward=True,
pool=mypool.name,
)],
)],
opts=pulumi.ResourceOptions(depends_on=[mypool]))
```
:param str resource_name: The name of the resource.
:param PolicyArgs 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(PolicyArgs, 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,
controls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name: Optional[pulumi.Input[str]] = None,
published_copy: Optional[pulumi.Input[str]] = None,
requires: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
rules: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyRuleArgs']]]]] = None,
strategy: 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__ = PolicyArgs.__new__(PolicyArgs)
__props__.__dict__["controls"] = controls
if name is None and not opts.urn:
raise TypeError("Missing required property 'name'")
__props__.__dict__["name"] = name
__props__.__dict__["published_copy"] = published_copy
__props__.__dict__["requires"] = requires
__props__.__dict__["rules"] = rules
__props__.__dict__["strategy"] = strategy
super(Policy, __self__).__init__(
'f5bigip:ltm/policy:Policy',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None,
controls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name: Optional[pulumi.Input[str]] = None,
published_copy: Optional[pulumi.Input[str]] = None,
requires: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
rules: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyRuleArgs']]]]] = None,
strategy: Optional[pulumi.Input[str]] = None) -> 'Policy':
"""
Get an existing Policy 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[Sequence[pulumi.Input[str]]] controls: Specifies the controls
:param pulumi.Input[str] name: Name of the Policy ( policy name should be in full path which is combination of partition and policy name )
:param pulumi.Input[str] published_copy: If you want to publish the policy else it will be deployed in Drafts mode.
:param pulumi.Input[Sequence[pulumi.Input[str]]] requires: Specifies the protocol
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyRuleArgs']]]] rules: Rules can be applied using the policy
:param pulumi.Input[str] strategy: Specifies the match strategy
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _PolicyState.__new__(_PolicyState)
__props__.__dict__["controls"] = controls
__props__.__dict__["name"] = name
__props__.__dict__["published_copy"] = published_copy
__props__.__dict__["requires"] = requires
__props__.__dict__["rules"] = rules
__props__.__dict__["strategy"] = strategy
return Policy(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter
def controls(self) -> pulumi.Output[Optional[Sequence[str]]]:
"""
Specifies the controls
"""
return pulumi.get(self, "controls")
@property
@pulumi.getter
def name(self) -> pulumi.Output[str]:
"""
Name of the Policy ( policy name should be in full path which is combination of partition and policy name )
"""
return pulumi.get(self, "name")
@property
@pulumi.getter(name="publishedCopy")
def published_copy(self) -> pulumi.Output[Optional[str]]:
"""
If you want to publish the policy else it will be deployed in Drafts mode.
"""
return pulumi.get(self, "published_copy")
@property
@pulumi.getter
def requires(self) -> pulumi.Output[Optional[Sequence[str]]]:
"""
Specifies the protocol
"""
return pulumi.get(self, "requires")
@property
@pulumi.getter
def rules(self) -> pulumi.Output[Optional[Sequence['outputs.PolicyRule']]]:
"""
Rules can be applied using the policy
"""
return pulumi.get(self, "rules")
@property
@pulumi.getter
def strategy(self) -> pulumi.Output[Optional[str]]:
"""
Specifies the match strategy
"""
return pulumi.get(self, "strategy")
| 41.131222 | 164 | 0.625688 | 2,065 | 18,180 | 5.346247 | 0.09201 | 0.120562 | 0.084964 | 0.088315 | 0.852717 | 0.829982 | 0.812681 | 0.801449 | 0.791033 | 0.772917 | 0 | 0.001195 | 0.263641 | 18,180 | 441 | 165 | 41.22449 | 0.823485 | 0.329098 | 0 | 0.760684 | 1 | 0 | 0.076434 | 0.002269 | 0 | 0 | 0 | 0 | 0 | 1 | 0.15812 | false | 0.004274 | 0.029915 | 0 | 0.282051 | 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 |
5c52b3ef644062d2dd75deef039b016e291a1f57 | 133 | py | Python | PostmanPython/mytype.py | SuperNova911/Postman | 21e566cdd05e378002a374433e257070c8d5ddd3 | [
"MIT"
] | 1 | 2020-04-15T07:51:24.000Z | 2020-04-15T07:51:24.000Z | PostmanPython/mytype.py | SuperNova911/Postman | 21e566cdd05e378002a374433e257070c8d5ddd3 | [
"MIT"
] | null | null | null | PostmanPython/mytype.py | SuperNova911/Postman | 21e566cdd05e378002a374433e257070c8d5ddd3 | [
"MIT"
] | null | null | null | import ctypes
def int32(value):
return ctypes.c_int32(value).value
def uint32(value):
return ctypes.c_uint32(value).value | 14.777778 | 39 | 0.736842 | 20 | 133 | 4.8 | 0.4 | 0.208333 | 0.354167 | 0.375 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.071429 | 0.157895 | 133 | 9 | 39 | 14.777778 | 0.785714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.4 | false | 0 | 0.2 | 0.4 | 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 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 8 |
5ccadc5dab216e5f8302896397af124ed9daf802 | 20,012 | py | Python | lotka_volterra_plotter.py | geksafobiya/lotka-volterra-plotter | ffa0ba3e42a1943979d15c1828919147dbb730de | [
"MIT"
] | null | null | null | lotka_volterra_plotter.py | geksafobiya/lotka-volterra-plotter | ffa0ba3e42a1943979d15c1828919147dbb730de | [
"MIT"
] | null | null | null | lotka_volterra_plotter.py | geksafobiya/lotka-volterra-plotter | ffa0ba3e42a1943979d15c1828919147dbb730de | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Python standard library modules
import sys
# 3rd party modules
import matplotlib
import matplotlib.backends.backend_qt5agg as backend_qt5agg
from matplotlib.figure import Figure
import PyQt5.QtCore as QtCore
import PyQt5.QtGui as QtGui
import PyQt5.QtWidgets as QtWidgets
# Local application modules
from growth_calculator import GrowthCalculator
from options_menu import OptionsMenu_3_species
from options_menu_4_species import OptionsMenu_4_species
from options_menu_2 import OptionsMenu_2_species
import resources
APP_NAME = 'Lotka-Volterra'
AUTHOR = 'Клименко Анастасия'
class AppForm_2_species(QtWidgets.QMainWindow):
def __init__(self, parent=None):
QtWidgets.QMainWindow.__init__(self, parent)
# название окна
self.setWindowTitle(APP_NAME)
# Создание в меню параметров в виджете док-станции
self.options_menu = OptionsMenu_2_species()
dock = QtWidgets.QDockWidget('Настройки коэффициентов', self)
dock.setFeatures(
QtWidgets.QDockWidget.NoDockWidgetFeatures |
QtWidgets.QDockWidget.DockWidgetMovable |
QtWidgets.QDockWidget.DockWidgetFloatable
)
dock.setAllowedAreas(
QtCore.Qt.LeftDockWidgetArea | QtCore.Qt.RightDockWidgetArea,
)
dock.setWidget(self.options_menu)
self.addDockWidget(QtCore.Qt.LeftDockWidgetArea, dock)
# Подключение сигналов из меню параметров
self.options_menu.update_btn.clicked.connect(self.clear_graph)
self.options_menu.update_btn.clicked.connect(self.calculate_data)
self.options_menu.clear_graph_btn.clicked.connect(self.clear_graph)
self.options_menu.legend_cb.stateChanged.connect(self.redraw_graph)
self.options_menu.grid_cb.stateChanged.connect(self.redraw_graph)
self.options_menu.legend_loc_cb.currentIndexChanged.connect(self.redraw_graph)
# создание графика
fig = Figure((7.0, 3.0), dpi=100)
self.canvas = backend_qt5agg.FigureCanvasQTAgg(fig)
self.canvas.setParent(self)
self.axes = fig.add_subplot(111)
backend_qt5agg.NavigationToolbar2QT(self.canvas, self.canvas)
# инициализация графа
self.clear_graph()
self.setCentralWidget(self.canvas)
# создать менюбар действий
about_action = QtWidgets.QAction('&About', self)
about_action.setToolTip('About')
about_action.setIcon(QtGui.QIcon(':/resources/icon_info.png'))
about_action.triggered.connect(self.show_about)
# создать менюбар
file_exit_action = QtWidgets.QAction('&Exit', self)
file_exit_action.setToolTip('Exit')
file_exit_action.setIcon(QtGui.QIcon(':/resources/door_open.png'))
file_exit_action.triggered.connect(self.close)
file_menu = self.menuBar().addMenu('&Exit')
file_menu.addAction(file_exit_action)
help_menu = self.menuBar().addMenu('&Help')
help_menu.addAction(about_action)
def calculate_data(self):
# объект GrowthCalculator
growth = GrowthCalculator()
# Update the GrowthCalculator parameters from the GUI options
growth.a11 = self.options_menu.a11_sb.value()
growth.b1 = self.options_menu.b1_sb.value()
growth.b2 = self.options_menu.b2_sb.value()
growth.a21 = self.options_menu.a21_sb.value()
growth.predators = self.options_menu.predator_sb.value()
growth.prey = self.options_menu.prey_sb.value()
growth.iterations = self.options_menu.iterations_sb.value()
growth.dt = self.options_menu.timedelta_sb.value()
# Calculate the population growths
results = growth.calculate()
self.predator_history.extend(results['predator'])
self.prey_history.extend(results['prey'])
if (len(self.predator_history) == 0 and
len(self.prey_history) == 0 == 0):
QtWidgets.QMessageBox.information(self, 'Error', 'Ошибка')
return
# последнее в векторе количество популяции на панель инструментов параметров
# print('self.predator_history[-1]', self.predator_history[-1])
# self.options_menu.predator_sb.setValue(self.predator_history[-1])
# self.options_menu.prey_sb.setValue(self.prey_history[-1])
# self.options_menu.superpredators_sb.setValue(self.superpredator_history[-1])
# перерисовать граф
self.redraw_graph()
def clear_graph(self):
# очистить историю популяций
self.predator_history = []
self.prey_history = []
# перерисовать граф
self.redraw_graph()
def redraw_graph(self):
# очистить граф
self.axes.clear()
# Create the graph labels
self.axes.set_title('Цикл роста хищников и жертв')
self.axes.set_xlabel('Итерации')
self.axes.set_ylabel('Размер популяции')
# Plot the current population data
if self.predator_history:
self.axes.plot(self.predator_history, 'r-', label='хищники')
if self.prey_history:
self.axes.plot(self.prey_history, 'b-', label='жертвы')
# если нужно, создаём легенду
if self.options_menu.legend_cb.isChecked():
if self.predator_history or self.prey_history:
legend_loc = str(
self.options_menu.legend_loc_cb.currentText()
).lower()
legend = matplotlib.font_manager.FontProperties(size=10)
self.axes.legend(loc=legend_loc, prop=legend)
# если нужно, сетки на графике
self.axes.grid(self.options_menu.grid_cb.isChecked())
# рисуем график
self.canvas.draw()
def show_about(self):
"""
отображение диалогового окошка "about".
"""
message = '''<font size="+2">%s</font>
<p>Дипломная работа на тему системы дифференциальных уравнений Лотки-Вольтерра.
<p>Написана %s, группа КА-73.
''' %(APP_NAME, AUTHOR)
QtWidgets.QMessageBox.about(self, 'About' + APP_NAME, message)
class AppForm_3_species(QtWidgets.QMainWindow):
def __init__(self, parent=None):
QtWidgets.QMainWindow.__init__(self, parent)
# название окна
self.setWindowTitle(APP_NAME)
# Создание в меню параметров в виджете док-станции
self.options_menu = OptionsMenu_3_species()
dock = QtWidgets.QDockWidget('Настройки коэффициентов', self)
dock.setFeatures(
QtWidgets.QDockWidget.NoDockWidgetFeatures |
QtWidgets.QDockWidget.DockWidgetMovable |
QtWidgets.QDockWidget.DockWidgetFloatable
)
dock.setAllowedAreas(
QtCore.Qt.LeftDockWidgetArea | QtCore.Qt.RightDockWidgetArea,
)
dock.setWidget(self.options_menu)
self.addDockWidget(QtCore.Qt.LeftDockWidgetArea, dock)
# Подключение сигналов из меню параметров
self.options_menu.update_btn.clicked.connect(self.clear_graph)
self.options_menu.update_btn.clicked.connect(self.calculate_data)
self.options_menu.clear_graph_btn.clicked.connect(self.clear_graph)
self.options_menu.legend_cb.stateChanged.connect(self.redraw_graph)
self.options_menu.grid_cb.stateChanged.connect(self.redraw_graph)
self.options_menu.legend_loc_cb.currentIndexChanged.connect(self.redraw_graph)
# создание графика
fig = Figure((7.0, 3.0), dpi=100)
self.canvas = backend_qt5agg.FigureCanvasQTAgg(fig)
self.canvas.setParent(self)
self.axes = fig.add_subplot(111)
backend_qt5agg.NavigationToolbar2QT(self.canvas, self.canvas)
# инициализация графа
self.clear_graph()
self.setCentralWidget(self.canvas)
# создать менюбар действий
about_action = QtWidgets.QAction('&About', self)
about_action.setToolTip('About')
about_action.setIcon(QtGui.QIcon(':/resources/icon_info.png'))
about_action.triggered.connect(self.show_about)
# создать менюбар
file_exit_action = QtWidgets.QAction('&Exit', self)
file_exit_action.setToolTip('Exit')
file_exit_action.setIcon(QtGui.QIcon(':/resources/door_open.png'))
file_exit_action.triggered.connect(self.close)
file_menu = self.menuBar().addMenu('&Exit')
file_menu.addAction(file_exit_action)
help_menu = self.menuBar().addMenu('&Help')
help_menu.addAction(about_action)
def calculate_data(self):
# объект GrowthCalculator
growth = GrowthCalculator()
# Update the GrowthCalculator parameters from the GUI options
# growth.a11 = self.options_menu.a11_sb.value()
growth.b1 = self.options_menu.b1_sb.value()
growth.a12 = self.options_menu.a12_sb.value()
growth.a13 = self.options_menu.a13_sb.value()
growth.b2 = self.options_menu.b2_sb.value()
growth.a21 = self.options_menu.a21_sb.value()
# growth.a22 = self.options_menu.a22_sb.value()
growth.a23 = self.options_menu.a23_sb.value()
growth.b3 = self.options_menu.b3_sb.value()
growth.a31 = self.options_menu.a31_sb.value()
growth.a32 = self.options_menu.a32_sb.value()
# growth.a33 = self.options_menu.a33_sb.value()
growth.predators = self.options_menu.predator_sb.value()
growth.prey = self.options_menu.prey_sb.value()
growth.superpredator = self.options_menu.superpredator_sb.value()
growth.iterations = self.options_menu.iterations_sb.value()
growth.dt = self.options_menu.timedelta_sb.value()
# Calculate the population growths
results = growth.calculate()
self.predator_history.extend(results['predator'])
self.prey_history.extend(results['prey'])
self.superpredator_history.extend(results['superpredator'])
if (len(self.predator_history) == 0 and
len(self.prey_history) == 0 and
len(self.superpredator_history) == 0):
QtWidgets.QMessageBox.information(self, 'Error', 'Ошибка')
return
# последнее в векторе количество популяции на панель инструментов параметров
# print('self.predator_history[-1]', self.predator_history[-1])
# self.options_menu.predator_sb.setValue(self.predator_history[-1])
# self.options_menu.prey_sb.setValue(self.prey_history[-1])
# self.options_menu.superpredators_sb.setValue(self.superpredator_history[-1])
# перерисовать граф
self.redraw_graph()
def clear_graph(self):
# очистить историю популяций
self.predator_history = []
self.prey_history = []
self.superpredator_history = []
# перерисовать граф
self.redraw_graph()
def redraw_graph(self):
# очистить граф
self.axes.clear()
# Create the graph labels
self.axes.set_title('Цикл роста хищников, жертв и суперхищников')
self.axes.set_xlabel('Итерации')
self.axes.set_ylabel('Размер популяции')
# Plot the current population data
if self.predator_history:
self.axes.plot(self.predator_history, 'r-', label='хищники')
if self.prey_history:
self.axes.plot(self.prey_history, 'b-', label='жертвы')
if self.superpredator_history:
self.axes.plot(self.superpredator_history, 'g-', label='суперхищники')
# если нужно, создаём легенду
if self.options_menu.legend_cb.isChecked():
if self.predator_history or self.prey_history or self.superpredator_history:
legend_loc = str(
self.options_menu.legend_loc_cb.currentText()
).lower()
legend = matplotlib.font_manager.FontProperties(size=10)
self.axes.legend(loc=legend_loc, prop=legend)
# если нужно, сетки на графике
self.axes.grid(self.options_menu.grid_cb.isChecked())
# рисуем график
self.canvas.draw()
def show_about(self):
"""
отображение диалогового окошка "about".
"""
message = '''<font size="+2">%s</font>
<p>Дипломная работа на тему системы дифференциальных уравнений Лотки-Вольтерра.
<p>Написана %s, группа КА-73.
''' %(APP_NAME, AUTHOR)
QtWidgets.QMessageBox.about(self, 'About' + APP_NAME, message)
class AppForm_4_species(QtWidgets.QMainWindow):
def __init__(self, parent=None):
QtWidgets.QMainWindow.__init__(self, parent)
# название окна
self.setWindowTitle(APP_NAME)
# Создание в меню параметров в виджете док-станции
self.options_menu = OptionsMenu_4_species()
dock = QtWidgets.QDockWidget('Настройки коэффициентов', self)
dock.setFeatures(
QtWidgets.QDockWidget.NoDockWidgetFeatures |
QtWidgets.QDockWidget.DockWidgetMovable |
QtWidgets.QDockWidget.DockWidgetFloatable
)
dock.setAllowedAreas(
QtCore.Qt.LeftDockWidgetArea | QtCore.Qt.RightDockWidgetArea,
)
dock.setWidget(self.options_menu)
self.addDockWidget(QtCore.Qt.LeftDockWidgetArea, dock)
# Подключение сигналов из меню параметров
self.options_menu.update_btn.clicked.connect(self.clear_graph)
self.options_menu.update_btn.clicked.connect(self.calculate_data)
self.options_menu.clear_graph_btn.clicked.connect(self.clear_graph)
self.options_menu.legend_cb.stateChanged.connect(self.redraw_graph)
self.options_menu.grid_cb.stateChanged.connect(self.redraw_graph)
self.options_menu.legend_loc_cb.currentIndexChanged.connect(self.redraw_graph)
# создание графика
fig = Figure((7.0, 3.0), dpi=100)
self.canvas = backend_qt5agg.FigureCanvasQTAgg(fig)
self.canvas.setParent(self)
self.axes = fig.add_subplot(111)
backend_qt5agg.NavigationToolbar2QT(self.canvas, self.canvas)
# инициализация графа
self.clear_graph()
self.setCentralWidget(self.canvas)
# создать менюбар действий
about_action = QtWidgets.QAction('&About', self)
about_action.setToolTip('About')
about_action.setIcon(QtGui.QIcon(':/resources/icon_info.png'))
about_action.triggered.connect(self.show_about)
# создать менюбар
file_exit_action = QtWidgets.QAction('&Exit', self)
file_exit_action.setToolTip('Exit')
file_exit_action.setIcon(QtGui.QIcon(':/resources/door_open.png'))
file_exit_action.triggered.connect(self.close)
file_menu = self.menuBar().addMenu('&Exit')
file_menu.addAction(file_exit_action)
help_menu = self.menuBar().addMenu('&Help')
help_menu.addAction(about_action)
def calculate_data(self):
self.options_menu.update_btn.setEnabled(False)
# объект GrowthCalculator
growth = GrowthCalculator()
# Update the GrowthCalculator parameters from the GUI options
growth.b1 = self.options_menu.b1_sb.value()
growth.a11 = self.options_menu.a11_sb.value()
growth.a12 = self.options_menu.a12_sb.value()
growth.a13 = self.options_menu.a13_sb.value()
growth.b2 = self.options_menu.b2_sb.value()
growth.a21 = self.options_menu.a21_sb.value()
growth.a22 = self.options_menu.a22_sb.value()
growth.a23 = self.options_menu.a23_sb.value()
growth.b3 = self.options_menu.b3_sb.value()
growth.a31 = self.options_menu.a31_sb.value()
growth.a32 = self.options_menu.a32_sb.value()
growth.a33 = self.options_menu.a33_sb.value()
growth.b4 = self.options_menu.b4_sb.value()
# growth.a41 = self.options_menu.a41_sb.value()
# growth.a42 = self.options_menu.a42_sb.value()
growth.predator = self.options_menu.predator_sb.value()
# growth.predators2 = self.options_menu.predator2_sb.value()
growth.prey1 = self.options_menu.prey1_sb.value()
growth.prey2 = self.options_menu.prey2_sb.value()
# growth.predator3 = self.options_menu.predator3_sb.value()
growth.superpredator = self.options_menu.superpredator_sb.value()
growth.iterations = self.options_menu.iterations_sb.value()
growth.dt = self.options_menu.timedelta_sb.value()
# Calculate the population growths
results = growth.calculate()
self.predator_history.extend(results['predator'])
self.prey1_history.extend(results['prey1'])
self.prey2_history.extend(results['prey2'])
self.superpredator_history.extend(results['superpredator'])
# self.predator2_history.extend(results['predator2'])
# self.predator3_history.extend(results['predator3'])
if (len(self.predator_history) == 0 and
len(self.prey1_history) == 0 and
len(self.prey2_history) == 0 and
len(self.superpredator_history) == 0):
QtWidgets.QMessageBox.information(self, 'Error', 'Ошибка')
self.options_menu.update_btn.setEnabled(True)
return
# последнее в векторе количество популяции на панель инструментов параметров
# print('self.predator_history[-1]', self.predator_history[-1])
# self.options_menu.predator_sb.setValue(self.predator_history[-1])
# self.options_menu.prey_sb.setValue(self.prey_history[-1])
# self.options_menu.superpredators_sb.setValue(self.superpredator_history[-1])
# перерисовать граф
self.redraw_graph()
self.options_menu.update_btn.setEnabled(True)
def clear_graph(self):
# очистить историю популяций
self.predator_history = []
self.prey1_history = []
self.superpredator_history = []
self.prey2_history = []
# перерисовать граф
self.redraw_graph()
def redraw_graph(self):
# очистить граф
self.axes.clear()
# Create the graph labels
self.axes.set_title('Цикл роста хищников, суперхищников и двух видов жертв')
self.axes.set_xlabel('Итерации')
self.axes.set_ylabel('Размер популяции')
# Plot the current population data
if self.prey1_history:
self.axes.plot(self.prey1_history, 'g-', color='#0a0b0c3a', linewidth=6, label='жертвы вида 1')
if self.predator_history:
self.axes.plot(self.predator_history, 'r-', color='#0d7b0c5a', linewidth=6, label='хищники')
if self.superpredator_history:
self.axes.plot(self.superpredator_history, 'b-', label='суперхищники')
if self.prey2_history:
self.axes.plot(self.prey2_history, 'r-', label='жертвы вида 2')
# если нужно, создаём легенду
if self.options_menu.legend_cb.isChecked():
if self.prey1_history or self.predator_history or self.superpredator_history or self.prey2_history:
legend_loc = str(
self.options_menu.legend_loc_cb.currentText()
).lower()
legend = matplotlib.font_manager.FontProperties(size=10)
self.axes.legend(loc=legend_loc, prop=legend)
# если нужно, сетки на графике
self.axes.grid(self.options_menu.grid_cb.isChecked())
# рисуем график
self.canvas.draw()
def show_about(self):
"""
отображение диалогового окошка "about".
"""
message = '''<font size="+2">%s</font>
<p>Дипломная работа на тему системы дифференциальных уравнений Лотки-Вольтерра.
<p>Написана %s, группа КА-73.
''' %(APP_NAME, AUTHOR)
QtWidgets.QMessageBox.about(self, 'About' + APP_NAME, message)
if __name__ == "__main__":
app = QtWidgets.QApplication(sys.argv)
app.setWindowIcon(QtGui.QIcon(':/resources/icon.svg'))
form = OptionsMenu_4_species()
form.show()
app.exec_()
| 38.933852 | 111 | 0.667699 | 2,311 | 20,012 | 5.581134 | 0.118131 | 0.081873 | 0.108156 | 0.020158 | 0.894402 | 0.884478 | 0.874089 | 0.865405 | 0.865405 | 0.858583 | 0 | 0.015615 | 0.228763 | 20,012 | 513 | 112 | 39.009747 | 0.820073 | 0.161303 | 0 | 0.810127 | 0 | 0 | 0.079014 | 0.00902 | 0 | 0 | 0 | 0 | 0 | 1 | 0.047468 | false | 0 | 0.037975 | 0 | 0.10443 | 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 |
8f8622a2547dc85aa4ec318e0c7c9d107bcec50b | 68 | py | Python | graphn/utils/__init__.py | yop0/GraphN | 2aa56eea724c89f4c607ef432678bd4f1860592d | [
"MIT"
] | 2 | 2018-12-17T22:13:15.000Z | 2020-03-13T02:07:07.000Z | graphn/utils/__init__.py | yop0/GraphN | 2aa56eea724c89f4c607ef432678bd4f1860592d | [
"MIT"
] | 1 | 2019-03-10T00:33:23.000Z | 2019-03-10T07:14:07.000Z | graphn/utils/__init__.py | yop0/GraphN | 2aa56eea724c89f4c607ef432678bd4f1860592d | [
"MIT"
] | 1 | 2019-01-28T10:41:02.000Z | 2019-01-28T10:41:02.000Z | from ._la_utils import frobenius_norm
from ._la_utils import entropy | 34 | 37 | 0.867647 | 11 | 68 | 4.909091 | 0.636364 | 0.222222 | 0.407407 | 0.62963 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.102941 | 68 | 2 | 38 | 34 | 0.885246 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 7 |
8f9a12e753a581fb1b35ada5b2def694125970e4 | 2,125 | py | Python | cwa_qr/test_rollover.py | wolf128058/cwa-qr | 71c5e6a2f030ce3b527c1e9e111d0cadef050d86 | [
"MIT"
] | 16 | 2021-04-22T07:12:18.000Z | 2022-02-07T04:54:54.000Z | cwa_qr/test_rollover.py | wolf128058/cwa-qr | 71c5e6a2f030ce3b527c1e9e111d0cadef050d86 | [
"MIT"
] | 10 | 2021-04-22T15:33:23.000Z | 2022-03-06T10:54:07.000Z | cwa_qr/test_rollover.py | wolf128058/cwa-qr | 71c5e6a2f030ce3b527c1e9e111d0cadef050d86 | [
"MIT"
] | 7 | 2021-04-22T12:37:20.000Z | 2021-08-09T05:47:54.000Z | from datetime import datetime, time, date
from . import rollover
def test_rollover():
rollover_time = time(4, 0)
# between 4:00 and 23:59 it's the given day
assert rollover.rollover_date(datetime(2021, 1, 1, 6, 0), rollover_time) == date(2021, 1, 1)
assert rollover.rollover_date(datetime(2021, 1, 1, 12, 0), rollover_time) == date(2021, 1, 1)
assert rollover.rollover_date(datetime(2021, 1, 1, 20, 0), rollover_time) == date(2021, 1, 1)
assert rollover.rollover_date(datetime(2021, 1, 1, 22, 0), rollover_time) == date(2021, 1, 1)
assert rollover.rollover_date(datetime(2021, 1, 1, 23, 59), rollover_time) == date(2021, 1, 1)
# between 0:00 and 4:00 on the following day, it's still the day before
assert rollover.rollover_date(datetime(2021, 1, 2, 0, 0), rollover_time) == date(2021, 1, 1)
assert rollover.rollover_date(datetime(2021, 1, 2, 2, 0), rollover_time) == date(2021, 1, 1)
assert rollover.rollover_date(datetime(2021, 1, 2, 3, 0), rollover_time) == date(2021, 1, 1)
assert rollover.rollover_date(datetime(2021, 1, 2, 3, 59), rollover_time) == date(2021, 1, 1)
# after 4:00 it's the next day
assert rollover.rollover_date(datetime(2021, 1, 2, 4, 0), rollover_time) == date(2021, 1, 2)
assert rollover.rollover_date(datetime(2021, 1, 2, 12, 0), rollover_time) == date(2021, 1, 2)
assert rollover.rollover_date(datetime(2021, 1, 2, 20, 0), rollover_time) == date(2021, 1, 2)
assert rollover.rollover_date(datetime(2021, 1, 2, 23, 0), rollover_time) == date(2021, 1, 2)
assert rollover.rollover_date(datetime(2021, 1, 2, 23, 59), rollover_time) == date(2021, 1, 2)
# and it continues to be the next day until 4:00
assert rollover.rollover_date(datetime(2021, 1, 3, 0, 0), rollover_time) == date(2021, 1, 2)
assert rollover.rollover_date(datetime(2021, 1, 3, 2, 0), rollover_time) == date(2021, 1, 2)
assert rollover.rollover_date(datetime(2021, 1, 3, 3, 59), rollover_time) == date(2021, 1, 2)
# then it's the day after
assert rollover.rollover_date(datetime(2021, 1, 3, 4, 0), rollover_time) == date(2021, 1, 3)
| 59.027778 | 98 | 0.680471 | 357 | 2,125 | 3.943978 | 0.112045 | 0.127841 | 0.28125 | 0.332386 | 0.828125 | 0.828125 | 0.828125 | 0.732244 | 0.585938 | 0.585938 | 0 | 0.161932 | 0.171765 | 2,125 | 35 | 99 | 60.714286 | 0.638068 | 0.099294 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.818182 | 1 | 0.045455 | false | 0 | 0.090909 | 0 | 0.136364 | 0 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
56b8ad7bf2e07b2ddea414fe9a7e0ba2d2b02c55 | 10,130 | py | Python | ebe_scripts/average_event_balance_function.py | LipeiDu/hadronic_afterburner_toolkit | 770cbd2582c988d3950e6707ceaeb7752212ac46 | [
"MIT"
] | 3 | 2016-12-01T21:25:15.000Z | 2021-08-17T19:57:37.000Z | ebe_scripts/average_event_balance_function.py | LipeiDu/hadronic_afterburner_toolkit | 770cbd2582c988d3950e6707ceaeb7752212ac46 | [
"MIT"
] | null | null | null | ebe_scripts/average_event_balance_function.py | LipeiDu/hadronic_afterburner_toolkit | 770cbd2582c988d3950e6707ceaeb7752212ac46 | [
"MIT"
] | 4 | 2018-01-26T01:43:41.000Z | 2020-10-21T19:01:27.000Z | #! /usr/bin/env python3
"""
This script performs event averaging for the balance correlation function
calculated from event-by-event simulations
Format from balance correlation function file:
"""
from sys import argv, exit
from os import path, mkdir
from glob import glob
from numpy import *
import shutil
# define colors
purple = "\033[95m"
green = "\033[92m"
blue = "\033[94m"
yellow = "\033[93m"
red = "\033[91m"
normal = "\033[0m"
try:
working_folder = path.abspath(argv[1])
avg_folder = path.join(path.abspath(argv[2]),
working_folder.split('/')[-1])
print("output folder: %s" % avg_folder)
if(path.isdir(avg_folder)):
print("folder %s already exists!" % avg_folder)
var = input("do you want to delete it? [y/N]")
if 'y' in var:
shutil.rmtree(avg_folder)
else:
print("please choose another folder path~")
exit(0)
mkdir(avg_folder)
except IndexError:
print("Usage: %s working_folder results_folder" % sys.argv[0])
exit(1)
file_folder_list = glob(path.join(working_folder, '*'))
pair_list = ["9998_-9998"]
nev = len(file_folder_list)
for ipart in pair_list:
file_name = 'Balance_function_%s_Delta_y.dat' % ipart
event_avg_data = loadtxt(
path.join(file_folder_list[0],
'Balance_function_9998_-9998_Delta_y.dat'))*0.0
event_avg_data = zeros([len(event_avg_data[:, 0]), 15])
for ifolder in range(nev):
results_folder = path.abspath(file_folder_list[ifolder])
print("processing %s/%s ..." % (results_folder, file_name))
temp_data = loadtxt(path.join(results_folder, file_name))
event_avg_data[:, 0] += temp_data[:, 0]
event_avg_data[:, 5] += temp_data[:, 3] # rho_2(OS)
event_avg_data[:, 6] += temp_data[:, 3]**2.
event_avg_data[:, 7] += temp_data[:, 4] # rho_1^2(OS)
event_avg_data[:, 8] += temp_data[:, 4]**2.
event_avg_data[:, 11] += temp_data[:, 6] # rho_2(SS)
event_avg_data[:, 12] += temp_data[:, 6]**2.
event_avg_data[:, 13] += temp_data[:, 7] # rho_1^2(SS)
event_avg_data[:, 14] += temp_data[:, 7]**2.
event_avg_data = event_avg_data/nev
# rho_2(OS)_err
event_avg_data[:, 6] = sqrt(event_avg_data[:, 6]
- event_avg_data[:, 5]**2.)/sqrt(nev)
# rho_1^2(OS)_err
event_avg_data[:, 8] = sqrt(event_avg_data[:, 8]
- event_avg_data[:, 7]**2.)/sqrt(nev)
# rho_2(SS)_err
event_avg_data[:, 12] = sqrt(event_avg_data[:, 12]
- event_avg_data[:, 11]**2.)/sqrt(nev)
# rho_1^2(SS)_err
event_avg_data[:, 14] = sqrt(event_avg_data[:, 14]
- event_avg_data[:, 13]**2.)/sqrt(nev)
# C_2(OS)
norm = sum(event_avg_data[:, 7])/sum(event_avg_data[:, 5])
event_avg_data[:, 3] = norm*event_avg_data[:, 5]/event_avg_data[:, 7]
event_avg_data[:, 4] = norm*sqrt(
(event_avg_data[:, 6]/event_avg_data[:, 7])**2.
+ (event_avg_data[:, 5]*event_avg_data[:, 8]/event_avg_data[:, 7]**2.)**2.)
# C_2(SS)
norm = sum(event_avg_data[:, 13])/sum(event_avg_data[:, 11])
event_avg_data[:, 9] = norm*event_avg_data[:, 11]/event_avg_data[:, 13]
event_avg_data[:, 10] = norm*sqrt(
(event_avg_data[:, 12]/event_avg_data[:, 13])**2.
+ (event_avg_data[:, 11]*event_avg_data[:, 14]/event_avg_data[:, 13]**2.)**2.)
# Delta C_2
event_avg_data[:, 1] = event_avg_data[:, 3] - event_avg_data[:, 9]
event_avg_data[:, 2] = sqrt(event_avg_data[:, 4]**2.
+ event_avg_data[:, 10]**2.)
savetxt(file_name, event_avg_data, fmt='%.10e', delimiter=' ',
header=("DeltaY Delta C_2 Delta C_2_err "
+ "C_2(OS) C_2(OS)_err rho_2(OS) rho_2(OS)_err "
+ "rho_1^2(OS) rho_1^2(OS)_err "
+ "C_2(SS) C_2(SS)_err rho_2(SS) rho_2(SS)_err "
+ "rho_1^2(SS) rho_1^2(SS)_err"))
shutil.move(file_name, avg_folder)
file_name = 'Balance_function_%s_Delta_phi.dat' % ipart
event_avg_data = loadtxt(
path.join(file_folder_list[0],
'Balance_function_9998_-9998_Delta_phi.dat'))*0.0
event_avg_data = zeros([len(event_avg_data[:, 0]), 15])
for ifolder in range(nev):
results_folder = path.abspath(file_folder_list[ifolder])
print("processing %s/%s ..." % (results_folder, file_name))
temp_data = loadtxt(path.join(results_folder, file_name))
event_avg_data[:, 0] += temp_data[:, 0]
event_avg_data[:, 5] += temp_data[:, 3] # rho_2(OS)
event_avg_data[:, 6] += temp_data[:, 3]**2.
event_avg_data[:, 7] += temp_data[:, 4] # rho_1^2(OS)
event_avg_data[:, 8] += temp_data[:, 4]**2.
event_avg_data[:, 11] += temp_data[:, 6] # rho_2(SS)
event_avg_data[:, 12] += temp_data[:, 6]**2.
event_avg_data[:, 13] += temp_data[:, 7] # rho_1^2(SS)
event_avg_data[:, 14] += temp_data[:, 7]**2.
event_avg_data = event_avg_data/nev
# rho_2(OS)_err
event_avg_data[:, 6] = sqrt(event_avg_data[:, 6]
- event_avg_data[:, 5]**2.)/sqrt(nev)
# rho_1^2(OS)_err
event_avg_data[:, 8] = sqrt(event_avg_data[:, 8]
- event_avg_data[:, 7]**2.)/sqrt(nev)
# rho_2(SS)_err
event_avg_data[:, 12] = sqrt(event_avg_data[:, 12]
- event_avg_data[:, 11]**2.)/sqrt(nev)
# rho_1^2(SS)_err
event_avg_data[:, 14] = sqrt(event_avg_data[:, 14]
- event_avg_data[:, 13]**2.)/sqrt(nev)
# C_2(OS)
norm = sum(event_avg_data[:, 7])/sum(event_avg_data[:, 5])
event_avg_data[:, 3] = norm*event_avg_data[:, 5]/event_avg_data[:, 7]
event_avg_data[:, 4] = norm*sqrt(
(event_avg_data[:, 6]/event_avg_data[:, 7])**2.
+ (event_avg_data[:, 5]*event_avg_data[:, 8]/event_avg_data[:, 7]**2.)**2.)
# C_2(SS)
norm = sum(event_avg_data[:, 13])/sum(event_avg_data[:, 11])
event_avg_data[:, 9] = norm*event_avg_data[:, 11]/event_avg_data[:, 13]
event_avg_data[:, 10] = norm*sqrt(
(event_avg_data[:, 12]/event_avg_data[:, 13])**2.
+ (event_avg_data[:, 11]*event_avg_data[:, 14]/event_avg_data[:, 13]**2.)**2.)
# Delta C_2
event_avg_data[:, 1] = event_avg_data[:, 3] - event_avg_data[:, 9]
event_avg_data[:, 2] = sqrt(event_avg_data[:, 4]**2.
+ event_avg_data[:, 10]**2.)
savetxt(file_name, event_avg_data, fmt='%.10e', delimiter=' ',
header=("DeltaPhi Delta C_2 Delta C_2_err "
+ "C_2(OS) C_2(OS)_err rho_2(OS) rho_2(OS)_err "
+ "rho_1^2(OS) rho_1^2(OS)_err "
+ "C_2(SS) C_2(SS)_err rho_2(SS) rho_2(SS)_err "
+ "rho_1^2(SS) rho_1^2(SS)_err"))
shutil.move(file_name, avg_folder)
file_name = 'Correlation_function_%s_2D.dat' % ipart
event_avg_data = loadtxt(
path.join(file_folder_list[0],
'Correlation_function_9998_-9998_2D.dat'))*0.0
event_avg_data = zeros([len(event_avg_data[:, 0]), 16])
for ifolder in range(nev):
results_folder = path.abspath(file_folder_list[ifolder])
print("processing %s/%s ..." % (results_folder, file_name))
temp_data = loadtxt(path.join(results_folder, file_name))
event_avg_data[:, 0] += temp_data[:, 0]
event_avg_data[:, 1] += temp_data[:, 1]
event_avg_data[:, 6] += temp_data[:, 3] # rho_2(OS)
event_avg_data[:, 7] += temp_data[:, 3]**2.
event_avg_data[:, 8] += temp_data[:, 4] # rho_1^2(OS)
event_avg_data[:, 9] += temp_data[:, 4]**2.
event_avg_data[:, 12] += temp_data[:, 6] # rho_2(SS)
event_avg_data[:, 13] += temp_data[:, 6]**2.
event_avg_data[:, 14] += temp_data[:, 7] # rho_1^2(SS)
event_avg_data[:, 15] += temp_data[:, 7]**2.
event_avg_data = event_avg_data/nev
# rho_2(OS)_err
event_avg_data[:, 7] = sqrt(event_avg_data[:, 7]
- event_avg_data[:, 6]**2.)/sqrt(nev)
# rho_1^2(OS)_err
event_avg_data[:, 9] = sqrt(event_avg_data[:, 9]
- event_avg_data[:, 8]**2.)/sqrt(nev)
# rho_2(SS)_err
event_avg_data[:, 13] = sqrt(event_avg_data[:, 13]
- event_avg_data[:, 12]**2.)/sqrt(nev)
# rho_1^2(SS)_err
event_avg_data[:, 15] = sqrt(event_avg_data[:, 15]
- event_avg_data[:, 14]**2.)/sqrt(nev)
# C_2(OS)
norm = sum(event_avg_data[:, 8])/sum(event_avg_data[:, 6])
event_avg_data[:, 4] = norm*event_avg_data[:, 6]/event_avg_data[:, 8]
event_avg_data[:, 5] = norm*sqrt(
(event_avg_data[:, 7]/event_avg_data[:, 8])**2.
+ (event_avg_data[:, 6]*event_avg_data[:, 9]/event_avg_data[:, 8]**2.)**2.)
# C_2(SS)
norm = sum(event_avg_data[:, 14])/sum(event_avg_data[:, 12])
event_avg_data[:, 10] = norm*event_avg_data[:, 12]/event_avg_data[:, 14]
event_avg_data[:, 11] = norm*sqrt(
(event_avg_data[:, 13]/event_avg_data[:, 14])**2.
+ (event_avg_data[:, 12]*event_avg_data[:, 15]/event_avg_data[:, 14]**2.)**2.)
# Delta C_2
event_avg_data[:, 2] = event_avg_data[:, 4] - event_avg_data[:, 10]
event_avg_data[:, 3] = sqrt(event_avg_data[:, 5]**2.
+ event_avg_data[:, 11]**2.)
savetxt(file_name, event_avg_data, fmt='%.10e', delimiter=' ',
header=("DeltaY DeltaPhi Delta C_2 Delta C_2_err "
+ "C_2(OS) C_2(OS)_err rho_2(OS) rho_2(OS)_err "
+ "rho_1^2(OS) rho_1^2(OS)_err "
+ "C_2(SS) C_2(SS)_err rho_2(SS) rho_2(SS)_err "
+ "rho_1^2(SS) rho_1^2(SS)_err"))
shutil.move(file_name, avg_folder)
print("Analysis is done.")
| 46.045455 | 86 | 0.559625 | 1,528 | 10,130 | 3.348168 | 0.086387 | 0.259578 | 0.389367 | 0.063526 | 0.819781 | 0.80864 | 0.79828 | 0.751368 | 0.724394 | 0.692533 | 0 | 0.064724 | 0.264857 | 10,130 | 219 | 87 | 46.255708 | 0.622264 | 0.058342 | 0 | 0.582857 | 0 | 0 | 0.115178 | 0.022361 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.028571 | 0 | 0.028571 | 0.045714 | 0 | 0 | 0 | null | 1 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
710604c172d36be0fdbb974029a5825fa5ca20c7 | 152 | py | Python | lightning_nets/modules/__init__.py | nabrooks/lightning-nets | 0549ec9825a09ed6132f4b288a991b8ca85f5d00 | [
"MIT"
] | null | null | null | lightning_nets/modules/__init__.py | nabrooks/lightning-nets | 0549ec9825a09ed6132f4b288a991b8ca85f5d00 | [
"MIT"
] | null | null | null | lightning_nets/modules/__init__.py | nabrooks/lightning-nets | 0549ec9825a09ed6132f4b288a991b8ca85f5d00 | [
"MIT"
] | null | null | null | from .basic_nn_module import *
from .vanilla_gan_module import *
from .wasserstein_gan_gp_module import *
from .boundary_equilibrium_gan_module import * | 38 | 46 | 0.848684 | 22 | 152 | 5.409091 | 0.5 | 0.403361 | 0.403361 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.098684 | 152 | 4 | 46 | 38 | 0.868613 | 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 |
711659249d806988e840df0897b37d109849d576 | 52 | py | Python | addition.py | EDGENortheastern/python-functions-start | f4d2dbd49efca7e9d38372a259c50e48456768f4 | [
"MIT"
] | null | null | null | addition.py | EDGENortheastern/python-functions-start | f4d2dbd49efca7e9d38372a259c50e48456768f4 | [
"MIT"
] | null | null | null | addition.py | EDGENortheastern/python-functions-start | f4d2dbd49efca7e9d38372a259c50e48456768f4 | [
"MIT"
] | null | null | null | def add_nums(num_1, num_2):
return num_1 + num_2 | 26 | 27 | 0.711538 | 12 | 52 | 2.666667 | 0.583333 | 0.25 | 0.4375 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.095238 | 0.192308 | 52 | 2 | 28 | 26 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.5 | false | 0 | 0 | 0.5 | 1 | 0 | 1 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 8 |
a41cc108f7a9441d5ffd7930a6b9deea995a8ce6 | 10,740 | py | Python | dragon/tiles.py | NicEastvillage/RLBot-DropShot-Dragon-Python | b0d94fd054ab410ad02880a3d56e72b5eddd7ba6 | [
"MIT"
] | 1 | 2019-08-07T21:38:59.000Z | 2019-08-07T21:38:59.000Z | dragon/tiles.py | NicEastvillage/RLBot-DropShot-Dragon-Python | b0d94fd054ab410ad02880a3d56e72b5eddd7ba6 | [
"MIT"
] | null | null | null | dragon/tiles.py | NicEastvillage/RLBot-DropShot-Dragon-Python | b0d94fd054ab410ad02880a3d56e72b5eddd7ba6 | [
"MIT"
] | null | null | null | import math
import rlmath
from rlmath import Hex
from RLUtilities.LinearAlgebra import vec3
TILE_WIDTH = 768
TILE_SIZE = TILE_WIDTH / math.sqrt(3)
TILE_HEIGHT = TILE_SIZE * 2
TILE_COUNT = 140
MIDDLE_OFFSET = 128
Q_VEC = vec3(-TILE_WIDTH, 0, 0)
R_VEC = vec3(-TILE_WIDTH / 2, 0.75 * TILE_HEIGHT, 0)
class Tile:
UNKNOWN = 0
FILLED = 1
DAMAGED = 2
OPEN = 3
def __init__(self, location, hex, team):
self.location = location
self.hex = hex
self.team = team
self.state = Tile.UNKNOWN
def point_to_tile(info, point):
if point[1] > 0:
point = point - vec3(0, MIDDLE_OFFSET, 0)
else:
point = point - vec3(0, -MIDDLE_OFFSET, 0)
hex = point_to_hex(point)
if hex in info.tile_dict:
return info.tile_dict[hex]
return None
def point_to_hex(point):
q = -point[0] / TILE_WIDTH - point[1] * 2 / (3 * TILE_HEIGHT)
r = point[1] * 4 / (3 * TILE_HEIGHT)
return rlmath.hex_from_rounding(q, r)
ALL_TILES = [
Tile(vec3(-2304.0, -4117.4287109375, 2.5), Hex(6, -6), 0),
Tile(vec3(-1536.0, -4117.4287109375, 2.5), Hex(5, -6), 0),
Tile(vec3(-768.0, -4117.4287109375, 2.5), Hex(4, -6), 0),
Tile(vec3(0.0, -4117.4287109375, 2.5), Hex(3, -6), 0),
Tile(vec3(768.0, -4117.4287109375, 2.5), Hex(2, -6), 0),
Tile(vec3(1536.0, -4117.4287109375, 2.5), Hex(1, -6), 0),
Tile(vec3(2304.0, -4117.4287109375, 2.5), Hex(0, -6), 0),
Tile(vec3(-2688.0, -3452.322021484375, 2.5), Hex(6, -5), 0),
Tile(vec3(-1920.0, -3452.322021484375, 2.5), Hex(5, -5), 0),
Tile(vec3(-1152.0, -3452.322021484375, 2.5), Hex(4, -5), 0),
Tile(vec3(-384.0, -3452.322021484375, 2.5), Hex(3, -5), 0),
Tile(vec3(384.0, -3452.322021484375, 2.5), Hex(2, -5), 0),
Tile(vec3(1152.0, -3452.322021484375, 2.5), Hex(1, -5), 0),
Tile(vec3(1920.0, -3452.322021484375, 2.5), Hex(0, -5), 0),
Tile(vec3(2688.0, -3452.322021484375, 2.5), Hex(-1, -5), 0),
Tile(vec3(-3072.0, -2788.428955078125, 2.5), Hex(6, -4), 0),
Tile(vec3(-2304.0, -2788.428955078125, 2.5), Hex(5, -4), 0),
Tile(vec3(-1536.0, -2788.428955078125, 2.5), Hex(4, -4), 0),
Tile(vec3(-768.0, -2788.428955078125, 2.5), Hex(3, -4), 0),
Tile(vec3(0.0, -2788.428955078125, 2.5), Hex(2, -4), 0),
Tile(vec3(768.0, -2788.428955078125, 2.5), Hex(1, -4), 0),
Tile(vec3(1536.0, -2788.428955078125, 2.5), Hex(0, -4), 0),
Tile(vec3(2304.0, -2788.428955078125, 2.5), Hex(-1, -4), 0),
Tile(vec3(3072.0, -2788.428955078125, 2.5), Hex(-2, -4), 0),
Tile(vec3(-3456.0, -2123.322021484375, 2.5), Hex(6, -3), 0),
Tile(vec3(-2688.0, -2123.322021484375, 2.5), Hex(5, -3), 0),
Tile(vec3(-1920.0, -2123.322021484375, 2.5), Hex(4, -3), 0),
Tile(vec3(-1152.0, -2123.322021484375, 2.5), Hex(3, -3), 0),
Tile(vec3(-384.0, -2123.322021484375, 2.5), Hex(2, -3), 0),
Tile(vec3(384.0, -2123.322021484375, 2.5), Hex(1, -3), 0),
Tile(vec3(1152.0, -2123.322021484375, 2.5), Hex(0, -3), 0),
Tile(vec3(1920.0, -2123.322021484375, 2.5), Hex(-1, -3), 0),
Tile(vec3(2688.0, -2123.322021484375, 2.5), Hex(-2, -3), 0),
Tile(vec3(3456.0, -2123.322021484375, 2.5), Hex(-3, -3), 0),
Tile(vec3(-3840.0, -1458.21484375, 2.5), Hex(6, -2), 0),
Tile(vec3(-3072.0, -1458.21484375, 2.5), Hex(5, -2), 0),
Tile(vec3(-2304.0, -1458.21484375, 2.5), Hex(4, -2), 0),
Tile(vec3(-1536.0, -1458.21484375, 2.5), Hex(3, -2), 0),
Tile(vec3(-768.0, -1458.21484375, 2.5), Hex(2, -2), 0),
Tile(vec3(0.0, -1458.21484375, 2.5), Hex(1, -2), 0),
Tile(vec3(768.0, -1458.21484375, 2.5), Hex(0, -2), 0),
Tile(vec3(1536.0, -1458.21484375, 2.5), Hex(-1, -2), 0),
Tile(vec3(2304.0, -1458.21484375, 2.5), Hex(-2, -2), 0),
Tile(vec3(3072.0, -1458.21484375, 2.5), Hex(-3, -2), 0),
Tile(vec3(3840.0, -1458.21484375, 2.5), Hex(-4, -2), 0),
Tile(vec3(-4224.0, -793.1079711914062, 2.5), Hex(6, -1), 0),
Tile(vec3(-3456.0, -793.1079711914062, 2.5), Hex(5, -1), 0),
Tile(vec3(-2688.0, -793.1079711914062, 2.5), Hex(4, -1), 0),
Tile(vec3(-1920.0, -793.1079711914062, 2.5), Hex(3, -1), 0),
Tile(vec3(-1152.0, -793.1079711914062, 2.5), Hex(2, -1), 0),
Tile(vec3(-384.0, -793.1079711914062, 2.5), Hex(1, -1), 0),
Tile(vec3(384.0, -793.1079711914062, 2.5), Hex(0, -1), 0),
Tile(vec3(1152.0, -793.1079711914062, 2.5), Hex(-1, -1), 0),
Tile(vec3(1920.0, -793.1079711914062, 2.5), Hex(-2, -1), 0),
Tile(vec3(2688.0, -793.1079711914062, 2.5), Hex(-3, -1), 0),
Tile(vec3(3456.0, -793.1079711914062, 2.5), Hex(-4, -1), 0),
Tile(vec3(4224.0, -793.1079711914062, 2.5), Hex(-5, -1), 0),
Tile(vec3(-4608.0, -127.99998474121094, 2.5), Hex(6, 0), 0),
Tile(vec3(-3840.0, -127.99998474121094, 2.5), Hex(5, 0), 0),
Tile(vec3(-3072.0, -127.99998474121094, 2.5), Hex(4, 0), 0),
Tile(vec3(-2304.0, -127.99998474121094, 2.5), Hex(3, 0), 0),
Tile(vec3(-1536.0, -127.99998474121094, 2.5), Hex(2, 0), 0),
Tile(vec3(-768.0, -127.99998474121094, 2.5), Hex(1, 0), 0),
Tile(vec3(0.0, -127.99998474121094, 2.5), Hex(0, 0), 0),
Tile(vec3(768.0, -127.99998474121094, 2.5), Hex(-1, 0), 0),
Tile(vec3(1536.0, -127.99998474121094, 2.5), Hex(-2, 0), 0),
Tile(vec3(2304.0, -128.0, 2.5), Hex(-3, 0), 0),
Tile(vec3(3072.0, -127.99998474121094, 2.5), Hex(-4, 0), 0),
Tile(vec3(3840.0, -127.99998474121094, 2.5), Hex(-5, 0), 0),
Tile(vec3(4608.0, -127.99998474121094, 2.5), Hex(-6, 0), 0),
Tile(vec3(-4608.0, 128.0, 2.5), Hex(6, 0), 1),
Tile(vec3(-3840.0, 128.0, 2.5), Hex(5, 0), 1),
Tile(vec3(-3072.0, 128.0, 2.5), Hex(4, 0), 1),
Tile(vec3(-2304.0, 128.0, 2.5), Hex(3, 0), 1),
Tile(vec3(-1536.0, 128.0, 2.5), Hex(2, 0), 1),
Tile(vec3(-768.0, 128.0, 2.5), Hex(1, 0), 1),
Tile(vec3(0.0, 128.0, 2.5), Hex(0, 0), 1),
Tile(vec3(768.0, 128.0, 2.5), Hex(-1, 0), 1),
Tile(vec3(1536.0, 128.0, 2.5), Hex(-2, 0), 1),
Tile(vec3(2304.0, 128.0, 2.5), Hex(-3, 0), 1),
Tile(vec3(3072.0, 128.0, 2.5), Hex(-4, 0), 1),
Tile(vec3(3840.0, 128.0, 2.5), Hex(-5, 0), 1),
Tile(vec3(4608.0, 128.0, 2.5), Hex(-6, 0), 1),
Tile(vec3(-4224.0, 793.1079711914062, 2.5), Hex(5, 1), 1),
Tile(vec3(-3456.0, 793.1079711914062, 2.5), Hex(4, 1), 1),
Tile(vec3(-2688.0, 793.1079711914062, 2.5), Hex(3, 1), 1),
Tile(vec3(-1920.0, 793.1079711914062, 2.5), Hex(2, 1), 1),
Tile(vec3(-1152.0, 793.1079711914062, 2.5), Hex(1, 1), 1),
Tile(vec3(-384.0, 793.1079711914062, 2.5), Hex(0, 1), 1),
Tile(vec3(384.0, 793.1079711914062, 2.5), Hex(-1, 1), 1),
Tile(vec3(1152.0, 793.1079711914062, 2.5), Hex(-2, 1), 1),
Tile(vec3(1920.0, 793.1079711914062, 2.5), Hex(-3, 1), 1),
Tile(vec3(2688.0, 793.1079711914062, 2.5), Hex(-4, 1), 1),
Tile(vec3(3456.0, 793.1079711914062, 2.5), Hex(-5, 1), 1),
Tile(vec3(4224.0, 793.1079711914062, 2.5), Hex(-6, 1), 1),
Tile(vec3(-3840.0, 1458.21484375, 2.5), Hex(4, 2), 1),
Tile(vec3(-3072.0, 1458.21484375, 2.5), Hex(3, 2), 1),
Tile(vec3(-2304.0, 1458.21484375, 2.5), Hex(2, 2), 1),
Tile(vec3(-1536.0, 1458.21484375, 2.5), Hex(1, 2), 1),
Tile(vec3(-768.0, 1458.21484375, 2.5), Hex(0, 2), 1),
Tile(vec3(0.0, 1458.21484375, 2.5), Hex(-1, 2), 1),
Tile(vec3(768.0, 1458.21484375, 2.5), Hex(-2, 2), 1),
Tile(vec3(1536.0, 1458.21484375, 2.5), Hex(-3, 2), 1),
Tile(vec3(2304.0, 1458.21484375, 2.5), Hex(-4, 2), 1),
Tile(vec3(3072.0, 1458.21484375, 2.5), Hex(-5, 2), 1),
Tile(vec3(3840.0, 1458.21484375, 2.5), Hex(-6, 2), 1),
Tile(vec3(-3456.0, 2123.322021484375, 2.5), Hex(3, 3), 1),
Tile(vec3(-2688.0, 2123.322021484375, 2.5), Hex(2, 3), 1),
Tile(vec3(-1920.0, 2123.322021484375, 2.5), Hex(1, 3), 1),
Tile(vec3(-1152.0, 2123.322021484375, 2.5), Hex(0, 3), 1),
Tile(vec3(-384.0, 2123.322021484375, 2.5), Hex(-1, 3), 1),
Tile(vec3(384.0, 2123.322021484375, 2.5), Hex(-2, 3), 1),
Tile(vec3(1152.0, 2123.322021484375, 2.5), Hex(-3, 3), 1),
Tile(vec3(1920.0, 2123.322021484375, 2.5), Hex(-4, 3), 1),
Tile(vec3(2688.0, 2123.322021484375, 2.5), Hex(-5, 3), 1),
Tile(vec3(3456.0, 2123.322021484375, 2.5), Hex(-6, 3), 1),
Tile(vec3(-3072.0, 2788.428955078125, 2.5), Hex(2, 4), 1),
Tile(vec3(-2304.0, 2788.428955078125, 2.5), Hex(1, 4), 1),
Tile(vec3(-1536.0, 2788.428955078125, 2.5), Hex(0, 4), 1),
Tile(vec3(-768.0, 2788.428955078125, 2.5), Hex(-1, 4), 1),
Tile(vec3(0.0, 2788.428955078125, 2.5), Hex(-2, 4), 1),
Tile(vec3(768.0, 2788.428955078125, 2.5), Hex(-3, 4), 1),
Tile(vec3(1536.0, 2788.428955078125, 2.5), Hex(-4, 4), 1),
Tile(vec3(2304.0, 2788.428955078125, 2.5), Hex(-5, 4), 1),
Tile(vec3(3072.0, 2788.428955078125, 2.5), Hex(-6, 4), 1),
Tile(vec3(-2688.0, 3452.322021484375, 2.5), Hex(1, 5), 1),
Tile(vec3(-1920.0, 3452.322021484375, 2.5), Hex(0, 5), 1),
Tile(vec3(-1152.0, 3452.322021484375, 2.5), Hex(-1, 5), 1),
Tile(vec3(-384.0, 3452.322021484375, 2.5), Hex(-2, 5), 1),
Tile(vec3(384.0, 3452.322021484375, 2.5), Hex(-3, 5), 1),
Tile(vec3(1152.0, 3452.322021484375, 2.5), Hex(-4, 5), 1),
Tile(vec3(1920.0, 3452.322021484375, 2.5), Hex(-5, 5), 1),
Tile(vec3(2688.0, 3452.322021484375, 2.5), Hex(-6, 5), 1),
Tile(vec3(-2304.0, 4117.4287109375, 2.5), Hex(0, 6), 1),
Tile(vec3(-1536.0, 4117.4287109375, 2.5), Hex(-1, 6), 1),
Tile(vec3(-768.0, 4117.4287109375, 2.5), Hex(-2, 6), 1),
Tile(vec3(0.0, 4117.4287109375, 2.5), Hex(-3, 6), 1),
Tile(vec3(768.0, 4117.4287109375, 2.5), Hex(-4, 6), 1),
Tile(vec3(1536.0, 4117.4287109375, 2.5), Hex(-5, 6), 1),
Tile(vec3(2304.0, 4117.4287109375, 2.5), Hex(-6, 6), 1)
]
| 55.9375 | 72 | 0.511639 | 1,836 | 10,740 | 2.97549 | 0.041939 | 0.051986 | 0.128135 | 0.112026 | 0.898957 | 0.897309 | 0.887241 | 0.876991 | 0.875892 | 0.875892 | 0 | 0.439362 | 0.259125 | 10,740 | 191 | 73 | 56.230366 | 0.247204 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.017045 | false | 0 | 0.022727 | 0 | 0.085227 | 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 |
a440c963bc0b29fb06a2c1a0dd8adc981717897d | 494,433 | py | Python | boto3_type_annotations_with_docs/boto3_type_annotations/neptune/client.py | cowboygneox/boto3_type_annotations | 450dce1de4e066b939de7eac2ec560ed1a7ddaa2 | [
"MIT"
] | 119 | 2018-12-01T18:20:57.000Z | 2022-02-02T10:31:29.000Z | boto3_type_annotations_with_docs/boto3_type_annotations/neptune/client.py | cowboygneox/boto3_type_annotations | 450dce1de4e066b939de7eac2ec560ed1a7ddaa2 | [
"MIT"
] | 15 | 2018-11-16T00:16:44.000Z | 2021-11-13T03:44:18.000Z | boto3_type_annotations_with_docs/boto3_type_annotations/neptune/client.py | cowboygneox/boto3_type_annotations | 450dce1de4e066b939de7eac2ec560ed1a7ddaa2 | [
"MIT"
] | 11 | 2019-05-06T05:26:51.000Z | 2021-09-28T15:27:59.000Z | from typing import Optional
from botocore.client import BaseClient
from typing import Dict
from botocore.paginate import Paginator
from datetime import datetime
from botocore.waiter import Waiter
from typing import Union
from typing import List
class Client(BaseClient):
def add_role_to_db_cluster(self, DBClusterIdentifier: str, RoleArn: str):
"""
Associates an Identity and Access Management (IAM) role from an Neptune DB cluster.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/AddRoleToDBCluster>`_
**Request Syntax**
::
response = client.add_role_to_db_cluster(
DBClusterIdentifier='string',
RoleArn='string'
)
:type DBClusterIdentifier: string
:param DBClusterIdentifier: **[REQUIRED]**
The name of the DB cluster to associate the IAM role with.
:type RoleArn: string
:param RoleArn: **[REQUIRED]**
The Amazon Resource Name (ARN) of the IAM role to associate with the Neptune DB cluster, for example ``arn:aws:iam::123456789012:role/NeptuneAccessRole`` .
:returns: None
"""
pass
def add_source_identifier_to_subscription(self, SubscriptionName: str, SourceIdentifier: str) -> Dict:
"""
Adds a source identifier to an existing event notification subscription.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/AddSourceIdentifierToSubscription>`_
**Request Syntax**
::
response = client.add_source_identifier_to_subscription(
SubscriptionName='string',
SourceIdentifier='string'
)
**Response Syntax**
::
{
'EventSubscription': {
'CustomerAwsId': 'string',
'CustSubscriptionId': 'string',
'SnsTopicArn': 'string',
'Status': 'string',
'SubscriptionCreationTime': 'string',
'SourceType': 'string',
'SourceIdsList': [
'string',
],
'EventCategoriesList': [
'string',
],
'Enabled': True|False,
'EventSubscriptionArn': 'string'
}
}
**Response Structure**
- *(dict) --*
- **EventSubscription** *(dict) --*
Contains the results of a successful invocation of the DescribeEventSubscriptions action.
- **CustomerAwsId** *(string) --*
The AWS customer account associated with the event notification subscription.
- **CustSubscriptionId** *(string) --*
The event notification subscription Id.
- **SnsTopicArn** *(string) --*
The topic ARN of the event notification subscription.
- **Status** *(string) --*
The status of the event notification subscription.
Constraints:
Can be one of the following: creating | modifying | deleting | active | no-permission | topic-not-exist
The status "no-permission" indicates that Neptune no longer has permission to post to the SNS topic. The status "topic-not-exist" indicates that the topic was deleted after the subscription was created.
- **SubscriptionCreationTime** *(string) --*
The time the event notification subscription was created.
- **SourceType** *(string) --*
The source type for the event notification subscription.
- **SourceIdsList** *(list) --*
A list of source IDs for the event notification subscription.
- *(string) --*
- **EventCategoriesList** *(list) --*
A list of event categories for the event notification subscription.
- *(string) --*
- **Enabled** *(boolean) --*
A Boolean value indicating if the subscription is enabled. True indicates the subscription is enabled.
- **EventSubscriptionArn** *(string) --*
The Amazon Resource Name (ARN) for the event subscription.
:type SubscriptionName: string
:param SubscriptionName: **[REQUIRED]**
The name of the event notification subscription you want to add a source identifier to.
:type SourceIdentifier: string
:param SourceIdentifier: **[REQUIRED]**
The identifier of the event source to be added.
Constraints:
* If the source type is a DB instance, then a ``DBInstanceIdentifier`` must be supplied.
* If the source type is a DB security group, a ``DBSecurityGroupName`` must be supplied.
* If the source type is a DB parameter group, a ``DBParameterGroupName`` must be supplied.
* If the source type is a DB snapshot, a ``DBSnapshotIdentifier`` must be supplied.
:rtype: dict
:returns:
"""
pass
def add_tags_to_resource(self, ResourceName: str, Tags: List):
"""
Adds metadata tags to an Amazon Neptune resource. These tags can also be used with cost allocation reporting to track cost associated with Amazon Neptune resources, or used in a Condition statement in an IAM policy for Amazon Neptune.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/AddTagsToResource>`_
**Request Syntax**
::
response = client.add_tags_to_resource(
ResourceName='string',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
]
)
:type ResourceName: string
:param ResourceName: **[REQUIRED]**
The Amazon Neptune resource that the tags are added to. This value is an Amazon Resource Name (ARN). For information about creating an ARN, see `Constructing an Amazon Resource Name (ARN) <https://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html#tagging.ARN.Constructing>`__ .
:type Tags: list
:param Tags: **[REQUIRED]**
The tags to be assigned to the Amazon Neptune resource.
- *(dict) --*
Metadata assigned to an Amazon Neptune resource consisting of a key-value pair.
- **Key** *(string) --*
A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can\'t be prefixed with \"aws:\" or \"rds:\". The string can only contain only the set of Unicode letters, digits, white-space, \'_\', \'.\', \'/\', \'=\', \'+\', \'-\' (Java regex: \"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$\").
- **Value** *(string) --*
A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can\'t be prefixed with \"aws:\" or \"rds:\". The string can only contain only the set of Unicode letters, digits, white-space, \'_\', \'.\', \'/\', \'=\', \'+\', \'-\' (Java regex: \"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$\").
:returns: None
"""
pass
def apply_pending_maintenance_action(self, ResourceIdentifier: str, ApplyAction: str, OptInType: str) -> Dict:
"""
Applies a pending maintenance action to a resource (for example, to a DB instance).
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ApplyPendingMaintenanceAction>`_
**Request Syntax**
::
response = client.apply_pending_maintenance_action(
ResourceIdentifier='string',
ApplyAction='string',
OptInType='string'
)
**Response Syntax**
::
{
'ResourcePendingMaintenanceActions': {
'ResourceIdentifier': 'string',
'PendingMaintenanceActionDetails': [
{
'Action': 'string',
'AutoAppliedAfterDate': datetime(2015, 1, 1),
'ForcedApplyDate': datetime(2015, 1, 1),
'OptInStatus': 'string',
'CurrentApplyDate': datetime(2015, 1, 1),
'Description': 'string'
},
]
}
}
**Response Structure**
- *(dict) --*
- **ResourcePendingMaintenanceActions** *(dict) --*
Describes the pending maintenance actions for a resource.
- **ResourceIdentifier** *(string) --*
The ARN of the resource that has pending maintenance actions.
- **PendingMaintenanceActionDetails** *(list) --*
A list that provides details about the pending maintenance actions for the resource.
- *(dict) --*
Provides information about a pending maintenance action for a resource.
- **Action** *(string) --*
The type of pending maintenance action that is available for the resource.
- **AutoAppliedAfterDate** *(datetime) --*
The date of the maintenance window when the action is applied. The maintenance action is applied to the resource during its first maintenance window after this date. If this date is specified, any ``next-maintenance`` opt-in requests are ignored.
- **ForcedApplyDate** *(datetime) --*
The date when the maintenance action is automatically applied. The maintenance action is applied to the resource on this date regardless of the maintenance window for the resource. If this date is specified, any ``immediate`` opt-in requests are ignored.
- **OptInStatus** *(string) --*
Indicates the type of opt-in request that has been received for the resource.
- **CurrentApplyDate** *(datetime) --*
The effective date when the pending maintenance action is applied to the resource. This date takes into account opt-in requests received from the ApplyPendingMaintenanceAction API, the ``AutoAppliedAfterDate`` , and the ``ForcedApplyDate`` . This value is blank if an opt-in request has not been received and nothing has been specified as ``AutoAppliedAfterDate`` or ``ForcedApplyDate`` .
- **Description** *(string) --*
A description providing more detail about the maintenance action.
:type ResourceIdentifier: string
:param ResourceIdentifier: **[REQUIRED]**
The Amazon Resource Name (ARN) of the resource that the pending maintenance action applies to. For information about creating an ARN, see `Constructing an Amazon Resource Name (ARN) <https://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html#tagging.ARN.Constructing>`__ .
:type ApplyAction: string
:param ApplyAction: **[REQUIRED]**
The pending maintenance action to apply to this resource.
Valid values: ``system-update`` , ``db-upgrade``
:type OptInType: string
:param OptInType: **[REQUIRED]**
A value that specifies the type of opt-in request, or undoes an opt-in request. An opt-in request of type ``immediate`` can\'t be undone.
Valid values:
* ``immediate`` - Apply the maintenance action immediately.
* ``next-maintenance`` - Apply the maintenance action during the next maintenance window for the resource.
* ``undo-opt-in`` - Cancel any existing ``next-maintenance`` opt-in requests.
:rtype: dict
:returns:
"""
pass
def can_paginate(self, operation_name: str = None):
"""
Check if an operation can be paginated.
:type operation_name: string
:param operation_name: The operation name. This is the same name
as the method name on the client. For example, if the
method name is ``create_foo``, and you\'d normally invoke the
operation as ``client.create_foo(**kwargs)``, if the
``create_foo`` operation can be paginated, you can use the
call ``client.get_paginator(\"create_foo\")``.
:return: ``True`` if the operation can be paginated,
``False`` otherwise.
"""
pass
def copy_db_cluster_parameter_group(self, SourceDBClusterParameterGroupIdentifier: str, TargetDBClusterParameterGroupIdentifier: str, TargetDBClusterParameterGroupDescription: str, Tags: List = None) -> Dict:
"""
Copies the specified DB cluster parameter group.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CopyDBClusterParameterGroup>`_
**Request Syntax**
::
response = client.copy_db_cluster_parameter_group(
SourceDBClusterParameterGroupIdentifier='string',
TargetDBClusterParameterGroupIdentifier='string',
TargetDBClusterParameterGroupDescription='string',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
]
)
**Response Syntax**
::
{
'DBClusterParameterGroup': {
'DBClusterParameterGroupName': 'string',
'DBParameterGroupFamily': 'string',
'Description': 'string',
'DBClusterParameterGroupArn': 'string'
}
}
**Response Structure**
- *(dict) --*
- **DBClusterParameterGroup** *(dict) --*
Contains the details of an Amazon Neptune DB cluster parameter group.
This data type is used as a response element in the DescribeDBClusterParameterGroups action.
- **DBClusterParameterGroupName** *(string) --*
Provides the name of the DB cluster parameter group.
- **DBParameterGroupFamily** *(string) --*
Provides the name of the DB parameter group family that this DB cluster parameter group is compatible with.
- **Description** *(string) --*
Provides the customer-specified description for this DB cluster parameter group.
- **DBClusterParameterGroupArn** *(string) --*
The Amazon Resource Name (ARN) for the DB cluster parameter group.
:type SourceDBClusterParameterGroupIdentifier: string
:param SourceDBClusterParameterGroupIdentifier: **[REQUIRED]**
The identifier or Amazon Resource Name (ARN) for the source DB cluster parameter group. For information about creating an ARN, see `Constructing an Amazon Resource Name (ARN) <https://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html#tagging.ARN.Constructing>`__ .
Constraints:
* Must specify a valid DB cluster parameter group.
* If the source DB cluster parameter group is in the same AWS Region as the copy, specify a valid DB parameter group identifier, for example ``my-db-cluster-param-group`` , or a valid ARN.
* If the source DB parameter group is in a different AWS Region than the copy, specify a valid DB cluster parameter group ARN, for example ``arn:aws:rds:us-east-1:123456789012:cluster-pg:custom-cluster-group1`` .
:type TargetDBClusterParameterGroupIdentifier: string
:param TargetDBClusterParameterGroupIdentifier: **[REQUIRED]**
The identifier for the copied DB cluster parameter group.
Constraints:
* Cannot be null, empty, or blank
* Must contain from 1 to 255 letters, numbers, or hyphens
* First character must be a letter
* Cannot end with a hyphen or contain two consecutive hyphens
Example: ``my-cluster-param-group1``
:type TargetDBClusterParameterGroupDescription: string
:param TargetDBClusterParameterGroupDescription: **[REQUIRED]**
A description for the copied DB cluster parameter group.
:type Tags: list
:param Tags:
The tags to be assigned to the copied DB cluster parameter group.
- *(dict) --*
Metadata assigned to an Amazon Neptune resource consisting of a key-value pair.
- **Key** *(string) --*
A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can\'t be prefixed with \"aws:\" or \"rds:\". The string can only contain only the set of Unicode letters, digits, white-space, \'_\', \'.\', \'/\', \'=\', \'+\', \'-\' (Java regex: \"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$\").
- **Value** *(string) --*
A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can\'t be prefixed with \"aws:\" or \"rds:\". The string can only contain only the set of Unicode letters, digits, white-space, \'_\', \'.\', \'/\', \'=\', \'+\', \'-\' (Java regex: \"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$\").
:rtype: dict
:returns:
"""
pass
def copy_db_cluster_snapshot(self, SourceDBClusterSnapshotIdentifier: str, TargetDBClusterSnapshotIdentifier: str, KmsKeyId: str = None, PreSignedUrl: str = None, CopyTags: bool = None, Tags: List = None, SourceRegion: str = None) -> Dict:
"""
Copies a snapshot of a DB cluster.
To copy a DB cluster snapshot from a shared manual DB cluster snapshot, ``SourceDBClusterSnapshotIdentifier`` must be the Amazon Resource Name (ARN) of the shared DB cluster snapshot.
You can't copy from one AWS Region to another.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CopyDBClusterSnapshot>`_
**Request Syntax**
::
response = client.copy_db_cluster_snapshot(
SourceDBClusterSnapshotIdentifier='string',
TargetDBClusterSnapshotIdentifier='string',
KmsKeyId='string',
CopyTags=True|False,
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
SourceRegion='string'
)
**Response Syntax**
::
{
'DBClusterSnapshot': {
'AvailabilityZones': [
'string',
],
'DBClusterSnapshotIdentifier': 'string',
'DBClusterIdentifier': 'string',
'SnapshotCreateTime': datetime(2015, 1, 1),
'Engine': 'string',
'AllocatedStorage': 123,
'Status': 'string',
'Port': 123,
'VpcId': 'string',
'ClusterCreateTime': datetime(2015, 1, 1),
'MasterUsername': 'string',
'EngineVersion': 'string',
'LicenseModel': 'string',
'SnapshotType': 'string',
'PercentProgress': 123,
'StorageEncrypted': True|False,
'KmsKeyId': 'string',
'DBClusterSnapshotArn': 'string',
'SourceDBClusterSnapshotArn': 'string',
'IAMDatabaseAuthenticationEnabled': True|False
}
}
**Response Structure**
- *(dict) --*
- **DBClusterSnapshot** *(dict) --*
Contains the details for an Amazon Neptune DB cluster snapshot
This data type is used as a response element in the DescribeDBClusterSnapshots action.
- **AvailabilityZones** *(list) --*
Provides the list of EC2 Availability Zones that instances in the DB cluster snapshot can be restored in.
- *(string) --*
- **DBClusterSnapshotIdentifier** *(string) --*
Specifies the identifier for the DB cluster snapshot.
- **DBClusterIdentifier** *(string) --*
Specifies the DB cluster identifier of the DB cluster that this DB cluster snapshot was created from.
- **SnapshotCreateTime** *(datetime) --*
Provides the time when the snapshot was taken, in Universal Coordinated Time (UTC).
- **Engine** *(string) --*
Specifies the name of the database engine.
- **AllocatedStorage** *(integer) --*
Specifies the allocated storage size in gibibytes (GiB).
- **Status** *(string) --*
Specifies the status of this DB cluster snapshot.
- **Port** *(integer) --*
Specifies the port that the DB cluster was listening on at the time of the snapshot.
- **VpcId** *(string) --*
Provides the VPC ID associated with the DB cluster snapshot.
- **ClusterCreateTime** *(datetime) --*
Specifies the time when the DB cluster was created, in Universal Coordinated Time (UTC).
- **MasterUsername** *(string) --*
Provides the master username for the DB cluster snapshot.
- **EngineVersion** *(string) --*
Provides the version of the database engine for this DB cluster snapshot.
- **LicenseModel** *(string) --*
Provides the license model information for this DB cluster snapshot.
- **SnapshotType** *(string) --*
Provides the type of the DB cluster snapshot.
- **PercentProgress** *(integer) --*
Specifies the percentage of the estimated data that has been transferred.
- **StorageEncrypted** *(boolean) --*
Specifies whether the DB cluster snapshot is encrypted.
- **KmsKeyId** *(string) --*
If ``StorageEncrypted`` is true, the AWS KMS key identifier for the encrypted DB cluster snapshot.
- **DBClusterSnapshotArn** *(string) --*
The Amazon Resource Name (ARN) for the DB cluster snapshot.
- **SourceDBClusterSnapshotArn** *(string) --*
If the DB cluster snapshot was copied from a source DB cluster snapshot, the Amazon Resource Name (ARN) for the source DB cluster snapshot, otherwise, a null value.
- **IAMDatabaseAuthenticationEnabled** *(boolean) --*
True if mapping of AWS Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false.
:type SourceDBClusterSnapshotIdentifier: string
:param SourceDBClusterSnapshotIdentifier: **[REQUIRED]**
The identifier of the DB cluster snapshot to copy. This parameter is not case-sensitive.
You can\'t copy from one AWS Region to another.
Constraints:
* Must specify a valid system snapshot in the \"available\" state.
* Specify a valid DB snapshot identifier.
Example: ``my-cluster-snapshot1``
:type TargetDBClusterSnapshotIdentifier: string
:param TargetDBClusterSnapshotIdentifier: **[REQUIRED]**
The identifier of the new DB cluster snapshot to create from the source DB cluster snapshot. This parameter is not case-sensitive.
Constraints:
* Must contain from 1 to 63 letters, numbers, or hyphens.
* First character must be a letter.
* Cannot end with a hyphen or contain two consecutive hyphens.
Example: ``my-cluster-snapshot2``
:type KmsKeyId: string
:param KmsKeyId:
The AWS AWS KMS key ID for an encrypted DB cluster snapshot. The KMS key ID is the Amazon Resource Name (ARN), KMS key identifier, or the KMS key alias for the KMS encryption key.
If you copy an unencrypted DB cluster snapshot and specify a value for the ``KmsKeyId`` parameter, Amazon Neptune encrypts the target DB cluster snapshot using the specified KMS encryption key.
If you copy an encrypted DB cluster snapshot from your AWS account, you can specify a value for ``KmsKeyId`` to encrypt the copy with a new KMS encryption key. If you don\'t specify a value for ``KmsKeyId`` , then the copy of the DB cluster snapshot is encrypted with the same KMS key as the source DB cluster snapshot.
If you copy an encrypted DB cluster snapshot that is shared from another AWS account, then you must specify a value for ``KmsKeyId`` .
KMS encryption keys are specific to the AWS Region that they are created in, and you can\'t use encryption keys from one AWS Region in another AWS Region.
:type PreSignedUrl: string
:param PreSignedUrl:
Not currently supported.
Please note that this parameter is automatically populated if it is not provided. Including this parameter is not required
:type CopyTags: boolean
:param CopyTags:
True to copy all tags from the source DB cluster snapshot to the target DB cluster snapshot, and otherwise false. The default is false.
:type Tags: list
:param Tags:
The tags to assign to the new DB cluster snapshot copy.
- *(dict) --*
Metadata assigned to an Amazon Neptune resource consisting of a key-value pair.
- **Key** *(string) --*
A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can\'t be prefixed with \"aws:\" or \"rds:\". The string can only contain only the set of Unicode letters, digits, white-space, \'_\', \'.\', \'/\', \'=\', \'+\', \'-\' (Java regex: \"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$\").
- **Value** *(string) --*
A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can\'t be prefixed with \"aws:\" or \"rds:\". The string can only contain only the set of Unicode letters, digits, white-space, \'_\', \'.\', \'/\', \'=\', \'+\', \'-\' (Java regex: \"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$\").
:type SourceRegion: string
:param SourceRegion:
The ID of the region that contains the snapshot to be copied.
:rtype: dict
:returns:
"""
pass
def copy_db_parameter_group(self, SourceDBParameterGroupIdentifier: str, TargetDBParameterGroupIdentifier: str, TargetDBParameterGroupDescription: str, Tags: List = None) -> Dict:
"""
Copies the specified DB parameter group.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CopyDBParameterGroup>`_
**Request Syntax**
::
response = client.copy_db_parameter_group(
SourceDBParameterGroupIdentifier='string',
TargetDBParameterGroupIdentifier='string',
TargetDBParameterGroupDescription='string',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
]
)
**Response Syntax**
::
{
'DBParameterGroup': {
'DBParameterGroupName': 'string',
'DBParameterGroupFamily': 'string',
'Description': 'string',
'DBParameterGroupArn': 'string'
}
}
**Response Structure**
- *(dict) --*
- **DBParameterGroup** *(dict) --*
Contains the details of an Amazon Neptune DB parameter group.
This data type is used as a response element in the DescribeDBParameterGroups action.
- **DBParameterGroupName** *(string) --*
Provides the name of the DB parameter group.
- **DBParameterGroupFamily** *(string) --*
Provides the name of the DB parameter group family that this DB parameter group is compatible with.
- **Description** *(string) --*
Provides the customer-specified description for this DB parameter group.
- **DBParameterGroupArn** *(string) --*
The Amazon Resource Name (ARN) for the DB parameter group.
:type SourceDBParameterGroupIdentifier: string
:param SourceDBParameterGroupIdentifier: **[REQUIRED]**
The identifier or ARN for the source DB parameter group. For information about creating an ARN, see `Constructing an Amazon Resource Name (ARN) <https://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html#tagging.ARN.Constructing>`__ .
Constraints:
* Must specify a valid DB parameter group.
* Must specify a valid DB parameter group identifier, for example ``my-db-param-group`` , or a valid ARN.
:type TargetDBParameterGroupIdentifier: string
:param TargetDBParameterGroupIdentifier: **[REQUIRED]**
The identifier for the copied DB parameter group.
Constraints:
* Cannot be null, empty, or blank.
* Must contain from 1 to 255 letters, numbers, or hyphens.
* First character must be a letter.
* Cannot end with a hyphen or contain two consecutive hyphens.
Example: ``my-db-parameter-group``
:type TargetDBParameterGroupDescription: string
:param TargetDBParameterGroupDescription: **[REQUIRED]**
A description for the copied DB parameter group.
:type Tags: list
:param Tags:
The tags to be assigned to the copied DB parameter group.
- *(dict) --*
Metadata assigned to an Amazon Neptune resource consisting of a key-value pair.
- **Key** *(string) --*
A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can\'t be prefixed with \"aws:\" or \"rds:\". The string can only contain only the set of Unicode letters, digits, white-space, \'_\', \'.\', \'/\', \'=\', \'+\', \'-\' (Java regex: \"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$\").
- **Value** *(string) --*
A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can\'t be prefixed with \"aws:\" or \"rds:\". The string can only contain only the set of Unicode letters, digits, white-space, \'_\', \'.\', \'/\', \'=\', \'+\', \'-\' (Java regex: \"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$\").
:rtype: dict
:returns:
"""
pass
def create_db_cluster(self, DBClusterIdentifier: str, Engine: str, AvailabilityZones: List = None, BackupRetentionPeriod: int = None, CharacterSetName: str = None, DatabaseName: str = None, DBClusterParameterGroupName: str = None, VpcSecurityGroupIds: List = None, DBSubnetGroupName: str = None, EngineVersion: str = None, Port: int = None, MasterUsername: str = None, MasterUserPassword: str = None, OptionGroupName: str = None, PreferredBackupWindow: str = None, PreferredMaintenanceWindow: str = None, ReplicationSourceIdentifier: str = None, Tags: List = None, StorageEncrypted: bool = None, KmsKeyId: str = None, PreSignedUrl: str = None, EnableIAMDatabaseAuthentication: bool = None, SourceRegion: str = None) -> Dict:
"""
Creates a new Amazon Neptune DB cluster.
You can use the ``ReplicationSourceIdentifier`` parameter to create the DB cluster as a Read Replica of another DB cluster or Amazon Neptune DB instance.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CreateDBCluster>`_
**Request Syntax**
::
response = client.create_db_cluster(
AvailabilityZones=[
'string',
],
BackupRetentionPeriod=123,
CharacterSetName='string',
DatabaseName='string',
DBClusterIdentifier='string',
DBClusterParameterGroupName='string',
VpcSecurityGroupIds=[
'string',
],
DBSubnetGroupName='string',
Engine='string',
EngineVersion='string',
Port=123,
MasterUsername='string',
MasterUserPassword='string',
OptionGroupName='string',
PreferredBackupWindow='string',
PreferredMaintenanceWindow='string',
ReplicationSourceIdentifier='string',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
StorageEncrypted=True|False,
KmsKeyId='string',
EnableIAMDatabaseAuthentication=True|False,
SourceRegion='string'
)
**Response Syntax**
::
{
'DBCluster': {
'AllocatedStorage': 123,
'AvailabilityZones': [
'string',
],
'BackupRetentionPeriod': 123,
'CharacterSetName': 'string',
'DatabaseName': 'string',
'DBClusterIdentifier': 'string',
'DBClusterParameterGroup': 'string',
'DBSubnetGroup': 'string',
'Status': 'string',
'PercentProgress': 'string',
'EarliestRestorableTime': datetime(2015, 1, 1),
'Endpoint': 'string',
'ReaderEndpoint': 'string',
'MultiAZ': True|False,
'Engine': 'string',
'EngineVersion': 'string',
'LatestRestorableTime': datetime(2015, 1, 1),
'Port': 123,
'MasterUsername': 'string',
'DBClusterOptionGroupMemberships': [
{
'DBClusterOptionGroupName': 'string',
'Status': 'string'
},
],
'PreferredBackupWindow': 'string',
'PreferredMaintenanceWindow': 'string',
'ReplicationSourceIdentifier': 'string',
'ReadReplicaIdentifiers': [
'string',
],
'DBClusterMembers': [
{
'DBInstanceIdentifier': 'string',
'IsClusterWriter': True|False,
'DBClusterParameterGroupStatus': 'string',
'PromotionTier': 123
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'HostedZoneId': 'string',
'StorageEncrypted': True|False,
'KmsKeyId': 'string',
'DbClusterResourceId': 'string',
'DBClusterArn': 'string',
'AssociatedRoles': [
{
'RoleArn': 'string',
'Status': 'string'
},
],
'IAMDatabaseAuthenticationEnabled': True|False,
'CloneGroupId': 'string',
'ClusterCreateTime': datetime(2015, 1, 1)
}
}
**Response Structure**
- *(dict) --*
- **DBCluster** *(dict) --*
Contains the details of an Amazon Neptune DB cluster.
This data type is used as a response element in the DescribeDBClusters action.
- **AllocatedStorage** *(integer) --*
``AllocatedStorage`` always returns 1, because Neptune DB cluster storage size is not fixed, but instead automatically adjusts as needed.
- **AvailabilityZones** *(list) --*
Provides the list of EC2 Availability Zones that instances in the DB cluster can be created in.
- *(string) --*
- **BackupRetentionPeriod** *(integer) --*
Specifies the number of days for which automatic DB snapshots are retained.
- **CharacterSetName** *(string) --*
If present, specifies the name of the character set that this cluster is associated with.
- **DatabaseName** *(string) --*
Contains the name of the initial database of this DB cluster that was provided at create time, if one was specified when the DB cluster was created. This same name is returned for the life of the DB cluster.
- **DBClusterIdentifier** *(string) --*
Contains a user-supplied DB cluster identifier. This identifier is the unique key that identifies a DB cluster.
- **DBClusterParameterGroup** *(string) --*
Specifies the name of the DB cluster parameter group for the DB cluster.
- **DBSubnetGroup** *(string) --*
Specifies information on the subnet group associated with the DB cluster, including the name, description, and subnets in the subnet group.
- **Status** *(string) --*
Specifies the current state of this DB cluster.
- **PercentProgress** *(string) --*
Specifies the progress of the operation as a percentage.
- **EarliestRestorableTime** *(datetime) --*
Specifies the earliest time to which a database can be restored with point-in-time restore.
- **Endpoint** *(string) --*
Specifies the connection endpoint for the primary instance of the DB cluster.
- **ReaderEndpoint** *(string) --*
The reader endpoint for the DB cluster. The reader endpoint for a DB cluster load-balances connections across the Read Replicas that are available in a DB cluster. As clients request new connections to the reader endpoint, Neptune distributes the connection requests among the Read Replicas in the DB cluster. This functionality can help balance your read workload across multiple Read Replicas in your DB cluster.
If a failover occurs, and the Read Replica that you are connected to is promoted to be the primary instance, your connection is dropped. To continue sending your read workload to other Read Replicas in the cluster, you can then reconnect to the reader endpoint.
- **MultiAZ** *(boolean) --*
Specifies whether the DB cluster has instances in multiple Availability Zones.
- **Engine** *(string) --*
Provides the name of the database engine to be used for this DB cluster.
- **EngineVersion** *(string) --*
Indicates the database engine version.
- **LatestRestorableTime** *(datetime) --*
Specifies the latest time to which a database can be restored with point-in-time restore.
- **Port** *(integer) --*
Specifies the port that the database engine is listening on.
- **MasterUsername** *(string) --*
Contains the master username for the DB cluster.
- **DBClusterOptionGroupMemberships** *(list) --*
Provides the list of option group memberships for this DB cluster.
- *(dict) --*
Contains status information for a DB cluster option group.
- **DBClusterOptionGroupName** *(string) --*
Specifies the name of the DB cluster option group.
- **Status** *(string) --*
Specifies the status of the DB cluster option group.
- **PreferredBackupWindow** *(string) --*
Specifies the daily time range during which automated backups are created if automated backups are enabled, as determined by the ``BackupRetentionPeriod`` .
- **PreferredMaintenanceWindow** *(string) --*
Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
- **ReplicationSourceIdentifier** *(string) --*
Not supported by Neptune.
- **ReadReplicaIdentifiers** *(list) --*
Contains one or more identifiers of the Read Replicas associated with this DB cluster.
- *(string) --*
- **DBClusterMembers** *(list) --*
Provides the list of instances that make up the DB cluster.
- *(dict) --*
Contains information about an instance that is part of a DB cluster.
- **DBInstanceIdentifier** *(string) --*
Specifies the instance identifier for this member of the DB cluster.
- **IsClusterWriter** *(boolean) --*
Value that is ``true`` if the cluster member is the primary instance for the DB cluster and ``false`` otherwise.
- **DBClusterParameterGroupStatus** *(string) --*
Specifies the status of the DB cluster parameter group for this member of the DB cluster.
- **PromotionTier** *(integer) --*
A value that specifies the order in which a Read Replica is promoted to the primary instance after a failure of the existing primary instance.
- **VpcSecurityGroups** *(list) --*
Provides a list of VPC security groups that the DB cluster belongs to.
- *(dict) --*
This data type is used as a response element for queries on VPC security group membership.
- **VpcSecurityGroupId** *(string) --*
The name of the VPC security group.
- **Status** *(string) --*
The status of the VPC security group.
- **HostedZoneId** *(string) --*
Specifies the ID that Amazon Route 53 assigns when you create a hosted zone.
- **StorageEncrypted** *(boolean) --*
Specifies whether the DB cluster is encrypted.
- **KmsKeyId** *(string) --*
If ``StorageEncrypted`` is true, the AWS KMS key identifier for the encrypted DB cluster.
- **DbClusterResourceId** *(string) --*
The AWS Region-unique, immutable identifier for the DB cluster. This identifier is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB cluster is accessed.
- **DBClusterArn** *(string) --*
The Amazon Resource Name (ARN) for the DB cluster.
- **AssociatedRoles** *(list) --*
Provides a list of the AWS Identity and Access Management (IAM) roles that are associated with the DB cluster. IAM roles that are associated with a DB cluster grant permission for the DB cluster to access other AWS services on your behalf.
- *(dict) --*
Describes an AWS Identity and Access Management (IAM) role that is associated with a DB cluster.
- **RoleArn** *(string) --*
The Amazon Resource Name (ARN) of the IAM role that is associated with the DB cluster.
- **Status** *(string) --*
Describes the state of association between the IAM role and the DB cluster. The Status property returns one of the following values:
* ``ACTIVE`` - the IAM role ARN is associated with the DB cluster and can be used to access other AWS services on your behalf.
* ``PENDING`` - the IAM role ARN is being associated with the DB cluster.
* ``INVALID`` - the IAM role ARN is associated with the DB cluster, but the DB cluster is unable to assume the IAM role in order to access other AWS services on your behalf.
- **IAMDatabaseAuthenticationEnabled** *(boolean) --*
True if mapping of AWS Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false.
- **CloneGroupId** *(string) --*
Identifies the clone group to which the DB cluster is associated.
- **ClusterCreateTime** *(datetime) --*
Specifies the time when the DB cluster was created, in Universal Coordinated Time (UTC).
:type AvailabilityZones: list
:param AvailabilityZones:
A list of EC2 Availability Zones that instances in the DB cluster can be created in.
- *(string) --*
:type BackupRetentionPeriod: integer
:param BackupRetentionPeriod:
The number of days for which automated backups are retained. You must specify a minimum value of 1.
Default: 1
Constraints:
* Must be a value from 1 to 35
:type CharacterSetName: string
:param CharacterSetName:
A value that indicates that the DB cluster should be associated with the specified CharacterSet.
:type DatabaseName: string
:param DatabaseName:
The name for your database of up to 64 alpha-numeric characters. If you do not provide a name, Amazon Neptune will not create a database in the DB cluster you are creating.
:type DBClusterIdentifier: string
:param DBClusterIdentifier: **[REQUIRED]**
The DB cluster identifier. This parameter is stored as a lowercase string.
Constraints:
* Must contain from 1 to 63 letters, numbers, or hyphens.
* First character must be a letter.
* Cannot end with a hyphen or contain two consecutive hyphens.
Example: ``my-cluster1``
:type DBClusterParameterGroupName: string
:param DBClusterParameterGroupName:
The name of the DB cluster parameter group to associate with this DB cluster. If this argument is omitted, the default is used.
Constraints:
* If supplied, must match the name of an existing DBClusterParameterGroup.
:type VpcSecurityGroupIds: list
:param VpcSecurityGroupIds:
A list of EC2 VPC security groups to associate with this DB cluster.
- *(string) --*
:type DBSubnetGroupName: string
:param DBSubnetGroupName:
A DB subnet group to associate with this DB cluster.
Constraints: Must match the name of an existing DBSubnetGroup. Must not be default.
Example: ``mySubnetgroup``
:type Engine: string
:param Engine: **[REQUIRED]**
The name of the database engine to be used for this DB cluster.
Valid Values: ``neptune``
:type EngineVersion: string
:param EngineVersion:
The version number of the database engine to use.
Example: ``1.0.1``
:type Port: integer
:param Port:
The port number on which the instances in the DB cluster accept connections.
Default: ``8182``
:type MasterUsername: string
:param MasterUsername:
The name of the master user for the DB cluster.
Constraints:
* Must be 1 to 16 letters or numbers.
* First character must be a letter.
* Cannot be a reserved word for the chosen database engine.
:type MasterUserPassword: string
:param MasterUserPassword:
The password for the master database user. This password can contain any printable ASCII character except \"/\", \"\"\", or \"@\".
Constraints: Must contain from 8 to 41 characters.
:type OptionGroupName: string
:param OptionGroupName:
A value that indicates that the DB cluster should be associated with the specified option group.
Permanent options can\'t be removed from an option group. The option group can\'t be removed from a DB cluster once it is associated with a DB cluster.
:type PreferredBackupWindow: string
:param PreferredBackupWindow:
The daily time range during which automated backups are created if automated backups are enabled using the ``BackupRetentionPeriod`` parameter.
The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region. To see the time blocks available, see `Adjusting the Preferred Maintenance Window <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AdjustingTheMaintenanceWindow.html>`__ in the *Amazon Neptune User Guide.*
Constraints:
* Must be in the format ``hh24:mi-hh24:mi`` .
* Must be in Universal Coordinated Time (UTC).
* Must not conflict with the preferred maintenance window.
* Must be at least 30 minutes.
:type PreferredMaintenanceWindow: string
:param PreferredMaintenanceWindow:
The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
Format: ``ddd:hh24:mi-ddd:hh24:mi``
The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region, occurring on a random day of the week. To see the time blocks available, see `Adjusting the Preferred Maintenance Window <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AdjustingTheMaintenanceWindow.html>`__ in the *Amazon Neptune User Guide.*
Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun.
Constraints: Minimum 30-minute window.
:type ReplicationSourceIdentifier: string
:param ReplicationSourceIdentifier:
The Amazon Resource Name (ARN) of the source DB instance or DB cluster if this DB cluster is created as a Read Replica.
:type Tags: list
:param Tags:
The tags to assign to the new DB cluster.
- *(dict) --*
Metadata assigned to an Amazon Neptune resource consisting of a key-value pair.
- **Key** *(string) --*
A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can\'t be prefixed with \"aws:\" or \"rds:\". The string can only contain only the set of Unicode letters, digits, white-space, \'_\', \'.\', \'/\', \'=\', \'+\', \'-\' (Java regex: \"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$\").
- **Value** *(string) --*
A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can\'t be prefixed with \"aws:\" or \"rds:\". The string can only contain only the set of Unicode letters, digits, white-space, \'_\', \'.\', \'/\', \'=\', \'+\', \'-\' (Java regex: \"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$\").
:type StorageEncrypted: boolean
:param StorageEncrypted:
Specifies whether the DB cluster is encrypted.
:type KmsKeyId: string
:param KmsKeyId:
The AWS KMS key identifier for an encrypted DB cluster.
The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a DB cluster with the same AWS account that owns the KMS encryption key used to encrypt the new DB cluster, then you can use the KMS key alias instead of the ARN for the KMS encryption key.
If an encryption key is not specified in ``KmsKeyId`` :
* If ``ReplicationSourceIdentifier`` identifies an encrypted source, then Amazon Neptune will use the encryption key used to encrypt the source. Otherwise, Amazon Neptune will use your default encryption key.
* If the ``StorageEncrypted`` parameter is true and ``ReplicationSourceIdentifier`` is not specified, then Amazon Neptune will use your default encryption key.
AWS KMS creates the default encryption key for your AWS account. Your AWS account has a different default encryption key for each AWS Region.
If you create a Read Replica of an encrypted DB cluster in another AWS Region, you must set ``KmsKeyId`` to a KMS key ID that is valid in the destination AWS Region. This key is used to encrypt the Read Replica in that AWS Region.
:type PreSignedUrl: string
:param PreSignedUrl:
This parameter is not currently supported.
Please note that this parameter is automatically populated if it is not provided. Including this parameter is not required
:type EnableIAMDatabaseAuthentication: boolean
:param EnableIAMDatabaseAuthentication:
True to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts, and otherwise false.
Default: ``false``
:type SourceRegion: string
:param SourceRegion:
The ID of the region that contains the source for the db cluster.
:rtype: dict
:returns:
"""
pass
def create_db_cluster_parameter_group(self, DBClusterParameterGroupName: str, DBParameterGroupFamily: str, Description: str, Tags: List = None) -> Dict:
"""
Creates a new DB cluster parameter group.
Parameters in a DB cluster parameter group apply to all of the instances in a DB cluster.
A DB cluster parameter group is initially created with the default parameters for the database engine used by instances in the DB cluster. To provide custom values for any of the parameters, you must modify the group after creating it using ModifyDBClusterParameterGroup . Once you've created a DB cluster parameter group, you need to associate it with your DB cluster using ModifyDBCluster . When you associate a new DB cluster parameter group with a running DB cluster, you need to reboot the DB instances in the DB cluster without failover for the new DB cluster parameter group and associated settings to take effect.
.. warning::
After you create a DB cluster parameter group, you should wait at least 5 minutes before creating your first DB cluster that uses that DB cluster parameter group as the default parameter group. This allows Amazon Neptune to fully complete the create action before the DB cluster parameter group is used as the default for a new DB cluster. This is especially important for parameters that are critical when creating the default database for a DB cluster, such as the character set for the default database defined by the ``character_set_database`` parameter. You can use the *Parameter Groups* option of the `Amazon Neptune console <https://console.aws.amazon.com/rds/>`__ or the DescribeDBClusterParameters command to verify that your DB cluster parameter group has been created or modified.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CreateDBClusterParameterGroup>`_
**Request Syntax**
::
response = client.create_db_cluster_parameter_group(
DBClusterParameterGroupName='string',
DBParameterGroupFamily='string',
Description='string',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
]
)
**Response Syntax**
::
{
'DBClusterParameterGroup': {
'DBClusterParameterGroupName': 'string',
'DBParameterGroupFamily': 'string',
'Description': 'string',
'DBClusterParameterGroupArn': 'string'
}
}
**Response Structure**
- *(dict) --*
- **DBClusterParameterGroup** *(dict) --*
Contains the details of an Amazon Neptune DB cluster parameter group.
This data type is used as a response element in the DescribeDBClusterParameterGroups action.
- **DBClusterParameterGroupName** *(string) --*
Provides the name of the DB cluster parameter group.
- **DBParameterGroupFamily** *(string) --*
Provides the name of the DB parameter group family that this DB cluster parameter group is compatible with.
- **Description** *(string) --*
Provides the customer-specified description for this DB cluster parameter group.
- **DBClusterParameterGroupArn** *(string) --*
The Amazon Resource Name (ARN) for the DB cluster parameter group.
:type DBClusterParameterGroupName: string
:param DBClusterParameterGroupName: **[REQUIRED]**
The name of the DB cluster parameter group.
Constraints:
* Must match the name of an existing DBClusterParameterGroup.
.. note::
This value is stored as a lowercase string.
:type DBParameterGroupFamily: string
:param DBParameterGroupFamily: **[REQUIRED]**
The DB cluster parameter group family name. A DB cluster parameter group can be associated with one and only one DB cluster parameter group family, and can be applied only to a DB cluster running a database engine and engine version compatible with that DB cluster parameter group family.
:type Description: string
:param Description: **[REQUIRED]**
The description for the DB cluster parameter group.
:type Tags: list
:param Tags:
The tags to be assigned to the new DB cluster parameter group.
- *(dict) --*
Metadata assigned to an Amazon Neptune resource consisting of a key-value pair.
- **Key** *(string) --*
A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can\'t be prefixed with \"aws:\" or \"rds:\". The string can only contain only the set of Unicode letters, digits, white-space, \'_\', \'.\', \'/\', \'=\', \'+\', \'-\' (Java regex: \"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$\").
- **Value** *(string) --*
A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can\'t be prefixed with \"aws:\" or \"rds:\". The string can only contain only the set of Unicode letters, digits, white-space, \'_\', \'.\', \'/\', \'=\', \'+\', \'-\' (Java regex: \"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$\").
:rtype: dict
:returns:
"""
pass
def create_db_cluster_snapshot(self, DBClusterSnapshotIdentifier: str, DBClusterIdentifier: str, Tags: List = None) -> Dict:
"""
Creates a snapshot of a DB cluster.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CreateDBClusterSnapshot>`_
**Request Syntax**
::
response = client.create_db_cluster_snapshot(
DBClusterSnapshotIdentifier='string',
DBClusterIdentifier='string',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
]
)
**Response Syntax**
::
{
'DBClusterSnapshot': {
'AvailabilityZones': [
'string',
],
'DBClusterSnapshotIdentifier': 'string',
'DBClusterIdentifier': 'string',
'SnapshotCreateTime': datetime(2015, 1, 1),
'Engine': 'string',
'AllocatedStorage': 123,
'Status': 'string',
'Port': 123,
'VpcId': 'string',
'ClusterCreateTime': datetime(2015, 1, 1),
'MasterUsername': 'string',
'EngineVersion': 'string',
'LicenseModel': 'string',
'SnapshotType': 'string',
'PercentProgress': 123,
'StorageEncrypted': True|False,
'KmsKeyId': 'string',
'DBClusterSnapshotArn': 'string',
'SourceDBClusterSnapshotArn': 'string',
'IAMDatabaseAuthenticationEnabled': True|False
}
}
**Response Structure**
- *(dict) --*
- **DBClusterSnapshot** *(dict) --*
Contains the details for an Amazon Neptune DB cluster snapshot
This data type is used as a response element in the DescribeDBClusterSnapshots action.
- **AvailabilityZones** *(list) --*
Provides the list of EC2 Availability Zones that instances in the DB cluster snapshot can be restored in.
- *(string) --*
- **DBClusterSnapshotIdentifier** *(string) --*
Specifies the identifier for the DB cluster snapshot.
- **DBClusterIdentifier** *(string) --*
Specifies the DB cluster identifier of the DB cluster that this DB cluster snapshot was created from.
- **SnapshotCreateTime** *(datetime) --*
Provides the time when the snapshot was taken, in Universal Coordinated Time (UTC).
- **Engine** *(string) --*
Specifies the name of the database engine.
- **AllocatedStorage** *(integer) --*
Specifies the allocated storage size in gibibytes (GiB).
- **Status** *(string) --*
Specifies the status of this DB cluster snapshot.
- **Port** *(integer) --*
Specifies the port that the DB cluster was listening on at the time of the snapshot.
- **VpcId** *(string) --*
Provides the VPC ID associated with the DB cluster snapshot.
- **ClusterCreateTime** *(datetime) --*
Specifies the time when the DB cluster was created, in Universal Coordinated Time (UTC).
- **MasterUsername** *(string) --*
Provides the master username for the DB cluster snapshot.
- **EngineVersion** *(string) --*
Provides the version of the database engine for this DB cluster snapshot.
- **LicenseModel** *(string) --*
Provides the license model information for this DB cluster snapshot.
- **SnapshotType** *(string) --*
Provides the type of the DB cluster snapshot.
- **PercentProgress** *(integer) --*
Specifies the percentage of the estimated data that has been transferred.
- **StorageEncrypted** *(boolean) --*
Specifies whether the DB cluster snapshot is encrypted.
- **KmsKeyId** *(string) --*
If ``StorageEncrypted`` is true, the AWS KMS key identifier for the encrypted DB cluster snapshot.
- **DBClusterSnapshotArn** *(string) --*
The Amazon Resource Name (ARN) for the DB cluster snapshot.
- **SourceDBClusterSnapshotArn** *(string) --*
If the DB cluster snapshot was copied from a source DB cluster snapshot, the Amazon Resource Name (ARN) for the source DB cluster snapshot, otherwise, a null value.
- **IAMDatabaseAuthenticationEnabled** *(boolean) --*
True if mapping of AWS Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false.
:type DBClusterSnapshotIdentifier: string
:param DBClusterSnapshotIdentifier: **[REQUIRED]**
The identifier of the DB cluster snapshot. This parameter is stored as a lowercase string.
Constraints:
* Must contain from 1 to 63 letters, numbers, or hyphens.
* First character must be a letter.
* Cannot end with a hyphen or contain two consecutive hyphens.
Example: ``my-cluster1-snapshot1``
:type DBClusterIdentifier: string
:param DBClusterIdentifier: **[REQUIRED]**
The identifier of the DB cluster to create a snapshot for. This parameter is not case-sensitive.
Constraints:
* Must match the identifier of an existing DBCluster.
Example: ``my-cluster1``
:type Tags: list
:param Tags:
The tags to be assigned to the DB cluster snapshot.
- *(dict) --*
Metadata assigned to an Amazon Neptune resource consisting of a key-value pair.
- **Key** *(string) --*
A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can\'t be prefixed with \"aws:\" or \"rds:\". The string can only contain only the set of Unicode letters, digits, white-space, \'_\', \'.\', \'/\', \'=\', \'+\', \'-\' (Java regex: \"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$\").
- **Value** *(string) --*
A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can\'t be prefixed with \"aws:\" or \"rds:\". The string can only contain only the set of Unicode letters, digits, white-space, \'_\', \'.\', \'/\', \'=\', \'+\', \'-\' (Java regex: \"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$\").
:rtype: dict
:returns:
"""
pass
def create_db_instance(self, DBInstanceIdentifier: str, DBInstanceClass: str, Engine: str, DBName: str = None, AllocatedStorage: int = None, MasterUsername: str = None, MasterUserPassword: str = None, DBSecurityGroups: List = None, VpcSecurityGroupIds: List = None, AvailabilityZone: str = None, DBSubnetGroupName: str = None, PreferredMaintenanceWindow: str = None, DBParameterGroupName: str = None, BackupRetentionPeriod: int = None, PreferredBackupWindow: str = None, Port: int = None, MultiAZ: bool = None, EngineVersion: str = None, AutoMinorVersionUpgrade: bool = None, LicenseModel: str = None, Iops: int = None, OptionGroupName: str = None, CharacterSetName: str = None, PubliclyAccessible: bool = None, Tags: List = None, DBClusterIdentifier: str = None, StorageType: str = None, TdeCredentialArn: str = None, TdeCredentialPassword: str = None, StorageEncrypted: bool = None, KmsKeyId: str = None, Domain: str = None, CopyTagsToSnapshot: bool = None, MonitoringInterval: int = None, MonitoringRoleArn: str = None, DomainIAMRoleName: str = None, PromotionTier: int = None, Timezone: str = None, EnableIAMDatabaseAuthentication: bool = None, EnablePerformanceInsights: bool = None, PerformanceInsightsKMSKeyId: str = None, EnableCloudwatchLogsExports: List = None) -> Dict:
"""
Creates a new DB instance.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CreateDBInstance>`_
**Request Syntax**
::
response = client.create_db_instance(
DBName='string',
DBInstanceIdentifier='string',
AllocatedStorage=123,
DBInstanceClass='string',
Engine='string',
MasterUsername='string',
MasterUserPassword='string',
DBSecurityGroups=[
'string',
],
VpcSecurityGroupIds=[
'string',
],
AvailabilityZone='string',
DBSubnetGroupName='string',
PreferredMaintenanceWindow='string',
DBParameterGroupName='string',
BackupRetentionPeriod=123,
PreferredBackupWindow='string',
Port=123,
MultiAZ=True|False,
EngineVersion='string',
AutoMinorVersionUpgrade=True|False,
LicenseModel='string',
Iops=123,
OptionGroupName='string',
CharacterSetName='string',
PubliclyAccessible=True|False,
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
DBClusterIdentifier='string',
StorageType='string',
TdeCredentialArn='string',
TdeCredentialPassword='string',
StorageEncrypted=True|False,
KmsKeyId='string',
Domain='string',
CopyTagsToSnapshot=True|False,
MonitoringInterval=123,
MonitoringRoleArn='string',
DomainIAMRoleName='string',
PromotionTier=123,
Timezone='string',
EnableIAMDatabaseAuthentication=True|False,
EnablePerformanceInsights=True|False,
PerformanceInsightsKMSKeyId='string',
EnableCloudwatchLogsExports=[
'string',
]
)
**Response Syntax**
::
{
'DBInstance': {
'DBInstanceIdentifier': 'string',
'DBInstanceClass': 'string',
'Engine': 'string',
'DBInstanceStatus': 'string',
'MasterUsername': 'string',
'DBName': 'string',
'Endpoint': {
'Address': 'string',
'Port': 123,
'HostedZoneId': 'string'
},
'AllocatedStorage': 123,
'InstanceCreateTime': datetime(2015, 1, 1),
'PreferredBackupWindow': 'string',
'BackupRetentionPeriod': 123,
'DBSecurityGroups': [
{
'DBSecurityGroupName': 'string',
'Status': 'string'
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'DBParameterGroups': [
{
'DBParameterGroupName': 'string',
'ParameterApplyStatus': 'string'
},
],
'AvailabilityZone': 'string',
'DBSubnetGroup': {
'DBSubnetGroupName': 'string',
'DBSubnetGroupDescription': 'string',
'VpcId': 'string',
'SubnetGroupStatus': 'string',
'Subnets': [
{
'SubnetIdentifier': 'string',
'SubnetAvailabilityZone': {
'Name': 'string'
},
'SubnetStatus': 'string'
},
],
'DBSubnetGroupArn': 'string'
},
'PreferredMaintenanceWindow': 'string',
'PendingModifiedValues': {
'DBInstanceClass': 'string',
'AllocatedStorage': 123,
'MasterUserPassword': 'string',
'Port': 123,
'BackupRetentionPeriod': 123,
'MultiAZ': True|False,
'EngineVersion': 'string',
'LicenseModel': 'string',
'Iops': 123,
'DBInstanceIdentifier': 'string',
'StorageType': 'string',
'CACertificateIdentifier': 'string',
'DBSubnetGroupName': 'string',
'PendingCloudwatchLogsExports': {
'LogTypesToEnable': [
'string',
],
'LogTypesToDisable': [
'string',
]
}
},
'LatestRestorableTime': datetime(2015, 1, 1),
'MultiAZ': True|False,
'EngineVersion': 'string',
'AutoMinorVersionUpgrade': True|False,
'ReadReplicaSourceDBInstanceIdentifier': 'string',
'ReadReplicaDBInstanceIdentifiers': [
'string',
],
'ReadReplicaDBClusterIdentifiers': [
'string',
],
'LicenseModel': 'string',
'Iops': 123,
'OptionGroupMemberships': [
{
'OptionGroupName': 'string',
'Status': 'string'
},
],
'CharacterSetName': 'string',
'SecondaryAvailabilityZone': 'string',
'PubliclyAccessible': True|False,
'StatusInfos': [
{
'StatusType': 'string',
'Normal': True|False,
'Status': 'string',
'Message': 'string'
},
],
'StorageType': 'string',
'TdeCredentialArn': 'string',
'DbInstancePort': 123,
'DBClusterIdentifier': 'string',
'StorageEncrypted': True|False,
'KmsKeyId': 'string',
'DbiResourceId': 'string',
'CACertificateIdentifier': 'string',
'DomainMemberships': [
{
'Domain': 'string',
'Status': 'string',
'FQDN': 'string',
'IAMRoleName': 'string'
},
],
'CopyTagsToSnapshot': True|False,
'MonitoringInterval': 123,
'EnhancedMonitoringResourceArn': 'string',
'MonitoringRoleArn': 'string',
'PromotionTier': 123,
'DBInstanceArn': 'string',
'Timezone': 'string',
'IAMDatabaseAuthenticationEnabled': True|False,
'PerformanceInsightsEnabled': True|False,
'PerformanceInsightsKMSKeyId': 'string',
'EnabledCloudwatchLogsExports': [
'string',
]
}
}
**Response Structure**
- *(dict) --*
- **DBInstance** *(dict) --*
Contains the details of an Amazon Neptune DB instance.
This data type is used as a response element in the DescribeDBInstances action.
- **DBInstanceIdentifier** *(string) --*
Contains a user-supplied database identifier. This identifier is the unique key that identifies a DB instance.
- **DBInstanceClass** *(string) --*
Contains the name of the compute and memory capacity class of the DB instance.
- **Engine** *(string) --*
Provides the name of the database engine to be used for this DB instance.
- **DBInstanceStatus** *(string) --*
Specifies the current state of this database.
- **MasterUsername** *(string) --*
Contains the master username for the DB instance.
- **DBName** *(string) --*
The database name.
- **Endpoint** *(dict) --*
Specifies the connection endpoint.
- **Address** *(string) --*
Specifies the DNS address of the DB instance.
- **Port** *(integer) --*
Specifies the port that the database engine is listening on.
- **HostedZoneId** *(string) --*
Specifies the ID that Amazon Route 53 assigns when you create a hosted zone.
- **AllocatedStorage** *(integer) --*
Specifies the allocated storage size specified in gibibytes.
- **InstanceCreateTime** *(datetime) --*
Provides the date and time the DB instance was created.
- **PreferredBackupWindow** *(string) --*
Specifies the daily time range during which automated backups are created if automated backups are enabled, as determined by the ``BackupRetentionPeriod`` .
- **BackupRetentionPeriod** *(integer) --*
Specifies the number of days for which automatic DB snapshots are retained.
- **DBSecurityGroups** *(list) --*
Provides List of DB security group elements containing only ``DBSecurityGroup.Name`` and ``DBSecurityGroup.Status`` subelements.
- *(dict) --*
Specifies membership in a designated DB security group.
- **DBSecurityGroupName** *(string) --*
The name of the DB security group.
- **Status** *(string) --*
The status of the DB security group.
- **VpcSecurityGroups** *(list) --*
Provides a list of VPC security group elements that the DB instance belongs to.
- *(dict) --*
This data type is used as a response element for queries on VPC security group membership.
- **VpcSecurityGroupId** *(string) --*
The name of the VPC security group.
- **Status** *(string) --*
The status of the VPC security group.
- **DBParameterGroups** *(list) --*
Provides the list of DB parameter groups applied to this DB instance.
- *(dict) --*
The status of the DB parameter group.
This data type is used as a response element in the following actions:
* CreateDBInstance
* DeleteDBInstance
* ModifyDBInstance
* RebootDBInstance
- **DBParameterGroupName** *(string) --*
The name of the DP parameter group.
- **ParameterApplyStatus** *(string) --*
The status of parameter updates.
- **AvailabilityZone** *(string) --*
Specifies the name of the Availability Zone the DB instance is located in.
- **DBSubnetGroup** *(dict) --*
Specifies information on the subnet group associated with the DB instance, including the name, description, and subnets in the subnet group.
- **DBSubnetGroupName** *(string) --*
The name of the DB subnet group.
- **DBSubnetGroupDescription** *(string) --*
Provides the description of the DB subnet group.
- **VpcId** *(string) --*
Provides the VpcId of the DB subnet group.
- **SubnetGroupStatus** *(string) --*
Provides the status of the DB subnet group.
- **Subnets** *(list) --*
Contains a list of Subnet elements.
- *(dict) --*
Specifies a subnet.
This data type is used as a response element in the DescribeDBSubnetGroups action.
- **SubnetIdentifier** *(string) --*
Specifies the identifier of the subnet.
- **SubnetAvailabilityZone** *(dict) --*
Specifies the EC2 Availability Zone that the subnet is in.
- **Name** *(string) --*
The name of the availability zone.
- **SubnetStatus** *(string) --*
Specifies the status of the subnet.
- **DBSubnetGroupArn** *(string) --*
The Amazon Resource Name (ARN) for the DB subnet group.
- **PreferredMaintenanceWindow** *(string) --*
Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
- **PendingModifiedValues** *(dict) --*
Specifies that changes to the DB instance are pending. This element is only included when changes are pending. Specific changes are identified by subelements.
- **DBInstanceClass** *(string) --*
Contains the new ``DBInstanceClass`` for the DB instance that will be applied or is currently being applied.
- **AllocatedStorage** *(integer) --*
Contains the new ``AllocatedStorage`` size for the DB instance that will be applied or is currently being applied.
- **MasterUserPassword** *(string) --*
Contains the pending or currently-in-progress change of the master credentials for the DB instance.
- **Port** *(integer) --*
Specifies the pending port for the DB instance.
- **BackupRetentionPeriod** *(integer) --*
Specifies the pending number of days for which automated backups are retained.
- **MultiAZ** *(boolean) --*
Indicates that the Single-AZ DB instance is to change to a Multi-AZ deployment.
- **EngineVersion** *(string) --*
Indicates the database engine version.
- **LicenseModel** *(string) --*
The license model for the DB instance.
Valid values: ``license-included`` | ``bring-your-own-license`` | ``general-public-license``
- **Iops** *(integer) --*
Specifies the new Provisioned IOPS value for the DB instance that will be applied or is currently being applied.
- **DBInstanceIdentifier** *(string) --*
Contains the new ``DBInstanceIdentifier`` for the DB instance that will be applied or is currently being applied.
- **StorageType** *(string) --*
Specifies the storage type to be associated with the DB instance.
- **CACertificateIdentifier** *(string) --*
Specifies the identifier of the CA certificate for the DB instance.
- **DBSubnetGroupName** *(string) --*
The new DB subnet group for the DB instance.
- **PendingCloudwatchLogsExports** *(dict) --*
Specifies the CloudWatch logs to be exported.
- **LogTypesToEnable** *(list) --*
Log types that are in the process of being deactivated. After they are deactivated, these log types aren't exported to CloudWatch Logs.
- *(string) --*
- **LogTypesToDisable** *(list) --*
Log types that are in the process of being enabled. After they are enabled, these log types are exported to CloudWatch Logs.
- *(string) --*
- **LatestRestorableTime** *(datetime) --*
Specifies the latest time to which a database can be restored with point-in-time restore.
- **MultiAZ** *(boolean) --*
Specifies if the DB instance is a Multi-AZ deployment.
- **EngineVersion** *(string) --*
Indicates the database engine version.
- **AutoMinorVersionUpgrade** *(boolean) --*
Indicates that minor version patches are applied automatically.
- **ReadReplicaSourceDBInstanceIdentifier** *(string) --*
Contains the identifier of the source DB instance if this DB instance is a Read Replica.
- **ReadReplicaDBInstanceIdentifiers** *(list) --*
Contains one or more identifiers of the Read Replicas associated with this DB instance.
- *(string) --*
- **ReadReplicaDBClusterIdentifiers** *(list) --*
Contains one or more identifiers of DB clusters that are Read Replicas of this DB instance.
- *(string) --*
- **LicenseModel** *(string) --*
License model information for this DB instance.
- **Iops** *(integer) --*
Specifies the Provisioned IOPS (I/O operations per second) value.
- **OptionGroupMemberships** *(list) --*
Provides the list of option group memberships for this DB instance.
- *(dict) --*
Provides information on the option groups the DB instance is a member of.
- **OptionGroupName** *(string) --*
The name of the option group that the instance belongs to.
- **Status** *(string) --*
The status of the DB instance's option group membership. Valid values are: ``in-sync`` , ``pending-apply`` , ``pending-removal`` , ``pending-maintenance-apply`` , ``pending-maintenance-removal`` , ``applying`` , ``removing`` , and ``failed`` .
- **CharacterSetName** *(string) --*
If present, specifies the name of the character set that this instance is associated with.
- **SecondaryAvailabilityZone** *(string) --*
If present, specifies the name of the secondary Availability Zone for a DB instance with multi-AZ support.
- **PubliclyAccessible** *(boolean) --*
This flag should no longer be used.
- **StatusInfos** *(list) --*
The status of a Read Replica. If the instance is not a Read Replica, this is blank.
- *(dict) --*
Provides a list of status information for a DB instance.
- **StatusType** *(string) --*
This value is currently "read replication."
- **Normal** *(boolean) --*
Boolean value that is true if the instance is operating normally, or false if the instance is in an error state.
- **Status** *(string) --*
Status of the DB instance. For a StatusType of read replica, the values can be replicating, error, stopped, or terminated.
- **Message** *(string) --*
Details of the error if there is an error for the instance. If the instance is not in an error state, this value is blank.
- **StorageType** *(string) --*
Specifies the storage type associated with DB instance.
- **TdeCredentialArn** *(string) --*
The ARN from the key store with which the instance is associated for TDE encryption.
- **DbInstancePort** *(integer) --*
Specifies the port that the DB instance listens on. If the DB instance is part of a DB cluster, this can be a different port than the DB cluster port.
- **DBClusterIdentifier** *(string) --*
If the DB instance is a member of a DB cluster, contains the name of the DB cluster that the DB instance is a member of.
- **StorageEncrypted** *(boolean) --*
Not supported: The encryption for DB instances is managed by the DB cluster.
- **KmsKeyId** *(string) --*
Not supported: The encryption for DB instances is managed by the DB cluster.
- **DbiResourceId** *(string) --*
The AWS Region-unique, immutable identifier for the DB instance. This identifier is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB instance is accessed.
- **CACertificateIdentifier** *(string) --*
The identifier of the CA certificate for this DB instance.
- **DomainMemberships** *(list) --*
Not supported
- *(dict) --*
An Active Directory Domain membership record associated with a DB instance.
- **Domain** *(string) --*
The identifier of the Active Directory Domain.
- **Status** *(string) --*
The status of the DB instance's Active Directory Domain membership, such as joined, pending-join, failed etc).
- **FQDN** *(string) --*
The fully qualified domain name of the Active Directory Domain.
- **IAMRoleName** *(string) --*
The name of the IAM role to be used when making API calls to the Directory Service.
- **CopyTagsToSnapshot** *(boolean) --*
Specifies whether tags are copied from the DB instance to snapshots of the DB instance.
- **MonitoringInterval** *(integer) --*
The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance.
- **EnhancedMonitoringResourceArn** *(string) --*
The Amazon Resource Name (ARN) of the Amazon CloudWatch Logs log stream that receives the Enhanced Monitoring metrics data for the DB instance.
- **MonitoringRoleArn** *(string) --*
The ARN for the IAM role that permits Neptune to send Enhanced Monitoring metrics to Amazon CloudWatch Logs.
- **PromotionTier** *(integer) --*
A value that specifies the order in which a Read Replica is promoted to the primary instance after a failure of the existing primary instance.
- **DBInstanceArn** *(string) --*
The Amazon Resource Name (ARN) for the DB instance.
- **Timezone** *(string) --*
Not supported.
- **IAMDatabaseAuthenticationEnabled** *(boolean) --*
True if AWS Identity and Access Management (IAM) authentication is enabled, and otherwise false.
- **PerformanceInsightsEnabled** *(boolean) --*
True if Performance Insights is enabled for the DB instance, and otherwise false.
- **PerformanceInsightsKMSKeyId** *(string) --*
The AWS KMS key identifier for encryption of Performance Insights data. The KMS key ID is the Amazon Resource Name (ARN), KMS key identifier, or the KMS key alias for the KMS encryption key.
- **EnabledCloudwatchLogsExports** *(list) --*
A list of log types that this DB instance is configured to export to CloudWatch Logs.
- *(string) --*
:type DBName: string
:param DBName:
Not supported.
:type DBInstanceIdentifier: string
:param DBInstanceIdentifier: **[REQUIRED]**
The DB instance identifier. This parameter is stored as a lowercase string.
Constraints:
* Must contain from 1 to 63 letters, numbers, or hyphens.
* First character must be a letter.
* Cannot end with a hyphen or contain two consecutive hyphens.
Example: ``mydbinstance``
:type AllocatedStorage: integer
:param AllocatedStorage:
The amount of storage (in gibibytes) to allocate for the DB instance.
Type: Integer
Not applicable. Neptune cluster volumes automatically grow as the amount of data in your database increases, though you are only charged for the space that you use in a Neptune cluster volume.
:type DBInstanceClass: string
:param DBInstanceClass: **[REQUIRED]**
The compute and memory capacity of the DB instance, for example, ``db.m4.large`` . Not all DB instance classes are available in all AWS Regions.
:type Engine: string
:param Engine: **[REQUIRED]**
The name of the database engine to be used for this instance.
Valid Values: ``neptune``
:type MasterUsername: string
:param MasterUsername:
The name for the master user. Not used.
:type MasterUserPassword: string
:param MasterUserPassword:
The password for the master user. The password can include any printable ASCII character except \"/\", \"\"\", or \"@\".
Not used.
:type DBSecurityGroups: list
:param DBSecurityGroups:
A list of DB security groups to associate with this DB instance.
Default: The default DB security group for the database engine.
- *(string) --*
:type VpcSecurityGroupIds: list
:param VpcSecurityGroupIds:
A list of EC2 VPC security groups to associate with this DB instance.
Not applicable. The associated list of EC2 VPC security groups is managed by the DB cluster. For more information, see CreateDBCluster .
Default: The default EC2 VPC security group for the DB subnet group\'s VPC.
- *(string) --*
:type AvailabilityZone: string
:param AvailabilityZone:
The EC2 Availability Zone that the DB instance is created in
Default: A random, system-chosen Availability Zone in the endpoint\'s AWS Region.
Example: ``us-east-1d``
Constraint: The AvailabilityZone parameter can\'t be specified if the MultiAZ parameter is set to ``true`` . The specified Availability Zone must be in the same AWS Region as the current endpoint.
:type DBSubnetGroupName: string
:param DBSubnetGroupName:
A DB subnet group to associate with this DB instance.
If there is no DB subnet group, then it is a non-VPC DB instance.
:type PreferredMaintenanceWindow: string
:param PreferredMaintenanceWindow:
The time range each week during which system maintenance can occur, in Universal Coordinated Time (UTC).
Format: ``ddd:hh24:mi-ddd:hh24:mi``
The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region, occurring on a random day of the week.
Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun.
Constraints: Minimum 30-minute window.
:type DBParameterGroupName: string
:param DBParameterGroupName:
The name of the DB parameter group to associate with this DB instance. If this argument is omitted, the default DBParameterGroup for the specified engine is used.
Constraints:
* Must be 1 to 255 letters, numbers, or hyphens.
* First character must be a letter
* Cannot end with a hyphen or contain two consecutive hyphens
:type BackupRetentionPeriod: integer
:param BackupRetentionPeriod:
The number of days for which automated backups are retained.
Not applicable. The retention period for automated backups is managed by the DB cluster. For more information, see CreateDBCluster .
Default: 1
Constraints:
* Must be a value from 0 to 35
* Cannot be set to 0 if the DB instance is a source to Read Replicas
:type PreferredBackupWindow: string
:param PreferredBackupWindow:
The daily time range during which automated backups are created.
Not applicable. The daily time range for creating automated backups is managed by the DB cluster. For more information, see CreateDBCluster .
:type Port: integer
:param Port:
The port number on which the database accepts connections.
Not applicable. The port is managed by the DB cluster. For more information, see CreateDBCluster .
Default: ``8182``
Type: Integer
:type MultiAZ: boolean
:param MultiAZ:
Specifies if the DB instance is a Multi-AZ deployment. You can\'t set the AvailabilityZone parameter if the MultiAZ parameter is set to true.
:type EngineVersion: string
:param EngineVersion:
The version number of the database engine to use.
:type AutoMinorVersionUpgrade: boolean
:param AutoMinorVersionUpgrade:
Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance window.
Default: ``true``
:type LicenseModel: string
:param LicenseModel:
License model information for this DB instance.
Valid values: ``license-included`` | ``bring-your-own-license`` | ``general-public-license``
:type Iops: integer
:param Iops:
The amount of Provisioned IOPS (input/output operations per second) to be initially allocated for the DB instance.
:type OptionGroupName: string
:param OptionGroupName:
Indicates that the DB instance should be associated with the specified option group.
Permanent options, such as the TDE option for Oracle Advanced Security TDE, can\'t be removed from an option group, and that option group can\'t be removed from a DB instance once it is associated with a DB instance
:type CharacterSetName: string
:param CharacterSetName:
Indicates that the DB instance should be associated with the specified CharacterSet.
Not applicable. The character set is managed by the DB cluster. For more information, see CreateDBCluster .
:type PubliclyAccessible: boolean
:param PubliclyAccessible:
This flag should no longer be used.
:type Tags: list
:param Tags:
The tags to assign to the new instance.
- *(dict) --*
Metadata assigned to an Amazon Neptune resource consisting of a key-value pair.
- **Key** *(string) --*
A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can\'t be prefixed with \"aws:\" or \"rds:\". The string can only contain only the set of Unicode letters, digits, white-space, \'_\', \'.\', \'/\', \'=\', \'+\', \'-\' (Java regex: \"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$\").
- **Value** *(string) --*
A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can\'t be prefixed with \"aws:\" or \"rds:\". The string can only contain only the set of Unicode letters, digits, white-space, \'_\', \'.\', \'/\', \'=\', \'+\', \'-\' (Java regex: \"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$\").
:type DBClusterIdentifier: string
:param DBClusterIdentifier:
The identifier of the DB cluster that the instance will belong to.
For information on creating a DB cluster, see CreateDBCluster .
Type: String
:type StorageType: string
:param StorageType:
Specifies the storage type to be associated with the DB instance.
Not applicable. Storage is managed by the DB Cluster.
:type TdeCredentialArn: string
:param TdeCredentialArn:
The ARN from the key store with which to associate the instance for TDE encryption.
:type TdeCredentialPassword: string
:param TdeCredentialPassword:
The password for the given ARN from the key store in order to access the device.
:type StorageEncrypted: boolean
:param StorageEncrypted:
Specifies whether the DB instance is encrypted.
Not applicable. The encryption for DB instances is managed by the DB cluster. For more information, see CreateDBCluster .
Default: false
:type KmsKeyId: string
:param KmsKeyId:
The AWS KMS key identifier for an encrypted DB instance.
The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a DB instance with the same AWS account that owns the KMS encryption key used to encrypt the new DB instance, then you can use the KMS key alias instead of the ARN for the KM encryption key.
Not applicable. The KMS key identifier is managed by the DB cluster. For more information, see CreateDBCluster .
If the ``StorageEncrypted`` parameter is true, and you do not specify a value for the ``KmsKeyId`` parameter, then Amazon Neptune will use your default encryption key. AWS KMS creates the default encryption key for your AWS account. Your AWS account has a different default encryption key for each AWS Region.
:type Domain: string
:param Domain:
Specify the Active Directory Domain to create the instance in.
:type CopyTagsToSnapshot: boolean
:param CopyTagsToSnapshot:
True to copy all tags from the DB instance to snapshots of the DB instance, and otherwise false. The default is false.
:type MonitoringInterval: integer
:param MonitoringInterval:
The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance. To disable collecting Enhanced Monitoring metrics, specify 0. The default is 0.
If ``MonitoringRoleArn`` is specified, then you must also set ``MonitoringInterval`` to a value other than 0.
Valid Values: ``0, 1, 5, 10, 15, 30, 60``
:type MonitoringRoleArn: string
:param MonitoringRoleArn:
The ARN for the IAM role that permits Neptune to send enhanced monitoring metrics to Amazon CloudWatch Logs. For example, ``arn:aws:iam:123456789012:role/emaccess`` .
If ``MonitoringInterval`` is set to a value other than 0, then you must supply a ``MonitoringRoleArn`` value.
:type DomainIAMRoleName: string
:param DomainIAMRoleName:
Specify the name of the IAM role to be used when making API calls to the Directory Service.
:type PromotionTier: integer
:param PromotionTier:
A value that specifies the order in which an Read Replica is promoted to the primary instance after a failure of the existing primary instance.
Default: 1
Valid Values: 0 - 15
:type Timezone: string
:param Timezone:
The time zone of the DB instance.
:type EnableIAMDatabaseAuthentication: boolean
:param EnableIAMDatabaseAuthentication:
True to enable AWS Identity and Access Management (IAM) authentication for Neptune.
Default: ``false``
:type EnablePerformanceInsights: boolean
:param EnablePerformanceInsights:
True to enable Performance Insights for the DB instance, and otherwise false.
:type PerformanceInsightsKMSKeyId: string
:param PerformanceInsightsKMSKeyId:
The AWS KMS key identifier for encryption of Performance Insights data. The KMS key ID is the Amazon Resource Name (ARN), KMS key identifier, or the KMS key alias for the KMS encryption key.
:type EnableCloudwatchLogsExports: list
:param EnableCloudwatchLogsExports:
The list of log types that need to be enabled for exporting to CloudWatch Logs.
- *(string) --*
:rtype: dict
:returns:
"""
pass
def create_db_parameter_group(self, DBParameterGroupName: str, DBParameterGroupFamily: str, Description: str, Tags: List = None) -> Dict:
"""
Creates a new DB parameter group.
A DB parameter group is initially created with the default parameters for the database engine used by the DB instance. To provide custom values for any of the parameters, you must modify the group after creating it using *ModifyDBParameterGroup* . Once you've created a DB parameter group, you need to associate it with your DB instance using *ModifyDBInstance* . When you associate a new DB parameter group with a running DB instance, you need to reboot the DB instance without failover for the new DB parameter group and associated settings to take effect.
.. warning::
After you create a DB parameter group, you should wait at least 5 minutes before creating your first DB instance that uses that DB parameter group as the default parameter group. This allows Amazon Neptune to fully complete the create action before the parameter group is used as the default for a new DB instance. This is especially important for parameters that are critical when creating the default database for a DB instance, such as the character set for the default database defined by the ``character_set_database`` parameter. You can use the *Parameter Groups* option of the Amazon Neptune console or the *DescribeDBParameters* command to verify that your DB parameter group has been created or modified.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CreateDBParameterGroup>`_
**Request Syntax**
::
response = client.create_db_parameter_group(
DBParameterGroupName='string',
DBParameterGroupFamily='string',
Description='string',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
]
)
**Response Syntax**
::
{
'DBParameterGroup': {
'DBParameterGroupName': 'string',
'DBParameterGroupFamily': 'string',
'Description': 'string',
'DBParameterGroupArn': 'string'
}
}
**Response Structure**
- *(dict) --*
- **DBParameterGroup** *(dict) --*
Contains the details of an Amazon Neptune DB parameter group.
This data type is used as a response element in the DescribeDBParameterGroups action.
- **DBParameterGroupName** *(string) --*
Provides the name of the DB parameter group.
- **DBParameterGroupFamily** *(string) --*
Provides the name of the DB parameter group family that this DB parameter group is compatible with.
- **Description** *(string) --*
Provides the customer-specified description for this DB parameter group.
- **DBParameterGroupArn** *(string) --*
The Amazon Resource Name (ARN) for the DB parameter group.
:type DBParameterGroupName: string
:param DBParameterGroupName: **[REQUIRED]**
The name of the DB parameter group.
Constraints:
* Must be 1 to 255 letters, numbers, or hyphens.
* First character must be a letter
* Cannot end with a hyphen or contain two consecutive hyphens
.. note::
This value is stored as a lowercase string.
:type DBParameterGroupFamily: string
:param DBParameterGroupFamily: **[REQUIRED]**
The DB parameter group family name. A DB parameter group can be associated with one and only one DB parameter group family, and can be applied only to a DB instance running a database engine and engine version compatible with that DB parameter group family.
:type Description: string
:param Description: **[REQUIRED]**
The description for the DB parameter group.
:type Tags: list
:param Tags:
The tags to be assigned to the new DB parameter group.
- *(dict) --*
Metadata assigned to an Amazon Neptune resource consisting of a key-value pair.
- **Key** *(string) --*
A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can\'t be prefixed with \"aws:\" or \"rds:\". The string can only contain only the set of Unicode letters, digits, white-space, \'_\', \'.\', \'/\', \'=\', \'+\', \'-\' (Java regex: \"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$\").
- **Value** *(string) --*
A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can\'t be prefixed with \"aws:\" or \"rds:\". The string can only contain only the set of Unicode letters, digits, white-space, \'_\', \'.\', \'/\', \'=\', \'+\', \'-\' (Java regex: \"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$\").
:rtype: dict
:returns:
"""
pass
def create_db_subnet_group(self, DBSubnetGroupName: str, DBSubnetGroupDescription: str, SubnetIds: List, Tags: List = None) -> Dict:
"""
Creates a new DB subnet group. DB subnet groups must contain at least one subnet in at least two AZs in the AWS Region.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CreateDBSubnetGroup>`_
**Request Syntax**
::
response = client.create_db_subnet_group(
DBSubnetGroupName='string',
DBSubnetGroupDescription='string',
SubnetIds=[
'string',
],
Tags=[
{
'Key': 'string',
'Value': 'string'
},
]
)
**Response Syntax**
::
{
'DBSubnetGroup': {
'DBSubnetGroupName': 'string',
'DBSubnetGroupDescription': 'string',
'VpcId': 'string',
'SubnetGroupStatus': 'string',
'Subnets': [
{
'SubnetIdentifier': 'string',
'SubnetAvailabilityZone': {
'Name': 'string'
},
'SubnetStatus': 'string'
},
],
'DBSubnetGroupArn': 'string'
}
}
**Response Structure**
- *(dict) --*
- **DBSubnetGroup** *(dict) --*
Contains the details of an Amazon Neptune DB subnet group.
This data type is used as a response element in the DescribeDBSubnetGroups action.
- **DBSubnetGroupName** *(string) --*
The name of the DB subnet group.
- **DBSubnetGroupDescription** *(string) --*
Provides the description of the DB subnet group.
- **VpcId** *(string) --*
Provides the VpcId of the DB subnet group.
- **SubnetGroupStatus** *(string) --*
Provides the status of the DB subnet group.
- **Subnets** *(list) --*
Contains a list of Subnet elements.
- *(dict) --*
Specifies a subnet.
This data type is used as a response element in the DescribeDBSubnetGroups action.
- **SubnetIdentifier** *(string) --*
Specifies the identifier of the subnet.
- **SubnetAvailabilityZone** *(dict) --*
Specifies the EC2 Availability Zone that the subnet is in.
- **Name** *(string) --*
The name of the availability zone.
- **SubnetStatus** *(string) --*
Specifies the status of the subnet.
- **DBSubnetGroupArn** *(string) --*
The Amazon Resource Name (ARN) for the DB subnet group.
:type DBSubnetGroupName: string
:param DBSubnetGroupName: **[REQUIRED]**
The name for the DB subnet group. This value is stored as a lowercase string.
Constraints: Must contain no more than 255 letters, numbers, periods, underscores, spaces, or hyphens. Must not be default.
Example: ``mySubnetgroup``
:type DBSubnetGroupDescription: string
:param DBSubnetGroupDescription: **[REQUIRED]**
The description for the DB subnet group.
:type SubnetIds: list
:param SubnetIds: **[REQUIRED]**
The EC2 Subnet IDs for the DB subnet group.
- *(string) --*
:type Tags: list
:param Tags:
The tags to be assigned to the new DB subnet group.
- *(dict) --*
Metadata assigned to an Amazon Neptune resource consisting of a key-value pair.
- **Key** *(string) --*
A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can\'t be prefixed with \"aws:\" or \"rds:\". The string can only contain only the set of Unicode letters, digits, white-space, \'_\', \'.\', \'/\', \'=\', \'+\', \'-\' (Java regex: \"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$\").
- **Value** *(string) --*
A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can\'t be prefixed with \"aws:\" or \"rds:\". The string can only contain only the set of Unicode letters, digits, white-space, \'_\', \'.\', \'/\', \'=\', \'+\', \'-\' (Java regex: \"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$\").
:rtype: dict
:returns:
"""
pass
def create_event_subscription(self, SubscriptionName: str, SnsTopicArn: str, SourceType: str = None, EventCategories: List = None, SourceIds: List = None, Enabled: bool = None, Tags: List = None) -> Dict:
"""
Creates an event notification subscription. This action requires a topic ARN (Amazon Resource Name) created by either the Neptune console, the SNS console, or the SNS API. To obtain an ARN with SNS, you must create a topic in Amazon SNS and subscribe to the topic. The ARN is displayed in the SNS console.
You can specify the type of source (SourceType) you want to be notified of, provide a list of Neptune sources (SourceIds) that triggers the events, and provide a list of event categories (EventCategories) for events you want to be notified of. For example, you can specify SourceType = db-instance, SourceIds = mydbinstance1, mydbinstance2 and EventCategories = Availability, Backup.
If you specify both the SourceType and SourceIds, such as SourceType = db-instance and SourceIdentifier = myDBInstance1, you are notified of all the db-instance events for the specified source. If you specify a SourceType but do not specify a SourceIdentifier, you receive notice of the events for that source type for all your Neptune sources. If you do not specify either the SourceType nor the SourceIdentifier, you are notified of events generated from all Neptune sources belonging to your customer account.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CreateEventSubscription>`_
**Request Syntax**
::
response = client.create_event_subscription(
SubscriptionName='string',
SnsTopicArn='string',
SourceType='string',
EventCategories=[
'string',
],
SourceIds=[
'string',
],
Enabled=True|False,
Tags=[
{
'Key': 'string',
'Value': 'string'
},
]
)
**Response Syntax**
::
{
'EventSubscription': {
'CustomerAwsId': 'string',
'CustSubscriptionId': 'string',
'SnsTopicArn': 'string',
'Status': 'string',
'SubscriptionCreationTime': 'string',
'SourceType': 'string',
'SourceIdsList': [
'string',
],
'EventCategoriesList': [
'string',
],
'Enabled': True|False,
'EventSubscriptionArn': 'string'
}
}
**Response Structure**
- *(dict) --*
- **EventSubscription** *(dict) --*
Contains the results of a successful invocation of the DescribeEventSubscriptions action.
- **CustomerAwsId** *(string) --*
The AWS customer account associated with the event notification subscription.
- **CustSubscriptionId** *(string) --*
The event notification subscription Id.
- **SnsTopicArn** *(string) --*
The topic ARN of the event notification subscription.
- **Status** *(string) --*
The status of the event notification subscription.
Constraints:
Can be one of the following: creating | modifying | deleting | active | no-permission | topic-not-exist
The status "no-permission" indicates that Neptune no longer has permission to post to the SNS topic. The status "topic-not-exist" indicates that the topic was deleted after the subscription was created.
- **SubscriptionCreationTime** *(string) --*
The time the event notification subscription was created.
- **SourceType** *(string) --*
The source type for the event notification subscription.
- **SourceIdsList** *(list) --*
A list of source IDs for the event notification subscription.
- *(string) --*
- **EventCategoriesList** *(list) --*
A list of event categories for the event notification subscription.
- *(string) --*
- **Enabled** *(boolean) --*
A Boolean value indicating if the subscription is enabled. True indicates the subscription is enabled.
- **EventSubscriptionArn** *(string) --*
The Amazon Resource Name (ARN) for the event subscription.
:type SubscriptionName: string
:param SubscriptionName: **[REQUIRED]**
The name of the subscription.
Constraints: The name must be less than 255 characters.
:type SnsTopicArn: string
:param SnsTopicArn: **[REQUIRED]**
The Amazon Resource Name (ARN) of the SNS topic created for event notification. The ARN is created by Amazon SNS when you create a topic and subscribe to it.
:type SourceType: string
:param SourceType:
The type of source that is generating the events. For example, if you want to be notified of events generated by a DB instance, you would set this parameter to db-instance. if this value is not specified, all events are returned.
Valid values: ``db-instance`` | ``db-cluster`` | ``db-parameter-group`` | ``db-security-group`` | ``db-snapshot`` | ``db-cluster-snapshot``
:type EventCategories: list
:param EventCategories:
A list of event categories for a SourceType that you want to subscribe to. You can see a list of the categories for a given SourceType by using the **DescribeEventCategories** action.
- *(string) --*
:type SourceIds: list
:param SourceIds:
The list of identifiers of the event sources for which events are returned. If not specified, then all sources are included in the response. An identifier must begin with a letter and must contain only ASCII letters, digits, and hyphens; it can\'t end with a hyphen or contain two consecutive hyphens.
Constraints:
* If SourceIds are supplied, SourceType must also be provided.
* If the source type is a DB instance, then a ``DBInstanceIdentifier`` must be supplied.
* If the source type is a DB security group, a ``DBSecurityGroupName`` must be supplied.
* If the source type is a DB parameter group, a ``DBParameterGroupName`` must be supplied.
* If the source type is a DB snapshot, a ``DBSnapshotIdentifier`` must be supplied.
- *(string) --*
:type Enabled: boolean
:param Enabled:
A Boolean value; set to **true** to activate the subscription, set to **false** to create the subscription but not active it.
:type Tags: list
:param Tags:
The tags to be applied to the new event subscription.
- *(dict) --*
Metadata assigned to an Amazon Neptune resource consisting of a key-value pair.
- **Key** *(string) --*
A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can\'t be prefixed with \"aws:\" or \"rds:\". The string can only contain only the set of Unicode letters, digits, white-space, \'_\', \'.\', \'/\', \'=\', \'+\', \'-\' (Java regex: \"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$\").
- **Value** *(string) --*
A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can\'t be prefixed with \"aws:\" or \"rds:\". The string can only contain only the set of Unicode letters, digits, white-space, \'_\', \'.\', \'/\', \'=\', \'+\', \'-\' (Java regex: \"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$\").
:rtype: dict
:returns:
"""
pass
def delete_db_cluster(self, DBClusterIdentifier: str, SkipFinalSnapshot: bool = None, FinalDBSnapshotIdentifier: str = None) -> Dict:
"""
The DeleteDBCluster action deletes a previously provisioned DB cluster. When you delete a DB cluster, all automated backups for that DB cluster are deleted and can't be recovered. Manual DB cluster snapshots of the specified DB cluster are not deleted.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DeleteDBCluster>`_
**Request Syntax**
::
response = client.delete_db_cluster(
DBClusterIdentifier='string',
SkipFinalSnapshot=True|False,
FinalDBSnapshotIdentifier='string'
)
**Response Syntax**
::
{
'DBCluster': {
'AllocatedStorage': 123,
'AvailabilityZones': [
'string',
],
'BackupRetentionPeriod': 123,
'CharacterSetName': 'string',
'DatabaseName': 'string',
'DBClusterIdentifier': 'string',
'DBClusterParameterGroup': 'string',
'DBSubnetGroup': 'string',
'Status': 'string',
'PercentProgress': 'string',
'EarliestRestorableTime': datetime(2015, 1, 1),
'Endpoint': 'string',
'ReaderEndpoint': 'string',
'MultiAZ': True|False,
'Engine': 'string',
'EngineVersion': 'string',
'LatestRestorableTime': datetime(2015, 1, 1),
'Port': 123,
'MasterUsername': 'string',
'DBClusterOptionGroupMemberships': [
{
'DBClusterOptionGroupName': 'string',
'Status': 'string'
},
],
'PreferredBackupWindow': 'string',
'PreferredMaintenanceWindow': 'string',
'ReplicationSourceIdentifier': 'string',
'ReadReplicaIdentifiers': [
'string',
],
'DBClusterMembers': [
{
'DBInstanceIdentifier': 'string',
'IsClusterWriter': True|False,
'DBClusterParameterGroupStatus': 'string',
'PromotionTier': 123
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'HostedZoneId': 'string',
'StorageEncrypted': True|False,
'KmsKeyId': 'string',
'DbClusterResourceId': 'string',
'DBClusterArn': 'string',
'AssociatedRoles': [
{
'RoleArn': 'string',
'Status': 'string'
},
],
'IAMDatabaseAuthenticationEnabled': True|False,
'CloneGroupId': 'string',
'ClusterCreateTime': datetime(2015, 1, 1)
}
}
**Response Structure**
- *(dict) --*
- **DBCluster** *(dict) --*
Contains the details of an Amazon Neptune DB cluster.
This data type is used as a response element in the DescribeDBClusters action.
- **AllocatedStorage** *(integer) --*
``AllocatedStorage`` always returns 1, because Neptune DB cluster storage size is not fixed, but instead automatically adjusts as needed.
- **AvailabilityZones** *(list) --*
Provides the list of EC2 Availability Zones that instances in the DB cluster can be created in.
- *(string) --*
- **BackupRetentionPeriod** *(integer) --*
Specifies the number of days for which automatic DB snapshots are retained.
- **CharacterSetName** *(string) --*
If present, specifies the name of the character set that this cluster is associated with.
- **DatabaseName** *(string) --*
Contains the name of the initial database of this DB cluster that was provided at create time, if one was specified when the DB cluster was created. This same name is returned for the life of the DB cluster.
- **DBClusterIdentifier** *(string) --*
Contains a user-supplied DB cluster identifier. This identifier is the unique key that identifies a DB cluster.
- **DBClusterParameterGroup** *(string) --*
Specifies the name of the DB cluster parameter group for the DB cluster.
- **DBSubnetGroup** *(string) --*
Specifies information on the subnet group associated with the DB cluster, including the name, description, and subnets in the subnet group.
- **Status** *(string) --*
Specifies the current state of this DB cluster.
- **PercentProgress** *(string) --*
Specifies the progress of the operation as a percentage.
- **EarliestRestorableTime** *(datetime) --*
Specifies the earliest time to which a database can be restored with point-in-time restore.
- **Endpoint** *(string) --*
Specifies the connection endpoint for the primary instance of the DB cluster.
- **ReaderEndpoint** *(string) --*
The reader endpoint for the DB cluster. The reader endpoint for a DB cluster load-balances connections across the Read Replicas that are available in a DB cluster. As clients request new connections to the reader endpoint, Neptune distributes the connection requests among the Read Replicas in the DB cluster. This functionality can help balance your read workload across multiple Read Replicas in your DB cluster.
If a failover occurs, and the Read Replica that you are connected to is promoted to be the primary instance, your connection is dropped. To continue sending your read workload to other Read Replicas in the cluster, you can then reconnect to the reader endpoint.
- **MultiAZ** *(boolean) --*
Specifies whether the DB cluster has instances in multiple Availability Zones.
- **Engine** *(string) --*
Provides the name of the database engine to be used for this DB cluster.
- **EngineVersion** *(string) --*
Indicates the database engine version.
- **LatestRestorableTime** *(datetime) --*
Specifies the latest time to which a database can be restored with point-in-time restore.
- **Port** *(integer) --*
Specifies the port that the database engine is listening on.
- **MasterUsername** *(string) --*
Contains the master username for the DB cluster.
- **DBClusterOptionGroupMemberships** *(list) --*
Provides the list of option group memberships for this DB cluster.
- *(dict) --*
Contains status information for a DB cluster option group.
- **DBClusterOptionGroupName** *(string) --*
Specifies the name of the DB cluster option group.
- **Status** *(string) --*
Specifies the status of the DB cluster option group.
- **PreferredBackupWindow** *(string) --*
Specifies the daily time range during which automated backups are created if automated backups are enabled, as determined by the ``BackupRetentionPeriod`` .
- **PreferredMaintenanceWindow** *(string) --*
Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
- **ReplicationSourceIdentifier** *(string) --*
Not supported by Neptune.
- **ReadReplicaIdentifiers** *(list) --*
Contains one or more identifiers of the Read Replicas associated with this DB cluster.
- *(string) --*
- **DBClusterMembers** *(list) --*
Provides the list of instances that make up the DB cluster.
- *(dict) --*
Contains information about an instance that is part of a DB cluster.
- **DBInstanceIdentifier** *(string) --*
Specifies the instance identifier for this member of the DB cluster.
- **IsClusterWriter** *(boolean) --*
Value that is ``true`` if the cluster member is the primary instance for the DB cluster and ``false`` otherwise.
- **DBClusterParameterGroupStatus** *(string) --*
Specifies the status of the DB cluster parameter group for this member of the DB cluster.
- **PromotionTier** *(integer) --*
A value that specifies the order in which a Read Replica is promoted to the primary instance after a failure of the existing primary instance.
- **VpcSecurityGroups** *(list) --*
Provides a list of VPC security groups that the DB cluster belongs to.
- *(dict) --*
This data type is used as a response element for queries on VPC security group membership.
- **VpcSecurityGroupId** *(string) --*
The name of the VPC security group.
- **Status** *(string) --*
The status of the VPC security group.
- **HostedZoneId** *(string) --*
Specifies the ID that Amazon Route 53 assigns when you create a hosted zone.
- **StorageEncrypted** *(boolean) --*
Specifies whether the DB cluster is encrypted.
- **KmsKeyId** *(string) --*
If ``StorageEncrypted`` is true, the AWS KMS key identifier for the encrypted DB cluster.
- **DbClusterResourceId** *(string) --*
The AWS Region-unique, immutable identifier for the DB cluster. This identifier is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB cluster is accessed.
- **DBClusterArn** *(string) --*
The Amazon Resource Name (ARN) for the DB cluster.
- **AssociatedRoles** *(list) --*
Provides a list of the AWS Identity and Access Management (IAM) roles that are associated with the DB cluster. IAM roles that are associated with a DB cluster grant permission for the DB cluster to access other AWS services on your behalf.
- *(dict) --*
Describes an AWS Identity and Access Management (IAM) role that is associated with a DB cluster.
- **RoleArn** *(string) --*
The Amazon Resource Name (ARN) of the IAM role that is associated with the DB cluster.
- **Status** *(string) --*
Describes the state of association between the IAM role and the DB cluster. The Status property returns one of the following values:
* ``ACTIVE`` - the IAM role ARN is associated with the DB cluster and can be used to access other AWS services on your behalf.
* ``PENDING`` - the IAM role ARN is being associated with the DB cluster.
* ``INVALID`` - the IAM role ARN is associated with the DB cluster, but the DB cluster is unable to assume the IAM role in order to access other AWS services on your behalf.
- **IAMDatabaseAuthenticationEnabled** *(boolean) --*
True if mapping of AWS Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false.
- **CloneGroupId** *(string) --*
Identifies the clone group to which the DB cluster is associated.
- **ClusterCreateTime** *(datetime) --*
Specifies the time when the DB cluster was created, in Universal Coordinated Time (UTC).
:type DBClusterIdentifier: string
:param DBClusterIdentifier: **[REQUIRED]**
The DB cluster identifier for the DB cluster to be deleted. This parameter isn\'t case-sensitive.
Constraints:
* Must match an existing DBClusterIdentifier.
:type SkipFinalSnapshot: boolean
:param SkipFinalSnapshot:
Determines whether a final DB cluster snapshot is created before the DB cluster is deleted. If ``true`` is specified, no DB cluster snapshot is created. If ``false`` is specified, a DB cluster snapshot is created before the DB cluster is deleted.
.. note::
You must specify a ``FinalDBSnapshotIdentifier`` parameter if ``SkipFinalSnapshot`` is ``false`` .
Default: ``false``
:type FinalDBSnapshotIdentifier: string
:param FinalDBSnapshotIdentifier:
The DB cluster snapshot identifier of the new DB cluster snapshot created when ``SkipFinalSnapshot`` is set to ``false`` .
.. note::
Specifying this parameter and also setting the ``SkipFinalShapshot`` parameter to true results in an error.
Constraints:
* Must be 1 to 255 letters, numbers, or hyphens.
* First character must be a letter
* Cannot end with a hyphen or contain two consecutive hyphens
:rtype: dict
:returns:
"""
pass
def delete_db_cluster_parameter_group(self, DBClusterParameterGroupName: str):
"""
Deletes a specified DB cluster parameter group. The DB cluster parameter group to be deleted can't be associated with any DB clusters.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DeleteDBClusterParameterGroup>`_
**Request Syntax**
::
response = client.delete_db_cluster_parameter_group(
DBClusterParameterGroupName='string'
)
:type DBClusterParameterGroupName: string
:param DBClusterParameterGroupName: **[REQUIRED]**
The name of the DB cluster parameter group.
Constraints:
* Must be the name of an existing DB cluster parameter group.
* You can\'t delete a default DB cluster parameter group.
* Cannot be associated with any DB clusters.
:returns: None
"""
pass
def delete_db_cluster_snapshot(self, DBClusterSnapshotIdentifier: str) -> Dict:
"""
Deletes a DB cluster snapshot. If the snapshot is being copied, the copy operation is terminated.
.. note::
The DB cluster snapshot must be in the ``available`` state to be deleted.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DeleteDBClusterSnapshot>`_
**Request Syntax**
::
response = client.delete_db_cluster_snapshot(
DBClusterSnapshotIdentifier='string'
)
**Response Syntax**
::
{
'DBClusterSnapshot': {
'AvailabilityZones': [
'string',
],
'DBClusterSnapshotIdentifier': 'string',
'DBClusterIdentifier': 'string',
'SnapshotCreateTime': datetime(2015, 1, 1),
'Engine': 'string',
'AllocatedStorage': 123,
'Status': 'string',
'Port': 123,
'VpcId': 'string',
'ClusterCreateTime': datetime(2015, 1, 1),
'MasterUsername': 'string',
'EngineVersion': 'string',
'LicenseModel': 'string',
'SnapshotType': 'string',
'PercentProgress': 123,
'StorageEncrypted': True|False,
'KmsKeyId': 'string',
'DBClusterSnapshotArn': 'string',
'SourceDBClusterSnapshotArn': 'string',
'IAMDatabaseAuthenticationEnabled': True|False
}
}
**Response Structure**
- *(dict) --*
- **DBClusterSnapshot** *(dict) --*
Contains the details for an Amazon Neptune DB cluster snapshot
This data type is used as a response element in the DescribeDBClusterSnapshots action.
- **AvailabilityZones** *(list) --*
Provides the list of EC2 Availability Zones that instances in the DB cluster snapshot can be restored in.
- *(string) --*
- **DBClusterSnapshotIdentifier** *(string) --*
Specifies the identifier for the DB cluster snapshot.
- **DBClusterIdentifier** *(string) --*
Specifies the DB cluster identifier of the DB cluster that this DB cluster snapshot was created from.
- **SnapshotCreateTime** *(datetime) --*
Provides the time when the snapshot was taken, in Universal Coordinated Time (UTC).
- **Engine** *(string) --*
Specifies the name of the database engine.
- **AllocatedStorage** *(integer) --*
Specifies the allocated storage size in gibibytes (GiB).
- **Status** *(string) --*
Specifies the status of this DB cluster snapshot.
- **Port** *(integer) --*
Specifies the port that the DB cluster was listening on at the time of the snapshot.
- **VpcId** *(string) --*
Provides the VPC ID associated with the DB cluster snapshot.
- **ClusterCreateTime** *(datetime) --*
Specifies the time when the DB cluster was created, in Universal Coordinated Time (UTC).
- **MasterUsername** *(string) --*
Provides the master username for the DB cluster snapshot.
- **EngineVersion** *(string) --*
Provides the version of the database engine for this DB cluster snapshot.
- **LicenseModel** *(string) --*
Provides the license model information for this DB cluster snapshot.
- **SnapshotType** *(string) --*
Provides the type of the DB cluster snapshot.
- **PercentProgress** *(integer) --*
Specifies the percentage of the estimated data that has been transferred.
- **StorageEncrypted** *(boolean) --*
Specifies whether the DB cluster snapshot is encrypted.
- **KmsKeyId** *(string) --*
If ``StorageEncrypted`` is true, the AWS KMS key identifier for the encrypted DB cluster snapshot.
- **DBClusterSnapshotArn** *(string) --*
The Amazon Resource Name (ARN) for the DB cluster snapshot.
- **SourceDBClusterSnapshotArn** *(string) --*
If the DB cluster snapshot was copied from a source DB cluster snapshot, the Amazon Resource Name (ARN) for the source DB cluster snapshot, otherwise, a null value.
- **IAMDatabaseAuthenticationEnabled** *(boolean) --*
True if mapping of AWS Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false.
:type DBClusterSnapshotIdentifier: string
:param DBClusterSnapshotIdentifier: **[REQUIRED]**
The identifier of the DB cluster snapshot to delete.
Constraints: Must be the name of an existing DB cluster snapshot in the ``available`` state.
:rtype: dict
:returns:
"""
pass
def delete_db_instance(self, DBInstanceIdentifier: str, SkipFinalSnapshot: bool = None, FinalDBSnapshotIdentifier: str = None) -> Dict:
"""
The DeleteDBInstance action deletes a previously provisioned DB instance. When you delete a DB instance, all automated backups for that instance are deleted and can't be recovered. Manual DB snapshots of the DB instance to be deleted by ``DeleteDBInstance`` are not deleted.
If you request a final DB snapshot the status of the Amazon Neptune DB instance is ``deleting`` until the DB snapshot is created. The API action ``DescribeDBInstance`` is used to monitor the status of this operation. The action can't be canceled or reverted once submitted.
Note that when a DB instance is in a failure state and has a status of ``failed`` , ``incompatible-restore`` , or ``incompatible-network`` , you can only delete it when the ``SkipFinalSnapshot`` parameter is set to ``true`` .
If the specified DB instance is part of a DB cluster, you can't delete the DB instance if both of the following conditions are true:
* The DB instance is the only instance in the DB cluster.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DeleteDBInstance>`_
**Request Syntax**
::
response = client.delete_db_instance(
DBInstanceIdentifier='string',
SkipFinalSnapshot=True|False,
FinalDBSnapshotIdentifier='string'
)
**Response Syntax**
::
{
'DBInstance': {
'DBInstanceIdentifier': 'string',
'DBInstanceClass': 'string',
'Engine': 'string',
'DBInstanceStatus': 'string',
'MasterUsername': 'string',
'DBName': 'string',
'Endpoint': {
'Address': 'string',
'Port': 123,
'HostedZoneId': 'string'
},
'AllocatedStorage': 123,
'InstanceCreateTime': datetime(2015, 1, 1),
'PreferredBackupWindow': 'string',
'BackupRetentionPeriod': 123,
'DBSecurityGroups': [
{
'DBSecurityGroupName': 'string',
'Status': 'string'
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'DBParameterGroups': [
{
'DBParameterGroupName': 'string',
'ParameterApplyStatus': 'string'
},
],
'AvailabilityZone': 'string',
'DBSubnetGroup': {
'DBSubnetGroupName': 'string',
'DBSubnetGroupDescription': 'string',
'VpcId': 'string',
'SubnetGroupStatus': 'string',
'Subnets': [
{
'SubnetIdentifier': 'string',
'SubnetAvailabilityZone': {
'Name': 'string'
},
'SubnetStatus': 'string'
},
],
'DBSubnetGroupArn': 'string'
},
'PreferredMaintenanceWindow': 'string',
'PendingModifiedValues': {
'DBInstanceClass': 'string',
'AllocatedStorage': 123,
'MasterUserPassword': 'string',
'Port': 123,
'BackupRetentionPeriod': 123,
'MultiAZ': True|False,
'EngineVersion': 'string',
'LicenseModel': 'string',
'Iops': 123,
'DBInstanceIdentifier': 'string',
'StorageType': 'string',
'CACertificateIdentifier': 'string',
'DBSubnetGroupName': 'string',
'PendingCloudwatchLogsExports': {
'LogTypesToEnable': [
'string',
],
'LogTypesToDisable': [
'string',
]
}
},
'LatestRestorableTime': datetime(2015, 1, 1),
'MultiAZ': True|False,
'EngineVersion': 'string',
'AutoMinorVersionUpgrade': True|False,
'ReadReplicaSourceDBInstanceIdentifier': 'string',
'ReadReplicaDBInstanceIdentifiers': [
'string',
],
'ReadReplicaDBClusterIdentifiers': [
'string',
],
'LicenseModel': 'string',
'Iops': 123,
'OptionGroupMemberships': [
{
'OptionGroupName': 'string',
'Status': 'string'
},
],
'CharacterSetName': 'string',
'SecondaryAvailabilityZone': 'string',
'PubliclyAccessible': True|False,
'StatusInfos': [
{
'StatusType': 'string',
'Normal': True|False,
'Status': 'string',
'Message': 'string'
},
],
'StorageType': 'string',
'TdeCredentialArn': 'string',
'DbInstancePort': 123,
'DBClusterIdentifier': 'string',
'StorageEncrypted': True|False,
'KmsKeyId': 'string',
'DbiResourceId': 'string',
'CACertificateIdentifier': 'string',
'DomainMemberships': [
{
'Domain': 'string',
'Status': 'string',
'FQDN': 'string',
'IAMRoleName': 'string'
},
],
'CopyTagsToSnapshot': True|False,
'MonitoringInterval': 123,
'EnhancedMonitoringResourceArn': 'string',
'MonitoringRoleArn': 'string',
'PromotionTier': 123,
'DBInstanceArn': 'string',
'Timezone': 'string',
'IAMDatabaseAuthenticationEnabled': True|False,
'PerformanceInsightsEnabled': True|False,
'PerformanceInsightsKMSKeyId': 'string',
'EnabledCloudwatchLogsExports': [
'string',
]
}
}
**Response Structure**
- *(dict) --*
- **DBInstance** *(dict) --*
Contains the details of an Amazon Neptune DB instance.
This data type is used as a response element in the DescribeDBInstances action.
- **DBInstanceIdentifier** *(string) --*
Contains a user-supplied database identifier. This identifier is the unique key that identifies a DB instance.
- **DBInstanceClass** *(string) --*
Contains the name of the compute and memory capacity class of the DB instance.
- **Engine** *(string) --*
Provides the name of the database engine to be used for this DB instance.
- **DBInstanceStatus** *(string) --*
Specifies the current state of this database.
- **MasterUsername** *(string) --*
Contains the master username for the DB instance.
- **DBName** *(string) --*
The database name.
- **Endpoint** *(dict) --*
Specifies the connection endpoint.
- **Address** *(string) --*
Specifies the DNS address of the DB instance.
- **Port** *(integer) --*
Specifies the port that the database engine is listening on.
- **HostedZoneId** *(string) --*
Specifies the ID that Amazon Route 53 assigns when you create a hosted zone.
- **AllocatedStorage** *(integer) --*
Specifies the allocated storage size specified in gibibytes.
- **InstanceCreateTime** *(datetime) --*
Provides the date and time the DB instance was created.
- **PreferredBackupWindow** *(string) --*
Specifies the daily time range during which automated backups are created if automated backups are enabled, as determined by the ``BackupRetentionPeriod`` .
- **BackupRetentionPeriod** *(integer) --*
Specifies the number of days for which automatic DB snapshots are retained.
- **DBSecurityGroups** *(list) --*
Provides List of DB security group elements containing only ``DBSecurityGroup.Name`` and ``DBSecurityGroup.Status`` subelements.
- *(dict) --*
Specifies membership in a designated DB security group.
- **DBSecurityGroupName** *(string) --*
The name of the DB security group.
- **Status** *(string) --*
The status of the DB security group.
- **VpcSecurityGroups** *(list) --*
Provides a list of VPC security group elements that the DB instance belongs to.
- *(dict) --*
This data type is used as a response element for queries on VPC security group membership.
- **VpcSecurityGroupId** *(string) --*
The name of the VPC security group.
- **Status** *(string) --*
The status of the VPC security group.
- **DBParameterGroups** *(list) --*
Provides the list of DB parameter groups applied to this DB instance.
- *(dict) --*
The status of the DB parameter group.
This data type is used as a response element in the following actions:
* CreateDBInstance
* DeleteDBInstance
* ModifyDBInstance
* RebootDBInstance
- **DBParameterGroupName** *(string) --*
The name of the DP parameter group.
- **ParameterApplyStatus** *(string) --*
The status of parameter updates.
- **AvailabilityZone** *(string) --*
Specifies the name of the Availability Zone the DB instance is located in.
- **DBSubnetGroup** *(dict) --*
Specifies information on the subnet group associated with the DB instance, including the name, description, and subnets in the subnet group.
- **DBSubnetGroupName** *(string) --*
The name of the DB subnet group.
- **DBSubnetGroupDescription** *(string) --*
Provides the description of the DB subnet group.
- **VpcId** *(string) --*
Provides the VpcId of the DB subnet group.
- **SubnetGroupStatus** *(string) --*
Provides the status of the DB subnet group.
- **Subnets** *(list) --*
Contains a list of Subnet elements.
- *(dict) --*
Specifies a subnet.
This data type is used as a response element in the DescribeDBSubnetGroups action.
- **SubnetIdentifier** *(string) --*
Specifies the identifier of the subnet.
- **SubnetAvailabilityZone** *(dict) --*
Specifies the EC2 Availability Zone that the subnet is in.
- **Name** *(string) --*
The name of the availability zone.
- **SubnetStatus** *(string) --*
Specifies the status of the subnet.
- **DBSubnetGroupArn** *(string) --*
The Amazon Resource Name (ARN) for the DB subnet group.
- **PreferredMaintenanceWindow** *(string) --*
Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
- **PendingModifiedValues** *(dict) --*
Specifies that changes to the DB instance are pending. This element is only included when changes are pending. Specific changes are identified by subelements.
- **DBInstanceClass** *(string) --*
Contains the new ``DBInstanceClass`` for the DB instance that will be applied or is currently being applied.
- **AllocatedStorage** *(integer) --*
Contains the new ``AllocatedStorage`` size for the DB instance that will be applied or is currently being applied.
- **MasterUserPassword** *(string) --*
Contains the pending or currently-in-progress change of the master credentials for the DB instance.
- **Port** *(integer) --*
Specifies the pending port for the DB instance.
- **BackupRetentionPeriod** *(integer) --*
Specifies the pending number of days for which automated backups are retained.
- **MultiAZ** *(boolean) --*
Indicates that the Single-AZ DB instance is to change to a Multi-AZ deployment.
- **EngineVersion** *(string) --*
Indicates the database engine version.
- **LicenseModel** *(string) --*
The license model for the DB instance.
Valid values: ``license-included`` | ``bring-your-own-license`` | ``general-public-license``
- **Iops** *(integer) --*
Specifies the new Provisioned IOPS value for the DB instance that will be applied or is currently being applied.
- **DBInstanceIdentifier** *(string) --*
Contains the new ``DBInstanceIdentifier`` for the DB instance that will be applied or is currently being applied.
- **StorageType** *(string) --*
Specifies the storage type to be associated with the DB instance.
- **CACertificateIdentifier** *(string) --*
Specifies the identifier of the CA certificate for the DB instance.
- **DBSubnetGroupName** *(string) --*
The new DB subnet group for the DB instance.
- **PendingCloudwatchLogsExports** *(dict) --*
Specifies the CloudWatch logs to be exported.
- **LogTypesToEnable** *(list) --*
Log types that are in the process of being deactivated. After they are deactivated, these log types aren't exported to CloudWatch Logs.
- *(string) --*
- **LogTypesToDisable** *(list) --*
Log types that are in the process of being enabled. After they are enabled, these log types are exported to CloudWatch Logs.
- *(string) --*
- **LatestRestorableTime** *(datetime) --*
Specifies the latest time to which a database can be restored with point-in-time restore.
- **MultiAZ** *(boolean) --*
Specifies if the DB instance is a Multi-AZ deployment.
- **EngineVersion** *(string) --*
Indicates the database engine version.
- **AutoMinorVersionUpgrade** *(boolean) --*
Indicates that minor version patches are applied automatically.
- **ReadReplicaSourceDBInstanceIdentifier** *(string) --*
Contains the identifier of the source DB instance if this DB instance is a Read Replica.
- **ReadReplicaDBInstanceIdentifiers** *(list) --*
Contains one or more identifiers of the Read Replicas associated with this DB instance.
- *(string) --*
- **ReadReplicaDBClusterIdentifiers** *(list) --*
Contains one or more identifiers of DB clusters that are Read Replicas of this DB instance.
- *(string) --*
- **LicenseModel** *(string) --*
License model information for this DB instance.
- **Iops** *(integer) --*
Specifies the Provisioned IOPS (I/O operations per second) value.
- **OptionGroupMemberships** *(list) --*
Provides the list of option group memberships for this DB instance.
- *(dict) --*
Provides information on the option groups the DB instance is a member of.
- **OptionGroupName** *(string) --*
The name of the option group that the instance belongs to.
- **Status** *(string) --*
The status of the DB instance's option group membership. Valid values are: ``in-sync`` , ``pending-apply`` , ``pending-removal`` , ``pending-maintenance-apply`` , ``pending-maintenance-removal`` , ``applying`` , ``removing`` , and ``failed`` .
- **CharacterSetName** *(string) --*
If present, specifies the name of the character set that this instance is associated with.
- **SecondaryAvailabilityZone** *(string) --*
If present, specifies the name of the secondary Availability Zone for a DB instance with multi-AZ support.
- **PubliclyAccessible** *(boolean) --*
This flag should no longer be used.
- **StatusInfos** *(list) --*
The status of a Read Replica. If the instance is not a Read Replica, this is blank.
- *(dict) --*
Provides a list of status information for a DB instance.
- **StatusType** *(string) --*
This value is currently "read replication."
- **Normal** *(boolean) --*
Boolean value that is true if the instance is operating normally, or false if the instance is in an error state.
- **Status** *(string) --*
Status of the DB instance. For a StatusType of read replica, the values can be replicating, error, stopped, or terminated.
- **Message** *(string) --*
Details of the error if there is an error for the instance. If the instance is not in an error state, this value is blank.
- **StorageType** *(string) --*
Specifies the storage type associated with DB instance.
- **TdeCredentialArn** *(string) --*
The ARN from the key store with which the instance is associated for TDE encryption.
- **DbInstancePort** *(integer) --*
Specifies the port that the DB instance listens on. If the DB instance is part of a DB cluster, this can be a different port than the DB cluster port.
- **DBClusterIdentifier** *(string) --*
If the DB instance is a member of a DB cluster, contains the name of the DB cluster that the DB instance is a member of.
- **StorageEncrypted** *(boolean) --*
Not supported: The encryption for DB instances is managed by the DB cluster.
- **KmsKeyId** *(string) --*
Not supported: The encryption for DB instances is managed by the DB cluster.
- **DbiResourceId** *(string) --*
The AWS Region-unique, immutable identifier for the DB instance. This identifier is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB instance is accessed.
- **CACertificateIdentifier** *(string) --*
The identifier of the CA certificate for this DB instance.
- **DomainMemberships** *(list) --*
Not supported
- *(dict) --*
An Active Directory Domain membership record associated with a DB instance.
- **Domain** *(string) --*
The identifier of the Active Directory Domain.
- **Status** *(string) --*
The status of the DB instance's Active Directory Domain membership, such as joined, pending-join, failed etc).
- **FQDN** *(string) --*
The fully qualified domain name of the Active Directory Domain.
- **IAMRoleName** *(string) --*
The name of the IAM role to be used when making API calls to the Directory Service.
- **CopyTagsToSnapshot** *(boolean) --*
Specifies whether tags are copied from the DB instance to snapshots of the DB instance.
- **MonitoringInterval** *(integer) --*
The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance.
- **EnhancedMonitoringResourceArn** *(string) --*
The Amazon Resource Name (ARN) of the Amazon CloudWatch Logs log stream that receives the Enhanced Monitoring metrics data for the DB instance.
- **MonitoringRoleArn** *(string) --*
The ARN for the IAM role that permits Neptune to send Enhanced Monitoring metrics to Amazon CloudWatch Logs.
- **PromotionTier** *(integer) --*
A value that specifies the order in which a Read Replica is promoted to the primary instance after a failure of the existing primary instance.
- **DBInstanceArn** *(string) --*
The Amazon Resource Name (ARN) for the DB instance.
- **Timezone** *(string) --*
Not supported.
- **IAMDatabaseAuthenticationEnabled** *(boolean) --*
True if AWS Identity and Access Management (IAM) authentication is enabled, and otherwise false.
- **PerformanceInsightsEnabled** *(boolean) --*
True if Performance Insights is enabled for the DB instance, and otherwise false.
- **PerformanceInsightsKMSKeyId** *(string) --*
The AWS KMS key identifier for encryption of Performance Insights data. The KMS key ID is the Amazon Resource Name (ARN), KMS key identifier, or the KMS key alias for the KMS encryption key.
- **EnabledCloudwatchLogsExports** *(list) --*
A list of log types that this DB instance is configured to export to CloudWatch Logs.
- *(string) --*
:type DBInstanceIdentifier: string
:param DBInstanceIdentifier: **[REQUIRED]**
The DB instance identifier for the DB instance to be deleted. This parameter isn\'t case-sensitive.
Constraints:
* Must match the name of an existing DB instance.
:type SkipFinalSnapshot: boolean
:param SkipFinalSnapshot:
Determines whether a final DB snapshot is created before the DB instance is deleted. If ``true`` is specified, no DBSnapshot is created. If ``false`` is specified, a DB snapshot is created before the DB instance is deleted.
Note that when a DB instance is in a failure state and has a status of \'failed\', \'incompatible-restore\', or \'incompatible-network\', it can only be deleted when the SkipFinalSnapshot parameter is set to \"true\".
Specify ``true`` when deleting a Read Replica.
.. note::
The FinalDBSnapshotIdentifier parameter must be specified if SkipFinalSnapshot is ``false`` .
Default: ``false``
:type FinalDBSnapshotIdentifier: string
:param FinalDBSnapshotIdentifier:
The DBSnapshotIdentifier of the new DBSnapshot created when SkipFinalSnapshot is set to ``false`` .
.. note::
Specifying this parameter and also setting the SkipFinalShapshot parameter to true results in an error.
Constraints:
* Must be 1 to 255 letters or numbers.
* First character must be a letter
* Cannot end with a hyphen or contain two consecutive hyphens
* Cannot be specified when deleting a Read Replica.
:rtype: dict
:returns:
"""
pass
def delete_db_parameter_group(self, DBParameterGroupName: str):
"""
Deletes a specified DBParameterGroup. The DBParameterGroup to be deleted can't be associated with any DB instances.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DeleteDBParameterGroup>`_
**Request Syntax**
::
response = client.delete_db_parameter_group(
DBParameterGroupName='string'
)
:type DBParameterGroupName: string
:param DBParameterGroupName: **[REQUIRED]**
The name of the DB parameter group.
Constraints:
* Must be the name of an existing DB parameter group
* You can\'t delete a default DB parameter group
* Cannot be associated with any DB instances
:returns: None
"""
pass
def delete_db_subnet_group(self, DBSubnetGroupName: str):
"""
Deletes a DB subnet group.
.. note::
The specified database subnet group must not be associated with any DB instances.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DeleteDBSubnetGroup>`_
**Request Syntax**
::
response = client.delete_db_subnet_group(
DBSubnetGroupName='string'
)
:type DBSubnetGroupName: string
:param DBSubnetGroupName: **[REQUIRED]**
The name of the database subnet group to delete.
.. note::
You can\'t delete the default subnet group.
Constraints:
Constraints: Must match the name of an existing DBSubnetGroup. Must not be default.
Example: ``mySubnetgroup``
:returns: None
"""
pass
def delete_event_subscription(self, SubscriptionName: str) -> Dict:
"""
Deletes an event notification subscription.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DeleteEventSubscription>`_
**Request Syntax**
::
response = client.delete_event_subscription(
SubscriptionName='string'
)
**Response Syntax**
::
{
'EventSubscription': {
'CustomerAwsId': 'string',
'CustSubscriptionId': 'string',
'SnsTopicArn': 'string',
'Status': 'string',
'SubscriptionCreationTime': 'string',
'SourceType': 'string',
'SourceIdsList': [
'string',
],
'EventCategoriesList': [
'string',
],
'Enabled': True|False,
'EventSubscriptionArn': 'string'
}
}
**Response Structure**
- *(dict) --*
- **EventSubscription** *(dict) --*
Contains the results of a successful invocation of the DescribeEventSubscriptions action.
- **CustomerAwsId** *(string) --*
The AWS customer account associated with the event notification subscription.
- **CustSubscriptionId** *(string) --*
The event notification subscription Id.
- **SnsTopicArn** *(string) --*
The topic ARN of the event notification subscription.
- **Status** *(string) --*
The status of the event notification subscription.
Constraints:
Can be one of the following: creating | modifying | deleting | active | no-permission | topic-not-exist
The status "no-permission" indicates that Neptune no longer has permission to post to the SNS topic. The status "topic-not-exist" indicates that the topic was deleted after the subscription was created.
- **SubscriptionCreationTime** *(string) --*
The time the event notification subscription was created.
- **SourceType** *(string) --*
The source type for the event notification subscription.
- **SourceIdsList** *(list) --*
A list of source IDs for the event notification subscription.
- *(string) --*
- **EventCategoriesList** *(list) --*
A list of event categories for the event notification subscription.
- *(string) --*
- **Enabled** *(boolean) --*
A Boolean value indicating if the subscription is enabled. True indicates the subscription is enabled.
- **EventSubscriptionArn** *(string) --*
The Amazon Resource Name (ARN) for the event subscription.
:type SubscriptionName: string
:param SubscriptionName: **[REQUIRED]**
The name of the event notification subscription you want to delete.
:rtype: dict
:returns:
"""
pass
def describe_db_cluster_parameter_groups(self, DBClusterParameterGroupName: str = None, Filters: List = None, MaxRecords: int = None, Marker: str = None) -> Dict:
"""
Returns a list of ``DBClusterParameterGroup`` descriptions. If a ``DBClusterParameterGroupName`` parameter is specified, the list will contain only the description of the specified DB cluster parameter group.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBClusterParameterGroups>`_
**Request Syntax**
::
response = client.describe_db_cluster_parameter_groups(
DBClusterParameterGroupName='string',
Filters=[
{
'Name': 'string',
'Values': [
'string',
]
},
],
MaxRecords=123,
Marker='string'
)
**Response Syntax**
::
{
'Marker': 'string',
'DBClusterParameterGroups': [
{
'DBClusterParameterGroupName': 'string',
'DBParameterGroupFamily': 'string',
'Description': 'string',
'DBClusterParameterGroupArn': 'string'
},
]
}
**Response Structure**
- *(dict) --*
- **Marker** *(string) --*
An optional pagination token provided by a previous ``DescribeDBClusterParameterGroups`` request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by ``MaxRecords`` .
- **DBClusterParameterGroups** *(list) --*
A list of DB cluster parameter groups.
- *(dict) --*
Contains the details of an Amazon Neptune DB cluster parameter group.
This data type is used as a response element in the DescribeDBClusterParameterGroups action.
- **DBClusterParameterGroupName** *(string) --*
Provides the name of the DB cluster parameter group.
- **DBParameterGroupFamily** *(string) --*
Provides the name of the DB parameter group family that this DB cluster parameter group is compatible with.
- **Description** *(string) --*
Provides the customer-specified description for this DB cluster parameter group.
- **DBClusterParameterGroupArn** *(string) --*
The Amazon Resource Name (ARN) for the DB cluster parameter group.
:type DBClusterParameterGroupName: string
:param DBClusterParameterGroupName:
The name of a specific DB cluster parameter group to return details for.
Constraints:
* If supplied, must match the name of an existing DBClusterParameterGroup.
:type Filters: list
:param Filters:
This parameter is not currently supported.
- *(dict) --*
This type is not currently supported.
- **Name** *(string) --* **[REQUIRED]**
This parameter is not currently supported.
- **Values** *(list) --* **[REQUIRED]**
This parameter is not currently supported.
- *(string) --*
:type MaxRecords: integer
:param MaxRecords:
The maximum number of records to include in the response. If more records exist than the specified ``MaxRecords`` value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.
Default: 100
Constraints: Minimum 20, maximum 100.
:type Marker: string
:param Marker:
An optional pagination token provided by a previous ``DescribeDBClusterParameterGroups`` request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by ``MaxRecords`` .
:rtype: dict
:returns:
"""
pass
def describe_db_cluster_parameters(self, DBClusterParameterGroupName: str, Source: str = None, Filters: List = None, MaxRecords: int = None, Marker: str = None) -> Dict:
"""
Returns the detailed parameter list for a particular DB cluster parameter group.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBClusterParameters>`_
**Request Syntax**
::
response = client.describe_db_cluster_parameters(
DBClusterParameterGroupName='string',
Source='string',
Filters=[
{
'Name': 'string',
'Values': [
'string',
]
},
],
MaxRecords=123,
Marker='string'
)
**Response Syntax**
::
{
'Parameters': [
{
'ParameterName': 'string',
'ParameterValue': 'string',
'Description': 'string',
'Source': 'string',
'ApplyType': 'string',
'DataType': 'string',
'AllowedValues': 'string',
'IsModifiable': True|False,
'MinimumEngineVersion': 'string',
'ApplyMethod': 'immediate'|'pending-reboot'
},
],
'Marker': 'string'
}
**Response Structure**
- *(dict) --*
- **Parameters** *(list) --*
Provides a list of parameters for the DB cluster parameter group.
- *(dict) --*
Specifies a parameter.
- **ParameterName** *(string) --*
Specifies the name of the parameter.
- **ParameterValue** *(string) --*
Specifies the value of the parameter.
- **Description** *(string) --*
Provides a description of the parameter.
- **Source** *(string) --*
Indicates the source of the parameter value.
- **ApplyType** *(string) --*
Specifies the engine specific parameters type.
- **DataType** *(string) --*
Specifies the valid data type for the parameter.
- **AllowedValues** *(string) --*
Specifies the valid range of values for the parameter.
- **IsModifiable** *(boolean) --*
Indicates whether (``true`` ) or not (``false`` ) the parameter can be modified. Some parameters have security or operational implications that prevent them from being changed.
- **MinimumEngineVersion** *(string) --*
The earliest engine version to which the parameter can apply.
- **ApplyMethod** *(string) --*
Indicates when to apply parameter updates.
- **Marker** *(string) --*
An optional pagination token provided by a previous DescribeDBClusterParameters request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by ``MaxRecords`` .
:type DBClusterParameterGroupName: string
:param DBClusterParameterGroupName: **[REQUIRED]**
The name of a specific DB cluster parameter group to return parameter details for.
Constraints:
* If supplied, must match the name of an existing DBClusterParameterGroup.
:type Source: string
:param Source:
A value that indicates to return only parameters for a specific source. Parameter sources can be ``engine`` , ``service`` , or ``customer`` .
:type Filters: list
:param Filters:
This parameter is not currently supported.
- *(dict) --*
This type is not currently supported.
- **Name** *(string) --* **[REQUIRED]**
This parameter is not currently supported.
- **Values** *(list) --* **[REQUIRED]**
This parameter is not currently supported.
- *(string) --*
:type MaxRecords: integer
:param MaxRecords:
The maximum number of records to include in the response. If more records exist than the specified ``MaxRecords`` value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.
Default: 100
Constraints: Minimum 20, maximum 100.
:type Marker: string
:param Marker:
An optional pagination token provided by a previous ``DescribeDBClusterParameters`` request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by ``MaxRecords`` .
:rtype: dict
:returns:
"""
pass
def describe_db_cluster_snapshot_attributes(self, DBClusterSnapshotIdentifier: str) -> Dict:
"""
Returns a list of DB cluster snapshot attribute names and values for a manual DB cluster snapshot.
When sharing snapshots with other AWS accounts, ``DescribeDBClusterSnapshotAttributes`` returns the ``restore`` attribute and a list of IDs for the AWS accounts that are authorized to copy or restore the manual DB cluster snapshot. If ``all`` is included in the list of values for the ``restore`` attribute, then the manual DB cluster snapshot is public and can be copied or restored by all AWS accounts.
To add or remove access for an AWS account to copy or restore a manual DB cluster snapshot, or to make the manual DB cluster snapshot public or private, use the ModifyDBClusterSnapshotAttribute API action.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBClusterSnapshotAttributes>`_
**Request Syntax**
::
response = client.describe_db_cluster_snapshot_attributes(
DBClusterSnapshotIdentifier='string'
)
**Response Syntax**
::
{
'DBClusterSnapshotAttributesResult': {
'DBClusterSnapshotIdentifier': 'string',
'DBClusterSnapshotAttributes': [
{
'AttributeName': 'string',
'AttributeValues': [
'string',
]
},
]
}
}
**Response Structure**
- *(dict) --*
- **DBClusterSnapshotAttributesResult** *(dict) --*
Contains the results of a successful call to the DescribeDBClusterSnapshotAttributes API action.
Manual DB cluster snapshot attributes are used to authorize other AWS accounts to copy or restore a manual DB cluster snapshot. For more information, see the ModifyDBClusterSnapshotAttribute API action.
- **DBClusterSnapshotIdentifier** *(string) --*
The identifier of the manual DB cluster snapshot that the attributes apply to.
- **DBClusterSnapshotAttributes** *(list) --*
The list of attributes and values for the manual DB cluster snapshot.
- *(dict) --*
Contains the name and values of a manual DB cluster snapshot attribute.
Manual DB cluster snapshot attributes are used to authorize other AWS accounts to restore a manual DB cluster snapshot. For more information, see the ModifyDBClusterSnapshotAttribute API action.
- **AttributeName** *(string) --*
The name of the manual DB cluster snapshot attribute.
The attribute named ``restore`` refers to the list of AWS accounts that have permission to copy or restore the manual DB cluster snapshot. For more information, see the ModifyDBClusterSnapshotAttribute API action.
- **AttributeValues** *(list) --*
The value(s) for the manual DB cluster snapshot attribute.
If the ``AttributeName`` field is set to ``restore`` , then this element returns a list of IDs of the AWS accounts that are authorized to copy or restore the manual DB cluster snapshot. If a value of ``all`` is in the list, then the manual DB cluster snapshot is public and available for any AWS account to copy or restore.
- *(string) --*
:type DBClusterSnapshotIdentifier: string
:param DBClusterSnapshotIdentifier: **[REQUIRED]**
The identifier for the DB cluster snapshot to describe the attributes for.
:rtype: dict
:returns:
"""
pass
def describe_db_cluster_snapshots(self, DBClusterIdentifier: str = None, DBClusterSnapshotIdentifier: str = None, SnapshotType: str = None, Filters: List = None, MaxRecords: int = None, Marker: str = None, IncludeShared: bool = None, IncludePublic: bool = None) -> Dict:
"""
Returns information about DB cluster snapshots. This API action supports pagination.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBClusterSnapshots>`_
**Request Syntax**
::
response = client.describe_db_cluster_snapshots(
DBClusterIdentifier='string',
DBClusterSnapshotIdentifier='string',
SnapshotType='string',
Filters=[
{
'Name': 'string',
'Values': [
'string',
]
},
],
MaxRecords=123,
Marker='string',
IncludeShared=True|False,
IncludePublic=True|False
)
**Response Syntax**
::
{
'Marker': 'string',
'DBClusterSnapshots': [
{
'AvailabilityZones': [
'string',
],
'DBClusterSnapshotIdentifier': 'string',
'DBClusterIdentifier': 'string',
'SnapshotCreateTime': datetime(2015, 1, 1),
'Engine': 'string',
'AllocatedStorage': 123,
'Status': 'string',
'Port': 123,
'VpcId': 'string',
'ClusterCreateTime': datetime(2015, 1, 1),
'MasterUsername': 'string',
'EngineVersion': 'string',
'LicenseModel': 'string',
'SnapshotType': 'string',
'PercentProgress': 123,
'StorageEncrypted': True|False,
'KmsKeyId': 'string',
'DBClusterSnapshotArn': 'string',
'SourceDBClusterSnapshotArn': 'string',
'IAMDatabaseAuthenticationEnabled': True|False
},
]
}
**Response Structure**
- *(dict) --*
- **Marker** *(string) --*
An optional pagination token provided by a previous DescribeDBClusterSnapshots request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by ``MaxRecords`` .
- **DBClusterSnapshots** *(list) --*
Provides a list of DB cluster snapshots for the user.
- *(dict) --*
Contains the details for an Amazon Neptune DB cluster snapshot
This data type is used as a response element in the DescribeDBClusterSnapshots action.
- **AvailabilityZones** *(list) --*
Provides the list of EC2 Availability Zones that instances in the DB cluster snapshot can be restored in.
- *(string) --*
- **DBClusterSnapshotIdentifier** *(string) --*
Specifies the identifier for the DB cluster snapshot.
- **DBClusterIdentifier** *(string) --*
Specifies the DB cluster identifier of the DB cluster that this DB cluster snapshot was created from.
- **SnapshotCreateTime** *(datetime) --*
Provides the time when the snapshot was taken, in Universal Coordinated Time (UTC).
- **Engine** *(string) --*
Specifies the name of the database engine.
- **AllocatedStorage** *(integer) --*
Specifies the allocated storage size in gibibytes (GiB).
- **Status** *(string) --*
Specifies the status of this DB cluster snapshot.
- **Port** *(integer) --*
Specifies the port that the DB cluster was listening on at the time of the snapshot.
- **VpcId** *(string) --*
Provides the VPC ID associated with the DB cluster snapshot.
- **ClusterCreateTime** *(datetime) --*
Specifies the time when the DB cluster was created, in Universal Coordinated Time (UTC).
- **MasterUsername** *(string) --*
Provides the master username for the DB cluster snapshot.
- **EngineVersion** *(string) --*
Provides the version of the database engine for this DB cluster snapshot.
- **LicenseModel** *(string) --*
Provides the license model information for this DB cluster snapshot.
- **SnapshotType** *(string) --*
Provides the type of the DB cluster snapshot.
- **PercentProgress** *(integer) --*
Specifies the percentage of the estimated data that has been transferred.
- **StorageEncrypted** *(boolean) --*
Specifies whether the DB cluster snapshot is encrypted.
- **KmsKeyId** *(string) --*
If ``StorageEncrypted`` is true, the AWS KMS key identifier for the encrypted DB cluster snapshot.
- **DBClusterSnapshotArn** *(string) --*
The Amazon Resource Name (ARN) for the DB cluster snapshot.
- **SourceDBClusterSnapshotArn** *(string) --*
If the DB cluster snapshot was copied from a source DB cluster snapshot, the Amazon Resource Name (ARN) for the source DB cluster snapshot, otherwise, a null value.
- **IAMDatabaseAuthenticationEnabled** *(boolean) --*
True if mapping of AWS Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false.
:type DBClusterIdentifier: string
:param DBClusterIdentifier:
The ID of the DB cluster to retrieve the list of DB cluster snapshots for. This parameter can\'t be used in conjunction with the ``DBClusterSnapshotIdentifier`` parameter. This parameter is not case-sensitive.
Constraints:
* If supplied, must match the identifier of an existing DBCluster.
:type DBClusterSnapshotIdentifier: string
:param DBClusterSnapshotIdentifier:
A specific DB cluster snapshot identifier to describe. This parameter can\'t be used in conjunction with the ``DBClusterIdentifier`` parameter. This value is stored as a lowercase string.
Constraints:
* If supplied, must match the identifier of an existing DBClusterSnapshot.
* If this identifier is for an automated snapshot, the ``SnapshotType`` parameter must also be specified.
:type SnapshotType: string
:param SnapshotType:
The type of DB cluster snapshots to be returned. You can specify one of the following values:
* ``automated`` - Return all DB cluster snapshots that have been automatically taken by Amazon Neptune for my AWS account.
* ``manual`` - Return all DB cluster snapshots that have been taken by my AWS account.
* ``shared`` - Return all manual DB cluster snapshots that have been shared to my AWS account.
* ``public`` - Return all DB cluster snapshots that have been marked as public.
If you don\'t specify a ``SnapshotType`` value, then both automated and manual DB cluster snapshots are returned. You can include shared DB cluster snapshots with these results by setting the ``IncludeShared`` parameter to ``true`` . You can include public DB cluster snapshots with these results by setting the ``IncludePublic`` parameter to ``true`` .
The ``IncludeShared`` and ``IncludePublic`` parameters don\'t apply for ``SnapshotType`` values of ``manual`` or ``automated`` . The ``IncludePublic`` parameter doesn\'t apply when ``SnapshotType`` is set to ``shared`` . The ``IncludeShared`` parameter doesn\'t apply when ``SnapshotType`` is set to ``public`` .
:type Filters: list
:param Filters:
This parameter is not currently supported.
- *(dict) --*
This type is not currently supported.
- **Name** *(string) --* **[REQUIRED]**
This parameter is not currently supported.
- **Values** *(list) --* **[REQUIRED]**
This parameter is not currently supported.
- *(string) --*
:type MaxRecords: integer
:param MaxRecords:
The maximum number of records to include in the response. If more records exist than the specified ``MaxRecords`` value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.
Default: 100
Constraints: Minimum 20, maximum 100.
:type Marker: string
:param Marker:
An optional pagination token provided by a previous ``DescribeDBClusterSnapshots`` request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by ``MaxRecords`` .
:type IncludeShared: boolean
:param IncludeShared:
True to include shared manual DB cluster snapshots from other AWS accounts that this AWS account has been given permission to copy or restore, and otherwise false. The default is ``false`` .
You can give an AWS account permission to restore a manual DB cluster snapshot from another AWS account by the ModifyDBClusterSnapshotAttribute API action.
:type IncludePublic: boolean
:param IncludePublic:
True to include manual DB cluster snapshots that are public and can be copied or restored by any AWS account, and otherwise false. The default is ``false`` . The default is false.
You can share a manual DB cluster snapshot as public by using the ModifyDBClusterSnapshotAttribute API action.
:rtype: dict
:returns:
"""
pass
def describe_db_clusters(self, DBClusterIdentifier: str = None, Filters: List = None, MaxRecords: int = None, Marker: str = None) -> Dict:
"""
Returns information about provisioned DB clusters. This API supports pagination.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBClusters>`_
**Request Syntax**
::
response = client.describe_db_clusters(
DBClusterIdentifier='string',
Filters=[
{
'Name': 'string',
'Values': [
'string',
]
},
],
MaxRecords=123,
Marker='string'
)
**Response Syntax**
::
{
'Marker': 'string',
'DBClusters': [
{
'AllocatedStorage': 123,
'AvailabilityZones': [
'string',
],
'BackupRetentionPeriod': 123,
'CharacterSetName': 'string',
'DatabaseName': 'string',
'DBClusterIdentifier': 'string',
'DBClusterParameterGroup': 'string',
'DBSubnetGroup': 'string',
'Status': 'string',
'PercentProgress': 'string',
'EarliestRestorableTime': datetime(2015, 1, 1),
'Endpoint': 'string',
'ReaderEndpoint': 'string',
'MultiAZ': True|False,
'Engine': 'string',
'EngineVersion': 'string',
'LatestRestorableTime': datetime(2015, 1, 1),
'Port': 123,
'MasterUsername': 'string',
'DBClusterOptionGroupMemberships': [
{
'DBClusterOptionGroupName': 'string',
'Status': 'string'
},
],
'PreferredBackupWindow': 'string',
'PreferredMaintenanceWindow': 'string',
'ReplicationSourceIdentifier': 'string',
'ReadReplicaIdentifiers': [
'string',
],
'DBClusterMembers': [
{
'DBInstanceIdentifier': 'string',
'IsClusterWriter': True|False,
'DBClusterParameterGroupStatus': 'string',
'PromotionTier': 123
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'HostedZoneId': 'string',
'StorageEncrypted': True|False,
'KmsKeyId': 'string',
'DbClusterResourceId': 'string',
'DBClusterArn': 'string',
'AssociatedRoles': [
{
'RoleArn': 'string',
'Status': 'string'
},
],
'IAMDatabaseAuthenticationEnabled': True|False,
'CloneGroupId': 'string',
'ClusterCreateTime': datetime(2015, 1, 1)
},
]
}
**Response Structure**
- *(dict) --*
- **Marker** *(string) --*
A pagination token that can be used in a subsequent DescribeDBClusters request.
- **DBClusters** *(list) --*
Contains a list of DB clusters for the user.
- *(dict) --*
Contains the details of an Amazon Neptune DB cluster.
This data type is used as a response element in the DescribeDBClusters action.
- **AllocatedStorage** *(integer) --*
``AllocatedStorage`` always returns 1, because Neptune DB cluster storage size is not fixed, but instead automatically adjusts as needed.
- **AvailabilityZones** *(list) --*
Provides the list of EC2 Availability Zones that instances in the DB cluster can be created in.
- *(string) --*
- **BackupRetentionPeriod** *(integer) --*
Specifies the number of days for which automatic DB snapshots are retained.
- **CharacterSetName** *(string) --*
If present, specifies the name of the character set that this cluster is associated with.
- **DatabaseName** *(string) --*
Contains the name of the initial database of this DB cluster that was provided at create time, if one was specified when the DB cluster was created. This same name is returned for the life of the DB cluster.
- **DBClusterIdentifier** *(string) --*
Contains a user-supplied DB cluster identifier. This identifier is the unique key that identifies a DB cluster.
- **DBClusterParameterGroup** *(string) --*
Specifies the name of the DB cluster parameter group for the DB cluster.
- **DBSubnetGroup** *(string) --*
Specifies information on the subnet group associated with the DB cluster, including the name, description, and subnets in the subnet group.
- **Status** *(string) --*
Specifies the current state of this DB cluster.
- **PercentProgress** *(string) --*
Specifies the progress of the operation as a percentage.
- **EarliestRestorableTime** *(datetime) --*
Specifies the earliest time to which a database can be restored with point-in-time restore.
- **Endpoint** *(string) --*
Specifies the connection endpoint for the primary instance of the DB cluster.
- **ReaderEndpoint** *(string) --*
The reader endpoint for the DB cluster. The reader endpoint for a DB cluster load-balances connections across the Read Replicas that are available in a DB cluster. As clients request new connections to the reader endpoint, Neptune distributes the connection requests among the Read Replicas in the DB cluster. This functionality can help balance your read workload across multiple Read Replicas in your DB cluster.
If a failover occurs, and the Read Replica that you are connected to is promoted to be the primary instance, your connection is dropped. To continue sending your read workload to other Read Replicas in the cluster, you can then reconnect to the reader endpoint.
- **MultiAZ** *(boolean) --*
Specifies whether the DB cluster has instances in multiple Availability Zones.
- **Engine** *(string) --*
Provides the name of the database engine to be used for this DB cluster.
- **EngineVersion** *(string) --*
Indicates the database engine version.
- **LatestRestorableTime** *(datetime) --*
Specifies the latest time to which a database can be restored with point-in-time restore.
- **Port** *(integer) --*
Specifies the port that the database engine is listening on.
- **MasterUsername** *(string) --*
Contains the master username for the DB cluster.
- **DBClusterOptionGroupMemberships** *(list) --*
Provides the list of option group memberships for this DB cluster.
- *(dict) --*
Contains status information for a DB cluster option group.
- **DBClusterOptionGroupName** *(string) --*
Specifies the name of the DB cluster option group.
- **Status** *(string) --*
Specifies the status of the DB cluster option group.
- **PreferredBackupWindow** *(string) --*
Specifies the daily time range during which automated backups are created if automated backups are enabled, as determined by the ``BackupRetentionPeriod`` .
- **PreferredMaintenanceWindow** *(string) --*
Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
- **ReplicationSourceIdentifier** *(string) --*
Not supported by Neptune.
- **ReadReplicaIdentifiers** *(list) --*
Contains one or more identifiers of the Read Replicas associated with this DB cluster.
- *(string) --*
- **DBClusterMembers** *(list) --*
Provides the list of instances that make up the DB cluster.
- *(dict) --*
Contains information about an instance that is part of a DB cluster.
- **DBInstanceIdentifier** *(string) --*
Specifies the instance identifier for this member of the DB cluster.
- **IsClusterWriter** *(boolean) --*
Value that is ``true`` if the cluster member is the primary instance for the DB cluster and ``false`` otherwise.
- **DBClusterParameterGroupStatus** *(string) --*
Specifies the status of the DB cluster parameter group for this member of the DB cluster.
- **PromotionTier** *(integer) --*
A value that specifies the order in which a Read Replica is promoted to the primary instance after a failure of the existing primary instance.
- **VpcSecurityGroups** *(list) --*
Provides a list of VPC security groups that the DB cluster belongs to.
- *(dict) --*
This data type is used as a response element for queries on VPC security group membership.
- **VpcSecurityGroupId** *(string) --*
The name of the VPC security group.
- **Status** *(string) --*
The status of the VPC security group.
- **HostedZoneId** *(string) --*
Specifies the ID that Amazon Route 53 assigns when you create a hosted zone.
- **StorageEncrypted** *(boolean) --*
Specifies whether the DB cluster is encrypted.
- **KmsKeyId** *(string) --*
If ``StorageEncrypted`` is true, the AWS KMS key identifier for the encrypted DB cluster.
- **DbClusterResourceId** *(string) --*
The AWS Region-unique, immutable identifier for the DB cluster. This identifier is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB cluster is accessed.
- **DBClusterArn** *(string) --*
The Amazon Resource Name (ARN) for the DB cluster.
- **AssociatedRoles** *(list) --*
Provides a list of the AWS Identity and Access Management (IAM) roles that are associated with the DB cluster. IAM roles that are associated with a DB cluster grant permission for the DB cluster to access other AWS services on your behalf.
- *(dict) --*
Describes an AWS Identity and Access Management (IAM) role that is associated with a DB cluster.
- **RoleArn** *(string) --*
The Amazon Resource Name (ARN) of the IAM role that is associated with the DB cluster.
- **Status** *(string) --*
Describes the state of association between the IAM role and the DB cluster. The Status property returns one of the following values:
* ``ACTIVE`` - the IAM role ARN is associated with the DB cluster and can be used to access other AWS services on your behalf.
* ``PENDING`` - the IAM role ARN is being associated with the DB cluster.
* ``INVALID`` - the IAM role ARN is associated with the DB cluster, but the DB cluster is unable to assume the IAM role in order to access other AWS services on your behalf.
- **IAMDatabaseAuthenticationEnabled** *(boolean) --*
True if mapping of AWS Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false.
- **CloneGroupId** *(string) --*
Identifies the clone group to which the DB cluster is associated.
- **ClusterCreateTime** *(datetime) --*
Specifies the time when the DB cluster was created, in Universal Coordinated Time (UTC).
:type DBClusterIdentifier: string
:param DBClusterIdentifier:
The user-supplied DB cluster identifier. If this parameter is specified, information from only the specific DB cluster is returned. This parameter isn\'t case-sensitive.
Constraints:
* If supplied, must match an existing DBClusterIdentifier.
:type Filters: list
:param Filters:
A filter that specifies one or more DB clusters to describe.
Supported filters:
* ``db-cluster-id`` - Accepts DB cluster identifiers and DB cluster Amazon Resource Names (ARNs). The results list will only include information about the DB clusters identified by these ARNs.
- *(dict) --*
This type is not currently supported.
- **Name** *(string) --* **[REQUIRED]**
This parameter is not currently supported.
- **Values** *(list) --* **[REQUIRED]**
This parameter is not currently supported.
- *(string) --*
:type MaxRecords: integer
:param MaxRecords:
The maximum number of records to include in the response. If more records exist than the specified ``MaxRecords`` value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.
Default: 100
Constraints: Minimum 20, maximum 100.
:type Marker: string
:param Marker:
An optional pagination token provided by a previous DescribeDBClusters request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by ``MaxRecords`` .
:rtype: dict
:returns:
"""
pass
def describe_db_engine_versions(self, Engine: str = None, EngineVersion: str = None, DBParameterGroupFamily: str = None, Filters: List = None, MaxRecords: int = None, Marker: str = None, DefaultOnly: bool = None, ListSupportedCharacterSets: bool = None, ListSupportedTimezones: bool = None) -> Dict:
"""
Returns a list of the available DB engines.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBEngineVersions>`_
**Request Syntax**
::
response = client.describe_db_engine_versions(
Engine='string',
EngineVersion='string',
DBParameterGroupFamily='string',
Filters=[
{
'Name': 'string',
'Values': [
'string',
]
},
],
MaxRecords=123,
Marker='string',
DefaultOnly=True|False,
ListSupportedCharacterSets=True|False,
ListSupportedTimezones=True|False
)
**Response Syntax**
::
{
'Marker': 'string',
'DBEngineVersions': [
{
'Engine': 'string',
'EngineVersion': 'string',
'DBParameterGroupFamily': 'string',
'DBEngineDescription': 'string',
'DBEngineVersionDescription': 'string',
'DefaultCharacterSet': {
'CharacterSetName': 'string',
'CharacterSetDescription': 'string'
},
'SupportedCharacterSets': [
{
'CharacterSetName': 'string',
'CharacterSetDescription': 'string'
},
],
'ValidUpgradeTarget': [
{
'Engine': 'string',
'EngineVersion': 'string',
'Description': 'string',
'AutoUpgrade': True|False,
'IsMajorVersionUpgrade': True|False
},
],
'SupportedTimezones': [
{
'TimezoneName': 'string'
},
],
'ExportableLogTypes': [
'string',
],
'SupportsLogExportsToCloudwatchLogs': True|False,
'SupportsReadReplica': True|False
},
]
}
**Response Structure**
- *(dict) --*
- **Marker** *(string) --*
An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by ``MaxRecords`` .
- **DBEngineVersions** *(list) --*
A list of ``DBEngineVersion`` elements.
- *(dict) --*
This data type is used as a response element in the action DescribeDBEngineVersions .
- **Engine** *(string) --*
The name of the database engine.
- **EngineVersion** *(string) --*
The version number of the database engine.
- **DBParameterGroupFamily** *(string) --*
The name of the DB parameter group family for the database engine.
- **DBEngineDescription** *(string) --*
The description of the database engine.
- **DBEngineVersionDescription** *(string) --*
The description of the database engine version.
- **DefaultCharacterSet** *(dict) --*
The default character set for new instances of this engine version, if the ``CharacterSetName`` parameter of the CreateDBInstance API is not specified.
- **CharacterSetName** *(string) --*
The name of the character set.
- **CharacterSetDescription** *(string) --*
The description of the character set.
- **SupportedCharacterSets** *(list) --*
A list of the character sets supported by this engine for the ``CharacterSetName`` parameter of the ``CreateDBInstance`` action.
- *(dict) --*
Specifies a character set.
- **CharacterSetName** *(string) --*
The name of the character set.
- **CharacterSetDescription** *(string) --*
The description of the character set.
- **ValidUpgradeTarget** *(list) --*
A list of engine versions that this database engine version can be upgraded to.
- *(dict) --*
The version of the database engine that a DB instance can be upgraded to.
- **Engine** *(string) --*
The name of the upgrade target database engine.
- **EngineVersion** *(string) --*
The version number of the upgrade target database engine.
- **Description** *(string) --*
The version of the database engine that a DB instance can be upgraded to.
- **AutoUpgrade** *(boolean) --*
A value that indicates whether the target version is applied to any source DB instances that have AutoMinorVersionUpgrade set to true.
- **IsMajorVersionUpgrade** *(boolean) --*
A value that indicates whether a database engine is upgraded to a major version.
- **SupportedTimezones** *(list) --*
A list of the time zones supported by this engine for the ``Timezone`` parameter of the ``CreateDBInstance`` action.
- *(dict) --*
A time zone associated with a DBInstance .
- **TimezoneName** *(string) --*
The name of the time zone.
- **ExportableLogTypes** *(list) --*
The types of logs that the database engine has available for export to CloudWatch Logs.
- *(string) --*
- **SupportsLogExportsToCloudwatchLogs** *(boolean) --*
A value that indicates whether the engine version supports exporting the log types specified by ExportableLogTypes to CloudWatch Logs.
- **SupportsReadReplica** *(boolean) --*
Indicates whether the database engine version supports read replicas.
:type Engine: string
:param Engine:
The database engine to return.
:type EngineVersion: string
:param EngineVersion:
The database engine version to return.
Example: ``5.1.49``
:type DBParameterGroupFamily: string
:param DBParameterGroupFamily:
The name of a specific DB parameter group family to return details for.
Constraints:
* If supplied, must match an existing DBParameterGroupFamily.
:type Filters: list
:param Filters:
Not currently supported.
- *(dict) --*
This type is not currently supported.
- **Name** *(string) --* **[REQUIRED]**
This parameter is not currently supported.
- **Values** *(list) --* **[REQUIRED]**
This parameter is not currently supported.
- *(string) --*
:type MaxRecords: integer
:param MaxRecords:
The maximum number of records to include in the response. If more than the ``MaxRecords`` value is available, a pagination token called a marker is included in the response so that the following results can be retrieved.
Default: 100
Constraints: Minimum 20, maximum 100.
:type Marker: string
:param Marker:
An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by ``MaxRecords`` .
:type DefaultOnly: boolean
:param DefaultOnly:
Indicates that only the default version of the specified engine or engine and major version combination is returned.
:type ListSupportedCharacterSets: boolean
:param ListSupportedCharacterSets:
If this parameter is specified and the requested engine supports the ``CharacterSetName`` parameter for ``CreateDBInstance`` , the response includes a list of supported character sets for each engine version.
:type ListSupportedTimezones: boolean
:param ListSupportedTimezones:
If this parameter is specified and the requested engine supports the ``TimeZone`` parameter for ``CreateDBInstance`` , the response includes a list of supported time zones for each engine version.
:rtype: dict
:returns:
"""
pass
def describe_db_instances(self, DBInstanceIdentifier: str = None, Filters: List = None, MaxRecords: int = None, Marker: str = None) -> Dict:
"""
Returns information about provisioned instances. This API supports pagination.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBInstances>`_
**Request Syntax**
::
response = client.describe_db_instances(
DBInstanceIdentifier='string',
Filters=[
{
'Name': 'string',
'Values': [
'string',
]
},
],
MaxRecords=123,
Marker='string'
)
**Response Syntax**
::
{
'Marker': 'string',
'DBInstances': [
{
'DBInstanceIdentifier': 'string',
'DBInstanceClass': 'string',
'Engine': 'string',
'DBInstanceStatus': 'string',
'MasterUsername': 'string',
'DBName': 'string',
'Endpoint': {
'Address': 'string',
'Port': 123,
'HostedZoneId': 'string'
},
'AllocatedStorage': 123,
'InstanceCreateTime': datetime(2015, 1, 1),
'PreferredBackupWindow': 'string',
'BackupRetentionPeriod': 123,
'DBSecurityGroups': [
{
'DBSecurityGroupName': 'string',
'Status': 'string'
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'DBParameterGroups': [
{
'DBParameterGroupName': 'string',
'ParameterApplyStatus': 'string'
},
],
'AvailabilityZone': 'string',
'DBSubnetGroup': {
'DBSubnetGroupName': 'string',
'DBSubnetGroupDescription': 'string',
'VpcId': 'string',
'SubnetGroupStatus': 'string',
'Subnets': [
{
'SubnetIdentifier': 'string',
'SubnetAvailabilityZone': {
'Name': 'string'
},
'SubnetStatus': 'string'
},
],
'DBSubnetGroupArn': 'string'
},
'PreferredMaintenanceWindow': 'string',
'PendingModifiedValues': {
'DBInstanceClass': 'string',
'AllocatedStorage': 123,
'MasterUserPassword': 'string',
'Port': 123,
'BackupRetentionPeriod': 123,
'MultiAZ': True|False,
'EngineVersion': 'string',
'LicenseModel': 'string',
'Iops': 123,
'DBInstanceIdentifier': 'string',
'StorageType': 'string',
'CACertificateIdentifier': 'string',
'DBSubnetGroupName': 'string',
'PendingCloudwatchLogsExports': {
'LogTypesToEnable': [
'string',
],
'LogTypesToDisable': [
'string',
]
}
},
'LatestRestorableTime': datetime(2015, 1, 1),
'MultiAZ': True|False,
'EngineVersion': 'string',
'AutoMinorVersionUpgrade': True|False,
'ReadReplicaSourceDBInstanceIdentifier': 'string',
'ReadReplicaDBInstanceIdentifiers': [
'string',
],
'ReadReplicaDBClusterIdentifiers': [
'string',
],
'LicenseModel': 'string',
'Iops': 123,
'OptionGroupMemberships': [
{
'OptionGroupName': 'string',
'Status': 'string'
},
],
'CharacterSetName': 'string',
'SecondaryAvailabilityZone': 'string',
'PubliclyAccessible': True|False,
'StatusInfos': [
{
'StatusType': 'string',
'Normal': True|False,
'Status': 'string',
'Message': 'string'
},
],
'StorageType': 'string',
'TdeCredentialArn': 'string',
'DbInstancePort': 123,
'DBClusterIdentifier': 'string',
'StorageEncrypted': True|False,
'KmsKeyId': 'string',
'DbiResourceId': 'string',
'CACertificateIdentifier': 'string',
'DomainMemberships': [
{
'Domain': 'string',
'Status': 'string',
'FQDN': 'string',
'IAMRoleName': 'string'
},
],
'CopyTagsToSnapshot': True|False,
'MonitoringInterval': 123,
'EnhancedMonitoringResourceArn': 'string',
'MonitoringRoleArn': 'string',
'PromotionTier': 123,
'DBInstanceArn': 'string',
'Timezone': 'string',
'IAMDatabaseAuthenticationEnabled': True|False,
'PerformanceInsightsEnabled': True|False,
'PerformanceInsightsKMSKeyId': 'string',
'EnabledCloudwatchLogsExports': [
'string',
]
},
]
}
**Response Structure**
- *(dict) --*
- **Marker** *(string) --*
An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by ``MaxRecords`` .
- **DBInstances** *(list) --*
A list of DBInstance instances.
- *(dict) --*
Contains the details of an Amazon Neptune DB instance.
This data type is used as a response element in the DescribeDBInstances action.
- **DBInstanceIdentifier** *(string) --*
Contains a user-supplied database identifier. This identifier is the unique key that identifies a DB instance.
- **DBInstanceClass** *(string) --*
Contains the name of the compute and memory capacity class of the DB instance.
- **Engine** *(string) --*
Provides the name of the database engine to be used for this DB instance.
- **DBInstanceStatus** *(string) --*
Specifies the current state of this database.
- **MasterUsername** *(string) --*
Contains the master username for the DB instance.
- **DBName** *(string) --*
The database name.
- **Endpoint** *(dict) --*
Specifies the connection endpoint.
- **Address** *(string) --*
Specifies the DNS address of the DB instance.
- **Port** *(integer) --*
Specifies the port that the database engine is listening on.
- **HostedZoneId** *(string) --*
Specifies the ID that Amazon Route 53 assigns when you create a hosted zone.
- **AllocatedStorage** *(integer) --*
Specifies the allocated storage size specified in gibibytes.
- **InstanceCreateTime** *(datetime) --*
Provides the date and time the DB instance was created.
- **PreferredBackupWindow** *(string) --*
Specifies the daily time range during which automated backups are created if automated backups are enabled, as determined by the ``BackupRetentionPeriod`` .
- **BackupRetentionPeriod** *(integer) --*
Specifies the number of days for which automatic DB snapshots are retained.
- **DBSecurityGroups** *(list) --*
Provides List of DB security group elements containing only ``DBSecurityGroup.Name`` and ``DBSecurityGroup.Status`` subelements.
- *(dict) --*
Specifies membership in a designated DB security group.
- **DBSecurityGroupName** *(string) --*
The name of the DB security group.
- **Status** *(string) --*
The status of the DB security group.
- **VpcSecurityGroups** *(list) --*
Provides a list of VPC security group elements that the DB instance belongs to.
- *(dict) --*
This data type is used as a response element for queries on VPC security group membership.
- **VpcSecurityGroupId** *(string) --*
The name of the VPC security group.
- **Status** *(string) --*
The status of the VPC security group.
- **DBParameterGroups** *(list) --*
Provides the list of DB parameter groups applied to this DB instance.
- *(dict) --*
The status of the DB parameter group.
This data type is used as a response element in the following actions:
* CreateDBInstance
* DeleteDBInstance
* ModifyDBInstance
* RebootDBInstance
- **DBParameterGroupName** *(string) --*
The name of the DP parameter group.
- **ParameterApplyStatus** *(string) --*
The status of parameter updates.
- **AvailabilityZone** *(string) --*
Specifies the name of the Availability Zone the DB instance is located in.
- **DBSubnetGroup** *(dict) --*
Specifies information on the subnet group associated with the DB instance, including the name, description, and subnets in the subnet group.
- **DBSubnetGroupName** *(string) --*
The name of the DB subnet group.
- **DBSubnetGroupDescription** *(string) --*
Provides the description of the DB subnet group.
- **VpcId** *(string) --*
Provides the VpcId of the DB subnet group.
- **SubnetGroupStatus** *(string) --*
Provides the status of the DB subnet group.
- **Subnets** *(list) --*
Contains a list of Subnet elements.
- *(dict) --*
Specifies a subnet.
This data type is used as a response element in the DescribeDBSubnetGroups action.
- **SubnetIdentifier** *(string) --*
Specifies the identifier of the subnet.
- **SubnetAvailabilityZone** *(dict) --*
Specifies the EC2 Availability Zone that the subnet is in.
- **Name** *(string) --*
The name of the availability zone.
- **SubnetStatus** *(string) --*
Specifies the status of the subnet.
- **DBSubnetGroupArn** *(string) --*
The Amazon Resource Name (ARN) for the DB subnet group.
- **PreferredMaintenanceWindow** *(string) --*
Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
- **PendingModifiedValues** *(dict) --*
Specifies that changes to the DB instance are pending. This element is only included when changes are pending. Specific changes are identified by subelements.
- **DBInstanceClass** *(string) --*
Contains the new ``DBInstanceClass`` for the DB instance that will be applied or is currently being applied.
- **AllocatedStorage** *(integer) --*
Contains the new ``AllocatedStorage`` size for the DB instance that will be applied or is currently being applied.
- **MasterUserPassword** *(string) --*
Contains the pending or currently-in-progress change of the master credentials for the DB instance.
- **Port** *(integer) --*
Specifies the pending port for the DB instance.
- **BackupRetentionPeriod** *(integer) --*
Specifies the pending number of days for which automated backups are retained.
- **MultiAZ** *(boolean) --*
Indicates that the Single-AZ DB instance is to change to a Multi-AZ deployment.
- **EngineVersion** *(string) --*
Indicates the database engine version.
- **LicenseModel** *(string) --*
The license model for the DB instance.
Valid values: ``license-included`` | ``bring-your-own-license`` | ``general-public-license``
- **Iops** *(integer) --*
Specifies the new Provisioned IOPS value for the DB instance that will be applied or is currently being applied.
- **DBInstanceIdentifier** *(string) --*
Contains the new ``DBInstanceIdentifier`` for the DB instance that will be applied or is currently being applied.
- **StorageType** *(string) --*
Specifies the storage type to be associated with the DB instance.
- **CACertificateIdentifier** *(string) --*
Specifies the identifier of the CA certificate for the DB instance.
- **DBSubnetGroupName** *(string) --*
The new DB subnet group for the DB instance.
- **PendingCloudwatchLogsExports** *(dict) --*
Specifies the CloudWatch logs to be exported.
- **LogTypesToEnable** *(list) --*
Log types that are in the process of being deactivated. After they are deactivated, these log types aren't exported to CloudWatch Logs.
- *(string) --*
- **LogTypesToDisable** *(list) --*
Log types that are in the process of being enabled. After they are enabled, these log types are exported to CloudWatch Logs.
- *(string) --*
- **LatestRestorableTime** *(datetime) --*
Specifies the latest time to which a database can be restored with point-in-time restore.
- **MultiAZ** *(boolean) --*
Specifies if the DB instance is a Multi-AZ deployment.
- **EngineVersion** *(string) --*
Indicates the database engine version.
- **AutoMinorVersionUpgrade** *(boolean) --*
Indicates that minor version patches are applied automatically.
- **ReadReplicaSourceDBInstanceIdentifier** *(string) --*
Contains the identifier of the source DB instance if this DB instance is a Read Replica.
- **ReadReplicaDBInstanceIdentifiers** *(list) --*
Contains one or more identifiers of the Read Replicas associated with this DB instance.
- *(string) --*
- **ReadReplicaDBClusterIdentifiers** *(list) --*
Contains one or more identifiers of DB clusters that are Read Replicas of this DB instance.
- *(string) --*
- **LicenseModel** *(string) --*
License model information for this DB instance.
- **Iops** *(integer) --*
Specifies the Provisioned IOPS (I/O operations per second) value.
- **OptionGroupMemberships** *(list) --*
Provides the list of option group memberships for this DB instance.
- *(dict) --*
Provides information on the option groups the DB instance is a member of.
- **OptionGroupName** *(string) --*
The name of the option group that the instance belongs to.
- **Status** *(string) --*
The status of the DB instance's option group membership. Valid values are: ``in-sync`` , ``pending-apply`` , ``pending-removal`` , ``pending-maintenance-apply`` , ``pending-maintenance-removal`` , ``applying`` , ``removing`` , and ``failed`` .
- **CharacterSetName** *(string) --*
If present, specifies the name of the character set that this instance is associated with.
- **SecondaryAvailabilityZone** *(string) --*
If present, specifies the name of the secondary Availability Zone for a DB instance with multi-AZ support.
- **PubliclyAccessible** *(boolean) --*
This flag should no longer be used.
- **StatusInfos** *(list) --*
The status of a Read Replica. If the instance is not a Read Replica, this is blank.
- *(dict) --*
Provides a list of status information for a DB instance.
- **StatusType** *(string) --*
This value is currently "read replication."
- **Normal** *(boolean) --*
Boolean value that is true if the instance is operating normally, or false if the instance is in an error state.
- **Status** *(string) --*
Status of the DB instance. For a StatusType of read replica, the values can be replicating, error, stopped, or terminated.
- **Message** *(string) --*
Details of the error if there is an error for the instance. If the instance is not in an error state, this value is blank.
- **StorageType** *(string) --*
Specifies the storage type associated with DB instance.
- **TdeCredentialArn** *(string) --*
The ARN from the key store with which the instance is associated for TDE encryption.
- **DbInstancePort** *(integer) --*
Specifies the port that the DB instance listens on. If the DB instance is part of a DB cluster, this can be a different port than the DB cluster port.
- **DBClusterIdentifier** *(string) --*
If the DB instance is a member of a DB cluster, contains the name of the DB cluster that the DB instance is a member of.
- **StorageEncrypted** *(boolean) --*
Not supported: The encryption for DB instances is managed by the DB cluster.
- **KmsKeyId** *(string) --*
Not supported: The encryption for DB instances is managed by the DB cluster.
- **DbiResourceId** *(string) --*
The AWS Region-unique, immutable identifier for the DB instance. This identifier is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB instance is accessed.
- **CACertificateIdentifier** *(string) --*
The identifier of the CA certificate for this DB instance.
- **DomainMemberships** *(list) --*
Not supported
- *(dict) --*
An Active Directory Domain membership record associated with a DB instance.
- **Domain** *(string) --*
The identifier of the Active Directory Domain.
- **Status** *(string) --*
The status of the DB instance's Active Directory Domain membership, such as joined, pending-join, failed etc).
- **FQDN** *(string) --*
The fully qualified domain name of the Active Directory Domain.
- **IAMRoleName** *(string) --*
The name of the IAM role to be used when making API calls to the Directory Service.
- **CopyTagsToSnapshot** *(boolean) --*
Specifies whether tags are copied from the DB instance to snapshots of the DB instance.
- **MonitoringInterval** *(integer) --*
The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance.
- **EnhancedMonitoringResourceArn** *(string) --*
The Amazon Resource Name (ARN) of the Amazon CloudWatch Logs log stream that receives the Enhanced Monitoring metrics data for the DB instance.
- **MonitoringRoleArn** *(string) --*
The ARN for the IAM role that permits Neptune to send Enhanced Monitoring metrics to Amazon CloudWatch Logs.
- **PromotionTier** *(integer) --*
A value that specifies the order in which a Read Replica is promoted to the primary instance after a failure of the existing primary instance.
- **DBInstanceArn** *(string) --*
The Amazon Resource Name (ARN) for the DB instance.
- **Timezone** *(string) --*
Not supported.
- **IAMDatabaseAuthenticationEnabled** *(boolean) --*
True if AWS Identity and Access Management (IAM) authentication is enabled, and otherwise false.
- **PerformanceInsightsEnabled** *(boolean) --*
True if Performance Insights is enabled for the DB instance, and otherwise false.
- **PerformanceInsightsKMSKeyId** *(string) --*
The AWS KMS key identifier for encryption of Performance Insights data. The KMS key ID is the Amazon Resource Name (ARN), KMS key identifier, or the KMS key alias for the KMS encryption key.
- **EnabledCloudwatchLogsExports** *(list) --*
A list of log types that this DB instance is configured to export to CloudWatch Logs.
- *(string) --*
:type DBInstanceIdentifier: string
:param DBInstanceIdentifier:
The user-supplied instance identifier. If this parameter is specified, information from only the specific DB instance is returned. This parameter isn\'t case-sensitive.
Constraints:
* If supplied, must match the identifier of an existing DBInstance.
:type Filters: list
:param Filters:
A filter that specifies one or more DB instances to describe.
Supported filters:
* ``db-cluster-id`` - Accepts DB cluster identifiers and DB cluster Amazon Resource Names (ARNs). The results list will only include information about the DB instances associated with the DB clusters identified by these ARNs.
* ``db-instance-id`` - Accepts DB instance identifiers and DB instance Amazon Resource Names (ARNs). The results list will only include information about the DB instances identified by these ARNs.
- *(dict) --*
This type is not currently supported.
- **Name** *(string) --* **[REQUIRED]**
This parameter is not currently supported.
- **Values** *(list) --* **[REQUIRED]**
This parameter is not currently supported.
- *(string) --*
:type MaxRecords: integer
:param MaxRecords:
The maximum number of records to include in the response. If more records exist than the specified ``MaxRecords`` value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.
Default: 100
Constraints: Minimum 20, maximum 100.
:type Marker: string
:param Marker:
An optional pagination token provided by a previous ``DescribeDBInstances`` request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by ``MaxRecords`` .
:rtype: dict
:returns:
"""
pass
def describe_db_parameter_groups(self, DBParameterGroupName: str = None, Filters: List = None, MaxRecords: int = None, Marker: str = None) -> Dict:
"""
Returns a list of ``DBParameterGroup`` descriptions. If a ``DBParameterGroupName`` is specified, the list will contain only the description of the specified DB parameter group.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBParameterGroups>`_
**Request Syntax**
::
response = client.describe_db_parameter_groups(
DBParameterGroupName='string',
Filters=[
{
'Name': 'string',
'Values': [
'string',
]
},
],
MaxRecords=123,
Marker='string'
)
**Response Syntax**
::
{
'Marker': 'string',
'DBParameterGroups': [
{
'DBParameterGroupName': 'string',
'DBParameterGroupFamily': 'string',
'Description': 'string',
'DBParameterGroupArn': 'string'
},
]
}
**Response Structure**
- *(dict) --*
- **Marker** *(string) --*
An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by ``MaxRecords`` .
- **DBParameterGroups** *(list) --*
A list of DBParameterGroup instances.
- *(dict) --*
Contains the details of an Amazon Neptune DB parameter group.
This data type is used as a response element in the DescribeDBParameterGroups action.
- **DBParameterGroupName** *(string) --*
Provides the name of the DB parameter group.
- **DBParameterGroupFamily** *(string) --*
Provides the name of the DB parameter group family that this DB parameter group is compatible with.
- **Description** *(string) --*
Provides the customer-specified description for this DB parameter group.
- **DBParameterGroupArn** *(string) --*
The Amazon Resource Name (ARN) for the DB parameter group.
:type DBParameterGroupName: string
:param DBParameterGroupName:
The name of a specific DB parameter group to return details for.
Constraints:
* If supplied, must match the name of an existing DBClusterParameterGroup.
:type Filters: list
:param Filters:
This parameter is not currently supported.
- *(dict) --*
This type is not currently supported.
- **Name** *(string) --* **[REQUIRED]**
This parameter is not currently supported.
- **Values** *(list) --* **[REQUIRED]**
This parameter is not currently supported.
- *(string) --*
:type MaxRecords: integer
:param MaxRecords:
The maximum number of records to include in the response. If more records exist than the specified ``MaxRecords`` value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.
Default: 100
Constraints: Minimum 20, maximum 100.
:type Marker: string
:param Marker:
An optional pagination token provided by a previous ``DescribeDBParameterGroups`` request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by ``MaxRecords`` .
:rtype: dict
:returns:
"""
pass
def describe_db_parameters(self, DBParameterGroupName: str, Source: str = None, Filters: List = None, MaxRecords: int = None, Marker: str = None) -> Dict:
"""
Returns the detailed parameter list for a particular DB parameter group.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBParameters>`_
**Request Syntax**
::
response = client.describe_db_parameters(
DBParameterGroupName='string',
Source='string',
Filters=[
{
'Name': 'string',
'Values': [
'string',
]
},
],
MaxRecords=123,
Marker='string'
)
**Response Syntax**
::
{
'Parameters': [
{
'ParameterName': 'string',
'ParameterValue': 'string',
'Description': 'string',
'Source': 'string',
'ApplyType': 'string',
'DataType': 'string',
'AllowedValues': 'string',
'IsModifiable': True|False,
'MinimumEngineVersion': 'string',
'ApplyMethod': 'immediate'|'pending-reboot'
},
],
'Marker': 'string'
}
**Response Structure**
- *(dict) --*
- **Parameters** *(list) --*
A list of Parameter values.
- *(dict) --*
Specifies a parameter.
- **ParameterName** *(string) --*
Specifies the name of the parameter.
- **ParameterValue** *(string) --*
Specifies the value of the parameter.
- **Description** *(string) --*
Provides a description of the parameter.
- **Source** *(string) --*
Indicates the source of the parameter value.
- **ApplyType** *(string) --*
Specifies the engine specific parameters type.
- **DataType** *(string) --*
Specifies the valid data type for the parameter.
- **AllowedValues** *(string) --*
Specifies the valid range of values for the parameter.
- **IsModifiable** *(boolean) --*
Indicates whether (``true`` ) or not (``false`` ) the parameter can be modified. Some parameters have security or operational implications that prevent them from being changed.
- **MinimumEngineVersion** *(string) --*
The earliest engine version to which the parameter can apply.
- **ApplyMethod** *(string) --*
Indicates when to apply parameter updates.
- **Marker** *(string) --*
An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by ``MaxRecords`` .
:type DBParameterGroupName: string
:param DBParameterGroupName: **[REQUIRED]**
The name of a specific DB parameter group to return details for.
Constraints:
* If supplied, must match the name of an existing DBParameterGroup.
:type Source: string
:param Source:
The parameter types to return.
Default: All parameter types returned
Valid Values: ``user | system | engine-default``
:type Filters: list
:param Filters:
This parameter is not currently supported.
- *(dict) --*
This type is not currently supported.
- **Name** *(string) --* **[REQUIRED]**
This parameter is not currently supported.
- **Values** *(list) --* **[REQUIRED]**
This parameter is not currently supported.
- *(string) --*
:type MaxRecords: integer
:param MaxRecords:
The maximum number of records to include in the response. If more records exist than the specified ``MaxRecords`` value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.
Default: 100
Constraints: Minimum 20, maximum 100.
:type Marker: string
:param Marker:
An optional pagination token provided by a previous ``DescribeDBParameters`` request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by ``MaxRecords`` .
:rtype: dict
:returns:
"""
pass
def describe_db_subnet_groups(self, DBSubnetGroupName: str = None, Filters: List = None, MaxRecords: int = None, Marker: str = None) -> Dict:
"""
Returns a list of DBSubnetGroup descriptions. If a DBSubnetGroupName is specified, the list will contain only the descriptions of the specified DBSubnetGroup.
For an overview of CIDR ranges, go to the `Wikipedia Tutorial <http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing>`__ .
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBSubnetGroups>`_
**Request Syntax**
::
response = client.describe_db_subnet_groups(
DBSubnetGroupName='string',
Filters=[
{
'Name': 'string',
'Values': [
'string',
]
},
],
MaxRecords=123,
Marker='string'
)
**Response Syntax**
::
{
'Marker': 'string',
'DBSubnetGroups': [
{
'DBSubnetGroupName': 'string',
'DBSubnetGroupDescription': 'string',
'VpcId': 'string',
'SubnetGroupStatus': 'string',
'Subnets': [
{
'SubnetIdentifier': 'string',
'SubnetAvailabilityZone': {
'Name': 'string'
},
'SubnetStatus': 'string'
},
],
'DBSubnetGroupArn': 'string'
},
]
}
**Response Structure**
- *(dict) --*
- **Marker** *(string) --*
An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by ``MaxRecords`` .
- **DBSubnetGroups** *(list) --*
A list of DBSubnetGroup instances.
- *(dict) --*
Contains the details of an Amazon Neptune DB subnet group.
This data type is used as a response element in the DescribeDBSubnetGroups action.
- **DBSubnetGroupName** *(string) --*
The name of the DB subnet group.
- **DBSubnetGroupDescription** *(string) --*
Provides the description of the DB subnet group.
- **VpcId** *(string) --*
Provides the VpcId of the DB subnet group.
- **SubnetGroupStatus** *(string) --*
Provides the status of the DB subnet group.
- **Subnets** *(list) --*
Contains a list of Subnet elements.
- *(dict) --*
Specifies a subnet.
This data type is used as a response element in the DescribeDBSubnetGroups action.
- **SubnetIdentifier** *(string) --*
Specifies the identifier of the subnet.
- **SubnetAvailabilityZone** *(dict) --*
Specifies the EC2 Availability Zone that the subnet is in.
- **Name** *(string) --*
The name of the availability zone.
- **SubnetStatus** *(string) --*
Specifies the status of the subnet.
- **DBSubnetGroupArn** *(string) --*
The Amazon Resource Name (ARN) for the DB subnet group.
:type DBSubnetGroupName: string
:param DBSubnetGroupName:
The name of the DB subnet group to return details for.
:type Filters: list
:param Filters:
This parameter is not currently supported.
- *(dict) --*
This type is not currently supported.
- **Name** *(string) --* **[REQUIRED]**
This parameter is not currently supported.
- **Values** *(list) --* **[REQUIRED]**
This parameter is not currently supported.
- *(string) --*
:type MaxRecords: integer
:param MaxRecords:
The maximum number of records to include in the response. If more records exist than the specified ``MaxRecords`` value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.
Default: 100
Constraints: Minimum 20, maximum 100.
:type Marker: string
:param Marker:
An optional pagination token provided by a previous DescribeDBSubnetGroups request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by ``MaxRecords`` .
:rtype: dict
:returns:
"""
pass
def describe_engine_default_cluster_parameters(self, DBParameterGroupFamily: str, Filters: List = None, MaxRecords: int = None, Marker: str = None) -> Dict:
"""
Returns the default engine and system parameter information for the cluster database engine.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeEngineDefaultClusterParameters>`_
**Request Syntax**
::
response = client.describe_engine_default_cluster_parameters(
DBParameterGroupFamily='string',
Filters=[
{
'Name': 'string',
'Values': [
'string',
]
},
],
MaxRecords=123,
Marker='string'
)
**Response Syntax**
::
{
'EngineDefaults': {
'DBParameterGroupFamily': 'string',
'Marker': 'string',
'Parameters': [
{
'ParameterName': 'string',
'ParameterValue': 'string',
'Description': 'string',
'Source': 'string',
'ApplyType': 'string',
'DataType': 'string',
'AllowedValues': 'string',
'IsModifiable': True|False,
'MinimumEngineVersion': 'string',
'ApplyMethod': 'immediate'|'pending-reboot'
},
]
}
}
**Response Structure**
- *(dict) --*
- **EngineDefaults** *(dict) --*
Contains the result of a successful invocation of the DescribeEngineDefaultParameters action.
- **DBParameterGroupFamily** *(string) --*
Specifies the name of the DB parameter group family that the engine default parameters apply to.
- **Marker** *(string) --*
An optional pagination token provided by a previous EngineDefaults request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by ``MaxRecords`` .
- **Parameters** *(list) --*
Contains a list of engine default parameters.
- *(dict) --*
Specifies a parameter.
- **ParameterName** *(string) --*
Specifies the name of the parameter.
- **ParameterValue** *(string) --*
Specifies the value of the parameter.
- **Description** *(string) --*
Provides a description of the parameter.
- **Source** *(string) --*
Indicates the source of the parameter value.
- **ApplyType** *(string) --*
Specifies the engine specific parameters type.
- **DataType** *(string) --*
Specifies the valid data type for the parameter.
- **AllowedValues** *(string) --*
Specifies the valid range of values for the parameter.
- **IsModifiable** *(boolean) --*
Indicates whether (``true`` ) or not (``false`` ) the parameter can be modified. Some parameters have security or operational implications that prevent them from being changed.
- **MinimumEngineVersion** *(string) --*
The earliest engine version to which the parameter can apply.
- **ApplyMethod** *(string) --*
Indicates when to apply parameter updates.
:type DBParameterGroupFamily: string
:param DBParameterGroupFamily: **[REQUIRED]**
The name of the DB cluster parameter group family to return engine parameter information for.
:type Filters: list
:param Filters:
This parameter is not currently supported.
- *(dict) --*
This type is not currently supported.
- **Name** *(string) --* **[REQUIRED]**
This parameter is not currently supported.
- **Values** *(list) --* **[REQUIRED]**
This parameter is not currently supported.
- *(string) --*
:type MaxRecords: integer
:param MaxRecords:
The maximum number of records to include in the response. If more records exist than the specified ``MaxRecords`` value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.
Default: 100
Constraints: Minimum 20, maximum 100.
:type Marker: string
:param Marker:
An optional pagination token provided by a previous ``DescribeEngineDefaultClusterParameters`` request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by ``MaxRecords`` .
:rtype: dict
:returns:
"""
pass
def describe_engine_default_parameters(self, DBParameterGroupFamily: str, Filters: List = None, MaxRecords: int = None, Marker: str = None) -> Dict:
"""
Returns the default engine and system parameter information for the specified database engine.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeEngineDefaultParameters>`_
**Request Syntax**
::
response = client.describe_engine_default_parameters(
DBParameterGroupFamily='string',
Filters=[
{
'Name': 'string',
'Values': [
'string',
]
},
],
MaxRecords=123,
Marker='string'
)
**Response Syntax**
::
{
'EngineDefaults': {
'DBParameterGroupFamily': 'string',
'Marker': 'string',
'Parameters': [
{
'ParameterName': 'string',
'ParameterValue': 'string',
'Description': 'string',
'Source': 'string',
'ApplyType': 'string',
'DataType': 'string',
'AllowedValues': 'string',
'IsModifiable': True|False,
'MinimumEngineVersion': 'string',
'ApplyMethod': 'immediate'|'pending-reboot'
},
]
}
}
**Response Structure**
- *(dict) --*
- **EngineDefaults** *(dict) --*
Contains the result of a successful invocation of the DescribeEngineDefaultParameters action.
- **DBParameterGroupFamily** *(string) --*
Specifies the name of the DB parameter group family that the engine default parameters apply to.
- **Marker** *(string) --*
An optional pagination token provided by a previous EngineDefaults request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by ``MaxRecords`` .
- **Parameters** *(list) --*
Contains a list of engine default parameters.
- *(dict) --*
Specifies a parameter.
- **ParameterName** *(string) --*
Specifies the name of the parameter.
- **ParameterValue** *(string) --*
Specifies the value of the parameter.
- **Description** *(string) --*
Provides a description of the parameter.
- **Source** *(string) --*
Indicates the source of the parameter value.
- **ApplyType** *(string) --*
Specifies the engine specific parameters type.
- **DataType** *(string) --*
Specifies the valid data type for the parameter.
- **AllowedValues** *(string) --*
Specifies the valid range of values for the parameter.
- **IsModifiable** *(boolean) --*
Indicates whether (``true`` ) or not (``false`` ) the parameter can be modified. Some parameters have security or operational implications that prevent them from being changed.
- **MinimumEngineVersion** *(string) --*
The earliest engine version to which the parameter can apply.
- **ApplyMethod** *(string) --*
Indicates when to apply parameter updates.
:type DBParameterGroupFamily: string
:param DBParameterGroupFamily: **[REQUIRED]**
The name of the DB parameter group family.
:type Filters: list
:param Filters:
Not currently supported.
- *(dict) --*
This type is not currently supported.
- **Name** *(string) --* **[REQUIRED]**
This parameter is not currently supported.
- **Values** *(list) --* **[REQUIRED]**
This parameter is not currently supported.
- *(string) --*
:type MaxRecords: integer
:param MaxRecords:
The maximum number of records to include in the response. If more records exist than the specified ``MaxRecords`` value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.
Default: 100
Constraints: Minimum 20, maximum 100.
:type Marker: string
:param Marker:
An optional pagination token provided by a previous ``DescribeEngineDefaultParameters`` request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by ``MaxRecords`` .
:rtype: dict
:returns:
"""
pass
def describe_event_categories(self, SourceType: str = None, Filters: List = None) -> Dict:
"""
Displays a list of categories for all event source types, or, if specified, for a specified source type.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeEventCategories>`_
**Request Syntax**
::
response = client.describe_event_categories(
SourceType='string',
Filters=[
{
'Name': 'string',
'Values': [
'string',
]
},
]
)
**Response Syntax**
::
{
'EventCategoriesMapList': [
{
'SourceType': 'string',
'EventCategories': [
'string',
]
},
]
}
**Response Structure**
- *(dict) --*
- **EventCategoriesMapList** *(list) --*
A list of EventCategoriesMap data types.
- *(dict) --*
Contains the results of a successful invocation of the DescribeEventCategories action.
- **SourceType** *(string) --*
The source type that the returned categories belong to
- **EventCategories** *(list) --*
The event categories for the specified source type
- *(string) --*
:type SourceType: string
:param SourceType:
The type of source that is generating the events.
Valid values: db-instance | db-parameter-group | db-security-group | db-snapshot
:type Filters: list
:param Filters:
This parameter is not currently supported.
- *(dict) --*
This type is not currently supported.
- **Name** *(string) --* **[REQUIRED]**
This parameter is not currently supported.
- **Values** *(list) --* **[REQUIRED]**
This parameter is not currently supported.
- *(string) --*
:rtype: dict
:returns:
"""
pass
def describe_event_subscriptions(self, SubscriptionName: str = None, Filters: List = None, MaxRecords: int = None, Marker: str = None) -> Dict:
"""
Lists all the subscription descriptions for a customer account. The description for a subscription includes SubscriptionName, SNSTopicARN, CustomerID, SourceType, SourceID, CreationTime, and Status.
If you specify a SubscriptionName, lists the description for that subscription.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeEventSubscriptions>`_
**Request Syntax**
::
response = client.describe_event_subscriptions(
SubscriptionName='string',
Filters=[
{
'Name': 'string',
'Values': [
'string',
]
},
],
MaxRecords=123,
Marker='string'
)
**Response Syntax**
::
{
'Marker': 'string',
'EventSubscriptionsList': [
{
'CustomerAwsId': 'string',
'CustSubscriptionId': 'string',
'SnsTopicArn': 'string',
'Status': 'string',
'SubscriptionCreationTime': 'string',
'SourceType': 'string',
'SourceIdsList': [
'string',
],
'EventCategoriesList': [
'string',
],
'Enabled': True|False,
'EventSubscriptionArn': 'string'
},
]
}
**Response Structure**
- *(dict) --*
- **Marker** *(string) --*
An optional pagination token provided by a previous DescribeOrderableDBInstanceOptions request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by ``MaxRecords`` .
- **EventSubscriptionsList** *(list) --*
A list of EventSubscriptions data types.
- *(dict) --*
Contains the results of a successful invocation of the DescribeEventSubscriptions action.
- **CustomerAwsId** *(string) --*
The AWS customer account associated with the event notification subscription.
- **CustSubscriptionId** *(string) --*
The event notification subscription Id.
- **SnsTopicArn** *(string) --*
The topic ARN of the event notification subscription.
- **Status** *(string) --*
The status of the event notification subscription.
Constraints:
Can be one of the following: creating | modifying | deleting | active | no-permission | topic-not-exist
The status "no-permission" indicates that Neptune no longer has permission to post to the SNS topic. The status "topic-not-exist" indicates that the topic was deleted after the subscription was created.
- **SubscriptionCreationTime** *(string) --*
The time the event notification subscription was created.
- **SourceType** *(string) --*
The source type for the event notification subscription.
- **SourceIdsList** *(list) --*
A list of source IDs for the event notification subscription.
- *(string) --*
- **EventCategoriesList** *(list) --*
A list of event categories for the event notification subscription.
- *(string) --*
- **Enabled** *(boolean) --*
A Boolean value indicating if the subscription is enabled. True indicates the subscription is enabled.
- **EventSubscriptionArn** *(string) --*
The Amazon Resource Name (ARN) for the event subscription.
:type SubscriptionName: string
:param SubscriptionName:
The name of the event notification subscription you want to describe.
:type Filters: list
:param Filters:
This parameter is not currently supported.
- *(dict) --*
This type is not currently supported.
- **Name** *(string) --* **[REQUIRED]**
This parameter is not currently supported.
- **Values** *(list) --* **[REQUIRED]**
This parameter is not currently supported.
- *(string) --*
:type MaxRecords: integer
:param MaxRecords:
The maximum number of records to include in the response. If more records exist than the specified ``MaxRecords`` value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.
Default: 100
Constraints: Minimum 20, maximum 100.
:type Marker: string
:param Marker:
An optional pagination token provided by a previous DescribeOrderableDBInstanceOptions request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by ``MaxRecords`` .
:rtype: dict
:returns:
"""
pass
def describe_events(self, SourceIdentifier: str = None, SourceType: str = None, StartTime: datetime = None, EndTime: datetime = None, Duration: int = None, EventCategories: List = None, Filters: List = None, MaxRecords: int = None, Marker: str = None) -> Dict:
"""
Returns events related to DB instances, DB security groups, DB snapshots, and DB parameter groups for the past 14 days. Events specific to a particular DB instance, DB security group, database snapshot, or DB parameter group can be obtained by providing the name as a parameter. By default, the past hour of events are returned.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeEvents>`_
**Request Syntax**
::
response = client.describe_events(
SourceIdentifier='string',
SourceType='db-instance'|'db-parameter-group'|'db-security-group'|'db-snapshot'|'db-cluster'|'db-cluster-snapshot',
StartTime=datetime(2015, 1, 1),
EndTime=datetime(2015, 1, 1),
Duration=123,
EventCategories=[
'string',
],
Filters=[
{
'Name': 'string',
'Values': [
'string',
]
},
],
MaxRecords=123,
Marker='string'
)
**Response Syntax**
::
{
'Marker': 'string',
'Events': [
{
'SourceIdentifier': 'string',
'SourceType': 'db-instance'|'db-parameter-group'|'db-security-group'|'db-snapshot'|'db-cluster'|'db-cluster-snapshot',
'Message': 'string',
'EventCategories': [
'string',
],
'Date': datetime(2015, 1, 1),
'SourceArn': 'string'
},
]
}
**Response Structure**
- *(dict) --*
- **Marker** *(string) --*
An optional pagination token provided by a previous Events request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by ``MaxRecords`` .
- **Events** *(list) --*
A list of Event instances.
- *(dict) --*
This data type is used as a response element in the DescribeEvents action.
- **SourceIdentifier** *(string) --*
Provides the identifier for the source of the event.
- **SourceType** *(string) --*
Specifies the source type for this event.
- **Message** *(string) --*
Provides the text of this event.
- **EventCategories** *(list) --*
Specifies the category for the event.
- *(string) --*
- **Date** *(datetime) --*
Specifies the date and time of the event.
- **SourceArn** *(string) --*
The Amazon Resource Name (ARN) for the event.
:type SourceIdentifier: string
:param SourceIdentifier:
The identifier of the event source for which events are returned. If not specified, then all sources are included in the response.
Constraints:
* If SourceIdentifier is supplied, SourceType must also be provided.
* If the source type is ``DBInstance`` , then a ``DBInstanceIdentifier`` must be supplied.
* If the source type is ``DBSecurityGroup`` , a ``DBSecurityGroupName`` must be supplied.
* If the source type is ``DBParameterGroup`` , a ``DBParameterGroupName`` must be supplied.
* If the source type is ``DBSnapshot`` , a ``DBSnapshotIdentifier`` must be supplied.
* Cannot end with a hyphen or contain two consecutive hyphens.
:type SourceType: string
:param SourceType:
The event source to retrieve events for. If no value is specified, all events are returned.
:type StartTime: datetime
:param StartTime:
The beginning of the time interval to retrieve events for, specified in ISO 8601 format. For more information about ISO 8601, go to the `ISO8601 Wikipedia page. <http://en.wikipedia.org/wiki/ISO_8601>`__
Example: 2009-07-08T18:00Z
:type EndTime: datetime
:param EndTime:
The end of the time interval for which to retrieve events, specified in ISO 8601 format. For more information about ISO 8601, go to the `ISO8601 Wikipedia page. <http://en.wikipedia.org/wiki/ISO_8601>`__
Example: 2009-07-08T18:00Z
:type Duration: integer
:param Duration:
The number of minutes to retrieve events for.
Default: 60
:type EventCategories: list
:param EventCategories:
A list of event categories that trigger notifications for a event notification subscription.
- *(string) --*
:type Filters: list
:param Filters:
This parameter is not currently supported.
- *(dict) --*
This type is not currently supported.
- **Name** *(string) --* **[REQUIRED]**
This parameter is not currently supported.
- **Values** *(list) --* **[REQUIRED]**
This parameter is not currently supported.
- *(string) --*
:type MaxRecords: integer
:param MaxRecords:
The maximum number of records to include in the response. If more records exist than the specified ``MaxRecords`` value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.
Default: 100
Constraints: Minimum 20, maximum 100.
:type Marker: string
:param Marker:
An optional pagination token provided by a previous DescribeEvents request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by ``MaxRecords`` .
:rtype: dict
:returns:
"""
pass
def describe_orderable_db_instance_options(self, Engine: str, EngineVersion: str = None, DBInstanceClass: str = None, LicenseModel: str = None, Vpc: bool = None, Filters: List = None, MaxRecords: int = None, Marker: str = None) -> Dict:
"""
Returns a list of orderable DB instance options for the specified engine.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeOrderableDBInstanceOptions>`_
**Request Syntax**
::
response = client.describe_orderable_db_instance_options(
Engine='string',
EngineVersion='string',
DBInstanceClass='string',
LicenseModel='string',
Vpc=True|False,
Filters=[
{
'Name': 'string',
'Values': [
'string',
]
},
],
MaxRecords=123,
Marker='string'
)
**Response Syntax**
::
{
'OrderableDBInstanceOptions': [
{
'Engine': 'string',
'EngineVersion': 'string',
'DBInstanceClass': 'string',
'LicenseModel': 'string',
'AvailabilityZones': [
{
'Name': 'string'
},
],
'MultiAZCapable': True|False,
'ReadReplicaCapable': True|False,
'Vpc': True|False,
'SupportsStorageEncryption': True|False,
'StorageType': 'string',
'SupportsIops': True|False,
'SupportsEnhancedMonitoring': True|False,
'SupportsIAMDatabaseAuthentication': True|False,
'SupportsPerformanceInsights': True|False,
'MinStorageSize': 123,
'MaxStorageSize': 123,
'MinIopsPerDbInstance': 123,
'MaxIopsPerDbInstance': 123,
'MinIopsPerGib': 123.0,
'MaxIopsPerGib': 123.0
},
],
'Marker': 'string'
}
**Response Structure**
- *(dict) --*
- **OrderableDBInstanceOptions** *(list) --*
An OrderableDBInstanceOption structure containing information about orderable options for the DB instance.
- *(dict) --*
Contains a list of available options for a DB instance.
This data type is used as a response element in the DescribeOrderableDBInstanceOptions action.
- **Engine** *(string) --*
The engine type of a DB instance.
- **EngineVersion** *(string) --*
The engine version of a DB instance.
- **DBInstanceClass** *(string) --*
The DB instance class for a DB instance.
- **LicenseModel** *(string) --*
The license model for a DB instance.
- **AvailabilityZones** *(list) --*
A list of Availability Zones for a DB instance.
- *(dict) --*
Specifies an Availability Zone.
- **Name** *(string) --*
The name of the availability zone.
- **MultiAZCapable** *(boolean) --*
Indicates whether a DB instance is Multi-AZ capable.
- **ReadReplicaCapable** *(boolean) --*
Indicates whether a DB instance can have a Read Replica.
- **Vpc** *(boolean) --*
Indicates whether a DB instance is in a VPC.
- **SupportsStorageEncryption** *(boolean) --*
Indicates whether a DB instance supports encrypted storage.
- **StorageType** *(string) --*
Indicates the storage type for a DB instance.
- **SupportsIops** *(boolean) --*
Indicates whether a DB instance supports provisioned IOPS.
- **SupportsEnhancedMonitoring** *(boolean) --*
Indicates whether a DB instance supports Enhanced Monitoring at intervals from 1 to 60 seconds.
- **SupportsIAMDatabaseAuthentication** *(boolean) --*
Indicates whether a DB instance supports IAM database authentication.
- **SupportsPerformanceInsights** *(boolean) --*
True if a DB instance supports Performance Insights, otherwise false.
- **MinStorageSize** *(integer) --*
Minimum storage size for a DB instance.
- **MaxStorageSize** *(integer) --*
Maximum storage size for a DB instance.
- **MinIopsPerDbInstance** *(integer) --*
Minimum total provisioned IOPS for a DB instance.
- **MaxIopsPerDbInstance** *(integer) --*
Maximum total provisioned IOPS for a DB instance.
- **MinIopsPerGib** *(float) --*
Minimum provisioned IOPS per GiB for a DB instance.
- **MaxIopsPerGib** *(float) --*
Maximum provisioned IOPS per GiB for a DB instance.
- **Marker** *(string) --*
An optional pagination token provided by a previous OrderableDBInstanceOptions request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by ``MaxRecords`` .
:type Engine: string
:param Engine: **[REQUIRED]**
The name of the engine to retrieve DB instance options for.
:type EngineVersion: string
:param EngineVersion:
The engine version filter value. Specify this parameter to show only the available offerings matching the specified engine version.
:type DBInstanceClass: string
:param DBInstanceClass:
The DB instance class filter value. Specify this parameter to show only the available offerings matching the specified DB instance class.
:type LicenseModel: string
:param LicenseModel:
The license model filter value. Specify this parameter to show only the available offerings matching the specified license model.
:type Vpc: boolean
:param Vpc:
The VPC filter value. Specify this parameter to show only the available VPC or non-VPC offerings.
:type Filters: list
:param Filters:
This parameter is not currently supported.
- *(dict) --*
This type is not currently supported.
- **Name** *(string) --* **[REQUIRED]**
This parameter is not currently supported.
- **Values** *(list) --* **[REQUIRED]**
This parameter is not currently supported.
- *(string) --*
:type MaxRecords: integer
:param MaxRecords:
The maximum number of records to include in the response. If more records exist than the specified ``MaxRecords`` value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.
Default: 100
Constraints: Minimum 20, maximum 100.
:type Marker: string
:param Marker:
An optional pagination token provided by a previous DescribeOrderableDBInstanceOptions request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by ``MaxRecords`` .
:rtype: dict
:returns:
"""
pass
def describe_pending_maintenance_actions(self, ResourceIdentifier: str = None, Filters: List = None, Marker: str = None, MaxRecords: int = None) -> Dict:
"""
Returns a list of resources (for example, DB instances) that have at least one pending maintenance action.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribePendingMaintenanceActions>`_
**Request Syntax**
::
response = client.describe_pending_maintenance_actions(
ResourceIdentifier='string',
Filters=[
{
'Name': 'string',
'Values': [
'string',
]
},
],
Marker='string',
MaxRecords=123
)
**Response Syntax**
::
{
'PendingMaintenanceActions': [
{
'ResourceIdentifier': 'string',
'PendingMaintenanceActionDetails': [
{
'Action': 'string',
'AutoAppliedAfterDate': datetime(2015, 1, 1),
'ForcedApplyDate': datetime(2015, 1, 1),
'OptInStatus': 'string',
'CurrentApplyDate': datetime(2015, 1, 1),
'Description': 'string'
},
]
},
],
'Marker': 'string'
}
**Response Structure**
- *(dict) --*
- **PendingMaintenanceActions** *(list) --*
A list of the pending maintenance actions for the resource.
- *(dict) --*
Describes the pending maintenance actions for a resource.
- **ResourceIdentifier** *(string) --*
The ARN of the resource that has pending maintenance actions.
- **PendingMaintenanceActionDetails** *(list) --*
A list that provides details about the pending maintenance actions for the resource.
- *(dict) --*
Provides information about a pending maintenance action for a resource.
- **Action** *(string) --*
The type of pending maintenance action that is available for the resource.
- **AutoAppliedAfterDate** *(datetime) --*
The date of the maintenance window when the action is applied. The maintenance action is applied to the resource during its first maintenance window after this date. If this date is specified, any ``next-maintenance`` opt-in requests are ignored.
- **ForcedApplyDate** *(datetime) --*
The date when the maintenance action is automatically applied. The maintenance action is applied to the resource on this date regardless of the maintenance window for the resource. If this date is specified, any ``immediate`` opt-in requests are ignored.
- **OptInStatus** *(string) --*
Indicates the type of opt-in request that has been received for the resource.
- **CurrentApplyDate** *(datetime) --*
The effective date when the pending maintenance action is applied to the resource. This date takes into account opt-in requests received from the ApplyPendingMaintenanceAction API, the ``AutoAppliedAfterDate`` , and the ``ForcedApplyDate`` . This value is blank if an opt-in request has not been received and nothing has been specified as ``AutoAppliedAfterDate`` or ``ForcedApplyDate`` .
- **Description** *(string) --*
A description providing more detail about the maintenance action.
- **Marker** *(string) --*
An optional pagination token provided by a previous ``DescribePendingMaintenanceActions`` request. If this parameter is specified, the response includes only records beyond the marker, up to a number of records specified by ``MaxRecords`` .
:type ResourceIdentifier: string
:param ResourceIdentifier:
The ARN of a resource to return pending maintenance actions for.
:type Filters: list
:param Filters:
A filter that specifies one or more resources to return pending maintenance actions for.
Supported filters:
* ``db-cluster-id`` - Accepts DB cluster identifiers and DB cluster Amazon Resource Names (ARNs). The results list will only include pending maintenance actions for the DB clusters identified by these ARNs.
* ``db-instance-id`` - Accepts DB instance identifiers and DB instance ARNs. The results list will only include pending maintenance actions for the DB instances identified by these ARNs.
- *(dict) --*
This type is not currently supported.
- **Name** *(string) --* **[REQUIRED]**
This parameter is not currently supported.
- **Values** *(list) --* **[REQUIRED]**
This parameter is not currently supported.
- *(string) --*
:type Marker: string
:param Marker:
An optional pagination token provided by a previous ``DescribePendingMaintenanceActions`` request. If this parameter is specified, the response includes only records beyond the marker, up to a number of records specified by ``MaxRecords`` .
:type MaxRecords: integer
:param MaxRecords:
The maximum number of records to include in the response. If more records exist than the specified ``MaxRecords`` value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.
Default: 100
Constraints: Minimum 20, maximum 100.
:rtype: dict
:returns:
"""
pass
def describe_valid_db_instance_modifications(self, DBInstanceIdentifier: str) -> Dict:
"""
You can call DescribeValidDBInstanceModifications to learn what modifications you can make to your DB instance. You can use this information when you call ModifyDBInstance .
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeValidDBInstanceModifications>`_
**Request Syntax**
::
response = client.describe_valid_db_instance_modifications(
DBInstanceIdentifier='string'
)
**Response Syntax**
::
{
'ValidDBInstanceModificationsMessage': {
'Storage': [
{
'StorageType': 'string',
'StorageSize': [
{
'From': 123,
'To': 123,
'Step': 123
},
],
'ProvisionedIops': [
{
'From': 123,
'To': 123,
'Step': 123
},
],
'IopsToStorageRatio': [
{
'From': 123.0,
'To': 123.0
},
]
},
]
}
}
**Response Structure**
- *(dict) --*
- **ValidDBInstanceModificationsMessage** *(dict) --*
Information about valid modifications that you can make to your DB instance. Contains the result of a successful call to the DescribeValidDBInstanceModifications action. You can use this information when you call ModifyDBInstance .
- **Storage** *(list) --*
Valid storage options for your DB instance.
- *(dict) --*
Information about valid modifications that you can make to your DB instance.
Contains the result of a successful call to the DescribeValidDBInstanceModifications action.
- **StorageType** *(string) --*
The valid storage types for your DB instance. For example, gp2, io1.
- **StorageSize** *(list) --*
The valid range of storage in gibibytes. For example, 100 to 16384.
- *(dict) --*
A range of integer values.
- **From** *(integer) --*
The minimum value in the range.
- **To** *(integer) --*
The maximum value in the range.
- **Step** *(integer) --*
The step value for the range. For example, if you have a range of 5,000 to 10,000, with a step value of 1,000, the valid values start at 5,000 and step up by 1,000. Even though 7,500 is within the range, it isn't a valid value for the range. The valid values are 5,000, 6,000, 7,000, 8,000...
- **ProvisionedIops** *(list) --*
The valid range of provisioned IOPS. For example, 1000-20000.
- *(dict) --*
A range of integer values.
- **From** *(integer) --*
The minimum value in the range.
- **To** *(integer) --*
The maximum value in the range.
- **Step** *(integer) --*
The step value for the range. For example, if you have a range of 5,000 to 10,000, with a step value of 1,000, the valid values start at 5,000 and step up by 1,000. Even though 7,500 is within the range, it isn't a valid value for the range. The valid values are 5,000, 6,000, 7,000, 8,000...
- **IopsToStorageRatio** *(list) --*
The valid range of Provisioned IOPS to gibibytes of storage multiplier. For example, 3-10, which means that provisioned IOPS can be between 3 and 10 times storage.
- *(dict) --*
A range of double values.
- **From** *(float) --*
The minimum value in the range.
- **To** *(float) --*
The maximum value in the range.
:type DBInstanceIdentifier: string
:param DBInstanceIdentifier: **[REQUIRED]**
The customer identifier or the ARN of your DB instance.
:rtype: dict
:returns:
"""
pass
def failover_db_cluster(self, DBClusterIdentifier: str = None, TargetDBInstanceIdentifier: str = None) -> Dict:
"""
Forces a failover for a DB cluster.
A failover for a DB cluster promotes one of the Read Replicas (read-only instances) in the DB cluster to be the primary instance (the cluster writer).
Amazon Neptune will automatically fail over to a Read Replica, if one exists, when the primary instance fails. You can force a failover when you want to simulate a failure of a primary instance for testing. Because each instance in a DB cluster has its own endpoint address, you will need to clean up and re-establish any existing connections that use those endpoint addresses when the failover is complete.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/FailoverDBCluster>`_
**Request Syntax**
::
response = client.failover_db_cluster(
DBClusterIdentifier='string',
TargetDBInstanceIdentifier='string'
)
**Response Syntax**
::
{
'DBCluster': {
'AllocatedStorage': 123,
'AvailabilityZones': [
'string',
],
'BackupRetentionPeriod': 123,
'CharacterSetName': 'string',
'DatabaseName': 'string',
'DBClusterIdentifier': 'string',
'DBClusterParameterGroup': 'string',
'DBSubnetGroup': 'string',
'Status': 'string',
'PercentProgress': 'string',
'EarliestRestorableTime': datetime(2015, 1, 1),
'Endpoint': 'string',
'ReaderEndpoint': 'string',
'MultiAZ': True|False,
'Engine': 'string',
'EngineVersion': 'string',
'LatestRestorableTime': datetime(2015, 1, 1),
'Port': 123,
'MasterUsername': 'string',
'DBClusterOptionGroupMemberships': [
{
'DBClusterOptionGroupName': 'string',
'Status': 'string'
},
],
'PreferredBackupWindow': 'string',
'PreferredMaintenanceWindow': 'string',
'ReplicationSourceIdentifier': 'string',
'ReadReplicaIdentifiers': [
'string',
],
'DBClusterMembers': [
{
'DBInstanceIdentifier': 'string',
'IsClusterWriter': True|False,
'DBClusterParameterGroupStatus': 'string',
'PromotionTier': 123
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'HostedZoneId': 'string',
'StorageEncrypted': True|False,
'KmsKeyId': 'string',
'DbClusterResourceId': 'string',
'DBClusterArn': 'string',
'AssociatedRoles': [
{
'RoleArn': 'string',
'Status': 'string'
},
],
'IAMDatabaseAuthenticationEnabled': True|False,
'CloneGroupId': 'string',
'ClusterCreateTime': datetime(2015, 1, 1)
}
}
**Response Structure**
- *(dict) --*
- **DBCluster** *(dict) --*
Contains the details of an Amazon Neptune DB cluster.
This data type is used as a response element in the DescribeDBClusters action.
- **AllocatedStorage** *(integer) --*
``AllocatedStorage`` always returns 1, because Neptune DB cluster storage size is not fixed, but instead automatically adjusts as needed.
- **AvailabilityZones** *(list) --*
Provides the list of EC2 Availability Zones that instances in the DB cluster can be created in.
- *(string) --*
- **BackupRetentionPeriod** *(integer) --*
Specifies the number of days for which automatic DB snapshots are retained.
- **CharacterSetName** *(string) --*
If present, specifies the name of the character set that this cluster is associated with.
- **DatabaseName** *(string) --*
Contains the name of the initial database of this DB cluster that was provided at create time, if one was specified when the DB cluster was created. This same name is returned for the life of the DB cluster.
- **DBClusterIdentifier** *(string) --*
Contains a user-supplied DB cluster identifier. This identifier is the unique key that identifies a DB cluster.
- **DBClusterParameterGroup** *(string) --*
Specifies the name of the DB cluster parameter group for the DB cluster.
- **DBSubnetGroup** *(string) --*
Specifies information on the subnet group associated with the DB cluster, including the name, description, and subnets in the subnet group.
- **Status** *(string) --*
Specifies the current state of this DB cluster.
- **PercentProgress** *(string) --*
Specifies the progress of the operation as a percentage.
- **EarliestRestorableTime** *(datetime) --*
Specifies the earliest time to which a database can be restored with point-in-time restore.
- **Endpoint** *(string) --*
Specifies the connection endpoint for the primary instance of the DB cluster.
- **ReaderEndpoint** *(string) --*
The reader endpoint for the DB cluster. The reader endpoint for a DB cluster load-balances connections across the Read Replicas that are available in a DB cluster. As clients request new connections to the reader endpoint, Neptune distributes the connection requests among the Read Replicas in the DB cluster. This functionality can help balance your read workload across multiple Read Replicas in your DB cluster.
If a failover occurs, and the Read Replica that you are connected to is promoted to be the primary instance, your connection is dropped. To continue sending your read workload to other Read Replicas in the cluster, you can then reconnect to the reader endpoint.
- **MultiAZ** *(boolean) --*
Specifies whether the DB cluster has instances in multiple Availability Zones.
- **Engine** *(string) --*
Provides the name of the database engine to be used for this DB cluster.
- **EngineVersion** *(string) --*
Indicates the database engine version.
- **LatestRestorableTime** *(datetime) --*
Specifies the latest time to which a database can be restored with point-in-time restore.
- **Port** *(integer) --*
Specifies the port that the database engine is listening on.
- **MasterUsername** *(string) --*
Contains the master username for the DB cluster.
- **DBClusterOptionGroupMemberships** *(list) --*
Provides the list of option group memberships for this DB cluster.
- *(dict) --*
Contains status information for a DB cluster option group.
- **DBClusterOptionGroupName** *(string) --*
Specifies the name of the DB cluster option group.
- **Status** *(string) --*
Specifies the status of the DB cluster option group.
- **PreferredBackupWindow** *(string) --*
Specifies the daily time range during which automated backups are created if automated backups are enabled, as determined by the ``BackupRetentionPeriod`` .
- **PreferredMaintenanceWindow** *(string) --*
Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
- **ReplicationSourceIdentifier** *(string) --*
Not supported by Neptune.
- **ReadReplicaIdentifiers** *(list) --*
Contains one or more identifiers of the Read Replicas associated with this DB cluster.
- *(string) --*
- **DBClusterMembers** *(list) --*
Provides the list of instances that make up the DB cluster.
- *(dict) --*
Contains information about an instance that is part of a DB cluster.
- **DBInstanceIdentifier** *(string) --*
Specifies the instance identifier for this member of the DB cluster.
- **IsClusterWriter** *(boolean) --*
Value that is ``true`` if the cluster member is the primary instance for the DB cluster and ``false`` otherwise.
- **DBClusterParameterGroupStatus** *(string) --*
Specifies the status of the DB cluster parameter group for this member of the DB cluster.
- **PromotionTier** *(integer) --*
A value that specifies the order in which a Read Replica is promoted to the primary instance after a failure of the existing primary instance.
- **VpcSecurityGroups** *(list) --*
Provides a list of VPC security groups that the DB cluster belongs to.
- *(dict) --*
This data type is used as a response element for queries on VPC security group membership.
- **VpcSecurityGroupId** *(string) --*
The name of the VPC security group.
- **Status** *(string) --*
The status of the VPC security group.
- **HostedZoneId** *(string) --*
Specifies the ID that Amazon Route 53 assigns when you create a hosted zone.
- **StorageEncrypted** *(boolean) --*
Specifies whether the DB cluster is encrypted.
- **KmsKeyId** *(string) --*
If ``StorageEncrypted`` is true, the AWS KMS key identifier for the encrypted DB cluster.
- **DbClusterResourceId** *(string) --*
The AWS Region-unique, immutable identifier for the DB cluster. This identifier is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB cluster is accessed.
- **DBClusterArn** *(string) --*
The Amazon Resource Name (ARN) for the DB cluster.
- **AssociatedRoles** *(list) --*
Provides a list of the AWS Identity and Access Management (IAM) roles that are associated with the DB cluster. IAM roles that are associated with a DB cluster grant permission for the DB cluster to access other AWS services on your behalf.
- *(dict) --*
Describes an AWS Identity and Access Management (IAM) role that is associated with a DB cluster.
- **RoleArn** *(string) --*
The Amazon Resource Name (ARN) of the IAM role that is associated with the DB cluster.
- **Status** *(string) --*
Describes the state of association between the IAM role and the DB cluster. The Status property returns one of the following values:
* ``ACTIVE`` - the IAM role ARN is associated with the DB cluster and can be used to access other AWS services on your behalf.
* ``PENDING`` - the IAM role ARN is being associated with the DB cluster.
* ``INVALID`` - the IAM role ARN is associated with the DB cluster, but the DB cluster is unable to assume the IAM role in order to access other AWS services on your behalf.
- **IAMDatabaseAuthenticationEnabled** *(boolean) --*
True if mapping of AWS Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false.
- **CloneGroupId** *(string) --*
Identifies the clone group to which the DB cluster is associated.
- **ClusterCreateTime** *(datetime) --*
Specifies the time when the DB cluster was created, in Universal Coordinated Time (UTC).
:type DBClusterIdentifier: string
:param DBClusterIdentifier:
A DB cluster identifier to force a failover for. This parameter is not case-sensitive.
Constraints:
* Must match the identifier of an existing DBCluster.
:type TargetDBInstanceIdentifier: string
:param TargetDBInstanceIdentifier:
The name of the instance to promote to the primary instance.
You must specify the instance identifier for an Read Replica in the DB cluster. For example, ``mydbcluster-replica1`` .
:rtype: dict
:returns:
"""
pass
def generate_presigned_url(self, ClientMethod: str = None, Params: Dict = None, ExpiresIn: int = None, HttpMethod: str = 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
``ClientMethod``.
:type ExpiresIn: int
:param ExpiresIn: The number of seconds the presigned url is valid
for. By default it expires in an hour (3600 seconds)
:type HttpMethod: string
:param HttpMethod: The http method to use on the generated url. By
default, the http method is whatever is used in the method\'s model.
:returns: The presigned url
"""
pass
def get_paginator(self, operation_name: str = None) -> Paginator:
"""
Create a paginator for an operation.
:type operation_name: string
:param operation_name: The operation name. This is the same name
as the method name on the client. For example, if the
method name is ``create_foo``, and you\'d normally invoke the
operation as ``client.create_foo(**kwargs)``, if the
``create_foo`` operation can be paginated, you can use the
call ``client.get_paginator(\"create_foo\")``.
:raise OperationNotPageableError: Raised if the operation is not
pageable. You can use the ``client.can_paginate`` method to
check if an operation is pageable.
:rtype: L{botocore.paginate.Paginator}
:return: A paginator object.
"""
pass
def get_waiter(self, waiter_name: str = None) -> Waiter:
"""
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
section of the service docs for a list of available waiters.
:returns: The specified waiter object.
:rtype: botocore.waiter.Waiter
"""
pass
def list_tags_for_resource(self, ResourceName: str, Filters: List = None) -> Dict:
"""
Lists all tags on an Amazon Neptune resource.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ListTagsForResource>`_
**Request Syntax**
::
response = client.list_tags_for_resource(
ResourceName='string',
Filters=[
{
'Name': 'string',
'Values': [
'string',
]
},
]
)
**Response Syntax**
::
{
'TagList': [
{
'Key': 'string',
'Value': 'string'
},
]
}
**Response Structure**
- *(dict) --*
- **TagList** *(list) --*
List of tags returned by the ListTagsForResource operation.
- *(dict) --*
Metadata assigned to an Amazon Neptune resource consisting of a key-value pair.
- **Key** *(string) --*
A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can't be prefixed with "aws:" or "rds:". The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$").
- **Value** *(string) --*
A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can't be prefixed with "aws:" or "rds:". The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$").
:type ResourceName: string
:param ResourceName: **[REQUIRED]**
The Amazon Neptune resource with tags to be listed. This value is an Amazon Resource Name (ARN). For information about creating an ARN, see `Constructing an Amazon Resource Name (ARN) <https://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html#tagging.ARN.Constructing>`__ .
:type Filters: list
:param Filters:
This parameter is not currently supported.
- *(dict) --*
This type is not currently supported.
- **Name** *(string) --* **[REQUIRED]**
This parameter is not currently supported.
- **Values** *(list) --* **[REQUIRED]**
This parameter is not currently supported.
- *(string) --*
:rtype: dict
:returns:
"""
pass
def modify_db_cluster(self, DBClusterIdentifier: str, NewDBClusterIdentifier: str = None, ApplyImmediately: bool = None, BackupRetentionPeriod: int = None, DBClusterParameterGroupName: str = None, VpcSecurityGroupIds: List = None, Port: int = None, MasterUserPassword: str = None, OptionGroupName: str = None, PreferredBackupWindow: str = None, PreferredMaintenanceWindow: str = None, EnableIAMDatabaseAuthentication: bool = None, EngineVersion: str = None) -> Dict:
"""
Modify a setting for a DB cluster. You can change one or more database configuration parameters by specifying these parameters and the new values in the request.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ModifyDBCluster>`_
**Request Syntax**
::
response = client.modify_db_cluster(
DBClusterIdentifier='string',
NewDBClusterIdentifier='string',
ApplyImmediately=True|False,
BackupRetentionPeriod=123,
DBClusterParameterGroupName='string',
VpcSecurityGroupIds=[
'string',
],
Port=123,
MasterUserPassword='string',
OptionGroupName='string',
PreferredBackupWindow='string',
PreferredMaintenanceWindow='string',
EnableIAMDatabaseAuthentication=True|False,
EngineVersion='string'
)
**Response Syntax**
::
{
'DBCluster': {
'AllocatedStorage': 123,
'AvailabilityZones': [
'string',
],
'BackupRetentionPeriod': 123,
'CharacterSetName': 'string',
'DatabaseName': 'string',
'DBClusterIdentifier': 'string',
'DBClusterParameterGroup': 'string',
'DBSubnetGroup': 'string',
'Status': 'string',
'PercentProgress': 'string',
'EarliestRestorableTime': datetime(2015, 1, 1),
'Endpoint': 'string',
'ReaderEndpoint': 'string',
'MultiAZ': True|False,
'Engine': 'string',
'EngineVersion': 'string',
'LatestRestorableTime': datetime(2015, 1, 1),
'Port': 123,
'MasterUsername': 'string',
'DBClusterOptionGroupMemberships': [
{
'DBClusterOptionGroupName': 'string',
'Status': 'string'
},
],
'PreferredBackupWindow': 'string',
'PreferredMaintenanceWindow': 'string',
'ReplicationSourceIdentifier': 'string',
'ReadReplicaIdentifiers': [
'string',
],
'DBClusterMembers': [
{
'DBInstanceIdentifier': 'string',
'IsClusterWriter': True|False,
'DBClusterParameterGroupStatus': 'string',
'PromotionTier': 123
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'HostedZoneId': 'string',
'StorageEncrypted': True|False,
'KmsKeyId': 'string',
'DbClusterResourceId': 'string',
'DBClusterArn': 'string',
'AssociatedRoles': [
{
'RoleArn': 'string',
'Status': 'string'
},
],
'IAMDatabaseAuthenticationEnabled': True|False,
'CloneGroupId': 'string',
'ClusterCreateTime': datetime(2015, 1, 1)
}
}
**Response Structure**
- *(dict) --*
- **DBCluster** *(dict) --*
Contains the details of an Amazon Neptune DB cluster.
This data type is used as a response element in the DescribeDBClusters action.
- **AllocatedStorage** *(integer) --*
``AllocatedStorage`` always returns 1, because Neptune DB cluster storage size is not fixed, but instead automatically adjusts as needed.
- **AvailabilityZones** *(list) --*
Provides the list of EC2 Availability Zones that instances in the DB cluster can be created in.
- *(string) --*
- **BackupRetentionPeriod** *(integer) --*
Specifies the number of days for which automatic DB snapshots are retained.
- **CharacterSetName** *(string) --*
If present, specifies the name of the character set that this cluster is associated with.
- **DatabaseName** *(string) --*
Contains the name of the initial database of this DB cluster that was provided at create time, if one was specified when the DB cluster was created. This same name is returned for the life of the DB cluster.
- **DBClusterIdentifier** *(string) --*
Contains a user-supplied DB cluster identifier. This identifier is the unique key that identifies a DB cluster.
- **DBClusterParameterGroup** *(string) --*
Specifies the name of the DB cluster parameter group for the DB cluster.
- **DBSubnetGroup** *(string) --*
Specifies information on the subnet group associated with the DB cluster, including the name, description, and subnets in the subnet group.
- **Status** *(string) --*
Specifies the current state of this DB cluster.
- **PercentProgress** *(string) --*
Specifies the progress of the operation as a percentage.
- **EarliestRestorableTime** *(datetime) --*
Specifies the earliest time to which a database can be restored with point-in-time restore.
- **Endpoint** *(string) --*
Specifies the connection endpoint for the primary instance of the DB cluster.
- **ReaderEndpoint** *(string) --*
The reader endpoint for the DB cluster. The reader endpoint for a DB cluster load-balances connections across the Read Replicas that are available in a DB cluster. As clients request new connections to the reader endpoint, Neptune distributes the connection requests among the Read Replicas in the DB cluster. This functionality can help balance your read workload across multiple Read Replicas in your DB cluster.
If a failover occurs, and the Read Replica that you are connected to is promoted to be the primary instance, your connection is dropped. To continue sending your read workload to other Read Replicas in the cluster, you can then reconnect to the reader endpoint.
- **MultiAZ** *(boolean) --*
Specifies whether the DB cluster has instances in multiple Availability Zones.
- **Engine** *(string) --*
Provides the name of the database engine to be used for this DB cluster.
- **EngineVersion** *(string) --*
Indicates the database engine version.
- **LatestRestorableTime** *(datetime) --*
Specifies the latest time to which a database can be restored with point-in-time restore.
- **Port** *(integer) --*
Specifies the port that the database engine is listening on.
- **MasterUsername** *(string) --*
Contains the master username for the DB cluster.
- **DBClusterOptionGroupMemberships** *(list) --*
Provides the list of option group memberships for this DB cluster.
- *(dict) --*
Contains status information for a DB cluster option group.
- **DBClusterOptionGroupName** *(string) --*
Specifies the name of the DB cluster option group.
- **Status** *(string) --*
Specifies the status of the DB cluster option group.
- **PreferredBackupWindow** *(string) --*
Specifies the daily time range during which automated backups are created if automated backups are enabled, as determined by the ``BackupRetentionPeriod`` .
- **PreferredMaintenanceWindow** *(string) --*
Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
- **ReplicationSourceIdentifier** *(string) --*
Not supported by Neptune.
- **ReadReplicaIdentifiers** *(list) --*
Contains one or more identifiers of the Read Replicas associated with this DB cluster.
- *(string) --*
- **DBClusterMembers** *(list) --*
Provides the list of instances that make up the DB cluster.
- *(dict) --*
Contains information about an instance that is part of a DB cluster.
- **DBInstanceIdentifier** *(string) --*
Specifies the instance identifier for this member of the DB cluster.
- **IsClusterWriter** *(boolean) --*
Value that is ``true`` if the cluster member is the primary instance for the DB cluster and ``false`` otherwise.
- **DBClusterParameterGroupStatus** *(string) --*
Specifies the status of the DB cluster parameter group for this member of the DB cluster.
- **PromotionTier** *(integer) --*
A value that specifies the order in which a Read Replica is promoted to the primary instance after a failure of the existing primary instance.
- **VpcSecurityGroups** *(list) --*
Provides a list of VPC security groups that the DB cluster belongs to.
- *(dict) --*
This data type is used as a response element for queries on VPC security group membership.
- **VpcSecurityGroupId** *(string) --*
The name of the VPC security group.
- **Status** *(string) --*
The status of the VPC security group.
- **HostedZoneId** *(string) --*
Specifies the ID that Amazon Route 53 assigns when you create a hosted zone.
- **StorageEncrypted** *(boolean) --*
Specifies whether the DB cluster is encrypted.
- **KmsKeyId** *(string) --*
If ``StorageEncrypted`` is true, the AWS KMS key identifier for the encrypted DB cluster.
- **DbClusterResourceId** *(string) --*
The AWS Region-unique, immutable identifier for the DB cluster. This identifier is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB cluster is accessed.
- **DBClusterArn** *(string) --*
The Amazon Resource Name (ARN) for the DB cluster.
- **AssociatedRoles** *(list) --*
Provides a list of the AWS Identity and Access Management (IAM) roles that are associated with the DB cluster. IAM roles that are associated with a DB cluster grant permission for the DB cluster to access other AWS services on your behalf.
- *(dict) --*
Describes an AWS Identity and Access Management (IAM) role that is associated with a DB cluster.
- **RoleArn** *(string) --*
The Amazon Resource Name (ARN) of the IAM role that is associated with the DB cluster.
- **Status** *(string) --*
Describes the state of association between the IAM role and the DB cluster. The Status property returns one of the following values:
* ``ACTIVE`` - the IAM role ARN is associated with the DB cluster and can be used to access other AWS services on your behalf.
* ``PENDING`` - the IAM role ARN is being associated with the DB cluster.
* ``INVALID`` - the IAM role ARN is associated with the DB cluster, but the DB cluster is unable to assume the IAM role in order to access other AWS services on your behalf.
- **IAMDatabaseAuthenticationEnabled** *(boolean) --*
True if mapping of AWS Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false.
- **CloneGroupId** *(string) --*
Identifies the clone group to which the DB cluster is associated.
- **ClusterCreateTime** *(datetime) --*
Specifies the time when the DB cluster was created, in Universal Coordinated Time (UTC).
:type DBClusterIdentifier: string
:param DBClusterIdentifier: **[REQUIRED]**
The DB cluster identifier for the cluster being modified. This parameter is not case-sensitive.
Constraints:
* Must match the identifier of an existing DBCluster.
:type NewDBClusterIdentifier: string
:param NewDBClusterIdentifier:
The new DB cluster identifier for the DB cluster when renaming a DB cluster. This value is stored as a lowercase string.
Constraints:
* Must contain from 1 to 63 letters, numbers, or hyphens
* The first character must be a letter
* Cannot end with a hyphen or contain two consecutive hyphens
Example: ``my-cluster2``
:type ApplyImmediately: boolean
:param ApplyImmediately:
A value that specifies whether the modifications in this request and any pending modifications are asynchronously applied as soon as possible, regardless of the ``PreferredMaintenanceWindow`` setting for the DB cluster. If this parameter is set to ``false`` , changes to the DB cluster are applied during the next maintenance window.
The ``ApplyImmediately`` parameter only affects the ``NewDBClusterIdentifier`` and ``MasterUserPassword`` values. If you set the ``ApplyImmediately`` parameter value to false, then changes to the ``NewDBClusterIdentifier`` and ``MasterUserPassword`` values are applied during the next maintenance window. All other changes are applied immediately, regardless of the value of the ``ApplyImmediately`` parameter.
Default: ``false``
:type BackupRetentionPeriod: integer
:param BackupRetentionPeriod:
The number of days for which automated backups are retained. You must specify a minimum value of 1.
Default: 1
Constraints:
* Must be a value from 1 to 35
:type DBClusterParameterGroupName: string
:param DBClusterParameterGroupName:
The name of the DB cluster parameter group to use for the DB cluster.
:type VpcSecurityGroupIds: list
:param VpcSecurityGroupIds:
A list of VPC security groups that the DB cluster will belong to.
- *(string) --*
:type Port: integer
:param Port:
The port number on which the DB cluster accepts connections.
Constraints: Value must be ``1150-65535``
Default: The same port as the original DB cluster.
:type MasterUserPassword: string
:param MasterUserPassword:
The new password for the master database user. This password can contain any printable ASCII character except \"/\", \"\"\", or \"@\".
Constraints: Must contain from 8 to 41 characters.
:type OptionGroupName: string
:param OptionGroupName:
A value that indicates that the DB cluster should be associated with the specified option group. Changing this parameter doesn\'t result in an outage except in the following case, and the change is applied during the next maintenance window unless the ``ApplyImmediately`` parameter is set to ``true`` for this request. If the parameter change results in an option group that enables OEM, this change can cause a brief (sub-second) period during which new connections are rejected but existing connections are not interrupted.
Permanent options can\'t be removed from an option group. The option group can\'t be removed from a DB cluster once it is associated with a DB cluster.
:type PreferredBackupWindow: string
:param PreferredBackupWindow:
The daily time range during which automated backups are created if automated backups are enabled, using the ``BackupRetentionPeriod`` parameter.
The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region.
Constraints:
* Must be in the format ``hh24:mi-hh24:mi`` .
* Must be in Universal Coordinated Time (UTC).
* Must not conflict with the preferred maintenance window.
* Must be at least 30 minutes.
:type PreferredMaintenanceWindow: string
:param PreferredMaintenanceWindow:
The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
Format: ``ddd:hh24:mi-ddd:hh24:mi``
The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region, occurring on a random day of the week.
Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun.
Constraints: Minimum 30-minute window.
:type EnableIAMDatabaseAuthentication: boolean
:param EnableIAMDatabaseAuthentication:
True to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts, and otherwise false.
Default: ``false``
:type EngineVersion: string
:param EngineVersion:
The version number of the database engine to which you want to upgrade. Changing this parameter results in an outage. The change is applied during the next maintenance window unless the ApplyImmediately parameter is set to true.
For a list of valid engine versions, see CreateDBInstance , or call DescribeDBEngineVersions .
:rtype: dict
:returns:
"""
pass
def modify_db_cluster_parameter_group(self, DBClusterParameterGroupName: str, Parameters: List) -> Dict:
"""
Modifies the parameters of a DB cluster parameter group. To modify more than one parameter, submit a list of the following: ``ParameterName`` , ``ParameterValue`` , and ``ApplyMethod`` . A maximum of 20 parameters can be modified in a single request.
.. note::
Changes to dynamic parameters are applied immediately. Changes to static parameters require a reboot without failover to the DB cluster associated with the parameter group before the change can take effect.
.. warning::
After you create a DB cluster parameter group, you should wait at least 5 minutes before creating your first DB cluster that uses that DB cluster parameter group as the default parameter group. This allows Amazon Neptune to fully complete the create action before the parameter group is used as the default for a new DB cluster. This is especially important for parameters that are critical when creating the default database for a DB cluster, such as the character set for the default database defined by the ``character_set_database`` parameter. You can use the *Parameter Groups* option of the Amazon Neptune console or the DescribeDBClusterParameters command to verify that your DB cluster parameter group has been created or modified.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ModifyDBClusterParameterGroup>`_
**Request Syntax**
::
response = client.modify_db_cluster_parameter_group(
DBClusterParameterGroupName='string',
Parameters=[
{
'ParameterName': 'string',
'ParameterValue': 'string',
'Description': 'string',
'Source': 'string',
'ApplyType': 'string',
'DataType': 'string',
'AllowedValues': 'string',
'IsModifiable': True|False,
'MinimumEngineVersion': 'string',
'ApplyMethod': 'immediate'|'pending-reboot'
},
]
)
**Response Syntax**
::
{
'DBClusterParameterGroupName': 'string'
}
**Response Structure**
- *(dict) --*
- **DBClusterParameterGroupName** *(string) --*
The name of the DB cluster parameter group.
Constraints:
* Must be 1 to 255 letters or numbers.
* First character must be a letter
* Cannot end with a hyphen or contain two consecutive hyphens
.. note::
This value is stored as a lowercase string.
:type DBClusterParameterGroupName: string
:param DBClusterParameterGroupName: **[REQUIRED]**
The name of the DB cluster parameter group to modify.
:type Parameters: list
:param Parameters: **[REQUIRED]**
A list of parameters in the DB cluster parameter group to modify.
- *(dict) --*
Specifies a parameter.
- **ParameterName** *(string) --*
Specifies the name of the parameter.
- **ParameterValue** *(string) --*
Specifies the value of the parameter.
- **Description** *(string) --*
Provides a description of the parameter.
- **Source** *(string) --*
Indicates the source of the parameter value.
- **ApplyType** *(string) --*
Specifies the engine specific parameters type.
- **DataType** *(string) --*
Specifies the valid data type for the parameter.
- **AllowedValues** *(string) --*
Specifies the valid range of values for the parameter.
- **IsModifiable** *(boolean) --*
Indicates whether (``true`` ) or not (``false`` ) the parameter can be modified. Some parameters have security or operational implications that prevent them from being changed.
- **MinimumEngineVersion** *(string) --*
The earliest engine version to which the parameter can apply.
- **ApplyMethod** *(string) --*
Indicates when to apply parameter updates.
:rtype: dict
:returns:
"""
pass
def modify_db_cluster_snapshot_attribute(self, DBClusterSnapshotIdentifier: str, AttributeName: str, ValuesToAdd: List = None, ValuesToRemove: List = None) -> Dict:
"""
Adds an attribute and values to, or removes an attribute and values from, a manual DB cluster snapshot.
To share a manual DB cluster snapshot with other AWS accounts, specify ``restore`` as the ``AttributeName`` and use the ``ValuesToAdd`` parameter to add a list of IDs of the AWS accounts that are authorized to restore the manual DB cluster snapshot. Use the value ``all`` to make the manual DB cluster snapshot public, which means that it can be copied or restored by all AWS accounts. Do not add the ``all`` value for any manual DB cluster snapshots that contain private information that you don't want available to all AWS accounts. If a manual DB cluster snapshot is encrypted, it can be shared, but only by specifying a list of authorized AWS account IDs for the ``ValuesToAdd`` parameter. You can't use ``all`` as a value for that parameter in this case.
To view which AWS accounts have access to copy or restore a manual DB cluster snapshot, or whether a manual DB cluster snapshot public or private, use the DescribeDBClusterSnapshotAttributes API action.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ModifyDBClusterSnapshotAttribute>`_
**Request Syntax**
::
response = client.modify_db_cluster_snapshot_attribute(
DBClusterSnapshotIdentifier='string',
AttributeName='string',
ValuesToAdd=[
'string',
],
ValuesToRemove=[
'string',
]
)
**Response Syntax**
::
{
'DBClusterSnapshotAttributesResult': {
'DBClusterSnapshotIdentifier': 'string',
'DBClusterSnapshotAttributes': [
{
'AttributeName': 'string',
'AttributeValues': [
'string',
]
},
]
}
}
**Response Structure**
- *(dict) --*
- **DBClusterSnapshotAttributesResult** *(dict) --*
Contains the results of a successful call to the DescribeDBClusterSnapshotAttributes API action.
Manual DB cluster snapshot attributes are used to authorize other AWS accounts to copy or restore a manual DB cluster snapshot. For more information, see the ModifyDBClusterSnapshotAttribute API action.
- **DBClusterSnapshotIdentifier** *(string) --*
The identifier of the manual DB cluster snapshot that the attributes apply to.
- **DBClusterSnapshotAttributes** *(list) --*
The list of attributes and values for the manual DB cluster snapshot.
- *(dict) --*
Contains the name and values of a manual DB cluster snapshot attribute.
Manual DB cluster snapshot attributes are used to authorize other AWS accounts to restore a manual DB cluster snapshot. For more information, see the ModifyDBClusterSnapshotAttribute API action.
- **AttributeName** *(string) --*
The name of the manual DB cluster snapshot attribute.
The attribute named ``restore`` refers to the list of AWS accounts that have permission to copy or restore the manual DB cluster snapshot. For more information, see the ModifyDBClusterSnapshotAttribute API action.
- **AttributeValues** *(list) --*
The value(s) for the manual DB cluster snapshot attribute.
If the ``AttributeName`` field is set to ``restore`` , then this element returns a list of IDs of the AWS accounts that are authorized to copy or restore the manual DB cluster snapshot. If a value of ``all`` is in the list, then the manual DB cluster snapshot is public and available for any AWS account to copy or restore.
- *(string) --*
:type DBClusterSnapshotIdentifier: string
:param DBClusterSnapshotIdentifier: **[REQUIRED]**
The identifier for the DB cluster snapshot to modify the attributes for.
:type AttributeName: string
:param AttributeName: **[REQUIRED]**
The name of the DB cluster snapshot attribute to modify.
To manage authorization for other AWS accounts to copy or restore a manual DB cluster snapshot, set this value to ``restore`` .
:type ValuesToAdd: list
:param ValuesToAdd:
A list of DB cluster snapshot attributes to add to the attribute specified by ``AttributeName`` .
To authorize other AWS accounts to copy or restore a manual DB cluster snapshot, set this list to include one or more AWS account IDs, or ``all`` to make the manual DB cluster snapshot restorable by any AWS account. Do not add the ``all`` value for any manual DB cluster snapshots that contain private information that you don\'t want available to all AWS accounts.
- *(string) --*
:type ValuesToRemove: list
:param ValuesToRemove:
A list of DB cluster snapshot attributes to remove from the attribute specified by ``AttributeName`` .
To remove authorization for other AWS accounts to copy or restore a manual DB cluster snapshot, set this list to include one or more AWS account identifiers, or ``all`` to remove authorization for any AWS account to copy or restore the DB cluster snapshot. If you specify ``all`` , an AWS account whose account ID is explicitly added to the ``restore`` attribute can still copy or restore a manual DB cluster snapshot.
- *(string) --*
:rtype: dict
:returns:
"""
pass
def modify_db_instance(self, DBInstanceIdentifier: str, AllocatedStorage: int = None, DBInstanceClass: str = None, DBSubnetGroupName: str = None, DBSecurityGroups: List = None, VpcSecurityGroupIds: List = None, ApplyImmediately: bool = None, MasterUserPassword: str = None, DBParameterGroupName: str = None, BackupRetentionPeriod: int = None, PreferredBackupWindow: str = None, PreferredMaintenanceWindow: str = None, MultiAZ: bool = None, EngineVersion: str = None, AllowMajorVersionUpgrade: bool = None, AutoMinorVersionUpgrade: bool = None, LicenseModel: str = None, Iops: int = None, OptionGroupName: str = None, NewDBInstanceIdentifier: str = None, StorageType: str = None, TdeCredentialArn: str = None, TdeCredentialPassword: str = None, CACertificateIdentifier: str = None, Domain: str = None, CopyTagsToSnapshot: bool = None, MonitoringInterval: int = None, DBPortNumber: int = None, PubliclyAccessible: bool = None, MonitoringRoleArn: str = None, DomainIAMRoleName: str = None, PromotionTier: int = None, EnableIAMDatabaseAuthentication: bool = None, EnablePerformanceInsights: bool = None, PerformanceInsightsKMSKeyId: str = None, CloudwatchLogsExportConfiguration: Dict = None) -> Dict:
"""
Modifies settings for a DB instance. You can change one or more database configuration parameters by specifying these parameters and the new values in the request. To learn what modifications you can make to your DB instance, call DescribeValidDBInstanceModifications before you call ModifyDBInstance .
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ModifyDBInstance>`_
**Request Syntax**
::
response = client.modify_db_instance(
DBInstanceIdentifier='string',
AllocatedStorage=123,
DBInstanceClass='string',
DBSubnetGroupName='string',
DBSecurityGroups=[
'string',
],
VpcSecurityGroupIds=[
'string',
],
ApplyImmediately=True|False,
MasterUserPassword='string',
DBParameterGroupName='string',
BackupRetentionPeriod=123,
PreferredBackupWindow='string',
PreferredMaintenanceWindow='string',
MultiAZ=True|False,
EngineVersion='string',
AllowMajorVersionUpgrade=True|False,
AutoMinorVersionUpgrade=True|False,
LicenseModel='string',
Iops=123,
OptionGroupName='string',
NewDBInstanceIdentifier='string',
StorageType='string',
TdeCredentialArn='string',
TdeCredentialPassword='string',
CACertificateIdentifier='string',
Domain='string',
CopyTagsToSnapshot=True|False,
MonitoringInterval=123,
DBPortNumber=123,
PubliclyAccessible=True|False,
MonitoringRoleArn='string',
DomainIAMRoleName='string',
PromotionTier=123,
EnableIAMDatabaseAuthentication=True|False,
EnablePerformanceInsights=True|False,
PerformanceInsightsKMSKeyId='string',
CloudwatchLogsExportConfiguration={
'EnableLogTypes': [
'string',
],
'DisableLogTypes': [
'string',
]
}
)
**Response Syntax**
::
{
'DBInstance': {
'DBInstanceIdentifier': 'string',
'DBInstanceClass': 'string',
'Engine': 'string',
'DBInstanceStatus': 'string',
'MasterUsername': 'string',
'DBName': 'string',
'Endpoint': {
'Address': 'string',
'Port': 123,
'HostedZoneId': 'string'
},
'AllocatedStorage': 123,
'InstanceCreateTime': datetime(2015, 1, 1),
'PreferredBackupWindow': 'string',
'BackupRetentionPeriod': 123,
'DBSecurityGroups': [
{
'DBSecurityGroupName': 'string',
'Status': 'string'
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'DBParameterGroups': [
{
'DBParameterGroupName': 'string',
'ParameterApplyStatus': 'string'
},
],
'AvailabilityZone': 'string',
'DBSubnetGroup': {
'DBSubnetGroupName': 'string',
'DBSubnetGroupDescription': 'string',
'VpcId': 'string',
'SubnetGroupStatus': 'string',
'Subnets': [
{
'SubnetIdentifier': 'string',
'SubnetAvailabilityZone': {
'Name': 'string'
},
'SubnetStatus': 'string'
},
],
'DBSubnetGroupArn': 'string'
},
'PreferredMaintenanceWindow': 'string',
'PendingModifiedValues': {
'DBInstanceClass': 'string',
'AllocatedStorage': 123,
'MasterUserPassword': 'string',
'Port': 123,
'BackupRetentionPeriod': 123,
'MultiAZ': True|False,
'EngineVersion': 'string',
'LicenseModel': 'string',
'Iops': 123,
'DBInstanceIdentifier': 'string',
'StorageType': 'string',
'CACertificateIdentifier': 'string',
'DBSubnetGroupName': 'string',
'PendingCloudwatchLogsExports': {
'LogTypesToEnable': [
'string',
],
'LogTypesToDisable': [
'string',
]
}
},
'LatestRestorableTime': datetime(2015, 1, 1),
'MultiAZ': True|False,
'EngineVersion': 'string',
'AutoMinorVersionUpgrade': True|False,
'ReadReplicaSourceDBInstanceIdentifier': 'string',
'ReadReplicaDBInstanceIdentifiers': [
'string',
],
'ReadReplicaDBClusterIdentifiers': [
'string',
],
'LicenseModel': 'string',
'Iops': 123,
'OptionGroupMemberships': [
{
'OptionGroupName': 'string',
'Status': 'string'
},
],
'CharacterSetName': 'string',
'SecondaryAvailabilityZone': 'string',
'PubliclyAccessible': True|False,
'StatusInfos': [
{
'StatusType': 'string',
'Normal': True|False,
'Status': 'string',
'Message': 'string'
},
],
'StorageType': 'string',
'TdeCredentialArn': 'string',
'DbInstancePort': 123,
'DBClusterIdentifier': 'string',
'StorageEncrypted': True|False,
'KmsKeyId': 'string',
'DbiResourceId': 'string',
'CACertificateIdentifier': 'string',
'DomainMemberships': [
{
'Domain': 'string',
'Status': 'string',
'FQDN': 'string',
'IAMRoleName': 'string'
},
],
'CopyTagsToSnapshot': True|False,
'MonitoringInterval': 123,
'EnhancedMonitoringResourceArn': 'string',
'MonitoringRoleArn': 'string',
'PromotionTier': 123,
'DBInstanceArn': 'string',
'Timezone': 'string',
'IAMDatabaseAuthenticationEnabled': True|False,
'PerformanceInsightsEnabled': True|False,
'PerformanceInsightsKMSKeyId': 'string',
'EnabledCloudwatchLogsExports': [
'string',
]
}
}
**Response Structure**
- *(dict) --*
- **DBInstance** *(dict) --*
Contains the details of an Amazon Neptune DB instance.
This data type is used as a response element in the DescribeDBInstances action.
- **DBInstanceIdentifier** *(string) --*
Contains a user-supplied database identifier. This identifier is the unique key that identifies a DB instance.
- **DBInstanceClass** *(string) --*
Contains the name of the compute and memory capacity class of the DB instance.
- **Engine** *(string) --*
Provides the name of the database engine to be used for this DB instance.
- **DBInstanceStatus** *(string) --*
Specifies the current state of this database.
- **MasterUsername** *(string) --*
Contains the master username for the DB instance.
- **DBName** *(string) --*
The database name.
- **Endpoint** *(dict) --*
Specifies the connection endpoint.
- **Address** *(string) --*
Specifies the DNS address of the DB instance.
- **Port** *(integer) --*
Specifies the port that the database engine is listening on.
- **HostedZoneId** *(string) --*
Specifies the ID that Amazon Route 53 assigns when you create a hosted zone.
- **AllocatedStorage** *(integer) --*
Specifies the allocated storage size specified in gibibytes.
- **InstanceCreateTime** *(datetime) --*
Provides the date and time the DB instance was created.
- **PreferredBackupWindow** *(string) --*
Specifies the daily time range during which automated backups are created if automated backups are enabled, as determined by the ``BackupRetentionPeriod`` .
- **BackupRetentionPeriod** *(integer) --*
Specifies the number of days for which automatic DB snapshots are retained.
- **DBSecurityGroups** *(list) --*
Provides List of DB security group elements containing only ``DBSecurityGroup.Name`` and ``DBSecurityGroup.Status`` subelements.
- *(dict) --*
Specifies membership in a designated DB security group.
- **DBSecurityGroupName** *(string) --*
The name of the DB security group.
- **Status** *(string) --*
The status of the DB security group.
- **VpcSecurityGroups** *(list) --*
Provides a list of VPC security group elements that the DB instance belongs to.
- *(dict) --*
This data type is used as a response element for queries on VPC security group membership.
- **VpcSecurityGroupId** *(string) --*
The name of the VPC security group.
- **Status** *(string) --*
The status of the VPC security group.
- **DBParameterGroups** *(list) --*
Provides the list of DB parameter groups applied to this DB instance.
- *(dict) --*
The status of the DB parameter group.
This data type is used as a response element in the following actions:
* CreateDBInstance
* DeleteDBInstance
* ModifyDBInstance
* RebootDBInstance
- **DBParameterGroupName** *(string) --*
The name of the DP parameter group.
- **ParameterApplyStatus** *(string) --*
The status of parameter updates.
- **AvailabilityZone** *(string) --*
Specifies the name of the Availability Zone the DB instance is located in.
- **DBSubnetGroup** *(dict) --*
Specifies information on the subnet group associated with the DB instance, including the name, description, and subnets in the subnet group.
- **DBSubnetGroupName** *(string) --*
The name of the DB subnet group.
- **DBSubnetGroupDescription** *(string) --*
Provides the description of the DB subnet group.
- **VpcId** *(string) --*
Provides the VpcId of the DB subnet group.
- **SubnetGroupStatus** *(string) --*
Provides the status of the DB subnet group.
- **Subnets** *(list) --*
Contains a list of Subnet elements.
- *(dict) --*
Specifies a subnet.
This data type is used as a response element in the DescribeDBSubnetGroups action.
- **SubnetIdentifier** *(string) --*
Specifies the identifier of the subnet.
- **SubnetAvailabilityZone** *(dict) --*
Specifies the EC2 Availability Zone that the subnet is in.
- **Name** *(string) --*
The name of the availability zone.
- **SubnetStatus** *(string) --*
Specifies the status of the subnet.
- **DBSubnetGroupArn** *(string) --*
The Amazon Resource Name (ARN) for the DB subnet group.
- **PreferredMaintenanceWindow** *(string) --*
Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
- **PendingModifiedValues** *(dict) --*
Specifies that changes to the DB instance are pending. This element is only included when changes are pending. Specific changes are identified by subelements.
- **DBInstanceClass** *(string) --*
Contains the new ``DBInstanceClass`` for the DB instance that will be applied or is currently being applied.
- **AllocatedStorage** *(integer) --*
Contains the new ``AllocatedStorage`` size for the DB instance that will be applied or is currently being applied.
- **MasterUserPassword** *(string) --*
Contains the pending or currently-in-progress change of the master credentials for the DB instance.
- **Port** *(integer) --*
Specifies the pending port for the DB instance.
- **BackupRetentionPeriod** *(integer) --*
Specifies the pending number of days for which automated backups are retained.
- **MultiAZ** *(boolean) --*
Indicates that the Single-AZ DB instance is to change to a Multi-AZ deployment.
- **EngineVersion** *(string) --*
Indicates the database engine version.
- **LicenseModel** *(string) --*
The license model for the DB instance.
Valid values: ``license-included`` | ``bring-your-own-license`` | ``general-public-license``
- **Iops** *(integer) --*
Specifies the new Provisioned IOPS value for the DB instance that will be applied or is currently being applied.
- **DBInstanceIdentifier** *(string) --*
Contains the new ``DBInstanceIdentifier`` for the DB instance that will be applied or is currently being applied.
- **StorageType** *(string) --*
Specifies the storage type to be associated with the DB instance.
- **CACertificateIdentifier** *(string) --*
Specifies the identifier of the CA certificate for the DB instance.
- **DBSubnetGroupName** *(string) --*
The new DB subnet group for the DB instance.
- **PendingCloudwatchLogsExports** *(dict) --*
Specifies the CloudWatch logs to be exported.
- **LogTypesToEnable** *(list) --*
Log types that are in the process of being deactivated. After they are deactivated, these log types aren't exported to CloudWatch Logs.
- *(string) --*
- **LogTypesToDisable** *(list) --*
Log types that are in the process of being enabled. After they are enabled, these log types are exported to CloudWatch Logs.
- *(string) --*
- **LatestRestorableTime** *(datetime) --*
Specifies the latest time to which a database can be restored with point-in-time restore.
- **MultiAZ** *(boolean) --*
Specifies if the DB instance is a Multi-AZ deployment.
- **EngineVersion** *(string) --*
Indicates the database engine version.
- **AutoMinorVersionUpgrade** *(boolean) --*
Indicates that minor version patches are applied automatically.
- **ReadReplicaSourceDBInstanceIdentifier** *(string) --*
Contains the identifier of the source DB instance if this DB instance is a Read Replica.
- **ReadReplicaDBInstanceIdentifiers** *(list) --*
Contains one or more identifiers of the Read Replicas associated with this DB instance.
- *(string) --*
- **ReadReplicaDBClusterIdentifiers** *(list) --*
Contains one or more identifiers of DB clusters that are Read Replicas of this DB instance.
- *(string) --*
- **LicenseModel** *(string) --*
License model information for this DB instance.
- **Iops** *(integer) --*
Specifies the Provisioned IOPS (I/O operations per second) value.
- **OptionGroupMemberships** *(list) --*
Provides the list of option group memberships for this DB instance.
- *(dict) --*
Provides information on the option groups the DB instance is a member of.
- **OptionGroupName** *(string) --*
The name of the option group that the instance belongs to.
- **Status** *(string) --*
The status of the DB instance's option group membership. Valid values are: ``in-sync`` , ``pending-apply`` , ``pending-removal`` , ``pending-maintenance-apply`` , ``pending-maintenance-removal`` , ``applying`` , ``removing`` , and ``failed`` .
- **CharacterSetName** *(string) --*
If present, specifies the name of the character set that this instance is associated with.
- **SecondaryAvailabilityZone** *(string) --*
If present, specifies the name of the secondary Availability Zone for a DB instance with multi-AZ support.
- **PubliclyAccessible** *(boolean) --*
This flag should no longer be used.
- **StatusInfos** *(list) --*
The status of a Read Replica. If the instance is not a Read Replica, this is blank.
- *(dict) --*
Provides a list of status information for a DB instance.
- **StatusType** *(string) --*
This value is currently "read replication."
- **Normal** *(boolean) --*
Boolean value that is true if the instance is operating normally, or false if the instance is in an error state.
- **Status** *(string) --*
Status of the DB instance. For a StatusType of read replica, the values can be replicating, error, stopped, or terminated.
- **Message** *(string) --*
Details of the error if there is an error for the instance. If the instance is not in an error state, this value is blank.
- **StorageType** *(string) --*
Specifies the storage type associated with DB instance.
- **TdeCredentialArn** *(string) --*
The ARN from the key store with which the instance is associated for TDE encryption.
- **DbInstancePort** *(integer) --*
Specifies the port that the DB instance listens on. If the DB instance is part of a DB cluster, this can be a different port than the DB cluster port.
- **DBClusterIdentifier** *(string) --*
If the DB instance is a member of a DB cluster, contains the name of the DB cluster that the DB instance is a member of.
- **StorageEncrypted** *(boolean) --*
Not supported: The encryption for DB instances is managed by the DB cluster.
- **KmsKeyId** *(string) --*
Not supported: The encryption for DB instances is managed by the DB cluster.
- **DbiResourceId** *(string) --*
The AWS Region-unique, immutable identifier for the DB instance. This identifier is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB instance is accessed.
- **CACertificateIdentifier** *(string) --*
The identifier of the CA certificate for this DB instance.
- **DomainMemberships** *(list) --*
Not supported
- *(dict) --*
An Active Directory Domain membership record associated with a DB instance.
- **Domain** *(string) --*
The identifier of the Active Directory Domain.
- **Status** *(string) --*
The status of the DB instance's Active Directory Domain membership, such as joined, pending-join, failed etc).
- **FQDN** *(string) --*
The fully qualified domain name of the Active Directory Domain.
- **IAMRoleName** *(string) --*
The name of the IAM role to be used when making API calls to the Directory Service.
- **CopyTagsToSnapshot** *(boolean) --*
Specifies whether tags are copied from the DB instance to snapshots of the DB instance.
- **MonitoringInterval** *(integer) --*
The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance.
- **EnhancedMonitoringResourceArn** *(string) --*
The Amazon Resource Name (ARN) of the Amazon CloudWatch Logs log stream that receives the Enhanced Monitoring metrics data for the DB instance.
- **MonitoringRoleArn** *(string) --*
The ARN for the IAM role that permits Neptune to send Enhanced Monitoring metrics to Amazon CloudWatch Logs.
- **PromotionTier** *(integer) --*
A value that specifies the order in which a Read Replica is promoted to the primary instance after a failure of the existing primary instance.
- **DBInstanceArn** *(string) --*
The Amazon Resource Name (ARN) for the DB instance.
- **Timezone** *(string) --*
Not supported.
- **IAMDatabaseAuthenticationEnabled** *(boolean) --*
True if AWS Identity and Access Management (IAM) authentication is enabled, and otherwise false.
- **PerformanceInsightsEnabled** *(boolean) --*
True if Performance Insights is enabled for the DB instance, and otherwise false.
- **PerformanceInsightsKMSKeyId** *(string) --*
The AWS KMS key identifier for encryption of Performance Insights data. The KMS key ID is the Amazon Resource Name (ARN), KMS key identifier, or the KMS key alias for the KMS encryption key.
- **EnabledCloudwatchLogsExports** *(list) --*
A list of log types that this DB instance is configured to export to CloudWatch Logs.
- *(string) --*
:type DBInstanceIdentifier: string
:param DBInstanceIdentifier: **[REQUIRED]**
The DB instance identifier. This value is stored as a lowercase string.
Constraints:
* Must match the identifier of an existing DBInstance.
:type AllocatedStorage: integer
:param AllocatedStorage:
The new amount of storage (in gibibytes) to allocate for the DB instance.
Not applicable. Storage is managed by the DB Cluster.
:type DBInstanceClass: string
:param DBInstanceClass:
The new compute and memory capacity of the DB instance, for example, ``db.m4.large`` . Not all DB instance classes are available in all AWS Regions.
If you modify the DB instance class, an outage occurs during the change. The change is applied during the next maintenance window, unless ``ApplyImmediately`` is specified as ``true`` for this request.
Default: Uses existing setting
:type DBSubnetGroupName: string
:param DBSubnetGroupName:
The new DB subnet group for the DB instance. You can use this parameter to move your DB instance to a different VPC.
Changing the subnet group causes an outage during the change. The change is applied during the next maintenance window, unless you specify ``true`` for the ``ApplyImmediately`` parameter.
Constraints: If supplied, must match the name of an existing DBSubnetGroup.
Example: ``mySubnetGroup``
:type DBSecurityGroups: list
:param DBSecurityGroups:
A list of DB security groups to authorize on this DB instance. Changing this setting doesn\'t result in an outage and the change is asynchronously applied as soon as possible.
Constraints:
* If supplied, must match existing DBSecurityGroups.
- *(string) --*
:type VpcSecurityGroupIds: list
:param VpcSecurityGroupIds:
A list of EC2 VPC security groups to authorize on this DB instance. This change is asynchronously applied as soon as possible.
Not applicable. The associated list of EC2 VPC security groups is managed by the DB cluster. For more information, see ModifyDBCluster .
Constraints:
* If supplied, must match existing VpcSecurityGroupIds.
- *(string) --*
:type ApplyImmediately: boolean
:param ApplyImmediately:
Specifies whether the modifications in this request and any pending modifications are asynchronously applied as soon as possible, regardless of the ``PreferredMaintenanceWindow`` setting for the DB instance.
If this parameter is set to ``false`` , changes to the DB instance are applied during the next maintenance window. Some parameter changes can cause an outage and are applied on the next call to RebootDBInstance , or the next failure reboot.
Default: ``false``
:type MasterUserPassword: string
:param MasterUserPassword:
Not applicable.
:type DBParameterGroupName: string
:param DBParameterGroupName:
The name of the DB parameter group to apply to the DB instance. Changing this setting doesn\'t result in an outage. The parameter group name itself is changed immediately, but the actual parameter changes are not applied until you reboot the instance without failover. The db instance will NOT be rebooted automatically and the parameter changes will NOT be applied during the next maintenance window.
Default: Uses existing setting
Constraints: The DB parameter group must be in the same DB parameter group family as this DB instance.
:type BackupRetentionPeriod: integer
:param BackupRetentionPeriod:
Not applicable. The retention period for automated backups is managed by the DB cluster. For more information, see ModifyDBCluster .
Default: Uses existing setting
:type PreferredBackupWindow: string
:param PreferredBackupWindow:
The daily time range during which automated backups are created if automated backups are enabled.
Not applicable. The daily time range for creating automated backups is managed by the DB cluster. For more information, see ModifyDBCluster .
Constraints:
* Must be in the format hh24:mi-hh24:mi
* Must be in Universal Time Coordinated (UTC)
* Must not conflict with the preferred maintenance window
* Must be at least 30 minutes
:type PreferredMaintenanceWindow: string
:param PreferredMaintenanceWindow:
The weekly time range (in UTC) during which system maintenance can occur, which might result in an outage. Changing this parameter doesn\'t result in an outage, except in the following situation, and the change is asynchronously applied as soon as possible. If there are pending actions that cause a reboot, and the maintenance window is changed to include the current time, then changing this parameter will cause a reboot of the DB instance. If moving this window to the current time, there must be at least 30 minutes between the current time and end of the window to ensure pending changes are applied.
Default: Uses existing setting
Format: ddd:hh24:mi-ddd:hh24:mi
Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun
Constraints: Must be at least 30 minutes
:type MultiAZ: boolean
:param MultiAZ:
Specifies if the DB instance is a Multi-AZ deployment. Changing this parameter doesn\'t result in an outage and the change is applied during the next maintenance window unless the ``ApplyImmediately`` parameter is set to ``true`` for this request.
:type EngineVersion: string
:param EngineVersion:
The version number of the database engine to upgrade to. Changing this parameter results in an outage and the change is applied during the next maintenance window unless the ``ApplyImmediately`` parameter is set to ``true`` for this request.
For major version upgrades, if a nondefault DB parameter group is currently in use, a new DB parameter group in the DB parameter group family for the new engine version must be specified. The new DB parameter group can be the default for that DB parameter group family.
:type AllowMajorVersionUpgrade: boolean
:param AllowMajorVersionUpgrade:
Indicates that major version upgrades are allowed. Changing this parameter doesn\'t result in an outage and the change is asynchronously applied as soon as possible.
Constraints: This parameter must be set to true when specifying a value for the EngineVersion parameter that is a different major version than the DB instance\'s current version.
:type AutoMinorVersionUpgrade: boolean
:param AutoMinorVersionUpgrade:
Indicates that minor version upgrades are applied automatically to the DB instance during the maintenance window. Changing this parameter doesn\'t result in an outage except in the following case and the change is asynchronously applied as soon as possible. An outage will result if this parameter is set to ``true`` during the maintenance window, and a newer minor version is available, and Neptune has enabled auto patching for that engine version.
:type LicenseModel: string
:param LicenseModel:
Not supported.
:type Iops: integer
:param Iops:
The new Provisioned IOPS (I/O operations per second) value for the instance.
Changing this setting doesn\'t result in an outage and the change is applied during the next maintenance window unless the ``ApplyImmediately`` parameter is set to ``true`` for this request.
Default: Uses existing setting
:type OptionGroupName: string
:param OptionGroupName:
Indicates that the DB instance should be associated with the specified option group. Changing this parameter doesn\'t result in an outage except in the following case and the change is applied during the next maintenance window unless the ``ApplyImmediately`` parameter is set to ``true`` for this request. If the parameter change results in an option group that enables OEM, this change can cause a brief (sub-second) period during which new connections are rejected but existing connections are not interrupted.
Permanent options, such as the TDE option for Oracle Advanced Security TDE, can\'t be removed from an option group, and that option group can\'t be removed from a DB instance once it is associated with a DB instance
:type NewDBInstanceIdentifier: string
:param NewDBInstanceIdentifier:
The new DB instance identifier for the DB instance when renaming a DB instance. When you change the DB instance identifier, an instance reboot will occur immediately if you set ``Apply Immediately`` to true, or will occur during the next maintenance window if ``Apply Immediately`` to false. This value is stored as a lowercase string.
Constraints:
* Must contain from 1 to 63 letters, numbers, or hyphens.
* The first character must be a letter.
* Cannot end with a hyphen or contain two consecutive hyphens.
Example: ``mydbinstance``
:type StorageType: string
:param StorageType:
Not supported.
:type TdeCredentialArn: string
:param TdeCredentialArn:
The ARN from the key store with which to associate the instance for TDE encryption.
:type TdeCredentialPassword: string
:param TdeCredentialPassword:
The password for the given ARN from the key store in order to access the device.
:type CACertificateIdentifier: string
:param CACertificateIdentifier:
Indicates the certificate that needs to be associated with the instance.
:type Domain: string
:param Domain:
Not supported.
:type CopyTagsToSnapshot: boolean
:param CopyTagsToSnapshot:
True to copy all tags from the DB instance to snapshots of the DB instance, and otherwise false. The default is false.
:type MonitoringInterval: integer
:param MonitoringInterval:
The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance. To disable collecting Enhanced Monitoring metrics, specify 0. The default is 0.
If ``MonitoringRoleArn`` is specified, then you must also set ``MonitoringInterval`` to a value other than 0.
Valid Values: ``0, 1, 5, 10, 15, 30, 60``
:type DBPortNumber: integer
:param DBPortNumber:
The port number on which the database accepts connections.
The value of the ``DBPortNumber`` parameter must not match any of the port values specified for options in the option group for the DB instance.
Your database will restart when you change the ``DBPortNumber`` value regardless of the value of the ``ApplyImmediately`` parameter.
Default: ``8182``
:type PubliclyAccessible: boolean
:param PubliclyAccessible:
This flag should no longer be used.
:type MonitoringRoleArn: string
:param MonitoringRoleArn:
The ARN for the IAM role that permits Neptune to send enhanced monitoring metrics to Amazon CloudWatch Logs. For example, ``arn:aws:iam:123456789012:role/emaccess`` .
If ``MonitoringInterval`` is set to a value other than 0, then you must supply a ``MonitoringRoleArn`` value.
:type DomainIAMRoleName: string
:param DomainIAMRoleName:
Not supported
:type PromotionTier: integer
:param PromotionTier:
A value that specifies the order in which a Read Replica is promoted to the primary instance after a failure of the existing primary instance.
Default: 1
Valid Values: 0 - 15
:type EnableIAMDatabaseAuthentication: boolean
:param EnableIAMDatabaseAuthentication:
True to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts, and otherwise false.
You can enable IAM database authentication for the following database engines
Not applicable. Mapping AWS IAM accounts to database accounts is managed by the DB cluster. For more information, see ModifyDBCluster .
Default: ``false``
:type EnablePerformanceInsights: boolean
:param EnablePerformanceInsights:
Not supported.
:type PerformanceInsightsKMSKeyId: string
:param PerformanceInsightsKMSKeyId:
Not supported.
:type CloudwatchLogsExportConfiguration: dict
:param CloudwatchLogsExportConfiguration:
The configuration setting for the log types to be enabled for export to CloudWatch Logs for a specific DB instance or DB cluster.
- **EnableLogTypes** *(list) --*
The list of log types to enable.
- *(string) --*
- **DisableLogTypes** *(list) --*
The list of log types to disable.
- *(string) --*
:rtype: dict
:returns:
"""
pass
def modify_db_parameter_group(self, DBParameterGroupName: str, Parameters: List) -> Dict:
"""
Modifies the parameters of a DB parameter group. To modify more than one parameter, submit a list of the following: ``ParameterName`` , ``ParameterValue`` , and ``ApplyMethod`` . A maximum of 20 parameters can be modified in a single request.
.. note::
Changes to dynamic parameters are applied immediately. Changes to static parameters require a reboot without failover to the DB instance associated with the parameter group before the change can take effect.
.. warning::
After you modify a DB parameter group, you should wait at least 5 minutes before creating your first DB instance that uses that DB parameter group as the default parameter group. This allows Amazon Neptune to fully complete the modify action before the parameter group is used as the default for a new DB instance. This is especially important for parameters that are critical when creating the default database for a DB instance, such as the character set for the default database defined by the ``character_set_database`` parameter. You can use the *Parameter Groups* option of the Amazon Neptune console or the *DescribeDBParameters* command to verify that your DB parameter group has been created or modified.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ModifyDBParameterGroup>`_
**Request Syntax**
::
response = client.modify_db_parameter_group(
DBParameterGroupName='string',
Parameters=[
{
'ParameterName': 'string',
'ParameterValue': 'string',
'Description': 'string',
'Source': 'string',
'ApplyType': 'string',
'DataType': 'string',
'AllowedValues': 'string',
'IsModifiable': True|False,
'MinimumEngineVersion': 'string',
'ApplyMethod': 'immediate'|'pending-reboot'
},
]
)
**Response Syntax**
::
{
'DBParameterGroupName': 'string'
}
**Response Structure**
- *(dict) --*
- **DBParameterGroupName** *(string) --*
Provides the name of the DB parameter group.
:type DBParameterGroupName: string
:param DBParameterGroupName: **[REQUIRED]**
The name of the DB parameter group.
Constraints:
* If supplied, must match the name of an existing DBParameterGroup.
:type Parameters: list
:param Parameters: **[REQUIRED]**
An array of parameter names, values, and the apply method for the parameter update. At least one parameter name, value, and apply method must be supplied; subsequent arguments are optional. A maximum of 20 parameters can be modified in a single request.
Valid Values (for the application method): ``immediate | pending-reboot``
.. note::
You can use the immediate value with dynamic parameters only. You can use the pending-reboot value for both dynamic and static parameters, and changes are applied when you reboot the DB instance without failover.
- *(dict) --*
Specifies a parameter.
- **ParameterName** *(string) --*
Specifies the name of the parameter.
- **ParameterValue** *(string) --*
Specifies the value of the parameter.
- **Description** *(string) --*
Provides a description of the parameter.
- **Source** *(string) --*
Indicates the source of the parameter value.
- **ApplyType** *(string) --*
Specifies the engine specific parameters type.
- **DataType** *(string) --*
Specifies the valid data type for the parameter.
- **AllowedValues** *(string) --*
Specifies the valid range of values for the parameter.
- **IsModifiable** *(boolean) --*
Indicates whether (``true`` ) or not (``false`` ) the parameter can be modified. Some parameters have security or operational implications that prevent them from being changed.
- **MinimumEngineVersion** *(string) --*
The earliest engine version to which the parameter can apply.
- **ApplyMethod** *(string) --*
Indicates when to apply parameter updates.
:rtype: dict
:returns:
"""
pass
def modify_db_subnet_group(self, DBSubnetGroupName: str, SubnetIds: List, DBSubnetGroupDescription: str = None) -> Dict:
"""
Modifies an existing DB subnet group. DB subnet groups must contain at least one subnet in at least two AZs in the AWS Region.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ModifyDBSubnetGroup>`_
**Request Syntax**
::
response = client.modify_db_subnet_group(
DBSubnetGroupName='string',
DBSubnetGroupDescription='string',
SubnetIds=[
'string',
]
)
**Response Syntax**
::
{
'DBSubnetGroup': {
'DBSubnetGroupName': 'string',
'DBSubnetGroupDescription': 'string',
'VpcId': 'string',
'SubnetGroupStatus': 'string',
'Subnets': [
{
'SubnetIdentifier': 'string',
'SubnetAvailabilityZone': {
'Name': 'string'
},
'SubnetStatus': 'string'
},
],
'DBSubnetGroupArn': 'string'
}
}
**Response Structure**
- *(dict) --*
- **DBSubnetGroup** *(dict) --*
Contains the details of an Amazon Neptune DB subnet group.
This data type is used as a response element in the DescribeDBSubnetGroups action.
- **DBSubnetGroupName** *(string) --*
The name of the DB subnet group.
- **DBSubnetGroupDescription** *(string) --*
Provides the description of the DB subnet group.
- **VpcId** *(string) --*
Provides the VpcId of the DB subnet group.
- **SubnetGroupStatus** *(string) --*
Provides the status of the DB subnet group.
- **Subnets** *(list) --*
Contains a list of Subnet elements.
- *(dict) --*
Specifies a subnet.
This data type is used as a response element in the DescribeDBSubnetGroups action.
- **SubnetIdentifier** *(string) --*
Specifies the identifier of the subnet.
- **SubnetAvailabilityZone** *(dict) --*
Specifies the EC2 Availability Zone that the subnet is in.
- **Name** *(string) --*
The name of the availability zone.
- **SubnetStatus** *(string) --*
Specifies the status of the subnet.
- **DBSubnetGroupArn** *(string) --*
The Amazon Resource Name (ARN) for the DB subnet group.
:type DBSubnetGroupName: string
:param DBSubnetGroupName: **[REQUIRED]**
The name for the DB subnet group. This value is stored as a lowercase string. You can\'t modify the default subnet group.
Constraints: Must match the name of an existing DBSubnetGroup. Must not be default.
Example: ``mySubnetgroup``
:type DBSubnetGroupDescription: string
:param DBSubnetGroupDescription:
The description for the DB subnet group.
:type SubnetIds: list
:param SubnetIds: **[REQUIRED]**
The EC2 subnet IDs for the DB subnet group.
- *(string) --*
:rtype: dict
:returns:
"""
pass
def modify_event_subscription(self, SubscriptionName: str, SnsTopicArn: str = None, SourceType: str = None, EventCategories: List = None, Enabled: bool = None) -> Dict:
"""
Modifies an existing event notification subscription. Note that you can't modify the source identifiers using this call; to change source identifiers for a subscription, use the AddSourceIdentifierToSubscription and RemoveSourceIdentifierFromSubscription calls.
You can see a list of the event categories for a given SourceType by using the **DescribeEventCategories** action.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ModifyEventSubscription>`_
**Request Syntax**
::
response = client.modify_event_subscription(
SubscriptionName='string',
SnsTopicArn='string',
SourceType='string',
EventCategories=[
'string',
],
Enabled=True|False
)
**Response Syntax**
::
{
'EventSubscription': {
'CustomerAwsId': 'string',
'CustSubscriptionId': 'string',
'SnsTopicArn': 'string',
'Status': 'string',
'SubscriptionCreationTime': 'string',
'SourceType': 'string',
'SourceIdsList': [
'string',
],
'EventCategoriesList': [
'string',
],
'Enabled': True|False,
'EventSubscriptionArn': 'string'
}
}
**Response Structure**
- *(dict) --*
- **EventSubscription** *(dict) --*
Contains the results of a successful invocation of the DescribeEventSubscriptions action.
- **CustomerAwsId** *(string) --*
The AWS customer account associated with the event notification subscription.
- **CustSubscriptionId** *(string) --*
The event notification subscription Id.
- **SnsTopicArn** *(string) --*
The topic ARN of the event notification subscription.
- **Status** *(string) --*
The status of the event notification subscription.
Constraints:
Can be one of the following: creating | modifying | deleting | active | no-permission | topic-not-exist
The status "no-permission" indicates that Neptune no longer has permission to post to the SNS topic. The status "topic-not-exist" indicates that the topic was deleted after the subscription was created.
- **SubscriptionCreationTime** *(string) --*
The time the event notification subscription was created.
- **SourceType** *(string) --*
The source type for the event notification subscription.
- **SourceIdsList** *(list) --*
A list of source IDs for the event notification subscription.
- *(string) --*
- **EventCategoriesList** *(list) --*
A list of event categories for the event notification subscription.
- *(string) --*
- **Enabled** *(boolean) --*
A Boolean value indicating if the subscription is enabled. True indicates the subscription is enabled.
- **EventSubscriptionArn** *(string) --*
The Amazon Resource Name (ARN) for the event subscription.
:type SubscriptionName: string
:param SubscriptionName: **[REQUIRED]**
The name of the event notification subscription.
:type SnsTopicArn: string
:param SnsTopicArn:
The Amazon Resource Name (ARN) of the SNS topic created for event notification. The ARN is created by Amazon SNS when you create a topic and subscribe to it.
:type SourceType: string
:param SourceType:
The type of source that is generating the events. For example, if you want to be notified of events generated by a DB instance, you would set this parameter to db-instance. if this value is not specified, all events are returned.
Valid values: db-instance | db-parameter-group | db-security-group | db-snapshot
:type EventCategories: list
:param EventCategories:
A list of event categories for a SourceType that you want to subscribe to. You can see a list of the categories for a given SourceType by using the **DescribeEventCategories** action.
- *(string) --*
:type Enabled: boolean
:param Enabled:
A Boolean value; set to **true** to activate the subscription.
:rtype: dict
:returns:
"""
pass
def promote_read_replica_db_cluster(self, DBClusterIdentifier: str) -> Dict:
"""
Not supported.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/PromoteReadReplicaDBCluster>`_
**Request Syntax**
::
response = client.promote_read_replica_db_cluster(
DBClusterIdentifier='string'
)
**Response Syntax**
::
{
'DBCluster': {
'AllocatedStorage': 123,
'AvailabilityZones': [
'string',
],
'BackupRetentionPeriod': 123,
'CharacterSetName': 'string',
'DatabaseName': 'string',
'DBClusterIdentifier': 'string',
'DBClusterParameterGroup': 'string',
'DBSubnetGroup': 'string',
'Status': 'string',
'PercentProgress': 'string',
'EarliestRestorableTime': datetime(2015, 1, 1),
'Endpoint': 'string',
'ReaderEndpoint': 'string',
'MultiAZ': True|False,
'Engine': 'string',
'EngineVersion': 'string',
'LatestRestorableTime': datetime(2015, 1, 1),
'Port': 123,
'MasterUsername': 'string',
'DBClusterOptionGroupMemberships': [
{
'DBClusterOptionGroupName': 'string',
'Status': 'string'
},
],
'PreferredBackupWindow': 'string',
'PreferredMaintenanceWindow': 'string',
'ReplicationSourceIdentifier': 'string',
'ReadReplicaIdentifiers': [
'string',
],
'DBClusterMembers': [
{
'DBInstanceIdentifier': 'string',
'IsClusterWriter': True|False,
'DBClusterParameterGroupStatus': 'string',
'PromotionTier': 123
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'HostedZoneId': 'string',
'StorageEncrypted': True|False,
'KmsKeyId': 'string',
'DbClusterResourceId': 'string',
'DBClusterArn': 'string',
'AssociatedRoles': [
{
'RoleArn': 'string',
'Status': 'string'
},
],
'IAMDatabaseAuthenticationEnabled': True|False,
'CloneGroupId': 'string',
'ClusterCreateTime': datetime(2015, 1, 1)
}
}
**Response Structure**
- *(dict) --*
- **DBCluster** *(dict) --*
Contains the details of an Amazon Neptune DB cluster.
This data type is used as a response element in the DescribeDBClusters action.
- **AllocatedStorage** *(integer) --*
``AllocatedStorage`` always returns 1, because Neptune DB cluster storage size is not fixed, but instead automatically adjusts as needed.
- **AvailabilityZones** *(list) --*
Provides the list of EC2 Availability Zones that instances in the DB cluster can be created in.
- *(string) --*
- **BackupRetentionPeriod** *(integer) --*
Specifies the number of days for which automatic DB snapshots are retained.
- **CharacterSetName** *(string) --*
If present, specifies the name of the character set that this cluster is associated with.
- **DatabaseName** *(string) --*
Contains the name of the initial database of this DB cluster that was provided at create time, if one was specified when the DB cluster was created. This same name is returned for the life of the DB cluster.
- **DBClusterIdentifier** *(string) --*
Contains a user-supplied DB cluster identifier. This identifier is the unique key that identifies a DB cluster.
- **DBClusterParameterGroup** *(string) --*
Specifies the name of the DB cluster parameter group for the DB cluster.
- **DBSubnetGroup** *(string) --*
Specifies information on the subnet group associated with the DB cluster, including the name, description, and subnets in the subnet group.
- **Status** *(string) --*
Specifies the current state of this DB cluster.
- **PercentProgress** *(string) --*
Specifies the progress of the operation as a percentage.
- **EarliestRestorableTime** *(datetime) --*
Specifies the earliest time to which a database can be restored with point-in-time restore.
- **Endpoint** *(string) --*
Specifies the connection endpoint for the primary instance of the DB cluster.
- **ReaderEndpoint** *(string) --*
The reader endpoint for the DB cluster. The reader endpoint for a DB cluster load-balances connections across the Read Replicas that are available in a DB cluster. As clients request new connections to the reader endpoint, Neptune distributes the connection requests among the Read Replicas in the DB cluster. This functionality can help balance your read workload across multiple Read Replicas in your DB cluster.
If a failover occurs, and the Read Replica that you are connected to is promoted to be the primary instance, your connection is dropped. To continue sending your read workload to other Read Replicas in the cluster, you can then reconnect to the reader endpoint.
- **MultiAZ** *(boolean) --*
Specifies whether the DB cluster has instances in multiple Availability Zones.
- **Engine** *(string) --*
Provides the name of the database engine to be used for this DB cluster.
- **EngineVersion** *(string) --*
Indicates the database engine version.
- **LatestRestorableTime** *(datetime) --*
Specifies the latest time to which a database can be restored with point-in-time restore.
- **Port** *(integer) --*
Specifies the port that the database engine is listening on.
- **MasterUsername** *(string) --*
Contains the master username for the DB cluster.
- **DBClusterOptionGroupMemberships** *(list) --*
Provides the list of option group memberships for this DB cluster.
- *(dict) --*
Contains status information for a DB cluster option group.
- **DBClusterOptionGroupName** *(string) --*
Specifies the name of the DB cluster option group.
- **Status** *(string) --*
Specifies the status of the DB cluster option group.
- **PreferredBackupWindow** *(string) --*
Specifies the daily time range during which automated backups are created if automated backups are enabled, as determined by the ``BackupRetentionPeriod`` .
- **PreferredMaintenanceWindow** *(string) --*
Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
- **ReplicationSourceIdentifier** *(string) --*
Not supported by Neptune.
- **ReadReplicaIdentifiers** *(list) --*
Contains one or more identifiers of the Read Replicas associated with this DB cluster.
- *(string) --*
- **DBClusterMembers** *(list) --*
Provides the list of instances that make up the DB cluster.
- *(dict) --*
Contains information about an instance that is part of a DB cluster.
- **DBInstanceIdentifier** *(string) --*
Specifies the instance identifier for this member of the DB cluster.
- **IsClusterWriter** *(boolean) --*
Value that is ``true`` if the cluster member is the primary instance for the DB cluster and ``false`` otherwise.
- **DBClusterParameterGroupStatus** *(string) --*
Specifies the status of the DB cluster parameter group for this member of the DB cluster.
- **PromotionTier** *(integer) --*
A value that specifies the order in which a Read Replica is promoted to the primary instance after a failure of the existing primary instance.
- **VpcSecurityGroups** *(list) --*
Provides a list of VPC security groups that the DB cluster belongs to.
- *(dict) --*
This data type is used as a response element for queries on VPC security group membership.
- **VpcSecurityGroupId** *(string) --*
The name of the VPC security group.
- **Status** *(string) --*
The status of the VPC security group.
- **HostedZoneId** *(string) --*
Specifies the ID that Amazon Route 53 assigns when you create a hosted zone.
- **StorageEncrypted** *(boolean) --*
Specifies whether the DB cluster is encrypted.
- **KmsKeyId** *(string) --*
If ``StorageEncrypted`` is true, the AWS KMS key identifier for the encrypted DB cluster.
- **DbClusterResourceId** *(string) --*
The AWS Region-unique, immutable identifier for the DB cluster. This identifier is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB cluster is accessed.
- **DBClusterArn** *(string) --*
The Amazon Resource Name (ARN) for the DB cluster.
- **AssociatedRoles** *(list) --*
Provides a list of the AWS Identity and Access Management (IAM) roles that are associated with the DB cluster. IAM roles that are associated with a DB cluster grant permission for the DB cluster to access other AWS services on your behalf.
- *(dict) --*
Describes an AWS Identity and Access Management (IAM) role that is associated with a DB cluster.
- **RoleArn** *(string) --*
The Amazon Resource Name (ARN) of the IAM role that is associated with the DB cluster.
- **Status** *(string) --*
Describes the state of association between the IAM role and the DB cluster. The Status property returns one of the following values:
* ``ACTIVE`` - the IAM role ARN is associated with the DB cluster and can be used to access other AWS services on your behalf.
* ``PENDING`` - the IAM role ARN is being associated with the DB cluster.
* ``INVALID`` - the IAM role ARN is associated with the DB cluster, but the DB cluster is unable to assume the IAM role in order to access other AWS services on your behalf.
- **IAMDatabaseAuthenticationEnabled** *(boolean) --*
True if mapping of AWS Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false.
- **CloneGroupId** *(string) --*
Identifies the clone group to which the DB cluster is associated.
- **ClusterCreateTime** *(datetime) --*
Specifies the time when the DB cluster was created, in Universal Coordinated Time (UTC).
:type DBClusterIdentifier: string
:param DBClusterIdentifier: **[REQUIRED]**
Not supported.
:rtype: dict
:returns:
"""
pass
def reboot_db_instance(self, DBInstanceIdentifier: str, ForceFailover: bool = None) -> Dict:
"""
You might need to reboot your DB instance, usually for maintenance reasons. For example, if you make certain modifications, or if you change the DB parameter group associated with the DB instance, you must reboot the instance for the changes to take effect.
Rebooting a DB instance restarts the database engine service. Rebooting a DB instance results in a momentary outage, during which the DB instance status is set to rebooting.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/RebootDBInstance>`_
**Request Syntax**
::
response = client.reboot_db_instance(
DBInstanceIdentifier='string',
ForceFailover=True|False
)
**Response Syntax**
::
{
'DBInstance': {
'DBInstanceIdentifier': 'string',
'DBInstanceClass': 'string',
'Engine': 'string',
'DBInstanceStatus': 'string',
'MasterUsername': 'string',
'DBName': 'string',
'Endpoint': {
'Address': 'string',
'Port': 123,
'HostedZoneId': 'string'
},
'AllocatedStorage': 123,
'InstanceCreateTime': datetime(2015, 1, 1),
'PreferredBackupWindow': 'string',
'BackupRetentionPeriod': 123,
'DBSecurityGroups': [
{
'DBSecurityGroupName': 'string',
'Status': 'string'
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'DBParameterGroups': [
{
'DBParameterGroupName': 'string',
'ParameterApplyStatus': 'string'
},
],
'AvailabilityZone': 'string',
'DBSubnetGroup': {
'DBSubnetGroupName': 'string',
'DBSubnetGroupDescription': 'string',
'VpcId': 'string',
'SubnetGroupStatus': 'string',
'Subnets': [
{
'SubnetIdentifier': 'string',
'SubnetAvailabilityZone': {
'Name': 'string'
},
'SubnetStatus': 'string'
},
],
'DBSubnetGroupArn': 'string'
},
'PreferredMaintenanceWindow': 'string',
'PendingModifiedValues': {
'DBInstanceClass': 'string',
'AllocatedStorage': 123,
'MasterUserPassword': 'string',
'Port': 123,
'BackupRetentionPeriod': 123,
'MultiAZ': True|False,
'EngineVersion': 'string',
'LicenseModel': 'string',
'Iops': 123,
'DBInstanceIdentifier': 'string',
'StorageType': 'string',
'CACertificateIdentifier': 'string',
'DBSubnetGroupName': 'string',
'PendingCloudwatchLogsExports': {
'LogTypesToEnable': [
'string',
],
'LogTypesToDisable': [
'string',
]
}
},
'LatestRestorableTime': datetime(2015, 1, 1),
'MultiAZ': True|False,
'EngineVersion': 'string',
'AutoMinorVersionUpgrade': True|False,
'ReadReplicaSourceDBInstanceIdentifier': 'string',
'ReadReplicaDBInstanceIdentifiers': [
'string',
],
'ReadReplicaDBClusterIdentifiers': [
'string',
],
'LicenseModel': 'string',
'Iops': 123,
'OptionGroupMemberships': [
{
'OptionGroupName': 'string',
'Status': 'string'
},
],
'CharacterSetName': 'string',
'SecondaryAvailabilityZone': 'string',
'PubliclyAccessible': True|False,
'StatusInfos': [
{
'StatusType': 'string',
'Normal': True|False,
'Status': 'string',
'Message': 'string'
},
],
'StorageType': 'string',
'TdeCredentialArn': 'string',
'DbInstancePort': 123,
'DBClusterIdentifier': 'string',
'StorageEncrypted': True|False,
'KmsKeyId': 'string',
'DbiResourceId': 'string',
'CACertificateIdentifier': 'string',
'DomainMemberships': [
{
'Domain': 'string',
'Status': 'string',
'FQDN': 'string',
'IAMRoleName': 'string'
},
],
'CopyTagsToSnapshot': True|False,
'MonitoringInterval': 123,
'EnhancedMonitoringResourceArn': 'string',
'MonitoringRoleArn': 'string',
'PromotionTier': 123,
'DBInstanceArn': 'string',
'Timezone': 'string',
'IAMDatabaseAuthenticationEnabled': True|False,
'PerformanceInsightsEnabled': True|False,
'PerformanceInsightsKMSKeyId': 'string',
'EnabledCloudwatchLogsExports': [
'string',
]
}
}
**Response Structure**
- *(dict) --*
- **DBInstance** *(dict) --*
Contains the details of an Amazon Neptune DB instance.
This data type is used as a response element in the DescribeDBInstances action.
- **DBInstanceIdentifier** *(string) --*
Contains a user-supplied database identifier. This identifier is the unique key that identifies a DB instance.
- **DBInstanceClass** *(string) --*
Contains the name of the compute and memory capacity class of the DB instance.
- **Engine** *(string) --*
Provides the name of the database engine to be used for this DB instance.
- **DBInstanceStatus** *(string) --*
Specifies the current state of this database.
- **MasterUsername** *(string) --*
Contains the master username for the DB instance.
- **DBName** *(string) --*
The database name.
- **Endpoint** *(dict) --*
Specifies the connection endpoint.
- **Address** *(string) --*
Specifies the DNS address of the DB instance.
- **Port** *(integer) --*
Specifies the port that the database engine is listening on.
- **HostedZoneId** *(string) --*
Specifies the ID that Amazon Route 53 assigns when you create a hosted zone.
- **AllocatedStorage** *(integer) --*
Specifies the allocated storage size specified in gibibytes.
- **InstanceCreateTime** *(datetime) --*
Provides the date and time the DB instance was created.
- **PreferredBackupWindow** *(string) --*
Specifies the daily time range during which automated backups are created if automated backups are enabled, as determined by the ``BackupRetentionPeriod`` .
- **BackupRetentionPeriod** *(integer) --*
Specifies the number of days for which automatic DB snapshots are retained.
- **DBSecurityGroups** *(list) --*
Provides List of DB security group elements containing only ``DBSecurityGroup.Name`` and ``DBSecurityGroup.Status`` subelements.
- *(dict) --*
Specifies membership in a designated DB security group.
- **DBSecurityGroupName** *(string) --*
The name of the DB security group.
- **Status** *(string) --*
The status of the DB security group.
- **VpcSecurityGroups** *(list) --*
Provides a list of VPC security group elements that the DB instance belongs to.
- *(dict) --*
This data type is used as a response element for queries on VPC security group membership.
- **VpcSecurityGroupId** *(string) --*
The name of the VPC security group.
- **Status** *(string) --*
The status of the VPC security group.
- **DBParameterGroups** *(list) --*
Provides the list of DB parameter groups applied to this DB instance.
- *(dict) --*
The status of the DB parameter group.
This data type is used as a response element in the following actions:
* CreateDBInstance
* DeleteDBInstance
* ModifyDBInstance
* RebootDBInstance
- **DBParameterGroupName** *(string) --*
The name of the DP parameter group.
- **ParameterApplyStatus** *(string) --*
The status of parameter updates.
- **AvailabilityZone** *(string) --*
Specifies the name of the Availability Zone the DB instance is located in.
- **DBSubnetGroup** *(dict) --*
Specifies information on the subnet group associated with the DB instance, including the name, description, and subnets in the subnet group.
- **DBSubnetGroupName** *(string) --*
The name of the DB subnet group.
- **DBSubnetGroupDescription** *(string) --*
Provides the description of the DB subnet group.
- **VpcId** *(string) --*
Provides the VpcId of the DB subnet group.
- **SubnetGroupStatus** *(string) --*
Provides the status of the DB subnet group.
- **Subnets** *(list) --*
Contains a list of Subnet elements.
- *(dict) --*
Specifies a subnet.
This data type is used as a response element in the DescribeDBSubnetGroups action.
- **SubnetIdentifier** *(string) --*
Specifies the identifier of the subnet.
- **SubnetAvailabilityZone** *(dict) --*
Specifies the EC2 Availability Zone that the subnet is in.
- **Name** *(string) --*
The name of the availability zone.
- **SubnetStatus** *(string) --*
Specifies the status of the subnet.
- **DBSubnetGroupArn** *(string) --*
The Amazon Resource Name (ARN) for the DB subnet group.
- **PreferredMaintenanceWindow** *(string) --*
Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
- **PendingModifiedValues** *(dict) --*
Specifies that changes to the DB instance are pending. This element is only included when changes are pending. Specific changes are identified by subelements.
- **DBInstanceClass** *(string) --*
Contains the new ``DBInstanceClass`` for the DB instance that will be applied or is currently being applied.
- **AllocatedStorage** *(integer) --*
Contains the new ``AllocatedStorage`` size for the DB instance that will be applied or is currently being applied.
- **MasterUserPassword** *(string) --*
Contains the pending or currently-in-progress change of the master credentials for the DB instance.
- **Port** *(integer) --*
Specifies the pending port for the DB instance.
- **BackupRetentionPeriod** *(integer) --*
Specifies the pending number of days for which automated backups are retained.
- **MultiAZ** *(boolean) --*
Indicates that the Single-AZ DB instance is to change to a Multi-AZ deployment.
- **EngineVersion** *(string) --*
Indicates the database engine version.
- **LicenseModel** *(string) --*
The license model for the DB instance.
Valid values: ``license-included`` | ``bring-your-own-license`` | ``general-public-license``
- **Iops** *(integer) --*
Specifies the new Provisioned IOPS value for the DB instance that will be applied or is currently being applied.
- **DBInstanceIdentifier** *(string) --*
Contains the new ``DBInstanceIdentifier`` for the DB instance that will be applied or is currently being applied.
- **StorageType** *(string) --*
Specifies the storage type to be associated with the DB instance.
- **CACertificateIdentifier** *(string) --*
Specifies the identifier of the CA certificate for the DB instance.
- **DBSubnetGroupName** *(string) --*
The new DB subnet group for the DB instance.
- **PendingCloudwatchLogsExports** *(dict) --*
Specifies the CloudWatch logs to be exported.
- **LogTypesToEnable** *(list) --*
Log types that are in the process of being deactivated. After they are deactivated, these log types aren't exported to CloudWatch Logs.
- *(string) --*
- **LogTypesToDisable** *(list) --*
Log types that are in the process of being enabled. After they are enabled, these log types are exported to CloudWatch Logs.
- *(string) --*
- **LatestRestorableTime** *(datetime) --*
Specifies the latest time to which a database can be restored with point-in-time restore.
- **MultiAZ** *(boolean) --*
Specifies if the DB instance is a Multi-AZ deployment.
- **EngineVersion** *(string) --*
Indicates the database engine version.
- **AutoMinorVersionUpgrade** *(boolean) --*
Indicates that minor version patches are applied automatically.
- **ReadReplicaSourceDBInstanceIdentifier** *(string) --*
Contains the identifier of the source DB instance if this DB instance is a Read Replica.
- **ReadReplicaDBInstanceIdentifiers** *(list) --*
Contains one or more identifiers of the Read Replicas associated with this DB instance.
- *(string) --*
- **ReadReplicaDBClusterIdentifiers** *(list) --*
Contains one or more identifiers of DB clusters that are Read Replicas of this DB instance.
- *(string) --*
- **LicenseModel** *(string) --*
License model information for this DB instance.
- **Iops** *(integer) --*
Specifies the Provisioned IOPS (I/O operations per second) value.
- **OptionGroupMemberships** *(list) --*
Provides the list of option group memberships for this DB instance.
- *(dict) --*
Provides information on the option groups the DB instance is a member of.
- **OptionGroupName** *(string) --*
The name of the option group that the instance belongs to.
- **Status** *(string) --*
The status of the DB instance's option group membership. Valid values are: ``in-sync`` , ``pending-apply`` , ``pending-removal`` , ``pending-maintenance-apply`` , ``pending-maintenance-removal`` , ``applying`` , ``removing`` , and ``failed`` .
- **CharacterSetName** *(string) --*
If present, specifies the name of the character set that this instance is associated with.
- **SecondaryAvailabilityZone** *(string) --*
If present, specifies the name of the secondary Availability Zone for a DB instance with multi-AZ support.
- **PubliclyAccessible** *(boolean) --*
This flag should no longer be used.
- **StatusInfos** *(list) --*
The status of a Read Replica. If the instance is not a Read Replica, this is blank.
- *(dict) --*
Provides a list of status information for a DB instance.
- **StatusType** *(string) --*
This value is currently "read replication."
- **Normal** *(boolean) --*
Boolean value that is true if the instance is operating normally, or false if the instance is in an error state.
- **Status** *(string) --*
Status of the DB instance. For a StatusType of read replica, the values can be replicating, error, stopped, or terminated.
- **Message** *(string) --*
Details of the error if there is an error for the instance. If the instance is not in an error state, this value is blank.
- **StorageType** *(string) --*
Specifies the storage type associated with DB instance.
- **TdeCredentialArn** *(string) --*
The ARN from the key store with which the instance is associated for TDE encryption.
- **DbInstancePort** *(integer) --*
Specifies the port that the DB instance listens on. If the DB instance is part of a DB cluster, this can be a different port than the DB cluster port.
- **DBClusterIdentifier** *(string) --*
If the DB instance is a member of a DB cluster, contains the name of the DB cluster that the DB instance is a member of.
- **StorageEncrypted** *(boolean) --*
Not supported: The encryption for DB instances is managed by the DB cluster.
- **KmsKeyId** *(string) --*
Not supported: The encryption for DB instances is managed by the DB cluster.
- **DbiResourceId** *(string) --*
The AWS Region-unique, immutable identifier for the DB instance. This identifier is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB instance is accessed.
- **CACertificateIdentifier** *(string) --*
The identifier of the CA certificate for this DB instance.
- **DomainMemberships** *(list) --*
Not supported
- *(dict) --*
An Active Directory Domain membership record associated with a DB instance.
- **Domain** *(string) --*
The identifier of the Active Directory Domain.
- **Status** *(string) --*
The status of the DB instance's Active Directory Domain membership, such as joined, pending-join, failed etc).
- **FQDN** *(string) --*
The fully qualified domain name of the Active Directory Domain.
- **IAMRoleName** *(string) --*
The name of the IAM role to be used when making API calls to the Directory Service.
- **CopyTagsToSnapshot** *(boolean) --*
Specifies whether tags are copied from the DB instance to snapshots of the DB instance.
- **MonitoringInterval** *(integer) --*
The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance.
- **EnhancedMonitoringResourceArn** *(string) --*
The Amazon Resource Name (ARN) of the Amazon CloudWatch Logs log stream that receives the Enhanced Monitoring metrics data for the DB instance.
- **MonitoringRoleArn** *(string) --*
The ARN for the IAM role that permits Neptune to send Enhanced Monitoring metrics to Amazon CloudWatch Logs.
- **PromotionTier** *(integer) --*
A value that specifies the order in which a Read Replica is promoted to the primary instance after a failure of the existing primary instance.
- **DBInstanceArn** *(string) --*
The Amazon Resource Name (ARN) for the DB instance.
- **Timezone** *(string) --*
Not supported.
- **IAMDatabaseAuthenticationEnabled** *(boolean) --*
True if AWS Identity and Access Management (IAM) authentication is enabled, and otherwise false.
- **PerformanceInsightsEnabled** *(boolean) --*
True if Performance Insights is enabled for the DB instance, and otherwise false.
- **PerformanceInsightsKMSKeyId** *(string) --*
The AWS KMS key identifier for encryption of Performance Insights data. The KMS key ID is the Amazon Resource Name (ARN), KMS key identifier, or the KMS key alias for the KMS encryption key.
- **EnabledCloudwatchLogsExports** *(list) --*
A list of log types that this DB instance is configured to export to CloudWatch Logs.
- *(string) --*
:type DBInstanceIdentifier: string
:param DBInstanceIdentifier: **[REQUIRED]**
The DB instance identifier. This parameter is stored as a lowercase string.
Constraints:
* Must match the identifier of an existing DBInstance.
:type ForceFailover: boolean
:param ForceFailover:
When ``true`` , the reboot is conducted through a MultiAZ failover.
Constraint: You can\'t specify ``true`` if the instance is not configured for MultiAZ.
:rtype: dict
:returns:
"""
pass
def remove_role_from_db_cluster(self, DBClusterIdentifier: str, RoleArn: str):
"""
Disassociates an Identity and Access Management (IAM) role from a DB cluster.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/RemoveRoleFromDBCluster>`_
**Request Syntax**
::
response = client.remove_role_from_db_cluster(
DBClusterIdentifier='string',
RoleArn='string'
)
:type DBClusterIdentifier: string
:param DBClusterIdentifier: **[REQUIRED]**
The name of the DB cluster to disassociate the IAM role from.
:type RoleArn: string
:param RoleArn: **[REQUIRED]**
The Amazon Resource Name (ARN) of the IAM role to disassociate from the DB cluster, for example ``arn:aws:iam::123456789012:role/NeptuneAccessRole`` .
:returns: None
"""
pass
def remove_source_identifier_from_subscription(self, SubscriptionName: str, SourceIdentifier: str) -> Dict:
"""
Removes a source identifier from an existing event notification subscription.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/RemoveSourceIdentifierFromSubscription>`_
**Request Syntax**
::
response = client.remove_source_identifier_from_subscription(
SubscriptionName='string',
SourceIdentifier='string'
)
**Response Syntax**
::
{
'EventSubscription': {
'CustomerAwsId': 'string',
'CustSubscriptionId': 'string',
'SnsTopicArn': 'string',
'Status': 'string',
'SubscriptionCreationTime': 'string',
'SourceType': 'string',
'SourceIdsList': [
'string',
],
'EventCategoriesList': [
'string',
],
'Enabled': True|False,
'EventSubscriptionArn': 'string'
}
}
**Response Structure**
- *(dict) --*
- **EventSubscription** *(dict) --*
Contains the results of a successful invocation of the DescribeEventSubscriptions action.
- **CustomerAwsId** *(string) --*
The AWS customer account associated with the event notification subscription.
- **CustSubscriptionId** *(string) --*
The event notification subscription Id.
- **SnsTopicArn** *(string) --*
The topic ARN of the event notification subscription.
- **Status** *(string) --*
The status of the event notification subscription.
Constraints:
Can be one of the following: creating | modifying | deleting | active | no-permission | topic-not-exist
The status "no-permission" indicates that Neptune no longer has permission to post to the SNS topic. The status "topic-not-exist" indicates that the topic was deleted after the subscription was created.
- **SubscriptionCreationTime** *(string) --*
The time the event notification subscription was created.
- **SourceType** *(string) --*
The source type for the event notification subscription.
- **SourceIdsList** *(list) --*
A list of source IDs for the event notification subscription.
- *(string) --*
- **EventCategoriesList** *(list) --*
A list of event categories for the event notification subscription.
- *(string) --*
- **Enabled** *(boolean) --*
A Boolean value indicating if the subscription is enabled. True indicates the subscription is enabled.
- **EventSubscriptionArn** *(string) --*
The Amazon Resource Name (ARN) for the event subscription.
:type SubscriptionName: string
:param SubscriptionName: **[REQUIRED]**
The name of the event notification subscription you want to remove a source identifier from.
:type SourceIdentifier: string
:param SourceIdentifier: **[REQUIRED]**
The source identifier to be removed from the subscription, such as the **DB instance identifier** for a DB instance or the name of a security group.
:rtype: dict
:returns:
"""
pass
def remove_tags_from_resource(self, ResourceName: str, TagKeys: List):
"""
Removes metadata tags from an Amazon Neptune resource.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/RemoveTagsFromResource>`_
**Request Syntax**
::
response = client.remove_tags_from_resource(
ResourceName='string',
TagKeys=[
'string',
]
)
:type ResourceName: string
:param ResourceName: **[REQUIRED]**
The Amazon Neptune resource that the tags are removed from. This value is an Amazon Resource Name (ARN). For information about creating an ARN, see `Constructing an Amazon Resource Name (ARN) <https://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html#tagging.ARN.Constructing>`__ .
:type TagKeys: list
:param TagKeys: **[REQUIRED]**
The tag key (name) of the tag to be removed.
- *(string) --*
:returns: None
"""
pass
def reset_db_cluster_parameter_group(self, DBClusterParameterGroupName: str, ResetAllParameters: bool = None, Parameters: List = None) -> Dict:
"""
Modifies the parameters of a DB cluster parameter group to the default value. To reset specific parameters submit a list of the following: ``ParameterName`` and ``ApplyMethod`` . To reset the entire DB cluster parameter group, specify the ``DBClusterParameterGroupName`` and ``ResetAllParameters`` parameters.
When resetting the entire group, dynamic parameters are updated immediately and static parameters are set to ``pending-reboot`` to take effect on the next DB instance restart or RebootDBInstance request. You must call RebootDBInstance for every DB instance in your DB cluster that you want the updated static parameter to apply to.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ResetDBClusterParameterGroup>`_
**Request Syntax**
::
response = client.reset_db_cluster_parameter_group(
DBClusterParameterGroupName='string',
ResetAllParameters=True|False,
Parameters=[
{
'ParameterName': 'string',
'ParameterValue': 'string',
'Description': 'string',
'Source': 'string',
'ApplyType': 'string',
'DataType': 'string',
'AllowedValues': 'string',
'IsModifiable': True|False,
'MinimumEngineVersion': 'string',
'ApplyMethod': 'immediate'|'pending-reboot'
},
]
)
**Response Syntax**
::
{
'DBClusterParameterGroupName': 'string'
}
**Response Structure**
- *(dict) --*
- **DBClusterParameterGroupName** *(string) --*
The name of the DB cluster parameter group.
Constraints:
* Must be 1 to 255 letters or numbers.
* First character must be a letter
* Cannot end with a hyphen or contain two consecutive hyphens
.. note::
This value is stored as a lowercase string.
:type DBClusterParameterGroupName: string
:param DBClusterParameterGroupName: **[REQUIRED]**
The name of the DB cluster parameter group to reset.
:type ResetAllParameters: boolean
:param ResetAllParameters:
A value that is set to ``true`` to reset all parameters in the DB cluster parameter group to their default values, and ``false`` otherwise. You can\'t use this parameter if there is a list of parameter names specified for the ``Parameters`` parameter.
:type Parameters: list
:param Parameters:
A list of parameter names in the DB cluster parameter group to reset to the default values. You can\'t use this parameter if the ``ResetAllParameters`` parameter is set to ``true`` .
- *(dict) --*
Specifies a parameter.
- **ParameterName** *(string) --*
Specifies the name of the parameter.
- **ParameterValue** *(string) --*
Specifies the value of the parameter.
- **Description** *(string) --*
Provides a description of the parameter.
- **Source** *(string) --*
Indicates the source of the parameter value.
- **ApplyType** *(string) --*
Specifies the engine specific parameters type.
- **DataType** *(string) --*
Specifies the valid data type for the parameter.
- **AllowedValues** *(string) --*
Specifies the valid range of values for the parameter.
- **IsModifiable** *(boolean) --*
Indicates whether (``true`` ) or not (``false`` ) the parameter can be modified. Some parameters have security or operational implications that prevent them from being changed.
- **MinimumEngineVersion** *(string) --*
The earliest engine version to which the parameter can apply.
- **ApplyMethod** *(string) --*
Indicates when to apply parameter updates.
:rtype: dict
:returns:
"""
pass
def reset_db_parameter_group(self, DBParameterGroupName: str, ResetAllParameters: bool = None, Parameters: List = None) -> Dict:
"""
Modifies the parameters of a DB parameter group to the engine/system default value. To reset specific parameters, provide a list of the following: ``ParameterName`` and ``ApplyMethod`` . To reset the entire DB parameter group, specify the ``DBParameterGroup`` name and ``ResetAllParameters`` parameters. When resetting the entire group, dynamic parameters are updated immediately and static parameters are set to ``pending-reboot`` to take effect on the next DB instance restart or ``RebootDBInstance`` request.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ResetDBParameterGroup>`_
**Request Syntax**
::
response = client.reset_db_parameter_group(
DBParameterGroupName='string',
ResetAllParameters=True|False,
Parameters=[
{
'ParameterName': 'string',
'ParameterValue': 'string',
'Description': 'string',
'Source': 'string',
'ApplyType': 'string',
'DataType': 'string',
'AllowedValues': 'string',
'IsModifiable': True|False,
'MinimumEngineVersion': 'string',
'ApplyMethod': 'immediate'|'pending-reboot'
},
]
)
**Response Syntax**
::
{
'DBParameterGroupName': 'string'
}
**Response Structure**
- *(dict) --*
- **DBParameterGroupName** *(string) --*
Provides the name of the DB parameter group.
:type DBParameterGroupName: string
:param DBParameterGroupName: **[REQUIRED]**
The name of the DB parameter group.
Constraints:
* Must match the name of an existing DBParameterGroup.
:type ResetAllParameters: boolean
:param ResetAllParameters:
Specifies whether (``true`` ) or not (``false`` ) to reset all parameters in the DB parameter group to default values.
Default: ``true``
:type Parameters: list
:param Parameters:
To reset the entire DB parameter group, specify the ``DBParameterGroup`` name and ``ResetAllParameters`` parameters. To reset specific parameters, provide a list of the following: ``ParameterName`` and ``ApplyMethod`` . A maximum of 20 parameters can be modified in a single request.
Valid Values (for Apply method): ``pending-reboot``
- *(dict) --*
Specifies a parameter.
- **ParameterName** *(string) --*
Specifies the name of the parameter.
- **ParameterValue** *(string) --*
Specifies the value of the parameter.
- **Description** *(string) --*
Provides a description of the parameter.
- **Source** *(string) --*
Indicates the source of the parameter value.
- **ApplyType** *(string) --*
Specifies the engine specific parameters type.
- **DataType** *(string) --*
Specifies the valid data type for the parameter.
- **AllowedValues** *(string) --*
Specifies the valid range of values for the parameter.
- **IsModifiable** *(boolean) --*
Indicates whether (``true`` ) or not (``false`` ) the parameter can be modified. Some parameters have security or operational implications that prevent them from being changed.
- **MinimumEngineVersion** *(string) --*
The earliest engine version to which the parameter can apply.
- **ApplyMethod** *(string) --*
Indicates when to apply parameter updates.
:rtype: dict
:returns:
"""
pass
def restore_db_cluster_from_snapshot(self, DBClusterIdentifier: str, SnapshotIdentifier: str, Engine: str, AvailabilityZones: List = None, EngineVersion: str = None, Port: int = None, DBSubnetGroupName: str = None, DatabaseName: str = None, OptionGroupName: str = None, VpcSecurityGroupIds: List = None, Tags: List = None, KmsKeyId: str = None, EnableIAMDatabaseAuthentication: bool = None, DBClusterParameterGroupName: str = None) -> Dict:
"""
Creates a new DB cluster from a DB snapshot or DB cluster snapshot.
If a DB snapshot is specified, the target DB cluster is created from the source DB snapshot with a default configuration and default security group.
If a DB cluster snapshot is specified, the target DB cluster is created from the source DB cluster restore point with the same configuration as the original source DB cluster, except that the new DB cluster is created with the default security group.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/RestoreDBClusterFromSnapshot>`_
**Request Syntax**
::
response = client.restore_db_cluster_from_snapshot(
AvailabilityZones=[
'string',
],
DBClusterIdentifier='string',
SnapshotIdentifier='string',
Engine='string',
EngineVersion='string',
Port=123,
DBSubnetGroupName='string',
DatabaseName='string',
OptionGroupName='string',
VpcSecurityGroupIds=[
'string',
],
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
KmsKeyId='string',
EnableIAMDatabaseAuthentication=True|False,
DBClusterParameterGroupName='string'
)
**Response Syntax**
::
{
'DBCluster': {
'AllocatedStorage': 123,
'AvailabilityZones': [
'string',
],
'BackupRetentionPeriod': 123,
'CharacterSetName': 'string',
'DatabaseName': 'string',
'DBClusterIdentifier': 'string',
'DBClusterParameterGroup': 'string',
'DBSubnetGroup': 'string',
'Status': 'string',
'PercentProgress': 'string',
'EarliestRestorableTime': datetime(2015, 1, 1),
'Endpoint': 'string',
'ReaderEndpoint': 'string',
'MultiAZ': True|False,
'Engine': 'string',
'EngineVersion': 'string',
'LatestRestorableTime': datetime(2015, 1, 1),
'Port': 123,
'MasterUsername': 'string',
'DBClusterOptionGroupMemberships': [
{
'DBClusterOptionGroupName': 'string',
'Status': 'string'
},
],
'PreferredBackupWindow': 'string',
'PreferredMaintenanceWindow': 'string',
'ReplicationSourceIdentifier': 'string',
'ReadReplicaIdentifiers': [
'string',
],
'DBClusterMembers': [
{
'DBInstanceIdentifier': 'string',
'IsClusterWriter': True|False,
'DBClusterParameterGroupStatus': 'string',
'PromotionTier': 123
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'HostedZoneId': 'string',
'StorageEncrypted': True|False,
'KmsKeyId': 'string',
'DbClusterResourceId': 'string',
'DBClusterArn': 'string',
'AssociatedRoles': [
{
'RoleArn': 'string',
'Status': 'string'
},
],
'IAMDatabaseAuthenticationEnabled': True|False,
'CloneGroupId': 'string',
'ClusterCreateTime': datetime(2015, 1, 1)
}
}
**Response Structure**
- *(dict) --*
- **DBCluster** *(dict) --*
Contains the details of an Amazon Neptune DB cluster.
This data type is used as a response element in the DescribeDBClusters action.
- **AllocatedStorage** *(integer) --*
``AllocatedStorage`` always returns 1, because Neptune DB cluster storage size is not fixed, but instead automatically adjusts as needed.
- **AvailabilityZones** *(list) --*
Provides the list of EC2 Availability Zones that instances in the DB cluster can be created in.
- *(string) --*
- **BackupRetentionPeriod** *(integer) --*
Specifies the number of days for which automatic DB snapshots are retained.
- **CharacterSetName** *(string) --*
If present, specifies the name of the character set that this cluster is associated with.
- **DatabaseName** *(string) --*
Contains the name of the initial database of this DB cluster that was provided at create time, if one was specified when the DB cluster was created. This same name is returned for the life of the DB cluster.
- **DBClusterIdentifier** *(string) --*
Contains a user-supplied DB cluster identifier. This identifier is the unique key that identifies a DB cluster.
- **DBClusterParameterGroup** *(string) --*
Specifies the name of the DB cluster parameter group for the DB cluster.
- **DBSubnetGroup** *(string) --*
Specifies information on the subnet group associated with the DB cluster, including the name, description, and subnets in the subnet group.
- **Status** *(string) --*
Specifies the current state of this DB cluster.
- **PercentProgress** *(string) --*
Specifies the progress of the operation as a percentage.
- **EarliestRestorableTime** *(datetime) --*
Specifies the earliest time to which a database can be restored with point-in-time restore.
- **Endpoint** *(string) --*
Specifies the connection endpoint for the primary instance of the DB cluster.
- **ReaderEndpoint** *(string) --*
The reader endpoint for the DB cluster. The reader endpoint for a DB cluster load-balances connections across the Read Replicas that are available in a DB cluster. As clients request new connections to the reader endpoint, Neptune distributes the connection requests among the Read Replicas in the DB cluster. This functionality can help balance your read workload across multiple Read Replicas in your DB cluster.
If a failover occurs, and the Read Replica that you are connected to is promoted to be the primary instance, your connection is dropped. To continue sending your read workload to other Read Replicas in the cluster, you can then reconnect to the reader endpoint.
- **MultiAZ** *(boolean) --*
Specifies whether the DB cluster has instances in multiple Availability Zones.
- **Engine** *(string) --*
Provides the name of the database engine to be used for this DB cluster.
- **EngineVersion** *(string) --*
Indicates the database engine version.
- **LatestRestorableTime** *(datetime) --*
Specifies the latest time to which a database can be restored with point-in-time restore.
- **Port** *(integer) --*
Specifies the port that the database engine is listening on.
- **MasterUsername** *(string) --*
Contains the master username for the DB cluster.
- **DBClusterOptionGroupMemberships** *(list) --*
Provides the list of option group memberships for this DB cluster.
- *(dict) --*
Contains status information for a DB cluster option group.
- **DBClusterOptionGroupName** *(string) --*
Specifies the name of the DB cluster option group.
- **Status** *(string) --*
Specifies the status of the DB cluster option group.
- **PreferredBackupWindow** *(string) --*
Specifies the daily time range during which automated backups are created if automated backups are enabled, as determined by the ``BackupRetentionPeriod`` .
- **PreferredMaintenanceWindow** *(string) --*
Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
- **ReplicationSourceIdentifier** *(string) --*
Not supported by Neptune.
- **ReadReplicaIdentifiers** *(list) --*
Contains one or more identifiers of the Read Replicas associated with this DB cluster.
- *(string) --*
- **DBClusterMembers** *(list) --*
Provides the list of instances that make up the DB cluster.
- *(dict) --*
Contains information about an instance that is part of a DB cluster.
- **DBInstanceIdentifier** *(string) --*
Specifies the instance identifier for this member of the DB cluster.
- **IsClusterWriter** *(boolean) --*
Value that is ``true`` if the cluster member is the primary instance for the DB cluster and ``false`` otherwise.
- **DBClusterParameterGroupStatus** *(string) --*
Specifies the status of the DB cluster parameter group for this member of the DB cluster.
- **PromotionTier** *(integer) --*
A value that specifies the order in which a Read Replica is promoted to the primary instance after a failure of the existing primary instance.
- **VpcSecurityGroups** *(list) --*
Provides a list of VPC security groups that the DB cluster belongs to.
- *(dict) --*
This data type is used as a response element for queries on VPC security group membership.
- **VpcSecurityGroupId** *(string) --*
The name of the VPC security group.
- **Status** *(string) --*
The status of the VPC security group.
- **HostedZoneId** *(string) --*
Specifies the ID that Amazon Route 53 assigns when you create a hosted zone.
- **StorageEncrypted** *(boolean) --*
Specifies whether the DB cluster is encrypted.
- **KmsKeyId** *(string) --*
If ``StorageEncrypted`` is true, the AWS KMS key identifier for the encrypted DB cluster.
- **DbClusterResourceId** *(string) --*
The AWS Region-unique, immutable identifier for the DB cluster. This identifier is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB cluster is accessed.
- **DBClusterArn** *(string) --*
The Amazon Resource Name (ARN) for the DB cluster.
- **AssociatedRoles** *(list) --*
Provides a list of the AWS Identity and Access Management (IAM) roles that are associated with the DB cluster. IAM roles that are associated with a DB cluster grant permission for the DB cluster to access other AWS services on your behalf.
- *(dict) --*
Describes an AWS Identity and Access Management (IAM) role that is associated with a DB cluster.
- **RoleArn** *(string) --*
The Amazon Resource Name (ARN) of the IAM role that is associated with the DB cluster.
- **Status** *(string) --*
Describes the state of association between the IAM role and the DB cluster. The Status property returns one of the following values:
* ``ACTIVE`` - the IAM role ARN is associated with the DB cluster and can be used to access other AWS services on your behalf.
* ``PENDING`` - the IAM role ARN is being associated with the DB cluster.
* ``INVALID`` - the IAM role ARN is associated with the DB cluster, but the DB cluster is unable to assume the IAM role in order to access other AWS services on your behalf.
- **IAMDatabaseAuthenticationEnabled** *(boolean) --*
True if mapping of AWS Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false.
- **CloneGroupId** *(string) --*
Identifies the clone group to which the DB cluster is associated.
- **ClusterCreateTime** *(datetime) --*
Specifies the time when the DB cluster was created, in Universal Coordinated Time (UTC).
:type AvailabilityZones: list
:param AvailabilityZones:
Provides the list of EC2 Availability Zones that instances in the restored DB cluster can be created in.
- *(string) --*
:type DBClusterIdentifier: string
:param DBClusterIdentifier: **[REQUIRED]**
The name of the DB cluster to create from the DB snapshot or DB cluster snapshot. This parameter isn\'t case-sensitive.
Constraints:
* Must contain from 1 to 63 letters, numbers, or hyphens
* First character must be a letter
* Cannot end with a hyphen or contain two consecutive hyphens
Example: ``my-snapshot-id``
:type SnapshotIdentifier: string
:param SnapshotIdentifier: **[REQUIRED]**
The identifier for the DB snapshot or DB cluster snapshot to restore from.
You can use either the name or the Amazon Resource Name (ARN) to specify a DB cluster snapshot. However, you can use only the ARN to specify a DB snapshot.
Constraints:
* Must match the identifier of an existing Snapshot.
:type Engine: string
:param Engine: **[REQUIRED]**
The database engine to use for the new DB cluster.
Default: The same as source
Constraint: Must be compatible with the engine of the source
:type EngineVersion: string
:param EngineVersion:
The version of the database engine to use for the new DB cluster.
:type Port: integer
:param Port:
The port number on which the new DB cluster accepts connections.
Constraints: Value must be ``1150-65535``
Default: The same port as the original DB cluster.
:type DBSubnetGroupName: string
:param DBSubnetGroupName:
The name of the DB subnet group to use for the new DB cluster.
Constraints: If supplied, must match the name of an existing DBSubnetGroup.
Example: ``mySubnetgroup``
:type DatabaseName: string
:param DatabaseName:
Not supported.
:type OptionGroupName: string
:param OptionGroupName:
The name of the option group to use for the restored DB cluster.
:type VpcSecurityGroupIds: list
:param VpcSecurityGroupIds:
A list of VPC security groups that the new DB cluster will belong to.
- *(string) --*
:type Tags: list
:param Tags:
The tags to be assigned to the restored DB cluster.
- *(dict) --*
Metadata assigned to an Amazon Neptune resource consisting of a key-value pair.
- **Key** *(string) --*
A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can\'t be prefixed with \"aws:\" or \"rds:\". The string can only contain only the set of Unicode letters, digits, white-space, \'_\', \'.\', \'/\', \'=\', \'+\', \'-\' (Java regex: \"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$\").
- **Value** *(string) --*
A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can\'t be prefixed with \"aws:\" or \"rds:\". The string can only contain only the set of Unicode letters, digits, white-space, \'_\', \'.\', \'/\', \'=\', \'+\', \'-\' (Java regex: \"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$\").
:type KmsKeyId: string
:param KmsKeyId:
The AWS KMS key identifier to use when restoring an encrypted DB cluster from a DB snapshot or DB cluster snapshot.
The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are restoring a DB cluster with the same AWS account that owns the KMS encryption key used to encrypt the new DB cluster, then you can use the KMS key alias instead of the ARN for the KMS encryption key.
If you do not specify a value for the ``KmsKeyId`` parameter, then the following will occur:
* If the DB snapshot or DB cluster snapshot in ``SnapshotIdentifier`` is encrypted, then the restored DB cluster is encrypted using the KMS key that was used to encrypt the DB snapshot or DB cluster snapshot.
* If the DB snapshot or DB cluster snapshot in ``SnapshotIdentifier`` is not encrypted, then the restored DB cluster is not encrypted.
:type EnableIAMDatabaseAuthentication: boolean
:param EnableIAMDatabaseAuthentication:
True to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts, and otherwise false.
Default: ``false``
:type DBClusterParameterGroupName: string
:param DBClusterParameterGroupName:
The name of the DB cluster parameter group to associate with the new DB cluster.
Constraints:
* If supplied, must match the name of an existing DBClusterParameterGroup.
:rtype: dict
:returns:
"""
pass
def restore_db_cluster_to_point_in_time(self, DBClusterIdentifier: str, SourceDBClusterIdentifier: str, RestoreType: str = None, RestoreToTime: datetime = None, UseLatestRestorableTime: bool = None, Port: int = None, DBSubnetGroupName: str = None, OptionGroupName: str = None, VpcSecurityGroupIds: List = None, Tags: List = None, KmsKeyId: str = None, EnableIAMDatabaseAuthentication: bool = None, DBClusterParameterGroupName: str = None) -> Dict:
"""
Restores a DB cluster to an arbitrary point in time. Users can restore to any point in time before ``LatestRestorableTime`` for up to ``BackupRetentionPeriod`` days. The target DB cluster is created from the source DB cluster with the same configuration as the original DB cluster, except that the new DB cluster is created with the default DB security group.
.. note::
This action only restores the DB cluster, not the DB instances for that DB cluster. You must invoke the CreateDBInstance action to create DB instances for the restored DB cluster, specifying the identifier of the restored DB cluster in ``DBClusterIdentifier`` . You can create DB instances only after the ``RestoreDBClusterToPointInTime`` action has completed and the DB cluster is available.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/RestoreDBClusterToPointInTime>`_
**Request Syntax**
::
response = client.restore_db_cluster_to_point_in_time(
DBClusterIdentifier='string',
RestoreType='string',
SourceDBClusterIdentifier='string',
RestoreToTime=datetime(2015, 1, 1),
UseLatestRestorableTime=True|False,
Port=123,
DBSubnetGroupName='string',
OptionGroupName='string',
VpcSecurityGroupIds=[
'string',
],
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
KmsKeyId='string',
EnableIAMDatabaseAuthentication=True|False,
DBClusterParameterGroupName='string'
)
**Response Syntax**
::
{
'DBCluster': {
'AllocatedStorage': 123,
'AvailabilityZones': [
'string',
],
'BackupRetentionPeriod': 123,
'CharacterSetName': 'string',
'DatabaseName': 'string',
'DBClusterIdentifier': 'string',
'DBClusterParameterGroup': 'string',
'DBSubnetGroup': 'string',
'Status': 'string',
'PercentProgress': 'string',
'EarliestRestorableTime': datetime(2015, 1, 1),
'Endpoint': 'string',
'ReaderEndpoint': 'string',
'MultiAZ': True|False,
'Engine': 'string',
'EngineVersion': 'string',
'LatestRestorableTime': datetime(2015, 1, 1),
'Port': 123,
'MasterUsername': 'string',
'DBClusterOptionGroupMemberships': [
{
'DBClusterOptionGroupName': 'string',
'Status': 'string'
},
],
'PreferredBackupWindow': 'string',
'PreferredMaintenanceWindow': 'string',
'ReplicationSourceIdentifier': 'string',
'ReadReplicaIdentifiers': [
'string',
],
'DBClusterMembers': [
{
'DBInstanceIdentifier': 'string',
'IsClusterWriter': True|False,
'DBClusterParameterGroupStatus': 'string',
'PromotionTier': 123
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'HostedZoneId': 'string',
'StorageEncrypted': True|False,
'KmsKeyId': 'string',
'DbClusterResourceId': 'string',
'DBClusterArn': 'string',
'AssociatedRoles': [
{
'RoleArn': 'string',
'Status': 'string'
},
],
'IAMDatabaseAuthenticationEnabled': True|False,
'CloneGroupId': 'string',
'ClusterCreateTime': datetime(2015, 1, 1)
}
}
**Response Structure**
- *(dict) --*
- **DBCluster** *(dict) --*
Contains the details of an Amazon Neptune DB cluster.
This data type is used as a response element in the DescribeDBClusters action.
- **AllocatedStorage** *(integer) --*
``AllocatedStorage`` always returns 1, because Neptune DB cluster storage size is not fixed, but instead automatically adjusts as needed.
- **AvailabilityZones** *(list) --*
Provides the list of EC2 Availability Zones that instances in the DB cluster can be created in.
- *(string) --*
- **BackupRetentionPeriod** *(integer) --*
Specifies the number of days for which automatic DB snapshots are retained.
- **CharacterSetName** *(string) --*
If present, specifies the name of the character set that this cluster is associated with.
- **DatabaseName** *(string) --*
Contains the name of the initial database of this DB cluster that was provided at create time, if one was specified when the DB cluster was created. This same name is returned for the life of the DB cluster.
- **DBClusterIdentifier** *(string) --*
Contains a user-supplied DB cluster identifier. This identifier is the unique key that identifies a DB cluster.
- **DBClusterParameterGroup** *(string) --*
Specifies the name of the DB cluster parameter group for the DB cluster.
- **DBSubnetGroup** *(string) --*
Specifies information on the subnet group associated with the DB cluster, including the name, description, and subnets in the subnet group.
- **Status** *(string) --*
Specifies the current state of this DB cluster.
- **PercentProgress** *(string) --*
Specifies the progress of the operation as a percentage.
- **EarliestRestorableTime** *(datetime) --*
Specifies the earliest time to which a database can be restored with point-in-time restore.
- **Endpoint** *(string) --*
Specifies the connection endpoint for the primary instance of the DB cluster.
- **ReaderEndpoint** *(string) --*
The reader endpoint for the DB cluster. The reader endpoint for a DB cluster load-balances connections across the Read Replicas that are available in a DB cluster. As clients request new connections to the reader endpoint, Neptune distributes the connection requests among the Read Replicas in the DB cluster. This functionality can help balance your read workload across multiple Read Replicas in your DB cluster.
If a failover occurs, and the Read Replica that you are connected to is promoted to be the primary instance, your connection is dropped. To continue sending your read workload to other Read Replicas in the cluster, you can then reconnect to the reader endpoint.
- **MultiAZ** *(boolean) --*
Specifies whether the DB cluster has instances in multiple Availability Zones.
- **Engine** *(string) --*
Provides the name of the database engine to be used for this DB cluster.
- **EngineVersion** *(string) --*
Indicates the database engine version.
- **LatestRestorableTime** *(datetime) --*
Specifies the latest time to which a database can be restored with point-in-time restore.
- **Port** *(integer) --*
Specifies the port that the database engine is listening on.
- **MasterUsername** *(string) --*
Contains the master username for the DB cluster.
- **DBClusterOptionGroupMemberships** *(list) --*
Provides the list of option group memberships for this DB cluster.
- *(dict) --*
Contains status information for a DB cluster option group.
- **DBClusterOptionGroupName** *(string) --*
Specifies the name of the DB cluster option group.
- **Status** *(string) --*
Specifies the status of the DB cluster option group.
- **PreferredBackupWindow** *(string) --*
Specifies the daily time range during which automated backups are created if automated backups are enabled, as determined by the ``BackupRetentionPeriod`` .
- **PreferredMaintenanceWindow** *(string) --*
Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
- **ReplicationSourceIdentifier** *(string) --*
Not supported by Neptune.
- **ReadReplicaIdentifiers** *(list) --*
Contains one or more identifiers of the Read Replicas associated with this DB cluster.
- *(string) --*
- **DBClusterMembers** *(list) --*
Provides the list of instances that make up the DB cluster.
- *(dict) --*
Contains information about an instance that is part of a DB cluster.
- **DBInstanceIdentifier** *(string) --*
Specifies the instance identifier for this member of the DB cluster.
- **IsClusterWriter** *(boolean) --*
Value that is ``true`` if the cluster member is the primary instance for the DB cluster and ``false`` otherwise.
- **DBClusterParameterGroupStatus** *(string) --*
Specifies the status of the DB cluster parameter group for this member of the DB cluster.
- **PromotionTier** *(integer) --*
A value that specifies the order in which a Read Replica is promoted to the primary instance after a failure of the existing primary instance.
- **VpcSecurityGroups** *(list) --*
Provides a list of VPC security groups that the DB cluster belongs to.
- *(dict) --*
This data type is used as a response element for queries on VPC security group membership.
- **VpcSecurityGroupId** *(string) --*
The name of the VPC security group.
- **Status** *(string) --*
The status of the VPC security group.
- **HostedZoneId** *(string) --*
Specifies the ID that Amazon Route 53 assigns when you create a hosted zone.
- **StorageEncrypted** *(boolean) --*
Specifies whether the DB cluster is encrypted.
- **KmsKeyId** *(string) --*
If ``StorageEncrypted`` is true, the AWS KMS key identifier for the encrypted DB cluster.
- **DbClusterResourceId** *(string) --*
The AWS Region-unique, immutable identifier for the DB cluster. This identifier is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB cluster is accessed.
- **DBClusterArn** *(string) --*
The Amazon Resource Name (ARN) for the DB cluster.
- **AssociatedRoles** *(list) --*
Provides a list of the AWS Identity and Access Management (IAM) roles that are associated with the DB cluster. IAM roles that are associated with a DB cluster grant permission for the DB cluster to access other AWS services on your behalf.
- *(dict) --*
Describes an AWS Identity and Access Management (IAM) role that is associated with a DB cluster.
- **RoleArn** *(string) --*
The Amazon Resource Name (ARN) of the IAM role that is associated with the DB cluster.
- **Status** *(string) --*
Describes the state of association between the IAM role and the DB cluster. The Status property returns one of the following values:
* ``ACTIVE`` - the IAM role ARN is associated with the DB cluster and can be used to access other AWS services on your behalf.
* ``PENDING`` - the IAM role ARN is being associated with the DB cluster.
* ``INVALID`` - the IAM role ARN is associated with the DB cluster, but the DB cluster is unable to assume the IAM role in order to access other AWS services on your behalf.
- **IAMDatabaseAuthenticationEnabled** *(boolean) --*
True if mapping of AWS Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false.
- **CloneGroupId** *(string) --*
Identifies the clone group to which the DB cluster is associated.
- **ClusterCreateTime** *(datetime) --*
Specifies the time when the DB cluster was created, in Universal Coordinated Time (UTC).
:type DBClusterIdentifier: string
:param DBClusterIdentifier: **[REQUIRED]**
The name of the new DB cluster to be created.
Constraints:
* Must contain from 1 to 63 letters, numbers, or hyphens
* First character must be a letter
* Cannot end with a hyphen or contain two consecutive hyphens
:type RestoreType: string
:param RestoreType:
The type of restore to be performed. The only type of restore currently supported is ``full-copy`` (the default).
:type SourceDBClusterIdentifier: string
:param SourceDBClusterIdentifier: **[REQUIRED]**
The identifier of the source DB cluster from which to restore.
Constraints:
* Must match the identifier of an existing DBCluster.
:type RestoreToTime: datetime
:param RestoreToTime:
The date and time to restore the DB cluster to.
Valid Values: Value must be a time in Universal Coordinated Time (UTC) format
Constraints:
* Must be before the latest restorable time for the DB instance
* Must be specified if ``UseLatestRestorableTime`` parameter is not provided
* Cannot be specified if ``UseLatestRestorableTime`` parameter is true
* Cannot be specified if ``RestoreType`` parameter is ``copy-on-write``
Example: ``2015-03-07T23:45:00Z``
:type UseLatestRestorableTime: boolean
:param UseLatestRestorableTime:
A value that is set to ``true`` to restore the DB cluster to the latest restorable backup time, and ``false`` otherwise.
Default: ``false``
Constraints: Cannot be specified if ``RestoreToTime`` parameter is provided.
:type Port: integer
:param Port:
The port number on which the new DB cluster accepts connections.
Constraints: Value must be ``1150-65535``
Default: The same port as the original DB cluster.
:type DBSubnetGroupName: string
:param DBSubnetGroupName:
The DB subnet group name to use for the new DB cluster.
Constraints: If supplied, must match the name of an existing DBSubnetGroup.
Example: ``mySubnetgroup``
:type OptionGroupName: string
:param OptionGroupName:
The name of the option group for the new DB cluster.
:type VpcSecurityGroupIds: list
:param VpcSecurityGroupIds:
A list of VPC security groups that the new DB cluster belongs to.
- *(string) --*
:type Tags: list
:param Tags:
The tags to be applied to the restored DB cluster.
- *(dict) --*
Metadata assigned to an Amazon Neptune resource consisting of a key-value pair.
- **Key** *(string) --*
A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can\'t be prefixed with \"aws:\" or \"rds:\". The string can only contain only the set of Unicode letters, digits, white-space, \'_\', \'.\', \'/\', \'=\', \'+\', \'-\' (Java regex: \"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$\").
- **Value** *(string) --*
A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can\'t be prefixed with \"aws:\" or \"rds:\". The string can only contain only the set of Unicode letters, digits, white-space, \'_\', \'.\', \'/\', \'=\', \'+\', \'-\' (Java regex: \"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$\").
:type KmsKeyId: string
:param KmsKeyId:
The AWS KMS key identifier to use when restoring an encrypted DB cluster from an encrypted DB cluster.
The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are restoring a DB cluster with the same AWS account that owns the KMS encryption key used to encrypt the new DB cluster, then you can use the KMS key alias instead of the ARN for the KMS encryption key.
You can restore to a new DB cluster and encrypt the new DB cluster with a KMS key that is different than the KMS key used to encrypt the source DB cluster. The new DB cluster is encrypted with the KMS key identified by the ``KmsKeyId`` parameter.
If you do not specify a value for the ``KmsKeyId`` parameter, then the following will occur:
* If the DB cluster is encrypted, then the restored DB cluster is encrypted using the KMS key that was used to encrypt the source DB cluster.
* If the DB cluster is not encrypted, then the restored DB cluster is not encrypted.
If ``DBClusterIdentifier`` refers to a DB cluster that is not encrypted, then the restore request is rejected.
:type EnableIAMDatabaseAuthentication: boolean
:param EnableIAMDatabaseAuthentication:
True to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts, and otherwise false.
Default: ``false``
:type DBClusterParameterGroupName: string
:param DBClusterParameterGroupName:
The name of the DB cluster parameter group to associate with the new DB cluster.
Constraints:
* If supplied, must match the name of an existing DBClusterParameterGroup.
:rtype: dict
:returns:
"""
pass
| 60.407208 | 1,284 | 0.559034 | 47,215 | 494,433 | 5.843164 | 0.026453 | 0.02923 | 0.018355 | 0.008569 | 0.886282 | 0.862968 | 0.842297 | 0.821252 | 0.808232 | 0.800634 | 0 | 0.006332 | 0.355464 | 494,433 | 8,184 | 1,285 | 60.414589 | 0.859379 | 0.841756 | 0 | 0.465649 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.465649 | false | 0.496183 | 0.061069 | 0 | 0.534351 | 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 | 1 | 0 | 0 | 11 |
a494dcba49fca80e1186f6061368bcda1c411138 | 26,072 | py | Python | tests/test_steganography.py | duongntbk/steganosaurus | d521b0a46468af70a2632f25c04000631d513869 | [
"MIT"
] | null | null | null | tests/test_steganography.py | duongntbk/steganosaurus | d521b0a46468af70a2632f25c04000631d513869 | [
"MIT"
] | null | null | null | tests/test_steganography.py | duongntbk/steganosaurus | d521b0a46468af70a2632f25c04000631d513869 | [
"MIT"
] | 1 | 2021-06-17T09:48:11.000Z | 2021-06-17T09:48:11.000Z | # -*- coding: utf-8 -*-
"""
Test for steganography.
"""
import argparse
import os
from collections import namedtuple
import pytest
import steganosaurus.constants as constants
import steganosaurus.hash_utils as hash_utils
from _pytest.monkeypatch import MonkeyPatch
from pytest_mock import mocker
from steganosaurus.fernet_cryptor import FernetCryptor
from steganosaurus.otp_cryptor import OTPCryptor
from steganosaurus.picture_modifier import PictureModifier
from steganosaurus.steganography import Steganography
from steganosaurus.steganography import \
is_positive_number as is_positive_number
from steganosaurus.steganography import main as steganography_main
from steganosaurus.steganography import verify_argument as steganography_verify
monkeypatch = MonkeyPatch()
fernet_cryptor = FernetCryptor(constants.KEY_STRETCH_ITERATION)
otp_cryptor = OTPCryptor()
picture_modifier = PictureModifier(2)
secret_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'secret.txt')
test_data_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'medium.bmp')
with open(secret_path, mode='rb') as file:
secret_data = file.read()
with open(test_data_path, mode='rb') as file:
medium_data = file.read()
def test_hide_file_fernet(mocker):
'''
Can hide hidden data into medium.
Hidden data is encrypted using Fernet encrpytion (AES-128).
'''
steganography = Steganography(picture_modifier, fernet_cryptor)
password = 'dummy_password'
format = 'BMP'
password_hash = os.urandom(constants.BCRYPT_HASH_SIZE)
pbkdf_salt = os.urandom(constants.FERNET_SALT_SIZE)
encrypted = os.urandom(128)
medium_with_secret = os.urandom(1024)
mocker.patch.object(PictureModifier, 'load_medium')
mocker.patch.object(FernetCryptor, 'get_steganography_password')
FernetCryptor.get_steganography_password.return_value = password
mocker.patch.object(hash_utils, 'calculate_hash')
hash_utils.calculate_hash.return_value = password_hash
mocker.patch.object(PictureModifier, 'hide_data')
mocker.patch.object(FernetCryptor, 'set_pbkdf_salt')
FernetCryptor.set_pbkdf_salt.return_value = pbkdf_salt
fernet_cryptor.pbkdf_salt = pbkdf_salt
mocker.patch.object(FernetCryptor, 'encrypt')
FernetCryptor.encrypt.return_value = encrypted
mocker.patch.object(PictureModifier, 'export_medium')
PictureModifier.export_medium.return_value = medium_with_secret
assert steganography.hide_file(password, medium_data, secret_data, format) == medium_with_secret
assert fernet_cryptor.need_pbkdf_salt
PictureModifier.load_medium.assert_called_once_with(medium_data)
FernetCryptor.get_steganography_password.assert_called_once_with(password)
hash_utils.calculate_hash.assert_called_once_with(password, constants.HASH_FACTOR)
PictureModifier.hide_data.assert_any_call(password_hash)
FernetCryptor.set_pbkdf_salt.assert_called_once_with()
assert fernet_cryptor.pbkdf_salt == pbkdf_salt
PictureModifier.hide_data.assert_any_call(pbkdf_salt)
FernetCryptor.encrypt.assert_any_call(password, secret_data)
PictureModifier.hide_data.assert_any_call(len(encrypted).to_bytes(constants.DATA_LENGTH_SIZE, byteorder='big'))
PictureModifier.hide_data.assert_any_call(encrypted)
PictureModifier.export_medium.assert_any_call(format)
def test_hide_file_otp(mocker):
'''
Can hide hidden data into medium.
Hidden data is encrypted using OTP encryption.
'''
steganography = Steganography(picture_modifier, otp_cryptor)
password = 'pad.bin'
steganography_password = '8a062762b30368402c04958a419eb1f857c5d5a1'
medium_path = 'dummy_medium'
format = 'BMP'
password_hash = os.urandom(constants.BCRYPT_HASH_SIZE)
encrypted = os.urandom(128)
medium_with_secret = os.urandom(1024)
mocker.patch.object(PictureModifier, 'load_medium')
mocker.patch.object(OTPCryptor, 'get_steganography_password')
OTPCryptor.get_steganography_password.return_value = steganography_password
mocker.patch.object(hash_utils, 'calculate_hash')
hash_utils.calculate_hash.return_value = password_hash
mocker.patch.object(PictureModifier, 'hide_data')
mocker.patch.object(OTPCryptor, 'encrypt')
OTPCryptor.encrypt.return_value = encrypted
mocker.patch.object(PictureModifier, 'export_medium')
PictureModifier.export_medium.return_value = medium_with_secret
assert steganography.hide_file(password, medium_path, secret_data, format) == medium_with_secret
assert not otp_cryptor.need_pbkdf_salt
PictureModifier.load_medium.assert_called_once_with(medium_path)
OTPCryptor.get_steganography_password.assert_called_once_with(password)
hash_utils.calculate_hash.assert_called_once_with(steganography_password, constants.HASH_FACTOR)
PictureModifier.hide_data.assert_any_call(password_hash)
OTPCryptor.encrypt.assert_any_call(password, secret_data)
PictureModifier.hide_data.assert_any_call(len(encrypted).to_bytes(constants.DATA_LENGTH_SIZE, byteorder='big'))
PictureModifier.hide_data.assert_any_call(encrypted)
PictureModifier.export_medium.assert_any_call(format)
def test_get_file_fernet(mocker):
'''
Can retrieve secret file from medium.
Secret file is encrypted using Fernet encrpytion (AES-128).
'''
steganography = Steganography(picture_modifier, fernet_cryptor)
password = 'dummy_password'
medium_path = 'dummy_medium'
password_hash = os.urandom(constants.BCRYPT_HASH_SIZE)
pbkdf_salt = os.urandom(constants.FERNET_SALT_SIZE)
encrypted = os.urandom(2048)
encrypted_file_size = len(encrypted).to_bytes(constants.DATA_LENGTH_SIZE, byteorder='big')
hidden_data_list = [
password_hash,
pbkdf_salt,
encrypted_file_size,
encrypted
]
secret_data = os.urandom(1024)
mocker.patch.object(PictureModifier, 'load_medium')
mocker.patch.object(PictureModifier, 'get_data', side_effect=hidden_data_list)
mocker.patch.object(hash_utils, 'verify_hash')
hash_utils.verify_hash.return_value = True
mocker.patch.object(FernetCryptor, 'get_steganography_password')
FernetCryptor.get_steganography_password.return_value = password
mocker.patch.object(FernetCryptor, 'decrypt')
FernetCryptor.decrypt.return_value = secret_data
assert steganography.get_file(password, medium_path) == secret_data
assert fernet_cryptor.need_pbkdf_salt
PictureModifier.load_medium.assert_called_once_with(medium_path)
PictureModifier.get_data.assert_any_call(constants.BCRYPT_HASH_SIZE)
FernetCryptor.get_steganography_password.assert_called_once_with(password)
PictureModifier.get_data.assert_any_call(constants.FERNET_SALT_SIZE)
assert fernet_cryptor.pbkdf_salt == pbkdf_salt
PictureModifier.get_data.assert_any_call(len(encrypted))
FernetCryptor.decrypt.assert_called_once_with(password, encrypted)
def test_get_file_otp(mocker):
'''
Can retrieve secret file from medium.
Secret file is encrypted using OTP encrpytion.
'''
steganography = Steganography(picture_modifier, otp_cryptor)
password = 'pad.bin'
steganography_password = '8a062762b30368402c04958a419eb1f857c5d5a1'
medium_path = 'dummy_medium'
password_hash = os.urandom(constants.BCRYPT_HASH_SIZE)
encrypted = os.urandom(2048)
encrypted_file_size = len(encrypted).to_bytes(constants.DATA_LENGTH_SIZE, byteorder='big')
hidden_data_list = [
password_hash,
encrypted_file_size,
encrypted
]
secret_data = os.urandom(1024)
mocker.patch.object(PictureModifier, 'load_medium')
mocker.patch.object(PictureModifier, 'get_data', side_effect=hidden_data_list)
mocker.patch.object(hash_utils, 'verify_hash')
hash_utils.verify_hash.return_value = True
mocker.patch.object(OTPCryptor, 'get_steganography_password')
OTPCryptor.get_steganography_password.return_value = steganography_password
mocker.patch.object(OTPCryptor, 'decrypt')
OTPCryptor.decrypt.return_value = secret_data
assert steganography.get_file(password, medium_path) == secret_data
assert not otp_cryptor.need_pbkdf_salt
PictureModifier.load_medium.assert_called_once_with(medium_path)
PictureModifier.get_data.assert_any_call(constants.BCRYPT_HASH_SIZE)
OTPCryptor.get_steganography_password.assert_called_once_with(password)
PictureModifier.get_data.assert_any_call(len(encrypted))
OTPCryptor.decrypt.assert_called_once_with(password, encrypted)
def test_get_file_wrong_password(mocker):
'''
If steganography password is incorrect, raise PermissionError.
'''
encryptors = [
fernet_cryptor,
otp_cryptor
]
for encryptor in encryptors:
steganography = Steganography(picture_modifier, encryptor)
password = 'dummy_password'
otp_pad = os.urandom(20)
medium_path = 'dummy_medium'
password_hash = os.urandom(constants.BCRYPT_HASH_SIZE)
mocker.patch.object(PictureModifier, 'load_medium')
mocker.patch.object(PictureModifier, 'get_data')
PictureModifier.get_data.return_value = password_hash
mocker.patch.object(hash_utils, 'verify_hash')
hash_utils.verify_hash.return_value = False
mocker.patch.object(FernetCryptor, 'get_steganography_password')
FernetCryptor.get_steganography_password.return_value = password
with pytest.raises(PermissionError) as pe:
if isinstance(encryptor, FernetCryptor):
steganography.get_file(password, medium_path)
else:
steganography.get_file(otp_pad, medium_path)
assert str(pe.value) == constants.STEGANOGRAPHY_NOT_FOUND_ERROR
def test_main_encryption_fernet(mocker):
'''
This package can be called straight from command line.
Can encrypt data using Fernet encryption (AES-128).
'''
my_namespace = namedtuple('Namespace', ['mode', 'encryption', 'key_stretch', 'level','medium','password','secret','result','format'])
args = my_namespace(mode='encrypt', encryption='aes', key_stretch='100000', \
level='2', medium='medium.bmp', password='password', \
secret='secret.txt', result='hidden.bmp', format='BMP')
dummyEncryptor = FernetCryptor(int(args.key_stretch))
dummyModifier = PictureModifier(int(args.level))
with mocker.patch('builtins.open', new_callable=mocker.mock_open()) as mo:
with monkeypatch.context() as m:
m.setattr(argparse.ArgumentParser, 'parse_args', lambda self: args)
mocker.patch.object(FernetCryptor, '__init__')
FernetCryptor.__init__.return_value = None
mocker.patch.object(PictureModifier, '__init__')
PictureModifier.__init__.return_value = None
mocker.patch.object(Steganography, 'hide_file')
steganography_main()
mo.assert_any_call(args.medium, 'rb')
mo.assert_any_call(args.secret, 'rb')
mo.assert_any_call(args.result, 'wb')
FernetCryptor.__init__.assert_called_once_with(int(args.key_stretch))
PictureModifier.__init__.assert_called_once_with(int(args.level))
assert Steganography.hide_file.call_count == 1
def test_main_decryption_fernet(mocker):
'''
This package can be called straight from command line.
Can decrypt data using Fernet encryption (AES-128).
'''
my_namespace = namedtuple('Namespace', ['mode', 'encryption', 'key_stretch', 'level','medium','password','secret','result','format'])
args = my_namespace(mode='decrypt', encryption='aes', key_stretch='100000', \
level='2', medium='medium.bmp', password='password', \
secret='secret.txt', result='hidden.bmp', format='BMP')
dummyEncryptor = FernetCryptor(int(args.key_stretch))
dummyModifier = PictureModifier(int(args.level))
with mocker.patch('builtins.open', new_callable=mocker.mock_open()) as mo:
with monkeypatch.context() as m:
m.setattr(argparse.ArgumentParser, 'parse_args', lambda self: args)
mocker.patch.object(FernetCryptor, '__init__')
FernetCryptor.__init__.return_value = None
mocker.patch.object(PictureModifier, '__init__')
PictureModifier.__init__.return_value = None
mocker.patch.object(Steganography, 'get_file')
steganography_main()
mo.assert_any_call(args.medium, 'rb')
mo.assert_any_call(args.result, 'wb')
FernetCryptor.__init__.assert_called_once_with(int(args.key_stretch))
PictureModifier.__init__.assert_called_once_with(int(args.level))
assert Steganography.get_file.call_count == 1
def test_main_encryption_otp(mocker):
'''
This package can be called straight from command line.
Can encrypt data using OTP encryption.
'''
my_namespace = namedtuple('Namespace', ['mode', 'encryption', 'key_stretch', 'level','medium','password','secret','result','format'])
args = my_namespace(mode='encrypt', encryption='otp', key_stretch=None, \
level='2', medium='medium.bmp', password='key.bin', \
secret='secret.txt', result='hidden.bmp', format='BMP')
dummyEncryptor = OTPCryptor()
dummyModifier = PictureModifier(int(args.level))
with mocker.patch('builtins.open', new_callable=mocker.mock_open()) as mo:
with monkeypatch.context() as m:
m.setattr(argparse.ArgumentParser, 'parse_args', lambda self: args)
mocker.patch.object(OTPCryptor, '__init__')
OTPCryptor.__init__.return_value = None
mocker.patch.object(PictureModifier, '__init__')
PictureModifier.__init__.return_value = None
mocker.patch.object(Steganography, 'hide_file')
steganography_main()
mo.assert_any_call(args.password, 'rb')
mo.assert_any_call(args.secret, 'rb')
mo.assert_any_call(args.result, 'wb')
OTPCryptor.__init__.assert_called_once_with()
PictureModifier.__init__.assert_called_once_with(int(args.level))
assert Steganography.hide_file.call_count == 1
def test_main_decryption_otp(mocker):
'''
This package can be called straight from command line.
Can decrypt data using OTP encryption.
'''
my_namespace = namedtuple('Namespace', ['mode', 'encryption', 'key_stretch', 'level','medium','password','secret','result','format'])
args = my_namespace(mode='decrypt', encryption='otp', key_stretch=None, \
level='2', medium='medium.bmp', password='key.bin', \
secret='secret.txt', result='hidden.bmp', format='BMP')
dummyEncryptor = OTPCryptor()
dummyModifier = PictureModifier(int(args.level))
with mocker.patch('builtins.open', new_callable=mocker.mock_open()) as mo:
with monkeypatch.context() as m:
m.setattr(argparse.ArgumentParser, 'parse_args', lambda self: args)
mocker.patch.object(OTPCryptor, '__init__')
OTPCryptor.__init__.return_value = None
mocker.patch.object(PictureModifier, '__init__')
PictureModifier.__init__.return_value = None
mocker.patch.object(Steganography, 'get_file')
steganography_main()
mo.assert_any_call(args.password, 'rb')
mo.assert_any_call(args.result, 'wb')
OTPCryptor.__init__.assert_called_once_with()
PictureModifier.__init__.assert_called_once_with(int(args.level))
assert Steganography.get_file.call_count == 1
def test_main_invalid_argument(mocker):
'''
If any argument is invalid, stop executing.
'''
my_namespace = namedtuple('Namespace', ['mode', 'encryption', 'key_stretch', 'level','medium','password','secret','result','format'])
args_list = [
my_namespace(mode=None, encryption='otp', key_stretch=None, \
level='2', medium='medium.bmp', password='password', \
secret='secret.txt', result='hidden.bmp', format='BMP'),
my_namespace(mode='encrypt', encryption=None, key_stretch=None, \
level='2', medium='medium.bmp', password='password', \
secret='secret.txt', result='hidden.bmp', format='BMP'),
my_namespace(mode='encrypt', encryption='otp', key_stretch=None, \
level=None, medium='medium.bmp', password='password', \
secret='secret.txt', result='hidden.bmp', format='BMP'),
my_namespace(mode='encrypt', encryption='otp', key_stretch=None, \
level='2', medium=None, password='password', \
secret='secret.txt', result='hidden.bmp', format='BMP'),
my_namespace(mode='encrypt', encryption='otp', key_stretch=None, \
level='2', medium='medium.bmp', password=None, \
secret='secret.txt', result='hidden.bmp', format='BMP'),
my_namespace(mode='encrypt', encryption='otp', key_stretch=None, \
level='2', medium='medium.bmp', password='password', \
secret=None, result='hidden.bmp', format='BMP'), \
my_namespace(mode='encrypt', encryption='otp', key_stretch=None, \
level='2', medium=None, password='password', \
secret='secret.txt', result=None, format='BMP'),
my_namespace(mode='encrypt', encryption='otp', key_stretch=None, \
level='2', medium=None, password='password', \
secret='secret.txt', result='hidden.bmp', format=None),
my_namespace(mode='encrypt', encryption='otp', key_stretch=None, \
level='2', medium='medium.bmp', password='password', \
secret='secret.txt', result='hidden.bmp', format='BMP1'), \
my_namespace(mode='decrypt', encryption='otp1', key_stretch=None, \
level='2', medium='medium.bmp', password='password', \
secret='secret.txt', result='hidden.bmp', format='BMP'), \
my_namespace(mode='decrypt', encryption='otp', key_stretch=None, \
level='a', medium='medium.bmp', password='password', \
secret='secret.txt', result='hidden.bmp', format='BMP'), \
my_namespace(mode='decrypt', encryption='aes', key_stretch=None, \
level='2', medium='medium.bmp', password='password', \
secret='secret.txt', result='hidden.bmp', format='BMP'), \
my_namespace(mode='decrypt', encryption='aes', key_stretch=None, \
level='-2', medium='medium.bmp', password='password', \
secret='secret.txt', result='hidden.bmp', format='BMP'), \
my_namespace(mode='decrypt', encryption='aes', key_stretch=None, \
level='9', medium='medium.bmp', password='password', \
secret='secret.txt', result='hidden.bmp', format='BMP'), \
my_namespace(mode='decrypt', encryption='otp', key_stretch=None, \
level='2', medium=None, password='password', \
secret='secret.txt', result=None, format='BMP')
]
for args in args_list:
with monkeypatch.context() as m:
m.setattr(argparse.ArgumentParser, 'parse_args', lambda self: args)
mocker.patch.object(Steganography, 'get_file')
mocker.patch.object(Steganography, 'hide_file')
mocker.patch.object(OTPCryptor, '__init__')
OTPCryptor.__init__.return_value = None
mocker.patch.object(FernetCryptor, '__init__')
FernetCryptor.__init__.return_value = None
mocker.patch.object(PictureModifier, '__init__')
PictureModifier.__init__.return_value = None
steganography_main()
OTPCryptor.__init__.assert_not_called()
FernetCryptor.__init__.assert_not_called()
PictureModifier.__init__.assert_not_called()
Steganography.get_file.assert_not_called()
Steganography.hide_file.assert_not_called()
def test_verify_argument():
'''
Can verify arguments list.
If all arguments are valid, return True.
'''
my_namespace = namedtuple('Namespace', ['mode', 'encryption', 'key_stretch', 'level','medium','password','secret','result','format'])
args_list = [
my_namespace(mode='encrypt', encryption='otp', key_stretch=None, \
level='2', medium='medium.bmp', password='password', \
secret='secret.txt', result='hidden.bmp', format='BMP'), \
my_namespace(mode='decrypt', encryption='otp', key_stretch=None, \
level='1', medium='medium.bmp', password='password', \
secret=None, result='secret.txt', format=None), \
my_namespace(mode='decrypt', encryption='aes', key_stretch='100000', \
level='8', medium='medium.bmp', password='password', \
secret='secret.txt', result='hidden.bmp', format='BMP'), \
my_namespace(mode='encrypt', encryption='otp', key_stretch=None, \
level='2', medium='medium.bmp', password='password', \
secret='secret.txt', result='hidden.bmp', format='PNG'), \
]
for args in args_list:
assert steganography_verify(args) == True
def test_verify_argument_error():
'''
If any argument in arguments list is invalid, return False.
'''
my_namespace = namedtuple('Namespace', ['mode', 'encryption', 'key_stretch', 'level','medium','password','secret','result','format'])
args_list = [
my_namespace(mode=None, encryption='otp', key_stretch=None, \
level='2', medium='medium.bmp', password='password', \
secret='secret.txt', result='hidden.bmp', format='BMP'),
my_namespace(mode='encrypt', encryption=None, key_stretch=None, \
level='2', medium='medium.bmp', password='password', \
secret='secret.txt', result='hidden.bmp', format='BMP'),
my_namespace(mode='encrypt', encryption='otp', key_stretch=None, \
level=None, medium='medium.bmp', password='password', \
secret='secret.txt', result='hidden.bmp', format='BMP'),
my_namespace(mode='encrypt', encryption='otp', key_stretch=None, \
level='2', medium=None, password='password', \
secret='secret.txt', result='hidden.bmp', format='BMP'),
my_namespace(mode='encrypt', encryption='otp', key_stretch=None, \
level='2', medium='medium.bmp', password=None, \
secret='secret.txt', result='hidden.bmp', format='BMP'),
my_namespace(mode='encrypt', encryption='otp', key_stretch=None, \
level='2', medium='medium.bmp', password='password', \
secret=None, result='hidden.bmp', format='BMP'), \
my_namespace(mode='encrypt', encryption='otp', key_stretch=None, \
level='2', medium=None, password='password', \
secret='secret.txt', result=None, format='BMP'),
my_namespace(mode='encrypt', encryption='otp', key_stretch=None, \
level='2', medium=None, password='password', \
secret='secret.txt', result='hidden.bmp', format=None),
my_namespace(mode='encrypt', encryption='otp', key_stretch=None, \
level='2', medium='medium.bmp', password='password', \
secret='secret.txt', result='hidden.bmp', format='JPEG'), \
my_namespace(mode='decrypt', encryption='otp1', key_stretch=None, \
level='2', medium='medium.bmp', password='password', \
secret='secret.txt', result='hidden.bmp', format='BMP'), \
my_namespace(mode='decrypt', encryption='otp', key_stretch=None, \
level='a', medium='medium.bmp', password='password', \
secret='secret.txt', result='hidden.bmp', format='BMP'), \
my_namespace(mode='decrypt', encryption='aes', key_stretch=None, \
level='2', medium='medium.bmp', password='password', \
secret='secret.txt', result='hidden.bmp', format='BMP'), \
my_namespace(mode='decrypt', encryption='aes', key_stretch=None, \
level='-2', medium='medium.bmp', password='password', \
secret='secret.txt', result='hidden.bmp', format='BMP'), \
my_namespace(mode='decrypt', encryption='aes', key_stretch=None, \
level='9', medium='medium.bmp', password='password', \
secret='secret.txt', result='hidden.bmp', format='BMP'), \
my_namespace(mode='decrypt', encryption='otp', key_stretch=None, \
level='2', medium=None, password='password', \
secret='secret.txt', result=None, format='BMP')
]
for args in args_list:
assert steganography_verify(args) == False
def test_is_positive_number():
'''
Can check if an object can be converted into a positive number.
'''
inputs = [
'1',
'10',
'+10',
'20 ',
' 15',
None,
[],
object,
'-1',
'-20 ',
' -30',
]
results = [
True,
True,
True,
True,
True,
False,
False,
False,
False,
False,
]
for input, result in zip(inputs, results):
assert is_positive_number(input) == result | 46.309059 | 137 | 0.661399 | 2,891 | 26,072 | 5.705638 | 0.062262 | 0.030312 | 0.045347 | 0.044559 | 0.857108 | 0.854562 | 0.845347 | 0.839527 | 0.827705 | 0.82037 | 0 | 0.008761 | 0.216324 | 26,072 | 563 | 138 | 46.309059 | 0.798551 | 0.042383 | 0 | 0.718676 | 0 | 0 | 0.127907 | 0.008492 | 0 | 0 | 0 | 0 | 0.165485 | 1 | 0.030733 | false | 0.217494 | 0.035461 | 0 | 0.066194 | 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 |
a49c80c2118aab0c9b20f055eaff4e309ce856c2 | 48,388 | py | Python | tests.py | osuosl/formsender | e6679177960c3c9e54b6e73f435168461415b4c7 | [
"Apache-2.0"
] | 3 | 2015-07-14T01:47:30.000Z | 2019-03-29T00:13:08.000Z | tests.py | osuosl/formsender | e6679177960c3c9e54b6e73f435168461415b4c7 | [
"Apache-2.0"
] | 74 | 2015-07-01T21:28:40.000Z | 2021-08-18T22:44:48.000Z | tests.py | osuosl/formsender | e6679177960c3c9e54b6e73f435168461415b4c7 | [
"Apache-2.0"
] | 1 | 2016-08-02T07:57:19.000Z | 2016-08-02T07:57:19.000Z | import smtplib
import unittest
import werkzeug
from werkzeug.wrappers import Request
from werkzeug.test import EnvironBuilder
from mock import Mock, patch
from email.mime.text import MIMEText
import conf
import time
import request_handler as handler
class TestFormsender(unittest.TestCase):
def test_create_msg_with_content(self):
"""
Tests create_msg with content in the POST request
Checks that each element in the request is returned create_msg
"""
builder = EnvironBuilder(method='POST',
data={'foo': 'this is some text',
'file': 'my file contents',
'test': 'test.txt',
'redirect': 'http://www.example.com'})
env = builder.get_environ()
req = Request(env)
self.assertEqual(handler.create_msg(req)['foo'], builder.form['foo'])
self.assertEqual(handler.create_msg(req)['file'], builder.form['file'])
self.assertEqual(handler.create_msg(req)['test'], builder.form['test'])
def test_create_msg_no_content(self):
"""
Tests create_msg with no content in the POST request
Checks that create_msg returns None
"""
builder = EnvironBuilder(method='POST', data={})
env = builder.get_environ()
req = Request(env)
self.assertEquals(handler.create_msg(req), None)
def test_create_msg_with_content_get_method(self):
"""
Tests create_msg with content in a GET request
Checks that create_msg returns None
"""
builder = EnvironBuilder(method='GET',
data={'foo': 'this is some text',
'file': 'my file contents',
'test': 'test.txt'})
env = builder.get_environ()
req = Request(env)
self.assertEquals(handler.create_msg(req), None)
def test_send_email(self):
"""
Tests send_email
send_email returns True when it successfully sends an email to a
default address and errors out when unsuccessful.
"""
# Build test environment
builder = EnvironBuilder(method='POST',
data={'name': 'Valid Guy',
'email': 'example@osuosl.org',
'last_name': '',
'token': conf.TOKEN,
'redirect': 'http://www.example.com'})
env = builder.get_environ()
req = Request(env)
# Construct message for assertion
msg = handler.create_msg(req)
msg_send = MIMEText(str(msg))
msg_subj = handler.set_mail_subject(msg)
msg_send['Subject'] = msg_subj
msg_send['To'] = conf.EMAIL['default']
msg_send['Sender'] = conf.SENDER
# Mock smtp so it doesn't send an actual email
with patch("smtplib.SMTP") as mock_smtp:
instance = mock_smtp.return_value
# Call send_email and assert sendmail was called correctly
handler.create_app()
handler.send_email(msg, msg_subj)
instance.sendmail.assert_called_with(conf.FROM['from_default'],
conf.EMAIL['default'],
msg_send.as_string())
@patch('request_handler.validate_email')
def test_validations_valid_data(self, mock_validate_email):
"""
Tests the form validation with valid data.
on_form_page checks for valid fields in submitted form and
returns an error message if an invalid field is found.
"""
builder = EnvironBuilder(method='POST',
data={'name': 'Valid Guy',
'email': 'example@osuosl.org',
'last_name': '',
'token': conf.TOKEN,
'redirect': 'http://www.example.com'})
env = builder.get_environ()
req = Request(env)
# Mock external validate_email so returns true in Travis
mock_validate_email.return_value = True
app = handler.create_app()
# Mock sendmail function so it doesn't send an actual email
smtplib.SMTP = Mock('smtplib.SMTP')
app.on_form_page(req)
self.assertEquals(app.error, None)
@patch('request_handler.validate_email')
def test_validations_invalid_name(self, mock_validate_email):
"""
Tests the form validation with an invalid name.
on_form_page checks for valid fields in submitted form and
returns an error message if an invalid field is found.
Invalid name field causes an 'Invalid Name' error.
"""
builder = EnvironBuilder(method='POST',
data={'name': ' ',
'email': 'example@osuosl.org',
'last_name': '',
'token': conf.TOKEN,
'redirect': 'http://www.example.com'})
env = builder.get_environ()
req = Request(env)
# Mock external validate_email so returns true in Travis
mock_validate_email.return_value = True
app = handler.create_app()
# Mock sendmail function so it doesn't send an actual email
smtplib.SMTP = Mock('smtplib.SMTP')
app.on_form_page(req)
self.assertEqual(app.error, 'Invalid Name')
@patch('request_handler.validate_email')
def test_validations_invalid_email(self, mock_validate_email):
"""
Tests the form validation with an invalid email.
on_form_page checks for valid fields in submitted form and
returns an error message if an invalid field is found.
Invalid email field causes an 'Invalid Email' error.
"""
builder = EnvironBuilder(method='POST',
data={'name': 'Valid Guy',
'email': 'invalid@example.com',
'last_name': '',
'token': conf.TOKEN,
'redirect': 'http://www.example.com'})
env = builder.get_environ()
req = Request(env)
# Mock external validate_email so returns false in Travis
mock_validate_email.return_value = False
app = handler.create_app()
# Mock sendmail function so it doesn't send an actual email
smtplib.SMTP = Mock('smtplib.SMTP')
app.on_form_page(req)
self.assertEqual(app.error, 'Invalid Email')
@patch('request_handler.validate_email')
def test_validations_invalid_hidden(self, mock_validate_email):
"""
Tests the form validation with content in the hidden last_name field.
on_form_page checks for valid fields in submitted form and
returns an error message if an invalid field is found.
Content in the hidden last_name field causes an 'Improper Form
Submission' error.
"""
builder = EnvironBuilder(method='POST',
data={'name': 'Valid Guy',
'email': 'example@osuosl.org',
'last_name': '!',
'token': conf.TOKEN,
'redirect': 'http://www.example.com'})
env = builder.get_environ()
req = Request(env)
# Mock external validate_email so returns true in Travis
mock_validate_email.return_value = True
app = handler.create_app()
# Mock sendmail function so it doesn't send an actual email
smtplib.SMTP = Mock('smtplib.SMTP')
app.on_form_page(req)
self.assertEqual(app.error, 'Improper Form Submission')
@patch('request_handler.validate_email')
def test_validations_invalid_token(self, mock_validate_email):
"""
Tests the form validation with an invalid token.
on_form_page checks for valid fields in submitted form and
returns an error message if an invalid field is found.
An invalid token causes the 'Improper Form Submission' error.
"""
builder = EnvironBuilder(method='POST',
data={'name': 'Valid Guy',
'email': 'example@osuosl.org',
'last_name': '',
'token': 'evilrobot',
'redirect': 'http://www.example.com'})
env = builder.get_environ()
req = Request(env)
# Mock external validate_email so returns true in Travis
mock_validate_email.return_value = True
app = handler.create_app()
# Mock sendmail function so it doesn't send an actual email
smtplib.SMTP = Mock('smtplib.SMTP')
app.on_form_page(req)
self.assertEqual(app.error, 'Improper Form Submission')
@patch('request_handler.validate_email')
def test_validations_invalid_fields_to_join(self, mock_validate_email):
"""
Tests the form validation with an invalid 'fields_to_join' field.
on_form_page checks for valid fields in submitted form and
returns an error message if an invalid field is found.
An invalid token causes the 'Improper Form Submission' error.
"""
builder = EnvironBuilder(method='POST',
data={'name': 'Valid Guy',
'email': 'example@osuosl.org',
'last_name': '',
'token': conf.TOKEN,
'redirect': 'http://www.example.com',
'fields_to_join': 'name,missing,email'})
env = builder.get_environ()
req = Request(env)
# Mock external validate_email so returns true in Travis
mock_validate_email.return_value = True
app = handler.create_app()
# Mock sendmail function so it doesn't send an actual email
smtplib.SMTP = Mock('smtplib.SMTP')
app.on_form_page(req)
self.assertEqual(app.error, 'Improper Form Submission')
@patch('request_handler.validate_email')
def test_is_valid_email_with_valid(self, mock_validate_email):
"""
Tests is_valid_email with a valid email
is_valid_email checks that the email submitted to the form is
valid and exists. This function call should return true.
"""
builder = EnvironBuilder(method='POST',
data={'email': 'example@osuosl.org'})
env = builder.get_environ()
req = Request(env)
# Mock external validate_email so returns true in Travis
mock_validate_email.return_value = True
self.assertTrue(handler.is_valid_email(req))
def test_validate_name_with_valid(self):
"""
Tests validate_name with a valid name
validate_name checks that the name submitted to the form does
not contain disallowed characters. This function call should return
true.
"""
builder = EnvironBuilder(method='POST', data={'name': 'Matthew'})
env = builder.get_environ()
req = Request(env)
self.assertTrue(handler.validate_name(req))
def test_validate_name_with_invalid(self):
"""
Tests validate_name with an invalid name
validate_name checks that the name submitted to the form does
not contain disallowed characters. This function call should
return false.
"""
builder = EnvironBuilder(method='POST', data={'name': ' '})
env = builder.get_environ()
req = Request(env)
self.assertFalse(handler.validate_name(req))
def test_is_hidden_field_empty_empty(self):
"""
Tests is_hidden_field_empty with 'last_name' field empty
is_hidden_field_empty checks that the last_name field in the form
is empty. This function call should return true.
"""
builder = EnvironBuilder(method='POST', data={'last_name': ''})
env = builder.get_environ()
req = Request(env)
self.assertTrue(handler.is_hidden_field_empty(req))
def test_is_hidden_field_empty_full(self):
"""
Tests is_hidden_field_empty with contents in 'last_name' field
is_hidden_field_empty checks that the last_name field in the form
is empty. This function call should return false.
"""
builder = EnvironBuilder(method='POST', data={'last_name': 'nope'})
env = builder.get_environ()
req = Request(env)
self.assertFalse(handler.is_hidden_field_empty(req))
def test_is_valid_token_valid(self):
"""
Tests is_valid_token with TOKEN defined in conf.py
is_valid_token checks that the token provided by the form matches
token described in the settings file. This function call should
return true.
"""
builder = EnvironBuilder(method='POST', data={'token': conf.TOKEN})
env = builder.get_environ()
req = Request(env)
self.assertTrue(handler.is_valid_token(req))
def test_is_valid_token_invalid(self):
"""
Tests is_valid_token with invalid token
is_valid_token checks that the token provided by the form matches
token described in the settings file. This function call should
return false.
"""
builder = EnvironBuilder(method='POST', data={'token': 'imarobot'})
env = builder.get_environ()
req = Request(env)
self.assertFalse(handler.is_valid_token(req))
@patch('request_handler.validate_email')
def test_rate_limiter_valid_rate(self, mock_validate_email):
"""
Tests rate limiter with a valid rate
"""
builder = EnvironBuilder(method='POST',
data={'name': 'Valid Guy',
'email': 'example@osuosl.org',
'last_name': '',
'token': conf.TOKEN,
'redirect': 'http://www.example.com'})
# Mock validate email so returns true in Travis
mock_validate_email.return_value = True
# Mock sendmail function so it doesn't send an actual email
smtplib.SMTP = Mock('smtplib.SMTP')
app = handler.create_app()
for i in range(conf.CEILING - 1):
env = builder.get_environ()
req = Request(env)
resp = app.on_form_page(req)
# Avoid duplicate form error
builder.form['name'] = str(i) + builder.form['name']
self.assertEqual(resp.status_code, 302)
self.assertEquals(app.error, None)
@patch('request_handler.validate_email')
def test_rate_limiter_invalid_rate(self, mock_validate_email):
"""
Tests rate limiter with an invalid rate
"""
builder = EnvironBuilder(method='POST',
data={'name': 'Valid Guy',
'email': 'example@osuosl.org',
'last_name': '',
'token': conf.TOKEN,
'redirect': 'http://www.example.com'})
# Mock validate email so returns true in Travis
mock_validate_email.return_value = True
env = builder.get_environ()
req = Request(env)
app = handler.create_app()
# Mock sendmail function so it doesn't send an actual email
smtplib.SMTP = Mock('smtplib.SMTP')
for i in range(conf.CEILING + 1):
app.on_form_page(req)
# Avoid duplicate form error
builder.form['name'] = str(i) + builder.form['email']
self.assertEqual(app.error, 'Too Many Requests')
@patch('request_handler.validate_email')
def test_redirect_url_valid_data(self, mock_validate_email):
"""
Tests the user is redirected to appropriate location
"""
# Build test environment
builder = EnvironBuilder(method='POST',
data={'name': 'Valid Guy',
'email': 'example@osuosl.org',
'redirect': 'http://www.example.com',
'last_name': '',
'token': conf.TOKEN})
env = builder.get_environ()
req = Request(env)
# Mock validate email so returns true in Travis
mock_validate_email.return_value = True
# Create app and mock redirect
app = handler.create_app()
werkzeug.utils.redirect = Mock('werkzeug.utils.redirect')
# Mock sendmail function so it doesn't send an actual email
smtplib.SMTP = Mock('smtplib.SMTP')
app.on_form_page(req)
werkzeug.utils.redirect.assert_called_with('http://www.example.com',
code=302)
@patch('request_handler.validate_email')
def test_redirect_url_error_1(self, mock_validate_email):
"""
Tests the user is redirected to appropriate location
"""
# Build test environment
builder = EnvironBuilder(method='POST',
data={'name': 'Valid Guy',
'email': 'nope@example.com',
'redirect': 'http://www.example.com',
'last_name': '',
'token': conf.TOKEN})
env = builder.get_environ()
req = Request(env)
# Mock validate email so returns false in Travis
# Not technically necessary because this will return false in Travis
# regardless since it can't find the SMTP server, but kept here for
# consistency
mock_validate_email.return_value = False
# Create app and mock redirect
app = handler.create_app()
werkzeug.utils.redirect = Mock('werkzeug.utils.redirect')
# Mock sendmail function so it doesn't send an actual email
smtplib.SMTP = Mock('smtplib.SMTP')
app.on_form_page(req)
werkzeug.utils.redirect.assert_called_with(
'http://www.example.com?error=1&message=Invalid+Email',
code=302)
@patch('request_handler.validate_email')
def test_redirect_url_error_2(self, mock_validate_email):
"""
Tests the user is redirected to appropriate location
"""
# Build test environment
builder = EnvironBuilder(method='POST',
data={'name': '',
'email': 'example@osuosl.org',
'redirect': 'http://www.example.com',
'last_name': '',
'token': conf.TOKEN})
env = builder.get_environ()
req = Request(env)
# Mock validate email so returns true in Travis
mock_validate_email.return_value = True
# Create app and mock redirect
app = handler.create_app()
werkzeug.utils.redirect = Mock('werkzeug.utils.redirect')
# Mock sendmail function so it doesn't send an actual email
smtplib.SMTP = Mock('smtplib.SMTP')
app.on_form_page(req)
werkzeug.utils.redirect.assert_called_with(
'http://www.example.com?error=2&message=Invalid+Name',
code=302)
@patch('request_handler.validate_email')
def test_redirect_url_error_3(self, mock_validate_email):
"""
Tests the user is redirected to appropriate location
"""
# Build test environment
builder = EnvironBuilder(method='POST',
data={'name': 'Valid Guy',
'email': 'example@osuosl.org',
'redirect': 'http://www.example.com',
'last_name': '!',
'token': 'wrong token'})
env = builder.get_environ()
req = Request(env)
# Mock validate email so returns true in Travis
mock_validate_email.return_value = True
# Create app and mock redirect
app = handler.create_app()
werkzeug.utils.redirect = Mock('werkzeug.utils.redirect')
# Mock sendmail function so it doesn't send an actual email
smtplib.SMTP = Mock('smtplib.SMTP')
app.on_form_page(req)
werkzeug.utils.redirect.assert_called_with(
'http://www.example.com?error=3&message=Improper+Form+Submission',
code=302)
@patch('request_handler.validate_email')
def test_redirect_url_error_4(self, mock_validate_email):
"""
Tests the user is redirected to appropriate location
"""
# Build test environment
builder = EnvironBuilder(method='POST',
data={'name': 'Valid Guy',
'email': 'example@osuosl.org',
'redirect': 'http://www.example.com',
'last_name': '',
'token': conf.TOKEN})
env = builder.get_environ()
req = Request(env)
# Mock validate email so returns true in Travis
mock_validate_email.return_value = True
app = handler.create_app()
werkzeug.utils.redirect = Mock('werkzeug.utils.redirect')
# Mock sendmail function so it doesn't send an actual email
smtplib.SMTP = Mock('smtplib.SMTP')
for i in range(conf.CEILING + 1):
app.on_form_page(req)
# Avoid duplicate form error
builder.form['name'] = str(i) + builder.form['name']
werkzeug.utils.redirect.assert_called_with(
'http://www.example.com?error=4&message=Too+Many+Requests',
code=302)
def test_strip_incoming_redirect_query(self):
# Build test environment
builder = EnvironBuilder(method='POST',
data={'name': 'Valid Guy',
'email': 'example@osuosl.org',
'redirect': 'www.example.com?mal=param',
'last_name': '',
'token': conf.TOKEN})
env = builder.get_environ()
req = Request(env)
message = handler.create_msg(req)
self.assertEqual(message['redirect'], 'www.example.com')
def test_strip_incoming_redirect_no_query(self):
# Build test environment
builder = EnvironBuilder(method='POST',
data={'name': 'Valid Guy',
'email': 'example@osuosl.org',
'redirect': 'www.example.com',
'last_name': '',
'token': conf.TOKEN})
env = builder.get_environ()
req = Request(env)
message = handler.create_msg(req)
self.assertEqual(message['redirect'], builder.form['redirect'])
def test_format_message(self):
# Build test environment
builder = EnvironBuilder(method='POST',
data={'name': 'Valid Guy',
'email': 'example@osuosl.org',
'some_field': ("This is multi line and "
"should not be on the "
"same line as the title"),
'redirect': 'http://www.example.com',
'last_name': '',
'token': conf.TOKEN})
env = builder.get_environ()
req = Request(env)
target_message = ("Contact:\n"
"--------\n"
"NAME: Valid Guy\n"
"EMAIL: example@osuosl.org\n\n"
"Information:\n"
"------------\n"
"Some Field:\n"
"This is multi line and should not be on the same "
"line as the title\n\n")
message = handler.create_msg(req)
formatted_message = handler.format_message(message)
self.assertEqual(formatted_message, target_message)
def test_set_mail_subject_with_both_options(self):
"""
set_mail_subject(message) returns the string
"message['mail_subject_prefix']: message[message['mail_subject_key']"
when both are available
"""
# Build test environment
builder = EnvironBuilder(method='POST',
data={'name': 'Valid Guy',
'email': 'example@osuosl.org',
'redirect': 'http://www.example.com',
'last_name': '',
'mail_subject_prefix': 'Hosting',
'mail_subject_key': 'project',
'project': 'PGD',
'token': conf.TOKEN})
env = builder.get_environ()
req = Request(env)
# Create message from request and call set_mail_subject()
message = handler.create_msg(req)
self.assertEqual(handler.set_mail_subject(message), 'Hosting: PGD')
def test_set_mail_subject_with_subj_prefix(self):
"""
set_mail_subject(message) returns the string
"message['mail_subject_prefix']" when it is the only field available
"""
# Build test environment
builder = EnvironBuilder(method='POST',
data={'name': 'Valid Guy',
'email': 'example@osuosl.org',
'redirect': 'http://www.example.com',
'last_name': '',
'mail_subject_prefix': 'Hosting',
'token': conf.TOKEN})
env = builder.get_environ()
req = Request(env)
# Create message from request and call set_mail_subject()
message = handler.create_msg(req)
self.assertEqual(handler.set_mail_subject(message), 'Hosting')
def test_set_mail_subject_with_subj_key(self):
"""
set_mail_subject(message) returns the string
"message[message['mail_subject_prefix']]" when it is the only field
available
"""
# Build test environment
builder = EnvironBuilder(method='POST',
data={'name': 'Valid Guy',
'email': 'example@osuosl.org',
'redirect': 'http://www.example.com',
'last_name': '',
'mail_subject_key': 'project',
'project': 'PGD',
'token': conf.TOKEN})
env = builder.get_environ()
req = Request(env)
# Create message from request and call set_mail_subject()
message = handler.create_msg(req)
self.assertEqual(handler.set_mail_subject(message), 'PGD')
def test_set_mail_subject_with_subj_key_missing(self):
"""
set_mail_subject(message) returns the default string 'Form Submission'
when no configuration fields are available
"""
# Build test environment
builder = EnvironBuilder(method='POST',
data={'name': 'Valid Guy',
'email': 'example@osuosl.org',
'redirect': 'http://www.example.com',
'last_name': '',
'mail_subject_key': 'project',
'token': conf.TOKEN})
env = builder.get_environ()
req = Request(env)
# Create message from request and call set_mail_subject()
message = handler.create_msg(req)
self.assertEqual(handler.set_mail_subject(message), 'Form Submission')
def test_set_mail_subject_with_nothing(self):
"""
set_mail_subject(message) returns the string in message['mail_subject']
when it is present, otherwise it returns 'Form Submission'
"""
# Build test environment
builder = EnvironBuilder(method='POST',
data={'name': 'Valid Guy',
'email': 'example@osuosl.org',
'redirect': 'http://www.example.com',
'last_name': '',
'token': conf.TOKEN})
env = builder.get_environ()
req = Request(env)
# Create message from request and call set_mail_subject()
message = handler.create_msg(req)
subject = handler.set_mail_subject(message)
self.assertEqual(subject, 'Form Submission')
def test_set_mail_subject_with_key_only(self):
"""
set_mail_subject(message) returns the string in message['mail_subject']
when it is present, otherwise it returns 'Form Submission'
"""
# Build test environment
builder = EnvironBuilder(method='POST',
data={'name': 'Valid Guy',
'email': 'example@osuosl.org',
'redirect': 'http://www.example.com',
'last_name': '',
'mail_subject': '',
'token': conf.TOKEN})
env = builder.get_environ()
req = Request(env)
# Create message from request and call set_mail_subject()
message = handler.create_msg(req)
subject = handler.set_mail_subject(message)
self.assertEqual(subject, 'Form Submission')
def test_set_mail_from(self):
"""
set_mail_from(message) returns the string in message['email_from']
when it is present, otherwise it returns 'default'
"""
# Build test environment
builder = EnvironBuilder(method='POST',
data={'name': 'Valid Guy',
'email': 'example@osuosl.org',
'redirect': 'http://www.example.com',
'last_name': '',
'mail_from': 'randouser@example.org',
'token': conf.TOKEN})
env = builder.get_environ()
req = Request(env)
# Create message from request and call set_mail_subject()
message = handler.create_msg(req)
mail_from = handler.set_mail_from(message)
# May want to change this email to be something else later on
self.assertEqual(mail_from, 'randouser@example.org')
def test_empty_mail_from_uses_email(self):
"""
set_mail_from(message) returns the string in message['email_from']
when it is present, otherwise it returns 'default'
"""
# Build test environment
builder = EnvironBuilder(method='POST',
data={'name': 'Valid Guy',
'email': 'example@osuosl.org',
'redirect': 'http://www.example.com',
'last_name': '',
'token': conf.TOKEN})
env = builder.get_environ()
req = Request(env)
# Create message from request and call set_mail_subject()
message = handler.create_msg(req)
mail_from = handler.set_mail_from(message)
self.assertEqual(mail_from, 'example@osuosl.org')
def test_set_mail_from_with_key_only(self):
"""
set_mail_from(message) returns the string in message['email_from']
when it is present, otherwise it returns 'default'
"""
# Build test environment
builder = EnvironBuilder(method='POST',
data={'name': 'Valid Guy',
'email': 'example@osuosl.org',
'redirect': 'http://www.example.com',
'last_name': '',
'mail_from': '',
'token': conf.TOKEN})
env = builder.get_environ()
req = Request(env)
# Create message from request and call set_mail_subject()
message = handler.create_msg(req)
mail_from = handler.set_mail_from(message)
self.assertEqual(mail_from, 'example@osuosl.org')
def test_mail_from_empty_email_empty(self):
"""
set_mail_from(message) returns the string in message['email_from']
when it is present, otherwise it returns 'default'
"""
# Build test environment
builder = EnvironBuilder(method='POST',
data={'name': 'Valid Guy',
'redirect': 'http://www.example.com',
'last_name': '',
'token': conf.TOKEN})
env = builder.get_environ()
req = Request(env)
# Create message from request and call set_mail_subject()
message = handler.create_msg(req)
mail_from = handler.set_mail_from(message)
self.assertEqual(mail_from, 'from_default')
def test_send_to_address(self):
"""
send_to_adress(message) returns the string in message['send_to']
when it is present, otherwise it returns 'default'
"""
# Build test environment
builder = EnvironBuilder(method='POST',
data={'name': 'Valid Guy',
'email': 'example@osuosl.org',
'redirect': 'http://www.example.com',
'last_name': '',
'send_to': 'support',
'token': conf.TOKEN})
env = builder.get_environ()
req = Request(env)
# Create message from request and call set_mail_subject()
message = handler.create_msg(req)
address = handler.send_to_address(message)
self.assertEqual(address, 'support')
def test_send_to_address_with_nothing(self):
"""
send_to_adress(message) returns the string in message['send_to']
when it is present, otherwise it returns 'default'
"""
# Build test environment
builder = EnvironBuilder(method='POST',
data={'name': 'Valid Guy',
'email': 'example@osuosl.org',
'redirect': 'http://www.example.com',
'last_name': '',
'token': conf.TOKEN})
env = builder.get_environ()
req = Request(env)
# Create message from request and call set_mail_subject()
message = handler.create_msg(req)
address = handler.send_to_address(message)
self.assertEqual(address, 'default')
def test_send_to_address_with_key_only(self):
"""
send_to_adress(message) returns the string in message['send_to']
when it is present, otherwise it returns 'default'
"""
# Build test environment
builder = EnvironBuilder(method='POST',
data={'name': 'Valid Guy',
'email': 'example@osuosl.org',
'redirect': 'http://www.example.com',
'last_name': '',
'send_to': '',
'token': conf.TOKEN})
env = builder.get_environ()
req = Request(env)
# Create message from request and call set_mail_subject()
message = handler.create_msg(req)
address = handler.send_to_address(message)
self.assertEqual(address, 'default')
@patch('request_handler.validate_email')
def test_same_submission(self, mock_validate_email):
"""
Tests that the same form is not sent twice.
"""
builder = EnvironBuilder(method='POST',
data={'name': 'Valid Guy',
'email': 'example@osuosl.org',
'last_name': '',
'token': conf.TOKEN,
'redirect': 'http://www.example.com'})
env = builder.get_environ()
# Mock sendmail function so it doesn't send an actual email
smtplib.SMTP.sendmail = Mock('smtplib.SMTP.sendmail')
mock_validate_email.return_value = True
# Create apps
app = handler.create_app()
# Will cause a duplicate with the last call because
# first app.name = 'Valid Guy' = last app.name
req = Request(env)
app.on_form_page(req)
self.assertEquals(app.error, None)
# Update name so not a duplicate
builder.form['name'] = 'Another Guy'
env = builder.get_environ()
req = Request(env)
app.on_form_page(req)
self.assertEquals(app.error, None)
# Update name so not a duplicate
builder.form['name'] = 'A Third Guy'
env = builder.get_environ()
req = Request(env)
app.on_form_page(req)
self.assertEquals(app.error, None)
# Duplicate with first app because
# first app.name = 'Valid Guy' = this app.name
builder.form['name'] = 'Valid Guy'
env = builder.get_environ()
req = Request(env)
app.on_form_page(req)
self.assertEquals(app.error, 'Duplicate Request')
@patch('request_handler.validate_email')
def test_send_email_root(self, mock_validate_email):
"""
Tests that the form is sent to the correct address.
Returns true if form is sent to root@ousosl.org
Errors out if unsuccesful
"""
builder = EnvironBuilder(method='POST',
data={'name': 'Valid Guy',
'email': 'example@osuosl.com',
'send_to': 'root',
'last_name': '',
'token': conf.TOKEN,
'redirect': 'http://www.example.com'})
env = builder.get_environ()
req = Request(env)
# Construct message for assertion
msg = handler.create_msg(req)
msg_send = MIMEText(str(msg))
msg_subj = handler.set_mail_subject(msg)
msg_send['Subject'] = msg_subj
msg_send['To'] = conf.EMAIL['root']
msg_send['Sender'] = conf.SENDER
# Mock SMTP
with patch("smtplib.SMTP") as mock_smtp:
instance = mock_smtp.return_value
# Call send_email and assert sendmail was correctly called
handler.send_email(msg, msg_subj, send_to_email='root')
instance.sendmail.assert_called_with(conf.FROM['from_default'],
conf.EMAIL['root'],
msg_send.as_string())
@patch('request_handler.validate_email')
def test_send_email_support(self, mock_validate_email):
"""
Tests that the form is sent to the correct address.
Returns true if the form has been sent to support@osuosl.org
Errors out if unsuccessful
"""
builder = EnvironBuilder(method='POST',
data={'name': 'Valid Guy',
'email': 'example@osuosl.org',
'send_to': 'support',
'last_name': '',
'token': conf.TOKEN,
'redirect': 'http://www.example.com'})
env = builder.get_environ()
req = Request(env)
# Construct message for assertion
msg = handler.create_msg(req)
msg_send = MIMEText(str(msg))
msg_subj = handler.set_mail_subject(msg)
msg_send['Subject'] = msg_subj
msg_send['To'] = conf.EMAIL['support']
msg_send['Sender'] = conf.SENDER
# Mock SMTP
with patch("smtplib.SMTP") as mock_smtp:
# Call send_email and assert sendmail was correctly called
instance = mock_smtp.return_value
handler.send_email(msg, msg_subj, send_to_email='support')
instance.sendmail.assert_called_with(conf.FROM['from_default'],
conf.EMAIL['support'],
msg_send.as_string())
@patch('request_handler.validate_email')
def test_send_email_default(self, mock_validate_email):
"""
Tests that the form is sent to the correct default address when
the 'send_to' field is set to an empty string.
Returns true if the form has been sent to support@osuosl.org
Errors out if unsuccessful
"""
builder = EnvironBuilder(method='POST',
data={'name': 'Valid Guy',
'email': 'example@osuosl.org',
'send_to': '',
'last_name': '',
'token': conf.TOKEN,
'redirect': 'http://www.example.com'})
env = builder.get_environ()
req = Request(env)
# Construct message for assertion
msg = handler.create_msg(req)
msg_send = MIMEText(str(msg))
msg_subj = handler.set_mail_subject(msg)
msg_send['Subject'] = msg_subj
msg_send['To'] = conf.EMAIL['default']
msg_send['Sender'] = conf.SENDER
# Mock sendmail function
with patch("smtplib.SMTP") as mock_smtp:
instance = mock_smtp.return_value
# Call send_email and assert sendmail was correctly called
handler.send_email(msg, msg_subj)
instance.sendmail.assert_called_with(conf.FROM['from_default'],
conf.EMAIL['default'],
msg_send.as_string())
def test_server_status_view_responds_OK_on_GET(self):
"""
Tests that the view for health check by monitoring software works.
Will return HTTP 200 when sent a GET request
"""
builder = EnvironBuilder(method='GET')
app = handler.create_app()
env = builder.get_environ()
req = Request(env)
resp = app.on_server_status(req)
self.assertEqual(resp.status_code, 200)
self.assertEquals(app.error, None)
def test_server_status_view_responds_with_HTTP_400_on_non_GET_request(self):
"""
Tests that the view for health check by monitoring software works.
Will return HTTP 400 when sent anything other than a GET request
"""
for m in [
'POST',
'OPTIONS',
'PATCH',
'HEAD',
'PUT',
'DELETE',
'TRACE'
]:
builder = EnvironBuilder(method=m)
app = handler.create_app()
env = builder.get_environ()
req = Request(env)
resp = app.on_server_status(req)
self.assertEqual(resp.status_code, 400)
self.assertEquals(app.error, None)
def test_string_comp_from_fields_to_join(self):
"""
Tests that values can be pulled from form fields and composed into a
string to be included in the body of the email.
"""
builder = EnvironBuilder(method='POST',
data={'name': 'Valid Guy',
'email': 'example@osuosl.org',
'some_field': "This is some info.",
'redirect': 'http://www.example.com',
'last_name': '',
'token': conf.TOKEN,
'fields_to_join': 'name,email,date,some_field'})
env = builder.get_environ()
req = Request(env)
target_message = ("Contact:\n"
"--------\n"
"NAME: Valid Guy\n"
"EMAIL: example@osuosl.org\n\n"
"Information:\n"
"------------\n"
"Fields To Join:\n"
"Valid Guy:example@osuosl.org:%s:This is some info.\n\n"
"Some Field:\n"
"This is some info.\n\n" % str(int(time.time())))
message = handler.create_msg(req)
formatted_message = handler.format_message(message)
self.assertEqual(formatted_message, target_message)
def test_string_comp_with_fields_to_join_name(self):
"""
Tests that value from fields_to_join_name field can be used as keys for
fields_to_join data
"""
builder = EnvironBuilder(method='POST',
data={'name': 'Valid Guy',
'email': 'example@osuosl.org',
'some_field': "This is some info.",
'redirect': 'http://www.example.com',
'last_name': '',
'token': conf.TOKEN,
'fields_to_join_name': 'With New Field Name',
'fields_to_join': 'name,email,date,some_field'})
env = builder.get_environ()
req = Request(env)
target_message = ("Contact:\n"
"--------\n"
"NAME: Valid Guy\n"
"EMAIL: example@osuosl.org\n\n"
"Information:\n"
"------------\n"
"Some Field:\n"
"This is some info.\n\n"
"With New Field Name:\n"
"Valid Guy:example@osuosl.org:"
"%s:This is some info.\n\n" % str(int(time.time())))
message = handler.create_msg(req)
formatted_message = handler.format_message(message)
self.assertEqual(formatted_message, target_message)
if __name__ == '__main__':
unittest.main()
| 42.859167 | 87 | 0.520832 | 4,928 | 48,388 | 4.943385 | 0.05763 | 0.034687 | 0.027216 | 0.04187 | 0.896022 | 0.881204 | 0.856615 | 0.832478 | 0.822544 | 0.794508 | 0 | 0.001474 | 0.383256 | 48,388 | 1,128 | 88 | 42.897163 | 0.814831 | 0.200918 | 0 | 0.780488 | 0 | 0 | 0.16573 | 0.024703 | 0 | 0 | 0 | 0 | 0.080344 | 1 | 0.068867 | false | 0 | 0.014347 | 0 | 0.084648 | 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 |
f1500cfb294e32885156acc20b328c1083304d89 | 7,881 | py | Python | tools/matrixclipspacestub.py | esoma/pyglm-typing | f47636b86d07d4f91692235e8dfe0af1bd22e883 | [
"MIT"
] | null | null | null | tools/matrixclipspacestub.py | esoma/pyglm-typing | f47636b86d07d4f91692235e8dfe0af1bd22e883 | [
"MIT"
] | null | null | null | tools/matrixclipspacestub.py | esoma/pyglm-typing | f47636b86d07d4f91692235e8dfe0af1bd22e883 | [
"MIT"
] | null | null | null |
__all__ = ['generate_matrix_clip_space_stub']
import textwrap
def generate_matrix_clip_space_stub():
names = [
'frustumLH_NO', 'frustumLH_ZO', 'frustumRH_NO', 'frustumRH_ZO',
'frustum', 'frustumNO', 'frustumRH', 'frustumLH', 'frustumZO',
'infinitePerspectiveLH', 'infinitePerspectiveRH',
'infinitePerspective',
'orthoLH_NO', 'orthoLH_ZO', 'orthoRH_NO', 'orthoRH_ZO', 'ortho',
'orthoLH', 'orthoNO', 'orthoRH', 'orthoZO',
'perspectiveLH_NO', 'perspectiveLH_ZO', 'perspectiveRH_NO',
'perspectiveRH_ZO', 'perspective', 'perspectiveLH', 'perspectiveNO',
'perspectiveRH', 'perspectiveZO',
'perspectiveFovLH_NO', 'perspectiveFovLH_ZO', 'perspectiveFovRH_NO',
'perspectiveFovRH_ZO', 'perspectiveFov', 'perspectiveFovLH',
'perspectiveFovNO', 'perspectiveFovRH', 'perspectiveFovZO',
'tweakedInfinitePerspective',
]
return names, textwrap.dedent(f"""
def frustumLH_NO(left: glm_typing.Number, right: glm_typing.Number, bottom: glm_typing.Number, top: glm_typing.Number, near: glm_typing.Number, far: glm_typing.Number, /) -> mat4x4: ...
def frustumLH_ZO(left: glm_typing.Number, right: glm_typing.Number, bottom: glm_typing.Number, top: glm_typing.Number, near: glm_typing.Number, far: glm_typing.Number, /) -> mat4x4: ...
def frustumRH_NO(left: glm_typing.Number, right: glm_typing.Number, bottom: glm_typing.Number, top: glm_typing.Number, near: glm_typing.Number, far: glm_typing.Number, /) -> mat4x4: ...
def frustumRH_ZO(left: glm_typing.Number, right: glm_typing.Number, bottom: glm_typing.Number, top: glm_typing.Number, near: glm_typing.Number, far: glm_typing.Number, /) -> mat4x4: ...
def frustum(left: glm_typing.Number, right: glm_typing.Number, bottom: glm_typing.Number, top: glm_typing.Number, near: glm_typing.Number, far: glm_typing.Number, /) -> mat4x4: ...
def frustumNO(left: glm_typing.Number, right: glm_typing.Number, bottom: glm_typing.Number, top: glm_typing.Number, near: glm_typing.Number, far: glm_typing.Number, /) -> mat4x4: ...
def frustumRH(left: glm_typing.Number, right: glm_typing.Number, bottom: glm_typing.Number, top: glm_typing.Number, near: glm_typing.Number, far: glm_typing.Number, /) -> mat4x4: ...
def frustumLH(left: glm_typing.Number, right: glm_typing.Number, bottom: glm_typing.Number, top: glm_typing.Number, near: glm_typing.Number, far: glm_typing.Number, /) -> mat4x4: ...
def frustumZO(left: glm_typing.Number, right: glm_typing.Number, bottom: glm_typing.Number, top: glm_typing.Number, near: glm_typing.Number, far: glm_typing.Number, /) -> mat4x4: ...
def infinitePerspectiveLH(fovy: glm_typing.Number, aspect: glm_typing.Number, near: glm_typing.Number, /) -> mat4x4: ...
def infinitePerspectiveRH(fovy: glm_typing.Number, aspect: glm_typing.Number, near: glm_typing.Number, /) -> mat4x4: ...
def infinitePerspective(fovy: glm_typing.Number, aspect: glm_typing.Number, near: glm_typing.Number, /) -> mat4x4: ...
def orthoLH_NO(left: glm_typing.Number, right: glm_typing.Number, bottom: glm_typing.Number, top: glm_typing.Number, zNear: glm_typing.Number, zFar: glm_typing.Number, /) -> mat4x4: ...
def orthoLH_ZO(left: glm_typing.Number, right: glm_typing.Number, bottom: glm_typing.Number, top: glm_typing.Number, zNear: glm_typing.Number, zFar: glm_typing.Number, /) -> mat4x4: ...
def orthoRH_NO(left: glm_typing.Number, right: glm_typing.Number, bottom: glm_typing.Number, top: glm_typing.Number, zNear: glm_typing.Number, zFar: glm_typing.Number, /) -> mat4x4: ...
def orthoRH_ZO(left: glm_typing.Number, right: glm_typing.Number, bottom: glm_typing.Number, top: glm_typing.Number, zNear: glm_typing.Number, zFar: glm_typing.Number, /) -> mat4x4: ...
def ortho(left: glm_typing.Number, right: glm_typing.Number, bottom: glm_typing.Number, top: glm_typing.Number, zNear: glm_typing.Number, zFar: glm_typing.Number, /) -> mat4x4: ...
def orthoLH(left: glm_typing.Number, right: glm_typing.Number, bottom: glm_typing.Number, top: glm_typing.Number, zNear: glm_typing.Number, zFar: glm_typing.Number, /) -> mat4x4: ...
def orthoNO(left: glm_typing.Number, right: glm_typing.Number, bottom: glm_typing.Number, top: glm_typing.Number, zNear: glm_typing.Number, zFar: glm_typing.Number, /) -> mat4x4: ...
def orthoRH(left: glm_typing.Number, right: glm_typing.Number, bottom: glm_typing.Number, top: glm_typing.Number, zNear: glm_typing.Number, zFar: glm_typing.Number, /) -> mat4x4: ...
def orthoZO(left: glm_typing.Number, right: glm_typing.Number, bottom: glm_typing.Number, top: glm_typing.Number, zNear: glm_typing.Number, zFar: glm_typing.Number, /) -> mat4x4: ...
def perspectiveLH_NO(fovy: glm_typing.Number, aspect: glm_typing.Number, near: glm_typing.Number, far: glm_typing.Number, /) -> mat4x4: ...
def perspectiveLH_ZO(fovy: glm_typing.Number, aspect: glm_typing.Number, near: glm_typing.Number, far: glm_typing.Number, /) -> mat4x4: ...
def perspectiveRH_NO(fovy: glm_typing.Number, aspect: glm_typing.Number, near: glm_typing.Number, far: glm_typing.Number, /) -> mat4x4: ...
def perspectiveRH_ZO(fovy: glm_typing.Number, aspect: glm_typing.Number, near: glm_typing.Number, far: glm_typing.Number, /) -> mat4x4: ...
def perspective(fovy: glm_typing.Number, aspect: glm_typing.Number, near: glm_typing.Number, far: glm_typing.Number, /) -> mat4x4: ...
def perspectiveLH(fovy: glm_typing.Number, aspect: glm_typing.Number, near: glm_typing.Number, far: glm_typing.Number, /) -> mat4x4: ...
def perspectiveNO(fovy: glm_typing.Number, aspect: glm_typing.Number, near: glm_typing.Number, far: glm_typing.Number, /) -> mat4x4: ...
def perspectiveRH(fovy: glm_typing.Number, aspect: glm_typing.Number, near: glm_typing.Number, far: glm_typing.Number, /) -> mat4x4: ...
def perspectiveZO(fovy: glm_typing.Number, aspect: glm_typing.Number, near: glm_typing.Number, far: glm_typing.Number, /) -> mat4x4: ...
def perspectiveFovLH_NO(fov: glm_typing.Number, width: glm_typing.Number, height: glm_typing.Number, near: glm_typing.Number, far: glm_typing.Number, /) -> mat4x4: ...
def perspectiveFovLH_ZO(fov: glm_typing.Number, width: glm_typing.Number, height: glm_typing.Number, near: glm_typing.Number, far: glm_typing.Number, /) -> mat4x4: ...
def perspectiveFovRH_NO(fov: glm_typing.Number, width: glm_typing.Number, height: glm_typing.Number, near: glm_typing.Number, far: glm_typing.Number, /) -> mat4x4: ...
def perspectiveFovRH_ZO(fov: glm_typing.Number, width: glm_typing.Number, height: glm_typing.Number, near: glm_typing.Number, far: glm_typing.Number, /) -> mat4x4: ...
def perspectiveFov(fov: glm_typing.Number, width: glm_typing.Number, height: glm_typing.Number, near: glm_typing.Number, far: glm_typing.Number, /) -> mat4x4: ...
def perspectiveFovLH(fov: glm_typing.Number, width: glm_typing.Number, height: glm_typing.Number, near: glm_typing.Number, far: glm_typing.Number, /) -> mat4x4: ...
def perspectiveFovNO(fov: glm_typing.Number, width: glm_typing.Number, height: glm_typing.Number, near: glm_typing.Number, far: glm_typing.Number, /) -> mat4x4: ...
def perspectiveFovRH(fov: glm_typing.Number, width: glm_typing.Number, height: glm_typing.Number, near: glm_typing.Number, far: glm_typing.Number, /) -> mat4x4: ...
def perspectiveFovZO(fov: glm_typing.Number, width: glm_typing.Number, height: glm_typing.Number, near: glm_typing.Number, far: glm_typing.Number, /) -> mat4x4: ...
@overload
def tweakedInfinitePerspective(fovy: glm_typing.Number, aspect: glm_typing.Number, near: glm_typing.Number, /) -> mat4x4: ...
@overload
def tweakedInfinitePerspective(fovy: glm_typing.Number, aspect: glm_typing.Number, near: glm_typing.Number, epsilon: float, /) -> mat4x4: ...
""")
| 73.654206 | 189 | 0.729349 | 1,035 | 7,881 | 5.31401 | 0.057005 | 0.333818 | 0.556364 | 0.152727 | 0.857273 | 0.847455 | 0.843818 | 0.843818 | 0.843818 | 0.843818 | 0 | 0.011929 | 0.127776 | 7,881 | 106 | 190 | 74.349057 | 0.788187 | 0 | 0 | 0.031746 | 1 | 0.650794 | 0.949239 | 0.064721 | 0 | 0 | 0 | 0 | 0 | 1 | 0.015873 | false | 0 | 0.015873 | 0 | 0.047619 | 0 | 0 | 0 | 0 | null | 1 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 11 |
f18a4ad536a1053296006fa3bbed4c5a73d27008 | 5,626 | py | Python | modules/RegionNorm.py | wangning-001/DSNet | 6599f613544ea31cb29e206f319d7cd57624c821 | [
"MIT"
] | 9 | 2021-03-06T08:17:50.000Z | 2021-11-26T14:27:31.000Z | modules/RegionNorm.py | wangning-001/DSNet | 6599f613544ea31cb29e206f319d7cd57624c821 | [
"MIT"
] | 2 | 2021-08-10T05:47:03.000Z | 2021-08-19T13:20:39.000Z | modules/RegionNorm.py | wangning-001/DSNet | 6599f613544ea31cb29e206f319d7cd57624c821 | [
"MIT"
] | 3 | 2021-07-30T01:23:16.000Z | 2022-01-20T13:52:17.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
class RBNModule(nn.Module):
_version = 2
__constants__ = ['track_running_stats', 'momentum', 'eps', 'weight', 'bias',
'running_mean', 'running_var', 'num_batches_tracked']
def __init__(self, num_features, eps=1e-5, momentum=0.9, affine=True, track_running_stats=True):
super(RBNModule, self).__init__()
self.num_features = num_features
self.track_running_stats = track_running_stats
self.eps = eps
self.affine = affine
self.momentum = momentum
if self.affine:
self.weight = nn.Parameter(torch.Tensor(1, num_features, 1, 1))
self.bias = nn.Parameter(torch.Tensor(1, num_features, 1, 1))
else:
self.register_parameter('weight', None)
self.register_parameter('bias', None)
if self.track_running_stats:
self.register_buffer('running_mean', torch.zeros(1, num_features, 1, 1))
self.register_buffer('running_var', torch.ones(1, num_features, 1, 1))
else:
self.register_parameter('running_mean', None)
self.register_parameter('running_var', None)
self.reset_parameters()
def reset_running_stats(self):
if self.track_running_stats:
self.running_mean.zero_()
self.running_var.fill_(1)
def reset_parameters(self):
self.reset_running_stats()
if self.affine:
nn.init.uniform_(self.weight)
nn.init.zeros_(self.bias)
def forward(self, input, mask_t):
input_m = input * mask_t
if self.training:
mask_mean = torch.mean(mask_t, (0, 2, 3), True)
x_mean = torch.mean(input_m, (0, 2, 3), True) / mask_mean
x_var = torch.mean(((input_m - x_mean) * mask_t) ** 2, (0, 2, 3), True) / mask_mean
x_out = self.weight * (input_m - x_mean) / torch.sqrt(x_var + self.eps) + self.bias
self.running_mean.mul_(self.momentum)
self.running_mean.add_((1 - self.momentum) * x_mean.data)
self.running_var.mul_(self.momentum)
self.running_var.add_((1 - self.momentum) * x_var.data)
else:
x_out = self.weight * (input_m - self.running_mean) / torch.sqrt(self.running_var + self.eps) + self.bias
return x_out * mask_t + input * (1 - mask_t)
class RCNModule(nn.Module):
_version = 2
__constants__ = ['track_running_stats', 'momentum', 'eps', 'weight', 'bias',
'running_mean', 'running_var', 'num_batches_tracked']
def __init__(self, num_features, eps=1e-5, momentum=0.9, affine=True, track_running_stats=True):
super(RCNModule, self).__init__()
self.num_features = num_features
self.track_running_stats = track_running_stats
self.eps = eps
self.affine = affine
self.momentum = momentum
self.mean_weight = nn.Parameter(torch.ones(3))
self.var_weight = nn.Parameter(torch.ones(3))
if self.affine:
self.weight = nn.Parameter(torch.Tensor(1, num_features, 1, 1))
self.bias = nn.Parameter(torch.Tensor(1, num_features, 1, 1))
else:
self.register_parameter('weight', None)
self.register_parameter('bias', None)
if self.track_running_stats:
self.register_buffer('running_mean', torch.zeros(1, num_features, 1, 1))
self.register_buffer('running_var', torch.ones(1, num_features, 1, 1))
else:
self.register_parameter('running_mean', None)
self.register_parameter('running_var', None)
self.reset_parameters()
def reset_running_stats(self):
if self.track_running_stats:
self.running_mean.zero_()
self.running_var.fill_(1)
def reset_parameters(self):
self.reset_running_stats()
if self.affine:
nn.init.uniform_(self.weight)
nn.init.zeros_(self.bias)
def forward(self, input, mask_t):
input_m = input * mask_t
if self.training:
mask_mean_bn = torch.mean(mask_t, (0, 2, 3), True)
mean_bn = torch.mean(input_m, (0, 2, 3), True) / mask_mean_bn
var_bn = torch.mean(((input_m - mean_bn) * mask_t) ** 2, (0, 2, 3), True) / mask_mean_bn
self.running_mean.mul_(self.momentum)
self.running_mean.add_((1 - self.momentum) * mean_bn.data)
self.running_var.mul_(self.momentum)
self.running_var.add_((1 - self.momentum) * var_bn.data)
else:
mean_bn = torch.autograd.Variable(self.running_mean)
var_bn = torch.autograd.Variable(self.running_var)
mask_mean_in = torch.mean(mask_t, (2, 3), True)
mean_in = torch.mean(input_m, (2, 3), True) / mask_mean_in
var_in = torch.mean(((input_m - mean_in) * mask_t) ** 2, (2, 3), True) / mask_mean_in
mask_mean_ln = torch.mean(mask_t, (1, 2, 3), True)
mean_ln = torch.mean(input_m, (1, 2, 3), True) / mask_mean_ln
var_ln = torch.mean(((input_m - mean_ln) * mask_t) ** 2, (1, 2, 3), True) / mask_mean_ln
mean_weight = F.softmax(self.mean_weight)
var_weight = F.softmax(self.var_weight)
x_mean = mean_weight[0] * mean_in + mean_weight[1] * mean_ln + mean_weight[2] * mean_bn
x_var = var_weight[0] * var_in + var_weight[1] * var_ln + var_weight[2] * var_bn
x_out = self.weight * (input_m - x_mean) / torch.sqrt(x_var + self.eps) + self.bias
return x_out * mask_t + input * (1 - mask_t)
| 42.300752 | 117 | 0.614646 | 785 | 5,626 | 4.10828 | 0.090446 | 0.059535 | 0.063256 | 0.032248 | 0.846512 | 0.815194 | 0.76124 | 0.749147 | 0.736124 | 0.723101 | 0 | 0.020924 | 0.260931 | 5,626 | 132 | 118 | 42.621212 | 0.75469 | 0 | 0 | 0.709091 | 0 | 0 | 0.049067 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.072727 | false | 0 | 0.027273 | 0 | 0.172727 | 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 |
74cac8f5dc8be322b1e93381ef7660beaff303ab | 46,149 | py | Python | venv/lib/python3.8/site-packages/spaceone/api/spot_automation/v1/spot_group_pb2.py | choonho/plugin-prometheus-mon-webhook | afa7d65d12715fd0480fb4f92a9c62da2d6128e0 | [
"Apache-2.0"
] | null | null | null | venv/lib/python3.8/site-packages/spaceone/api/spot_automation/v1/spot_group_pb2.py | choonho/plugin-prometheus-mon-webhook | afa7d65d12715fd0480fb4f92a9c62da2d6128e0 | [
"Apache-2.0"
] | null | null | null | venv/lib/python3.8/site-packages/spaceone/api/spot_automation/v1/spot_group_pb2.py | choonho/plugin-prometheus-mon-webhook | afa7d65d12715fd0480fb4f92a9c62da2d6128e0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: spaceone/api/spot_automation/v1/spot_group.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
from spaceone.api.core.v1 import query_pb2 as spaceone_dot_api_dot_core_dot_v1_dot_query__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name='spaceone/api/spot_automation/v1/spot_group.proto',
package='spaceone.api.spot_automation.v1',
syntax='proto3',
serialized_options=None,
create_key=_descriptor._internal_create_key,
serialized_pb=b'\n0spaceone/api/spot_automation/v1/spot_group.proto\x12\x1fspaceone.api.spot_automation.v1\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1cgoogle/api/annotations.proto\x1a spaceone/api/core/v1/query.proto\"H\n\x1aSpotGroupResourceReference\x12\x13\n\x0bresource_id\x18\x01 \x01(\t\x12\x15\n\rexternal_link\x18\x02 \x01(\t\"\xc7\x01\n\x16\x43reateSpotGroupRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0bresource_id\x18\x02 \x01(\t\x12\x15\n\rresource_type\x18\x03 \x01(\t\x12(\n\x07options\x18\n \x01(\x0b\x32\x17.google.protobuf.Struct\x12%\n\x04tags\x18\x0b \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x0f\n\x07user_id\x18\x15 \x01(\t\x12\x11\n\tdomain_id\x18\x16 \x01(\t\"\xa1\x01\n\x16UpdateSpotGroupRequest\x12\x15\n\rspot_group_id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12(\n\x07options\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12%\n\x04tags\x18\x0b \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x11\n\tdomain_id\x18\x15 \x01(\t\"<\n\x10SpotGroupRequest\x12\x15\n\rspot_group_id\x18\x01 \x01(\t\x12\x11\n\tdomain_id\x18\x02 \x01(\t\"M\n\x13GetSpotGroupRequest\x12\x15\n\rspot_group_id\x18\x01 \x01(\t\x12\x11\n\tdomain_id\x18\x02 \x01(\t\x12\x0c\n\x04only\x18\x03 \x03(\t\"d\n\x14GetCandidatesRequest\x12\x13\n\x0bresource_id\x18\x01 \x01(\t\x12\x15\n\rresource_type\x18\x02 \x01(\t\x12\r\n\x05limit\x18\x03 \x01(\x05\x12\x11\n\tdomain_id\x18\x04 \x01(\t\"\xe2\x01\n\x15QuerySpotGroupRequest\x12*\n\x05query\x18\x01 \x01(\x0b\x32\x1b.spaceone.api.core.v1.Query\x12\x15\n\rspot_group_id\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x13\n\x0bresource_id\x18\x04 \x01(\t\x12\x15\n\rresource_type\x18\x05 \x01(\t\x12\x10\n\x08provider\x18\x06 \x01(\t\x12\x12\n\nproject_id\x18\x07 \x01(\t\x12\x13\n\x0bregion_code\x18\x08 \x01(\t\x12\x11\n\tdomain_id\x18\t \x01(\t\"_\n\x14SpotGroupStatRequest\x12\x34\n\x05query\x18\x01 \x01(\x0b\x32%.spaceone.api.core.v1.StatisticsQuery\x12\x11\n\tdomain_id\x18\x02 \x01(\t\"\xb0\x03\n\rSpotGroupInfo\x12\x15\n\rspot_group_id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0bresource_id\x18\x03 \x01(\t\x12\x15\n\rresource_type\x18\x04 \x01(\t\x12\x13\n\x0bregion_code\x18\x05 \x01(\t\x12\x10\n\x08provider\x18\x06 \x01(\t\x12\x1b\n\x13\x63loud_service_group\x18\x07 \x01(\t\x12\x1a\n\x12\x63loud_service_type\x18\x08 \x01(\t\x12N\n\treference\x18\t \x01(\x0b\x32;.spaceone.api.spot_automation.v1.SpotGroupResourceReference\x12(\n\x07options\x18\n \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x12\n\nproject_id\x18\x0b \x01(\t\x12%\n\x04tags\x18\x14 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x11\n\tdomain_id\x18\x15 \x01(\t\x12\x12\n\ncreated_by\x18\x16 \x01(\t\x12\x12\n\ncreated_at\x18\x17 \x01(\t\"f\n\x0eSpotGroupsInfo\x12?\n\x07results\x18\x01 \x03(\x0b\x32..spaceone.api.spot_automation.v1.SpotGroupInfo\x12\x13\n\x0btotal_count\x18\x02 \x01(\x05\"/\n\rCandidateInfo\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x10\n\x08priority\x18\x02 \x01(\x05\"f\n\x0e\x43\x61ndidatesInfo\x12?\n\x07results\x18\x01 \x03(\x0b\x32..spaceone.api.spot_automation.v1.CandidateInfo\x12\x13\n\x0btotal_count\x18\x02 \x01(\x05\x32\x82\t\n\tSpotGroup\x12\x9a\x01\n\x06\x63reate\x12\x37.spaceone.api.spot_automation.v1.CreateSpotGroupRequest\x1a..spaceone.api.spot_automation.v1.SpotGroupInfo\"\'\x82\xd3\xe4\x93\x02!\"\x1f/spot-automation/v1/spot-groups\x12\xa9\x01\n\x06update\x12\x37.spaceone.api.spot_automation.v1.UpdateSpotGroupRequest\x1a..spaceone.api.spot_automation.v1.SpotGroupInfo\"6\x82\xd3\xe4\x93\x02\x30\x1a./spot-automation/v1/spot-group/{spot_group_id}\x12\x8b\x01\n\x06\x64\x65lete\x12\x31.spaceone.api.spot_automation.v1.SpotGroupRequest\x1a\x16.google.protobuf.Empty\"6\x82\xd3\xe4\x93\x02\x30*./spot-automation/v1/spot-group/{spot_group_id}\x12\xa3\x01\n\x03get\x12\x34.spaceone.api.spot_automation.v1.GetSpotGroupRequest\x1a..spaceone.api.spot_automation.v1.SpotGroupInfo\"6\x82\xd3\xe4\x93\x02\x30\x12./spot-automation/v1/spot-group/{spot_group_id}\x12\xc2\x01\n\x04list\x12\x36.spaceone.api.spot_automation.v1.QuerySpotGroupRequest\x1a/.spaceone.api.spot_automation.v1.SpotGroupsInfo\"Q\x82\xd3\xe4\x93\x02K\x12\x1f/spot-automation/v1/spot-groupsZ(\"&/spot-automation/v1/spot-groups/search\x12\xab\x01\n\x0eget_candidates\x12\x35.spaceone.api.spot_automation.v1.GetCandidatesRequest\x1a/.spaceone.api.spot_automation.v1.CandidatesInfo\"1\x82\xd3\xe4\x93\x02+\x12)/spot-automation/v1/spot-group/candidates\x12\x84\x01\n\x04stat\x12\x35.spaceone.api.spot_automation.v1.SpotGroupStatRequest\x1a\x17.google.protobuf.Struct\",\x82\xd3\xe4\x93\x02&\"$/spot-automation/v1/spot-groups/statb\x06proto3'
,
dependencies=[google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,google_dot_api_dot_annotations__pb2.DESCRIPTOR,spaceone_dot_api_dot_core_dot_v1_dot_query__pb2.DESCRIPTOR,])
_SPOTGROUPRESOURCEREFERENCE = _descriptor.Descriptor(
name='SpotGroupResourceReference',
full_name='spaceone.api.spot_automation.v1.SpotGroupResourceReference',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='resource_id', full_name='spaceone.api.spot_automation.v1.SpotGroupResourceReference.resource_id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='external_link', full_name='spaceone.api.spot_automation.v1.SpotGroupResourceReference.external_link', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=208,
serialized_end=280,
)
_CREATESPOTGROUPREQUEST = _descriptor.Descriptor(
name='CreateSpotGroupRequest',
full_name='spaceone.api.spot_automation.v1.CreateSpotGroupRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='name', full_name='spaceone.api.spot_automation.v1.CreateSpotGroupRequest.name', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='resource_id', full_name='spaceone.api.spot_automation.v1.CreateSpotGroupRequest.resource_id', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='resource_type', full_name='spaceone.api.spot_automation.v1.CreateSpotGroupRequest.resource_type', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='options', full_name='spaceone.api.spot_automation.v1.CreateSpotGroupRequest.options', index=3,
number=10, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='tags', full_name='spaceone.api.spot_automation.v1.CreateSpotGroupRequest.tags', index=4,
number=11, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='user_id', full_name='spaceone.api.spot_automation.v1.CreateSpotGroupRequest.user_id', index=5,
number=21, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='domain_id', full_name='spaceone.api.spot_automation.v1.CreateSpotGroupRequest.domain_id', index=6,
number=22, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=283,
serialized_end=482,
)
_UPDATESPOTGROUPREQUEST = _descriptor.Descriptor(
name='UpdateSpotGroupRequest',
full_name='spaceone.api.spot_automation.v1.UpdateSpotGroupRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='spot_group_id', full_name='spaceone.api.spot_automation.v1.UpdateSpotGroupRequest.spot_group_id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='name', full_name='spaceone.api.spot_automation.v1.UpdateSpotGroupRequest.name', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='options', full_name='spaceone.api.spot_automation.v1.UpdateSpotGroupRequest.options', index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='tags', full_name='spaceone.api.spot_automation.v1.UpdateSpotGroupRequest.tags', index=3,
number=11, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='domain_id', full_name='spaceone.api.spot_automation.v1.UpdateSpotGroupRequest.domain_id', index=4,
number=21, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=485,
serialized_end=646,
)
_SPOTGROUPREQUEST = _descriptor.Descriptor(
name='SpotGroupRequest',
full_name='spaceone.api.spot_automation.v1.SpotGroupRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='spot_group_id', full_name='spaceone.api.spot_automation.v1.SpotGroupRequest.spot_group_id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='domain_id', full_name='spaceone.api.spot_automation.v1.SpotGroupRequest.domain_id', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=648,
serialized_end=708,
)
_GETSPOTGROUPREQUEST = _descriptor.Descriptor(
name='GetSpotGroupRequest',
full_name='spaceone.api.spot_automation.v1.GetSpotGroupRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='spot_group_id', full_name='spaceone.api.spot_automation.v1.GetSpotGroupRequest.spot_group_id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='domain_id', full_name='spaceone.api.spot_automation.v1.GetSpotGroupRequest.domain_id', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='only', full_name='spaceone.api.spot_automation.v1.GetSpotGroupRequest.only', index=2,
number=3, type=9, cpp_type=9, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=710,
serialized_end=787,
)
_GETCANDIDATESREQUEST = _descriptor.Descriptor(
name='GetCandidatesRequest',
full_name='spaceone.api.spot_automation.v1.GetCandidatesRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='resource_id', full_name='spaceone.api.spot_automation.v1.GetCandidatesRequest.resource_id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='resource_type', full_name='spaceone.api.spot_automation.v1.GetCandidatesRequest.resource_type', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='limit', full_name='spaceone.api.spot_automation.v1.GetCandidatesRequest.limit', index=2,
number=3, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='domain_id', full_name='spaceone.api.spot_automation.v1.GetCandidatesRequest.domain_id', index=3,
number=4, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=789,
serialized_end=889,
)
_QUERYSPOTGROUPREQUEST = _descriptor.Descriptor(
name='QuerySpotGroupRequest',
full_name='spaceone.api.spot_automation.v1.QuerySpotGroupRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='query', full_name='spaceone.api.spot_automation.v1.QuerySpotGroupRequest.query', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='spot_group_id', full_name='spaceone.api.spot_automation.v1.QuerySpotGroupRequest.spot_group_id', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='name', full_name='spaceone.api.spot_automation.v1.QuerySpotGroupRequest.name', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='resource_id', full_name='spaceone.api.spot_automation.v1.QuerySpotGroupRequest.resource_id', index=3,
number=4, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='resource_type', full_name='spaceone.api.spot_automation.v1.QuerySpotGroupRequest.resource_type', index=4,
number=5, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='provider', full_name='spaceone.api.spot_automation.v1.QuerySpotGroupRequest.provider', index=5,
number=6, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='project_id', full_name='spaceone.api.spot_automation.v1.QuerySpotGroupRequest.project_id', index=6,
number=7, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='region_code', full_name='spaceone.api.spot_automation.v1.QuerySpotGroupRequest.region_code', index=7,
number=8, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='domain_id', full_name='spaceone.api.spot_automation.v1.QuerySpotGroupRequest.domain_id', index=8,
number=9, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=892,
serialized_end=1118,
)
_SPOTGROUPSTATREQUEST = _descriptor.Descriptor(
name='SpotGroupStatRequest',
full_name='spaceone.api.spot_automation.v1.SpotGroupStatRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='query', full_name='spaceone.api.spot_automation.v1.SpotGroupStatRequest.query', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='domain_id', full_name='spaceone.api.spot_automation.v1.SpotGroupStatRequest.domain_id', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1120,
serialized_end=1215,
)
_SPOTGROUPINFO = _descriptor.Descriptor(
name='SpotGroupInfo',
full_name='spaceone.api.spot_automation.v1.SpotGroupInfo',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='spot_group_id', full_name='spaceone.api.spot_automation.v1.SpotGroupInfo.spot_group_id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='name', full_name='spaceone.api.spot_automation.v1.SpotGroupInfo.name', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='resource_id', full_name='spaceone.api.spot_automation.v1.SpotGroupInfo.resource_id', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='resource_type', full_name='spaceone.api.spot_automation.v1.SpotGroupInfo.resource_type', index=3,
number=4, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='region_code', full_name='spaceone.api.spot_automation.v1.SpotGroupInfo.region_code', index=4,
number=5, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='provider', full_name='spaceone.api.spot_automation.v1.SpotGroupInfo.provider', index=5,
number=6, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='cloud_service_group', full_name='spaceone.api.spot_automation.v1.SpotGroupInfo.cloud_service_group', index=6,
number=7, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='cloud_service_type', full_name='spaceone.api.spot_automation.v1.SpotGroupInfo.cloud_service_type', index=7,
number=8, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='reference', full_name='spaceone.api.spot_automation.v1.SpotGroupInfo.reference', index=8,
number=9, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='options', full_name='spaceone.api.spot_automation.v1.SpotGroupInfo.options', index=9,
number=10, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='project_id', full_name='spaceone.api.spot_automation.v1.SpotGroupInfo.project_id', index=10,
number=11, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='tags', full_name='spaceone.api.spot_automation.v1.SpotGroupInfo.tags', index=11,
number=20, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='domain_id', full_name='spaceone.api.spot_automation.v1.SpotGroupInfo.domain_id', index=12,
number=21, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='created_by', full_name='spaceone.api.spot_automation.v1.SpotGroupInfo.created_by', index=13,
number=22, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='created_at', full_name='spaceone.api.spot_automation.v1.SpotGroupInfo.created_at', index=14,
number=23, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1218,
serialized_end=1650,
)
_SPOTGROUPSINFO = _descriptor.Descriptor(
name='SpotGroupsInfo',
full_name='spaceone.api.spot_automation.v1.SpotGroupsInfo',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='results', full_name='spaceone.api.spot_automation.v1.SpotGroupsInfo.results', index=0,
number=1, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='total_count', full_name='spaceone.api.spot_automation.v1.SpotGroupsInfo.total_count', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1652,
serialized_end=1754,
)
_CANDIDATEINFO = _descriptor.Descriptor(
name='CandidateInfo',
full_name='spaceone.api.spot_automation.v1.CandidateInfo',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='type', full_name='spaceone.api.spot_automation.v1.CandidateInfo.type', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='priority', full_name='spaceone.api.spot_automation.v1.CandidateInfo.priority', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1756,
serialized_end=1803,
)
_CANDIDATESINFO = _descriptor.Descriptor(
name='CandidatesInfo',
full_name='spaceone.api.spot_automation.v1.CandidatesInfo',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='results', full_name='spaceone.api.spot_automation.v1.CandidatesInfo.results', index=0,
number=1, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='total_count', full_name='spaceone.api.spot_automation.v1.CandidatesInfo.total_count', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1805,
serialized_end=1907,
)
_CREATESPOTGROUPREQUEST.fields_by_name['options'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT
_CREATESPOTGROUPREQUEST.fields_by_name['tags'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT
_UPDATESPOTGROUPREQUEST.fields_by_name['options'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT
_UPDATESPOTGROUPREQUEST.fields_by_name['tags'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT
_QUERYSPOTGROUPREQUEST.fields_by_name['query'].message_type = spaceone_dot_api_dot_core_dot_v1_dot_query__pb2._QUERY
_SPOTGROUPSTATREQUEST.fields_by_name['query'].message_type = spaceone_dot_api_dot_core_dot_v1_dot_query__pb2._STATISTICSQUERY
_SPOTGROUPINFO.fields_by_name['reference'].message_type = _SPOTGROUPRESOURCEREFERENCE
_SPOTGROUPINFO.fields_by_name['options'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT
_SPOTGROUPINFO.fields_by_name['tags'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT
_SPOTGROUPSINFO.fields_by_name['results'].message_type = _SPOTGROUPINFO
_CANDIDATESINFO.fields_by_name['results'].message_type = _CANDIDATEINFO
DESCRIPTOR.message_types_by_name['SpotGroupResourceReference'] = _SPOTGROUPRESOURCEREFERENCE
DESCRIPTOR.message_types_by_name['CreateSpotGroupRequest'] = _CREATESPOTGROUPREQUEST
DESCRIPTOR.message_types_by_name['UpdateSpotGroupRequest'] = _UPDATESPOTGROUPREQUEST
DESCRIPTOR.message_types_by_name['SpotGroupRequest'] = _SPOTGROUPREQUEST
DESCRIPTOR.message_types_by_name['GetSpotGroupRequest'] = _GETSPOTGROUPREQUEST
DESCRIPTOR.message_types_by_name['GetCandidatesRequest'] = _GETCANDIDATESREQUEST
DESCRIPTOR.message_types_by_name['QuerySpotGroupRequest'] = _QUERYSPOTGROUPREQUEST
DESCRIPTOR.message_types_by_name['SpotGroupStatRequest'] = _SPOTGROUPSTATREQUEST
DESCRIPTOR.message_types_by_name['SpotGroupInfo'] = _SPOTGROUPINFO
DESCRIPTOR.message_types_by_name['SpotGroupsInfo'] = _SPOTGROUPSINFO
DESCRIPTOR.message_types_by_name['CandidateInfo'] = _CANDIDATEINFO
DESCRIPTOR.message_types_by_name['CandidatesInfo'] = _CANDIDATESINFO
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
SpotGroupResourceReference = _reflection.GeneratedProtocolMessageType('SpotGroupResourceReference', (_message.Message,), {
'DESCRIPTOR' : _SPOTGROUPRESOURCEREFERENCE,
'__module__' : 'spaceone.api.spot_automation.v1.spot_group_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.spot_automation.v1.SpotGroupResourceReference)
})
_sym_db.RegisterMessage(SpotGroupResourceReference)
CreateSpotGroupRequest = _reflection.GeneratedProtocolMessageType('CreateSpotGroupRequest', (_message.Message,), {
'DESCRIPTOR' : _CREATESPOTGROUPREQUEST,
'__module__' : 'spaceone.api.spot_automation.v1.spot_group_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.spot_automation.v1.CreateSpotGroupRequest)
})
_sym_db.RegisterMessage(CreateSpotGroupRequest)
UpdateSpotGroupRequest = _reflection.GeneratedProtocolMessageType('UpdateSpotGroupRequest', (_message.Message,), {
'DESCRIPTOR' : _UPDATESPOTGROUPREQUEST,
'__module__' : 'spaceone.api.spot_automation.v1.spot_group_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.spot_automation.v1.UpdateSpotGroupRequest)
})
_sym_db.RegisterMessage(UpdateSpotGroupRequest)
SpotGroupRequest = _reflection.GeneratedProtocolMessageType('SpotGroupRequest', (_message.Message,), {
'DESCRIPTOR' : _SPOTGROUPREQUEST,
'__module__' : 'spaceone.api.spot_automation.v1.spot_group_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.spot_automation.v1.SpotGroupRequest)
})
_sym_db.RegisterMessage(SpotGroupRequest)
GetSpotGroupRequest = _reflection.GeneratedProtocolMessageType('GetSpotGroupRequest', (_message.Message,), {
'DESCRIPTOR' : _GETSPOTGROUPREQUEST,
'__module__' : 'spaceone.api.spot_automation.v1.spot_group_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.spot_automation.v1.GetSpotGroupRequest)
})
_sym_db.RegisterMessage(GetSpotGroupRequest)
GetCandidatesRequest = _reflection.GeneratedProtocolMessageType('GetCandidatesRequest', (_message.Message,), {
'DESCRIPTOR' : _GETCANDIDATESREQUEST,
'__module__' : 'spaceone.api.spot_automation.v1.spot_group_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.spot_automation.v1.GetCandidatesRequest)
})
_sym_db.RegisterMessage(GetCandidatesRequest)
QuerySpotGroupRequest = _reflection.GeneratedProtocolMessageType('QuerySpotGroupRequest', (_message.Message,), {
'DESCRIPTOR' : _QUERYSPOTGROUPREQUEST,
'__module__' : 'spaceone.api.spot_automation.v1.spot_group_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.spot_automation.v1.QuerySpotGroupRequest)
})
_sym_db.RegisterMessage(QuerySpotGroupRequest)
SpotGroupStatRequest = _reflection.GeneratedProtocolMessageType('SpotGroupStatRequest', (_message.Message,), {
'DESCRIPTOR' : _SPOTGROUPSTATREQUEST,
'__module__' : 'spaceone.api.spot_automation.v1.spot_group_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.spot_automation.v1.SpotGroupStatRequest)
})
_sym_db.RegisterMessage(SpotGroupStatRequest)
SpotGroupInfo = _reflection.GeneratedProtocolMessageType('SpotGroupInfo', (_message.Message,), {
'DESCRIPTOR' : _SPOTGROUPINFO,
'__module__' : 'spaceone.api.spot_automation.v1.spot_group_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.spot_automation.v1.SpotGroupInfo)
})
_sym_db.RegisterMessage(SpotGroupInfo)
SpotGroupsInfo = _reflection.GeneratedProtocolMessageType('SpotGroupsInfo', (_message.Message,), {
'DESCRIPTOR' : _SPOTGROUPSINFO,
'__module__' : 'spaceone.api.spot_automation.v1.spot_group_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.spot_automation.v1.SpotGroupsInfo)
})
_sym_db.RegisterMessage(SpotGroupsInfo)
CandidateInfo = _reflection.GeneratedProtocolMessageType('CandidateInfo', (_message.Message,), {
'DESCRIPTOR' : _CANDIDATEINFO,
'__module__' : 'spaceone.api.spot_automation.v1.spot_group_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.spot_automation.v1.CandidateInfo)
})
_sym_db.RegisterMessage(CandidateInfo)
CandidatesInfo = _reflection.GeneratedProtocolMessageType('CandidatesInfo', (_message.Message,), {
'DESCRIPTOR' : _CANDIDATESINFO,
'__module__' : 'spaceone.api.spot_automation.v1.spot_group_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.spot_automation.v1.CandidatesInfo)
})
_sym_db.RegisterMessage(CandidatesInfo)
_SPOTGROUP = _descriptor.ServiceDescriptor(
name='SpotGroup',
full_name='spaceone.api.spot_automation.v1.SpotGroup',
file=DESCRIPTOR,
index=0,
serialized_options=None,
create_key=_descriptor._internal_create_key,
serialized_start=1910,
serialized_end=3064,
methods=[
_descriptor.MethodDescriptor(
name='create',
full_name='spaceone.api.spot_automation.v1.SpotGroup.create',
index=0,
containing_service=None,
input_type=_CREATESPOTGROUPREQUEST,
output_type=_SPOTGROUPINFO,
serialized_options=b'\202\323\344\223\002!\"\037/spot-automation/v1/spot-groups',
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='update',
full_name='spaceone.api.spot_automation.v1.SpotGroup.update',
index=1,
containing_service=None,
input_type=_UPDATESPOTGROUPREQUEST,
output_type=_SPOTGROUPINFO,
serialized_options=b'\202\323\344\223\0020\032./spot-automation/v1/spot-group/{spot_group_id}',
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='delete',
full_name='spaceone.api.spot_automation.v1.SpotGroup.delete',
index=2,
containing_service=None,
input_type=_SPOTGROUPREQUEST,
output_type=google_dot_protobuf_dot_empty__pb2._EMPTY,
serialized_options=b'\202\323\344\223\0020*./spot-automation/v1/spot-group/{spot_group_id}',
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='get',
full_name='spaceone.api.spot_automation.v1.SpotGroup.get',
index=3,
containing_service=None,
input_type=_GETSPOTGROUPREQUEST,
output_type=_SPOTGROUPINFO,
serialized_options=b'\202\323\344\223\0020\022./spot-automation/v1/spot-group/{spot_group_id}',
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='list',
full_name='spaceone.api.spot_automation.v1.SpotGroup.list',
index=4,
containing_service=None,
input_type=_QUERYSPOTGROUPREQUEST,
output_type=_SPOTGROUPSINFO,
serialized_options=b'\202\323\344\223\002K\022\037/spot-automation/v1/spot-groupsZ(\"&/spot-automation/v1/spot-groups/search',
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='get_candidates',
full_name='spaceone.api.spot_automation.v1.SpotGroup.get_candidates',
index=5,
containing_service=None,
input_type=_GETCANDIDATESREQUEST,
output_type=_CANDIDATESINFO,
serialized_options=b'\202\323\344\223\002+\022)/spot-automation/v1/spot-group/candidates',
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='stat',
full_name='spaceone.api.spot_automation.v1.SpotGroup.stat',
index=6,
containing_service=None,
input_type=_SPOTGROUPSTATREQUEST,
output_type=google_dot_protobuf_dot_struct__pb2._STRUCT,
serialized_options=b'\202\323\344\223\002&\"$/spot-automation/v1/spot-groups/stat',
create_key=_descriptor._internal_create_key,
),
])
_sym_db.RegisterServiceDescriptor(_SPOTGROUP)
DESCRIPTOR.services_by_name['SpotGroup'] = _SPOTGROUP
# @@protoc_insertion_point(module_scope)
| 50.491247 | 4,636 | 0.769659 | 5,968 | 46,149 | 5.629859 | 0.050603 | 0.042144 | 0.064288 | 0.067294 | 0.82178 | 0.795797 | 0.760469 | 0.749606 | 0.685913 | 0.654008 | 0 | 0.039211 | 0.107521 | 46,149 | 913 | 4,637 | 50.54655 | 0.776556 | 0.028451 | 0 | 0.696217 | 1 | 0.072104 | 0.248806 | 0.213393 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.009456 | 0 | 0.009456 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
74f7a28a662fc2a99f6f278a7c73e4e17029140c | 21 | py | Python | examples/py30-0027-type-hints2.py | jwilk-forks/python-grammar-changes | 5cbc14e520fadfef8539760a4ffdbe14b9d02f39 | [
"MIT"
] | 8 | 2020-11-21T22:39:41.000Z | 2022-03-13T18:45:53.000Z | examples/py30-0027-type-hints2.py | jwilk-forks/python-grammar-changes | 5cbc14e520fadfef8539760a4ffdbe14b9d02f39 | [
"MIT"
] | 1 | 2021-12-10T10:45:38.000Z | 2021-12-10T10:45:38.000Z | examples/py30-0027-type-hints2.py | jwilk-forks/python-grammar-changes | 5cbc14e520fadfef8539760a4ffdbe14b9d02f39 | [
"MIT"
] | 1 | 2022-02-07T11:16:38.000Z | 2022-02-07T11:16:38.000Z | def f() -> str: pass
| 10.5 | 20 | 0.52381 | 4 | 21 | 2.75 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.238095 | 21 | 1 | 21 | 21 | 0.6875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | true | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 7 |
2d0062d958d16ead3a792af15679d1b510f6cc9d | 475 | py | Python | URI/1 - INICIANTE/Python/1847 - BemVindosEBemVindasAoInverno.py | william-james-pj/LogicaProgramacao | 629f746e34da2e829dc7ea2e489ac36bb1b1fb13 | [
"MIT"
] | 1 | 2020-04-14T16:48:16.000Z | 2020-04-14T16:48:16.000Z | URI/1 - INICIANTE/Python/1847 - BemVindosEBemVindasAoInverno.py | william-james-pj/LogicaProgramacao | 629f746e34da2e829dc7ea2e489ac36bb1b1fb13 | [
"MIT"
] | null | null | null | URI/1 - INICIANTE/Python/1847 - BemVindosEBemVindasAoInverno.py | william-james-pj/LogicaProgramacao | 629f746e34da2e829dc7ea2e489ac36bb1b1fb13 | [
"MIT"
] | null | null | null | a, b, c = input().split(' ')
a = int(a)
b = int(b)
c = int(c)
if a > b and b <= c:
print(':)')
elif a < b and b >= c:
print(':(')
elif a < b and b < c and (b - a) > (c - b):
print(':(')
elif a < b and b < c and (c - b) >= (b - a):
print(':)')
elif a > b and b > c and (b-c) < (a-b):
print(':)')
elif a > b and b > c and (b-c) >= (a-b):
print(':(')
elif a == b and b < c:
print(':)')
elif a == b and b > c:
print(':(')
else:
print(":(") | 21.590909 | 44 | 0.402105 | 92 | 475 | 2.076087 | 0.119565 | 0.125654 | 0.26178 | 0.251309 | 0.764398 | 0.764398 | 0.764398 | 0.764398 | 0.764398 | 0.638743 | 0 | 0 | 0.32 | 475 | 22 | 45 | 21.590909 | 0.591331 | 0 | 0 | 0.363636 | 0 | 0 | 0.039916 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.409091 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 8 |
776306d9b68e82bec5b23db86dd825b90c888d6e | 51,315 | py | Python | sdk/python/pulumi_oci/core/vcn.py | EladGabay/pulumi-oci | 6841e27d4a1a7e15c672306b769912efbfd3ba99 | [
"ECL-2.0",
"Apache-2.0"
] | 5 | 2021-08-17T11:14:46.000Z | 2021-12-31T02:07:03.000Z | sdk/python/pulumi_oci/core/vcn.py | pulumi-oci/pulumi-oci | 6841e27d4a1a7e15c672306b769912efbfd3ba99 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-09-06T11:21:29.000Z | 2021-09-06T11:21:29.000Z | sdk/python/pulumi_oci/core/vcn.py | pulumi-oci/pulumi-oci | 6841e27d4a1a7e15c672306b769912efbfd3ba99 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2021-08-24T23:31:30.000Z | 2022-01-02T19:26:54.000Z | # 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__ = ['VcnArgs', 'Vcn']
@pulumi.input_type
class VcnArgs:
def __init__(__self__, *,
compartment_id: pulumi.Input[str],
cidr_block: Optional[pulumi.Input[str]] = None,
cidr_blocks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
defined_tags: Optional[pulumi.Input[Mapping[str, Any]]] = None,
display_name: Optional[pulumi.Input[str]] = None,
dns_label: Optional[pulumi.Input[str]] = None,
freeform_tags: Optional[pulumi.Input[Mapping[str, Any]]] = None,
is_ipv6enabled: Optional[pulumi.Input[bool]] = None):
"""
The set of arguments for constructing a Vcn resource.
:param pulumi.Input[str] compartment_id: (Updatable) The OCID of the compartment to contain the VCN.
:param pulumi.Input[str] cidr_block: **Deprecated.** Do *not* set this value. Use `cidrBlocks` instead. Example: `10.0.0.0/16`
:param pulumi.Input[Sequence[pulumi.Input[str]]] cidr_blocks: (Updatable) The list of one or more IPv4 CIDR blocks for the VCN that meet the following criteria:
* The CIDR blocks must be valid.
* They must not overlap with each other or with the on-premises network CIDR block.
* The number of CIDR blocks must not exceed the limit of CIDR blocks allowed per VCN. It is an error to set both cidrBlock and cidrBlocks. Note: cidr_blocks update must be restricted to one operation at a time (either add/remove or modify one single cidr_block) or the operation will be declined. new cidr_block to be added must be placed at the end of the list. Once you migrate to using `cidr_blocks` from `cidr_block`, you will not be able to switch back.
**Important:** Do *not* specify a value for `cidrBlock`. Use this parameter instead.
:param pulumi.Input[Mapping[str, Any]] defined_tags: (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}`
:param pulumi.Input[str] display_name: (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
:param pulumi.Input[str] dns_label: A DNS label for the VCN, used in conjunction with the VNIC's hostname and subnet's DNS label to form a fully qualified domain name (FQDN) for each VNIC within this subnet (for example, `bminstance-1.subnet123.vcn1.oraclevcn.com`). Not required to be unique, but it's a best practice to set unique DNS labels for VCNs in your tenancy. Must be an alphanumeric string that begins with a letter. The value cannot be changed.
:param pulumi.Input[Mapping[str, Any]] freeform_tags: (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}`
:param pulumi.Input[bool] is_ipv6enabled: Whether IPv6 is enabled for the VCN. Default is `false`. If enabled, Oracle will assign the VCN a IPv6 /56 CIDR block. For important details about IPv6 addressing in a VCN, see [IPv6 Addresses](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). Example: `true`
"""
pulumi.set(__self__, "compartment_id", compartment_id)
if cidr_block is not None:
pulumi.set(__self__, "cidr_block", cidr_block)
if cidr_blocks is not None:
pulumi.set(__self__, "cidr_blocks", cidr_blocks)
if defined_tags is not None:
pulumi.set(__self__, "defined_tags", defined_tags)
if display_name is not None:
pulumi.set(__self__, "display_name", display_name)
if dns_label is not None:
pulumi.set(__self__, "dns_label", dns_label)
if freeform_tags is not None:
pulumi.set(__self__, "freeform_tags", freeform_tags)
if is_ipv6enabled is not None:
pulumi.set(__self__, "is_ipv6enabled", is_ipv6enabled)
@property
@pulumi.getter(name="compartmentId")
def compartment_id(self) -> pulumi.Input[str]:
"""
(Updatable) The OCID of the compartment to contain the VCN.
"""
return pulumi.get(self, "compartment_id")
@compartment_id.setter
def compartment_id(self, value: pulumi.Input[str]):
pulumi.set(self, "compartment_id", value)
@property
@pulumi.getter(name="cidrBlock")
def cidr_block(self) -> Optional[pulumi.Input[str]]:
"""
**Deprecated.** Do *not* set this value. Use `cidrBlocks` instead. Example: `10.0.0.0/16`
"""
return pulumi.get(self, "cidr_block")
@cidr_block.setter
def cidr_block(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "cidr_block", value)
@property
@pulumi.getter(name="cidrBlocks")
def cidr_blocks(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
"""
(Updatable) The list of one or more IPv4 CIDR blocks for the VCN that meet the following criteria:
* The CIDR blocks must be valid.
* They must not overlap with each other or with the on-premises network CIDR block.
* The number of CIDR blocks must not exceed the limit of CIDR blocks allowed per VCN. It is an error to set both cidrBlock and cidrBlocks. Note: cidr_blocks update must be restricted to one operation at a time (either add/remove or modify one single cidr_block) or the operation will be declined. new cidr_block to be added must be placed at the end of the list. Once you migrate to using `cidr_blocks` from `cidr_block`, you will not be able to switch back.
**Important:** Do *not* specify a value for `cidrBlock`. Use this parameter instead.
"""
return pulumi.get(self, "cidr_blocks")
@cidr_blocks.setter
def cidr_blocks(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "cidr_blocks", value)
@property
@pulumi.getter(name="definedTags")
def defined_tags(self) -> Optional[pulumi.Input[Mapping[str, Any]]]:
"""
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}`
"""
return pulumi.get(self, "defined_tags")
@defined_tags.setter
def defined_tags(self, value: Optional[pulumi.Input[Mapping[str, Any]]]):
pulumi.set(self, "defined_tags", value)
@property
@pulumi.getter(name="displayName")
def display_name(self) -> Optional[pulumi.Input[str]]:
"""
(Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
"""
return pulumi.get(self, "display_name")
@display_name.setter
def display_name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "display_name", value)
@property
@pulumi.getter(name="dnsLabel")
def dns_label(self) -> Optional[pulumi.Input[str]]:
"""
A DNS label for the VCN, used in conjunction with the VNIC's hostname and subnet's DNS label to form a fully qualified domain name (FQDN) for each VNIC within this subnet (for example, `bminstance-1.subnet123.vcn1.oraclevcn.com`). Not required to be unique, but it's a best practice to set unique DNS labels for VCNs in your tenancy. Must be an alphanumeric string that begins with a letter. The value cannot be changed.
"""
return pulumi.get(self, "dns_label")
@dns_label.setter
def dns_label(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "dns_label", value)
@property
@pulumi.getter(name="freeformTags")
def freeform_tags(self) -> Optional[pulumi.Input[Mapping[str, Any]]]:
"""
(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}`
"""
return pulumi.get(self, "freeform_tags")
@freeform_tags.setter
def freeform_tags(self, value: Optional[pulumi.Input[Mapping[str, Any]]]):
pulumi.set(self, "freeform_tags", value)
@property
@pulumi.getter(name="isIpv6enabled")
def is_ipv6enabled(self) -> Optional[pulumi.Input[bool]]:
"""
Whether IPv6 is enabled for the VCN. Default is `false`. If enabled, Oracle will assign the VCN a IPv6 /56 CIDR block. For important details about IPv6 addressing in a VCN, see [IPv6 Addresses](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). Example: `true`
"""
return pulumi.get(self, "is_ipv6enabled")
@is_ipv6enabled.setter
def is_ipv6enabled(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "is_ipv6enabled", value)
@pulumi.input_type
class _VcnState:
def __init__(__self__, *,
cidr_block: Optional[pulumi.Input[str]] = None,
cidr_blocks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
compartment_id: Optional[pulumi.Input[str]] = None,
default_dhcp_options_id: Optional[pulumi.Input[str]] = None,
default_route_table_id: Optional[pulumi.Input[str]] = None,
default_security_list_id: Optional[pulumi.Input[str]] = None,
defined_tags: Optional[pulumi.Input[Mapping[str, Any]]] = None,
display_name: Optional[pulumi.Input[str]] = None,
dns_label: Optional[pulumi.Input[str]] = None,
freeform_tags: Optional[pulumi.Input[Mapping[str, Any]]] = None,
ipv6cidr_blocks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
is_ipv6enabled: Optional[pulumi.Input[bool]] = None,
state: Optional[pulumi.Input[str]] = None,
time_created: Optional[pulumi.Input[str]] = None,
vcn_domain_name: Optional[pulumi.Input[str]] = None):
"""
Input properties used for looking up and filtering Vcn resources.
:param pulumi.Input[str] cidr_block: **Deprecated.** Do *not* set this value. Use `cidrBlocks` instead. Example: `10.0.0.0/16`
:param pulumi.Input[Sequence[pulumi.Input[str]]] cidr_blocks: (Updatable) The list of one or more IPv4 CIDR blocks for the VCN that meet the following criteria:
* The CIDR blocks must be valid.
* They must not overlap with each other or with the on-premises network CIDR block.
* The number of CIDR blocks must not exceed the limit of CIDR blocks allowed per VCN. It is an error to set both cidrBlock and cidrBlocks. Note: cidr_blocks update must be restricted to one operation at a time (either add/remove or modify one single cidr_block) or the operation will be declined. new cidr_block to be added must be placed at the end of the list. Once you migrate to using `cidr_blocks` from `cidr_block`, you will not be able to switch back.
**Important:** Do *not* specify a value for `cidrBlock`. Use this parameter instead.
:param pulumi.Input[str] compartment_id: (Updatable) The OCID of the compartment to contain the VCN.
:param pulumi.Input[str] default_dhcp_options_id: The OCID for the VCN's default set of DHCP options.
:param pulumi.Input[str] default_route_table_id: The OCID for the VCN's default route table.
:param pulumi.Input[str] default_security_list_id: The OCID for the VCN's default security list.
:param pulumi.Input[Mapping[str, Any]] defined_tags: (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}`
:param pulumi.Input[str] display_name: (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
:param pulumi.Input[str] dns_label: A DNS label for the VCN, used in conjunction with the VNIC's hostname and subnet's DNS label to form a fully qualified domain name (FQDN) for each VNIC within this subnet (for example, `bminstance-1.subnet123.vcn1.oraclevcn.com`). Not required to be unique, but it's a best practice to set unique DNS labels for VCNs in your tenancy. Must be an alphanumeric string that begins with a letter. The value cannot be changed.
:param pulumi.Input[Mapping[str, Any]] freeform_tags: (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}`
:param pulumi.Input[Sequence[pulumi.Input[str]]] ipv6cidr_blocks: For an IPv6-enabled VCN, this is the list of IPv6 CIDR blocks for the VCN's IP address space. The CIDRs are provided by Oracle and the sizes are always /56.
:param pulumi.Input[bool] is_ipv6enabled: Whether IPv6 is enabled for the VCN. Default is `false`. If enabled, Oracle will assign the VCN a IPv6 /56 CIDR block. For important details about IPv6 addressing in a VCN, see [IPv6 Addresses](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). Example: `true`
:param pulumi.Input[str] state: The VCN's current state.
:param pulumi.Input[str] time_created: The date and time the VCN was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). Example: `2016-08-25T21:10:29.600Z`
:param pulumi.Input[str] vcn_domain_name: The VCN's domain name, which consists of the VCN's DNS label, and the `oraclevcn.com` domain.
"""
if cidr_block is not None:
pulumi.set(__self__, "cidr_block", cidr_block)
if cidr_blocks is not None:
pulumi.set(__self__, "cidr_blocks", cidr_blocks)
if compartment_id is not None:
pulumi.set(__self__, "compartment_id", compartment_id)
if default_dhcp_options_id is not None:
pulumi.set(__self__, "default_dhcp_options_id", default_dhcp_options_id)
if default_route_table_id is not None:
pulumi.set(__self__, "default_route_table_id", default_route_table_id)
if default_security_list_id is not None:
pulumi.set(__self__, "default_security_list_id", default_security_list_id)
if defined_tags is not None:
pulumi.set(__self__, "defined_tags", defined_tags)
if display_name is not None:
pulumi.set(__self__, "display_name", display_name)
if dns_label is not None:
pulumi.set(__self__, "dns_label", dns_label)
if freeform_tags is not None:
pulumi.set(__self__, "freeform_tags", freeform_tags)
if ipv6cidr_blocks is not None:
pulumi.set(__self__, "ipv6cidr_blocks", ipv6cidr_blocks)
if is_ipv6enabled is not None:
pulumi.set(__self__, "is_ipv6enabled", is_ipv6enabled)
if state is not None:
pulumi.set(__self__, "state", state)
if time_created is not None:
pulumi.set(__self__, "time_created", time_created)
if vcn_domain_name is not None:
pulumi.set(__self__, "vcn_domain_name", vcn_domain_name)
@property
@pulumi.getter(name="cidrBlock")
def cidr_block(self) -> Optional[pulumi.Input[str]]:
"""
**Deprecated.** Do *not* set this value. Use `cidrBlocks` instead. Example: `10.0.0.0/16`
"""
return pulumi.get(self, "cidr_block")
@cidr_block.setter
def cidr_block(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "cidr_block", value)
@property
@pulumi.getter(name="cidrBlocks")
def cidr_blocks(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
"""
(Updatable) The list of one or more IPv4 CIDR blocks for the VCN that meet the following criteria:
* The CIDR blocks must be valid.
* They must not overlap with each other or with the on-premises network CIDR block.
* The number of CIDR blocks must not exceed the limit of CIDR blocks allowed per VCN. It is an error to set both cidrBlock and cidrBlocks. Note: cidr_blocks update must be restricted to one operation at a time (either add/remove or modify one single cidr_block) or the operation will be declined. new cidr_block to be added must be placed at the end of the list. Once you migrate to using `cidr_blocks` from `cidr_block`, you will not be able to switch back.
**Important:** Do *not* specify a value for `cidrBlock`. Use this parameter instead.
"""
return pulumi.get(self, "cidr_blocks")
@cidr_blocks.setter
def cidr_blocks(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "cidr_blocks", value)
@property
@pulumi.getter(name="compartmentId")
def compartment_id(self) -> Optional[pulumi.Input[str]]:
"""
(Updatable) The OCID of the compartment to contain the VCN.
"""
return pulumi.get(self, "compartment_id")
@compartment_id.setter
def compartment_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "compartment_id", value)
@property
@pulumi.getter(name="defaultDhcpOptionsId")
def default_dhcp_options_id(self) -> Optional[pulumi.Input[str]]:
"""
The OCID for the VCN's default set of DHCP options.
"""
return pulumi.get(self, "default_dhcp_options_id")
@default_dhcp_options_id.setter
def default_dhcp_options_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "default_dhcp_options_id", value)
@property
@pulumi.getter(name="defaultRouteTableId")
def default_route_table_id(self) -> Optional[pulumi.Input[str]]:
"""
The OCID for the VCN's default route table.
"""
return pulumi.get(self, "default_route_table_id")
@default_route_table_id.setter
def default_route_table_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "default_route_table_id", value)
@property
@pulumi.getter(name="defaultSecurityListId")
def default_security_list_id(self) -> Optional[pulumi.Input[str]]:
"""
The OCID for the VCN's default security list.
"""
return pulumi.get(self, "default_security_list_id")
@default_security_list_id.setter
def default_security_list_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "default_security_list_id", value)
@property
@pulumi.getter(name="definedTags")
def defined_tags(self) -> Optional[pulumi.Input[Mapping[str, Any]]]:
"""
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}`
"""
return pulumi.get(self, "defined_tags")
@defined_tags.setter
def defined_tags(self, value: Optional[pulumi.Input[Mapping[str, Any]]]):
pulumi.set(self, "defined_tags", value)
@property
@pulumi.getter(name="displayName")
def display_name(self) -> Optional[pulumi.Input[str]]:
"""
(Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
"""
return pulumi.get(self, "display_name")
@display_name.setter
def display_name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "display_name", value)
@property
@pulumi.getter(name="dnsLabel")
def dns_label(self) -> Optional[pulumi.Input[str]]:
"""
A DNS label for the VCN, used in conjunction with the VNIC's hostname and subnet's DNS label to form a fully qualified domain name (FQDN) for each VNIC within this subnet (for example, `bminstance-1.subnet123.vcn1.oraclevcn.com`). Not required to be unique, but it's a best practice to set unique DNS labels for VCNs in your tenancy. Must be an alphanumeric string that begins with a letter. The value cannot be changed.
"""
return pulumi.get(self, "dns_label")
@dns_label.setter
def dns_label(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "dns_label", value)
@property
@pulumi.getter(name="freeformTags")
def freeform_tags(self) -> Optional[pulumi.Input[Mapping[str, Any]]]:
"""
(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}`
"""
return pulumi.get(self, "freeform_tags")
@freeform_tags.setter
def freeform_tags(self, value: Optional[pulumi.Input[Mapping[str, Any]]]):
pulumi.set(self, "freeform_tags", value)
@property
@pulumi.getter(name="ipv6cidrBlocks")
def ipv6cidr_blocks(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
"""
For an IPv6-enabled VCN, this is the list of IPv6 CIDR blocks for the VCN's IP address space. The CIDRs are provided by Oracle and the sizes are always /56.
"""
return pulumi.get(self, "ipv6cidr_blocks")
@ipv6cidr_blocks.setter
def ipv6cidr_blocks(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "ipv6cidr_blocks", value)
@property
@pulumi.getter(name="isIpv6enabled")
def is_ipv6enabled(self) -> Optional[pulumi.Input[bool]]:
"""
Whether IPv6 is enabled for the VCN. Default is `false`. If enabled, Oracle will assign the VCN a IPv6 /56 CIDR block. For important details about IPv6 addressing in a VCN, see [IPv6 Addresses](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). Example: `true`
"""
return pulumi.get(self, "is_ipv6enabled")
@is_ipv6enabled.setter
def is_ipv6enabled(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "is_ipv6enabled", value)
@property
@pulumi.getter
def state(self) -> Optional[pulumi.Input[str]]:
"""
The VCN's current state.
"""
return pulumi.get(self, "state")
@state.setter
def state(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "state", value)
@property
@pulumi.getter(name="timeCreated")
def time_created(self) -> Optional[pulumi.Input[str]]:
"""
The date and time the VCN was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). Example: `2016-08-25T21:10:29.600Z`
"""
return pulumi.get(self, "time_created")
@time_created.setter
def time_created(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "time_created", value)
@property
@pulumi.getter(name="vcnDomainName")
def vcn_domain_name(self) -> Optional[pulumi.Input[str]]:
"""
The VCN's domain name, which consists of the VCN's DNS label, and the `oraclevcn.com` domain.
"""
return pulumi.get(self, "vcn_domain_name")
@vcn_domain_name.setter
def vcn_domain_name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "vcn_domain_name", value)
class Vcn(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
cidr_block: Optional[pulumi.Input[str]] = None,
cidr_blocks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
compartment_id: Optional[pulumi.Input[str]] = None,
defined_tags: Optional[pulumi.Input[Mapping[str, Any]]] = None,
display_name: Optional[pulumi.Input[str]] = None,
dns_label: Optional[pulumi.Input[str]] = None,
freeform_tags: Optional[pulumi.Input[Mapping[str, Any]]] = None,
is_ipv6enabled: Optional[pulumi.Input[bool]] = None,
__props__=None):
"""
This resource provides the Vcn resource in Oracle Cloud Infrastructure Core service.
The VCN automatically comes with a default route table, default security list, and default set of DHCP options.
For managing these resources, see [Managing Default VCN Resources](https://www.terraform.io/docs/providers/oci/guides/managing_default_resources.html)
Creates a new Virtual Cloud Network (VCN). For more information, see
[VCNs and Subnets](https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingVCNs.htm).
For the VCN, you specify a list of one or more IPv4 CIDR blocks that meet the following criteria:
- The CIDR blocks must be valid.
- They must not overlap with each other or with the on-premises network CIDR block.
- The number of CIDR blocks does not exceed the limit of CIDR blocks allowed per VCN.
For a CIDR block, Oracle recommends that you use one of the private IP address ranges specified in [RFC 1918](https://tools.ietf.org/html/rfc1918) (10.0.0.0/8, 172.16/12, and 192.168/16). Example:
172.16.0.0/16. The CIDR blocks can range from /16 to /30.
For the purposes of access control, you must provide the OCID of the compartment where you want the VCN to
reside. Consult an Oracle Cloud Infrastructure administrator in your organization if you're not sure which
compartment to use. Notice that the VCN doesn't have to be in the same compartment as the subnets or other
Networking Service components. For more information about compartments and access control, see
[Overview of the IAM Service](https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about OCIDs, see
[Resource Identifiers](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
You may optionally specify a *display name* for the VCN, otherwise a default is provided. It does not have to
be unique, and you can change it. Avoid entering confidential information.
You can also add a DNS label for the VCN, which is required if you want the instances to use the
Interent and VCN Resolver option for DNS in the VCN. For more information, see
[DNS in Your Virtual Cloud Network](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/dns.htm).
The VCN automatically comes with a default route table, default security list, and default set of DHCP options.
The OCID for each is returned in the response. You can't delete these default objects, but you can change their
contents (that is, change the route rules, security list rules, and so on).
The VCN and subnets you create are not accessible until you attach an internet gateway or set up an IPSec VPN
or FastConnect. For more information, see
[Overview of the Networking Service](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm).
## Supported Aliases
* `oci_core_virtual_network`
## Example Usage
```python
import pulumi
import pulumi_oci as oci
test_vcn = oci.core.Vcn("testVcn",
compartment_id=var["compartment_id"],
cidr_block=var["vcn_cidr_block"],
cidr_blocks=var["vcn_cidr_blocks"],
defined_tags={
"Operations.CostCenter": "42",
},
display_name=var["vcn_display_name"],
dns_label=var["vcn_dns_label"],
freeform_tags={
"Department": "Finance",
},
is_ipv6enabled=var["vcn_is_ipv6enabled"])
```
## Import
Vcns can be imported using the `id`, e.g.
```sh
$ pulumi import oci:core/vcn:Vcn test_vcn "id"
```
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] cidr_block: **Deprecated.** Do *not* set this value. Use `cidrBlocks` instead. Example: `10.0.0.0/16`
:param pulumi.Input[Sequence[pulumi.Input[str]]] cidr_blocks: (Updatable) The list of one or more IPv4 CIDR blocks for the VCN that meet the following criteria:
* The CIDR blocks must be valid.
* They must not overlap with each other or with the on-premises network CIDR block.
* The number of CIDR blocks must not exceed the limit of CIDR blocks allowed per VCN. It is an error to set both cidrBlock and cidrBlocks. Note: cidr_blocks update must be restricted to one operation at a time (either add/remove or modify one single cidr_block) or the operation will be declined. new cidr_block to be added must be placed at the end of the list. Once you migrate to using `cidr_blocks` from `cidr_block`, you will not be able to switch back.
**Important:** Do *not* specify a value for `cidrBlock`. Use this parameter instead.
:param pulumi.Input[str] compartment_id: (Updatable) The OCID of the compartment to contain the VCN.
:param pulumi.Input[Mapping[str, Any]] defined_tags: (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}`
:param pulumi.Input[str] display_name: (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
:param pulumi.Input[str] dns_label: A DNS label for the VCN, used in conjunction with the VNIC's hostname and subnet's DNS label to form a fully qualified domain name (FQDN) for each VNIC within this subnet (for example, `bminstance-1.subnet123.vcn1.oraclevcn.com`). Not required to be unique, but it's a best practice to set unique DNS labels for VCNs in your tenancy. Must be an alphanumeric string that begins with a letter. The value cannot be changed.
:param pulumi.Input[Mapping[str, Any]] freeform_tags: (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}`
:param pulumi.Input[bool] is_ipv6enabled: Whether IPv6 is enabled for the VCN. Default is `false`. If enabled, Oracle will assign the VCN a IPv6 /56 CIDR block. For important details about IPv6 addressing in a VCN, see [IPv6 Addresses](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). Example: `true`
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: VcnArgs,
opts: Optional[pulumi.ResourceOptions] = None):
"""
This resource provides the Vcn resource in Oracle Cloud Infrastructure Core service.
The VCN automatically comes with a default route table, default security list, and default set of DHCP options.
For managing these resources, see [Managing Default VCN Resources](https://www.terraform.io/docs/providers/oci/guides/managing_default_resources.html)
Creates a new Virtual Cloud Network (VCN). For more information, see
[VCNs and Subnets](https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingVCNs.htm).
For the VCN, you specify a list of one or more IPv4 CIDR blocks that meet the following criteria:
- The CIDR blocks must be valid.
- They must not overlap with each other or with the on-premises network CIDR block.
- The number of CIDR blocks does not exceed the limit of CIDR blocks allowed per VCN.
For a CIDR block, Oracle recommends that you use one of the private IP address ranges specified in [RFC 1918](https://tools.ietf.org/html/rfc1918) (10.0.0.0/8, 172.16/12, and 192.168/16). Example:
172.16.0.0/16. The CIDR blocks can range from /16 to /30.
For the purposes of access control, you must provide the OCID of the compartment where you want the VCN to
reside. Consult an Oracle Cloud Infrastructure administrator in your organization if you're not sure which
compartment to use. Notice that the VCN doesn't have to be in the same compartment as the subnets or other
Networking Service components. For more information about compartments and access control, see
[Overview of the IAM Service](https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about OCIDs, see
[Resource Identifiers](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
You may optionally specify a *display name* for the VCN, otherwise a default is provided. It does not have to
be unique, and you can change it. Avoid entering confidential information.
You can also add a DNS label for the VCN, which is required if you want the instances to use the
Interent and VCN Resolver option for DNS in the VCN. For more information, see
[DNS in Your Virtual Cloud Network](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/dns.htm).
The VCN automatically comes with a default route table, default security list, and default set of DHCP options.
The OCID for each is returned in the response. You can't delete these default objects, but you can change their
contents (that is, change the route rules, security list rules, and so on).
The VCN and subnets you create are not accessible until you attach an internet gateway or set up an IPSec VPN
or FastConnect. For more information, see
[Overview of the Networking Service](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm).
## Supported Aliases
* `oci_core_virtual_network`
## Example Usage
```python
import pulumi
import pulumi_oci as oci
test_vcn = oci.core.Vcn("testVcn",
compartment_id=var["compartment_id"],
cidr_block=var["vcn_cidr_block"],
cidr_blocks=var["vcn_cidr_blocks"],
defined_tags={
"Operations.CostCenter": "42",
},
display_name=var["vcn_display_name"],
dns_label=var["vcn_dns_label"],
freeform_tags={
"Department": "Finance",
},
is_ipv6enabled=var["vcn_is_ipv6enabled"])
```
## Import
Vcns can be imported using the `id`, e.g.
```sh
$ pulumi import oci:core/vcn:Vcn test_vcn "id"
```
:param str resource_name: The name of the resource.
:param VcnArgs 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(VcnArgs, 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,
cidr_block: Optional[pulumi.Input[str]] = None,
cidr_blocks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
compartment_id: Optional[pulumi.Input[str]] = None,
defined_tags: Optional[pulumi.Input[Mapping[str, Any]]] = None,
display_name: Optional[pulumi.Input[str]] = None,
dns_label: Optional[pulumi.Input[str]] = None,
freeform_tags: Optional[pulumi.Input[Mapping[str, Any]]] = None,
is_ipv6enabled: Optional[pulumi.Input[bool]] = None,
__props__=None):
if opts is None:
opts = pulumi.ResourceOptions()
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.version is None:
opts.version = _utilities.get_version()
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = VcnArgs.__new__(VcnArgs)
__props__.__dict__["cidr_block"] = cidr_block
__props__.__dict__["cidr_blocks"] = cidr_blocks
if compartment_id is None and not opts.urn:
raise TypeError("Missing required property 'compartment_id'")
__props__.__dict__["compartment_id"] = compartment_id
__props__.__dict__["defined_tags"] = defined_tags
__props__.__dict__["display_name"] = display_name
__props__.__dict__["dns_label"] = dns_label
__props__.__dict__["freeform_tags"] = freeform_tags
__props__.__dict__["is_ipv6enabled"] = is_ipv6enabled
__props__.__dict__["default_dhcp_options_id"] = None
__props__.__dict__["default_route_table_id"] = None
__props__.__dict__["default_security_list_id"] = None
__props__.__dict__["ipv6cidr_blocks"] = None
__props__.__dict__["state"] = None
__props__.__dict__["time_created"] = None
__props__.__dict__["vcn_domain_name"] = None
super(Vcn, __self__).__init__(
'oci:core/vcn:Vcn',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None,
cidr_block: Optional[pulumi.Input[str]] = None,
cidr_blocks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
compartment_id: Optional[pulumi.Input[str]] = None,
default_dhcp_options_id: Optional[pulumi.Input[str]] = None,
default_route_table_id: Optional[pulumi.Input[str]] = None,
default_security_list_id: Optional[pulumi.Input[str]] = None,
defined_tags: Optional[pulumi.Input[Mapping[str, Any]]] = None,
display_name: Optional[pulumi.Input[str]] = None,
dns_label: Optional[pulumi.Input[str]] = None,
freeform_tags: Optional[pulumi.Input[Mapping[str, Any]]] = None,
ipv6cidr_blocks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
is_ipv6enabled: Optional[pulumi.Input[bool]] = None,
state: Optional[pulumi.Input[str]] = None,
time_created: Optional[pulumi.Input[str]] = None,
vcn_domain_name: Optional[pulumi.Input[str]] = None) -> 'Vcn':
"""
Get an existing Vcn 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] cidr_block: **Deprecated.** Do *not* set this value. Use `cidrBlocks` instead. Example: `10.0.0.0/16`
:param pulumi.Input[Sequence[pulumi.Input[str]]] cidr_blocks: (Updatable) The list of one or more IPv4 CIDR blocks for the VCN that meet the following criteria:
* The CIDR blocks must be valid.
* They must not overlap with each other or with the on-premises network CIDR block.
* The number of CIDR blocks must not exceed the limit of CIDR blocks allowed per VCN. It is an error to set both cidrBlock and cidrBlocks. Note: cidr_blocks update must be restricted to one operation at a time (either add/remove or modify one single cidr_block) or the operation will be declined. new cidr_block to be added must be placed at the end of the list. Once you migrate to using `cidr_blocks` from `cidr_block`, you will not be able to switch back.
**Important:** Do *not* specify a value for `cidrBlock`. Use this parameter instead.
:param pulumi.Input[str] compartment_id: (Updatable) The OCID of the compartment to contain the VCN.
:param pulumi.Input[str] default_dhcp_options_id: The OCID for the VCN's default set of DHCP options.
:param pulumi.Input[str] default_route_table_id: The OCID for the VCN's default route table.
:param pulumi.Input[str] default_security_list_id: The OCID for the VCN's default security list.
:param pulumi.Input[Mapping[str, Any]] defined_tags: (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}`
:param pulumi.Input[str] display_name: (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
:param pulumi.Input[str] dns_label: A DNS label for the VCN, used in conjunction with the VNIC's hostname and subnet's DNS label to form a fully qualified domain name (FQDN) for each VNIC within this subnet (for example, `bminstance-1.subnet123.vcn1.oraclevcn.com`). Not required to be unique, but it's a best practice to set unique DNS labels for VCNs in your tenancy. Must be an alphanumeric string that begins with a letter. The value cannot be changed.
:param pulumi.Input[Mapping[str, Any]] freeform_tags: (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}`
:param pulumi.Input[Sequence[pulumi.Input[str]]] ipv6cidr_blocks: For an IPv6-enabled VCN, this is the list of IPv6 CIDR blocks for the VCN's IP address space. The CIDRs are provided by Oracle and the sizes are always /56.
:param pulumi.Input[bool] is_ipv6enabled: Whether IPv6 is enabled for the VCN. Default is `false`. If enabled, Oracle will assign the VCN a IPv6 /56 CIDR block. For important details about IPv6 addressing in a VCN, see [IPv6 Addresses](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). Example: `true`
:param pulumi.Input[str] state: The VCN's current state.
:param pulumi.Input[str] time_created: The date and time the VCN was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). Example: `2016-08-25T21:10:29.600Z`
:param pulumi.Input[str] vcn_domain_name: The VCN's domain name, which consists of the VCN's DNS label, and the `oraclevcn.com` domain.
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _VcnState.__new__(_VcnState)
__props__.__dict__["cidr_block"] = cidr_block
__props__.__dict__["cidr_blocks"] = cidr_blocks
__props__.__dict__["compartment_id"] = compartment_id
__props__.__dict__["default_dhcp_options_id"] = default_dhcp_options_id
__props__.__dict__["default_route_table_id"] = default_route_table_id
__props__.__dict__["default_security_list_id"] = default_security_list_id
__props__.__dict__["defined_tags"] = defined_tags
__props__.__dict__["display_name"] = display_name
__props__.__dict__["dns_label"] = dns_label
__props__.__dict__["freeform_tags"] = freeform_tags
__props__.__dict__["ipv6cidr_blocks"] = ipv6cidr_blocks
__props__.__dict__["is_ipv6enabled"] = is_ipv6enabled
__props__.__dict__["state"] = state
__props__.__dict__["time_created"] = time_created
__props__.__dict__["vcn_domain_name"] = vcn_domain_name
return Vcn(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter(name="cidrBlock")
def cidr_block(self) -> pulumi.Output[str]:
"""
**Deprecated.** Do *not* set this value. Use `cidrBlocks` instead. Example: `10.0.0.0/16`
"""
return pulumi.get(self, "cidr_block")
@property
@pulumi.getter(name="cidrBlocks")
def cidr_blocks(self) -> pulumi.Output[Sequence[str]]:
"""
(Updatable) The list of one or more IPv4 CIDR blocks for the VCN that meet the following criteria:
* The CIDR blocks must be valid.
* They must not overlap with each other or with the on-premises network CIDR block.
* The number of CIDR blocks must not exceed the limit of CIDR blocks allowed per VCN. It is an error to set both cidrBlock and cidrBlocks. Note: cidr_blocks update must be restricted to one operation at a time (either add/remove or modify one single cidr_block) or the operation will be declined. new cidr_block to be added must be placed at the end of the list. Once you migrate to using `cidr_blocks` from `cidr_block`, you will not be able to switch back.
**Important:** Do *not* specify a value for `cidrBlock`. Use this parameter instead.
"""
return pulumi.get(self, "cidr_blocks")
@property
@pulumi.getter(name="compartmentId")
def compartment_id(self) -> pulumi.Output[str]:
"""
(Updatable) The OCID of the compartment to contain the VCN.
"""
return pulumi.get(self, "compartment_id")
@property
@pulumi.getter(name="defaultDhcpOptionsId")
def default_dhcp_options_id(self) -> pulumi.Output[str]:
"""
The OCID for the VCN's default set of DHCP options.
"""
return pulumi.get(self, "default_dhcp_options_id")
@property
@pulumi.getter(name="defaultRouteTableId")
def default_route_table_id(self) -> pulumi.Output[str]:
"""
The OCID for the VCN's default route table.
"""
return pulumi.get(self, "default_route_table_id")
@property
@pulumi.getter(name="defaultSecurityListId")
def default_security_list_id(self) -> pulumi.Output[str]:
"""
The OCID for the VCN's default security list.
"""
return pulumi.get(self, "default_security_list_id")
@property
@pulumi.getter(name="definedTags")
def defined_tags(self) -> pulumi.Output[Mapping[str, Any]]:
"""
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}`
"""
return pulumi.get(self, "defined_tags")
@property
@pulumi.getter(name="displayName")
def display_name(self) -> pulumi.Output[str]:
"""
(Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
"""
return pulumi.get(self, "display_name")
@property
@pulumi.getter(name="dnsLabel")
def dns_label(self) -> pulumi.Output[str]:
"""
A DNS label for the VCN, used in conjunction with the VNIC's hostname and subnet's DNS label to form a fully qualified domain name (FQDN) for each VNIC within this subnet (for example, `bminstance-1.subnet123.vcn1.oraclevcn.com`). Not required to be unique, but it's a best practice to set unique DNS labels for VCNs in your tenancy. Must be an alphanumeric string that begins with a letter. The value cannot be changed.
"""
return pulumi.get(self, "dns_label")
@property
@pulumi.getter(name="freeformTags")
def freeform_tags(self) -> pulumi.Output[Mapping[str, Any]]:
"""
(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}`
"""
return pulumi.get(self, "freeform_tags")
@property
@pulumi.getter(name="ipv6cidrBlocks")
def ipv6cidr_blocks(self) -> pulumi.Output[Sequence[str]]:
"""
For an IPv6-enabled VCN, this is the list of IPv6 CIDR blocks for the VCN's IP address space. The CIDRs are provided by Oracle and the sizes are always /56.
"""
return pulumi.get(self, "ipv6cidr_blocks")
@property
@pulumi.getter(name="isIpv6enabled")
def is_ipv6enabled(self) -> pulumi.Output[bool]:
"""
Whether IPv6 is enabled for the VCN. Default is `false`. If enabled, Oracle will assign the VCN a IPv6 /56 CIDR block. For important details about IPv6 addressing in a VCN, see [IPv6 Addresses](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). Example: `true`
"""
return pulumi.get(self, "is_ipv6enabled")
@property
@pulumi.getter
def state(self) -> pulumi.Output[str]:
"""
The VCN's current state.
"""
return pulumi.get(self, "state")
@property
@pulumi.getter(name="timeCreated")
def time_created(self) -> pulumi.Output[str]:
"""
The date and time the VCN was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). Example: `2016-08-25T21:10:29.600Z`
"""
return pulumi.get(self, "time_created")
@property
@pulumi.getter(name="vcnDomainName")
def vcn_domain_name(self) -> pulumi.Output[str]:
"""
The VCN's domain name, which consists of the VCN's DNS label, and the `oraclevcn.com` domain.
"""
return pulumi.get(self, "vcn_domain_name")
| 60.944181 | 473 | 0.682627 | 7,096 | 51,315 | 4.790445 | 0.056793 | 0.054688 | 0.044892 | 0.03689 | 0.945489 | 0.93531 | 0.924014 | 0.916777 | 0.900215 | 0.873268 | 0 | 0.010431 | 0.219059 | 51,315 | 841 | 474 | 61.016647 | 0.837825 | 0.549995 | 0 | 0.704156 | 1 | 0 | 0.108528 | 0.022133 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166259 | false | 0.002445 | 0.012225 | 0 | 0.281174 | 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 |
7781765d69f3e6c8dcec2b7d06513495fea9e67f | 114 | py | Python | load_data/__init__.py | newTypeGeek/face-recognition | 235cf4aaf60ba3504b0e73dbab5f9dc4c7cc3dbd | [
"Apache-2.0"
] | 5 | 2020-02-10T04:38:40.000Z | 2021-09-01T18:50:18.000Z | load_data/__init__.py | newTypeGeek/face-recognition | 235cf4aaf60ba3504b0e73dbab5f9dc4c7cc3dbd | [
"Apache-2.0"
] | 1 | 2020-06-11T18:26:38.000Z | 2020-06-11T18:26:38.000Z | load_data/__init__.py | newTypeGeek/face-recognition | 235cf4aaf60ba3504b0e73dbab5f9dc4c7cc3dbd | [
"Apache-2.0"
] | 3 | 2019-06-24T12:30:12.000Z | 2020-02-10T04:39:59.000Z | import load_data.load_vec as load_vec
import load_data.load_clf as load_clf
import load_data.load_cnn as load_cnn
| 28.5 | 37 | 0.868421 | 24 | 114 | 3.75 | 0.291667 | 0.333333 | 0.466667 | 0.6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.105263 | 114 | 3 | 38 | 38 | 0.882353 | 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 |
bb1f60f86f12756e2b8b87472d029ec3756ada89 | 4,257 | py | Python | Skeleton/Gameboard.py | swallen000/ASE-Assignment | 37610f5eacf5a051c480fd62ac4af2ccec019713 | [
"MIT"
] | null | null | null | Skeleton/Gameboard.py | swallen000/ASE-Assignment | 37610f5eacf5a051c480fd62ac4af2ccec019713 | [
"MIT"
] | null | null | null | Skeleton/Gameboard.py | swallen000/ASE-Assignment | 37610f5eacf5a051c480fd62ac4af2ccec019713 | [
"MIT"
] | null | null | null | import db
class Gameboard():
def __init__(self):
self.player1 = ""
self.player2 = ""
self.board = [[0 for x in range(7)] for y in range(6)]
self.game_result = ""
self.current_turn = 'p1'
self.remaining_moves = 42
self.position = [5 for x in range(7)]
def move1(self, row, col):
if self.game_result != "":
return
if self.player2 == "":
return
self.board[row][col] = self.player1
self.position[col] = self.position[col]-1
self.current_turn = 'p2'
self.remaining_moves = self.remaining_moves-1
left = col
right = col
while left > 0 and self.board[row][left-1] == self.player1:
left = left-1
while right < 6 and self.board[row][right+1] == self.player1:
right = right+1
if(right - left >= 3):
self.game_result = 'p1'
#print('1')
return
top = row
down = row
while top > 0 and self.board[top-1][col] == self.player1:
top = top-1
while down < 5 and self.board[down+1][col] == self.player1:
down = down+1
if(down - top >= 3):
self.game_result = 'p1'
#print('2')
return
left = col
right = col
top = row
down = row
while left > 0 and down < 5 and self.board[down+1][left-1] == self.player1:
left = left-1
down = down+1
while right < 6 and top > 0 and self.board[top-1][right+1] == self.player1:
right = right+1
top = top-1
if right-left >= 3:
self.game_result = 'p1'
#print('3')
return
left = col
right = col
top = row
down = row
while left > 0 and top > 0 and self.board[top-1][left-1] == self.player1:
left = left-1
top = top-1
while right < 6 and down < 5 and self.board[down+1][right+1] == self.player1:
right = right+1
down = down+1
if right-left >= 3:
self.game_result = 'p1'
#print('4')
return
def move2(self, row, col):
if self.game_result != "":
return
if self.player2 == "":
return
self.board[row][col] = self.player2
self.position[col] = self.position[col]-1
self.current_turn = 'p1'
self.remaining_moves = self.remaining_moves-1
left = col
right = col
while left > 0 and self.board[row][left-1] == self.player2:
left = left-1
while right < 6 and self.board[row][right+1] == self.player2:
right = right+1
if(right - left >= 3):
self.game_result = 'p2'
#print('5')
return
top = row
down = row
while top > 0 and self.board[top-1][col] == self.player2:
top = top-1
while down < 5 and self.board[down+1][col] == self.player2:
down = down+1
if(down - top >= 3):
self.game_result = 'p2'
#print('6')
return
left = col
right = col
top = row
down = row
while left > 0 and down < 5 and self.board[down+1][left-1] == self.player2:
left = left-1
down = down+1
while right < 6 and top > 0 and self.board[top-1][right+1] == self.player2:
right = right+1
top = top-1
if right-left >= 3:
self.game_result = 'p2'
#print('7')
return
left = col
right = col
top = row
down = row
while left > 0 and top > 0 and self.board[top-1][left-1] == self.player2:
left = left-1
top = top-1
while right < 6 and down < 5 and self.board[down+1][right+1] == self.player2:
right = right+1
down = down+1
if right-left >= 3:
self.game_result = 'p2'
#print('8')
return
'''
Add Helper functions as needed to handle moves and update board and turns
'''
| 28.38 | 85 | 0.475687 | 548 | 4,257 | 3.653285 | 0.10219 | 0.085415 | 0.095904 | 0.051948 | 0.876623 | 0.864635 | 0.857642 | 0.825175 | 0.797203 | 0.797203 | 0 | 0.053027 | 0.406389 | 4,257 | 149 | 86 | 28.57047 | 0.739216 | 0.018793 | 0 | 0.741379 | 0 | 0 | 0.005382 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.025862 | false | 0 | 0.008621 | 0 | 0.146552 | 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 |
24d3cbdbf3fb64653e51ece7e33fee835e1eccbc | 9,370 | py | Python | sovtokenfees/sovtokenfees/test/test_three_phase_commit.py | dastardlychimp/token-plugin | 8755bce1424e794285ea6e70bf9bdd05518667c3 | [
"Apache-2.0"
] | null | null | null | sovtokenfees/sovtokenfees/test/test_three_phase_commit.py | dastardlychimp/token-plugin | 8755bce1424e794285ea6e70bf9bdd05518667c3 | [
"Apache-2.0"
] | null | null | null | sovtokenfees/sovtokenfees/test/test_three_phase_commit.py | dastardlychimp/token-plugin | 8755bce1424e794285ea6e70bf9bdd05518667c3 | [
"Apache-2.0"
] | null | null | null | from sovtokenfees.test.three_phase_commit_helper import *
class TestPrePrepare:
def test_no_changes_on_token_ledger(self, three_phase_handler):
pp = PP.create_pre_prepare()
pp = PP.replace_fields(pp, {f.LEDGER_ID.nm: TOKEN_LEDGER_ID})
pp_appended = three_phase_handler.add_to_pre_prepare(pp)
assert pp == pp_appended
def test_no_changes_if_no_fee_transactions(self, three_phase_handler):
pp = PP.create_pre_prepare()
pp_appended = three_phase_handler.add_to_pre_prepare(pp)
assert pp == pp_appended
def test_valid_prepare(self, monkeypatch, three_phase_handler):
pp = PP.create_pre_prepare()
pp_appended = PP.valid_pre_prepare(pp, monkeypatch, three_phase_handler)
assert pp_appended == PP.replace_fields(pp, {f.PLUGIN_FIELDS.nm: PP.plugin_data})
class TestReceivedPrePrepare(BadHashes):
def test_no_action_on_token_ledger(self, three_phase_handler, pp_valid):
# On sovtoken ledger, otherwise would raise exception for no fee data.
assert not three_phase_handler.check_recvd_pre_prepare(pp_token_ledger(pp_valid))
def test_no_action_if_no_fee_transactions(self, three_phase_handler):
pp = PP.create_pre_prepare()
# No fee txns, otherwise would raise exception for no fee data.
assert not three_phase_handler.check_recvd_pre_prepare(pp)
def test_exception_no_plugin_fields_field(self, three_phase_handler, pp_valid):
pp_without_plugin_fields = pp_remove_plugin_fields(pp_valid)
with pytest.raises(Exception) as exp:
three_phase_handler.check_recvd_pre_prepare(pp_without_plugin_fields)
assert exp.match(f.PLUGIN_FIELDS.nm)
def test_exception_no_fees_field(self, three_phase_handler, pp_valid):
# set plugin fields to empty dict
pp_without_fees_field = pp_remove_fees_field(pp_valid)
with pytest.raises(Exception) as exp:
three_phase_handler.check_recvd_pre_prepare(pp_without_fees_field)
assert exp.match(FEES)
def test_pre_prepare_mismatch_fees_count(self, three_phase_handler, pp_valid):
pp_mismatched_fees = PP.replace_fees_fields(pp_valid, {FEE_TXNS_IN_BATCH: 5})
with pytest.raises(Exception) as exp:
three_phase_handler.check_recvd_pre_prepare(pp_mismatched_fees)
# Exception contains the actual number of txns and the mismatched number
assert exp.match(FEE_TXNS_IN_BATCH)
correct_num_fee_txns = getattr(pp_valid, f.PLUGIN_FIELDS.nm)[FEES][FEE_TXNS_IN_BATCH]
assert exp.match(str(correct_num_fee_txns))
assert exp.match(str(5))
def test_incorrect_state_hash(self, three_phase_handler, pp_valid):
pp_invalid_state_hash = pp_replace_state_hash(pp_valid, self._bad_hash_serialized())
with pytest.raises(Exception) as exp:
three_phase_handler.check_recvd_pre_prepare(pp_invalid_state_hash)
assert exp.match(f.STATE_ROOT.nm)
assert exp.match(str(self._bad_hash_unserialized()))
def test_incorrect_transaction_hash(self, three_phase_handler, pp_valid):
pp_invalid_txn_hash = pp_replace_txn_hash(pp_valid, self._bad_hash_serialized())
with pytest.raises(Exception) as exp:
three_phase_handler.check_recvd_pre_prepare(pp_invalid_txn_hash)
assert exp.match(f.TXN_ROOT.nm)
assert exp.match(str(self._bad_hash_unserialized()))
def test_valid_pre_prepare(self, three_phase_handler, pp_valid):
assert not three_phase_handler.check_recvd_pre_prepare(pp_valid)
class TestHasPluginFields:
def test_no_plugin_fields(self, three_phase_handler, pp_valid):
"""
Removes the plugin fields from three_phase_handler, then checks to see that it is removed
"""
pp_no_plugin_fields = PP.remove_field(pp_valid, f.PLUGIN_FIELDS.nm)
assert not three_phase_handler._has_plugin_fields(pp_no_plugin_fields)
def test_has_plugin_fields(self, three_phase_handler, pp_valid):
"""
Ensures that the three_phase_handler has the plugin fields properly added
"""
assert three_phase_handler._has_plugin_fields(pp_valid)
class TestAddToPrepare:
def _test_no_changes(self, three_phase_handler, pp_valid, fn_pp_adapter):
prep = Prep.create_prepare(pp_valid)
pp_adapted = fn_pp_adapter(pp_valid)
prep_appended = three_phase_handler.add_to_prepare(prep, pp_adapted)
assert prep_appended == prep
def test_no_action_if_token_ledger(self, three_phase_handler, pp_valid):
self._test_no_changes(three_phase_handler, pp_valid, pp_token_ledger)
def test_no_action_if_no_plugin_fields(self, three_phase_handler, pp_valid):
self._test_no_changes(three_phase_handler, pp_valid, pp_remove_plugin_fields)
def test_no_action_if_no_fees_field(self, three_phase_handler, pp_valid):
self._test_no_changes(three_phase_handler, pp_valid, pp_remove_fees_field)
def test_valid_prepare(self, pp_valid, three_phase_handler):
prep = Prep.create_prepare(pp_valid)
prep_appended = three_phase_handler.add_to_prepare(prep, pp_valid)
assert prep_appended != prep
assert getattr(pp_valid, f.PLUGIN_FIELDS.nm)[FEES] == getattr(pp_valid, f.PLUGIN_FIELDS.nm)[FEES]
class TestAddToOrdered:
def _test_no_changes(self, three_phase_handler, pp_valid, fn_pp_adapter):
oc = Ord.create_ordered(pp_valid)
pp_adapted = fn_pp_adapter(pp_valid)
prep_appended = three_phase_handler.add_to_ordered(oc, pp_adapted)
assert prep_appended == oc
def test_no_action_if_token_ledger(self, three_phase_handler, pp_valid):
self._test_no_changes(three_phase_handler, pp_valid, pp_token_ledger)
def test_no_action_if_no_plugin_fields(self, three_phase_handler, pp_valid):
self._test_no_changes(three_phase_handler, pp_valid, pp_remove_plugin_fields)
def test_no_action_if_no_fees_field(self, three_phase_handler, pp_valid):
self._test_no_changes(three_phase_handler, pp_valid, pp_remove_fees_field)
def test_valid_prepare(self, pp_valid, three_phase_handler):
ord = Ord.create_ordered(pp_valid)
prep_appended = three_phase_handler.add_to_prepare(ord, pp_valid)
assert prep_appended != ord
assert getattr(pp_valid, f.PLUGIN_FIELDS.nm)[FEES] == getattr(pp_valid, f.PLUGIN_FIELDS.nm)[FEES]
class TestReceivedPrePrepareWithTxn(BadHashes):
def test_no_action_on_token_ledger(self, three_phase_handler, pp_from_nym_req):
# On sovtoken ledger, otherwise would raise exception for no fee data.
assert not three_phase_handler.check_recvd_pre_prepare(pp_token_ledger(pp_from_nym_req))
def test_no_action_if_no_fee_transactions(self, three_phase_handler):
pp = PP.create_pre_prepare()
# No fee txns, otherwise would raise exception for no fee data.
assert not three_phase_handler.check_recvd_pre_prepare(pp)
def test_exception_no_plugin_fields_field(self, three_phase_handler, pp_from_nym_req):
pp_without_plugin_fields = pp_remove_plugin_fields(pp_from_nym_req)
with pytest.raises(Exception) as exp:
three_phase_handler.check_recvd_pre_prepare(pp_without_plugin_fields)
assert exp.match(f.PLUGIN_FIELDS.nm)
def test_exception_no_fees_field(self, three_phase_handler, pp_from_nym_req):
# set plugin fields to empty dict
pp_without_fees_field = pp_remove_fees_field(pp_from_nym_req)
with pytest.raises(Exception) as exp:
three_phase_handler.check_recvd_pre_prepare(pp_without_fees_field)
assert exp.match(FEES)
def test_pre_prepare_mismatch_fees_count(self, three_phase_handler, pp_from_nym_req):
pp_mismatched_fees = PP.replace_fees_fields(pp_from_nym_req, {FEE_TXNS_IN_BATCH: 5})
with pytest.raises(Exception) as exp:
three_phase_handler.check_recvd_pre_prepare(pp_mismatched_fees)
# Exception contains the actual number of txns and the mismatched number
assert exp.match(FEE_TXNS_IN_BATCH)
correct_num_fee_txns = getattr(pp_from_nym_req, f.PLUGIN_FIELDS.nm)[FEES][FEE_TXNS_IN_BATCH]
assert exp.match(str(correct_num_fee_txns))
assert exp.match(str(5))
def test_exception_bad_state_hash(self, three_phase_handler, pp_from_nym_req):
pp_invalid_state_hash = pp_replace_state_hash(pp_from_nym_req, self._bad_hash_serialized())
with pytest.raises(Exception) as exp:
three_phase_handler.check_recvd_pre_prepare(pp_invalid_state_hash)
assert exp.match(f.STATE_ROOT.nm)
assert exp.match(str(self._bad_hash_unserialized()))
def test_exception_bad_transaction_hash(self, three_phase_handler, pp_from_nym_req):
pp_invalid_txn_hash = PP.replace_fees_fields(pp_from_nym_req, {f.TXN_ROOT.nm: self._bad_hash_serialized()})
with pytest.raises(Exception) as exp:
three_phase_handler.check_recvd_pre_prepare(pp_invalid_txn_hash)
assert exp.match(f.TXN_ROOT.nm)
assert exp.match(str(self._bad_hash_unserialized()))
def test_valid_pre_prepare(self, three_phase_handler, pp_from_nym_req):
pp_appended = three_phase_handler.add_to_pre_prepare(pp_from_nym_req)
assert not three_phase_handler.check_recvd_pre_prepare(pp_appended)
| 49.315789 | 115 | 0.758485 | 1,397 | 9,370 | 4.603436 | 0.082319 | 0.102628 | 0.171824 | 0.103405 | 0.89504 | 0.863318 | 0.849013 | 0.831908 | 0.802986 | 0.755559 | 0 | 0.000516 | 0.171932 | 9,370 | 189 | 116 | 49.57672 | 0.828328 | 0.067449 | 0 | 0.55303 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.265152 | 1 | 0.234848 | false | 0 | 0.007576 | 0 | 0.287879 | 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 |
24f50fe6a028a4892171d2d37432a08ec78ff81c | 8,743 | py | Python | src/edge/tests/test_blast.py | jvrana/edge | b38efc3dfe3e888ee3045539bc00152771baccc0 | [
"MIT"
] | null | null | null | src/edge/tests/test_blast.py | jvrana/edge | b38efc3dfe3e888ee3045539bc00152771baccc0 | [
"MIT"
] | null | null | null | src/edge/tests/test_blast.py | jvrana/edge | b38efc3dfe3e888ee3045539bc00152771baccc0 | [
"MIT"
] | null | null | null | import os
import json
from Bio.Seq import Seq
from django.test import TestCase
from edge.blastdb import build_all_genome_dbs, fragment_fasta_fn
from edge.blast import blast_genome
from edge.models import (
Fragment,
Genome,
Genome_Fragment,
)
class GenomeBlastTest(TestCase):
def test_finds_sequence_on_specified_genome(self):
s1 = 'atcggtatcttctatgcgtatgcgtcatgattatatatattagcggcatg'
s2 = 'agcgtcgatgcatgagtcgatcggcagtcgtgtagtcgtcgtatgcgtta'
g1 = Genome(name='Foo')
g1.save()
f1 = Fragment.create_with_sequence('Bar', s1)
f2 = Fragment.create_with_sequence('Baz', s2)
Genome_Fragment(genome=g1, fragment=f1, inherited=False).save()
Genome_Fragment(genome=g1, fragment=f2, inherited=False).save()
g2 = Genome(name='Far')
g2.save()
f3 = Fragment.create_with_sequence('Bar', s1)
Genome_Fragment(genome=g2, fragment=f3, inherited=False).save()
try:
os.unlink(fragment_fasta_fn(f1))
os.unlink(fragment_fasta_fn(f2))
os.unlink(fragment_fasta_fn(f3))
except:
pass
build_all_genome_dbs(refresh=True)
g1 = Genome.objects.get(pk=g1.id)
query = s1[6:20] + 'aaaaaaaaa'
r = blast_genome(g1, 'blastn', query)
# only returns hit from genome
self.assertEquals(len(r), 1)
self.assertEquals(r[0].fragment_id, f1.id)
self.assertEquals(r[0].query_start, 1)
self.assertEquals(r[0].query_end, 14)
self.assertEquals(r[0].subject_start, 7)
self.assertEquals(r[0].subject_end, 20)
self.assertEquals(r[0].strand(), 1)
def test_aligns_sequence_to_antisense_strand(self):
s1 = 'atcggtatcttctatgcgtatgcgtcatgattatatatattagcggcatg'
g1 = Genome(name='Foo')
g1.save()
f1 = Fragment.create_with_sequence('Bar', s1)
Genome_Fragment(genome=g1, fragment=f1, inherited=False).save()
try:
os.unlink(fragment_fasta_fn(f1))
except:
pass
build_all_genome_dbs(refresh=True)
g1 = Genome.objects.get(pk=g1.id)
query = str(Seq(s1[6:20]).reverse_complement()) + 'tttttttttt'
r = blast_genome(g1, 'blastn', query)
self.assertEquals(len(r), 1)
self.assertEquals(r[0].fragment_id, f1.id)
self.assertEquals(r[0].query_start, 1)
self.assertEquals(r[0].query_end, 14)
self.assertEquals(r[0].subject_start, 20)
self.assertEquals(r[0].subject_end, 7)
self.assertEquals(r[0].strand(), -1)
def test_aligns_sequence_across_boundry_for_circular_fragment(self):
s1 = 'atcggtatctactatgcgtatgcgtcatgattatatatattagcggcatg'
g1 = Genome(name='Foo')
g1.save()
f1 = Fragment.create_with_sequence('Bar', s1, circular=True)
Genome_Fragment(genome=g1, fragment=f1, inherited=False).save()
try:
os.unlink(fragment_fasta_fn(f1))
except:
pass
build_all_genome_dbs(refresh=True)
g1 = Genome.objects.get(pk=g1.id)
query = (s1[-10:] + s1[0:10]) + 'ttttttttttt'
res = blast_genome(g1, 'blastn', query)
# we are not removing redundant matches when matching across circular
# boundaries, since blasting across circular boundary of a genome is a
# rare case. so in this particular case, you will find two results, one
# for the end of the query at the start of the genome, one for across
# the circular boundary.
found = False
for r in res:
if r.query_start == 1 and r.query_end == 20:
self.assertEquals(r.fragment_id, f1.id)
self.assertEquals(r.query_start, 1)
self.assertEquals(r.query_end, 20)
self.assertEquals(r.subject_start, len(s1) - 10 + 1)
self.assertEquals(r.subject_end, len(s1) + 10)
self.assertEquals(r.fragment_length, len(s1))
self.assertEquals(r.strand(), 1)
found = True
break
self.assertEquals(found, True)
def test_does_not_return_duplicate_hits_for_circular_fragments(self):
s1 = 'atcggtatcttctatgcgtatgcgtcatgattatatatattagcggcatg'
g1 = Genome(name='Foo')
g1.save()
f1 = Fragment.create_with_sequence('Bar', s1, circular=True)
Genome_Fragment(genome=g1, fragment=f1, inherited=False).save()
try:
os.unlink(fragment_fasta_fn(f1))
except:
pass
build_all_genome_dbs(refresh=True)
g1 = Genome.objects.get(pk=g1.id)
query = s1[5:20] + 'tttttttttt'
r = blast_genome(g1, 'blastn', query)
self.assertEquals(len(r), 1)
def test_does_not_align_sequence_across_boundry_for_non_circular_fragment(self):
s1 = 'atcggtatcttctatgcgtatgcgtcatgattatatatattagcggcatg'
g1 = Genome(name='Foo')
g1.save()
f1 = Fragment.create_with_sequence('Bar', s1, circular=False)
Genome_Fragment(genome=g1, fragment=f1, inherited=False).save()
try:
os.unlink(fragment_fasta_fn(f1))
except:
pass
build_all_genome_dbs(refresh=True)
g1 = Genome.objects.get(pk=g1.id)
query = (s1[-10:] + s1[0:10]) + 'tttttttttt'
res = blast_genome(g1, 'blastn', query)
for r in res:
self.assertEquals(r.subject_start > 0 and r.subject_start <= len(s1), True)
self.assertEquals(r.subject_end > 0 and r.subject_end <= len(s1), True)
class GenomeBlastAPITest(TestCase):
def test_blast_finds_sequence_on_specified_genome(self):
s1 = 'atcggtatcttctatgcgtatgcgtcatgattatatatattagcggcatg'
s2 = 'agcgtcgatgcatgagtcgatcggcagtcgtgtagtcgtcgtatgcgtta'
g1 = Genome(name='Foo')
g1.save()
f1 = Fragment.create_with_sequence('Bar', s1)
f2 = Fragment.create_with_sequence('Baz', s2)
Genome_Fragment(genome=g1, fragment=f1, inherited=False).save()
Genome_Fragment(genome=g1, fragment=f2, inherited=False).save()
g2 = Genome(name='Far')
g2.save()
f3 = Fragment.create_with_sequence('Bar', s1)
Genome_Fragment(genome=g2, fragment=f3, inherited=False).save()
try:
os.unlink(fragment_fasta_fn(f1))
os.unlink(fragment_fasta_fn(f2))
os.unlink(fragment_fasta_fn(f3))
except:
pass
build_all_genome_dbs(refresh=True)
query = s1[6:20] + 'aaaaaaaaa'
res = self.client.post('/edge/genomes/%s/blast/' % g1.id,
data=json.dumps(dict(program='blastn', query=query)),
content_type='application/json')
self.assertEquals(res.status_code, 200)
d = json.loads(res.content)
# only returns hit from genome
self.assertEquals(len(d), 1)
self.assertEquals(d[0]['fragment_id'], f1.id)
self.assertEquals(d[0]['query_start'], 1)
self.assertEquals(d[0]['query_end'], 14)
self.assertEquals(d[0]['subject_start'], 7)
self.assertEquals(d[0]['subject_end'], 20)
# blast in other genome works too
res = self.client.post('/edge/genomes/%s/blast/' % g2.id,
data=json.dumps(dict(program='blastn', query=query)),
content_type='application/json')
self.assertEquals(res.status_code, 200)
d = json.loads(res.content)
self.assertEquals(len(d), 1)
self.assertEquals(d[0]['fragment_id'], f3.id)
def test_blast_aligns_sequence_to_antisense_strand(self):
s1 = 'atcggtatcttctatgcgtatgcgtcatgattatatatattagcggcatg'
g1 = Genome(name='Foo')
g1.save()
f1 = Fragment.create_with_sequence('Bar', s1)
Genome_Fragment(genome=g1, fragment=f1, inherited=False).save()
try:
os.unlink(fragment_fasta_fn(f1))
except:
pass
build_all_genome_dbs(refresh=True)
query = str(Seq(s1[6:20]).reverse_complement()) + 'tttttttttt'
res = self.client.post('/edge/genomes/%s/blast/' % g1.id,
data=json.dumps(dict(program='blastn', query=query)),
content_type='application/json')
self.assertEquals(res.status_code, 200)
d = json.loads(res.content)
self.assertEquals(len(d), 1)
self.assertEquals(d[0]['fragment_id'], f1.id)
self.assertEquals(d[0]['query_start'], 1)
self.assertEquals(d[0]['query_end'], 14)
self.assertEquals(d[0]['subject_start'], 20)
self.assertEquals(d[0]['subject_end'], 7)
| 37.848485 | 87 | 0.618323 | 1,070 | 8,743 | 4.88785 | 0.142991 | 0.128489 | 0.06826 | 0.0413 | 0.816826 | 0.784704 | 0.741874 | 0.725239 | 0.70956 | 0.695029 | 0 | 0.034595 | 0.262724 | 8,743 | 230 | 88 | 38.013043 | 0.776761 | 0.044264 | 0 | 0.724324 | 0 | 0 | 0.10363 | 0.062178 | 0 | 0 | 0 | 0 | 0.227027 | 1 | 0.037838 | false | 0.037838 | 0.037838 | 0 | 0.086486 | 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 |
3b69511859cee34ac2c3b0eb929bff2de7dba443 | 195,700 | py | Python | src/invert_rule.py | UChicagoSUPERgroup/analytic-password-cracking | 1c30153e852af36ffdc0566c949f63d9736105f8 | [
"MIT"
] | 22 | 2019-05-20T16:43:16.000Z | 2021-04-23T09:32:11.000Z | src/invert_rule.py | UChicagoSUPERgroup/analytic-password-cracking | 1c30153e852af36ffdc0566c949f63d9736105f8 | [
"MIT"
] | null | null | null | src/invert_rule.py | UChicagoSUPERgroup/analytic-password-cracking | 1c30153e852af36ffdc0566c949f63d9736105f8 | [
"MIT"
] | 6 | 2019-05-20T18:01:05.000Z | 2020-11-12T07:54:33.000Z | """This file contains functions to invert transformation rules."""
from common import FatalRuntimeError, RunningStyle
from config import RUNTIME_CONFIG
from copy import deepcopy
from enum import Enum
from invert_helper import Dicts
from itertools import chain, combinations, product, permutations
import traceback
from tokenstr import TokenStringBase, Token, TokenType, TokenString
from utility import convert_str_length_to_int, get_name_of_a_rule
from feasibility import Invertibility
class InversionStatus(Enum):
""" An enum that represents the inversion status.
Attr:
ERROR: Something went wrong, discard this result
OUTSCOPE: Out of scope. Cannot be handled in current settings, require running JtR/HC
NORMAL: Successful, there will be some preimages (0 to many). If rejected, there will be no preimages.
"""
ERROR = 1,
OUTSCOPE = 2,
NORMAL = 3,
class InversionResult():
""" A class that saves inversion results. """
def __init__(self, value=None):
""" Initalize a InversionResult
Args:
value: the initalization value. If value
is None, then initialize emtpy list.
If value is string, tokenize the string.
"""
self.status = InversionStatus.NORMAL
if value is None or isinstance(value, TokenStringBase):
self.results = [] if value is None else [value]
else:
raise FatalRuntimeError("Unknown value type")
self.memorized_words = set() # for special command
self.error_msg = ""
def __add__(self, x):
""" add another instance of InversionResult, concat two lists. """
if not isinstance(x, type(self)):
raise Exception("Need to Add Two Result Class")
self.results += x.results
self.memorized_words |= x.memorized_words
return self
def __iter__(self):
yield from self.results
def is_normal(self):
return self.status == InversionStatus.NORMAL
def is_out_of_scope(self):
return self.status == InversionStatus.OUTSCOPE
def is_error(self):
return self.status == InversionStatus.ERROR
def add(self, value):
""" add a Tokenstring/RegexTokenString """
if isinstance(value, TokenStringBase):
self.results.append(value)
else:
raise FatalRuntimeError("Unknown value type")
def get_status(self):
""" get the inversion status """
return self.status
def set_status(self, new_status):
""" set the inversion status """
self.status = new_status
def get_value(self):
""" return self.results """
return self.results
def is_null(self):
""" Check if the results are null
Returns:
True if len(self.result) is 0
"""
return len(self.results) == 0
def set_error_msg(self, msg):
""" set error msg when something goes wrong, only used when inversion error
Args:
msg: the error msg
"""
self.error_msg = msg
def get_number_of_strings(self, remove_non_ascii=False):
""" count the number of possible strings represented.
Args:
remove_non_ascii: whether to remove strings with non-ascii printable chars.
"""
if (self.is_null == True or self.results == []):
return 0
count = 0
for ts in self.results:
if len(ts) == 0: # Length = 0 means 1 empty string
count += 1
else:
tmp_count = 1 # get count for one tokenstring
for i in range(len(ts)):
if remove_non_ascii == False:
tmp_count *= len(ts.tokens[i])
else:
tmp_count *= len(
set(c for c in ts.tokens[i].get_value()
if char_is_printable(c)))
if tmp_count == 0:
break
count += tmp_count
return count
def get_all_strings(self, unique=False):
""" convert tokenstring repr to strings.
Args:
unique: whether to return only unique strings.
"""
strings = []
for ts in self.results:
strings = strings + ts.to_strings()
return strings if unique == False else set(strings)
def contains(self, word):
""" if a word is contained in the results. """
for val in self.results:
if val.contains(word):
return True
return False
def memorize(self, words):
self.memorized_words |= words
def is_memorized(self, word):
return word in self.memorized_words
def has_memory(self):
return len(self.memorized_words) != 0
class Inversion():
""" A class contains only static functions. Each function inverts one rule """
@staticmethod
def invert_colon_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" : do nothing
Inversion Idea:
Since colon command does nothing, just return the input tokenstring
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
return Invertibility.INVERTIBLE
# whether regex is enabled or not doesn't matter
# nothing to be done, just add the tokenstr and return it.
inversion_result = InversionResult()
inversion_result.add(token_str)
return inversion_result
@staticmethod
def invert_l_command(token_str, rule, just_check=False, enable_regex=False):
""" l lowercase all letters: paSSword -> password
Inversion Idea:
change each lowercase letter into a set of itself and its uppercase counterpart
If there are any uppercase letters, that means this rule was never run on the word, so reject immediately.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
return Invertibility.INVERTIBLE
inversion_result = InversionResult()
if enable_regex == False:
token_str_length = len(token_str)
for idx, token in enumerate(token_str):
new_set_other = set(
x for x in token.get_value().difference(Dicts.classes['a'])
) # All non-alphabetical characters
new_set_lower = set(
chain.from_iterable(
(x, x.upper()) for x in token.get_value().intersection(
Dicts.classes['l']))) # Get all lower case in dict
new_set = new_set_other | new_set_lower
if new_set == set(): # rejected
return inversion_result
else:
token_str[idx].set_value(new_set)
inversion_result.add(token_str)
return inversion_result
else:
has_regex = False
new_tokens = []
for idx, token in enumerate(token_str):
new_set_other = set(
x for x in token.get_value().difference(Dicts.classes['a'])
) # All non-alphabetical characters
new_set_lower = set(
chain.from_iterable(
(x, x.upper()) for x in token.get_value().intersection(
Dicts.classes['l']))) # Get all lower case in dict
new_set = new_set_other | new_set_lower
if token.is_range():
if new_set == set():
return inversion_result
else:
token.only_set_value(new_set)
new_tokens.append(token)
else:
has_regex = True
if new_set == set():
# Reject if require at least one
if token.start >= 1:
return inversion_result
else:
# Careful you would have to set start and end for regex
# tokenstrings using set_value.
token.only_set_value(new_set)
new_tokens.append(token)
# Filter the case where it only contains regex with range 0-inf and
# regex are filtered. This case should be rejected
if has_regex == True and len(new_tokens) == 0:
# can only be empty
token_str.tokens = []
token_str.set_min_len(0)
token_str.set_max_len(1)
inversion_result.add(token_str)
token_str.tokens = new_tokens
inversion_result.add(token_str)
return inversion_result
@staticmethod
def invert_u_command(token_str, rule, just_check=False, enable_regex=False):
""" u uppercase all letters: paSSword -> PASSWORD
Inversion Idea:
change each uppercase letter into a set of itself and its lowercase counterpart
If there are any lowercase letters, that means this rule was never run on the word, so reject immediately.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
return Invertibility.INVERTIBLE
inversion_result = InversionResult()
if enable_regex == False:
token_str_length = len(token_str)
for idx, token in enumerate(token_str):
new_set_other = set(
x for x in token.get_value().difference(Dicts.classes['a'])
) # Get all other
new_set_upper = set(
chain.from_iterable((x, x.lower())
for x in token.get_value().intersection(
Dicts.classes['u']))
) # Get uppercase and convert to lowercase
new_set = new_set_other | new_set_upper
if new_set == set(): # rejected
return inversion_result
else:
token_str[idx].set_value(new_set)
inversion_result.add(token_str)
return inversion_result
else:
has_regex = False
new_tokens = []
for idx, token in enumerate(token_str):
new_set_other = set(
x for x in token.get_value().difference(Dicts.classes['a'])
) # Get all other
new_set_upper = set(
chain.from_iterable((x, x.lower())
for x in token.get_value().intersection(
Dicts.classes['u']))
) # Get uppercase and convert to lowercase
new_set = new_set_other | new_set_upper
if token.is_range():
if new_set == set():
return inversion_result
else:
token.only_set_value(new_set)
new_tokens.append(token)
else:
has_regex = True
if new_set == set():
if token.start >= 1:
return inversion_result
else:
token.only_set_value(new_set)
new_tokens.append(token)
# Filter the case. This case should be rejected
if has_regex == True and len(new_tokens) == 0:
# can only be empty
token_str.tokens = []
token_str.set_min_len(0)
token_str.set_max_len(1)
inversion_result.add(token_str)
return inversion_result
token_str.tokens = new_tokens
inversion_result.add(token_str)
return inversion_result
@staticmethod
def invert_c_command(token_str, rule, just_check=False, enable_regex=False):
""" c capitalize first letter, lowercase rest: passWord -> Password
Inversion Idea:
check if first letter is capitalized and rest are lowercase.
If they are, return the word with each letter and it's upper/lowercased counterpart
If not, then reject the word.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
return Invertibility.INVERTIBLE
inversion_result = InversionResult()
if enable_regex == False:
token_str_length = len(token_str)
for idx, token in enumerate(token_str):
if idx == 0:
new_set_other = set(x for x in token.get_value().difference(
Dicts.classes['a'])) # Get all other
new_set_lower = set(
chain.from_iterable((x, x.lower())
for x in token.get_value().
intersection(Dicts.classes['u']))
) # all uppercase and corresponding lower
new_set = new_set_other | new_set_lower
if new_set == set(): # rejected
return inversion_result
else:
token_str[idx].set_value(new_set)
else:
# Other Character, should be lower
new_set_other = set(x for x in token.get_value().difference(
Dicts.classes['a'])) # Get all other
new_set_upper = set(
chain.from_iterable((x, x.upper())
for x in token.get_value().
intersection(Dicts.classes['l']))
) # all lowercase and corresponding upper
new_set = new_set_other | new_set_upper
if new_set == set(): # rejected
return inversion_result
else:
token_str[idx].set_value(new_set)
inversion_result.add(token_str)
return inversion_result
else:
less_than = deepcopy(token_str)
less_than.set_max_len(1)
if less_than.is_valid():
inversion_result.add(less_than)
greater_or_equal = RegexTokenString.fix_first_N_position(
token_str, 1)
for one_ts in greater_or_equal:
tokens = []
for idx, token in enumerate(one_ts):
if idx == 0:
new_set_other = set(
x for x in token.get_value().difference(
Dicts.classes['a'])) # Get all other
new_set_lower = set(
chain.from_iterable(
(x, x.lower())
for x in token.get_value().intersection(
Dicts.classes['u']))
) # all uppercase and corresponding lower
new_set = new_set_other | new_set_lower
if token.is_range():
if new_set == set(): # rejected
break
else:
token.set_value(new_set)
tokens.append(token)
else:
if new_set == set():
if token.start > 0:
break
else: # could be nothing
pass
else:
token.set_value(new_set)
tokens.append(token)
else:
new_set_other = set(
x for x in token.get_value().difference(
Dicts.classes['a'])) # Get all other
new_set_upper = set(
chain.from_iterable(
(x, x.upper())
for x in token.get_value().intersection(
Dicts.classes['l']))
) # all lowercase and corresponding upper
new_set = new_set_other | new_set_upper
if token.is_range():
if new_set == set():
break
else:
token.only_set_value(new_set)
tokens.append(token)
else:
if new_set == set():
if token.start > 0:
break
else: # could be nothing
pass
else:
token.only_set_value(new_set)
tokens.append(token)
else:
one_ts.tokens = tokens
inversion_result.add(one_ts)
return inversion_result
@staticmethod
def invert_C_command(token_str, rule, just_check=False, enable_regex=False):
""" C lowercase first char, uppercase rest: Pas$Word -> pAS$WORD
Inversion Idea:
check if first letter is lowercase and rest are capitalized.
If they are, return the word with each letter and its upper/lowercased counterpart
If not, then reject the word.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
return Invertibility.INVERTIBLE
inversion_result = InversionResult()
if enable_regex == False:
token_str_length = len(token_str)
for idx, token in enumerate(token_str):
if idx == 0:
new_set_other = set(x for x in token.get_value().difference(
Dicts.classes['a'])) # All non-alphabetical characters
new_set_lower = set(
chain.from_iterable((x, x.upper())
for x in token.get_value().
intersection(Dicts.classes['l']))
) # all lowercase and corresponding upper
new_set = new_set_other | new_set_lower
if new_set == set(): # rejected
return inversion_result
else:
token_str[idx].set_value(new_set)
else:
new_set_other = set(x for x in token.get_value().difference(
Dicts.classes['a'])) # All non-alphabetical characters
new_set_upper = set(
chain.from_iterable((x, x.lower())
for x in token.get_value().
intersection(Dicts.classes['u']))
) # all uppercase and corresponding lower
new_set = new_set_other | new_set_upper
if new_set == set(): # rejected
return inversion_result
else:
token_str[idx].set_value(new_set)
inversion_result.add(token_str)
return inversion_result
else:
less_than = deepcopy(token_str)
less_than.set_max_len(1)
if less_than.is_valid():
inversion_result.add(less_than)
greater_or_equal = RegexTokenString.fix_first_N_position(
token_str, 1)
for one_ts in greater_or_equal:
tokens = []
for idx, token in enumerate(one_ts):
if idx == 0:
new_set_other = set(x for x in token.get_value().
difference(Dicts.classes['a']))
new_set_lower = set(
chain.from_iterable(
(x, x.upper())
for x in token.get_value().intersection(
Dicts.classes['l'])))
new_set = new_set_other | new_set_lower
if token.is_range():
if new_set == set():
break
else:
token.set_value(new_set)
tokens.append(token)
else:
if new_set == set():
if token.start > 0:
break
else: # could be nothing
pass
else:
token.set_value(new_set)
tokens.append(token)
else:
new_set_other = set(x for x in token.get_value().
difference(Dicts.classes['a']))
new_set_upper = set(
chain.from_iterable(
(x, x.lower())
for x in token.get_value().intersection(
Dicts.classes['u'])))
new_set = new_set_other | new_set_upper
if token.is_range():
if new_set == set():
break
else:
token.only_set_value(new_set)
tokens.append(token)
else:
if new_set == set():
if token.start > 0:
break
else: # could be nothing
pass
else:
token.only_set_value(new_set)
tokens.append(token)
else:
one_ts.tokens = tokens
inversion_result.add(one_ts)
return inversion_result
@staticmethod
def invert_t_command(token_str, rule, just_check=False, enable_regex=False):
""" t toggles the case of all chars: h3llO-> H3LLo
Inversion Idea:
toggle the case of all chars
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
return Invertibility.INVERTIBLE
inversion_result = InversionResult()
if enable_regex == False:
token_str_length = len(token_str)
for idx, token in enumerate(token_str):
token_str[idx].set_value({
Dicts.toggle.setdefault(x, x) for x in token.get_value()
}) # toggle the char
inversion_result.add(token_str)
return inversion_result
else:
for idx, token in enumerate(token_str):
token_str[idx].only_set_value(
{Dicts.toggle.setdefault(x, x) for x in token.get_value()})
inversion_result.add(token_str)
return inversion_result
@staticmethod
def invert_r_command(token_str, rule, just_check=False, enable_regex=False):
""" r Invert the word: password -> drowssap
Inversion Idea:
Reverse the tokenstring
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
return Invertibility.INVERTIBLE
inversion_result = InversionResult()
if enable_regex == False:
token_str.tokens = token_str.tokens[::-1] # reverse the string
inversion_result.add(token_str)
return inversion_result
else:
token_str.tokens = token_str.tokens[::-1]
inversion_result.add(token_str)
return inversion_result
@staticmethod
def invert_d_command(token_str, rule, just_check=False, enable_regex=False):
""" d Duplicates word: pass -> passpass
Inversion Idea:
cut the word in half and make sure each lines up.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
return Inversion.invert_p_N_command(token_str, "p1", just_check,
enable_regex)
@staticmethod
def invert_f_command(token_str, rule, just_check=False, enable_regex=False):
""" f Reflects the word: pass -> passssap
Inversion Idea:
cut in half and work from opposite ends comparing.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
if enable_regex == True:
return Invertibility.UNINVERTIBLE
else:
return Invertibility.INVERTIBLE
inversion_result = InversionResult()
if enable_regex == False:
token_str_length = len(token_str)
# Doubled word is too long
if token_str_length * 2 > RUNTIME_CONFIG['max_password_length']:
original_ts = deepcopy(token_str)
inversion_result.add(original_ts)
if token_str_length % 2 != 0: # Not even number, reject
return inversion_result
half_length = int(token_str_length / 2)
for idx in range(half_length):
# compare left with right
left_set = set(token_str[idx].get_value())
right_set = set(
token_str[token_str_length - idx - 1].get_value())
intersect_set = left_set.intersection(right_set)
if intersect_set == set():
return inversion_result
else:
if token_str[idx].is_regex() and token_str[
idx + half_length].is_regex():
start = max(token_str[idx + half_length].start,
token_str[idx].start)
end = min(token_str[idx + half_length].end,
token_str[idx].end)
token_str[idx] = Token(intersect_set, start, end)
else:
token_str[idx] = Token(intersect_set)
token_str.tokens = token_str.tokens[:half_length]
token_str.length = half_length
inversion_result.add(token_str)
return inversion_result
else:
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_left_curly_bracket_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" { Rotates the word left: password -> asswordp
Inversion Idea:
rotate the word right
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
return Invertibility.INVERTIBLE
inversion_result = InversionResult()
if enable_regex == False:
token_str_length = len(token_str)
token_str.tokens = token_str.tokens[token_str_length - 1:] + \
token_str.tokens[:token_str_length - 1] # rotate back
inversion_result.add(token_str)
return inversion_result
else:
# Enumerate the last char. Coz only the last char matters (last
# char put to first)
less_than = deepcopy(token_str)
less_than.set_max_len(1)
if less_than.is_valid():
inversion_result.add(less_than)
greater_or_equal = RegexTokenString.fix_last_N_position(
token_str, 1)
for one_ts in greater_or_equal:
one_ts.tokens = one_ts.tokens[-1:] + one_ts.tokens[:-1]
inversion_result.add(one_ts)
return inversion_result
@staticmethod
def invert_right_curly_bracket_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" } Rotates the word right: password -> dpasswor
Inversion Idea:
rotate the word left.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
return Invertibility.INVERTIBLE
inversion_result = InversionResult()
if enable_regex == False:
# rotate back
token_str.tokens = token_str.tokens[1:] + token_str.tokens[:1]
inversion_result.add(token_str)
return inversion_result
else:
# Enumerate the last char. Coz only the last char matters (last
# char put to first)
less_than = deepcopy(token_str)
less_than.set_max_len(1)
if less_than.is_valid():
inversion_result.add(less_than)
greater_or_equal = RegexTokenString.fix_first_N_position(
token_str, 1)
for one_ts in greater_or_equal:
one_ts.tokens = one_ts.tokens[1:] + one_ts.tokens[:1]
inversion_result.add(one_ts)
return inversion_result
@staticmethod
def invert_left_square_bracket_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" [ Deletes the first character
Inversion Idea:
Shift the rest of the word right one, and insert an allchar set into the first position
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
return Inversion.invert_D_N_command(token_str, ["D", "0"], just_check,
enable_regex)
@staticmethod
def invert_right_square_bracket_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" ] Deletes the last character
Inversion Idea:
Append the set of all possible chars to the end of the word.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
return Invertibility.INVERTIBLE
inversion_result = InversionResult()
if enable_regex == False:
token_str_length = len(token_str)
# Len = 0 covered here.
if token_str_length == 0:
# Could be empty too, this is a corner case
inversion_result.add(deepcopy(token_str))
token_str.tokens = [Token(Dicts.classes['z'])]
else:
token_str.tokens = token_str.tokens + \
[Token(Dicts.classes['z'])]
token_str.length = token_str_length + 1
inversion_result.add(token_str)
return inversion_result
else:
# case1: less than 1
less_than = deepcopy(token_str)
less_than.set_max_len(1)
if less_than.is_valid():
inversion_result.add(less_than)
token_str.tokens = token_str.tokens + [Token(Dicts.classes['z'])]
token_str.increase_window(1)
inversion_result.add(token_str)
return inversion_result
@staticmethod
def invert_D_N_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" DN Deletes char at position N
Inversion Idea:
Shift the part of the word to the right of the position right one
insert an allchar set into that spot
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
try:
N = convert_str_length_to_int(rule[1])
return Invertibility.INVERTIBLE
except BaseException:
return Invertibility.UNINVERTIBLE
inversion_result = InversionResult()
parameter_n = convert_str_length_to_int(rule[1])
if enable_regex == False:
token_str_length = len(token_str)
# remove one get max_length, rejected
if token_str_length == RUNTIME_CONFIG['max_password_length']:
return inversion_result
if token_str_length <= parameter_n - 1: # no deletion
inversion_result.add(token_str)
elif token_str_length >= parameter_n + 1: # definitely some deletion
token_str.tokens = token_str.tokens[:parameter_n] + [
Token(Dicts.classes['z'])
] + token_str.tokens[parameter_n:]
token_str.length = token_str_length + 1
inversion_result.add(token_str)
else: # two cases.
# Case 1: There's no word there
inversion_result.add(deepcopy(token_str))
# Length == 0 covered.
if token_str_length == 0:
token_str.tokens = [Token(Dicts.classes['z'])]
else:
token_str.tokens = token_str.tokens[:parameter_n] + [
Token(Dicts.classes['z'])
] + token_str.tokens[parameter_n:]
token_str.length = token_str_length + 1
inversion_result.add(token_str) # CASE 2: There'a word there
return inversion_result
else:
# case1: less than N + 1
less_than = deepcopy(token_str)
less_than.set_max_len(parameter_n + 1)
if less_than.is_valid():
inversion_result.add(less_than)
# case2: something is at Nth position
greater_or_equal = RegexTokenString.fix_first_N_position(
token_str, parameter_n) # get all =N
for one_ts in greater_or_equal:
one_ts.tokens = one_ts.tokens[:parameter_n] + \
[Token(Dicts.classes['z'])] + one_ts.tokens[parameter_n:]
one_ts.increase_window(1)
inversion_result.add(one_ts)
return inversion_result
@staticmethod
def invert_q_command(token_str, rule, just_check=False, enable_regex=False):
""" q Duplicates every character: abcd -> aabbccdd
Inversion Idea:
make sure the length of the str is even. check that every two char match
Return a string consisting only of the positions where i%2 == 0
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
if enable_regex == True:
return Invertibility.UNINVERTIBLE
else:
return Invertibility.INVERTIBLE
inversion_result = InversionResult()
if enable_regex == False:
token_str_length = len(token_str)
if token_str_length == 0: # 0 * 2 = 0
inversion_result.add(token_str)
return inversion_result
# potentially too long for duplicate
if token_str_length * 2 > RUNTIME_CONFIG['max_password_length']:
original_ts = deepcopy(token_str)
inversion_result.add(original_ts)
if token_str_length % 2 != 0:
return inversion_result
final_ts = deepcopy(token_str) # save the final result
half_length = int(token_str_length / 2)
final_ts.tokens = final_ts.tokens[:half_length]
final_ts.length = half_length
ctr = 0 # pointer noting the place
while ctr < token_str_length:
left_set = set(token_str[ctr].get_value())
right_set = set(token_str[ctr + 1].get_value())
# get the intersection of two sides.
intersect_set = left_set.intersection(right_set)
if intersect_set == set():
return inversion_result
else:
final_ts[int(ctr / 2)] = Token(intersect_set)
ctr += 2
inversion_result.add(final_ts)
return inversion_result
else:
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_k_command(token_str, rule, just_check=False, enable_regex=False):
""" k Swaps first two characters: password -> apssword
Inversion Idea:
Swap the first two characters and return.
If word is 1 char long, return it.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
return Invertibility.INVERTIBLE
inversion_result = InversionResult()
if enable_regex == False:
token_str_length = len(token_str)
if token_str_length < 2:
inversion_result.add(token_str)
return inversion_result
token_str[0], token_str[1] = token_str[1], token_str[0] # swap
inversion_result.add(token_str)
return inversion_result
else:
less_than = deepcopy(token_str)
less_than.set_max_len(2) # <2, do nothing
if less_than.is_valid():
inversion_result.add(less_than)
greater_or_equal = RegexTokenString.fix_first_N_position(
token_str, 2) # get last 2 chars fixed
for one_ts in greater_or_equal:
one_ts[0], one_ts[1] = one_ts[1], one_ts[0]
inversion_result.add(one_ts)
return inversion_result
@staticmethod
def invert_K_command(token_str, rule, just_check=False, enable_regex=False):
""" K Swaps last two characters: password -> passwodr
Inversion Idea:
Swap last two characters and return.
If word is 1 char long, return it.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
return Invertibility.INVERTIBLE
inversion_result = InversionResult()
if enable_regex == False:
token_str_length = len(token_str)
if token_str_length < 2:
inversion_result.add(token_str)
return inversion_result
token_str[-1], token_str[-2] = token_str[-2], token_str[-1] # swap
inversion_result.add(token_str)
return inversion_result
else:
less_than = deepcopy(token_str)
less_than.set_max_len(2) # <2, do nothing
if less_than.is_valid():
inversion_result.add(less_than)
greater_or_equal = RegexTokenString.fix_last_N_position(
token_str, 2) # get last 2 chars fixed
for one_ts in greater_or_equal:
one_ts[-1], one_ts[-2] = one_ts[-2], one_ts[-1]
inversion_result.add(one_ts)
return inversion_result
@staticmethod
def invert_E_command(token_str, rule, just_check=False, enable_regex=False):
""" E Lower case the whole line, then upper case the first letter and every letter after a space: "p@ssW0rd w0rld" -> "P@ssw0rd W0rld"
Inversion Idea:
Check to make sure first letter is uppercased and every letter after a space is uppercased.
Put each letter in a set with its upper/lowercase counterpart.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
return Inversion.invert_e_X_command(token_str, "e ", just_check,
enable_regex)
@staticmethod
def s_sanity_check(input_token_str, inversion_result):
""" check all cases that end with "s", s pre-removed """
# Flag
filtered = False
# const defs
sxz_set = set("sxz")
cs_set = set("cs")
h_set = set("h")
f_set = set("f")
e_set = set("e")
y_set = set("y")
aeiou_set = set("aeiou")
# For each token_string, have to survive all checking to be valid
ret_val = []
# length > 3, removal of "s" resulted in the condition of ch/sh
if len(input_token_str) > 2 and len(
h_set & input_token_str[-1].get_value()) != 0 and len(
cs_set & input_token_str[-2].get_value()) != 0:
filtered = True
# Rejected
if input_token_str[-2].get_value().issubset(
cs_set) and input_token_str[-1].get_value().issubset(h_set):
pass
# Remove the form of ch/sh, and then it stands as valid append s
# condition
else:
# Remove seperately, there will be duplicates, but dont matter
if input_token_str[-1].get_value().issubset(h_set) != True:
token_str_1 = deepcopy(input_token_str)
token_str_1[-1].set_value(token_str_1[-1].get_value() -
h_set)
ret_val.append(token_str_1)
if input_token_str[-2].get_value().issubset(cs_set) != True:
token_str_2 = deepcopy(input_token_str)
token_str_2[-2].set_value(token_str_2[-2].get_value() -
cs_set)
ret_val.append(token_str_2)
# removal of "s" resulted in the condition of "sxz"
if len(input_token_str) >= 1 and len(
sxz_set & input_token_str[-1].get_value()) != 0:
filtered = True
# only sxz, rejected
if input_token_str[-1].get_value().issubset(sxz_set):
pass
# remoe sxz situation
else:
token_str_3 = deepcopy(input_token_str)
token_str_3[-1].set_value(token_str_3[-1].get_value() - sxz_set)
ret_val.append(token_str_3)
# removal of "f" resulted in "xf" condition -> last one f, and second
# to last if not f.
if len(input_token_str) >= 2 and len(
f_set & input_token_str[-1].get_value()) != 0 and len(
input_token_str[-2].get_value().difference(f_set)) != 0:
filtered = True
# remove "f" from last one, or remove everything not f from second
# to last one
if len(input_token_str[-1].get_value() - f_set) != 0:
token_str_4 = deepcopy(input_token_str)
token_str_4[-1].set_value(token_str_4[-1].get_value() - f_set)
ret_val.append(token_str_4)
# second to last is f
if len(input_token_str[-2].get_value() & f_set) != 0:
token_str_5 = deepcopy(input_token_str)
token_str_5[-2].set_value(f_set)
ret_val.append(token_str_5)
# remove s get fe
if len(input_token_str) > 2 and len(
e_set & input_token_str[-1].get_value()) != 0 and len(
f_set & input_token_str[-2].get_value()) != 0:
filtered = True
if input_token_str[-1].get_value().issubset(e_set) != True:
token_str_6 = deepcopy(input_token_str)
token_str_6[-1].set_value(token_str_6[-1].get_value() - e_set)
ret_val.append(token_str_6)
if input_token_str[-2].get_value().issubset(f_set) != True:
token_str_7 = deepcopy(input_token_str)
token_str_7[-2].set_value(token_str_7[-2].get_value() - f_set)
ret_val.append(token_str_7)
# length > 3 and get zy -> to ies
if len(input_token_str) > 2 and len(
input_token_str[-2].get_value().difference(aeiou_set)
) != 0 and len(input_token_str[-1].get_value() & y_set) != 0:
filtered = True
if len(input_token_str[-1].get_value() - y_set) != 0:
token_str_8 = deepcopy(input_token_str)
token_str_8[-1].set_value(token_str_8[-1].get_value() - y_set)
ret_val.append(token_str_8)
# second to last is aeiou
if len(input_token_str[-2].get_value() & aeiou_set) != 0:
token_str_9 = deepcopy(input_token_str)
token_str_9[-2].set_value(
input_token_str[-2].get_value() & aeiou_set)
ret_val.append(token_str_9)
# Passed all sanity check
# input_token_str survives all the checking, it should be added
if filtered == False:
inversion_result.add(input_token_str)
return ret_val
@staticmethod
def es_sanity_check(input_token_str, inversion_result):
""" check all cases that end with "es", es pre-removed """
sxz_set = set("sxz")
cs_set = set("cs")
h_set = set("h")
# Valid case 1: sxz
if len(input_token_str) >= 1 and len(
sxz_set & input_token_str[-1].get_value()) != 0:
token_str_1 = deepcopy(input_token_str)
token_str_1[-1].set_value(token_str_1[-1].get_value() & sxz_set)
inversion_result.add(token_str_1)
# Valid case 2: The only valid case of being es is ch/sh with length >
# 2 . Otherwise ending with es are invalid
if len(input_token_str) > 2 and len(
h_set & input_token_str[-1].get_value()) != 0 and len(
cs_set & input_token_str[-2].get_value()) != 0:
token_str_2 = deepcopy(input_token_str)
token_str_2[-1].set_value(token_str_2[-1].get_value() & h_set)
token_str_2[-2].set_value(token_str_2[-2].get_value() & cs_set)
inversion_result.add(token_str_2)
# other cases are rejected
@staticmethod
def ves_sanity_check(input_token_str, inversion_result):
""" check all cases that end with "ves", ves pre-removed """
f_set = set("f")
e_set = set("e")
# ends with ves, so v could be f, and if what's before f is not f, them
# bf -> bves
if len(input_token_str) >= 1 and len(
input_token_str[-1].get_value().difference(f_set)) != 0:
# remove "f" from last one, or remove everything not f from second
# to last one
token_str_1 = deepcopy(input_token_str)
token_str_1[-1].set_value(
input_token_str[-1].get_value().difference(f_set))
token_str_1.append_token(Token("f"))
inversion_result.add(token_str_1)
# ends with ves, it could be just fe at the end
if len(input_token_str) >= 1:
token_str_2 = deepcopy(input_token_str)
token_str_2.append_token(Token("f"))
token_str_2.append_token(Token("e"))
inversion_result.add(token_str_2)
@staticmethod
def ies_sanity_check(input_token_str, inversion_result):
""" check all cases that end with "ies", ies pre-removed """
# bby -> bbies, bay -> bays
y_set = set("y")
aeiou_set = set("aeiou")
if len(input_token_str) >= 2 and len(
input_token_str[-1].get_value().difference(aeiou_set)) != 0:
token_str_1 = deepcopy(input_token_str)
token_str_1[-1].set_value(
input_token_str[-1].get_value().difference(aeiou_set))
token_str_1.append_token(Token("y"))
inversion_result.add(token_str_1)
@staticmethod
def ed_sanity_check(input_token_str, inversion_result):
""" check all cases that end with "ed", ed pre-removed """
# For each token_string, have to survive all checking to be valid
ret_val = []
# a(ed) is impossible, so is ab(ed)
if len(input_token_str) <= 2:
return ret_val
# Flag
filtered = False
bgp_set = set("bgp")
y_set = set("y")
# filter condition (gged), remove ed, you get the condition to double
# (bag) bgp
if len(input_token_str) >= 3 and len(
input_token_str[-1].get_value() & bgp_set) != 0 and len(
input_token_str[-2].get_value().difference(bgp_set)) != 0:
filtered = True
# Filter that part.
# either [-1] != bgp
if len(input_token_str[-1].get_value() - bgp_set) != 0:
token_str_1 = deepcopy(input_token_str)
token_str_1[-1].set_value(input_token_str[-1].get_value() -
bgp_set)
ret_val.append(token_str_1)
# or [-2] = bgp
if len(input_token_str[-2].get_value() & bgp_set) != 0:
token_str_2 = deepcopy(input_token_str)
token_str_2[-2].set_value(
input_token_str[-2].get_value() & bgp_set)
ret_val.append(token_str_2)
# filter condition (ied), remove ed, you ends with y, then it is not
# possible
if len(y_set & input_token_str[-1].get_value()) != 0:
filtered = True
# Filter that part.
# [-1] != y
if len(input_token_str[-1].get_value() - y_set) != 0:
token_str_3 = deepcopy(input_token_str)
token_str_3[-1].set_value(input_token_str[-1].get_value() -
y_set)
ret_val.append(token_str_3)
if filtered == False:
inversion_result.add(input_token_str)
return ret_val
@staticmethod
def ing_sanity_check(input_token_str, inversion_result):
""" check all cases that end with "ing", ing pre-removed """
# For each token_string, have to survive all checking to be valid
ret_val = []
# a(ing) and ac(ing) are impossible by just append ing
if len(input_token_str) <= 2:
return ret_val
# Flag
filtered = False
bgp_set = set("bgp")
aeiou_set = set("aeiou")
# filter condition (gging), remove ing, you get the condition to double
# (bag) bgp
if len(input_token_str) >= 3 and len(
input_token_str[-1].get_value() & bgp_set) != 0 and len(
input_token_str[-2].get_value().difference(bgp_set)) != 0:
filtered = True
# Filter that part.
# either [-1] != bgp
if len(input_token_str[-1].get_value() - bgp_set) != 0:
token_str_1 = deepcopy(input_token_str)
token_str_1[-1].set_value(input_token_str[-1].get_value() -
bgp_set)
ret_val.append(token_str_1)
# or [-2] = bgp
if len(input_token_str[-2].get_value() & bgp_set) != 0:
token_str_2 = deepcopy(input_token_str)
token_str_2[-2].set_value(
input_token_str[-2].get_value() & bgp_set)
ret_val.append(token_str_2)
# filter condition (aeiou + ing), remove ing, you ends with aeiou, then
# it is not possible
if len(aeiou_set & input_token_str[-1].get_value()) != 0:
filtered = True
# Filter that part.
# [-1] != aeiou_set
if len(input_token_str[-1].get_value() - aeiou_set) != 0:
token_str_3 = deepcopy(input_token_str)
token_str_3[-1].set_value(input_token_str[-1].get_value() -
aeiou_set)
ret_val.append(token_str_3)
if filtered == False:
inversion_result.add(input_token_str)
return ret_val
@staticmethod
def invert_P_command(token_str, rule, just_check=False, enable_regex=False):
""" P "crack" -> "cracked", etc. (lowercase only)
Inversion Idea:
Case by case study. Check if it ends with "ed", and find all possible preimages.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
if enable_regex == False:
return Invertibility.INVERTIBLE
else:
return Invertibility.UNINVERTIBLE
inversion_result = InversionResult()
if enable_regex == False:
# len(1,2) doesn't change
if len(token_str) <= 2:
inversion_result.add(token_str)
return inversion_result
bgp_set = set("bgp")
# Below guaranteed length >= 3
# If ends with "ed"
if "e" in token_str[-2].get_value(
) and "d" in token_str[-1].get_value():
# first, it could be itself
token_str_1 = deepcopy(token_str)
token_str_1[-2].set_value("e")
token_str_1[-1].set_value("d")
inversion_result.add(token_str_1)
# second, it could be "???e".
token_str_2 = deepcopy(token_str)
token_str_2.pop_token(-1)
token_str_2[-1].set_value("e")
if len(token_str_2) >= 3:
inversion_result.add(token_str_2)
# third, ed but can't be filtered (e.g. bag -> bagged)
tmp_token_string = deepcopy(token_str)
tmp_token_string.pop_token(-1)
tmp_token_string.pop_token(-1)
q = [tmp_token_string]
while len(q) != 0:
ret = Inversion.ed_sanity_check(q.pop(0), inversion_result)
if len(ret) != 0:
q += ret
# fourth, ied. remove ed, change i to y.
if "i" in token_str[-3].get_value() and "e" in token_str[
-2].get_value() and "d" in token_str[-1].get_value():
token_str_3 = deepcopy(token_str)
token_str_3.pop_token(-1)
token_str_3.pop_token(-1)
token_str_3[-1].set_value("y")
inversion_result.add(token_str_3)
# fifth, bagged possible and agged impossible
if len(token_str) >= 6 and len(token_str[-5].get_value().difference(
bgp_set)) != 0 and len(token_str[-4].get_value(
) & token_str[-3].get_value() & bgp_set) != 0:
token_str_4 = deepcopy(token_str)
token_str_4.pop_token(-1) # pop unless part.
token_str_4.pop_token(-1) # pop unless part.
token_str_4.pop_token(-1) # pop unless part.
token_str_4[-2].set_value(
token_str_4[-2].get_value().difference(bgp_set))
token_str_4[-1].set_value(token_str_4[-1].get_value() & bgp_set)
inversion_result.add(token_str_4)
return inversion_result
else:
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_I_command(token_str, rule, just_check=False, enable_regex=False):
""" I "crack" -> "cracking", etc. (lowercase only)
Inversion Idea:
Case by case study. Check if it ends with "ing", and find all possible preimages.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
if enable_regex == False:
return Invertibility.INVERTIBLE
else:
return Invertibility.UNINVERTIBLE
inversion_result = InversionResult()
if enable_regex == False:
# len(1,2) doesn't change
if len(token_str) <= 2:
inversion_result.add(token_str)
return inversion_result
aeiou_set = set("aeiou")
bgp_set = set("bgp")
# Below guaranteed length >= 3
# If ends with "ing"
if "i" in token_str[-3].get_value() and "n" in token_str[
-2].get_value() and "g" in token_str[-1].get_value():
# first, it could be itself
token_str_1 = deepcopy(token_str)
token_str_1[-3].set_value("i")
token_str_1[-2].set_value("n")
token_str_1[-1].set_value("g")
inversion_result.add(token_str_1)
# second, ing but can't be filtered (e.g. bag -> bagging)
tmp_token_string = deepcopy(token_str)
tmp_token_string.pop_token(-1)
tmp_token_string.pop_token(-1)
tmp_token_string.pop_token(-1)
q = [tmp_token_string]
while len(q) != 0:
ret = Inversion.ing_sanity_check(q.pop(0), inversion_result)
if len(ret) != 0:
q += ret
# Third remove aeiou then append ing
if len(token_str) >= 5:
token_str_3 = deepcopy(token_str)
token_str_3.pop_token(-1)
token_str_3.pop_token(-1)
token_str_3[-1].set_value(aeiou_set)
inversion_result.add(token_str_3)
# Fourth, bagging possible agging impossible
if len(token_str) >= 7 and len(token_str[-6].get_value().difference(
bgp_set)) != 0 and len(token_str[-5].get_value(
) & token_str[-4].get_value() & bgp_set) != 0:
token_str_4 = deepcopy(token_str)
token_str_4.pop_token(-1) # pop useless part.
token_str_4.pop_token(-1) # pop useless part.
token_str_4.pop_token(-1) # pop useless part.
token_str_4.pop_token(-1) # pop useless part.
token_str_4[-2].set_value(
token_str_4[-2].get_value().difference(bgp_set))
token_str_4[-1].set_value(token_str_4[-1].get_value() & bgp_set)
inversion_result.add(token_str_4)
return inversion_result
else:
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
# Here we know the rule is only, no parameters for rule 'S'
def invert_S_command(token_str, rule, just_check=False, enable_regex=False):
""" S shift case: "Crack96" -> "cRACK(^"
Inversion Idea:
Shifts the case for every character in the TokenString using the shift dictionary
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
if enable_regex == False:
return Invertibility.INVERTIBLE
else:
return Invertibility.UNINVERTIBLE
inversion_result = InversionResult()
if enable_regex == False:
for idx, token in enumerate(token_str):
if token.is_range():
token_str[idx].set_value( # use prebuilt dict
{Dicts.shift[x] for x in token.get_value()})
else:
token_str[idx].set_value(
{Dicts.shift[x] for x in token.get_value()},
token.start, token.end)
inversion_result.add(token_str)
return inversion_result
else:
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_V_command(token_str, rule, just_check=False, enable_regex=False):
"""
V lowercase vowels, uppercase consonants: "Crack96" -> "CRaCK96"
Inversion Idea:
If there are any uppercase vowels or lowercase consonants in literals, the word is rejected
If they are ranges, then they are dropped from the ranges and if the range is comprised of the above characters, the word is rejected
Otherwise, invert and changes vowels to uppercase and consonants to lowercase. Leaves the other characters the same.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
if enable_regex == False:
return Invertibility.INVERTIBLE
else:
return Invertibility.UNINVERTIBLE
inversion_result = InversionResult()
if enable_regex == False:
for idx, token in enumerate(token_str):
if token.is_range():
# Get two results in list-comprehension
lower_vowel = set(
chain.from_iterable(
(x, x.upper()) for x in token.get_value() if
(x in Dicts.classes['v'] and x in Dicts.classes['l']
))) # Get Lower V in Set Convert Them to Upper
upper_cons = set(
chain.from_iterable(
(x, x.lower()) for x in token.get_value() if
(x in Dicts.classes['c'] and x in Dicts.classes['u']
))) # Get Upper C in Set Convert Them to Lower
other_char = {
x for x in token.get_value()
if (x not in Dicts.classes['v'] and
x not in Dicts.classes['c'])
}
new_set = lower_vowel | upper_cons | other_char
if new_set == set():
return inversion_result
token_str[idx].set_value(new_set)
else:
lower_vowel = set(
chain.from_iterable(
(x, x.upper()) for x in token.get_value() if
(x in Dicts.classes['v'] and x in Dicts.classes['l']
))) # Get Lower V in Set Convert Them to Upper
upper_cons = set(
chain.from_iterable(
(x, x.lower()) for x in token.get_value() if
(x in Dicts.classes['c'] and x in Dicts.classes['u']
))) # Get Upper C in Set Convert Them to Lower
other_char = {
x for x in token.get_value()
if (x not in Dicts.classes['v'] and
x not in Dicts.classes['c'])
}
new_set = lower_vowel | upper_cons | other_char
if new_set == set():
return inversion_result
token_str[idx].set_value(ew_set, token.start, token.end)
inversion_result.add(token_str)
return inversion_result
else:
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_p_command(token_str, rule, just_check=False, enable_regex=False):
""" p pluralize: "crack" -> "cracks", etc. (lowercase only)
Inversion Idea:
Case by case study. Check if it ends with "s", and find all possible preimages.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
if enable_regex == False:
return Invertibility.INVERTIBLE
else:
return Invertibility.UNINVERTIBLE
inversion_result = InversionResult()
if enable_regex == False:
# If length < 2, do nothing
if len(token_str) <= 1:
inversion_result.add(token_str)
return inversion_result
# If length = 2, it's impossible
if len(token_str) == 2:
return inversion_result
# All below length >= 3
# First check s
# If it is s, then after removing it, it shouldn't form the
# condition to be ies, ves or es.
if "s" in token_str[-1].get_value():
tmp_token_string = deepcopy(token_str)
tmp_token_string.pop_token(-1)
q = [tmp_token_string]
while len(q) != 0:
ret = Inversion.s_sanity_check(q.pop(0), inversion_result)
if len(ret) != 0:
q += ret
# Second check es
if "s" in token_str[-1].get_value(
) and "e" in token_str[-2].get_value():
# remove es
tmp_token_string = deepcopy(token_str)
tmp_token_string.pop_token(-1)
tmp_token_string.pop_token(-1)
Inversion.es_sanity_check(tmp_token_string, inversion_result)
# Third check ves
if "s" in token_str[-1].get_value() and "e" in token_str[
-2].get_value() and "v" in token_str[-3].get_value():
# remove es
tmp_token_string = deepcopy(token_str)
tmp_token_string.pop_token(-1)
tmp_token_string.pop_token(-1)
tmp_token_string.pop_token(-1)
Inversion.ves_sanity_check(tmp_token_string, inversion_result)
# Final check ies
if "s" in token_str[-1].get_value() and "e" in token_str[
-2].get_value() and "i" in token_str[-3].get_value():
# remove es
tmp_token_string = deepcopy(token_str)
tmp_token_string.pop_token(-1)
tmp_token_string.pop_token(-1)
tmp_token_string.pop_token(-1)
Inversion.ies_sanity_check(tmp_token_string, inversion_result)
return inversion_result
else:
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_R_command(token_str, rule, just_check=False, enable_regex=False):
""" R shift each character right, by keyboard: "Crack96" -> "Vtsvl07"
Inversion Idea:
We shift each character left by keyboard.
We note that some are not perfectly shifted left, and that's due to how they are initially shifted right.
If words contain literals that, when shifted right are none, we reject the word.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
if enable_regex == False:
return Invertibility.INVERTIBLE
else:
return Invertibility.UNINVERTIBLE
inversion_result = InversionResult()
if enable_regex == False:
for idx, token in enumerate(token_str):
if token.is_range():
new_set = set()
for x in token.get_value():
if Dicts.right[x] is not None:
new_set = new_set | set(
Dicts.right[x]) # use prebuilt dict
if new_set == set():
return inversion_result
else:
token_str[idx].set_value(new_set)
else:
new_set = set()
for x in token.get_value():
if Dicts.right[x] is not None:
new_set = new_set | set(Dicts.right[x])
if new_set == set():
return inversion_result
else:
token_str[idx].set_value(new_set, token.start,
token.end)
inversion_result.add(token_str)
return inversion_result
else:
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_L_command(token_str, rule, just_check=False, enable_regex=False):
""" L shift each character left, by keyboard: "Crack96" -> "Xeaxj85"
Inversion Idea:
we shift each character right by keyboard.
We note that some are not perfectly shifted right, and that's due to how they are initially shifted left.
We also note that a, q, and z map to themselves.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
if enable_regex == False:
return Invertibility.INVERTIBLE
else:
return Invertibility.UNINVERTIBLE
inversion_result = InversionResult()
if enable_regex == False:
for idx, token in enumerate(token_str):
if token.is_range():
new_set = set()
for x in token.get_value():
if Dicts.left[x] is not None:
new_set = new_set | set(
Dicts.left[x]) # use prebuilt dict
if new_set == set():
return inversion_result
else:
token_str[idx].set_value(new_set)
else:
new_set = set()
for x in token.get_value():
if Dicts.left[x] is not None:
new_set = new_set | set(Dicts.left[x])
if new_set == set():
return inversion_result
else:
token_str[idx].set_value(new_set, token.start,
token.end)
inversion_result.add(token_str)
return inversion_result
else:
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_one_insertion(token_str, starting_position, params):
r""" Invert Insertion to Single Position.
Say the transformation is A0"[a-z][A-Z]", the input Should Be
(password, 0, [set(a-z),set(A-Z)]). Invert this insertion by removing the chars
Args:
starting_position: a parsed integer denoting position.
param: a set of appended string.
Returns:
None if failed, otherwise token_str
"""
ret_token_str = TokenString() # Get a copy and modify it.
# The length of words inserted. A0"[a-z][A-Z]" = 2
insertion_range = len(params)
# Not Long Enough
# insert a string longer than the tokenstring size, rejected
# If you don't want to allow empty string to be produced here, change
# to >=.
if insertion_range > len(token_str.tokens):
return None
if starting_position >= 0:
# start 0 insert 1 = 1. If empty length = 1 <- how can both if
# empty and if has one = 1? I think this is throwing one off.
ending_position = starting_position + insertion_range
# Means append, handles cases like: "0" + A3"12345" -> "012345".
if ending_position >= len(token_str.tokens):
ending_position = len(token_str.tokens)
else: # starting_position < 0
# the opposite way, if insert at -1, length 3, it is (-4) to (-1)
ending_position = starting_position - insertion_range
# swap
starting_position, ending_position = ending_position, starting_position
# Convert to positive positions here.
# Means append, if A(-4)"123" and you get b123, starting position
# -4 - 3 = -7.
if abs(starting_position) > len(token_str.tokens):
ending_position = len(token_str.tokens)
else:
ending_position = len(token_str.tokens) + ending_position
for i in range(insertion_range):
token = token_str[ending_position - i - 1] # For current insertion
if token.is_range():
intersect_set = token.get_value() & set(
params[insertion_range - i - 1])
if intersect_set == set():
return None
else:
pass
# Remove the inserted part
ret_token_str.append_tokens(
token_str[:ending_position - insertion_range])
ret_token_str.append_tokens(token_str[ending_position:])
return ret_token_str
@staticmethod
def invert_dollar_X_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" $X Append character X to the word
Inversion Idea:
remove the inserted strings.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
return Invertibility.INVERTIBLE
if enable_regex == False:
return Inversion.invert_i_N_X_command(
token_str, ["i", len(token_str) - 1, rule[1]], just_check,
enable_regex)
else:
inversion_result = InversionResult()
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_caret_X_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" ^X prefix the word with character X
Inversion Idea:
remove the inserted string
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
return Inversion.invert_i_N_X_command(token_str, ["i", "0", rule[1]],
just_check, enable_regex)
@staticmethod
def invert_i_N_X_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" iNX insert character X in position N and shift the rest right
Inversion Idea:
remove the inserted string
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check:
if enable_regex == False:
try:
N = convert_str_length_to_int(rule[1])
return Invertibility.INVERTIBLE
except BaseException:
return Invertibility.UNINVERTIBLE
else:
return Invertibility.UNINVERTIBLE
inversion_result = InversionResult()
N = convert_str_length_to_int(rule[1])
X = rule[2]
if enable_regex == False:
# If token_str_length is max_length, it could be itself
if len(token_str) + 1 > RUNTIME_CONFIG['max_password_length']:
inversion_result.add(deepcopy(token_str))
# HC Style Doesn't Append If Too Short
if RUNTIME_CONFIG.is_hc():
# Length == 0 covered
if len(token_str) < N:
inversion_result.add(token_str)
return inversion_result
if len(token_str) == N: # It's no possible to get length = N.
return inversion_result
# guranteed len(token_str) >= N + 1
res = Inversion.invert_one_insertion(token_str, N, [X])
if res is not None:
inversion_result.add(res)
else:
if len(token_str
) <= 0: # will insert one string anyhow, require len >= 1
return inversion_result
# guranteed len(token_str) >= 1
res = Inversion.invert_one_insertion(token_str, N, [X])
if res is not None:
inversion_result.add(res)
return inversion_result
else:
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_A_N_str_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" AN"STR" insert string STR into the word at position N
Inversion Idea:
remove the inserted string
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check:
if enable_regex == False:
try:
convert_str_length_to_int(rule[1])
return Invertibility.INVERTIBLE
except BaseException:
return Invertibility.UNINVERTIBLE
else:
return Invertibility.UNINVERTIBLE
inversion_result = InversionResult()
N = convert_str_length_to_int(rule[1])
if enable_regex == False:
# If token_str_length is max_length, it could be itself
if len(token_str) + \
len(rule[2:]) > RUNTIME_CONFIG['max_password_length']:
inversion_result.add(deepcopy(token_str))
if len(token_str
) <= 0: # will insert one string anyhow, require len >= 1
return inversion_result
# guranteed len(token_str) >= 1
token_str = Inversion.invert_one_insertion(token_str, N, rule[2:])
if token_str is not None:
inversion_result.add(token_str)
return inversion_result
else:
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_T_N_command(token_str,
rule,
just_check=False,
enable_regex=False):
"""
TN Toggles case of char at position N
Inversion Idea:
toggle the case at position N
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
try:
N = convert_str_length_to_int(rule[1])
return Invertibility.INVERTIBLE
except BaseException:
return Invertibility.UNINVERTIBLE
inversion_result = InversionResult()
N = convert_str_length_to_int(rule[1])
if enable_regex == False:
length = len(token_str)
if length == 0: # Nothing to do
inversion_result.add(token_str)
return inversion_result
if N > length - 1: # not toggled
inversion_result.add(token_str)
return inversion_result
token_str[N].set_value({
Dicts.toggle.setdefault(x, x) for x in token_str[N].get_value()
})
inversion_result.add(token_str)
return inversion_result
else:
# For length >= N, find the Nth position.
# For length < N, do nothing.
# There are two ways to do this, one is break the tokenstring
# Second set external length.
# Let's try second method first
less_than = deepcopy(token_str)
less_than.set_max_len(N + 1)
if less_than.is_valid():
inversion_result.add(less_than)
greater_or_equal = RegexTokenString.fix_first_N_position(
token_str, N + 1)
for one_ts in greater_or_equal:
one_ts[N].set_value({
Dicts.toggle.setdefault(x, x)
for x in one_ts[N].get_value()
})
inversion_result.add(one_ts)
return inversion_result
@staticmethod
def invert_prime_N_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" 'N Truncates word at position N
Inversion Idea:
If word is longer than N, reject because rule hasn't been implemented
If word is equal to N, add a regex all char to the end
If word is shorter than N, return that word.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
try:
N = convert_str_length_to_int(rule[1])
return Invertibility.UNINVERTIBLEOPTIMIZATBLE
except BaseException:
return Invertibility.UNINVERTIBLE
inversion_result = InversionResult()
N = convert_str_length_to_int(rule[1])
if enable_regex == False:
length = len(token_str)
if length < N: # length < N, can only be itself.
inversion_result.add(token_str)
return inversion_result
elif length == N:
# Length == 4, either itself, or add some string that requires
# regex. return None to ask HC to handle.
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
else: # Length > N, rejected
return inversion_result
else:
# For prime N, length = N is the most valid
# Less than N, it still what it is.
less_than = deepcopy(token_str)
less_than.set_max_len(N) # <N, do nothing
if less_than.is_valid():
inversion_result.add(less_than)
greater_or_equal = RegexTokenString.enumerate_N(token_str,
N) # get all =N
for one_ts in greater_or_equal:
one_ts.tokens += [Token(Dicts.classes['z'], 0, float("inf"))]
one_ts.reset_max_len()
inversion_result.add(one_ts)
return inversion_result
@staticmethod
def invert_p_N_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" pN Appends duplicated word N times: pass -> (p2) passpasspass
Inversion Idea:
divide the word into N + 1 equal sections. If it's not divisible, then rule not implemented
Make sure each section is the exact same, then return the original.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
if enable_regex == True:
return Invertibility.UNINVERTIBLE
else:
try:
N = convert_str_length_to_int(rule[1])
return Invertibility.INVERTIBLE
except BaseException:
return Invertibility.UNINVERTIBLE
N = convert_str_length_to_int(rule[1]) + 1
if enable_regex == False:
# Initialize Utilities.
inversion_result = InversionResult()
if N == 1:
inversion_result.add(token_str)
return inversion_result
length = len(token_str)
if length == 0: # Length = 0. No duplicate.
inversion_result.add(token_str)
return inversion_result
div_size = 0
index = 0
# if a word is larger than max_length, it can't be printed
if length * N > RUNTIME_CONFIG['max_password_length']:
original_ts = deepcopy(token_str)
inversion_result.add(original_ts)
if length % N == 0: # Not N's multiply
# abcabcad p2
div_size = int(length / N)
index = div_size
else: # Reject what's below
return inversion_result
# for idx in range(length): #I am aware that this will check the
# original word against itself... also: doing 0 indexing
while index < length:
left_set = set(token_str[index % div_size].get_value())
right_set = set(token_str[index].get_value())
intersect_set = left_set.intersection(right_set)
if intersect_set == set():
# dcbdcbdcc p2
return inversion_result
else:
# nflnflnfl p2
if token_str[index].is_regex() and token_str[
index % div_size].is_regex():
start = max(token_str[index].start,
token_str[index % div_size].start)
end = min(token_str[index].end,
token_str[index % div_size].end)
token_str[index] = Token(intersect_set, start, end)
else:
token_str[index % div_size] = Token(intersect_set)
index += 1
token_str.tokens = token_str.tokens[:div_size]
token_str.length = div_size
inversion_result.add(token_str)
return inversion_result
else:
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_z_N_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" zN Duplicates first character N times: hi -> (z2) hhhi
Inversion Idea:
check the first N characters.
If they are all the same as the N+1th character, return
Otherwise reject.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
try:
N = convert_str_length_to_int(rule[1])
return Invertibility.INVERTIBLE
except BaseException:
return Invertibility.UNINVERTIBLE
inversion_result = InversionResult()
N = convert_str_length_to_int(rule[1])
if enable_regex == False:
if N == 0:
inversion_result.add(token_str)
return inversion_result
length = len(token_str)
if length == 0: # Not word to duplicate
inversion_result.add(token_str)
return inversion_result
# Potentially not duplicated
if length + N > RUNTIME_CONFIG['max_password_length']:
# abcdefghijklmnopqrstuvwxyz z8
overlarge_ts = deepcopy(token_str)
inversion_result.add(overlarge_ts)
if length < N + 1: # Not possible, below rejected
# adf z3
return inversion_result
# due to zero indexing, should give the N+1st char in word
match = set(token_str[N].get_value())
intersect_set = set()
for idx in range(N):
# aaabc z2
value = set(token_str[idx].get_value())
intersect_set = match.intersection(value)
if intersect_set == set():
return inversion_result
match = intersect_set
token_str.tokens = token_str.tokens[N:]
token_str[0].set_value(intersect_set)
token_str.length = length - N
inversion_result.add(token_str)
return inversion_result
else:
if N == 0:
inversion_result.add(token_str)
return inversion_result
less_than = deepcopy(token_str)
less_than.set_max_len(1)
if less_than.is_valid():
inversion_result.add(less_than)
greater_than = deepcopy(token_str)
greater_than.set_min_len(RUNTIME_CONFIG['max_password_length'] - N +
1)
if greater_than.is_valid():
inversion_result.add(greater_than)
greater_or_equal = RegexTokenString.fix_first_N_position(
token_str, N + 1)
for one_ts in greater_or_equal:
# remember to decrease input len requirement window
one_ts.decrease_window(N)
match = set(one_ts[N].get_value())
for idx in range(N):
value = set(one_ts[idx].get_value())
intersect_set = match.intersection(value)
if intersect_set == set():
break
match = intersect_set
else:
one_ts.tokens = one_ts.tokens[N:]
one_ts[0].set_value(intersect_set)
inversion_result.add(one_ts)
return inversion_result
@staticmethod
def invert_Z_N_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" ZN Duplicates last character N times: hello -> (Z2) hellooo
Inversion Idea:
Check the last N characters.
If they are all the same as the length - Nth char (len - N - 1 if 0 indexing), return
Otherwise, reject
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
try:
N = convert_str_length_to_int(rule[1])
return Invertibility.INVERTIBLE
except BaseException:
return Invertibility.UNINVERTIBLE
inversion_result = InversionResult()
N = convert_str_length_to_int(rule[1])
if enable_regex == False:
if N == 0:
inversion_result.add(token_str)
return inversion_result
length = len(token_str)
if length == 0:
inversion_result.add(token_str)
return inversion_result
# Potentially not duplicated
if length + N > RUNTIME_CONFIG['max_password_length']:
overlarge_ts = deepcopy(token_str)
inversion_result.add(overlarge_ts)
if length < N + 1: # Below Rejected, not possible.
return inversion_result
# this is the set you reference
match = set(token_str[length - N - 1].get_value())
for idx in range(N):
# aaabccc
value = set(token_str[length - idx - 1].get_value())
intersect_set = match.intersection(value)
if intersect_set == set():
return inversion_result
match = intersect_set
token_str.tokens = token_str.tokens[:(length - N)]
token_str[-1].set_value(intersect_set)
token_str.length = token_str.length - N
inversion_result.add(token_str)
return inversion_result
else:
if N == 0:
inversion_result.add(token_str)
return inversion_result
less_than = deepcopy(token_str)
less_than.set_max_len(1)
if less_than.is_valid():
inversion_result.add(less_than)
greater_than = deepcopy(token_str)
greater_than.set_min_len(RUNTIME_CONFIG['max_password_length'] - N +
1)
if greater_than.is_valid():
inversion_result.add(greater_than)
greater_or_equal = RegexTokenString.fix_last_N_position(
token_str, N + 1)
for one_ts in greater_or_equal:
# remember to decrease input len requirement window
one_ts.decrease_window(N)
# this is the set you reference
match = set(one_ts[-1].get_value())
for idx in range(2, N + 2):
# aaabccc
value = set(one_ts[-idx].get_value())
intersect_set = match.intersection(value)
if intersect_set == set():
break
match = intersect_set
else:
one_ts.tokens = one_ts.tokens[:-N]
one_ts[-1].set_value(intersect_set)
inversion_result.add(one_ts)
return inversion_result
@staticmethod
def invert_L_N_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" LN Bitwise left shift char at position N
Inversion Idea:
Bitwise right shift char at pos N.
HC seems to convert to ascii, bitwise shift, then convert back.
Doesn't seem to be a max where they just delete the chars.
If word is smaller than N + 1, return
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
try:
N = convert_str_length_to_int(rule[1])
return Invertibility.INVERTIBLE
except BaseException:
return Invertibility.UNINVERTIBLE
inversion_result = InversionResult()
N = convert_str_length_to_int(rule[1])
if enable_regex == False:
length = len(token_str)
if length < N + 1:
inversion_result.add(token_str)
return inversion_result
bitwise = set(
ord(x) for x in token_str[N].get_value() if (ord(x) % 2 != 1))
if bitwise == set(
): # In case of false results. Because shifting left initially, last bit should be 0. If not, return!
return inversion_result
val_1 = set(x >> 1 for x in bitwise)
val_2 = set((x + 256) >> 1 for x in bitwise)
char_set = set(chr(x) for x in (val_1 | val_2))
token_str[N].set_value(char_set)
inversion_result.add(token_str)
return inversion_result
else:
# For length >= N, find the Nth position.
# For length < N, do nothing.
# There are two ways to do this, one is break the tokenstring
# Second set external length.
# Let's try second method first
less_than = deepcopy(token_str)
less_than.set_max_len(N + 1)
if less_than.is_valid():
inversion_result.add(less_than)
greater_or_equal = RegexTokenString.fix_first_N_position(
token_str, N + 1)
for one_ts in greater_or_equal:
bitwise = set(
ord(x) for x in one_ts[N].get_value() if (ord(x) % 2 != 1))
if bitwise == set(
): # In case of false results. Because shifting left initially, last bit should be 0. If not, return!
continue
val_1 = set(x >> 1 for x in bitwise)
val_2 = set((x + 256) >> 1 for x in bitwise)
char_set = set(chr(x) for x in (val_1 | val_2))
one_ts[N].set_value(char_set)
inversion_result.add(one_ts)
return inversion_result
@staticmethod
def invert_R_N_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" RN Bitwise right shift char at position N
Inversion Idea:
Bitwise left shift char at pos N
HC seems to convert to ascii, bitwise shift, then convert back.
Doesn't seem to be a max where they just delete the chars.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
try:
N = convert_str_length_to_int(rule[1])
return Invertibility.INVERTIBLE
except BaseException:
return Invertibility.UNINVERTIBLE
inversion_result = InversionResult()
N = convert_str_length_to_int(rule[1])
if enable_regex == False:
length = len(token_str)
# Cover by length < N + 1
if length < N + 1:
inversion_result.add(token_str)
return inversion_result
val = set(ord(x) for x in token_str[N].get_value() if ord(x) <= 127)
if val == set():
return inversion_result
char_set = set(chr(x * 2) for x in val) | set(
chr(x * 2 + 1) for x in val)
token_str[N] = Token(char_set)
inversion_result.add(token_str)
return inversion_result
else:
# For length >= N, find the Nth position.
# For length < N, do nothing.
# There are two ways to do this, one is break the tokenstring
# Second set external length.
# Let's try second method first
less_than = deepcopy(token_str)
less_than.set_max_len(N + 1)
if less_than.is_valid():
inversion_result.add(less_than)
greater_or_equal = RegexTokenString.fix_first_N_position(
token_str, N + 1)
for one_ts in greater_or_equal:
val = set(
ord(x) for x in one_ts[N].get_value() if ord(x) <= 127)
if val == set():
continue
char_set = set(chr(x * 2) for x in val) | set(
chr(x * 2 + 1) for x in val)
one_ts[N].set_value(char_set)
inversion_result.add(one_ts)
return inversion_result
@staticmethod
def invert_plus_N_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" +N Increment char at position N by 1 ascii value
Inversion Idea:
Decrement char at position N by 1 ascii value.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
try:
N = convert_str_length_to_int(rule[1])
return Invertibility.INVERTIBLE
except BaseException:
return Invertibility.UNINVERTIBLE
inversion_result = InversionResult()
N = convert_str_length_to_int(rule[1])
if enable_regex == False:
length = len(token_str)
# Length == 0 covered
if len(token_str) < N + 1:
inversion_result.add(token_str)
return inversion_result
ascii_set = set(
chr((ord(x) - 1 + 256) % 256) for x in token_str[N].get_value())
token_str[N].set_value(ascii_set)
inversion_result.add(token_str)
return inversion_result
else:
less_than = deepcopy(token_str)
less_than.set_max_len(N + 1)
if less_than.is_valid():
inversion_result.add(less_than)
greater_or_equal = RegexTokenString.fix_first_N_position(
token_str, N + 1)
for one_ts in greater_or_equal:
ascii_set = set(
chr((ord(x) - 1 + 256) % 256)
for x in one_ts[N].get_value())
one_ts[N].set_value(ascii_set)
inversion_result.add(one_ts)
return inversion_result
@staticmethod
def invert_minus_N_command(token_str,
rule,
just_check=False,
enable_regex=False):
"""
-N Decrement char at position N by 1 ascii value
Inversion Idea:
Increment char at position N by 1 ascii value.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
try:
N = convert_str_length_to_int(rule[1])
return Invertibility.INVERTIBLE
except BaseException:
return Invertibility.UNINVERTIBLE
inversion_result = InversionResult()
N = convert_str_length_to_int(rule[1])
if enable_regex == False:
length = len(token_str)
# Length == 0 covered
if len(token_str) < N + 1:
inversion_result.add(token_str)
return inversion_result
ascii_set = set(
chr((ord(x) + 1) % 256) for x in token_str[N].get_value())
token_str[N].set_value(ascii_set)
inversion_result.add(token_str)
return inversion_result
else:
less_than = deepcopy(token_str)
less_than.set_max_len(N + 1)
if less_than.is_valid():
inversion_result.add(less_than)
greater_or_equal = RegexTokenString.fix_first_N_position(
token_str, N + 1)
for one_ts in greater_or_equal:
ascii_set = set(
chr((ord(x) + 1) % 256) for x in one_ts[N].get_value())
one_ts[N].set_value(ascii_set)
inversion_result.add(one_ts)
return inversion_result
@staticmethod
def invert_period_N_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" .N Replace char at position N with the char at position N + 1
Inversion Idea:
check to make sure the Nth and N + 1th position have the same char in it.
If so, place all char set at position N.
If there is no position N + 1, word is returned unchanged
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
try:
N = convert_str_length_to_int(rule[1])
return Invertibility.INVERTIBLE
except BaseException:
return Invertibility.UNINVERTIBLE
inversion_result = InversionResult()
N = convert_str_length_to_int(rule[1])
if enable_regex == False:
length = len(token_str)
# Length == 0 covered
if length - 1 < N + 1:
inversion_result.add(token_str)
return inversion_result
N_char = set(token_str[N].get_value())
N_plus_char = set(token_str[N + 1].get_value())
intersect_set = N_char.intersection(N_plus_char)
if intersect_set == set():
return inversion_result
else:
token_str[N + 1] = Token(intersect_set)
token_str[N] = Token(Dicts.classes['z'])
inversion_result.add(token_str)
return inversion_result
else:
less_than = deepcopy(token_str)
less_than.set_max_len(N + 2)
if less_than.is_valid():
inversion_result.add(less_than)
greater_or_equal = RegexTokenString.fix_first_N_position(
token_str, N + 2)
for one_ts in greater_or_equal:
N_char = set(one_ts[N].get_value())
N_plus_char = set(one_ts[N + 1].get_value())
intersect_set = N_char.intersection(N_plus_char)
if intersect_set == set():
continue
else:
one_ts[N + 1].set_value(intersect_set)
one_ts[N].set_value(Dicts.classes['z'])
inversion_result.add(one_ts)
return inversion_result
@staticmethod
def invert_comma_N_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" ,N Replace char at position N with the char at position N - 1
Inversion Idea:
place all char set at position N
If there is no position N - 1, word is returned unchanged
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
try:
N = convert_str_length_to_int(rule[1])
return Invertibility.INVERTIBLE
except BaseException:
return Invertibility.UNINVERTIBLE
inversion_result = InversionResult()
N = convert_str_length_to_int(rule[1])
if enable_regex == False:
length = len(token_str)
# Length == 0 covered
if N == 0: # If N == 0, no operation is performed.
inversion_result.add(token_str)
return inversion_result
if length - 1 < N: # If N >= len, no operation is performed.
inversion_result.add(token_str)
return inversion_result
N_char = set(token_str[N].get_value())
N_minus_char = set(token_str[N - 1].get_value())
intersect_set = N_char.intersection(N_minus_char)
if intersect_set == set():
return inversion_result
else:
token_str[N - 1] = Token(intersect_set)
token_str[N] = Token(Dicts.classes['z'])
inversion_result.add(token_str)
return inversion_result
else:
if N == 0: # If N == 0, no operation is performed.
inversion_result.add(token_str)
return inversion_result
less_than = deepcopy(token_str)
less_than.set_max_len(N + 1)
if less_than.is_valid():
inversion_result.add(less_than)
greater_or_equal = RegexTokenString.fix_first_N_position(
token_str, N + 1)
for one_ts in greater_or_equal:
N_char = set(one_ts[N].get_value())
N_minus_char = set(one_ts[N - 1].get_value())
intersect_set = N_char.intersection(N_minus_char)
if intersect_set == set():
continue
else:
one_ts[N - 1].set_value(intersect_set)
one_ts[N].set_value(Dicts.classes['z'])
inversion_result.add(one_ts)
return inversion_result
@staticmethod
def invert_y_N_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" yN Duplicates first N characters: hello -> (y2) hehello
Inversion Idea:
Take the first N characters and the first N characters after that
Compare the two. If they match, return, otherwise reject.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
try:
N = convert_str_length_to_int(rule[1])
return Invertibility.INVERTIBLE
except BaseException:
return Invertibility.UNINVERTIBLE
inversion_result = InversionResult()
N = convert_str_length_to_int(rule[1])
if enable_regex == False:
if N == 0:
inversion_result.add(token_str)
return inversion_result
length = len(token_str)
# Potentially not duplicated
if length + N > RUNTIME_CONFIG['max_password_length']:
overlarge_ts = deepcopy(token_str)
inversion_result.add(overlarge_ts)
if length < N: # Not duplicated
inversion_result.add(token_str)
if length < 2 * N: # Below Rejected.
return inversion_result
add_str = token_str[:N]
check_str = token_str[N:2 * N]
for idx in range(N):
# hehello
left_set = set(add_str[idx].get_value())
right_set = set(check_str[idx].get_value())
intersect_set = left_set.intersection(right_set)
if intersect_set == set():
return inversion_result
else:
token_str[N + idx].set_value(intersect_set)
token_str.tokens = token_str.tokens[N:]
token_str.length = length - N
inversion_result.add(token_str)
return inversion_result
else:
if N == 0:
inversion_result.add(token_str)
return inversion_result
less_than = deepcopy(token_str)
less_than.set_max_len(N) # do nothing if length < N
if less_than.is_valid():
inversion_result.add(less_than)
greater_than = deepcopy(token_str)
greater_than.set_min_len(RUNTIME_CONFIG['max_password_length'] - N +
1)
if greater_than.is_valid():
inversion_result.add(greater_than)
greater_or_equal = RegexTokenString.fix_first_N_position(
token_str, N * 2)
for one_ts in greater_or_equal:
# remember to decrease input len requirement window
one_ts.decrease_window(N)
add_str = one_ts[:N]
check_str = one_ts[N:2 * N]
for v in zip(add_str, check_str):
inter_set = v[0].get_value().intersection(v[1].get_value())
if inter_set == set():
break
else:
v[1].set_value(inter_set)
else:
one_ts.tokens = one_ts.tokens[N:]
inversion_result.add(one_ts)
return inversion_result
@staticmethod
def invert_Y_N_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" YN Duplicates last N characters: hello -> (Y2) hellolo
Inversion Idea:
Take the last N characters and the N characters before that.
Commpare the two. If they match, return. Otherwise, reject.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
try:
N = convert_str_length_to_int(rule[1])
return Invertibility.INVERTIBLE
except BaseException:
return Invertibility.UNINVERTIBLE
inversion_result = InversionResult()
N = convert_str_length_to_int(rule[1])
if enable_regex == False:
if N == 0:
inversion_result.add(token_str)
return inversion_result
length = len(token_str)
# Potentially not duplicated
if length + N > RUNTIME_CONFIG['max_password_length']:
overlarge_ts = deepcopy(token_str)
inversion_result.add(overlarge_ts)
if length < N: # Not duplicated
inversion_result.add(token_str)
if length < 2 * N: # Rejected.
return inversion_result
add_str = token_str[-N:]
check_str = token_str[-2 * N:-N]
for idx in range(N):
left_set = set(add_str[idx].get_value())
right_set = set(check_str[idx].get_value())
intersect_set = left_set.intersection(right_set)
if intersect_set == set():
return inversion_result
else:
token_str[length - 2 * N + idx] = Token(intersect_set)
token_str.tokens = token_str.tokens[:-N]
token_str.length = length - N
inversion_result.add(token_str)
return inversion_result
else:
if N == 0:
inversion_result.add(token_str)
return inversion_result
less_than = deepcopy(token_str)
less_than.set_max_len(N) # do nothing if length < N
if less_than.is_valid():
inversion_result.add(less_than)
greater_than = deepcopy(token_str)
greater_than.set_min_len(RUNTIME_CONFIG['max_password_length'] - N +
1)
if greater_than.is_valid():
inversion_result.add(greater_than)
greater_or_equal = RegexTokenString.fix_last_N_position(
token_str, N * 2)
for one_ts in greater_or_equal:
# remember to decrease input len requirement window
one_ts.decrease_window(N)
add_str = one_ts[-N:]
check_str = one_ts[-2 * N:-N]
for v in zip(add_str, check_str):
inter_set = v[0].get_value().intersection(v[1].get_value())
if inter_set == set():
break
else:
v[1].set_value(inter_set)
else:
one_ts.tokens = one_ts.tokens[:-N]
inversion_result.add(one_ts)
return inversion_result
@staticmethod
def invert_x_N_M_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" xNM Extracts M chars, starting at position N
Inversion Idea:
Requires regex.
Add an allchar all length regex char to the front and back of the word.
For xNM to valid, len(string) >= N + M
If length < M, it cannot from xNM, just itself
If length == M, it could be from xNM + itself given any N.
If N + M > length > M, it cannot from xNM, could be just from itself.
If length >= N + M, rejected
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
if enable_regex == False:
# for JtR don't optimize
if RUNTIME_CONFIG.is_jtr():
return Invertibility.UNINVERTIBLE
try:
N = convert_str_length_to_int(rule[1])
M = convert_str_length_to_int(rule[2])
return Invertibility.UNINVERTIBLEOPTIMIZATBLE
except BaseException:
return Invertibility.UNINVERTIBLE
else:
return Invertibility.INVERTIBLE
inversion_result = InversionResult()
N = convert_str_length_to_int(rule[1])
M = convert_str_length_to_int(rule[2])
if enable_regex == False:
length = len(token_str)
# why max(N + 1, N + M)? M = 0 special case
# length < M or max(N + 1, N + M) > length > M,can only be itself.
if length < M or M < length < max(N + 1, N + M):
inversion_result.add(token_str)
return inversion_result
elif length == M:
# Length == M, either itself, or add some string that requires
# regex. return None to ask HC to handle.
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
else: # Length > N, rejected
return inversion_result
else:
# For length < M and max(N + 1, N + M) > length > M, lazy eval
lazy_1 = deepcopy(token_str)
lazy_1.set_max_len(M) # <N, do nothing
if lazy_1.is_valid():
inversion_result.add(lazy_1)
lazy_2 = deepcopy(token_str)
# max(N + 1, N + M) > length > M, do nothing
lazy_2.set_max_len(max(N + 1, N + M))
lazy_2.set_min_len(M + 1)
if lazy_2.is_valid():
inversion_result.add(lazy_2)
greater_or_equal = RegexTokenString.enumerate_N(
token_str, M) # get all =M, or itself
for one_ts in greater_or_equal:
inversion_result.add(deepcopy(one_ts)) # itself, or some regex
one_ts.tokens = [Token(Dicts.classes['z']) for _ in range(N)
] + one_ts.tokens + [
Token(Dicts.classes['z'], 0, float("inf"))
]
one_ts.set_min_len(N) # N?
one_ts.reset_max_len()
inversion_result.add(one_ts)
return inversion_result
@staticmethod
def invert_o_N_X_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" oNX Overwrites char at position N with char X
Inversion Idea:
If char at position N is X, replace with allchar set
Otherwise reject
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
try:
N = convert_str_length_to_int(rule[1])
return Invertibility.INVERTIBLE
except BaseException:
return Invertibility.UNINVERTIBLE
inversion_result = InversionResult()
N = convert_str_length_to_int(rule[1])
X = rule[2]
if enable_regex == False:
length = len(token_str)
# Nothing to do.
if length == 0:
inversion_result.add(token_str)
return inversion_result
if N >= len(token_str):
inversion_result.add(token_str)
else:
if X in set(token_str[N].get_value()):
token_str[N] = Token(Dicts.classes['z'])
inversion_result.add(token_str)
else:
return inversion_result
return inversion_result
else:
less_than = deepcopy(token_str)
less_than.set_max_len(N + 1)
if less_than.is_valid():
inversion_result.add(less_than)
greater_or_equal = RegexTokenString.fix_first_N_position(
token_str, N + 1)
for one_ts in greater_or_equal:
if X in set(one_ts[N].get_value()):
one_ts[N].set_value(Dicts.classes['z'])
inversion_result.add(one_ts)
else:
continue
return inversion_result
@staticmethod
def invert_O_N_M_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" ONM Deletes M chars, starting at position N
Inversion Idea:
add a regex char for M characters.
If length is less than N-1, keep.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
if enable_regex == False:
try:
N = convert_str_length_to_int(rule[1])
M = convert_str_length_to_int(rule[2])
if M <= RUNTIME_CONFIG['m_threshold']:
return Invertibility.INVERTIBLE
else:
return Invertibility.UNINVERTIBLE
except BaseException:
return Invertibility.UNINVERTIBLE
else:
return Invertibility.UNINVERTIBLE
N = convert_str_length_to_int(rule[1])
M = convert_str_length_to_int(rule[2])
if enable_regex == False:
# If M > 3, below shohuld not be executed.
if M > RUNTIME_CONFIG['m_threshold']:
raise Exception("M should be <= {}".format(
RUNTIME_CONFIG['m_threshold']))
inversion_result = InversionResult()
token_str = deepcopy(token_str)
if len(token_str) < N: # If Length < N, can only be itself
inversion_result.add(token_str)
return inversion_result
else: # >= N
# If Length < N + M, can either be itself, or something after
# deleted
if len(token_str) < (N + M):
original_ts = deepcopy(token_str)
inversion_result.add(original_ts)
token_str.tokens = token_str.tokens[:N] + [
Token(Dicts.classes['z'])
] * M + token_str.tokens[N:]
token_str.length += M
inversion_result.add(token_str)
return inversion_result
# Length >= (N + M) and Length <= RUNTIME_CONFIG['max_password_length'] - M
elif len(
token_str) <= RUNTIME_CONFIG['max_password_length'] - M:
# Add something in between
token_str.tokens = token_str.tokens[:N] + [
Token(Dicts.classes['z'])
] * M + token_str.tokens[N:]
token_str.length += M
inversion_result.add(token_str)
return inversion_result
else: # Else it is not possible, rejected
return inversion_result
else:
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_asterisk_N_M_command(token_str,
rule,
just_check=False,
enable_regex=False):
r""" *NM Swaps character at position N with a character at position M. (indexing starting at 0)
Inversion Idea:
Reswap those two characters and return.
If word is shorter than the position of either N or M, return word.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
if enable_regex == True:
return Invertibility.UNINVERTIBLE
else:
try:
N = convert_str_length_to_int(rule[1])
M = convert_str_length_to_int(rule[2])
return Invertibility.INVERTIBLE
except BaseException:
return Invertibility.UNINVERTIBLE
inversion_result = InversionResult()
N = convert_str_length_to_int(rule[1])
M = convert_str_length_to_int(rule[2])
if enable_regex == False:
length = len(token_str)
if length == 0: # nothing to swap
inversion_result.add(token_str)
return inversion_result
if length < N + 1 or length < M + 1:
inversion_result.add(token_str)
return inversion_result
token_str[M], token_str[N] = token_str[N], token_str[M]
inversion_result.add(token_str)
return inversion_result
else:
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_M_command(token_str, rule, just_check=False, enable_regex=False):
""" Memory Command M
Inversion Idea:
None
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check:
return Invertibility.UNINVERTIBLE
inversion_result = InversionResult()
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_Q_command(token_str, rule, just_check=False, enable_regex=False):
""" Memory Command Q
Inversion Idea:
None
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check:
return Invertibility.UNINVERTIBLE
inversion_result = InversionResult()
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_X_N_M_I_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" Memory Command XNMI
Inversion Idea:
None
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check:
return Invertibility.UNINVERTIBLE
inversion_result = InversionResult()
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_4_command(token_str, rule, just_check=False, enable_regex=False):
""" Memory Command 4
Inversion Idea:
None
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
return Invertibility.UNINVERTIBLE
inversion_result = InversionResult()
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_6_command(token_str, rule, just_check=False, enable_regex=False):
""" Memory Command 6
Inversion Idea:
None
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
return Invertibility.UNINVERTIBLE
inversion_result = InversionResult()
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_v_V_N_M_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" Memory Command vVNM
Inversion Idea:
None
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check:
return Invertibility.UNINVERTIBLE
inversion_result = InversionResult()
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_mode_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" Mode Commands 1 or 2
Inversion Idea:
None
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check:
return Invertibility.INVERTIBLE
inversion_result = InversionResult()
return inversion_result
@staticmethod
def invert_less_than_N_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" <N Reject unless word is less than N chars long
Inversion Idea:
HC: Reject unless word is less or equal than N chars long
JtR: Reject unless word is less than N chars long
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
if enable_regex == True:
return Invertibility.UNINVERTIBLE
else:
try:
N = convert_str_length_to_int(rule[1])
return Invertibility.INVERTIBLE
except BaseException:
return Invertibility.UNINVERTIBLE
inversion_result = InversionResult()
N = convert_str_length_to_int(rule[1])
if enable_regex == False:
if RUNTIME_CONFIG.is_jtr():
if len(token_str) < N:
inversion_result.add(token_str)
else:
if len(token_str) <= N:
inversion_result.add(token_str)
return inversion_result
else:
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_greater_than_N_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" >N Reject unless word is greater than N chars long
Inversion Idea:
HC: Reject unless word is greater or equal than N chars long
JtR: Reject unless word is greater than N chars long
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
if enable_regex == True:
return Invertibility.UNINVERTIBLE
else:
try:
N = convert_str_length_to_int(rule[1])
return Invertibility.INVERTIBLE
except BaseException:
return Invertibility.UNINVERTIBLE
inversion_result = InversionResult()
N = convert_str_length_to_int(rule[1])
if enable_regex == False:
if RUNTIME_CONFIG.is_jtr():
if len(token_str) > N:
inversion_result.add(token_str)
else:
if len(token_str) >= N:
inversion_result.add(token_str)
return inversion_result
else:
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_underscore_N_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" _N Reject if word length is not equal to N
Inversion Idea:
If word is not N characters long, reject
Otherwise, do nothing.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
if enable_regex == True:
return Invertibility.UNINVERTIBLE
else:
try:
N = convert_str_length_to_int(rule[1])
return Invertibility.INVERTIBLE
except BaseException:
return Invertibility.UNINVERTIBLE
inversion_result = InversionResult()
N = convert_str_length_to_int(rule[1])
if enable_regex == False:
if len(token_str) == N:
inversion_result.add(token_str)
return inversion_result
else:
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_bang_X_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" !X - reject the word if it contains character X
Inversion Idea:
reject the word if it contains character X. purge X from list
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
if enable_regex == True:
return Invertibility.UNINVERTIBLE
else:
return Invertibility.INVERTIBLE
inversion_result = InversionResult()
X = rule[1]
if enable_regex == False:
for idx, token in enumerate(token_str):
if X in token.get_value():
purge_set = set(x for x in token.get_value()
if (x != X)) # purge X from set
if purge_set == set():
return inversion_result
else:
token_str[idx].set_value(purge_set)
inversion_result.add(token_str)
return inversion_result
else:
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_bang_question_C_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" !?C - reject the word if it contains a character in class C
Inversion Idea:
reject the word if it contains a character in class C. Purge class C from list
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
if enable_regex == True:
return Invertibility.UNINVERTIBLE
else:
return Invertibility.INVERTIBLE
inversion_result = InversionResult()
C = rule[2]
if enable_regex == False:
for idx, token in enumerate(token_str):
# see invert_at_question_C_command()
if set(token.get_value()).intersection(Dicts.classes[C]):
purge_set = set(x for x in token.get_value()
if (x not in Dicts.classes[C]))
if purge_set == set():
return inversion_result
else:
token_str[idx].set_value(purge_set)
inversion_result.add(token_str)
return inversion_result
else:
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_slash_X_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" /X - reject the word unless it contains character X
Inversion Idea:
If the word contains X, do nothing, else reject. Split into multiple tokenstrings if needed
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
if enable_regex == True:
return Invertibility.UNINVERTIBLE
else:
return Invertibility.INVERTIBLE
inversion_result = InversionResult()
X = rule[1]
if enable_regex == False:
potential_result = InversionResult()
for idx, token in enumerate(token_str):
if X in token.get_value():
if len(token.get_value(
)) == 1: # if the char can only be X, just return itself
inversion_result.add(token_str)
return inversion_result
else: # otherwise return multiple cases, set the char at idx to X.
temp_ts = deepcopy(token_str)
temp_ts.tokens[idx].set_value(X)
potential_result.add(temp_ts)
return potential_result # rejected if empty
else:
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_slash_question_C_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" /?C - reject the word unless it contains a character in class C
Inversion Idea:
If the word contains ?C, do nothing, else reject. Split into multiple tokenstrings if needed
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
if enable_regex == True:
return Invertibility.UNINVERTIBLE
else:
return Invertibility.INVERTIBLE
inversion_result = InversionResult()
C = rule[2]
if enable_regex == False:
potential_result = InversionResult()
for idx, token in enumerate(token_str):
intersect_set = set(token.get_value()).intersection(
Dicts.classes[C])
# if everything at idx is in class C.
if token.get_value().issubset(intersect_set):
if intersect_set:
inversion_result.add(token_str)
return inversion_result
else: # else could be other things, split
if intersect_set:
temp_ts = deepcopy(token_str)
temp_ts.tokens[idx].set_value(intersect_set)
potential_result.add(temp_ts)
return potential_result
else:
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_equal_N_X_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" =NX - reject the word unless character in position N is equal to X
Inversion Idea:
Case by case, count different types of tokens, and split.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
if enable_regex == True:
return Invertibility.UNINVERTIBLE
else:
try:
N = convert_str_length_to_int(rule[1])
return Invertibility.INVERTIBLE
except BaseException:
return Invertibility.UNINVERTIBLE
inversion_result = InversionResult()
N = convert_str_length_to_int(rule[1])
X = rule[2]
if enable_regex == False:
if N >= len(token_str): # too short
return inversion_result
if X in token_str[N].get_value():
token_str[N].set_value(X)
inversion_result.add(token_str)
return inversion_result
else:
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_equal_N_question_C_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" =N?C - reject the word unless character in position N is in class C
Inversion Idea:
Case by case, count different types of tokens, and split.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
if enable_regex == True:
return Invertibility.UNINVERTIBLE
else:
try:
N = convert_str_length_to_int(rule[1])
return Invertibility.INVERTIBLE
except BaseException:
return Invertibility.UNINVERTIBLE
inversion_result = InversionResult()
N = convert_str_length_to_int(rule[1])
C = rule[3]
if enable_regex == False:
if N >= len(token_str):
return inversion_result
intersect_set = set(token_str[N].get_value()).intersection(
Dicts.classes[C]) # see invert_at_question_C_command
if intersect_set: # in class C.
token_str[N].set_value(intersect_set)
inversion_result.add(token_str)
return inversion_result # rejected if empty
else:
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_left_paren_X_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" (X - reject the word unless its first character is X
Inversion Idea:
Unless the first letter of the candidate password is X, the password is rejected.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
if enable_regex == True:
return Invertibility.UNINVERTIBLE
else:
return Invertibility.INVERTIBLE
inversion_result = InversionResult()
X = rule[1]
if enable_regex == False:
if len(token_str) > 0:
token_str[0].set_value(X)
inversion_result.add(token_str)
return inversion_result
else:
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_left_paren_question_C_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" (?C - reject the word unless its first character is in class C
Inversion Idea:
Unless the first letter of the candidate password is X, the password is rejected.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
if enable_regex == True:
return Invertibility.UNINVERTIBLE
else:
return Invertibility.INVERTIBLE
inversion_result = InversionResult()
C = rule[2]
if enable_regex == False:
if len(token_str) > 0:
intersect_set = set(token_str[0].get_value()).intersection(
Dicts.classes[C])
if intersect_set:
token_str[0].set_value(intersect_set)
inversion_result.add(token_str)
return inversion_result
else:
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_right_paren_X_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" )X - reject the word unless its last character is X
Inversion Idea:
Unless the last letter of the candidate password is X, the password is rejected.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
if enable_regex == True:
return Invertibility.UNINVERTIBLE
else:
return Invertibility.INVERTIBLE
inversion_result = InversionResult()
X = rule[1]
if enable_regex == False:
if len(token_str) > 0:
# char the last char
if X in token_str[-1].get_value():
token_str[-1].set_value(X)
inversion_result.add(token_str)
return inversion_result
else:
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_right_paren_question_C_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" )?C - reject the word unless its last character is in class C
Inversion Idea:
Unless the last letter of the candidate password is ?C, the password is rejected.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
if enable_regex == True:
return Invertibility.UNINVERTIBLE
else:
return Invertibility.INVERTIBLE
inversion_result = InversionResult()
C = rule[2]
if enable_regex == False:
if len(token_str) > 0:
# check the last char
intersect_set = set(token_str[-1].get_value()).intersection(
Dicts.classes[C])
if intersect_set:
token_str[-1].set_value(intersect_set)
inversion_result.add(token_str)
return inversion_result
else:
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_percent_N_X_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" %NX - reject the word unless it contains at least N instances of X
Inversion Idea:
if word has less than N inst, rule fails, else return tokenstring
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
if enable_regex == True:
return Invertibility.UNINVERTIBLE
else:
try:
N = convert_str_length_to_int(rule[1])
return Invertibility.INVERTIBLE
except BaseException:
return Invertibility.UNINVERTIBLE
inversion_result = InversionResult()
N = convert_str_length_to_int(rule[1])
X = rule[2]
literal_count = 0
range_count = []
if enable_regex == False:
for idx, token in enumerate(token_str):
if X in token.get_value():
if len(token.get_value()) == 1:
literal_count += 1
else:
range_count.append(idx)
if literal_count >= N:
inversion_result.add(token_str)
return inversion_result
else:
after_lit = N - literal_count
# If there are enough X.
if len(range_count) >= after_lit:
for comb in combinations(range_count, after_lit):
tmp_token_string = deepcopy(token_str)
for v in comb: # set specific position to X
tmp_token_string[v].set_value(X)
inversion_result.add(tmp_token_string)
return inversion_result
else:
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_percent_N_question_C_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" %N?C - reject the word unless it contains at least N characters of class C
Inversion Idea:
if word has less than N inst, rule fails, else return tokenstring
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
if enable_regex == True:
return Invertibility.UNINVERTIBLE
else:
try:
N = convert_str_length_to_int(rule[1])
return Invertibility.INVERTIBLE
except BaseException:
return Invertibility.UNINVERTIBLE
inversion_result = InversionResult()
N = convert_str_length_to_int(rule[1])
C = rule[3]
literal_count = 0
range_count = []
if enable_regex == False:
for idx, token in enumerate(token_str):
# @?C
if set(token.get_value()).intersection(Dicts.classes[C]):
if len(token.get_value()) == 1:
literal_count += 1
else:
range_count.append(idx)
if literal_count >= N:
inversion_result.add(token_str)
return inversion_result
else:
after_lit = N - literal_count
# Should not use to_string, check set.
if len(range_count) >= after_lit:
for comb in combinations(range_count, after_lit):
tmp_token_string = deepcopy(token_str)
for v in comb:
tmp_token_string[v].set_value(
tmp_token_string[v].get_value().intersection(
Dicts.classes[C]))
inversion_result.add(tmp_token_string)
return inversion_result
else:
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_at_X_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" @X - purge all characters X from the word
Inversion Idea:
None
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check:
return Invertibility.UNINVERTIBLEOPTIMIZATBLE
X = rule[1]
set_X = set(X)
if enable_regex == False:
inversion_result = InversionResult()
for idx, token in enumerate(token_str):
# If only contains X, rejected
if token.get_value().issubset(set_X):
return inversion_result
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
else:
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_at_question_C_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" @?C - purge all characters of class C from the word
Inversion Idea:
None
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check:
return Invertibility.UNINVERTIBLEOPTIMIZATBLE
C = rule[2]
class_C = Dicts.classes[C]
if enable_regex == False:
inversion_result = InversionResult()
for idx, token in enumerate(token_str):
# If only contains ?C, rejected
if token.get_value().issubset(class_C):
return inversion_result
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
else:
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_s_X_Y_command(token_str,
rule="sXY",
just_check=False,
enable_regex=False):
""" sXY replace all characters X in the word with Y
Inversion Idea:
If Y presents, replace Y with X and Y.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check:
return Invertibility.INVERTIBLE
inversion_result = InversionResult()
X = rule[1]
Y = rule[2]
if enable_regex == False:
for idx, token in enumerate(token_str):
# X in set and Y not in set, remove X, if empty, reject
if X in token.get_value() and Y not in token.get_value():
minus_X = set(x for x in token.get_value() if (x != X))
if len(minus_X) == 0:
return inversion_result
else:
token_str[idx].set_value(minus_X)
# X not in set and Y in set, add X.
elif X not in token.get_value() and Y in token.get_value():
token_str[idx].set_value(token_str[idx].get_value() |
set(X))
else:
pass
inversion_result.add(token_str)
return inversion_result
else:
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_s_question_C_Y_command(token_str,
rule="s?CY",
just_check=False,
enable_regex=False):
""" s?CY replace all characters of class C in the word with Y
Inversion Idea:
If Y presents, replace Y with ?C and Y.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check:
return Invertibility.INVERTIBLE
inversion_result = InversionResult()
C = rule[2]
Y = rule[3]
if enable_regex == False:
for idx, token in enumerate(token_str):
# full subset, rejected.
# If only X, reject
if token.get_value().issubset(set(
Dicts.classes[C])) and Y not in token.get_value():
return inversion_result
elif Y in token.get_value():
token_str[idx].set_value(token_str[idx].get_value() |
set(Y) | set(Dicts.classes[C]))
else:
token.set_value(token.get_value() - set(Dicts.classes[C]))
inversion_result.add(token_str)
return inversion_result
else:
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
@staticmethod
def invert_e_X_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" eX Lower case the whole line, then upper case the first letter and every letter after a custom separator character: p@ssW0rd-w0rld -> (e-) P@ssw0rd-W0rld
Inversion Idea:
Check to make sure first letter is uppercase as well as every letter after delim.
Make sure all other letters are lowercase.
Put each letter in a set with its upper/lowercase counterpart.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check == True:
if enable_regex == True:
return Invertibility.UNINVERTIBLE
else:
return Invertibility.INVERTIBLE
X = rule[1]
set_X = set(X)
if enable_regex == False:
inversion_result = InversionResult()
if len(token_str) == 0: # Nothing to do
inversion_result.add(token_str)
return inversion_result
# Case "_A/aB/b" * "_A/aB/b" * "_A/aB/b"
# Case1: "_" "Upper" "Any"
# Case2: "Any-_" "_" "Upper"
# Case3: "_" "_" "Upper"
# Case4: "Any-_" "Any-_" "Any"
# First, find all consecutive Xs.
groups = []
group = []
is_consecutive = False
for idx, token in enumerate(token_str):
if X in token.get_value():
group.append((token.get_value(), idx))
else:
if len(group) != 0:
groups.append(group)
group = []
# If the end contains 'X'
if len(group) != 0:
groups.append(group)
group = []
# For each consecutive group, get Combination (AB, AB', A'B, AB)
expanded_sets_for_groups = []
for group in groups:
expanded_sets = []
masks = product((True, False), repeat=len(group))
for mask in masks:
one_expansion = []
for set_v, mask_v in zip(group, mask):
if mask_v == True:
one_expansion.append((set_X, set_v[1]))
else:
if set_v[0] - set_X:
one_expansion.append((set_v[0] - set_X,
set_v[1]))
else:
break
else:
expanded_sets.append(one_expansion)
if len(expanded_sets) != 0:
expanded_sets_for_groups.append(expanded_sets)
# For all group, get Product of all its combinations
for p in product(*expanded_sets_for_groups):
tmp_token_str = deepcopy(token_str)
for l in p:
for v in l:
tmp_token_str[v[1]].set_value(v[0])
prev_X = True # For the first one
# If first is set_X, continued, otherwise upper case
for idx, token in enumerate(tmp_token_str):
if token.get_value() == set_X:
prev_X = True
continue
else:
# Upper
if prev_X == True:
prev_X = False
other_sets = set(x for x in token.get_value().
difference(Dicts.classes['a']))
upper_sets = set(
chain.from_iterable(
(x, x.lower())
for x in token.get_value().intersection(
Dicts.classes['u'])))
if other_sets | upper_sets:
token.set_value(other_sets | upper_sets)
else:
break
# Lower
else:
other_sets = set(x for x in token.get_value().
difference(Dicts.classes['a']))
upper_sets = set(
chain.from_iterable(
(x, x.upper())
for x in token.get_value().intersection(
Dicts.classes['l'])))
if other_sets | upper_sets:
token.set_value(other_sets | upper_sets)
else:
break
else:
inversion_result.add(tmp_token_str)
return inversion_result
else:
inversion_result.set_status(InversionStatus.OUTSCOPE)
return inversion_result
def invert_flag_command(token_str,
rule,
just_check=False,
enable_regex=False):
""" Rejection Flags (-s, -p, -8, -c, ->4, etc.)
Inversion Idea:
Some flags result in a rejection, others have no effect.
Args:
token_str: the tokenstring for rule inversion.
rule: the tokenized transformation.
just_check: If True, only returns the invertibility. No actual inversion.
enable_regex: If enables regex.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
if just_check:
return Invertibility.INVERTIBLE
inversion_result = InversionResult()
if (rule[1] in "ps8"): # -p, -s rejct
return inversion_result
else: # -c, -:, ->N, -<N. Don't do anything
inversion_result.add(token_str)
return inversion_result
def get_inversion_function(transformation):
""" Based on tokenized transformation, get the corresponding inversion function """
corresponding_function = getattr(
Inversion, "invert_{}_command".format(
get_name_of_a_rule(transformation)))
return corresponding_function
def invert_single_transformation(token_strs, transformation,
enable_regex=False):
""" Invert a single transformation
Args:
token_strs: A list a of tokenstrings to be inverted
transformation: The transformation rule
enable_regex: Whether to enable regex operation.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
ret_val = InversionResult()
try:
inversion_function = get_inversion_function(transformation)
for token_str in token_strs:
# invert one transfomration
single_result = inversion_function(
token_str, transformation, enable_regex=enable_regex)
# if out_of_scope, call JtR/HC to handle.
if single_result.get_status() == InversionStatus.OUTSCOPE:
ret_val.set_status(InversionStatus.OUTSCOPE)
return ret_val
# otherwise save inversion result
else:
ret_val += single_result
# if anything goes wrong during inversion, abort
except Exception as e:
ret_val.set_status(InversionStatus.ERROR)
ret_val.set_error_msg(str(e))
finally:
return ret_val
def invert_one_subrule(token_str, subrule, enable_regex=False, skip_index=None):
""" Invert a subrule, which doesn't have any parallelism
Args:
token_strs: A list a of tokenstrings to be inverted
subrule: A rule consists of multiple transformations and has no parallelism.
enable_regex: Whether to enable regex operation.
skip_index: additional information for special cases in JtR.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
memorized_words = set()
result = InversionResult(token_str)
# For each transformation
for i, transformation in enumerate(subrule[::-1]):
# If that place is Q, then memorize the word.
if skip_index != None and (i + skip_index) == len(subrule) - 1:
if transformation[0] == "Q":
# memorize
strings = result.get_all_strings()
memorized_words |= set(strings)
else:
raise Exception("Unknown Subrule Type")
continue
result = invert_single_transformation(result.get_value(),
transformation)
if result.is_normal() != True or result.is_null() == True:
return result
result.memorize(memorized_words)
return result
def invert_one_rule(token_str, one_rule, enable_regex=False, skip_index=None):
""" Invert one rule. A rule is line of transformations in a rule list file.
Args:
token_str: the initial tokenized password.
one_rule: tokenized rule.
enable_regex: Whether to enable regex operation.
skip_index: additional information for special cases in JtR.
Returns:
An instance of InversionResult containing all possible preimages (represented in tokenstrings)
"""
ret_val = InversionResult()
for subrule in one_rule.rules:
result = invert_one_subrule(
deepcopy(token_str), subrule, skip_index, skip_index)
result_status = result.get_status()
# If the inverison goes well
if result_status == InversionStatus.NORMAL:
ret_val += result
# If the rule cannot be inverted or something goes wrong
else:
ret_val.set_status(result_status)
if result.error_msg != "":
ret_val.set_error_msg(result.error_msg)
return ret_val
return ret_val
def check_one_transformation(transformation, enable_regex=False):
inversion_function = get_inversion_function(transformation)
single_invertibility = inversion_function(
None, transformation, just_check=True, enable_regex=enable_regex)
return single_invertibility
def check_is_invertible(one_rule, enable_regex=False):
""" Check the invertibility of a rule.
Args:
enable_regex: Whether to enable regex operation.
Returns:
Invertibility
"""
rule_invertibility = Invertibility.INVERTIBLE
for subrule in one_rule.rules: # each subrule
for transformation in subrule: # each transformation
single_invertibility = check_one_transformation(
transformation, enable_regex)
if single_invertibility < rule_invertibility: # set to lowest possibility
rule_invertibility = single_invertibility
if rule_invertibility == Invertibility.UNINVERTIBLE:
return rule_invertibility
return rule_invertibility
def get_special_invertibility(rulelist, enable_regex=False):
""" check rules and find special invertibility """
if enable_regex == True:
return
#### Check Special Type 1: ends with Q and only have Az,r,d after it, change to invertible ####
for r in rulelist:
# originally Q is rejected
if r.feasibility.is_uninvertible() != True:
continue
is_special = True
# subspecial: Only has one Q, no M,X. What's before Q is just "><dfrA^$"
for subrule in r.rules: #For Each Subrule
sub_rejected = False
q_index = float('inf')
# First round, find Q and MX
for idx, comp in enumerate(subrule[::-1]):
if comp[0] in "Q":
if q_index == float("inf"):
q_index = len(subrule) - idx - 1
else:
sub_rejected = True
break
elif comp[0] in "MX":
# totally not possible
sub_rejected = True
break
else:
if q_index != float("inf"):
# what's after Q should within "><dfrA^$/"
for idx, comp in enumerate(subrule[q_index + 1:]):
if comp[0] in "><dfrA^$/":
continue
else:
sub_rejected = True
break
for transformation in subrule[:q_index]:
# What's Before Q should also be invertible, like xNM
if check_one_transformation(
transformation) != Invertibility.INVERTIBLE:
sub_rejected = True
break
else:
sub_rejected = True
if sub_rejected == True:
is_special = False
break
if is_special == True:
# Change Invertibility too
r.feasibility.set_to_special_memory(q_index)
#### Check Special Type 2: a lot of deletion in the beginning, will affect trie search, mark as uninvertible"""
for r in rulelist:
# If not invertible, forget about it
if r.feasibility.is_invertible() != True:
continue
for subrule in r.rules:
# Build special case
# (count(D0-D6) >= 2 && (count(Deletion) >= 3)
# || (count(D0-D6) >= 2 && (count(l/u/c/C) >= 1)
early_threshold = 6 # [D0 - D_thresh] is considered early
early_factor = 0 # if early deletion >= 2, needs binary search than trie search
total_factor = 0 # total deletion
o_threshold = 2
o_factor = 0
n_threshold = 2
n_factor = 0
shift_cases = False
for transformation in subrule:
if transformation[0] in "D":
N = convert_str_length_to_int(transformation[1])
# If D0 - D6, increase early factor
if N <= early_threshold:
early_factor += 1
total_factor += 1
elif transformation[0] in "[":
early_factor += 1
total_factor += 1
elif transformation[0] in "]":
total_factor += 1
elif transformation[0] in "O":
N = convert_str_length_to_int(transformation[1])
M = convert_str_length_to_int(transformation[2])
if N <= early_threshold:
early_factor += M
total_factor += M
elif transformation[0] in "lucCeE":
shift_cases = True
elif transformation[0] in "o":
N = convert_str_length_to_int(transformation[1])
if N <= o_threshold:
o_factor += 1
elif transformation[0] in ".,":
N = convert_str_length_to_int(transformation[1])
if N <= n_threshold:
n_factor += 1
else:
continue
if early_factor >= 2 and (shift_cases == True or total_factor >= 3):
r.feasibility.set_to_optimizable()
break
elif early_factor + o_factor >= 3:
r.feasibility.set_to_optimizable()
break
elif early_factor + n_factor >= 3:
r.feasibility.set_to_optimizable()
break
else:
pass
return rulelist
| 35.229523 | 166 | 0.537956 | 21,196 | 195,700 | 4.749858 | 0.037224 | 0.069926 | 0.046306 | 0.026272 | 0.838525 | 0.815412 | 0.788991 | 0.771231 | 0.753024 | 0.740708 | 0 | 0.007807 | 0.395258 | 195,700 | 5,554 | 167 | 35.235866 | 0.842887 | 0.259004 | 0 | 0.784759 | 0 | 0 | 0.00464 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.035428 | false | 0.008021 | 0.003342 | 0.001671 | 0.172126 | 0.000334 | 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 |
3b8b8348e3d4e6ac664dd96878ec30881965caf9 | 19,147 | py | Python | happ/tests/api/admin/test_events.py | Mafioso/happ-backend | 3a3a57add4ec55985cc37db79c71430ed78b1ee3 | [
"MIT"
] | 1 | 2017-10-22T06:12:33.000Z | 2017-10-22T06:12:33.000Z | happ/tests/api/admin/test_events.py | Mafioso/happ-backend | 3a3a57add4ec55985cc37db79c71430ed78b1ee3 | [
"MIT"
] | null | null | null | happ/tests/api/admin/test_events.py | Mafioso/happ-backend | 3a3a57add4ec55985cc37db79c71430ed78b1ee3 | [
"MIT"
] | null | null | null | import random
from datetime import datetime, timedelta
from rest_framework import status
from rest_framework.test import APISimpleTestCase
from rest_framework_jwt.settings import api_settings
from happ.utils import date_to_string
from happ.models import User, City, Currency, Event, LogEntry
from happ.factories import (
UserFactory,
CityFactory,
CurrencyFactory,
EventFactory,
EventTimeFactory,
LocalizedFactory,
InterestFactory,
CityInterestsFactory,
)
from happ.tests import *
class Tests(APISimpleTestCase):
def test_get_without_auth(self):
"""
Resourse is not available without authentication
"""
url = prepare_url('admin-events-list')
response = self.client.get(url, format='json')
self.assertEqual(response.status_code, status.HTTP_401_UNAUTHORIZED)
def test_get_with_auth_not_staff(self):
"""
Resourse is not available for non-staff users
"""
u = UserFactory()
u.set_password('123')
u.save()
auth_url = prepare_url('login')
data = {
'username': u.username,
'password': '123'
}
response = self.client.post(auth_url, data=data, format='json')
token = response.data['token']
url = prepare_url('admin-events-list')
self.client.credentials(HTTP_AUTHORIZATION='{} {}'.format(api_settings.JWT_AUTH_HEADER_PREFIX, token))
response = self.client.get(url, format='json')
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
def test_get_with_auth(self):
"""
Resourse is available with authentication only
"""
u = UserFactory(role=User.MODERATOR)
u.set_password('123')
u.save()
auth_url = prepare_url('login')
data = {
'username': u.username,
'password': '123'
}
response = self.client.post(auth_url, data=data, format='json')
token = response.data['token']
url = prepare_url('admin-events-list')
self.client.credentials(HTTP_AUTHORIZATION='{} {}'.format(api_settings.JWT_AUTH_HEADER_PREFIX, token))
response = self.client.get(url, format='json')
self.assertEqual(response.status_code, status.HTTP_200_OK)
def test_filter_event_list(self):
"""
we can use filter event list
"""
c1 = CityFactory()
c2 = CityFactory()
c3 = CityFactory()
i1 = InterestFactory()
i2 = InterestFactory()
i3 = InterestFactory()
for i in range(5):
e = EventFactory(
title='t1{}'.format(i),
description='t1{}_description'.format(i),
votes_num=(5-i),
min_price=i,
max_price=i+10,
city=c1,
interests=[i2, i3],
is_active=True,
status=Event.APPROVED,
datetimes=[EventTimeFactory(
date=(datetime.now()+timedelta(days=i)).date(),
start_time='0{}3000'.format(i),
end_time='0{}3000'.format(i+1),
)]
)
for i in range(4):
e = EventFactory(
title='t2{}'.format(i),
description='t2{}_description'.format(i),
votes_num=(5-i),
min_price=i,
max_price=i+10,
city=c2,
interests=[i1, i2],
is_active=True,
status=Event.APPROVED,
datetimes=[EventTimeFactory(
date=(datetime.now()+timedelta(days=i)).date(),
start_time='1{}3000'.format(i),
end_time='1{}3000'.format(i+1),
)]
)
for i in range(3):
e = EventFactory(
title='t3{}'.format(i),
description='t3{}_description'.format(i),
votes_num=(5-i),
min_price=i,
max_price=i+10,
city=c3,
interests=[i1, i3],
is_active=True,
status=Event.APPROVED,
datetimes=[EventTimeFactory(
date=(datetime.now()+timedelta(days=i)).date(),
start_time='2{}3000'.format(i),
end_time='2{}3000'.format(i+1),
)]
)
u = UserFactory(role=User.ADMINISTRATOR)
u.set_password('123')
u.save()
auth_url = prepare_url('login')
data = {
'username': u.username,
'password': '123'
}
response = self.client.post(auth_url, data=data, format='json')
token = response.data['token']
self.client.credentials(HTTP_AUTHORIZATION='{} {}'.format(api_settings.JWT_AUTH_HEADER_PREFIX, token))
url = prepare_url('admin-events-list')
# start_time
url = prepare_url('admin-events-list', query={'start_time': '033000'})
response = self.client.get(url, format='json')
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.data['count'], 9)
self.assertEqual(response.data['results'][0]['title'], 't32')
self.assertEqual(response.data['results'][1]['title'], 't31')
# end_time
url = prepare_url('admin-events-list', query={'end_time': '033000'})
response = self.client.get(url, format='json')
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.data['count'], 3)
self.assertEqual(response.data['results'][0]['title'], 't12')
self.assertEqual(response.data['results'][1]['title'], 't11')
self.assertEqual(response.data['results'][2]['title'], 't10')
# start_time and end_time
url = prepare_url('admin-events-list', query={'start_time': '033000', 'end_time': '043000'})
response = self.client.get(url, format='json')
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.data['count'], 1)
self.assertEqual(response.data['results'][0]['title'], 't13')
# start_date
url = prepare_url('admin-events-list', query={'start_date': date_to_string((datetime.now()+timedelta(days=3)).date(), settings.DATE_STRING_FIELD_FORMAT)})
response = self.client.get(url, format='json')
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.data['count'], 3)
self.assertEqual(response.data['results'][0]['title'], 't23')
self.assertEqual(response.data['results'][1]['title'], 't14')
self.assertEqual(response.data['results'][2]['title'], 't13')
# end_date
url = prepare_url('admin-events-list', query={'end_date': date_to_string((datetime.now()+timedelta(days=3)).date(), settings.DATE_STRING_FIELD_FORMAT)})
response = self.client.get(url, format='json')
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.data['count'], 11)
self.assertEqual(response.data['results'][0]['title'], 't32')
self.assertEqual(response.data['results'][1]['title'], 't31')
self.assertEqual(response.data['results'][2]['title'], 't30')
self.assertEqual(response.data['results'][3]['title'], 't23')
self.assertEqual(response.data['results'][4]['title'], 't22')
self.assertEqual(response.data['results'][5]['title'], 't21')
self.assertEqual(response.data['results'][6]['title'], 't20')
self.assertEqual(response.data['results'][7]['title'], 't13')
self.assertEqual(response.data['results'][8]['title'], 't12')
self.assertEqual(response.data['results'][9]['title'], 't11')
# start_date and end_date
url = prepare_url('admin-events-list', query={'start_date': date_to_string((datetime.now()+timedelta(days=3)).date(), settings.DATE_STRING_FIELD_FORMAT), 'end_date': date_to_string((datetime.now()+timedelta(days=4)).date(), settings.DATE_STRING_FIELD_FORMAT)})
response = self.client.get(url, format='json')
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.data['count'], 3)
self.assertEqual(response.data['results'][0]['title'], 't23')
self.assertEqual(response.data['results'][1]['title'], 't14')
self.assertEqual(response.data['results'][2]['title'], 't13')
# min_price
url = prepare_url('admin-events-list', query={'min_price': 1})
response = self.client.get(url, format='json')
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.data['count'], 9)
self.assertEqual(response.data['results'][0]['title'], 't32')
self.assertEqual(response.data['results'][1]['title'], 't31')
self.assertEqual(response.data['results'][2]['title'], 't23')
self.assertEqual(response.data['results'][3]['title'], 't22')
self.assertEqual(response.data['results'][4]['title'], 't21')
self.assertEqual(response.data['results'][5]['title'], 't14')
self.assertEqual(response.data['results'][6]['title'], 't13')
self.assertEqual(response.data['results'][7]['title'], 't12')
self.assertEqual(response.data['results'][8]['title'], 't11')
# max_price
url = prepare_url('admin-events-list', query={'max_price': 11})
response = self.client.get(url, format='json')
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.data['count'], 6)
self.assertEqual(response.data['results'][0]['title'], 't31')
self.assertEqual(response.data['results'][1]['title'], 't30')
self.assertEqual(response.data['results'][2]['title'], 't21')
self.assertEqual(response.data['results'][3]['title'], 't20')
self.assertEqual(response.data['results'][4]['title'], 't11')
self.assertEqual(response.data['results'][5]['title'], 't10')
# min_price and max_price
url = prepare_url('admin-events-list', query={'min_price': 1, 'max_price': 11})
response = self.client.get(url, format='json')
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.data['count'], 3)
self.assertEqual(response.data['results'][0]['title'], 't31')
self.assertEqual(response.data['results'][1]['title'], 't21')
self.assertEqual(response.data['results'][2]['title'], 't11')
# city (one city)
url = prepare_url('admin-events-list', query={'city': c1.id})
response = self.client.get(url, format='json')
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.data['count'], 5)
self.assertEqual(response.data['results'][0]['title'], 't14')
self.assertEqual(response.data['results'][1]['title'], 't13')
self.assertEqual(response.data['results'][2]['title'], 't12')
self.assertEqual(response.data['results'][3]['title'], 't11')
self.assertEqual(response.data['results'][4]['title'], 't10')
# several cities
url = prepare_url('admin-events-list', query={'city': [c1.id, c2.id]})
response = self.client.get(url, format='json')
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.data['count'], 9)
self.assertEqual(response.data['results'][0]['title'], 't23')
self.assertEqual(response.data['results'][1]['title'], 't22')
self.assertEqual(response.data['results'][2]['title'], 't21')
self.assertEqual(response.data['results'][3]['title'], 't20')
self.assertEqual(response.data['results'][4]['title'], 't14')
self.assertEqual(response.data['results'][5]['title'], 't13')
self.assertEqual(response.data['results'][6]['title'], 't12')
self.assertEqual(response.data['results'][7]['title'], 't11')
self.assertEqual(response.data['results'][8]['title'], 't10')
# interests (one interest)
url = prepare_url('admin-events-list', query={'interests': i1.id})
response = self.client.get(url, format='json')
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.data['count'], 7)
self.assertEqual(response.data['results'][0]['title'], 't32')
self.assertEqual(response.data['results'][1]['title'], 't31')
self.assertEqual(response.data['results'][2]['title'], 't30')
self.assertEqual(response.data['results'][3]['title'], 't23')
self.assertEqual(response.data['results'][4]['title'], 't22')
self.assertEqual(response.data['results'][5]['title'], 't21')
self.assertEqual(response.data['results'][6]['title'], 't20')
# several interests
url = prepare_url('admin-events-list', query={'interests': [i1.id, i2.id]})
response = self.client.get(url, format='json')
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.data['count'], 12)
self.assertEqual(response.data['results'][0]['title'], 't32')
self.assertEqual(response.data['results'][1]['title'], 't31')
self.assertEqual(response.data['results'][2]['title'], 't30')
self.assertEqual(response.data['results'][3]['title'], 't23')
self.assertEqual(response.data['results'][4]['title'], 't22')
self.assertEqual(response.data['results'][5]['title'], 't21')
self.assertEqual(response.data['results'][6]['title'], 't20')
self.assertEqual(response.data['results'][7]['title'], 't14')
self.assertEqual(response.data['results'][8]['title'], 't13')
self.assertEqual(response.data['results'][9]['title'], 't12')
def test_get_events_for_assigned_city(self):
"""
moderator gets events only for assigned city
"""
c1 = CityFactory()
c2 = CityFactory()
for i in range(5):
e = EventFactory(
title='t1{}'.format(i),
city=c1,
)
for i in range(4):
e = EventFactory(
title='t2{}'.format(i),
city=c2,
)
u = UserFactory(role=User.MODERATOR, assigned_city=c1)
u.set_password('123')
u.save()
auth_url = prepare_url('login')
data = {
'username': u.username,
'password': '123'
}
response = self.client.post(auth_url, data=data, format='json')
token = response.data['token']
self.client.credentials(HTTP_AUTHORIZATION='{} {}'.format(api_settings.JWT_AUTH_HEADER_PREFIX, token))
url = prepare_url('admin-events-list')
response = self.client.get(url, format='json')
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.data['count'], 5)
def test_approve(self):
"""
we can approve event through API
"""
u = UserFactory(role=User.MODERATOR)
u.set_password('123')
u.save()
log_n = LogEntry.objects.count()
auth_url = prepare_url('login')
data = {
'username': u.username,
'password': '123'
}
response = self.client.post(auth_url, data=data, format='json')
token = response.data['token']
e = EventFactory()
url = prepare_url('admin-events-approve', kwargs={'id': str(e.id)})
self.client.credentials(HTTP_AUTHORIZATION='{} {}'.format(api_settings.JWT_AUTH_HEADER_PREFIX, token))
response = self.client.post(url, format='json')
self.assertEqual(response.status_code, status.HTTP_204_NO_CONTENT)
e = Event.objects.get(id=e.id)
self.assertEqual(e.status, Event.APPROVED)
self.assertEqual(LogEntry.objects.count(), log_n+1)
def test_reject(self):
"""
we can reject event through API
"""
u = UserFactory(role=User.MODERATOR)
u.set_password('123')
u.save()
log_n = LogEntry.objects.count()
auth_url = prepare_url('login')
data = {
'username': u.username,
'password': '123'
}
response = self.client.post(auth_url, data=data, format='json')
token = response.data['token']
e = EventFactory()
count = len(e.rejection_reasons)
data = {
'text': 'Disgusting',
}
url = prepare_url('admin-events-reject', kwargs={'id': str(e.id)})
self.client.credentials(HTTP_AUTHORIZATION='{} {}'.format(api_settings.JWT_AUTH_HEADER_PREFIX, token))
response = self.client.post(url, data=data, format='json')
self.assertEqual(response.status_code, status.HTTP_204_NO_CONTENT)
e = Event.objects.get(id=e.id)
self.assertEqual(e.status, Event.REJECTED)
self.assertEqual(len(e.rejection_reasons), count+1)
self.assertEqual(LogEntry.objects.count(), log_n+1)
def test_activate(self):
"""
we can activate event through API
"""
u = UserFactory(role=User.MODERATOR)
u.set_password('123')
u.save()
log_n = LogEntry.objects.count()
auth_url = prepare_url('login')
data = {
'username': u.username,
'password': '123'
}
response = self.client.post(auth_url, data=data, format='json')
token = response.data['token']
i = EventFactory(is_active=False)
url = prepare_url('admin-events-activate', kwargs={'id': str(i.id)})
self.client.credentials(HTTP_AUTHORIZATION='{} {}'.format(api_settings.JWT_AUTH_HEADER_PREFIX, token))
response = self.client.post(url, format='json')
self.assertEqual(response.status_code, status.HTTP_204_NO_CONTENT)
i = Event.objects.get(id=i.id)
self.assertTrue(i.is_active)
self.assertEqual(LogEntry.objects.count(), log_n+1)
def test_deactivate(self):
"""
we can deactivate event through API
"""
u = UserFactory(role=User.MODERATOR)
u.set_password('123')
u.save()
log_n = LogEntry.objects.count()
auth_url = prepare_url('login')
data = {
'username': u.username,
'password': '123'
}
response = self.client.post(auth_url, data=data, format='json')
token = response.data['token']
i = EventFactory(is_active=True)
url = prepare_url('admin-events-deactivate', kwargs={'id': str(i.id)})
self.client.credentials(HTTP_AUTHORIZATION='{} {}'.format(api_settings.JWT_AUTH_HEADER_PREFIX, token))
response = self.client.post(url, format='json')
self.assertEqual(response.status_code, status.HTTP_204_NO_CONTENT)
i = Event.objects.get(id=i.id)
self.assertFalse(i.is_active)
self.assertEqual(LogEntry.objects.count(), log_n+1)
| 42.930493 | 268 | 0.598371 | 2,214 | 19,147 | 5.052394 | 0.082204 | 0.151529 | 0.217951 | 0.205167 | 0.873771 | 0.847667 | 0.847667 | 0.755409 | 0.752011 | 0.736277 | 0 | 0.031565 | 0.238889 | 19,147 | 445 | 269 | 43.026966 | 0.736019 | 0.029091 | 0 | 0.635097 | 0 | 0 | 0.121176 | 0.002395 | 0 | 0 | 0 | 0 | 0.320334 | 1 | 0.02507 | false | 0.044568 | 0.02507 | 0 | 0.052925 | 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 |
8e5c5400b21b1313a2eff5d93a3f3f2d14d4f828 | 59,937 | py | Python | anggaV211.py | Bajingan-Z/TERMUX-STYLE | 22bfbac91bd2399f2219598cd141bcaee7d76074 | [
"Apache-2.0"
] | null | null | null | anggaV211.py | Bajingan-Z/TERMUX-STYLE | 22bfbac91bd2399f2219598cd141bcaee7d76074 | [
"Apache-2.0"
] | null | null | null | anggaV211.py | Bajingan-Z/TERMUX-STYLE | 22bfbac91bd2399f2219598cd141bcaee7d76074 | [
"Apache-2.0"
] | null | null | null | #Encrypted with Crypton
#Created by Angga
import base64
import zlib
exec(zlib.decompress(base64.b32decode("TG3h3y7aaegl0QeZnG6PF2Etm8cKDPdJpXVJrfqz5/TVNkMVIqDKykkQRX62kE22G9PcbBMgtTRCRFIeOBBDsZrXlCGydgAfOaqHweP2EqPVr1Eb+oUJZepIf6FH4Vf7AeYubkDKJ4P87vVKz5pmR3FO9LliLqi3elfKjy/IM99abQeG2VWYnETismGEk3e+/PFiC0on5ul+z3+BYNkRo6IY3lJhY7f36Bw4qD7ukvsQDofody7AZGTHMdED83N8EIu6w6djMqMalbEhfdXxpwBX7QTJro9kqCIvJ5Em3gj7zJj9Ov8gUDy6JjUodZgLAh5vo0VKfFAH7p0SqYhUGqTMzaqWoAJs3SjJOEHyKvYvKXwk4OdqddGbfMVLyOjE26ixiHKS4JzdPa6rZh32vMXKCsKWocdOt4NYbUlvmQTW06t+rd8akqOMi8nwKL8VwnB6N1PL3aFXCWx6y4Ab+33QlvdQUURkgEGZlcP5sk8+MvEzEfalY4JYMSNe6yG1I0d8K8dLYIPOCQYpE+GbSr0JxZSTSe2B2trucCsvv7gmEYsRjmp9mxd4he7MXh4TOtQUtZ5CYx9I8VLYkUJrfubwa82j1rAHlBcVBLpk4o1YmAN3WJDO+06uw+gn53iDEguYRMe6KMIUVh0/NZiusswQ2MOsjWQDHLLbSfGevAE7LwJnsy23mpj2PC9Clyo/fAopG6IHBqCQkDptqZ2tO9SsZX6qN5JNSZuUuSums6wObSw+oovzyh+KYsdx7Cj6VgjC/3wwLYyTQuPfvtjG3Xcd5rmBk7unEN/0ZXy9HGkGkxFctjRuNIaGHmm1GuEZdismAla/NgmiqF/ZpV9uCzDz6hvrjrOKPYLwuXEIyHtB2nFvmEvBfKy//sxCJ6/LipB8TJ3NHhi6YC8Ze6SGtlz7cmBCCBndK7mERw+ekgcdYlTbtVVVdR+t4psAMWFNlHe44Y1Q/Ld4WpubiJDbKJ8kJvHeCedQ3Aue9Kcj6ynmjYciYoWvXDFmcgVBTGi8xKPGIyKCi01+Jt2C1o90neF3EL9n4t274BNG/qTZi7mZYIqWpofKj5QbI42iqv8Do5m+w0hPtX11UIEY6Z+gHbYT6Q6ROO2X+PDDlXS4ZGElvWRKCQ1kiaTlM3me4vxYprXU52xucM3/xN58OCgRaqXTuFO+rWFIGinwNXkEyBnc8izMwPUfs3PNasPsPOoUuEB5BpfWdI83eG4hjwuM63zF3E4rIZ7eIFjOFkVxAlNGxE3af9A2KfWI9kBDMtVqOpjZs4f3qBsJ2ai15pSE+EdxRSjszoHEBX5hI14ERVRWeLgRBjg9AnMs4FSiV9IhaP1D2ehyig4qt20NREjH+v5ItGyH6NwMzgkAWGvOfjHQjUGuu2KGpQJ2EixlvSWpWmXJznmwL+6RoEfMttU+oBhRrV+HeqV8j2jmsbGxD37tMj4Yps0lLJIVO4Ds/7oPVm8eaRbTYFIIJBgJ8CT48Z2SxMHQ+T2vpVSl4l33nRfh2ZXjPd2ir4bgXGckuITtXBx28ERQnGmm0Vv1pyCZqGQDEIyrHZeaYZJRbVeNa3va5x9gdaVSlyFo6vsCqYg1Fsi/4PYDt9gBmV+OesyRGIXT0u0/S1WzNJs0Ia2tif1LQUKlLi8m/VwboGDNqoK3IaGIraFg7MOljVDHfk9nx+2M5tddAoDzUe1TeC4RkDbm8cb9BDwqoYw5MIrdKrNRSEDuUoJugHdsOiYalDl5KHsnfLtFZDmECAkRfJsvjyYeIHtkJ4jtHp9ZU74HK3SWCdHxuQcfDjck2mjddXySGJEIY+3k47rTwavQ2vEkE6cQr4fOy3QX+NB/julCU+aOiBqPSYNbtjEYGVKpZXYgne6cxzVvmbsXs/olJnLfzRoGxkMcPjONZaano/rYZxwkrETp/0NjTtvJ4XmOY+umYDYgPgtS/hwws5SKkMkBHeUJ8DODwa0g+SpPIX4AsiaH41hK2gHQyjvAmyWVARDmrzV+cIozP2StbAITMAnJOBUiRntloM2435CNTccwx22sC5zcT8/w9ekJSdePK77ghS6hfwlbfuMKrgqY2evum2e/FjUgAAWRtxAC4DNjMHSTENgWswghlrNzJGIkAT8QlcMjqPVJS6mYeUwL10hgPAfMsTJhklSsAgrbpSktsLfBUhoX+P1y/hd6wEx7NpGRTW8WDyZ4V0IwF9+tIiq0seJhc6wOpuCNh0owUYm9amLwxAo+QWdSUVFRyGsIL/jYUo37gDBTX8WrW/Nqq3LHAcFoxg54rAB7UxJ70FIxGndjgXirsQf9wJA13RqSxBwoLWwqzUmqgxf8dVn1PQnPip+7UeqcKOYrK5Knl93jgb0M2pxCPtOy5CqeCvX9xJbZ+hwFG+xAZYAUwce3hi0L0JfHVWTr8zAHYU5ijVH0ug1fJ8Un5tfCanP8i9jFkVNFNMcs+8i/OUldDwlgSjmxlx8B1sVefOsjxDD8Mu6imq+G2sSq3eMQG7BzqHVA+nXdZLmIUEAnO8gsoLskms3P5tG4JBIraIfvhsB6WOQs1pIaXDURA6mYVjNb9Nut0HupVCEfQVwJ+4nVTxPxtCQDcZoo/1WF2CPUQdSw7CjBdIM2TQWxrJh/agLzIRMVvJdsIxV5LfpnDDpJiAS/ymmNT1Z9C8TUi+dVIfOp3ibJ0e32jqYQeommxzN64AMXdqV+6bCxOxBv5dmO9Sf7kcOU1zVvC3McstGocXlkJZ5FD5lbndd4TzH/tKNSwNUCBtv38DLNRHwSqMwFAsSflJ6oOJ+Vm2tto+bwJPslCbJhmJaKMHd22PJgQSgEwSvNR7c4G6xl+6Tks3yzM6+z/sEWjFmYvKTAwIN5lrIw9rm7RuxGFvRPEdJoE9rb4j0g7npyAYF4q7EH/cCQNd0aksQcKC1sKs1JqoMX/HVZ9T0Jz4qf/HFg5yZBNbKFgeCPwnSjGWvIvw1xFFsO+d05cses/1khc5AWSEENZ4cg0mXtUp2ZV4SNMXQyBDnSvCTTNA812BtiVluPYoCm0toVHwDoc8R9DFcZ6GQeZE/pVOj3ezJddmXyJ840bLs+mi/liQICQBa9B3Ji1KskA6CmT3Om53h8YIgV2kuxaG97oAa5lEErovz3ATTIQRnkna+uon9Y15F32luy3VUcoayixJzR6SdWL3XuSLnOZWt7QTKJcNtfLDMGwQYgJ6vaKDtkVsOe6NiWGFP5yVW0YVuxi1vTWAsYybguLmntqpYpKCTTb/4g7HaFl/iuILKau244ah33kpPef23JH73vR/TGoeE6TE3rIkP1uBl5udXFHgvXNB4ljsVyeZV6crGEUCt5w9AQfhxzcy1sIKd0lOEl1f+KfBsHPxl6b+pfcKjLAU4HBSSVFGeULcyj9XoI7pudg/Ee+dWv29glEFI3ko469hiL9vamwe9mbvmZt3rpB1rH8lwCMQfSLI5uQAAbCbH14a2F2jy/dJxo1QqVDdfUa2qkSYID5TjatBJ6OKIqH7pIDwq8DWLHAxnPmFSMQaFLTqmoV4VNNKFbj/9ol6JRELp1YvLU8eAxAt4ABDjoskNvS51FLNIjDWuKJGhlzqQevmECxsBK+lCmPG540kGW175GYg6fWm4TYAJTc5UCP9g2zC6pSvnLidVhhhV8rIWyvukyCW/rDD/TALWFL3/EJA1BYDes4Kr10hqgi1AnSUAXshKptfUQZSknEkhrjY9YrwOoh/8WE5uy+g7eKGhBxYQOLMgdnuFAxA8vNIjIyjSWmY1tEKVnYEZe+4eFRMb5aE1HxV4pLhHihJMIuz/Kz95iYr5p/Emd8A7rGd5JXav+Z3YLwHCKXmyDuSmkaJlZrhqWSosvujSqr/ouxaxpxzgR+X2PgT1FJ31/oxs46NZhvqqdcgpuFB+iFKwqk+h81J345GvgQ6Z3PSQ6Dko4qbKDDV6zrgBY7P9W+wnnBjO8Q47Nk5KE8olDJItAJTQ6CLdGIAeOuP2kA4w+QYmZi8c00T6CHhwHDkFDu6GSub1hTOUgCoKBBOBaqxONGfFYO5sdki/TNCKiLI42AukR9Zzppb6AuGg0DN43sFGxt0VzCrTn5Jl6yCpbxvAybgduyGd0CbpR2VKp8CZXgRnKXgFsmCSsJPytzNX4ssCX7JVHzf963sKFTTOnRGUPXQtqWJgKmcwzJXYzLMWbQ1gSYsdDrBBDvtlorB/iElX2eBztTQ0sZ5dZXg3q+HfOCCnVzx1JQ3RxHZTh7T1usPw+P6qKjU+b/7NkJGveWwR0ohRXx7BKjoM2+Wlsroehn/7uAuihWObiPCxmuZ6nUhfMM+yjpB+oBgB5f5X5nkdLgF5L2005U9i4zdOzu+N4x935LMsazmlKwKbZUFlc/74Ff9b7N0e3OAaw3NOkBub2OfKsAfkwuP9rjPQYKVq3UMGpDksCEU82Jb5rIxpxpY0geQbGXAZ5c1tdJqsB0aKvB5ov299apRgYTKGKox+OL+Sa5GDEIG8LdYequ/LzGrbICL4S8i4N0q7FqXb2Dq0atmmDP57/qFvT8aPtTDrpwcazx1lDyuhvx82MyODx3irqrECw45nirebnhizu2fZ02EYtx5MQD4f32mSKDVWCY+d8md9KSuirmBDStbdvR4Yu3gdxELrBV+V5yd2nMJUNUeizOHSKp3KrZDzx2Q/j2wi9y1lqNES5NbrWRZAn8u1K3zTClsAk/Yce9A7FQiBfwY5yrOHIgMfSYf3bgIJYtjuYLXX5toMEhLfni9mvJ3CjbZ1YDfNAJ0pfvXYhALYbAcFtbexsF2IPS7Pfj5Q7Z1SDPtb2aC+iz1LAhQqZ6DpFinYrKuRVAgUYYxGns2RuRqDNYgLSVJ8LuBGAaKbyKXrLX5kUU6xIxS3ptZEDgONLiJofHrpU2Tr+82U/olaXRsUW0wdhh1mCYIqcVw3hhfLDyxb8nEoAsC/qKSEP5vFxpbROex8/5F9QJ5dk5JizFuGzoi84C/kmipsBqk3Grttl3U/J+tXg6JGfWX9VIAozKmE63pr9NtU+Ae8DT2BmNKh7NyW7GHtOAc2D3yRKHcQW7PT/7m8KwAzvpRRmD0B9wnFkmx0hn38JVksah2gtPxTwjEogcvv9MM2PGYBW5/TF93JpUJujeSEP2ruZjF/dCx7imc81yqu67NJz2oS0RVVbhpVAkZzGZhaJqZrIXGbX4hTS7clW7rEAHXoigwZGtPJT5LZBLLPh1hbAW1r2fnWPPDoFd27Pf4z6PU8KIN3+3A7wuUr1Cy7n4jREJjnsiUsyMQSkpqMDJWj3NkNXl2whNV6ToryFUnSdIVbB9B83Hj4mMN5OQV3KgfIVoInhfy7fS3xJqBUbitlhmNnWpQTWYST/js+gwCAW+/PNVB2FOcxnrvNp7w6oQ7Y6vX6B/d3VzDaMRhl3G2Jl1rlR9aSq+K1KG/+CmiJdPawb2dDlklGIW4s0zubPzHwAQs3d4Ug7/rOQ4eIZoRctW0F1oPcKXf00n/dWbzQXKbj0NzZ0KAEZ6D5cuqhAOw3a9qd8leccWHJjM5uc1SQa0xV41GB73YCnx5KYVl92fVtftC4ZIvqiCSeAQGkIi3d72/Tj/g47B+Y4u78UBKk9PYC6WD2mqBfx58aNFabubabVJxnqPClF87EBaGlrOCQjgKvFFFvj/bStGty//zUBEnl5oPEqiNFNwtkRq8mKY+V24z59SccEtQeNBMeWvg/VVrDEw3+0q2Q3GQQtOd2pb1t6Udd+Opr3vQTSQn+/y+IevRluOpuJCNA/Fl2QEs15kOHnU1GG6dLVD/l8RBloh4zgjD/trloWnPnYjweDT8Il4ZGw8es/gY/Cj3HbKdJNSU3hmt9yBT2RW/Aikzk7QA0nALE/BykWjkZTVg5flLckRLVB/o2JFjGaX70XR0CVrAfzMS5CnApOg5B8SupvzmaMWl0rRFKvV55m2TTaNjL5TA4kdnu+SvGqSYiwnlZ+WShd6C/gcZta0dtdFw6aj9Ia9iJteGDzavDLa/CF48DY5z6TyVES5Hu2E0hq8uvBIBMPZSDXW5vsITRgriVipN+kupImCk+yXnYeLWcrqXcY06kWUnssZ4rp3k8iA0CBiJ8S0hlFl3n5jZvQKpQvz2LZ3EsogLeQbS5A8fq6jHNdLaT8ZlsdxNW0MIk4GkSuTTy+Y6syzRPSWL4A4PhyaPd7yzuQ1/s1TC5pIfXkm0GNRrvEuBM426Pr7RWyC8Y1MjvcThlETmI+9i3R/LYOjrjBWR7r8OO1RNPtPT6LaqFEhvmZopb0SgxuCUEtw4FPOW4YTQf7pR3hxkI+HlT5aXQAnK0udeLNgD/16ZZe9xOLt5JCdbWVMZUmB7D+EmwxtSnzrdwSUktqdCPL7nhZu9s3zAoPTdV+TiIt5IE4M9dKz4xibuMrHI2SO49mNJlVZpENxBCsZhXRhm4/jT8Ur/fsA32kNXqP1keDfvp5CYebB+MlHlHnd93ZqEaK1ynO7G3oH/+U5hlF6nx82t/ZM4XYSFuPsS+rol6vzqnLYfoVvrgMVoUt9c37qDHXrkT5mT2tZfC3IF++RW/A9935d+F7CuEDtJqfFEex78W1us3oOJo2cbszRJJlXXLyGhjGqt+onxXBjMsZO8BKNedlE3QYNHLbfNkSzfaeo4FSuCwKl3pqglZdfOD9gBoPSlWbhF6+dfbjHI4cOFKEx5JbXK0iQMOPhF0Zj2a6uvKo9hoNuyCegGB7bN0EvMCXx7iVfKmwm5i8tEdfE79/u0rRNfYkzb4I2mJBavXYS95zFv6OLPjBZIjYCiZsgGqIvVGnh56+L6VjOjHC3WhDEIZMbDNxuLVlz6BFK5kuOxVxHNmH5aR/FkHwYm/zwNcEpY38o/PDZ33a7OqgrSZr+cJAdYKOcqf/L096UgKeEhTaSBaAIyaJRjrkauU5ELNxoSQ34juAu86ttgxhF8KgO/tukbUQ3T9RKTg2AOnyaOMEB8j67Vs1xRp3CR95OGGB/YRMfiKMRQbCH+09cIzdC0glkBszq5N1kd9OX9PEpWhrR5DdpJpbvO50dFfVmjkNHKsRz30kvV06ywoTAtGgd5rkKtxlVZrQuecnYe+mY8osafd2tn+BIrecTQpleHAajCvo3WMfNFt2jQj75uhZthoKkSKUEaL8aGBWkbBEYQiFtRd12gLCapdHCUZYO7bc8PQIyR38VCKaoSBIMN8z5NWMFyu7S01G62yTUdMSX++sU2GUCMCHB0p+DD9CrvUQJzln+S0VR/Uk3qF7AQwrHpjqquPzpai+r0tl2czS3g3Cjydzdq6QyIK//VaIEu/8aeV/Ca6JbYyCzXaleXdlqR1aOiZloeicEZcpyw0b1kf3103pRU7PehSflR5aPqHeyvrUxLC/N7VBgbCL2LQGa6sUKIy2RzrVerqppwMuXQcf6dJmg9ZV8ZRiLelkYPRHi2aTk8xtMnQ+P+rB4YV/6KRPVyUM3iodOdUTXu+1QntqY7+g9MMNmNw+8mpngAmYesMFd7KlHfCiH+vziYjQwdFBP0XwWKRqPrh6JV/WGBEMHANvwRSyEzU+RA5Dj6+Lt8hkd5Lx2OwsuYbJ+f/0xgE7IusgUnB6RuM3dME5iMQyqsQ5L8boeofiiLaia9gb4zGEIscBebHDSlV4CmmxNhwmdE/vbnG/5kutuLtH9alWMt9blPyrkPI3XkPFnq6/bOQwKC1X6tU1m04hHZfjLaCSZSblYuys0BHbvat/NytyNF3bnVXxECi1mXMocKkxWHgFKch55szlLRg+NjJEJa4xNI7TEFCLZQJ58/2rV1gYgEzxknOKo25ae6WmDDBeI7uPaoo8ggXRQKvBtq/bu9HfO7HucGnpmekRv/0ZEzaN3bmZPMwwlpXzJR/Z/HWR1kwrTzntcMYgGxQ5HvlMTG8BMbt68rmqOpdkuGyul30+BUMC/VDi0Of4awLZIZe+jkgHzDBVg+HdZ8JowVbPmaJ7A+pv/xQt/uLucSHwxBcF+H/OLS35pZ0/DgBWis/yeqGhHnOsN97bG0NhBCfkDMC/+mfmqMSizd0D7gH/xyX1VYWDDEXLdfAuagU8HF+xXWqTZ+b5fOEEOE7FxUAn6wzm2UPFOZyi4KgnT5GCDmHzUFlHmekUHPs+QYIZA/GZp8gSM9Xg72JcLeLyP69ohFBDS/UOqHpshyL65wes/dhCJQu8pRCB04YC8pgP2YhdOsFE0OqBYYz7JkBx7yepQIVXJ+2HYQKURWtV6h3IritnA7UFeZGQn6OvRef8BolOoHSrbZjGOm1fOBcum3uI1SzOb1ZjgEakHg3n53DN7bmx/l6JAcCx04Mqrpx0SGDZyE6QxiVwnzC3kRgClcsrmb5lpk/XOh9slHGeMAl0C5b9aK/0h1uXJ7JouETjU9PQ2RIOMdUSgvRei3AdUUl+N1JEtXBPS+dZbNRJTI+72AQ35bYjSMMQ5Il2QwXYEylrq5vnMHJrfAR12+KSN6aD2udUuZENcw/c6uL+hU3gy0wINcvvZK+Syi5iyrb1063M29W8Yu8udYrRcmwgLQYoe6BjWVGJgbUJt4MOWJ/FAPbLu42nrQ/wJhEpCFm7AMKmvHkm0OVqnfDLQzabwFFfvCnAatSAjPTpqs13sBBlagllHluRUvoxtWVnZVw5wz4cOOOb2ge9xUIEkPO/Fg44B7TPxmfez1GD+TwFQgrsu1rO692nfXuIBiJLj93errxKTUBMujq+7aXRz73Vil8q3/sb6LrAknNQMgJrvWwlxOIyG6KAa0xA4lMjtyQYPEbBRpvyoXXFTNgJJwOCYD6RdIFGxeVEBlbXLbmFm7MXBoJU0/XKjZ4G0qxUCZGvDNXDF5kNdIASFWOh9zdpRQGiwx1RNWazwFGUVbllXM4/hoS22evLmS185+OJKcZJlwuo1MN/A8r6h5MN/JCbxcdfwwZKr/PQOtCDDIfURVOU03qLO9LVY3rf8ELYVj4eQnmFG3bcsAYpitaqfNWVvIUfSE2n3bfAtTndDKtiKuEQHV06Ar4i34f+PR6tv7lRIUuVrTeA5ba+KZhvquMKCJWRDjAtJP7X/lOLgWCnbpVWgktgXB60gjrhKvxsJCK8Sqwt+AwQLKWsuvMrNC68WjUca1Z61/7Ml1fhckVinsHLHdXoK+o/t0cTe8OqzXnJ02w3sh9bDXBj6hcgzCOwmo7SsZPmNVHT358C2S2EWGbnW8L1W8Um6ES+NClHJstu/eGKqH80B9XwoB+uRXhiRBDD11874fQehn0FV2w/1XW8iY27RyxSwFVdK0BZiU74PWqavFAow3CP1iQKinWHKNKIUM4BV6+YSPZg8Nz0vznLA0YBaBAr9lfbeyMyTLEquzekGkBCKGyqjJI9+20FlHVz9Hp+c98mMa5LaUIPr/OlMm5wRtcaJ6Otv8Zi/ajJGSQM05PDJMe6BhufPdS2yUQqEPcwXoXgQtm9Za0vcj0C/97dRGL48HfVt501Y/EFwtozc8xFL2eBb1Zn51xEM87KfVeE2+vjKDCIyI4RMGYd84qD9k/t+AlAnwX/GphHBSR1sDTW1rH3H11beg7GtYc3aqj4Y+xfEjD7uuZnd12xBGOdn2EVDeoDrZWbyN/rHnYu1z66BvZnlsMzKqHRveSkP7D19AC+D08oqQvCUZVj4QEr3HrrlKk1RfQuIwR4RN2PCdL+Zsc+9yMmhXMfwWVYFVgyGD5PnedrxJ4Tn/dWbzQXKbj0NzZ0KAEZ6D5cuqhAOw3a9qd8leccWHJ1V8m2HMQNYYgP6rJ8Iu9D2n/pN/Ezkql9FEdWrLVTviNwYZ0/kv01TXKaMF1nu+yqx5oNAibAZRClSMCiDBR0Mlhs8bDFA+ZcBsMG18yMcy86VF0mb48CRFzjU9MsfXlYJhCZN15p2QcremHKwhLAMokbtVRzoL6bwssdECwdkwUlMC5RRAYtVFH55b8GzuLWXmrA966PoW+WfaHIMsS12ozdquVjFtaBZiB3rO7iMucxHSw8gX7tc2vRz7MI/oxWtNtEloGavXgGCJUP5tdj4aK4+rO/pOQ8pmklRqymueyE5HionDVasW9o9AKSbv/4cAI36R5JRNiJFZ49wni+gdP4gYSRPQIWjdouEBu+C8ve3SyONp/XP+ojuzDJ2QZ33+JtfpoYz8usBpQKa4Kj0GnSrSg48gz106yqGuc3ukNM6tj8FrI4mbp9tdqIDLQtUBOMshAOVSzSrFhv+OyoXJJINQg4edw+oG72dj6VI92wkxwtJrSmThXBGfDASG7IrG+QAKuznewI/VSp3m7p4ucWEQgA2dNWB9M9YI3OONPgE9R3b74DIfrNZxjVFgMuQjIuMJQ3LjkTKsChexlhzsBpbdkY0fB+gQ7ZD6ieWcANqB1/KKCuZ5vnvYiiohCyW6+RvfmvNTcoyjNTPVayjN6ZaqC+mg0OzZnf3xuVYmqXe98F3ROEF4yn7QP4SiTKAbBKPj/7lKLXZx5IQH66Ia0pFLuU8lP8b7dwfVCcnw5oaqf4zHzJTGERBLiS0hHao0Xqf+C5H0csk45e9UZ73wJHn/UXkemUiNOuX70Pi3oEnPkAMdKEuM0Zpp3VjVGGkCVwu2WTzRb7xr+Z9ZGEVddEEpS/Rtox2KZ3nub7HcpprAxEbxZ/EMQi6T/CfbA+mlK30WvnrWu58rfUkPpfyJ1aLn0LbKfM97f/lEwrKnw8nAr4nl6kOEcjUxumnL9V8450gwKz0moW9xhVi22gQe3V2SA8Wv8wnwhopixnPgAmZkgZbaSAKSb5orcZ9BGafYwiOshFdOvWOp0gpOY4OjE4831OBIzgwuX2lOdsJfRE/6FDnLp99KVmO6JHPfK8JGmrELrlbNavDYYVJq51MYh5SL78hz3Rdc5jrMN42+JO+iP5w1F0TUWknz8oP440TOXWk15cVD4cgxruxWW+DfqBcVHOE+IEi6ysUhyzQm2yXiM2msG1YdLiZFwH0wWH7npkSHzVpLXN0oAlpsokqtH6blbKnUFpJN29h3/9TznIvHaNpsuMGqZn7VN7Hx82ObjmKPsnwBq+cYTIEja8h3nlPPpGQG7cu1AigsZz6tqHWxU1nx5jxLXc0aKPjNT8oSKSlZP+geyFC/vWz22iHlQ79HVlPLq3rR5SScJriqJJbhr4Fln05cpNpdRmMAOtIq3uGKDTT7ljeKLBlSvAS+6hq/877Pj3GdVbw5eGELafuqwaf2vOwcL7CqZAFWlniy2aDMgX+Ni7/5OQ+oOrkgG1agShuDNkv1mtN+Z6fBEKXpj3DVzuCwA+QKojkBlybDGxM+qQmIWN2BftjxRI6sLdFg8ru5arc38Ow/UvzgUMoZEE5z/OFwCsxgAZAwSO+A9O5ZxGz7YORpsDoBC+cTZgmscASOWAuM5FuAwyArMI90zvnkF1saEbn5xwcW+/Wc+vn+DOnt0qfzUrbitbhC9xVxO829lrVtC/OJTp53NlTpvgKOrh89SHhjQ8NTbhK/Z/Slhv+71feef1m6TegEvqvrnZEHKQvYXsXyNxXeTGJEcLWP5D2Kltkq0et2oU0dRVC4aVPR0r2ydsbregRsl1/C1ZgKO6QXhblr9u6svO02iOhLCp3jqW7UAY906lHT+ZHaiFdb1rY1ZLY3VK0WufEyOoPK3MMbGQQRkhdX1kqN3o1TXxD3hIr3uT4HlNWiEfvL8vnUh0jo8SR4pm2mo7+S2idm1AaHFtrZdiHl3lyiNjqLeoAvv8cxb85Bg3fc9TvvNFFfBDM8zv7MmlU5ApuKDlHA+uFKsp/DvrN5Li01+u/hAi7nSaGcetrZvNcXPUmN9QbRT3Qp1fQn8yoDlSFLjTXGbGMXsZjGEoGADaTPA2KVTlkjZndSjV8tP9JqRjM7P3arbLsK9StaYnLP7Y7HWeMdRQ1wgyuoHKwT0Sw5OHulnu5tiYh/hLGbyA5RjoEJPrjuE8gbkekKsmXy4qwR5KIHMXzacSL+r1NvnM8jx9jMsWqFW0x1X9Xq2egpqnkCaQWZJUfnOgr7Pu+ioVv6Mb2cPxftiJ1GBoeKGm7AmbBhzPwwAnKlpsispZCMvakdThEL47/Tg8uL2Gh8loPGZe5M0xhMug7XRbWoVFaZCcwgxXqt1VyPH2iNEDArzxWfBe5j8IsCW9uIdnd6LW60L3/RjRhYHBdPVKKzTYw37kp/uLI2n50/FPL4W668HctmOWltVVmoZTRzZDU2vhD06wYOn7iM1DzuGYQSifqLljBpWQk5qCUHRKBybyo6uWUrxAoSY4OPAn7cYOgwwBolveL+as1x/PoUt3ErEYOXdzHcAye6mlFCMPJAKFEOqh6RRhOtpTV9vDn4u6NKcj39KNzk08yV8C3ewqXLwEpwD2xKIrmwf0eqlJGwpFfrr/4DOC3o0KQ8Lu89hz8ohJTL142HMvJnkLngRSGcDPM6xSdoHmXpGKiNPOGkzT0KDzVPboyiYA+yeYxvqYduET6sJWNEUO+YWqt2+m8m3tevAVQTxpFatq+B10Zl/Bi3494HuHEfwBn0VaqpMOKnJIYDLYHBF/45f9gVjdBxdesuMEXbOCAlqhk3ZMN2ezaziC5zLeTzWyBL98d15ue3ziXolLyNMN5AaeKXtF7KZS7t4lTN95R7F/5klpy5DKLVxJHJoeZPDOvE+c9S3jiDxEe6Q5mRs9Et+vDIihs2Br9KgOM/UjUPKe0H1GxJJXRZz5Btxkqqw4TFWo+alB7y0iXwGwpldW5YS6lPtPyKbXtZITVhUcJRioex7xkNXP1rtVa1tzV4Ht0vTAG7GmdtDZPTONp1kxG3GmSAdYFGM85SzVHKiVIIV8dUXgOIrJNM83dCdPrslqokQW2CPWYQGkNZAmH9VvhIDGj1t3t9Ms6EMryGIPWY/Vu9QlCJYFCKp5C6keFzf0nHlFOgkzX2DiZmEl/pS87vKeKkyjXOmizQpMzwYXxG13+hlde4mJuK8tyAc7dQJ3xEhj9F3S7qzSo9VhA7WMj3XAEz8XAvwNn/ZhQmqc6Tci4OssEsTZJqksyJOBflXmyFIr7wskJWH3N8P3m7L6sRuD+9ghPv3EL5gVeXiwT8ngmwtd7+2q9r9+c58zblSS/Juu0hnu7clPjGyzO1mwyRB/Q2Czg4Gn71ThApLt6UFljYPZntiUKE1qyMci1wPsID/545czvvyjuove8NNv4v+0b3I7kxhKnFtOnjsgBTy9tyOgT4dxh7SpcafVpNC8uu19NWXTjEG0611y8nhBfjI1fVYh3+BIqLsuthMgRUItMSjsPz7IqbcRjJCyZeZEgN05tMk2+01n4IopJc/DNwI25ZbXNKXM9Rxl8OP5ew/JzI5LHJgSjB4KA745A5nsbHHJjui/DC7naBvJh05Ufs/4AFYGBU0Upw3+UYcQPrPn6ub0fNBpNmacF5n+P7JcmgThPSkTccM2dlmZ7xM7RHR4I7Ng0YEqGHAc9IBLngBiwMgVVyUlppmJuPpnyq4K2k47csKGb7yNcFiMpZuvSVUbc1GtRoVc4P6DntF7A1EFCylNmX8fyAtSdl+lXbD7i2OIVM2HxfiQGMk80fEo4tnRPsXOqowljMGnhElXuqqLTPPrjGerjoUvoB2k6nXEZRDCbzBSoygC7DEv9UhwRSvemH/UNH1Toswv+LfkyO+w7ra9S5hIGyErBB0y6eVDWIRTAdOJt0+smlHY/AYrPo3K90AfIhaILf4DfS5/t5qUBpGHHoUkd3QS5Sj2Iv60ZksjOTqQBAnNbzIF6+vS0b/W5D/lQm6tbqgd0kq9YXvG6y8lqXyrB60rrDqilEZc3dHJ8rOaSE1DS65irNx2pNmYK1Htj9F/UVxz0XxSvMF0u8tzySu7dHtbi+bqkSwhaurxNq4cH5qL5SaZ/GpCNwmDKodKasI0pxAPBYqeveqtf9T5yfpwbZtzMFvNguPdL3+x8PKy75X4mD7u0bmLbw2RIj9HwyRW+sXPmUiPkELT27uS/I51esSlqI74Bb70wUW9GYVhXRveCL1ylyRLVtGUl002JMemA2CGHJQFSvjI94f7v3aG8l3yffuqDrqq0n5lMOlj83zDfQKgOtnPzst8eneqbiFonzPQU6r80mtGuBje+J85/nDQeb0KEcGPF7cG0OSmi2M6P89j/cGHTfnTSNxoG/rQTjHgepRNO5eJzI9GvksmKyc021KkA25WNMkprLnj+bCn8ryboAMWpV0baVjbvYW5TQ4B+T4rxON9nsh2SA/5bdSjYrXW8RvIFJLqZLl3imgAT2WJHTW0EW7pqwa20gK+ccmtIGlOgBzfCq8VzIlcY5MEM1n372DNzhdI+kyGVLD9zFc9mlO36K03Ri4dBfbhXcxEiWF7CCwhbdLmKUj+tw9O5kRfQs2xHWXhPBkeG/h5ry2OvGtqCHhPQ2v+cuvtpKpkBcm4+KCJzrBLgBfFZdzJt+fCh26jnT6BOXpWBStQgQhhAefl7r/Si8M9B3KhG41eRCXYeCTiX2/TS4FTc7GMtZ1h8GNsZ/P9yELTrdwnhJmEhB6CM3nDTjjafGdkIjB43N9eaSE9xmE68ombV+oLjKGZOkvsFqtpDeHgrbC6dRz88AH6rCZ50IQD7o2x+j3mIZP0xpmW/K6bKA+e2lyBIN3++9SxgAStyeARxAi6MhYDs7nP8NBGflKCqGgv0TzBXm0phAUdX34jtAFAKTTXdqsn1Sy8YA3Nvg0CsEyZaiTo29J489OBDutPI8OCfpy1h7HCUq/DoL3IyZtX9myuaORYXacw+aeBFKAzIE1w80Sm3bbVKs8B+u5ErZh/ik1sOaISpYmVqHMJW5Q45s4/2BIBSebsak2uzbg0X7OsBMxfptl02p1NXV2Cnm7e77PzM7pcNtscB+tyoxPzqHhXvfDQPh2aZ9euxP12rWRgDZwVkQfPiPjmi+PJQsOg5FwdWxz8waz1yQw4DAtu2g2m10We+7DUMS/MTbttBSoC0xi+wK5TqT+rA0WsluTJ6WJ2sel+JG63tw1IUbdjwrriBwTcjObaX511SN/v+XyP5tsJBLZqGGNkr3ch0oqFIJi4e9+4cZkgbeqOqHjivS8+Lw+tMvKPRnUDJSZcUAOCPtuxc3mmYDRd9RLeVF1OpBhzfruKF5VSaNnndCWVQVtNB0JacWWKT1YBnuA9vFjgt8XtQPdwafetEkHMt22ifwoOgLJAce52ZelKWty1j0SmEHp7tWyySTz3s+tSedBUNmoMJ9FjwIw3U6qApHc+CgQp19FeP2hrAqd1Dg8qTa5tSgDBFrELTJN0cPEAuLzh1gQqDxJ4CEhIl+YlZKIgEdmv2Nq8sLnr/+5vOBYbYI6e8fAK9ioB1iNGuUBWi/X4VgtQ6OQU8A4eNkSpSnpm/H+ly89RlV1zrwuUmCMkHtSdsscPiox2DX+SCGVVd//oAv8m+0AmBAJXCd5tKTDJ5dGzPdlWJIUT19lC6HANqXa83f8Vi6CTYfK3vF7oyJFK8iiBLRvFDmOVP28HP5MZSEZdTIx4Mde82pZN5pJJT2/Ve0QKrSSAlzhbvbRWfDQPdliLZ9xRYKunstInFbT5KH2kf0uFhTj3sFRXMUmslNW3hcBC5WmjC6qOHkFMjv6/rGaJzxXNKC9DKFPdSAWjM2LEkFQJpGD48dq2OCmuWxaAgVnKVNWN2v6lRRTUqWFHC13ro7OtNS6lpAtyhYBNMBPteuG0Bxg2sI5g18wx4T7OJ8YYLJblQP8S8eLgtIjGyKRIIn9iqGZdGV676AAU6+NmXkxgZlmAQemdj+Ha13iXNqcY7vTRjo/4a2tHn+nOCptLmqJwgYSPH5WCJyD0I3hPlY+baqa31/9RHXaJXwRehMjYZwU8r3UQH1QkjMRbRSXmnBVOU3/jldcmjtolPTHdau+a5N/fcvG4s/YmsWhcx8E91z8QDKXkGE2xoJDZioFSaiXuIJ1RKMm+EX+REk6ajPcT6TK2DtMjLnkVmrOaUnnd2M4cyMR9GoceUyKeS0Xb9bvy9+FCKw+okvOuTdHjw3qI6hkVEPX06NesyK2lcTe15D7KdttjwIkvhCShnZItIZi4hu+JeS819nnMzMEXv+8RXlNA9Z5CzjqhsMv4pIJyB3iM76IL2YY3CD7Vu/1kMf1iowrvdJxENgfQr0XDjwp0QLUwPdam7UBxlgQVMAsK0jP5nIuy5dt5JrYRikkoIZOcHSvwXs11QEpEu+u1ClABdMh0kWpVyxNg4d2naEgTNjJjTpw3rmu4EL0TXTtG/m+yprWgZhFY7zN1TZT3IjAIB9WUQJHLGkzs4ws7Jnd46hMH8FnNPqmaTJWOBTgmtD1y8LndOEAHjNOjHBIR9vavIlRvS2i+vrAvjB/u2o8/8aw6BD48fzMf8k2S+rx4+HUhvcioa30G8CD8WTIjT4xmP8fbXqE3oblq9t03dXA71EW4uW8lPRbeQPFp4eB2wDAuIQk9UwbbFeKWKpfUIcy9985CY1mhtTPxAvflkVLh1d+Jd1sA9Brwu1ptt6QdCDjPAqps7r8YJuHn+vASd/D6F1r7fKx5RNHC1UGjqpUK9N9H+mgu7BY/8YR2kx9JUVpfBi/4vvei6ZSYJ5bOhOs4P3KK2/0z9JA+qlVt4jUeLBAf+pyaN79FotGZ+cMDGK3mcNjvk5VeQBU8RIxwTacRX3bywH4adeYCphX4pL2/VG2h4qXSvwSu8ZhPGDMgGMqswLYytkNt1utESP78xEOEtKdhj5UB16VTuHd+/AnXuTxdA4TXMv6fziHZF0gjSG6nXm1nzRCdanPGFqyD/TUKKjnOny8wXgxrWElYQrNuC/oUFhueiEjFCFxzn6kB1jm6zfpDpgNPDccuou7u0R3y/Zlk+COeXiqXO1decKBYaQMozc5vfR8ADrJ74zySVp87YvcqkBUUDVsDJapxH0Y9pi5PTtO9HnWXa0ZEIl2ElofRNexOC3rNixy8zsXW4KsNuQCOfFtcdpttp6U193I22NBnkbjXvIIzehhksI0RAOxw0L4c6icXgeS7n2tl9hCSyJynCu7KlnQITMEOYy0DNGBRk4f9B7dmXwaqAy9LlAytY5anWlqwwH5j7uR5x61SZm8sDLtwITddXpBH7UXoP+4PVT2+psAj4ry5U6R6eLpriAHZKCzq8+xMtQTEBJQgVk9Az6YzFV6lTbQE4e8eM20U1kPOLY9hHKOfgcddOxMhAOs/yhoe2UgnaJMc1H+Fi7ak8Hmi+QeFvnCMk3wN/qUGzHOjmXuGL+PF/z0p53NDl+wEdo9GtoI1Jdg2r5FQZDS3YH6ICv8rswjUu9kQUwB3pDTECnbCefyfInLwEGwtH5kBUBHb7pLU4HNWQWkjVukFMMp2PcDzPLot+E3uZdaCEF2IdKysObCYeApn9PCqow6WmJMwJJwtzwWlkeMgaFeyX3N4/zGOM7V2pyWoLq6hEtfVffkSbJr0nQ9RMXjOGApiFV4GFz4COcditKuITcC0llw8bIoj6+I5r25T4R7tFTuhWx1Bzv1WGkuOgVNvZTiLysgJ78la8LjMLZJtyQiw4GyLeHNUnnVZpgOApN+yawdzum3bJVw8l1QYiRS4HUvQ/X3aBu9BKMEa4gJvEeB/erj1KlH/ZwkMWl2tmJXjktKf/6mWgJqDFeX56AnN1Q/TUDJRH+Qh7SSVuGpiA7Upp8MubEsDUDV/Ikm5DNE3V0HRLUF0nYIQogRjnuOYQgaEFGkC1SffYQKXwLKls/SRN4tFMQwQxFcyN/sTCaMwyi4B9GxmxopG/T78rrDYFy6gsBi5NsK+gY2WlzBY9GAo06uiHqP6KnMaxLzzBNzhb4613TmDDAGiW94v5qzXH8+hS3cSsRg5d3MdwDJ7qaUUIw8kAqLF1sA57mFn4sogwxdc7Z7z29z7X3kJFxRNy6jFm5J0nkeyZI/K+am8kCZ7KDcIfmnVJD3DUVg9Z6lCd+t1gGz3fYWcr8NSdVeZ9WnDX636PmyQ3XbMBkmE66zzr7ReWHljJ5XUI3COJmb8GRtMBNnqAjpJqxMFLUznPoMLYBgvEHxwHK7AXcO92uiw2dHQEoah717GSZu/Ji5Wx7pa/QT7gEH/iuGQEvhIjpF04cBAaI+kIDO3BsAKFHVpLi1DG3OJVVihfrWF60+a8AiPLP0EHtHDpYqaNDVg+tHX394bmNZlFQgM0Vn9L3TJwazLLBOPp1LomVLtALaLfTcoxOG7HGQy3NX8xWoVPDBvU2G71Zd7XINZIY79jVXf23H0XDiy9Mpfi7vwpJWTM6Yru+4umZGHJZZuYqDUreAQHFSTrjQ/Vvu/lfkvoiPewm5/mLGpXrrVEZ+6LTiAlA2kUU2SBrenpqhRyx0eLKSRR8/tFIeU/pehY29NCzAjC8pUkMV5vIAvl8iDarKtVoNr/KN6JrZ38bos04gzhpbhsB6kNS344DzirIgjdrbFaCx18knZs3vKmUNuSrbAuN+KGscKd0nwqTxW/iL0J5XpDVKj+66FveJ4IkCPqC50uLtdMlvN/KCsjYptHvQT+wki6G4PHdsdjsFjjoeQ5NOZxzXT4V/Zy30tuREjY+Yg2Mr/RDMNX/SZRE6nLBKZhO+eoRDj7Eacc5USaWDYZmfpRm6syMIr1D/GF4iYIsOGu9ryYR4iXoBsB+Afefp/lUh5vuJ/8dE/omW+xTyFcjtqePEHLYmEe2QI9rTjDPCjR2j+pOmnEKma16DCswDt14tFsws/XT5MOpdR7zFn2xN6Eyh3tDHrE4oMx3wsdI6VPC795ylHIkjZeKCqDEmdYhPO364LyHRk6XBZNgrcyKS/dG9avv8/s+lgTXLJVfqbhUoXtkCJheOgm5Bau3HzRCevFdbP/VkW6drkLFKNz4HuRnwdLPqW4lzX5fNHra6ShAIYbREYzb9571xz9WTEg9M4KTxZ+75mdw0aSwiypoOls/nnRabAPqoX/hCgJmVmOiKmj7Ts/62GuW7Q9LBUICk/PvbbHTaTQ3HPnwoDTFUz5/PD43u39sx+JjsrAMGwZwd+yZ46AUxFoXDGpDFinb+S8uYZFxOBpmubO9H+1SkjMEYdt7tbO3aH4E3/dDZQrXgMZul6zhb7OUxmbMuFLTP5ZfB2k0Y/EQsOvC6/PxPMknZkd6PFA/4n/AK8CyPtdWIgVdVdoPsAjj2C6RN2oIppo4D/HLd2+39V+4P331Op4VoR6EUXfHFoFxowEOUuibjlrKO+Uq+eKZIhW9QoK997pOLq9s/k3IU6ACCOAJ5jq1lv1OxkVXrqqA5fFLv1TR0IwFY+sjAciVSkLOfMlLTRSfd6SAtNOUn14mGFg96s7AagfDCC4CC14QoQN4gU+o9Y0uuWsHDE5dy9rZVo1xOhDkxmSFXyerUYTCGSXjK2fgSdFWZqQPpLvHtLWhyKO2JgjNKUHBTDTf11gos1Kn9TEHEN4w20XDHLsoTvRq+aT2112jd+6qN7PIb72MqgrS2rzfT1PVYZyTQ3h4GSZ5l9WJcmBkK2Lh10CiNJsw7zKfGnfM2wsyDC4kY5nLVX1AHRXhKeHjVYYVWbPkIP6e86LU70a9T8sQFx/vvX3FiLAxR7lDvdx9Z3nOaOaS2JhGn0W+InfERE9svjceXQYaHkL0E24mJny1jGU4Ke6HGlqMHaOVWNwfiJCncVmUopNKfZvaqDitLHAP0EMJdcVHDzDdn7v68+Zouhs9z44QqzWZm4xZmR32O3xwgBRSkUaGFmwYHdwzOoBygvOL1SytCINDfalS4bFqU59owMC3h9qXYo44nC0+Bag25LMaWumJWqg02xj92USP4BDqmcJCcVFi/H0uGOLjhsTXSEHpYA2NjB4QMMtARYr/g0Gkpep4AtC6xcEgwQPyearFd0l6JiQxXsG+MtjSTK7hPFGOBYBjzq2O5OZdNzN+9OC6S7RR1KOKUnrC4mw825AJg1LMY+Mh5y9SqNIo0UUWfu+kcJqZe9fCPSfZ2UrS9AxBLYC977MpKBzPqjfJRqibA5TaNbSb61VbIlu8Sx9k4GCWMY6Cmwm8otBCoKu9WdEVxEmkdCJUHj/kw1Dnsc2mxvL+j9tzTu8+YSeYqPzq/+86tHoXioeZxnDjgABy9I9Pcwm4Z+W2tCl7dVRjTaTiSOkJUEaxOmFoR/hZelsacWBcqOIZEipBHz9qjNnhH88/QamjRPPzq5CpS0KSBFIqW3NS50g4Gn0jLCUKWbPovf5dABDPzdNeOrwJ8kzdUfqn1MdFGBLMUUPl69oe8mXAf0LuDvDUArbyrMZcy4stoVYukB5HB4OCeCwPBPkCWjHs17qiQnnxsZxu4nq5gO/1zrfsbzBa3Qyh1fcBv5vgl7yr13dKxzDd+FdPh1pYhKpgF9ks7Zyw3omRbZtjHfkcHzdJ2HeM+Na7vQqH81t17vIKeXAp8KrGi6JLNuYZOP009GMOyap9wjdtZF555UCkvvmtNsfuZ2t9esOJfQkf9t3raDOUBf7YBAjPcS/so2NsAiCuJGKAMfux5D+TeWaBWMFgMJt6zJEa+tsNkmGwu19j4gJT8K8weWWqk8orSICDs39LxGVDWnNp1aMBOPHwXNfjVSnrwwlZP3OCOljOuy8bAKk7QjYM/qPOUx27f+jtrunEIWgAluYHdqxKPeuw4FTOAiZkHDP6Q30peusFhvH4g5fPADZgkY3/5E8XqT/fviJ8E5zFkOAMouAlUvhpSlemVG8Z3VZ7YaSxfpo9Tid72b+jtNsuwvx66uV9nXzcnjrkFPc+O8yVyI+v4wSPuoXbeBxkJWju9Q2u1Qth08aeSUX/MYWcSPY6ItV/yyu9uf/TYKei915WIq18ESNRTc7H7m2kSLVa65YmgSYuZFbj1VGGSc1NRyLFcXCqgq9EJ4ecUc7OedGmzMgK7Llb01ym85zU5WnubNapgIzunXUyLSRL6b7+tCdrdTzyUAVytmetehZmE8FoRzSyWRGoaWkDJHiMlgTJqLXKcA3X6cYe3Ypt/8srkNWjbGH9c8JEzQEsDvTGa7iVIDPODcgo7p434YvLazZRzNzgdoEEqzxXO4Kxtnr4CW/qOQUSXcJP4yC2gBWtvBpSkR9e+ZnMhHlJVQkNb2L7G5bElOCL8fcZ+weQVwVnnIYNmN/B41LqztbRj878h/zeM89SoGM6gCpLEowCQxZfaa09ly20wJ5fLNsRpnWq83WacqZxkhYnQQnLmBpPeIHHvbj9JnGvtr6OOJgyF03ji9SDipr4ZVSOOLXljR4FbVVKgYDjioujuhBzhP3p+iNv6rrYGLC9W3zoILuZc3aufeND0tO+ZMsQNrwLk1DqBAX5yxgY89YYdqpUbYNIkiL6+eQf2WSdmj4Wxt+PnLEhVuepIRlYY+vi8qL9GftbkOg7Bc0Yxoj06YaYQtp2rhP9BHUYWEY/kRWA5e759piqxXe8L3oH28bxJTJCv+Z+ckZJwsTGCGHK0uohROM3XCx+Zbc1yFwOU7DV39DamJT+1u535Q0o4lmeKMtkBdKDGdkIk6UCTL0mEraXrWVl3aOCm/5ya51vz0zDp9oehutkjEQ23ZWLiGoyEhKGl5vaI6HkAiWO1w0vRrVLSNTzqxVetVR9SsAsAbeH6wqZ45r2xLk87XPJdonbnLtNQwBaSk64JljsIbJW/tfVigkLL6PlwF0hJkVSNLOemDum3kWjkdbk9WoIamnk7Om/tITpCefgLpAhWO9AmXsxL2n7guj6OftUfGrfoE24Aed5lh8U0xRAQN0yyTWfGl/ZSf9IJBrJf9Xe6hDWpIF707YlVQLHCpIlfd7eaDlBXj7Iwa9yxGV9cqMRh+9KwwkAGBdXuhXlRVkSKn7pBwvh7duNw4djoWjSOte8djNbQij2Pu4NDnnzkRBRHcNQF5GYo5eNM2CNNf/zsENB56XZNbo1B/54sNvCaMehV7b/5kVzrPZ1AIsDBihx0rCqL6ZN7WFA+18/Dru+ioPfcpDrRGl+IdY2kiNWynXg4WeYivte7MPT8JPy5VUbLx2qpYfHQLVxhyNADOSU0Y1XLswv5XTRTnGiN2Es+gMDdskKEG4fc7Yh1wufXWYVMzFLV1HDgK3+bqLrPnDIhsD6acFICEN/CNI3TfEoXQ8JRY3unWk5yK1xEiFyOKyC3A10W4mxtLu+6RdCqdZfHYUh1M2iqGdetPw+nfOVwHtMHrsC5YlpXtebAuWU31Ih1AAtCuNTkacXXayjq9z6wTK1OPgSAMG+/kWrAZAitdAGytMUrj+T1odEU95aSyRGKOITDMfoio4wCTutoYUadU0LkBJigGoR9RcqB2fIFq3eGV0VaJbw7r2Q3NsspdcWmLZLROBbdRTtyikAf4xBbA/r3AzzWZ1MF7SFHlKj9mQdUuSWMmopaSTmoltF1LNi2WmfrtC8lAyAGSIVcjcwc8O0SpK4Kne13OkPzHRg2BLmr/8RYIGpYceLgzD8b2JQO4iXysXPjveFRdR3COuu15CwaLWo1AKG4VAyyk7MAcxeTYEBtN92+vR47DH4PZmwWWh0TS6wnsPMWQrD8Uc/fWs/q4z+UD+bZzqncyFLHaHGCJTyWUuT1bg2P3fPO9cqoCAmrK8C67wBuOwt096FF+fK2+87aaC7f5FiLZyCEZmGRpGCeMhRMO3/dGYAK8b4+geVLrsP8xhyILgyndBFavOKE+lrajMFiUTNVM3YRjK05l8Bv7P9O786jYjObXK4jYJC0/lTtubNOVckE79gdho31sK/3VKg93DXn4oND0z4q58OqsyUgqVIDlDy8u3xF2VLbFToxBM3F4s+iWZazocQhapK6tkBIKnZXJlq5C9nLAdhIRIkluiECRhVEDSDW4t3b2xjLAIxpIQ91vaFUYlyMuQTM/5Ua6d9SgT9zFbMQAxr1a+DvC5UmeBHHzsIHfLQsuaRfd99h2CUI4HXcxpVpZs60wU64YQ63rPLrhdka32XhlOK7bxFb5zbUbp2MuevydTMjP7n4IW3kAFqodtTIo8ed45l7H3eXLML+SyxlWWiOxeEhTN593jREh+4QNNCC/Fcv20xPu+Xkw8jA5jtQBXwU57nZFnjNfuzcjJmJOHkifscTMSyJgY7xSVYRZ9R/Uflb4m1oFmFGpEgKgouZA//gN8IO4BDak9RLSfdm6fOzwblkRc4zkyP5FCqcJkhBNxcln4mgPG6svCE355FrZyWpsisTjtCVGaKQ7wCJujlDA2FNxjUz0V4e5lFN5ptJ3XuYGT2W5RdPD0116xHSZw1iMXRnQEDeTdKvX94bL+BD61gqmQh8+eInCXlM9IweB/nv6uVc5kep4ghBNK28i0IEZSAG6nxPo9RCRjWbz3VQ1PYQL1WtN2pQ+/EwSnjV8gv3LdR77ujMi2k2Vn6ChgKD6h/SYkTSrOY1OeufYJoNb0Mgpek7BzJs0dHJlJ1udijSZX6wQ0sRUCCAEcHCOs3J+kr8gBNqYJ73M8MGDN9XjHbY+YPx3D2BWCghvAXql18ShU8PYqV4ADrHhVLj1UK6XL7aGluyV6ZwN7VNyfIpqTmU80U9+GYPnAeiW3IWzxzwAEch1Iom87MDA+d8zkzwMUnyG/ALJTS10opaNRxJOfddxACXEnHlVxrg92MF5SuYIjQCwto2MWBfErHvUMN9SA6GMTqpyTct1aU1APjhJD+BMSfTS/5mbQx9lKl7JBxI95wTtANFoVFyk00U9Sq8pWRwHeKCOA/SY/O2N2zi7SeuIXFwkl4HEq14y3s6xN3hBDucr+Z9z4Zpn8nrVejNlHmzJIkmTxnnC/sCXm1AyQfNwhDieB3QJ4Y/P3b8jNLCv8XWwj5J++v5/G3jjs6qpL0qQXEiEDygcA0eRaXmFV+atPADRvUQ56vjls4BEau3QzawuCqw+gFmWgc8EqR5uTYMMAaJb3i/mrNcfz6FLdxKxGDl3cx3AMnuppRQjDyQCosXWwDnuYWfiyiDDF1ztnvPb3PtfeQkXFE3LqMWbknSeR7Jkj8r5qbyQJnsoNwh+adUkPcNRWD1nqUJ363WAbPd9hZyvw1J1V5n1acNfrfo+bJDddswGSYTrrPOvtF5YCL1zv7VkSwGb+qx8Bxz6AIhLxcZRZWVSyJEch0Blc/uN1JG0WGx7UF0f3xnVpXI3g8JTJv4TedmM3/L3TNFZd2owqu0lGSir3XVgxWaSz9BMD0AxGJerE/GankP7mXbQ207Z50IaaU6Qgll84Pd2CHYlImkJOtRkF2uXWYGIK6+cImwjk5ZerAGw/y8vx+TAuxBOe1V6XZXo7Bp8eKDH/egC04YrBZ4kM4cMHaVRrZwhN9NjJvLhk1eJr3E1UVgvp5x8cLLs5frYJUA/yyTqx5PV3WHgHfsmo1VJ5vPDXMbp/nvvqke5M3UhZwMpv4lAJ/IC5nzQTX9MmMcq82i4xfHvDhH/VZjkTR1+uUXb1WPSP/ROR0joMDVDAImUKIdrVNYwSvtEbHIct5LpRXSiGGQdTF9JJypyN/3GQw3YRO+sgwaABJC5BTnREOhjzTj1jLbgGzIXH76wbgzewKI3lZSCZkswDI6mtxLCUlvJYLDn5anCB80zwmPLqAQK5wf/SHpfxtSaYa9jAXC+0R+r+657E0UuBAOJDOm7nihRePl3lYdHgdskHcetTPUvr/Rleg7At762otVGsgwEbAHCPo/+eKGWlnxeNe2mVqSPC5L8TJWgrpWB1h+IbR3E2RI5/vqZDhCR7VyA1LIwGQ3coG5iriZz6HsYo7NPGaCzGr5SMcVtUlq0A21FOYQ6u7vvFeccwgHZ/1UNLBG8fQPJNGxQ+kxPbPxSFW2XBNEqfPCTgz97zgP/FfIVwKk2WWOVQuk0g4oglbtPmi+LJoGGr3fMxYKkfV8chjpQ8wpSzYqnZ8cktHtAx5nmFzrQvdHq4utfaUl++feuaKesGL5+Omml+8WOWEUHtmvrNzBOBGz6H+Lr24m/wtJKoj8+JfUGxy6i7u7RHfL9mWT4I55eKpc7V15woFhpAyjNzm99HwDDfClek3FRTn6YRO+WIV7JJNq4CA/23nFDHoq0XQZy66EvXbmpcKA2KLPEdSBwo4itIDct9ibxmHfAgJnSNoyg1bmiXybkyEr1GHzOIpvnyRwkLCkPK8O8ZCULQ6wEEUQZRVkqL3s7kHzxijyT4aSY7v4wVrtUOHOTW0f6yIHhzVFB9egole80fON/EyrAFcqCdy9rSQdnbVqZHPKBCvMR/WKWvutYWxELC4rayZaRg34qF+mIHO8qrW1M8DNq60xYbmuaoNVuSFyvIdHibM5Ym62aog70SklTKlHlQvw7ZssVzk0gbvSHCpXRF8YZIK+1PTsqrUR7o8rTyGNc1E0rUoIKB/WCqxMwKCiDNQHMf2YhxGQoCVWaj7nc1H/iG7GNbLUyvj9OyUI8jjoFGQI3epWTlZQsIqQmrRG37X4OV376zqt9l9UW46cNhmkPwXQj3saU/gOKSKUbeV5szHjvQN/JwjwisZIaMz7mnjCd3uSGxaptLmFLNUWDKqjeK/jloYcic1VpnzGYA915IhAVbTDD8Qp0/sHm65YF8ZsK7vIptW3w1HDLsd+hk+Waa+A/GeSnT+abKPA5bmwh/7lSvGv/NGP/ftGOPUG/n5HfXjmf1MFbzucmp/i9UOmhCG/HL6Nltl+eNJI4/NbcuvNesofEIh22vFXclpl3z4lRNayDBoAEkLkFOdEQ6GPNOPWMtuAbMhcfvrBuDN7AojeV9UvlSXXhpkxawcBIZV+mPQoM82CbjApH0KY2t84aGxBpzdwz8pAGwmB7Qp4ZhHisf/S8/Q6G51/UoBKGDsrzSswpTJRbz3QV1J8qi8g4Z6R/bA32uk7uEC/gWZOOJ9HwhDcP5tKEvRvghbx/xGwNeGEEzSIPnDnyhSxmVBLau4ze+rQZaTActrzqGQYWscsiuua1w5ilnpVzQyeNBUlS+ezrO3lm8Zipn2b7NeDk8NfN4oOi1Fg4m58UT82CLS0MkUHT/j1Z3dAlLXrM0vprU4Pqj5uPBqpfJEJ16Yj1MC5RTQ1m26LJ7Ouz0IR/mZyaIiB7qsNLsCeG33FfAVcFJp9nffNJTVmKXITZGeIMsMn6ohCpP9Q/0f0q0v98TbqVqpjY80mv29AiLQyvAfDyYazEVupe/YhK75zK8qP6GxOlMUqAaK1xTWcusHZ/rBQ/O6aRxYzAbeqDi7rC+gt8P72rY3nkFLFBx9MHAu2/qMLeQGbPN+B+rOf1R5IOUnLC4syODrZzr/rvMW/18eG3WzFPbzHg3hB4Y6Nbow8pZwfrRDyX8C4zDED36lqeAi73eXunNawIHa94niNMl26fqOZrw8wDbLeJy21wAk7Z0Px0/bjrlhZ7VQywSZb+DMnxEQ1vciCUqQ6vbUwp1toYrFQDy5CgVtBlN2arNTIqDyMbizpCSDTlwVUVi8WJEdPmp7Z+IA5xfK/SL84HJtp+CVmU5CgLNfY864s7YKZMYjOOSrJXchfaFcbSF7/QEaXcn3tLXIf/+bc5aCXzmCC9wESUB1tweqo8rFVq3Uzft9UlrYaF0NSaER+KJCyUz9pjZUrqmihkgCAfWPC589M8MDBUbQz5ULr6ccRVJ2CkeYqTKPMrB/2HF7WCVAHiZNfW3px0sahZIVuKh75r08CU82s/f9MTptf8MKahGDmDFyfNkGMNeZ7f4Fr1sFUDMlI+Zi4lhieiSt9jA25YKRUQ2G581L0EeRiGXljbrqLeC1ZCptKYHuycniPQHKzyVRDb/8DuKuabKIptfMKq3F3EHBGWclYOcdSIuSKDDMmYlC2otrGckaIVZH9dvRNzL1EdDSEYYh0+QaDgV/U0Vbw4+kFXH3o86eHhci1wsekz+IOrWRSmL129E0hwSNRsTdbpn3WxoveC+FMFtMZumdGQhqkFSyjjW/QmaURDJhbKZUJ/kvBudn/fUX/AaK9rE8bChMCt0511v96ky3tgKD34aCW74PZ92OxabxJheXpfQtwjY7Z36nec6av/Mg60fLF/7d+Y/EtZ6vivOe94LLLn6jROthsGzc88TtMCxEgXAxtmVtxTGjy/tQDmomMyLhiZX02rN12bpq7iw65FRNfo0KgZbQVFZoQTWYT9ibkiQIkSV/Tc3WsTTaws25sn657hoGMsXg800BLARrQklwKtIaLZIRk6UcCoO0mAdA7rasCt1gWPFukaWnqiaYGMp9kTr3d22WSvE+fTUmnUH5EmeQmYwTTCvpAGSTgXvqHySrvTXSOe/X822/mECPVtWotItc5Sm+pgB4ehy2eC/3ErZs8Ew0HI3E8XmyCvm5uO0EmTd42eZpCipde1tbE3S+Cf1mIKzIQCS3XIIUl0nS5scOoK4t8vXkE4Z9YQDCMMsmlCEgL6dclLK2zlh4FIoi4wzHObeG7Q5HMEw2NP517+hl1gC6Q02XEpBWYgTVzb7QPZekUBbaztAHPwLpZDyNInEjmHuSxTLoWieMILO34+oJ+Ahy10kuobQ7pwNmVVN404CRqsTwNz5S7Bo64EvNI+yAGSIVcjcwc8O0SpK4Kne13OkPzHRg2BLmr/8RYIGpYleGnPOssCmUgKsi4IVOrhxp+apV0D751CtCIb7BWnbd4Yy32cWwK5fEDgepJvQ234b7Xka8OMu4oTuHc1Z1D6gKmbl6UmPbZYJGcM9GmPobSUFkUZKGUVKWCXj6uEZo09u8QfiOs8K0eQW6nHrewZQiah1R+V+LPO/CE56tODkghCMz5/3anUgc4rxmygF5JVrhcntvzmtsJmt+7qurqguy4gdVRh6ZTV66VK2jJ1JSF28NhHixi6cTKl3Lq6hMNCrX9epEFfPbTUqlsR7xpsNoVAzN7gPuE2E8NECIe+qJUCz8fKzVxnx21oY4cgZ60tuISAbRdC0IZPDkJcs4bSoQzm9fvnAjItPHTQDfQo0CZ7SbzkohDLQ0wDfk4khZHKwl12jGpdufkSqbt7sKQvheQg/KiD+HkS3jD3zaA2YP25b8XOxXbY8Tm28/j15QTwJxPWNkVwVGu0tJa7uWy/J2G2a5faNOmugSEaDwj3YruM9F5P4bIOS5D73BiwNLT4gzMMJqFgG60q4EoPMA0Mh06W2aSgCWCKghcqE2vhAR6q7BL1sQRxY1Ywm2csUh1JsXFvBxksJlSJtiXUBQ4CddX+b/pqmwTnKiO3JXQZ6FHzZ1HPbRckHsX+RY+SN59dbdgcSPiqisJQFbVT9S+MWNRFVIrqmhJc5lusnAHBY669V1L/d2DqRugTmsW8JGtoYqonTuPVqCQiisPtKX7fOROohRleGgChEtS7YVON2PypnY2Fhb5hUEHD8LsUUK3xJD972Twqk4O9YZ3Vat5zxngnIDz6YS8/4BnQUa8j+eAF41lqJCdQK5s39b3PsFczN0lP6n0wh/gfliK6FQoIQ/5wV1QV/x0Q2e3NoLVTpZkVi9EGhT1ZCYG8EWs4yHZUmq1+yqZJYxvJmYEGiy+CJC9DPj2aLhrlrvR+S2/92My3lDjMiFGzorzpYThAeWRhzmNL6gENIBwbLwYnPIY1YL9njpFeKcKRr4xOl5FqfPGUvavJUiiH6FIdkANVyafG2j8wuB5U+PkZuYXxTj2qlf8t7oA9tMwb5r188ltafdhQXLzZQop5Qb1sL8QfjYTT3/WxGwd9yUM6n+HIp21/8St4uUUiyfcD7egYE8pJr5vy0q4wTC/50ZT1yz9qn0NiduSVprNpYUIDsxdFLXEcAVyNph5tShQvcZ1ptjSPXo18eUVc9LxsPhPePt53IrzykcR69F7TeOlsFfBu9e1oywbCIJ5NKawi6E/kY0uUMMfL1jU9XEg4EvQfUr3LGdrh6YnLXa0RbPqv8qEFa4vpnKB5yAtWMH+cHUEUTX/J8psWPOwIW1o1cwUXDXTMrCuwgxjNd6OM9pN+GjoFgdB9ecjXIsq4RoHkcFj2SOk0qzIHa0BjJKeV03Jd/KpcsZ6Ps9WeKFDMgkIRe67amvRib2AE73gSUWY9b5WrofGE4ruKATac3NpNeqyizi3N2GgWZp+sY+0bbZxlXTcQaZxB0bHblnfNkutWzu/5U0Aoigir6Ugs0OaEjDFNZGEUmMmJBxe/Jl4maZ9NnKrX1CMuSMW4w0exzyiXU4VigyunTqd19GaKMliZ/jxbBxryimvYiAty95rTwbNx/UDDQvWIJela8tUX92LsAg4va1HjojTSMkF8bPKRkkBB+DuxLOEQ6iHfq7KzWtbRhr39MBzlTJ9sWKyMTo2qz8mxi8IbigAvPhdAxn6vikJWv2GwO+Wf8zGTw+Z17BZHrz/e5NzAgrNK1kPUYzXhPDMhfW00X8HD7KCOFmRvlc6kAhHLE14t/SLqqDUu4Ua+HMC7HqUJ47iVv4xMjJhbNsiHii39jj/Q5WSqnJSrwJCxD8nFemtowDwTpmaL8BQUMB+QbplQ9elt6iBtS2A5X1xdbbNWLcIZTbGvRVBWIxTiYnzvxeMSYQKEghZ0dkTemvgzyfVv8ME7VT1yMfaWA37ny0Cqj7XFywSUMW8NZmfvLkESx3u2er43Y85tioQWi3mGLyXy5xat8n8xatTe23kuTf9OgJcgKwyuqECt7ltYKxs5tVssCp2fdc8ZWSn9WGLm0tYP2wqFsmeLBBP6blSVoIMSc+erxdMza9vKgwdl437X6RKVrDiEvIAvHuVhYR+zQQATYlNUAOFpY8LiTFm9tX8aHEIDovk7EG5olEcOU+za+QxAnB6Gfe7+9n/8YUyYeiLtxDIAqQOf88D8Pnz9mcCpFt9Zp2OgyO9wIKMjFKXnbuJEfRPaF9zbIguKdFIpg+tXa/A2cGs1Oo1QtUnro2VHepabmeOQ/ulEz9YZ5pDHym63mkABvkNDsOlwDzSLAK/nLmJWmjBAgIl9sq9P56al218HlYLnXsAiY1waC/zRqKf5EQte6TNm82qvWKaDPMKe6KZvhLLHbwWWJug31NIeadhD4vgIoN195k+fLoaqsOvi6dPH/YMcz1pe74df8uVVj1//DbILV7BwzYxU7dn5+ASTKGG1BlsvVnf0yFrszgk51LTWyVkIJslyXVmW9+M1yEP9i10JoJm/yWThe9Io3rOmSBjHK/9zQsMIdrnsXZ96KbYtFvUyYHFa/kgP87FNn7Tb7bd2ac8KOYOck4ekgQuwsAOciCNZqCYKnIWzN4WkgGgHEz/sLFktNjUEJ8X4w+oaNjtDhMv9hhQ1U71zL+mhim30gVQfZ9dQRW4hNG4obUzAflhAaNHcrJRFAwAiOi4HiEf7WdfWUIJOuHEg5RJLzwXPChI8DPQjf+0ENIJPDFw8ly9aIgEg8XKOYKM/86oz30K/dQQM6VoaJjSKe9z5dYobNUNVMBQr/jMzsIPR/65xmJOt9o73VMM1v2iLFziR0aQsrNFnczVKbzn1K5BxyTCXkYXqs/AcrCzb/SV5/fkq39lW9D8Rg0kHFyGNQg/malOup2ukZ6VzFTDaPhgygBPJJBwfzXx7FNKaUXT/SPVT7NGdbjaNcQinSmRs7dCAMaGTkpPORcriAMMLomWuEZrTX5g704mv6tKFTbh3uH17LZuDoZiCCkRnO9OHJKNrQMsOrL8Ba2buwQVzlctAaUBKG/cpILBXN+bAJl5lsR0HcXwGNFvpzLNTN6joPc+JKSYVLp4M0dVU191eII0o4s46rf7376E+I5VWzy7Oa60Kg4Iv6NuMcI8QJ2EvcHC6D3WhOfIjcVZVVcRbCju3SzWUa9KDUkesBSbg7iOZP23K2fZEA1MPo5JKv08hldDqdtmigB5JfkHpaKOflEY0+uExaMJgh6M6acE1oNS/trQmuSlXZj8vIEneaadfo+o+rWz5sMY7PlXBNBdS7DoMCz+jp9bi1vDDGiYR3Y1ZwAkfG5NDm6rHLNge6uGy1eB7z2n5/Ybf4DBkASi6dAEKnK78wdItYvyiphp/0gr8zbAHIDrUsZ8C8y2ZIyaSgpJ+Ef+fS5BieofLUm6xku2/wh1YYLXHm7fOuVbz4a4ACs4rSNDXVgx6pxuMQKo0Cfet29oKKUyDFmXlgyuixv8ezK6CoURg5mIatk34855Gf3ShxODVGQo9EucC3w9ZUzSH19cr8L9Md0VvUilNH1J0TJpCUiDuU6mrBIiwVAf1Yks8V9H74kGNozqiRFYIp9NcVKDhH2ZQsdxLc2aI+t69FuHxpznb7m+tJMDjCY+VBgP6YqSSnNXy+Qn6kePC4jKei8M1cC33FwPA2RZr3j25KEJfGmZvOj/84gr1eKDrHfa7iSUwUGs6Xel5JRjzZDodO/wHRxOskL9h8YP8IATr1srHL8rmnrY4JQKJtR/wVhF5Yzui/77bRBEvec3MB26xqnfe60Rnpv4+7DXqU1sh6m4nB6dIpyvqm83g6A1OJOVr6hGlJJy4CnYLYizvb+LW87os8fdmFarIgcf/t3GBM5c22c8eel9e3DUXyhESqSvg+0GxomVBj3DCaBejD2j6fs8R8ZjC0SxdxSkIwFHR+6NUWqAvayfrAfTqzZnugv1jX8ApzigjliIicRWQ3m6TEZXL4VnQA+QDoSJbVm55jDHqdnYgiPyjg6Ugsi+LF1hnW7tD6Okk+mUxhfXO1IUZuBN8AaGiRDWVTmLliexxqHWMT9ONL+vxnrIb11jwZyvUFz9eD1ITNfed3EMQ5JI5wh1U7O0B8KJVcG31TaXi3ZV9lajMu1vbYaOo9zTn5GZpCYGCArU9xScyeWInEUbTQ5WW/4pyxGgCzzgCcqI1zgNzwPao5KzOisruzaSlNy5Pdt6C0vucX66wMiXmTQ85qxhimKYvGbJYfijWaPcX5qE28AowaojtrngoR5H2lycf1GqVo3fNHOSceeuEm3cLgGFVeHGeB6+ZpMCdUYV11pva4qPN5Bnl1otUi3DvUA6Xqa0q2HNMOHjBCqUamkOZ4a6txptd2ih1Eu1E12LnU3+HtEMtXutY9PwCrJD9if/qgQF1XZmi/qcztdGIoPGssXboS4cEkzdud5eFxYQwqJqoZmAeA09f8m4BfywLDoImlhXExdSfskLRHHkNdBKOgXX92pr7WLd+EUrQb6PNzL+b7pW9gFl2ayKS4bEhF8PRq0YesvDDfvYnKpM6KgJ4dgvpiol88cYCPHIQZqjb8YJ73LVCGMAOHReP/04cfCv4uMuptVOSNO/fvxSQp+Gee77Q16BnaJ8Wcdqdp27/wdjmoOu2K+OY1oaacmAfnZIy/lYgWI4qqJrvENYPsf9nsxtet81EahL55NOYyZ9guS+4GJFPqUTCwlZMCtr4znuFHMBK2tt6jEVglKFYMA553slernwKkwgAXkgEAMY993qttOhUEjqLRr95F8j+wYooAlI7pAGNCGUu+Wtn9W3P6fQ0D14tacdZBuooOedIolhjzs410NaQFeQiVHMdqVtSwoZiFYeIME3/emyE9/If8CqAaemgG75LFp/FQTQ2lU0gniQeetm0Cx3namFc6GpWjBT/7vm1aeFSOFRfQg/malOup2ukZ6VzFTDaPhgygBPJJBwfzXx7FNKaUXR/xu8mguTIez59DmYJf04bu8TNlG9ocrwLAZRgOwhR4ZcpmoU+KUC5vFNW0A1B9yFa4O45QLwsRqMy5FPQk8rtVksvKeuChLH5lyJ6g8UCsCsBc+V62ZVqXTZV08+Vkl5XsuN6iTQBvmcb5YphsY35iiCC2FxR6kxEFvALHJQs8t5SRXlBGDqjLjwHPmkaaT7c1BngaLyAirnG644EDrFwxzhT/kbuHRy6H4t1c1v01ijW073TKuz//G6L39NDTVZ6gKy9n61DKK8DzooZdF7vZbb1snMf9OQZ68j1U9cNMExHjY4GX5BzsQWm8FEi9iUEfMtBFVCKPs1LBBCYLrXPb5fWEUJb7kkZvKon4uiLmvaws1cEupk7lyHsFjy2P1hCB/lXIO1BZUkIhwmgtiX+dAPRogxtP1Fv/dE8CqLB0eFA22OfNOyvn8128GmQDvTlCxeELGSvK8VvQBvuouKYl1BmRYAkJCx0ij3ierXF7wsUTDlOY03GI1pa6OzxPODHyffPZEguo6e39QhQNrwYhQtlyKzfFi0sJ1cI76RWmeINkz+Ct7vULS00YqQxcaWfYD0mDLk+O4ynejolgWQinI1dXQCFW0YkOaJh1nPOCFed1R7OOh6HCLRA685drLSLvFr546xf4ryz1At+C/1BWDMEgBXQZp6Gt4cbRa7GPt27lmXVTXY8Lpyx3c9StLAASdU9l6PPZ/mmgxQoreWN+gmaNq24Q+/MM7mxFYHB59nSf21mljx3H+J8xSfAy2KjxQvqLycUeGyvCm0iw636fc6JZns7GsNWvG0wATOUgmamBrRRPZxqrug3LVNc4xc1o6VAXaD3jA8nCusqnKTWDV/FfhG+I42jBXw7j6DFSCPzFpYEkhKsGv3/7BI8BZ4ZcUmE6IE6ex5bvzeFh5ECUf9Qy+pkSGj8PYZgjoUF5ac900NlFXMxGuekimT/1xCbBHdwVdPI6aFQ5CgjsFyBc5Ewfc+deI+XxKULbnXahxESMNJIfRfYrajgcbxmfwZgoa6lNOtV2YKeo7+e4H0u/tP/6iiNvEmaObrEw/jQApG4TcLhXOP9xFFhCdDRxWVWoTDy8G1XXYAXnoIpgPqSdgMaTZ2YRI50+SD5A8Ez71zJY72Zq9QRQ5eJ/sPYn/G5n8EcPHQWzUuPjumOZgXli3aW4j1SOGe1eknBu6W73EuVbHRqG/3XeXLVzQT1spLVpl9hbtb2vw0J+keAbTFKsFfJNokZWIFUEBOCn/6QC1WJp1SdxyPRRjkMHHkc1/p4y0yzAEhXPzxgV+mGJcQfO2hkhYLRNQf9YpShdLwZWnyRHirhw54C6wc+vuMK1dHwFjrPjWTTEgg4djds9M4MREKoUAOFSaMw9BSv1ZYgfLsx/JfFyjBksCsRsPunKEqdlgwJR4nEgNKb3f7HkN9qAK9xpXPUtiVVMB612ilhmFKEkgQjWX6ePCqRR4J292N5IPzlFf6NoxQyuxHHO2SVO/xQpTB7VsVdJ2E8/BdeTVx32LoO+gBZTZle37gjwjk/U1jRJcMjbm/XyVGdUgz1nN6iVdPyhSIOOd12F20lqmE0aRwZBmF+rdZuVU+tO3NkbprThhuKGc+3cr/tgx/UPTeeh0WGfE1U7ubdInfiEurfl+FUf+zswHLf/VWW5RElr8lKql+6TRiky8Xxb1ImxYeueS2s08yXoZ4949BdgQf7QNKaneB6td9pFu++kSg4KeUMMrY07dsB1eIdjNAn/EoOPqLH80wuGFiU5bI05B4rqc9rJEUQnpIz4hhKnOEPWL3m3Jvt4z4mxpm6dLWwHKyE4lEnpUuydsbZkKf/UPA2gRdK+3YFddst6uQoNLrMZOcd3NhqKjeZ73uITLG99Nuvj+8XHBZdfAq4iEnX5Gbh/Y+42MHv35WPsUPmPfa4/K/8o0d48+2Y3RuhkxxgNvk3EJxt0AIfWZGC35I1md7vVjG6iz1eIkyojTM1Hdf2/DXgHZCnjJbUO1uN1wzuR6peLgKJ64+Mc4w7S5YAFooldarDbonCFWDEZt8EE54QjihSVT2wJFQSJ1KomXPO561Lxr6qM8wN6l/fCO9tw002yiYh7q++fG98aVF2oNpiGdUrSpxrvcvLG2v4v1ZzUwpZ6IbiFMevjMcWAZkXEACc6GBBk6jfcVodgaB0y6aK8bUGzxBJFsSaoRMV/XAB30JsSJJHkmZx61kEJR78+nhtHG30vh35dhlU9WlgAx7G7whQA0EKSX6EsguIJpsIQ8SmobQo0SPqp8ycA7aSj2kKwgA4KPaTDFwMazgeOvMnmGt3XrM1RacCLt75c5ODiVHICN/N1w6YPggtMXXqmRbYI5k7LxCjho/UkHsqEryQhqa5VZfG+OKuXKD6qwyIkS4r0sGdchkNvZMhPGxlcWhFsvwtWUcgl3WTOnx/28hAljUW8UpjdF5oFphb0MGApGJ3pekqdExEm5z04+jhdisAi+nU68SOxLvIf7yznwr9FwYdVmFxKHeGOj6TchmQu3Q/gDOBL0rRJm5KwRMPOPC2sXfUJ9czdYLxY2tXR1Puv6XCqTgX2xQHoqqLSurNQcTITVWIRERm5fuD2pf/E9ZrvUu+7npx1MQTKJbKAa9zJlzJOMdzj9iKYaEanNsyX8lXwwjvrKuSk7Bu/wKDNxcS9cZnb09kSBkSXt90FXmtrcxjItwvgECvzpEkr7MDRyzsNu5u4ez/xLHmV2k2k3k1lvku2ujcyGUXVNTkqPD26CU/VUqv+3G2QJBCdMCgzP7SNwCjQjYlSveENSWNwAvNvjDzD8h754TY0ap14cjJyq1HNIDWoMm9ZGmaQ7aE1A+y980H3fMq5g96aRQ8znetHcMcx/RfU9PggeTk18vDT4D84seSRkieKEX40lNPW1lZX+2q5eYC6rkmJQsNqdz65YvuuFASjLr+0t761eNriWJ8xjrEhd7D+7t22fiuZH07eagL+TlOH1xjhQBancy4Milp82DxPHjPRPvq+gNs0gE7VrdptM6IqLWm2nNsISIvolYX6eDtavdLqJ9/b5Hke7RZGv3MHlmpLpOygLhv90s9YkkDzdOr1tNwr41XCKDYFbhSZInjniSMA54hJyrHCeEWBH8TDeuM9/gusD9LDAeYfzfpPE+UHfZnFYkPlwxxqT+pl2hmmqDZ527ZwG9pZHRxlXLVskZ4sJIcLegYETnftEvvzQ2hKbPOMajdSf2N6+cn6q9lGKkZnhQSLY808Fky+kwywPFWv8dMrTwAbLV/RCvQELV5QLIYVU8e/AXUf++Le0TbmYRKApiVyRro6Bmni8QB4e77tc0T1WR8Azj5S4ww742Z+8NA69e7tfLLRxt2XPueTc+O542qhFqhQz9m5AV6LySkFLq19e1buAeQeKrdR+Fx+cbaD19sforwV3rY6u9FU2AL7PxjssK2TS3y+Eqzxu5ra4G88RQfi9B47NKcI2/WOCMLFsuGQenuO545Pu5aZHZxsvxeOzrGSbSOXDK35yDmWZxXsrZ7Hnzw2p6OyWYqmqSuf75HzCFKgTCgOio5FLcO0JwKF4yvAohGQXvIvfCj5Ok+tG/edBUGrJfxMHj/x+Xxru/lbJQDNUEfSc5BeVqTQiTDpImvqu2+j+GBcVCn6Dkc37v3+COiv7z6Izt2YGOWs+u6alj0JaBjHEjVTKVSA0SU2W5752+ONTEW9HJVmclZ9tGXiBZ2WuhA+NzLt/lugCwYmWMdWLiLNztTD7yR1qOD0mHN0PFxAbycnMrM2YqwAulsP0SDr/E0BzlJPCkQ6E7YM00ChekUpRj4iJqTW8zx7Nnn2ZDHLde9fX8Xaa7N2lzoK2aVhna52xhFwBxIz7z3wjj0egy4npCuJmhKHE7bXy/SnNjJ8NsO7zr276qZrI9cV4mtW8+7T6hhpSuXnRNBdJRJFSVgWlHpEU9I972A6y5smoGdKZbEZErTX2wMw3csqDHAaLlcz9MdOjKysSDLq/2sZpZmFwcRBbkh+L4Viupm0kC65YYWv2QDQDzknfe6EfZr+d9SCYryFHnwoPqiNA/FV6KNWgF7Nx6DJP4i75dJlfLpY+rdHQ89B88RXEZG+4Gg3SYlxCwY2fz7Gz4tBihYJUcnOEIFy3lQnqQznrz67dGb9GjdL1hHCkwcpbBl17QKtMjHzGjCOGDhkhGvip3RHcofp8DfjBprEpL/Y8sEqPJfDA1u5eUbkUbOTS9UsnftTnRuf8Fx8jVa1555cHHPUcQWfBKDcGCY17r0cmwUP7bIFK3M9BX1+doy+h4a5Pb5Kf3jPDfKBkf8Y9Q9xHOOE24zPKzUmmZxFVWncAHRP9Qwk/Teysp+ErvPuiFm8mMnZmwGPHHzD8kyR1UKSNzgHncEc5IMotkmXtw1dQMoDw6ZVwqIb2pffPyHWnATsZzFq6MKB8VM+Niv0A7JsICQ/8CGJiuTHAN1wn/oPBWX79vRsUFne/N2FYfxTAnzlf22K1U67V9yh7tBaG+BQNAllqQKD2JsR1zHAffUhCfpNUbbCIhQ2tZsa7NN4K6jwQ7zg8aVzAFZJlJCZfp0BDWZZU3F71BuZ1HvgUJk74vwngOpYqHOfquq6MDAm0oxi8nH0iUzhj0q1L4WcFMLoIOgcNTZY4upGVsic55QNMjBHURvW/CMdBVxaeBJnnzGlH+GeA5PRUdEdYMBwf6pU1CyGdWEfkR6EG52r3gqwSbrNCrfJxlhrmA4SdiDMJas/1h8S04R+ov/+GSWvadYC/DZL/fbrdTeLvmEUuFQFkAdz0vuGMS9jaFWcdevGVTY+YE4qGMN7wZJmXSg/xujP+l1UjvRqTLebFI9oSyIucA4WCXekOErkWW4Aai9tcQtF9SpRfmDzxHIxgJ00MBO3ISby8spEPFxrunfSlRWbmX7H7NcdAEHscOHA5CqSmTAVukuFvW/RSdOab5pf8vYd/EKn9hUyDPFWA8bqtB4WxHSEPra1j3YT02b2hGDwiGC0WfiLFrnmOKX++JbuWx5eje9w0lR/mk6AeDmQBDG4RbvtyB4SsqaTJSUg5tXmo4jxfj/MpFJYzc2ayQ51qXsDUzfOtcUTs3/r3t9zTOfI0PtZfnST4Ubs+7Mx/mZnUEiv7P8D8fkO1Pi/nArkOmVhUraWqaWcC4CFJKHFwOth9KSFrhRF5FdohlpEb/HMrE4yAroSyLU5rj7fY2omgsjihrbIvPX6qux3BTAiq+LoGvluKBAPUrFsWNfp6UK3iSJteq7jsh0NI11oQs7F6QQkwGNZ5S8JWb5hbmsv166qIYrIJYHqsvYR7GLpMViGXRXPXM04JT1kRN2nSnW3vux/G4Y18o/Q6knm9z40O/sdGoy8ZPhr4K31v22ucLEy72K6QtB56hV5csKLul7vyqyJoTWFM1us6hXqPxN325iFoeBYUGChQXImVGXoVXiHjbo5gIVP46sEkAKjmbUc+QZ6y9TIy/B7/z4BYMZiJNILLwE33HHsKDg54ZqqWXdgNUr9W025ZEyBSi6ps4L1AzfGlXjX1fja6dyPeD+9LIyZGzJlAn43TFOuKeCXg+LFTqOuJDp5KD3i2tpG92Exow6N9CYB/nXVkKwVPKqknysIkkZv4JM8Xw4QHFUgJAhcS5ISO9kptVIRHwZ5vzhMOclWZNGa73Q1IhiBZ3JPAmN6XeYrdvMemvRHQVefrZIz5Ar3DaZfYmHC11PT6yWQKzAkHFpY3HOzVeN30t6F/FVsUv5y7b2pOm9Q8byAz/KI3ljqBFk3MFatYj+2kY3Yu0UBOHRLZbru+uzUMbDMr6IQGoa9HQ1fVnGngkAnqgQ289bkQpe90vnJ0HhlHHGnd+yBDKDDwFUmbtIwtddq4Yggwnx5qJjUSRR85OjnWZZxbWNDzD2n7KRGh0oGU+SvoRu4nNI6gabgOKx8ac98x8AAXXiXoptdCGQbf6wZFMNa0lwo8WYBGih9nR8UzaTIp6iQ7s2xQkZJO39epmyOEXaKlc1L3LxP7v5nCbWEF2NiLK7euYHUNf3NqETsQ7nj5pRFt2Q37x8yHw2edLJo0CKzDlQ4KnYY8t9ViN3Jyw+oTRbs2hTCSO+iW8KHtigLCgHiBiJ2sd/44EyfieKDkJuEIM4TuGXdo2Hn9PSNNFq2lmOHApIhlmixstTqdRSAcKWGy5Iwda7TNHgaPCMaZFmDt5eBuaSqxMdywVyVAIyNsTUeokhyXaDzJ0TDGyDSj81As5eawQvDrYtNLjccgdO9Jj7L4ue0MteB96+M17bC5b071QQ28NYu5ehQbBUmSB45nHVKRhaEMpAafn2R7MZKWBJjTpDwPUV26yhLbgTD+hYtnPuaj/7CXWTAajH377TFiq+Gc8FyOEd3D8V/H564xsppp6+DjDcabDHZidjRNFps59hNKNDYjkDkI9kx4z3FpghgnzJQsvfL6kB1P7EeudmmMNwSys7EnO1YAdQ31JvWgk+YX8Ws+KXSY43CGhy8SdWeiykGlFHM6mD9BlRE7AD52lIL2sXY7Yi9rIts4D1k+QzZcIFmQ73AzB2jAGSLqGE52CqJckdgfC69XE8nAo+C0mHK0evueniUVBrGBHeo1nbC5RKynPyoQ+TVVXLA8JhLsE+bsYUIwhl5md4CFwUlvOx/NNwfxjBrGMaN4/KTAih2aNBKQI0buwLWSGrVSEf4Qe6mV75qyO1qN+YRl3p/nCVYTSvwf+OCkpkfpWChDq4eJtfIYvuIpat1nOa9ZcTF4oXEk/j1zFMNF1Zui0o8D/EydRoSBMAATEdSIEGnDJ3sENEze6h8JsFlAEZTKK6cGrOu8TsC3Sq7Uik/WRGL0t0xEP3XVMiHdzFEHlEMr18ViRCj4U2r3FCj9RFP6zgqOIaAIJM1GRFI9/3s59PtVSZqj6Rp6c6Lz98JJo7BcW/b58fzLDqyYoE4h3+nZijr/2PRo/m9MMlGeQswMyuL0WjtB/IcaKqOpbUJ8G1cCho46ILTkrKSNqkPR+uUZnJwgj6U7kCFNw2xRKQAkKuSuW8QzOhfY9CvkjUhOiHWHugGjmuZW4UrmQIOy4daxOhMTuR6oHtbdQwR6k2cruO6oXsz53rqbWreCnBpzbKZ9NUTvH9pVKogFsIHPLcaa4T8J29iCz2K0wtszryvqZX6fs2ApXNeBV4lTg6LOcQrVgZAQmkH10IR0Ja6OhL+9uJC97tv8EpwopgTaVFfH7gQrB5ba6RrWGSSNrpeJ2OHCRbWyA5YxsaB7+SSBPYDCHM37oJctSBmi8VlXh/lR4GrXqIcmjsfs5n8yjw2xfapwluZNPspGnftnUJWx+94LhkOhLOxBN20ZwuxsRtabUES0SWNQgL7nkXuIY5qLNuUQS173MildcoStAkCNBz+WHtds8Ux75H0LikDzOsUzORfb/TBenwsrHvNe18ELAQ0gsWA+KMXE02bvOjj+3qFkt0ZgZdS3sWS+silR7D/pAmPrBBcjSSsvE8XCWJDkHkmUCtXByh1+0AGgV/uuJ0WWRmt2Dc98Q5cHRoO6GhlGChSDj3N8FbuEfbUDLBu4IyCCRyR9FiS4fwmK1N+vOt9Ui+ERejkDyQvmwtlEw0AfRJkLGe5XnFrDAC5My14m0XsICMI6Yf9FYAx09W2W9xL9HYv2daa8IDPcyt5Py6wzm2qoVx3EpMP+Yub6LBL1LP23Nm2X132D4COPevfQWbWXT2AF+mLdBr7pXF3Yyg8W3NrkMUSwylMmxHKV6HHirIIYa6RX+2DA12CAEayznNcB+XzYo2hrQ+Gdlk39PcYG3A5nvIBP7xWroOG9KXUaA/6XVSO9GpMt5sUj2hLIi5wDhYJd6Q4SuRZbgBqL21xC0X1KlF+YPPEcjGAnTQwE7chJvLyykQ8XGu6d9KVFZuZfsfs1x0AQexw4cDkKpKZMBW6S4W9b9FJ05pvml/y9h38Qqf2FTIM8VYDxuq0HhbEdIQ+trWPdhPTZvaEYPCIYLRZ+IsWueY4pf74lu5bHl6N73DSVH+aToB4OZAEMbh28ZqCX5FU0fG1/7iNzOFE6TRdep96bB/Za9k6O5zy5FyBPS9rh5GbOU3zvd1T/G2PXx4Y+YQNlVVMtmenK8Ct0XkbBm4krABarPE0XtEzcz3a3qJD2woJsi0Es20cCswCwz5aX+l0kphsi6Blq+U29B4FueFBgW+x9EfNNOF/Xg/gRf4of6wDHCGOtGvG/yicEnA/RqHN06wA6R+EjO7bK9EniN9QuRGqsOn9Q1hOq4EhZz1RmjF1XIkbiO1bx3Z0lbG4jDACXrRpjCoWaf4CinZj1xFxoInlJMg2knvfLcu3sePnnsLhGqflru9d9WpvY4tmOyDXRqXNuI2JnVnc4GH4V054DuEII+G7yO7yMmGqrf5bR2hVkpi6lEsTZuF6wLlAYVTpRm2ptYhJDvDJ32OdTzsYMQ422pyXJBT7uu4Sq8FIIlNUiARHLGSzooWa9qeY1Y6pKYPwMLHLWF8w7XfiJPq82Z0oPcREF7FPgCXq4brvM2U+E7PnF/AYXIb+NJ8nCucvN9sxi9AXamksc0lF4ln0w8yqYiKAJdg2YjBEPZvnDG1lnSXCrJQdMX5xfvPt/YGBN5iDE8h5vwssT2iRqJf/ZJ/7olDPnv1SlebsqWVTiN0BpGLlnlAeeHrF+bBI979al0jX8yTQX4lYbaNcw/kmCjCKwUFpmIAeaGohCALcUeBWP3YnknvqOhwXkeJA9fOQkdvTZb1EZH0e7EGR/FV2E5RP0QNTHfIVayysOchmtM4Cuyep4e0LRf9lqZqi5AGEXEm1TJrYANTasddZEtOKiNViItXRhfk/IUzsb03psluRpl3h+fzgR/7GVi8kd0X6YcLiSd6B3KJZkTgHguScZmSrxdrI4+4GO8gz0IAtR1kFTb/lRYC/JbhKhqgIiysJsLhYjI5kg+vj7F+Kdm2e2eNxWoX22licMLB2FZMSIyFLc6wLp2/5H4+Q1j3SdZvnqiA5LwABn+evnxs1T7RodQ/nPlyPVd9w6ek7rLxSEW71RIJUZ9Guel7HijHK3sBpRH0AD9IM0Bjy95Bz8IeyVvXPs8kjvtdeS6DrE5SaR3aiHn+Pgq0PzZa94wxrYaiLxwdtFpxH+Hn1JrTGBoXWk5QEyJLlHSnEUf/urKikjDlwkwaYPZzTGkOCmDGU3uiJtevFAPL+Z0XpGoww4L7Zr7X+XrSXVi0maV8zDTk+1BXMlsHZIN/4E6JoOsSl5AWd1U0bUJtIhti1EOPgvDQOC2HaX5r72dfbQGRSvlCdH/gkeofOIQIkj+2TPuPb5XLLv72qT7xmO+73APQ+e7Lh1C9hV1IFGd9RzLpnwfEdIC80NEdADpG09wfA7ngUwf2P6bR4JDTtiVJ+wrHQDZSXiS/daOPgOMWg5LIkUj6ZIgw4yesM12XwDKTc22ij1FrIbOv572JQBb//Y4X4fMMJuMfNx2QeFLRvIAO/DM5RLiSbr3Z1FM3VNTD0xTTnDvY8fzX5gyL1qmMjorTN7yeXKMlgrL18ajOeCL+VcBvNjfassbfsihVvJZVLhRV1vob2Sfyypo9By3LO9YwBt/sHssHUREZAKIBbblrp6C9yI8iVwlJi/NWaHyRqlFjfT+C2gYcX1gElTX9DHNN+w8IvOEI0QxWSu8/6SQedFcQ5tOrYie/ba3eeQ+mBHsC8PPdOo6onnobqeyPyxoP29YDjvSPdHRfoPn5NCu7pqV+NrCoyK8anqh+hAHELamG4ZUdl04k8Oz5h4K3QDm0OF+miOU8ibm01qU93r8tKcuiEnFFGHMHxwPWHq1RtewGtmBN+lg+NW5WnB89VcVF7Fy8nwFaXZAlHHmgYZpiwKhSjniuj2pKdOLBLK2lgxTEubsRwgSSUcXLW8I3wYRtVCfkfqy8MCKYiJpuk/muMOWOmJpbPqGHfe8kSrh9q48suOb8Vy6rV4oacL+MjaEGdO3vd1z3foYI1etC+/iCgKplnZdk6/4KLcjTeUa832CGgfXi9K99J6uVO14cM4i7Jw6/peUXRNjJ8i4C/mdbSGCLIjT+UN0kQArmtAuKTcXAuMmJalDcafIxH5ORND2hDGSAj3Ro+iEueVE4BsJZPAamLxV3GX6e8wjX/Syi9aOKYHh56hMoK+a6c6CFRWKsqdsLJMFPs4O36YoohJb5JRNAaYe97ujNvq0QHdUPvUbphrLOmIoVTSPKy1rwXI2K+q76CHfm7AoNBK5oYK6ynJWXbg3YsfDgFOqaOhZ9IBQc1fpk0rrkh0UrqBoMYyCwbSug/b9nkSBe8fKa37sJOo5yZQFwYgNy/wLPGLoHvBvocffNSW8yh9tLLg/aOmMyu34ScOdrYU5PCrjL0LxjBiFR2XSR7ZhSgEL15tpnvY8USUuIOCDajZZoDlX53Zh3m0bUx8cJg/zweGI2A7SepkBvclE+B7kN1iBBVET56Jl0r9QV73o6NIZyJbTDzWnW4y8Woob2X9ZWvKS2JGGj7skgZhucnccMBR+92vj6V0dBtqUTUY6rJM9UuTd+oRnD9PKV7MAnU+OVvtvDBG4bVT279nws76wk+fxC8rxux/F1yt42xTXoMDuGhvF2xFLaq192WE7rDzkT8UwcwV1Hy17ACb1LX6Dns51AdwekW1bL7YC3GkIFSk4yutnn4qVPhIBKzMd8eYcDxV9iSCW4lCD4cCEA1jWN5Sh1L2gImQQiSwyc9h5+ro2BcnIx3y+NZ/2OESBMsRbAJW8yfydKdjno0+ZI4VpCcDwavQGnx1LY463A3Uh4JZ5dgHS/QWrND391jBmD8sEWWbZkTQDJU4Rri4atIBuH8yBrMJDRH+oRDkRedJNrKcaQZhDrAZDnnbK9Gxt++VAQmluRDQ+yu0zU17xQrUnQ+laEPoyeV+cRllhTOpdwWGn4cjzlN8VOib/LHbyV08q1fJ61et/WJZbJ/OSGIbCHyv26MkwHsJcW/uvPGjqkOT8kVm4E4XUQAumP5vxrRVGw2nD8mtkugbHEsi/RYHZnhVdycSqB7TJccpucdeKAbT2lE03rKBtGVBRQr2zrToEA3CunHso0TSxlVAFcPLSoop9ncYZFqaEbj66BGdbeI6S3c9rgkT78/R/6/yoJs6Vl8DgTkIghyKazNfodJGS8TAJHXNwkhbLBe4q+i+huYutYw6MvQdaLiUX/jtEC5hbYlNugEGQO8chKLUgV/HCdPi26MlTi6gri3y9eQThn1hAMIwyyaUISAvp1yUsrbOWHgUiiLjCmVnS6EuzUgHaE/yV9ieJe4sm3HUZCwyygxYCOx25Mb4dl/rEpeWbU7dkzuLwRpbUpJlXBth6Y2Fooi5Mnk0JBhrtUjXvfKtnsbtc5kqaIdbSmmYUIyp1t7uhLV3pjKyl9EmSsn4zcrPTOZ6eNLATmt5LvaLZgBTcbOO0eVvmVKWHRIdITf+FsSN5va2qRAa/aPiQJww87XqFZ8HfHocWVh1D7ogM2GODsKQS6FmYPImIWDSKQzHF9sVTwBCvim0i1dPzoycdTtTTzcyUsIg0uUtgGS0tHA4GFvfulFw9Q2TOvS3054bfF9KA5TlbFduMpO+Hxlzu+B5fiYhO6lnFGfdYJ3Iz3ELJPndNrI7bsTWP8IyYPACgBivZHjZWa/m1EYKvo4hHthCvkNfI1wD9z32f+PDBEcyN5ONtUGeQaW8cVpRK0PiAHLNLbLD4vLMda70Kr0fs/83Tix7nObKGaXHHNRDAb/sgIyArX8k6kUOF9dhaybj2DQvbk4xsGEVvfJMafgvCw7BUIB+JWHWzsoOEGKrVRkfQtUVLfO81e4FahyqEOM12MAINMT/WZBkcWmTQiaLLY+omrrY7d/Jp8Fw1O8/yACUF+DH2U+QbYtNJ6ygA4x3b3b9FUEJcf4dW94lwtUg02L8hfSgMWYqIwVDqw3eMS7o1NTaG3amK1mkz3vUlUiLWHjdJvPvCPD6VCV8rnKXpHUgDGHw60Gs9OYi1FAOhx+4HVQ8pNHuRvGvACXA4KpvmY+0ykevD/0qz0XoXZc88okQ9QHi6sD5JNKanwBFP5FG97R/HbqisbC0Zorjwf836g0Enal7G31RHIeaC0DjwavOFSfEysE2wvBPGL8hLZiJlcJsSBrrXfd9BNrFtfSJrdIMIC+b7s2vC61pXmk74quSE7GehpTaIeoMi5vmCRWMFQqjashFtkzEc4WzTUHA5tWvxzxRuOdzDbeL9b02yOuHJF92XbEIEN/tar0xiOHJuI6iYKKMqa4AB/eT0FfQWpS/DHBX0GhrrZuxaJJqQ4LV9mGJ2OIJW0pYA5V35D0lPXnV2+1OljYZmpaalkdAD+iei+eGznKNst7Ymldre9nOWIkPUHDdi1/M3sw9CDXx40ZKovllzLiSHKOqHpv/nhd+ozeYgzW0evzpS3McRol9DD8mJqQojoxS0s89ic4etBDwkJfdpt5kK3fFZifA28CmjAqwabQdhJT1x8w0+smUcvC8PLTOZWkD/lMPGfWoqhx0JgGMe48QOfYp9xuJWlCwQI7UkdvGePurIK8L7+Gm/h9La9wUSuq8oiRzAwrsh2jW1yHiDdKJlH/lvHXLYbE8eujmCCiMILNjvvc7v1V4lX/vvGuLZ3iPWfF2uYGC79RYGM7xyMzcDQHtXRt4+hlgHDRD8WcMJoFnsMo7PWbeA1BIyZUDbqHp/Ibbt+OB7PlqZr14iS/5o91iDpUVO4HtVxDpYV5GGhNw5BomdckoYPf/mDCpO7+ep8PVlS5fDb7CgEE+bR+SxcHEO7NyFTvA8vUUCqUVZDcOm2rOoOqmuWve/hk7gdArK2gN5wDUADV7d2b2Q0/0ksIhCS8+ByNFkDXF7PrKY9V/64yJ0c/dX2Ngc4hiG8+KQYuhEnMnFuSmoLcHwYePhhovrSiapccNBN0XuLWCV/KT8jK+OSBx4kDAvX8hInIOLfNbqmtCoNN6ifgsGrpuHeUcMcKsQe+1IuMcUWXdE/hL+ZsI/SqgRhYTrkXQe3a7c6aCkfCKcF3tJXd2SrZwhMShfNcozNqZy/IihmB5hFw5FQ3WHxuzPR0PhyZDVF65gDIthjeYsIQTbpAlYus9QYmdhu80SN3NgD+oNF+0bdnF/jdWqc7cVRJTSkD0x2WuORIiVgXqwZQzS+PCxD1bkn6IWWqLiKjMs+5rerfNW1Smy5TvPqzMz9oRQC9g2EJQMPjLnGHYIclKGrRxFoml+Pia4gBm/41wC+GzYd0M+MgyAKaUnM/3PaL2Bm+UbLISXgVz11fCU8S/nsfsUAR6JQ86Qboy4uCecYD9aJ/ECbt5ybVdoR/FgPQYhPcS6Df1k6TVTnlrJFrtg3yqXgzEUvv9GbI/IKZE/sG7SYCcp5DwQmUs798QnXc6vEaJTZJSCMGpJm4OBUJKw7MsM+JK10a4eIpZ6o3IlcIqenlHOcoVmcfXpw1GbSerVq3LUkJbnaiRT3VpSEsm9aUmS3FIcPBmDVBJUXdbbi1RxaxQJVMGsJyJes3MJvBnDl1O6IoRAx63fbh3Hxmz9XFP1aXosHteggA8PGVrtwSIS5DWx1XxFJqiapnVUov/ld/oTwdLaNOc/x7JppoH9BhA/yLnCaTcStqYK5vSs08o2rXNzERF1qKGNe9BE0YMS/gW+KuYQ84ztTtWBLcDXBkIWsWESOY769hSYdlLNYYfSgo4ee8T3ia+/Q0Lkqoas9RKX1ootaDGS4HynpQAhXzfHaj8Tt7czRaHMeV5cFkYMtx3AvSYPbCajEeZRwUXxoYWdGV1VXRY5QD3J6dkGX/rKdA3GbxVlJP77ViyV+J6aKcAQN5KaMPWXC9NnLJtdXjgLkf30vSQPq+38pmuXeALEygb4HsC686mjgXg2CRqvyQjsdJdGVTJi3lA7dmseC/1MIkXsZyLcs7rZbiWWc3uzFHzj/9lojM2pXnBNPkGoIbeREYEnZD150BZHnUA6frDxdlwyyoLWMYjzGvG4Al39l+ANcesVwHgLf+nlGj/vxR0TWAI1XwLehryVgPHdMGRBioedXZ/xstujp4HBd12V6MJtbmCgemwx7sYLXTayQboihq7jOztdhK2f7i57lv8lgwd2N+9JxfdUo6uXtLX0ffIqIF1ut82QvmZzV9XCNhCmMOxm+5SoEZf35fMUam7VeUmgHlTPQeocyc5XYWlJ6yvZjh43Jxl3wjQ7mej0gWML+PH6qQwbRyjYTJOG+pv6q+ykK0jRV2qs1OZ5GCZ2J0KHUvBbn/P/KL9QXxJIS912muvRKNrWX4Mz7vT0ppKxkVmxKxCZ+a9JzN7R3uZE7k8LDg3MW55c6/41awPYo+Gw/riPgl/zziZu64OHdyhRfdPkJX/GjsrQ8XLrE35Dr0lg5Vw9cYP/EIFivGf98YeBQh+mRooFzlUqi7QNSEv9iMfuUaOgbscXvfWcthiprmhUa4a9SnnmY1SaHr/xdzGJuQlwXfJfnq+945u9l0dExxMLEtDjhOZlQQMDESnsPgfmnJxZN/5ri0GD77f1n4kchD75rsBbvCQ7Kp1OWlPMtVB7bP5gwakvG38GvxFC9KBHTgnC1BxZlPOcWIxicnogESOxpwVpl85qddB0ZKKV999Uix6N5QvL+mRqfMplxczagF014sjFhpRJQZXqFXmtUJlNYz/D9uY0eWLXzwVq472xd+oOAzbmq3pqjpDuIvMmejDL1yNNV0W50tiPl5pc60ZqU0J8LsCCCl02kyCI7EJw9N91lJPBCLPDTEVfyda3k9lbApc+onozDzCEEINIjTSoiZ041ZNFHGYsBRnjIU30qdqo+/MJ9UHXkuNx9nbrFBzHJAwkKC0Gi9Qwl7UPgg9t0jvoPtvrVtiCL/Jz4GfcC8KeHxlydtfhcuSsQ9kL+mswlrh2rKGVgjioh0CH+xbx7iMRZzEqVNzGrMSYw+8N5pJBO1f1sWWJNkvHaHuKt/FixxyKnTeKvcendsG8ixaBVKTKOmCdF127Jt9PSgA5F35ZOJxQvdxe5Z5D/QtOZZTQYsn6czdiVcc7D5247ms+Wt0U+jfxF9cabsmN/Agt+fUPRQiHrsIuqokq5MSVXRAiDDjAGOCHEFD2aZWBiMVzOGFdYe8Qq8SdB+aXnYlb10hkS5FNph57kp/FkGisIXhshny6TYsk0ofVGtbfReitUkyQMFyQxaY54IBILZburBLuTMn3d/cxdoQOPE2PAubUgdVrBFwCsXfwV8s1daLOF4H+0AvIDtYP4dKPmWRwnHJp61frLdwoXEHO8VztWMgX/xKtwWU9f+gI2PiNVo/xeHG5ctTEqwuevGgzxCJ+axPkSzHuo+u9S4Jz2yVQMT/3GzcGIeyEQuDt6KbF14UjfItlXGoLIt2DYsqpV6Coj87d/8wr3Ci4olMpmiL6cC7MmTQsG6tjxSm3O37LkmvMdYaZe5qNFKOOGceivMwom6jvk+J0AkW4GbC4VXGkThW/DETlFpYKRFvjOSrbwF2FUue661ShJIfek59gprM3rcB+vtE4TAmw1ToWDR+FMI1VMf0Y35cObC8Kc/8EkCM7CTinq7Ss8/a0wuRAWo7PkByOjanPa626ustJPZNQoWCnG7NLYeWuN4AZ3kmyexUbh0NTEhOQMEcwqG8HEUu7zMWkY4yFzIhFNdLYirxKBM9E4AQrQ1Ng6bQtMkvTYArRbxyq4Oqnqw17zmmHh7vVSR23ZlvpwAlu0wHgz6KPrzlm8ffNKM5aiHQtLXWvf9mFw3ShgUWUa2ryaVDX9NLRjSnIM+LQpxMWdwGHkNGbkjOH1knEF8hpNksSwg87KtSvWpXgqv6XJZS28islq7Vl/9soTW2kSvSdgsuQNlbwLbXGEfLE2b2XVt/QdgyKA7dqpdcVaX6bO4hOghrxpboshY/qhHlSyTkVw0eC6UzYGZYfR7x7lQ9N1hhGqvc+g8HLUk/F3aq6gqfdkupsyBReKmjGdfjo+OTsqYf6q1Zvzi7NoeSGHWUtxrk+C91VzMftIRIUxewWWOyXWrCc7zFfzOEz+OFagbGrIHq9Ik5uUvBU82wTsu/GfXrbYxAJDorxEIA+Ylh1mCk4+v73HrtxoUzHpPm46tjSAAS9cHg46azeL4vM7EUrcm4wVMvK4FWAgEoX8/e7NyzerN4AK24Cg6GVLen83Hze3pT5nKF7vpvK2c7sNaeeBgzKUGWSoiqBL5cGkP34PzaRjqp9Ieb8rNqTdKj41MoYiAu6bqNFrKGnn/tziD8gsgjWoMBfO0cJG67EjAmT+mhpphIDe7cQBQcKIWFfe7bTk6xEXKd3uL6w2yAl0nIoWTYZSJbFZ5DR/vWAITe9yq2BTrYOKcGj/9xUJSgElFtx02QgxKElpJouyCjoa6QuNfRluo52YXmmx6WPoTYXCWq8XaaZxDZCfCyWA/L1bfGSl3OZJOwOlmRrrVmfLPeX/lLxD6+EdzycZKbOKWZmDYcVHPRF8ITEhYQCRNWsgu8JGT9dbX+YKFW/iOcU4RWoi9iIglv/cIrHF21xkGhpWRLCbiDUL6CbhvpCi1XepyuxwQa+6REY3FTuBDjhZq2s6Iq0ZAGtdCZ3AKV7/pIXQcQHecnVxWG7+nuxKCKw/PgVjoROLRSiffLaqP47N1dyPNsnBaQlT6GzA806JsVW+26y7c2N5Vut+vwJ9qnQ2zdQMrxBE5/zCaNsldpw1FQZPTZRCzn0aeaO0iIqdtKGn5eiOA6m4zUvjMEGYp4uw4EWgDtTbOWZ0VKjgJd3PLKRTRpERP4dm8mMnZmwGPHHzD8kyR1UKSNzgHncEc5IMotkmXtw1dfO4aiBPtyF7qun7KgOiwA+gN+1dJxSi65vdtbp8ZO9jS1DHDpzFGny1gTFu7qto0pHQkQ3OaaGc0dchIysZ9c28QMSvtyMiu+kwPMv4KuaV3xtJ8fwlBOg8P0mexfUKkq/Ja6G99DrU5re/54GlQ0U9K6aLAe3AzMwh6P40z2OiP+B72Z67Hfq3xhtibXfy48+A+2VNbAEbC++PofWwU1MUjRxU3stmhchIDHhr/CYiER/SgchRa8+Pk2Xpex4Q5f2EvBzNLL6hmntNOJbDcah/XHnSAdjqC0+wWANxHyG8wX2W6mwvFt9WZQyktYFf1Lpeca2i4fI7ObkwVBSSC37YZ0ZB6RK6UBpt9d4t42cLFqi1uqV6h8irQ4vEcGQV46QS45NolYsx1xWSdaDS72nzI1fvrVlIekB8zr8gr3qydQJqITf2sZxd/5seott4v3bf+EbvLi8awl8yMDzQfku90BnFyz39P4IyTocmBakH9qx4i1zm3H74t2wFc6M7fgR2HGJS3EVj9G6bLaalOGrmz9prtp7K0UNrzK7RmXgsC08FxltRrIQclnDV6XjekJWF6Y8pMufYTCnCnwtIzCKi+6XeBhaTcGODXj4H4yc4B+Be7GmsPrUyLo1jvpVqZYTLuotMN/QebWKnKvhP7pKtgVNKFn1TTF5yYZr7/UWcGAGKHW83xBGKfZKoFRP1D4yYoZw2QqVQkoUvyzrBv6Z20F8cv9G0obJLMZdOmD8/jyw1ESiTl3syZNfU6vtlGlKRihtbGek7YyWGMyEYTgoaJb5EedNEAZBeCM6IpkaJa57tPiu/4+UZcfrKz49UH7WOC14k/N0hiXmXqcobyTeCL9YgkAkcj+RZd/iQUKhzUyxHwSVScA+EoUGjcIJSGowf/ObRXlrfOCZgEcrvVaA3npV9RNzuccVthgFbgQcGKAHl2jt3I6tZkoTEgWC2PTAwthl+s90aaLGvrkL+wm0Yu5Zr8xv0vTylAVeOhNOp6o5Kbkyh4MnuVCFkruC4ZPTCTdUI3c30vjXUTwEXc996JJDB6IPg68CUeIwvVkn0AgvZrvlLpzatx+aRjQ3BbRoztDOY9nhuZCpjTJuYQtviCDl6VBaSoC2YBb02Ozi7SkB/1krhZqYEgUfW/f4AX5r/wNmjg4Ye5MeAsiHiQJd/ciejRCvYaXhdGFNHAKNDAbOdDuBiqCdV0cz5n56drmcaLu+15FhURB/tI0zdP9ucxUDv17XO43wQS7ozrEeRnzl+rci1O89haXNOGrYm/1v72oieCGvRlXO8I7Ur0MbfGEpzjKwX81FJjENvU3ZrR/f2PPWXJNjib3cfCyLJyx2rVNIbTZi/LBD8KnCPC3DO0aaB4P41hBdsukh2/mgSyUk9DBkHkHvgUxd2AT7Kn83VF6xX2rhaFFJwCPB6E82DxWD+WvS5he8OBtYJup8ZXw9GHhx7+aJWSzj0PcHfiNlNHCPChJjENtkpfIRWIwy/FN6v6PnGWAx5YidBI5Xv6/57oM7vzXm/HG8swSzWlWg6oOiZFgqf2x6E/j0MqIti+9TXMQZ78iI4EjEaVQH6n+b3GEjU/vqtr1TBgJAvZ6L7m83ty3r9LtBYznixS+axBsxLN4VqQKMH9XkH04kHqoiIyUWJOEhlBHocMN8TEbk+UNld8/7Lwnimm1MHpUzsUirJvaGYf2ylpqwT7+wXxL+KTeXtxkZTA4wXAddlBOjIqPVTkJ6iNyRwAMuAElEHdS1T8dsKPF1i2C0MQpanGRqYHAoKTUoTbzYPhkyDNrRfiuX4IluX1QUO0HokqVf4zfDW1TaGn1Q36cmjPKnyd/SEv5F/adVyHrCShbd5mXDGLRZSovqFJYzsa8TGYzAoZgXgZoGAsPYoFHWBeeW5w9+Di8ogIEmpFeoEwfii686O2HIKTVdwUNMDriLOKYlhT596zqp3JHOjI6h4CZy4LfQK6CXubav3xO0z40PHk5ydS7hlysQcQoTIXrzDRP6nq32vrseH1GFgDExZRXd9EBFWJkGVqfjjdNBKPSMSpJ40vFdS69GoimB24tcysGWjw7BLwMZfw0dEOfmoFB/ES27gWgc6HQRzEa+c/xI4DvsOkZdC/PJw+8yUjW/CdbX2GLqvoNA6b4lejLjb7bDBBi6if9eIWEbvtltKn7ss2M9tdgn8h1VBYjntzzSPQagXqUVeSAinD1rWzcLd5hJyV1VXRY5QD3J6dkGX/rKdA3GbxVlJP77ViyV+J6aKcAQN5KaMPWXC9NnLJtdXjgLkf30vSQPq+38pmuXeALEygb4HsC686mjgXg2CRqvyQjsdJdGVTJi3lA7dmseC/1MIO9NSn5csWaMg2bOm9lZk/qL8Zaiuj6ifjPyBauLtgOy8fODe5pV03XNBkKsFdsSkRldeypZwkWAr1GLShAGR94BmfncmCo91KuuevuKEg3K+cfiUovRfXH3f8Y2GsZd2lqUaaFmcE3IK9v7Jw6zo6fMtDsQZeBHkHkCoVyr6D5tYE+clmsvJHZxAf/w//4282SZWj/lvGUtVvgrAZkG0JNXFUefstgFqhqXM1mJw6G9N2hXXPT4qFZWDXwaR33ACMwMGXdgfc2ADt5VrqsB1yhqDXl4WmfFTd0ltnqwIE5LzrmECeAeClmmykbexrjw/7d0+Jmu8leWlFQlfE9D7RGZ76xY7MWMnzw8F4Dz2ueAR3ykt6TMQShh/J/jDtYuROjqmGThBWz9yID9uJ7wY94jRXzTpxv4Vvz1rvruWKpUC2+M40viH3qHjCtcm01yPuov9lRpRgNzH7Eb+rOmTE2nFicOii4Dzl4L/cQocQoi7quDHeSIQDjeWLw379kppDXUdWS04Y8JLBGzBDWARJVgRVkuzE4o4vQji+08Dq6U4x43RUwuQfnsOOg35DkpwhWudJ31TBxFTOHFfuHKsiOUnfVCYHbqICmcPR/bpVVO2xqV77OQvE+YhmXTuKQjLjSQ3TYY48R5x4GdnESqBhj+RIsSKYA61IKn2AaaVfHR20B0m156XIuuFVtd/DHUmIxN2zy9xN78+gQ7BcwjZfsE/ZmoTxk3baZ8PPOwxyvQGgSAD2nffvycUotrvqpYnPffBT/oaOHdbTZptHsgdOnZ16cXgB1g5DpV9au64TUseaexo7dkb7AATpblS0ywmxq0K1Or14LwbKmyuxjc4u5o/qsF3RS5ajTFPOgpyUkpWNPGvGQ1f8sETLO6WAEAF/IevkAjWHlXTL5yL2D9qtyoER9u5WPNnOL5uQ16hUjAuE6d7BeHWPZtIgX9af4paJ/Zpo8C03+X/aZGbSrZNsC1CXoZWzTvsxki9Awrzglx3Suvr1/FrLzHV+eAQPxeLCkYOQXb1XwF2IxgN8WVWYjccMa8+ZRZvkdwS7MQWETSLErkFepa/cZN0nuvgmdV8/E+ufAsFRndg2aa1g3ryAs6pvwpKxCSLMX9TtM7PgvWGlzl0u4tmxVGb1lxd6O5HW6Sxh1UspXjmctROkqc7pT6yjzZZKr8LPsR4CX3zZgJLVWrWlEZO8nNBAaBUySuxH6PgRC2/2DltkAHwtzY8RxavKjlFDVWP5wMhkZj7eDegTBBH6NjYv9bzgzlf8djCxa+phTloZY/Q1UyQkTBCTjikV4l8+nGbz9SHLSpeILYNGlaNPBoIt12ie3/1z9/nXvVbWwXAU6BIP2THjDBP/c30GpmLKrtu3okEFOpVJj9nSHAtfHZNo1z3veAQ3gV17zPBK3wDJV8Sc25VfPQvS4xwtmdR1wJthhlMUmxKRepJJMhF4t/jzM8ZzDSsRac2srdgEKCaBK6FVA6abfQZPv7jNJ62hDE4pbolXk1nHAdp2u7bbKwP2y4TcbRNhmhunpsaeD9oH1aKEJ2A9QxX8GemP2oq5q0QIVS+khTsLBgFqJnrlljLv9ZTcaLPTmsIt1r4mFPqh5dnkl183N2ae2AAdYPfFdi0GjG6MweV3w2a9VPWh8qKASIz0uwWtAfNYI6Udq5tPLXbG65UwAPE8p354AuRriL3i8/JmhofRwiKVJLohPcpVX+kuWUslXXsmiN6yswiX/OnaT9pf4NAMZt4odQ6GSuIAQdAOimCAXX+G3XTDyxYjsQkHaSddaFX84WH0zPyr/hcM1tnSJKzKWVXYPu4+eyVwTpBXZbEgAYvJ8HuOIuER1v/LYeFpZd/yjQUtIhvScjSKk51MYY2OgZ0zj80ieQy721h9V/+tKNH65/Lt5GN8PS06WhVjut6TGrdefP6gWzp2HdevudqyAdE7QEGHnU028Kb6SyJ+yjBNdgJLNtGc7oh85b2i+/hZaK/oy9gE2DFkuajxZhBqkspiWPDhdyx00cLLsOVhm6XHQw/itd6xCfWvEYuXqKOeXv1wNEeH1NzAoEGJGXvm2JQH1VkzM6M68YdbdhbJtySrvzBGX91h2edB7cW7D1aY5PwdxkTTFOZJoY1+/mGfjOfTo7PyoIO1l56oxC0Mxcb4eUZTHk3GhfpE4h8QR+n/Yap38hj1uYwJE/OW6Ptpmuo7+k/iKne9XLV6yEcTKvx2qf00vfD0ObJNeM7O0WO+TpaDGRbEAdpKoGhMHRTthv8ZJOWFSSGOTryPa2j2IH1deqxe4dpFKpIitHOKEjTNTAHCpunlKxb2FPuoweTjV08CS/tJmoERCUVI/MfNJf0I/u17vt/L2TdlnwugeKj3pgI7GSmjEMgB5Gm8tJEjKREuJ+Ib14F7Fs+UB1EIY+eM1PLk6VEdaVqWm4Ab8xwCUc05QMMmP5du6S8892+KQ5wO4dFoDgKTc2kgoOfxoZKMEZgcZ/NKm55K5kDXDyok0Ll9+LexNd0HAzTfCA8AGHEi5OeNtf6BfQmtQg82OsKdroo7ecYU41Es48BN+YdA6phjQR0wNIyjBlzaSQsDDYGicKUg083q1+Sbu456d/0Ju2E/lOy+gdnv8N3WODjAoSForC+d6aJdeAqfEetyhELc3bZcELqr693kM0bI3nDFeooS8oE7r7z1kEJeQofnFvGrSO3pzDOzDC9xjQU7dEjdx/kVrHVEpS8t02y51kIaCSn6SyVUjHNQJGXI94R2CqElZzc00ndbA+j05Vbt5bjfRFvQnFdezy8FysFpi9qkEvIcBeu8EVbJcsBpAhd7ylu2UrxEwkAx1fgPB8zVOjGjzD/VwmxmnySPJ9QpA+jt9s0UGax5CczbMuJ4BMWwhaQRUbG8laWDYNS1yUS5jQ/iI6h49MszaNJUjLnpCiiZbZutpGqucaywgr6CutLpiu5FdpiZ9pssU65NGzdHfxGSEryI1WvevbiVdO/WsO8KPhMrYnRj/ElWFA7N8A2yQ6i3j412udcWE9xRBn5IkI4CklYxpouQAwwOdt/oETBixAeT6YIvLE6W//6mU5CxtdWT25zNx1epjmINYTY9AGjaWZhy1svac5gIi8rZDPQUStlrJSsrEXoF7smeaXL7S1CnPaw9Y3HZWW/Y78KXDKjiCv7bJvtrq5m8ySC/0v2x6NPv7iPb1LUtdeHyLl8hLwBRuMaFN7oSAEr6mf/3/hXrKVmy9WtRSwng3Fg9gMivTF7QGmk+9SgbSa50uhWbK0aDlqVTZ+TWyT9Z+PuZafa5imWdTChWk9dRWHyQ0UOUjCFOc6jjphu9KTmGea3nsVG4dDUxITkDBHMKhvBxFLu8zFpGOMhcyIRTXS2Iq8SgTPROAEK0NTYOm0LTJL02AK0W8cquDqp6sNe85ph4e71Ukdt2Zb6cAJbtMB4M+ij685ZvH3zSjOWoh0LS11rEpdZA74GGknoh/1kiLDIwGdJolUqWk6UD0t7e5f3/rNHwxhOYbUIArt2Epbx5lTGSOje9PyNbaIoflNTEmyZUZF08Nj53SQtAk8pGnvpfWJomzwHCJUklt7QcL0bnS0KMnyaGm2w16AYfKRKZD3pz+2kR00fo6gVk4LBWQDhLMg1DgcGqsY/fdHKq+k86ekikxvvhFSE4fNB/bfMPG5lQVlWSztg1CVzqvw0dgdzaQOdrU4RepKt2mqw7KMROJNCXObJIR2xjY4yoxsFAAHra3iZYimIGFtGtoFb12OwXiRtSGoy3o4JuyxV0WaN009kHV00mpyZ9Pf2v7cSLck9NExpfQL4hXBK8uj6DiQtlMnq4gpSx0c0JqHN6C/gfPZOKJ0TtuoPmLh31mCdmMZas6WKWw0XOLU4ZPZRr7rIZfP/Ch9g0puNkwQt623dF+EVrUZF8+XhoNAm7pWimrw8TDA1t0Juc3+3jbOltumZXOdYvC6p+rhF3XUyi0rqTsyAVImpxM055+QyP7nb+OESRFGXt46H91utV2WIdMgt99XQcjN5SWgyifLWWgaTMhl7C6e6EyaSQ0yBpWb9WDzDYdNqmvxk/b5UkY2ATOO1AgeGEL5xRiTP2FQUsgUCLnjSNdqS6/PDdVDHlrfEVMhLY4kFaHQIOQtBkb1Lz9dcetLQOM2K2kjg2+umH06eOB9UvJAo3A0AyOsCYtOZWm5/Hv1DHUp26EjyhLAgMsI4U4xq66ZwSnHkBr+pYJpkCcXf95Z7uByAbcZnQBrhfKqZawZiPix+oO8gZE8DqjQWYaKl72q1v9QVhe4X/uBEhHLVfv58fGyBNE9NHQBW752pmizld2pj9MmU+moc4w+p4RwACGtahuc2eC7j3oEU5CDqu0aWqiwCADG6khGsYVXGQTOqzoySUQiIT1msbb8WSB0IkVKhPxUXyreiOAwM4/2zwRbytNPDljDaS22Oa4z50GunoL3IjyJXCUmL81ZofJGqUWN9P4LaBhxfWASVNf0MIQUZPNt7OLWtbW9kvw2IperwVrkT4I9QL7Zfydt6AET5lZvJYMF1cS/TJa6c/z3XhNX25RxChmuHeVBaXZAfDq4Wzh6IhZFX4PCzmXcN9MdJXZE1wkqjjQsnOKJ5eWbv4k+LYSqaSh2eVxNtdkL9fN2MLNQzN6XCQn7SihXmb6Cv6aDG7WO0Z48dy/r1VqanOJfUgGD0m0wBS+++DQoCRt1BNVRcvdQdPkLU+S+ztWBE0pifu6bLukWgu35h4m4jWzMlX4uETv46n3dIKWNm523uL8R/yrQUzzKmRtug+ZgdolWvMVZSlTaHEeCc39wKjrj0guECquuIVnjgUoH/wWfd/E5fbstKTUzvJ2/b42rt6KY+tiz8aGKKhnHAUoVPmD6BvkpPThcbwygKDbK/iJB+3wUc91I2snVXNaW8I/L2G1DCwKeHm/m4Xgrslq6CwAZeTJz6HMx6GyXO0fniRtSxIwPsHw1pntzK2MOnv2jVJb2MZaf/T6Tplll1m9FXwDdfcIAsVRq6vtWGn1YK1wQLU5Y2gXeMGDFS72QvcWhc4yUwtMf59UJGUEK8BtxBUroIPPVk5xuMbBJ5DDo05V+KUP3M0mP+fjOdhdTIiiWt+e3BvomxSXW43SvQeyNHBZaVLg0q+pZr0wCMSuFtA94ccsZbxQ1PSY6LaZcHnKyGfYXif66/l79DS1+G/tWE5rIv2wAv7lHQapbjxCYzUIfGtB3W67RdoMYch5+aNwCyolRMjNvDLiIblPkwWzfezV7DBZYmERbwUMVTYI5/RAuPxpvOPGzyZCwFq8EwqjRDCFy4wM61EEon6zWFoPTUI5GNS9tWFOfQ9beEho0M4zg2c3HjH52tOpbHdx4ZpkT/bhCxKpBS3uoizBNXpzCuDbGLhgR5zONmwtuyXolhA4JTLOoguCHO6LKvBDyGvaEHMJ6fNJ365/KEzUPcWmdkO3phfzg9lDy3Eu6sb9n2K5r/wNmjg4Ye5MeAsiHiQJd/ciejRCvYaXhdGFNHAKNDZQs813GFC9127Ke+Bc+laRMJYx8lE2UGgoRD5n6cgv0qPu2LyQ/TMC5iI3gsIEXu7fJurPxF3caelxqNpvdSolbs5dCTsl2R1HMYsZnUdouX/RnleRBOMM+d1si2f4mSuSPWyYh8RLnvSKsdWVKX6pk3IedZWoitc97bOjrvhVW/U0TSPCQXBq7nz3RDNC6+mW6hrvk1MWA0O/7yJ8Hoq2JvFnNLNLZTlmnjTv01IUzMljItPLg/IcBJNiGrKHyZg4pgwsnrgGMN9KQjnnx7p/dw2w+3pY7obhXKmm+WDYM6uiraPvcW57RJEy7X74wofrweARXMS5o0Vmsxd9gtyxf5nrt7MYDHyzgJxtqxl1Re2rNn10I13ES4Yzuwl3AuefeuSU9uF3W4j/6VrGLE5Jv6xupC+5muIOWSvoHo1s82uaBpWaVsk6BYRwMrrMjerZqKnvyOT9DFQDE2099Hu61S8NaCk/aX97ZUUtXn5ks4jHTWYSE89NWCSQx93fe9PFMdGcxAuFfDgB9J3adNLxqA8uSdPKvy8CtvOuOl/s418LPbyr8wwy2GjGrILg16x16iMuwc1Ar4KEhR0NQYL9ywI5SLbKKONTA6BasB9BnzkWD73606C24N6P3GZKanTgjxBBdbydDgoPkFGeZ6fXhPYcxQaCqGMHkHbYm39bO799rtT8BBWosJKUzZMb30yPLYlkgIQ611oWy8F+4r9GMzJkRTcpThxBsBSYAlE1SijZrkcyvNmlC2NBBg/lqP1eWkanbkKIJxa6EPsHfMRiDrVOqPj8VNP06iLEK6ai1UIEoCnYBnbsftD/6LwF9tCGPrkzb5MWIHaBjFRy8wj1c+tpPz//TTD2xftEkmOt5lF040M87KcsTak44bcO9AikE3kzKvk1YVPQKIPho8NI+rY3UuBPy8L+z4swhHv2IY9gxzaRhq4r4/pKt1IyUwk4koCm+T3484PwT43vEnodPglV/5n4SWi+S49IFcETO0rhGFVYnt4CcuUixLe0gJ51vM15KlhwiJi5a/lxUzXzI88vq2mw4BM/fA/oOHnnOv6EiDSzfJkkiSUPOYH8R+eHU7On5PVzEv129OyY7MlKXrKQzXJFwhbsYHq0FjtUt8JPv2kxFsv70iVUgCj9Ke5f8lFUPrfnPZ7AsPKQk6Vjiig3X4vqtue4Z7jguyRn9H/kynd6ale0E5I2Kgd9JpMw8gUwDAql/s+Lon2NIfBSKdkMT8hPDAdHXADYH6bFO0j6kQox2dIpf39A73BZq/8INMHG/oLIv+SFzi2hIcezsm3OfaaKK0vD+c3gGjHtNYgy4nC+9K/4OfXTNbhijBQpbB34qdpuNfzMdnytkExSNE5jWdf+8GE/ELAMX3/irKbcQsJu+A2lVT9Ep96jufP1ljVIMevY6Kehkgdsj5n2P8QRX6hm+4kg8QDpqhvYxCQEpoiOVP6jA+G+osI13c0y0NGkL81N1e/zaVHyKHlKWh/1WN84bSIridFrF7a/TiGQZHVxFfFpXzRQ6feiZgmCEU2mbTBBb7smrTkNUqyX+o4Pc5fKjuuTigIDp4O41iMjXFK0ra2cGWGewQD1GuPftRBu10SgJBOAVK51t4K3/b8jSJUC87p59A1vFN0lhBDy5uHw2+rC9VDdwQJbPYX8z+5EukMzEy8Z9Q3V8GAFguRXbJLTUZxzXzB6w0EwPTqzcHiTwl3jqgqRr9d6562TUUyG6hwRuGeMHtDJvs1tMppZQnadUWCNAxNpluvEr29xsyQnUOih3OFr8cRa9nx0KErTxCBtBU8u6jngt1rhejijbZChOzEYH8+b6ytmCkIqlBwb5M8pkR3PixyCLRyklihaoS+895l9hJmr546OW5AJN+eTtYNDKC1l2cGFxK3BEyxjv3KMNsbr6TOZTGh0L33S4mJg5vlz80u5Z8qxDsgoS8slgoca11ad8/OaI465EcX/9pXHJwRjPQtGQrCjMFlD2rHBsPwK8A8RIpuEx/D+cNhZHlzGgxlnu9V0+6Q0w/8lJI55G992xK1VWrtBuu7dzr8UDICgDcR/1lQhUZxvknMZouE8xhTwr3jtf0S0jSYDM+W3HGqMNXbl+0oiqBk4AnNO6dyJEoJkeJ8QbrmNGzQQ5z0mFQjbTlcmSO7PtvyVemFdORU6TVmbe4RyjSDM7z2auo1A+qmq0AY/jzf8yMU34kjOumfNYMYVABQouwQyN+Q1LP3Z+iCtumsEKwUXzVePplFHQIWRVv89jXyk5nzM3oVkN0v6gSa7uM4OJxRXpJvwa5hBw5bGmXvQPMrB00k3Xful5U24olMRIvdi6kBZe9GWEHjgfu1O22DjQwJFlQp0uOYxBzC9C1bIDLHJlWXTR0Loa5I0uz+o8yGZdy8wNlJZL97mLjnRJq5KbL6cfU0HsXUBDNs17rJpBF0YA9Wr61vVo9DHGySSl5CGJMY78Bl8LxIgjckxvSLCIa9JhbvjlIK+KUiJTY7HsT2n+lne45Gn5PA0345REglMvKytmhNtThtOry9A5R9u4UydzE+QTMYaVaR3iHD9zTKIZ6pYpEY1fUGvUYq97E4/dDLVrEY2kMFWQ9Zfg===")))
| 9,989.5 | 59,865 | 0.969001 | 1,799 | 59,937 | 32.284047 | 0.982768 | 0.00186 | 0.003616 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.156684 | 0.000234 | 59,937 | 5 | 59,866 | 11,987.4 | 0.812543 | 0.000651 | 0 | 0 | 0 | 0.333333 | 0.998781 | 0.998781 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.666667 | 0 | 0.666667 | 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 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 11 |
8e8716a6ea033f1d167514114216076da1793bed | 4,740 | py | Python | data/data_volumn.py | Yangyangyanghao/traffic | f56b8ee1b1eb284ad5567868f2f55e88b06905ff | [
"MIT"
] | 5 | 2021-09-13T12:33:22.000Z | 2022-03-31T08:51:43.000Z | data/data_volumn.py | Yangyangyanghao/traffic | f56b8ee1b1eb284ad5567868f2f55e88b06905ff | [
"MIT"
] | null | null | null | data/data_volumn.py | Yangyangyanghao/traffic | f56b8ee1b1eb284ad5567868f2f55e88b06905ff | [
"MIT"
] | 3 | 2021-06-13T07:19:09.000Z | 2022-02-24T06:47:04.000Z | # -*- coding: utf-8 -*-
__Author__ = 'zhangbaojun'
__Time__ = '2018/6/6 14:00'
__File__ = 'data_volumn.py'
import pandas as pd
# time='DTCOLLECTTIME'
# volumn = 'SUM(D.NVOLUME)'
data = 'D:/Hisense/TrafficFlowPrediction/data/100211gaizao.csv'
df1 = pd.read_csv(data, encoding='utf-8', header=None, ).fillna(0)
df1.columns = ['time', 'volumn']
a = []
b=[]
# print(df1['time'].values[0][0:9])
for i in range(0, len(df1)):
if df1['time'].values[i][0:9] == '2018/1/20' or df1['time'].values[i][0:9] == '2018/1/21'\
or df1['time'].values[i][0:9] == '2018/1/27'or df1['time'].values[i][0:9] == '2018/1/28'\
or df1['time'].values[i][0:8] == '2018/2/3'or df1['time'].values[i][0:8] == '2018/2/4'\
or df1['time'].values[i][0:9] == '2018/2/10'or df1['time'].values[i][0:9] == '2018/2/15'\
or df1['time'].values[i][0:9] == '2018/2/16'or df1['time'].values[i][0:9] == '2018/2/17'\
or df1['time'].values[i][0:9] == '2018/2/18'or df1['time'].values[i][0:9] == '2018/2/19'\
or df1['time'].values[i][0:9] == '2018/2/20'or df1['time'].values[i][0:9] == '2018/2/21'\
or df1['time'].values[i][0:9] == '2018/2/25'\
or df1['time'].values[i][0:8] == '2018/3/3'or df1['time'].values[i][0:8] == '2018/3/4'\
or df1['time'].values[i][0:9] == '2018/3/10'or df1['time'].values[i][0:9] == '2018/3/11'\
or df1['time'].values[i][0:9] == '2018/3/17'or df1['time'].values[i][0:9] == '2018/3/18'\
or df1['time'].values[i][0:9] == '2018/3/24'or df1['time'].values[i][0:9] == '2018/3/25'\
or df1['time'].values[i][0:9] == '2018/3/31'or df1['time'].values[i][0:8] == '2018/4/1'\
or df1['time'].values[i][0:8] == '2018/4/5'or df1['time'].values[i][0:8] == '2018/4/6'\
or df1['time'].values[i][0:8] == '2018/4/7'or df1['time'].values[i][0:9] == '2018/4/14'\
or df1['time'].values[i][0:9] == '2018/4/15'or df1['time'].values[i][0:9] == '2018/4/21'\
or df1['time'].values[i][0:9] == '2018/4/22'or df1['time'].values[i][0:9] == '2018/4/29'\
or df1['time'].values[i][0:9] == '2018/4/28'or df1['time'].values[i][0:9] == '2018/4/30'\
or df1['time'].values[i][0:8] == '2018/5/1'or df1['time'].values[i][0:8] == '2018/5/5'\
or df1['time'].values[i][0:9] == '2018/5/6':
a.append([df1['time'].values[i],df1['volumn'].values[i]])
zhoumo=pd.DataFrame(a)
zhoumo.to_csv('100211_jiejiari.csv',index=None)
for i in range(0, len(df1)):
if df1['time'].values[i][0:9] != '2018/1/20' and df1['time'].values[i][0:9] != '2018/1/21'\
and df1['time'].values[i][0:9] != '2018/1/27'or df1['time'].values[i][0:9] != '2018/1/28'\
and df1['time'].values[i][0:8] != '2018/2/3'or df1['time'].values[i][0:8] != '2018/2/4'\
and df1['time'].values[i][0:9] != '2018/2/10'or df1['time'].values[i][0:9] != '2018/2/15'\
and df1['time'].values[i][0:9] != '2018/2/16'or df1['time'].values[i][0:9] != '2018/2/17'\
and df1['time'].values[i][0:9] != '2018/2/18'or df1['time'].values[i][0:9] != '2018/2/19'\
and df1['time'].values[i][0:9] != '2018/2/20'or df1['time'].values[i][0:9] != '2018/2/21'\
and df1['time'].values[i][0:9] != '2018/2/25'\
and df1['time'].values[i][0:8] != '2018/3/3'and df1['time'].values[i][0:8] != '2018/3/4'\
and df1['time'].values[i][0:9] != '2018/3/10'and df1['time'].values[i][0:9] != '2018/3/11'\
and df1['time'].values[i][0:9] != '2018/3/17'and df1['time'].values[i][0:9] != '2018/3/18'\
and df1['time'].values[i][0:9] != '2018/3/24'and df1['time'].values[i][0:9] != '2018/3/25'\
and df1['time'].values[i][0:9] != '2018/3/31'and df1['time'].values[i][0:8] != '2018/4/1'\
and df1['time'].values[i][0:8] != '2018/4/5'and df1['time'].values[i][0:8] != '2018/4/6'\
and df1['time'].values[i][0:8] != '2018/4/7'and df1['time'].values[i][0:9] != '2018/4/14'\
and df1['time'].values[i][0:9] != '2018/4/15'and df1['time'].values[i][0:9] != '2018/4/21'\
and df1['time'].values[i][0:9] != '2018/4/22'and df1['time'].values[i][0:9] != '2018/4/29'\
and df1['time'].values[i][0:9] != '2018/4/28'and df1['time'].values[i][0:9] != '2018/4/30'\
and df1['time'].values[i][0:8] != '2018/5/1'and df1['time'].values[i][0:8] != '2018/5/5'\
and df1['time'].values[i][0:9] != '2018/5/6':
b.append([df1['time'].values[i],df1['volumn'].values[i]])
zhoumo=pd.DataFrame(b)
zhoumo.to_csv('100211_gongzuori.csv',index=None)
# print(a)
# print(df1['time'].values[0])
| 67.714286 | 104 | 0.510549 | 882 | 4,740 | 2.723356 | 0.088435 | 0.233139 | 0.432973 | 0.454621 | 0.869692 | 0.853872 | 0.853872 | 0.853872 | 0.850541 | 0.318068 | 0 | 0.203896 | 0.187764 | 4,740 | 69 | 105 | 68.695652 | 0.42 | 0.029536 | 0 | 0.035088 | 0 | 0 | 0.250442 | 0.011936 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.017544 | 0 | 0.017544 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 |
8e8a230046b1a36f816e1936b73eb82fd750e84b | 7,129 | py | Python | src/genie/libs/parser/nxos/tests/ShowBgpLabels/cli/equal/golden_output_1_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/nxos/tests/ShowBgpLabels/cli/equal/golden_output_1_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/nxos/tests/ShowBgpLabels/cli/equal/golden_output_1_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 309 | 2019-01-16T20:21:07.000Z | 2022-03-30T12:56:41.000Z |
expected_output = {
"vrf": {
"default": {
"address_family": {
"ipv4 unicast": {
"table_version": 7,
"router_id": "10.106.0.6",
"prefix": {
"10.36.213.0/24": {
"index": {
0: {
"type_code": "i",
"in_label": "nolabel",
"status_code": "*",
"best_path": True,
"out_label": "nolabel",
"nexthop": "10.106.101.1",
"type": "internal",
"status": "valid",
"best_code": ">"
},
1: {
"type_code": "i",
"in_label": "nolabel",
"status_code": "*",
"best_path": False,
"nexthop": "10.106.102.4",
"type": "internal",
"status": "valid",
"out_label": "nolabel"
}
}
},
"10.36.212.0/24": {
"index": {
0: {
"type_code": "i",
"in_label": "nolabel",
"status_code": "*",
"best_path": True,
"out_label": "nolabel",
"nexthop": "10.106.101.1",
"type": "internal",
"status": "valid",
"best_code": ">"
},
1: {
"type_code": "i",
"in_label": "nolabel",
"status_code": "*",
"best_path": False,
"nexthop": "10.106.102.4",
"type": "internal",
"status": "valid",
"out_label": "nolabel"
}
}
},
"10.36.210.0/24": {
"index": {
0: {
"type_code": "i",
"in_label": "nolabel",
"status_code": "*",
"best_path": True,
"out_label": "nolabel",
"nexthop": "10.106.101.1",
"type": "internal",
"status": "valid",
"best_code": ">"
},
1: {
"type_code": "i",
"in_label": "nolabel",
"status_code": "*",
"best_path": False,
"nexthop": "10.106.102.4",
"type": "internal",
"status": "valid",
"out_label": "nolabel"
}
}
},
"10.36.211.0/24": {
"index": {
0: {
"type_code": "i",
"in_label": "nolabel",
"status_code": "*",
"best_path": True,
"out_label": "nolabel",
"nexthop": "10.106.101.1",
"type": "internal",
"status": "valid",
"best_code": ">"
},
1: {
"type_code": "i",
"in_label": "nolabel",
"status_code": "*",
"best_path": False,
"nexthop": "10.106.102.4",
"type": "internal",
"status": "valid",
"out_label": "nolabel"
}
}
},
"10.36.214.0/24": {
"index": {
0: {
"type_code": "i",
"in_label": "nolabel",
"status_code": "*",
"best_path": True,
"out_label": "nolabel",
"nexthop": "10.106.101.1",
"type": "internal",
"status": "valid",
"best_code": ">"
},
1: {
"type_code": "i",
"in_label": "nolabel",
"status_code": "*",
"best_path": False,
"nexthop": "10.106.102.4",
"type": "internal",
"status": "valid",
"out_label": "nolabel"
}
}
}
}
}
}
}
}
}
| 50.204225 | 67 | 0.176883 | 298 | 7,129 | 4.033557 | 0.151007 | 0.199667 | 0.074875 | 0.091514 | 0.915973 | 0.915973 | 0.915973 | 0.915973 | 0.915973 | 0.915973 | 0 | 0.082128 | 0.728433 | 7,129 | 141 | 68 | 50.560284 | 0.53874 | 0 | 0 | 0.719424 | 0 | 0 | 0.176652 | 0 | 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 | 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 |
d900a80f0cfaaaa8b73eeb9157407d15138155be | 183 | py | Python | two_thinning/constant_threshold/__init__.py | varikakasandor/dissertation-balls-into-bins | fba69dd5ffd0b4984795c9a5ec119bf8c6f47d9e | [
"Apache-2.0"
] | null | null | null | two_thinning/constant_threshold/__init__.py | varikakasandor/dissertation-balls-into-bins | fba69dd5ffd0b4984795c9a5ec119bf8c6f47d9e | [
"Apache-2.0"
] | null | null | null | two_thinning/constant_threshold/__init__.py | varikakasandor/dissertation-balls-into-bins | fba69dd5ffd0b4984795c9a5ec119bf8c6f47d9e | [
"Apache-2.0"
] | null | null | null | import two_thinning.constant_threshold.dp
import two_thinning.constant_threshold.simulation
import two_thinning.constant_threshold.simulation
import two_thinning.constant_threshold.RL | 45.75 | 49 | 0.918033 | 24 | 183 | 6.666667 | 0.333333 | 0.225 | 0.425 | 0.625 | 0.975 | 0.7625 | 0.7625 | 0.7625 | 0.7625 | 0.7625 | 0 | 0 | 0.038251 | 183 | 4 | 50 | 45.75 | 0.909091 | 0 | 0 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 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 | 14 |
d9400778feddb626be424db64c8dfba24f8f3480 | 2,690 | py | Python | Lemon Bot/economy_utils.py | sudiptacc/DIscord-Bot | 5dd270b2a3db0977098ee44d48141eb7a886b078 | [
"MIT"
] | 1 | 2020-10-18T21:08:02.000Z | 2020-10-18T21:08:02.000Z | Lemon Bot/economy_utils.py | sudiptacc/Discord-Bot | 5dd270b2a3db0977098ee44d48141eb7a886b078 | [
"MIT"
] | null | null | null | Lemon Bot/economy_utils.py | sudiptacc/Discord-Bot | 5dd270b2a3db0977098ee44d48141eb7a886b078 | [
"MIT"
] | null | null | null | import json
# BALANCE FUNCTIONS
def withdraw(user, amount):
with open('./jsons/playerstats.json', 'r') as f:
playerstats = json.load(f)
playerstats[str(user)]['balance'] -= amount
with open('./jsons/playerstats.json', 'w') as f:
json.dump(playerstats, f, indent=4)
def deposit(user, amount):
with open('./jsons/playerstats.json', 'r') as f:
playerstats = json.load(f)
playerstats[str(user)]['balance'] += amount
with open('./jsons/playerstats.json', 'w') as f:
json.dump(playerstats, f, indent=4)
def get_balance(user):
with open('./jsons/playerstats.json', 'r') as f:
playerstats = json.load(f)
return playerstats[str(user)]['balance']
def get_inventory(user):
with open('./jsons/playerstats.json', 'r') as f:
playerstats = json.load(f)
return playerstats[str(user)]['inventory']
# MULTIPLIER AND level AND prestige FUNCTIONS
def get_multiplier(user):
with open('./jsons/playerstats.json', 'r') as f:
playerstats = json.load(f)
return playerstats[str(user)]['multiplier']
def get_level(user):
with open('./jsons/playerstats.json', 'r') as f:
playerstats = json.load(f)
if playerstats[str(user)]['level'] >= 100:
return 'MAX'
return playerstats[str(user)]['level']
def add_multiplier(user):
with open('./jsons/playerstats.json', 'r') as f:
playerstats = json.load(f)
playerstats[str(user)]['multiplier'] += 0.25
with open('./jsons/playerstats.json', 'w') as f:
json.dump(playerstats, f, indent=4)
def add_level(user):
with open('./jsons/playerstats.json', 'r') as f:
playerstats = json.load(f)
playerstats[str(user)]['level'] += 1
with open('./jsons/playerstats.json', 'w') as f:
json.dump(playerstats, f, indent=4)
def level_can_happen(user):
with open('./jsons/playerstats.json', 'r') as f:
playerstats = json.load(f)
if playerstats[str(user)]['level'] >= 100:
return False
if playerstats[str(user)]['balance'] >= round((5 * get_level(user)**3)/5):
return True
else:
return False
def level_action(user):
with open('./jsons/playerstats.json', 'r') as f:
playerstats = json.load(f)
if level_can_happen(user):
playerstats[str(user)]['balance'] >= round((5 * get_level(user)**3)/5)
withdraw(user, round((5 * get_level(user)**3)/5))
add_level(user)
add_multiplier(user)
def get_prestige(user):
with open('./jsons/playerstats.json', 'r') as f:
playerstats = json.load(f)
return playerstats[str(user)]['prestige']
| 26.633663 | 78 | 0.610781 | 353 | 2,690 | 4.606232 | 0.127479 | 0.239852 | 0.119926 | 0.221402 | 0.787208 | 0.787208 | 0.787208 | 0.774908 | 0.774908 | 0.774908 | 0 | 0.010979 | 0.22119 | 2,690 | 100 | 79 | 26.9 | 0.765155 | 0.022677 | 0 | 0.53125 | 0 | 0 | 0.179389 | 0.137405 | 0 | 0 | 0 | 0 | 0 | 1 | 0.171875 | false | 0 | 0.015625 | 0 | 0.328125 | 0 | 0 | 0 | 0 | null | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
79440c302f15194637e767cbd4116cade302422a | 140,196 | py | Python | tests/test_temporal.py | jasonb5/xcdat | 4a35d6a6131fe3fec22593f54a9e48b640ceac4f | [
"Apache-2.0"
] | null | null | null | tests/test_temporal.py | jasonb5/xcdat | 4a35d6a6131fe3fec22593f54a9e48b640ceac4f | [
"Apache-2.0"
] | null | null | null | tests/test_temporal.py | jasonb5/xcdat | 4a35d6a6131fe3fec22593f54a9e48b640ceac4f | [
"Apache-2.0"
] | null | null | null | from datetime import datetime
import cftime
import numpy as np
import pandas as pd
import pytest
import xarray as xr
from xarray.tests import requires_dask
from tests.fixtures import generate_dataset
from xcdat.temporal import TemporalAccessor
class TestTemporalAccessor:
def test__init__(self):
ds: xr.Dataset = generate_dataset(cf_compliant=True, has_bounds=True)
obj = TemporalAccessor(ds)
assert obj._dataset.identical(ds)
def test_decorator(self):
ds: xr.Dataset = generate_dataset(cf_compliant=True, has_bounds=True)
obj = ds.temporal
assert obj._dataset.identical(ds)
class TestAverage:
def test_weighted_annual_avg(self):
ds: xr.Dataset = generate_dataset(cf_compliant=True, has_bounds=True)
result = ds.temporal.average("ts", "year")
expected = ds.copy()
expected = expected.drop_dims("time")
time_new = xr.DataArray(
data=np.array(
["2000-01-01T00:00:00.000000000", "2001-01-01T00:00:00.000000000"],
dtype="datetime64[ns]",
),
coords={
"time": np.array(
[
"2000-01-01T00:00:00.000000000",
"2001-01-01T00:00:00.000000000",
],
dtype="datetime64[ns]",
)
},
dims=["time"],
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
expected["ts"] = xr.DataArray(
name="ts",
data=np.ones((2, 4, 4)),
coords={
"lat": ds.lat,
"lon": ds.lon,
"time": time_new,
},
dims=["time", "lat", "lon"],
attrs={
"operation": "temporal_avg",
"mode": "time_series",
"freq": "year",
"weighted": "True",
"center_times": "False",
},
)
# For some reason, there is a very small floating point difference
# between both for ts so we have to use floating point comparison
xr.testing.assert_allclose(result, expected)
assert result.ts.attrs == expected.ts.attrs
class TestClimatology:
def test_weighted_seasonal_climatology_with_DJF(self):
ds: xr.Dataset = generate_dataset(cf_compliant=True, has_bounds=True)
result = ds.temporal.climatology(
"ts",
"season",
season_config={"dec_mode": "DJF", "drop_incomplete_djf": True},
)
expected = ds.copy()
expected = expected.drop_dims("time")
expected_time = xr.DataArray(
data=np.array(
[
cftime.datetime(1, 1, 1),
cftime.datetime(1, 4, 1),
cftime.datetime(1, 7, 1),
cftime.datetime(1, 10, 1),
],
),
coords={
"time": np.array(
[
cftime.datetime(1, 1, 1),
cftime.datetime(1, 4, 1),
cftime.datetime(1, 7, 1),
cftime.datetime(1, 10, 1),
],
),
},
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
expected["ts"] = xr.DataArray(
name="ts",
data=np.ones((4, 4, 4)),
coords={"lat": ds.lat, "lon": ds.lon, "time": expected_time},
dims=["time", "lat", "lon"],
attrs={
"operation": "temporal_avg",
"mode": "climatology",
"freq": "season",
"weighted": "True",
"center_times": "False",
"dec_mode": "DJF",
"drop_incomplete_djf": "True",
},
)
assert result.identical(expected)
class TestDepartures:
# TODO: Update TestDepartures tests to use other numbers rather than 1's for
# better test reliability and accuracy. This may require subsetting.
@pytest.fixture(autouse=True)
def setup(self):
self.ds: xr.Dataset = generate_dataset(cf_compliant=True, has_bounds=True)
self.seasons = ["JJA", "MAM", "SON", "DJF"]
def test_weighted_seasonal_departures_with_DJF(self):
# Create a post-climatology dataset.
ds = self.ds.copy()
# Drop incomplete DJF seasons
ds = ds.isel(time=slice(2, -1))
# Compare result of the method against the expected.
result = ds.temporal.departures(
"ts",
"season",
season_config={"dec_mode": "DJF", "drop_incomplete_djf": True},
)
expected = ds.copy()
expected["ts"] = xr.DataArray(
data=np.zeros((12, 4, 4)),
coords={
"lat": ds.lat,
"lon": ds.lon,
"time": ds.time,
},
dims=["time", "lat", "lon"],
attrs={
"operation": "temporal_avg",
"mode": "departures",
"freq": "season",
"weighted": "True",
"center_times": "False",
"dec_mode": "DJF",
"drop_incomplete_djf": "True",
},
)
assert result.identical(expected)
def test_unweighted_seasonal_departures_with_DJF(self):
ds = self.ds.copy()
# Drop incomplete DJF seasons
ds = ds.isel(time=slice(2, -1))
# Compare result of the method against the expected.
result = ds.temporal.departures(
"ts",
"season",
weighted=False,
season_config={"dec_mode": "DJF", "drop_incomplete_djf": True},
)
expected = ds.copy()
expected["ts"] = xr.DataArray(
data=np.zeros((12, 4, 4)),
coords={
"lat": ds.lat,
"lon": ds.lon,
"time": ds.time,
},
dims=["time", "lat", "lon"],
attrs={
"operation": "temporal_avg",
"mode": "departures",
"freq": "season",
"weighted": "False",
"center_times": "False",
"dec_mode": "DJF",
"drop_incomplete_djf": "True",
},
)
assert result.identical(expected)
def test_unweighted_seasonal_departures_with_JFD(self):
ds = self.ds.copy()
# Compare result of the method against the expected.
result = ds.temporal.departures(
"ts",
"season",
weighted=False,
season_config={"dec_mode": "JFD"},
)
expected = ds.copy()
expected["ts"] = xr.DataArray(
data=np.zeros((15, 4, 4)),
coords={
"lat": ds.lat,
"lon": ds.lon,
"time": ds.time,
},
dims=["time", "lat", "lon"],
attrs={
"operation": "temporal_avg",
"mode": "departures",
"freq": "season",
"weighted": "False",
"center_times": "False",
"dec_mode": "JFD",
},
)
assert result.identical(expected)
class TestCenterTimes:
@pytest.fixture(autouse=True)
def setup(self):
self.ds = generate_dataset(cf_compliant=True, has_bounds=True)
def test_raises_error_if_time_dimension_does_not_exist_in_dataset(self):
ds = self.ds.copy()
ds = ds.drop_dims("time")
with pytest.raises(KeyError):
ds.temporal.center_times(ds)
def test_gets_time_as_the_midpoint_between_time_bounds(self):
ds = self.ds.copy()
# Make the time coordinates uncentered.
uncentered_time = np.array(
[
"2000-01-31T12:00:00.000000000",
"2000-02-29T12:00:00.000000000",
"2000-03-31T12:00:00.000000000",
"2000-04-30T00:00:00.000000000",
"2000-05-31T12:00:00.000000000",
"2000-06-30T00:00:00.000000000",
"2000-07-31T12:00:00.000000000",
"2000-08-31T12:00:00.000000000",
"2000-09-30T00:00:00.000000000",
"2000-10-16T12:00:00.000000000",
"2000-11-30T00:00:00.000000000",
"2000-12-31T12:00:00.000000000",
"2001-01-31T12:00:00.000000000",
"2001-02-28T00:00:00.000000000",
"2001-12-31T12:00:00.000000000",
],
dtype="datetime64[ns]",
)
ds.time.data[:] = uncentered_time
# Set object attrs required to test the method.
ds.temporal._time_bounds = ds.time_bnds.copy()
# Compare result of the method against the expected.
expected = ds.copy()
expected_time_data = np.array(
[
"2000-01-16T12:00:00.000000000",
"2000-02-15T12:00:00.000000000",
"2000-03-16T12:00:00.000000000",
"2000-04-16T00:00:00.000000000",
"2000-05-16T12:00:00.000000000",
"2000-06-16T00:00:00.000000000",
"2000-07-16T12:00:00.000000000",
"2000-08-16T12:00:00.000000000",
"2000-09-16T00:00:00.000000000",
"2000-10-16T12:00:00.000000000",
"2000-11-16T00:00:00.000000000",
"2000-12-16T12:00:00.000000000",
"2001-01-16T12:00:00.000000000",
"2001-02-15T00:00:00.000000000",
"2001-12-16T12:00:00.000000000",
],
dtype="datetime64[ns]",
)
expected = expected.assign_coords(
{
"time": xr.DataArray(
name="time",
data=expected_time_data,
coords={"time": expected_time_data},
dims="time",
attrs={
"long_name": "time",
"standard_name": "time",
"axis": "T",
"bounds": "time_bnds",
},
)
}
)
# Update time bounds with centered time coordinates.
time_bounds = ds.time_bnds.copy()
time_bounds["time"] = expected.time
expected["time_bnds"] = time_bounds
result = ds.temporal.center_times(ds)
assert result.identical(expected)
class TestTemporalAvg:
# TODO: Update TestTimeSeries tests to use other numbers rather than 1's
# for better test reliability and accuracy. This may require subsetting.
class TestTimeSeries:
@pytest.fixture(autouse=True)
def setup(self):
# FIXME: Update test this so that it is accurate, rather than 1's
# for averages
# May involve subsetting
self.ds: xr.Dataset = generate_dataset(cf_compliant=True, has_bounds=True)
def test_weighted_annual_avg(self):
ds = self.ds.copy()
result = ds.temporal._temporal_avg("ts", "time_series", "year")
expected = ds.copy()
expected = expected.drop_dims("time")
time_new = xr.DataArray(
data=np.array(
["2000-01-01T00:00:00.000000000", "2001-01-01T00:00:00.000000000"],
dtype="datetime64[ns]",
),
coords={
"time": np.array(
[
"2000-01-01T00:00:00.000000000",
"2001-01-01T00:00:00.000000000",
],
dtype="datetime64[ns]",
)
},
dims=["time"],
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
expected["ts"] = xr.DataArray(
name="ts",
data=np.ones((2, 4, 4)),
coords={
"lat": self.ds.lat,
"lon": self.ds.lon,
"time": time_new,
},
dims=["time", "lat", "lon"],
attrs={
"operation": "temporal_avg",
"mode": "time_series",
"freq": "year",
"weighted": "True",
"center_times": "False",
},
)
# For some reason, there is a very small floating point difference
# between both for ts so we have to use floating point comparison
xr.testing.assert_allclose(result, expected)
assert result.ts.attrs == expected.ts.attrs
@requires_dask
def test_weighted_annual_avg_with_chunking(self):
ds = self.ds.copy().chunk({"time": 2})
result = ds.temporal._temporal_avg("ts", "time_series", "year")
expected = ds.copy()
expected = expected.drop_dims("time")
time_new = xr.DataArray(
data=np.array(
["2000-01-01T00:00:00.000000000", "2001-01-01T00:00:00.000000000"],
dtype="datetime64[ns]",
),
coords={
"time": np.array(
[
"2000-01-01T00:00:00.000000000",
"2001-01-01T00:00:00.000000000",
],
dtype="datetime64[ns]",
)
},
dims=["time"],
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
expected["ts"] = xr.DataArray(
name="ts",
data=np.ones((2, 4, 4)),
coords={
"lat": self.ds.lat,
"lon": self.ds.lon,
"time": time_new,
},
dims=["time", "lat", "lon"],
attrs={
"operation": "temporal_avg",
"mode": "time_series",
"freq": "year",
"weighted": "True",
"center_times": "False",
},
)
# For some reason, there is a very small floating point difference
# between both for ts so we have to use floating point comparison
xr.testing.assert_allclose(result, expected)
assert result.ts.attrs == expected.ts.attrs
def test_weighted_annual_avg_with_centering_time(self):
ds = self.ds.copy()
result = ds.temporal._temporal_avg(
"ts", "time_series", "year", center_times=True
)
expected = ds.copy()
expected = expected.drop_dims("time")
time_new = xr.DataArray(
data=np.array(
["2000-01-01T00:00:00.000000000", "2001-01-01T00:00:00.000000000"],
dtype="datetime64[ns]",
),
coords={
"time": np.array(
[
"2000-01-01T00:00:00.000000000",
"2001-01-01T00:00:00.000000000",
],
dtype="datetime64[ns]",
)
},
dims=["time"],
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
expected["ts"] = xr.DataArray(
name="ts",
data=np.ones((2, 4, 4)),
coords={
"lat": self.ds.lat,
"lon": self.ds.lon,
"time": time_new,
},
dims=["time", "lat", "lon"],
attrs={
"operation": "temporal_avg",
"mode": "time_series",
"freq": "year",
"weighted": "True",
"center_times": "True",
},
)
# For some reason, there is a floating point difference between both
# for ts so we have to use floating point comparison
xr.testing.assert_allclose(result, expected)
assert result.ts.attrs == expected.ts.attrs
def test_weighted_seasonal_avg_with_DJF(self):
ds = self.ds.copy()
result = ds.temporal._temporal_avg(
"ts",
"time_series",
"season",
season_config={"dec_mode": "DJF", "drop_incomplete_djf": True},
)
expected = ds.copy()
# Drop the incomplete DJF seasons
expected = expected.isel(time=slice(2, -1))
expected = expected.drop_dims("time")
time_new = xr.DataArray(
data=np.array(
[
"2000-04-01T00:00:00.000000000",
"2000-07-01T00:00:00.000000000",
"2000-10-01T00:00:00.000000000",
"2001-01-01T00:00:00.000000000",
],
dtype="datetime64[ns]",
),
coords={
"time": np.array(
[
"2000-04-01T00:00:00.000000000",
"2000-07-01T00:00:00.000000000",
"2000-10-01T00:00:00.000000000",
"2001-01-01T00:00:00.000000000",
],
dtype="datetime64[ns]",
)
},
dims=["time"],
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
expected["ts"] = xr.DataArray(
name="ts",
data=np.ones((4, 4, 4)),
coords={
"lat": self.ds.lat,
"lon": self.ds.lon,
"time": time_new,
},
dims=["time", "lat", "lon"],
attrs={
"operation": "temporal_avg",
"mode": "time_series",
"freq": "season",
"weighted": "True",
"center_times": "False",
"dec_mode": "DJF",
"drop_incomplete_djf": "True",
},
)
assert result.identical(expected)
def test_weighted_seasonal_avg_with_DJF_without_dropping_incomplete_seasons(
self,
):
ds = self.ds.copy()
result = ds.temporal._temporal_avg(
"ts",
"time_series",
"season",
season_config={"dec_mode": "DJF", "drop_incomplete_djf": False},
)
expected = ds.copy()
expected = expected.drop_dims("time")
time_new = xr.DataArray(
data=np.array(
[
"2000-01-01T00:00:00.000000000",
"2000-04-01T00:00:00.000000000",
"2000-07-01T00:00:00.000000000",
"2000-10-01T00:00:00.000000000",
"2001-01-01T00:00:00.000000000",
"2002-01-01T00:00:00.000000000",
],
dtype="datetime64[ns]",
),
coords={
"time": np.array(
[
"2000-01-01T00:00:00.000000000",
"2000-04-01T00:00:00.000000000",
"2000-07-01T00:00:00.000000000",
"2000-10-01T00:00:00.000000000",
"2001-01-01T00:00:00.000000000",
"2002-01-01T00:00:00.000000000",
],
dtype="datetime64[ns]",
)
},
dims=["time"],
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
expected["ts"] = xr.DataArray(
name="ts",
data=np.ones((6, 4, 4)),
coords={
"lat": self.ds.lat,
"lon": self.ds.lon,
"time": time_new,
},
dims=["time", "lat", "lon"],
attrs={
"operation": "temporal_avg",
"mode": "time_series",
"freq": "season",
"weighted": "True",
"center_times": "False",
"dec_mode": "DJF",
"drop_incomplete_djf": "False",
},
)
assert result.identical(expected)
def test_weighted_seasonal_avg_with_JFD(self):
ds = self.ds.copy()
ds = self.ds.copy()
result = ds.temporal._temporal_avg(
"ts",
"time_series",
"season",
season_config={"dec_mode": "JFD"},
)
expected = ds.copy()
expected = expected.drop_dims("time")
time_new = xr.DataArray(
data=np.array(
[
"2000-01-01T00:00:00.000000000",
"2000-04-01T00:00:00.000000000",
"2000-07-01T00:00:00.000000000",
"2000-10-01T00:00:00.000000000",
"2001-01-01T00:00:00.000000000",
],
dtype="datetime64[ns]",
),
coords={
"time": np.array(
[
"2000-01-01T00:00:00.000000000",
"2000-04-01T00:00:00.000000000",
"2000-07-01T00:00:00.000000000",
"2000-10-01T00:00:00.000000000",
"2001-01-01T00:00:00.000000000",
],
dtype="datetime64[ns]",
)
},
dims=["time"],
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
expected["ts"] = xr.DataArray(
name="ts",
data=np.ones((5, 4, 4)),
coords={
"lat": self.ds.lat,
"lon": self.ds.lon,
"time": time_new,
},
dims=["time", "lat", "lon"],
attrs={
"operation": "temporal_avg",
"mode": "time_series",
"freq": "season",
"weighted": "True",
"center_times": "False",
"dec_mode": "JFD",
},
)
assert result.identical(expected)
def test_weighted_custom_season_avg(self):
ds = self.ds.copy()
custom_seasons = [
["Jan", "Feb", "Mar"],
["Apr", "May", "Jun"],
["Jul", "Aug", "Sep"],
["Oct", "Nov", "Dec"],
]
result = ds.temporal._temporal_avg(
"ts",
"time_series",
"season",
season_config={"custom_seasons": custom_seasons},
)
expected = ds.copy()
expected = expected.drop_dims("time")
expected_time = xr.DataArray(
data=np.array(
[
"2000-02-01T00:00:00.000000000",
"2000-05-01T00:00:00.000000000",
"2000-08-01T00:00:00.000000000",
"2000-11-01T00:00:00.000000000",
"2001-02-01T00:00:00.000000000",
"2001-11-01T00:00:00.000000000",
],
dtype="datetime64[ns]",
),
coords={
"time": np.array(
[
"2000-02-01T00:00:00.000000000",
"2000-05-01T00:00:00.000000000",
"2000-08-01T00:00:00.000000000",
"2000-11-01T00:00:00.000000000",
"2001-02-01T00:00:00.000000000",
"2001-11-01T00:00:00.000000000",
],
dtype="datetime64[ns]",
),
},
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
expected["ts"] = xr.DataArray(
name="ts",
data=np.ones((6, 4, 4)),
coords={"lat": self.ds.lat, "lon": self.ds.lon, "time": expected_time},
dims=["time", "lat", "lon"],
attrs={
"operation": "temporal_avg",
"mode": "time_series",
"freq": "season",
"custom_seasons": [
"JanFebMar",
"AprMayJun",
"JulAugSep",
"OctNovDec",
],
"weighted": "True",
"center_times": "False",
},
)
assert result.identical(expected)
def test_weighted_monthly_avg(self):
ds = self.ds.copy()
result = ds.temporal._temporal_avg("ts", "time_series", "month")
expected = ds.copy()
expected = expected.drop_dims("time")
time_new = xr.DataArray(
data=np.array(
[
"2000-01-01T00:00:00.000000000",
"2000-02-01T00:00:00.000000000",
"2000-03-01T00:00:00.000000000",
"2000-04-01T00:00:00.000000000",
"2000-05-01T00:00:00.000000000",
"2000-06-01T00:00:00.000000000",
"2000-07-01T00:00:00.000000000",
"2000-08-01T00:00:00.000000000",
"2000-09-01T00:00:00.000000000",
"2000-10-01T00:00:00.000000000",
"2000-11-01T00:00:00.000000000",
"2000-12-01T00:00:00.000000000",
"2001-01-01T00:00:00.000000000",
"2001-02-01T00:00:00.000000000",
"2001-12-01T00:00:00.000000000",
],
dtype="datetime64[ns]",
),
coords={
"time": np.array(
[
"2000-01-01T00:00:00.000000000",
"2000-02-01T00:00:00.000000000",
"2000-03-01T00:00:00.000000000",
"2000-04-01T00:00:00.000000000",
"2000-05-01T00:00:00.000000000",
"2000-06-01T00:00:00.000000000",
"2000-07-01T00:00:00.000000000",
"2000-08-01T00:00:00.000000000",
"2000-09-01T00:00:00.000000000",
"2000-10-01T00:00:00.000000000",
"2000-11-01T00:00:00.000000000",
"2000-12-01T00:00:00.000000000",
"2001-01-01T00:00:00.000000000",
"2001-02-01T00:00:00.000000000",
"2001-12-01T00:00:00.000000000",
],
dtype="datetime64[ns]",
),
},
dims=["time"],
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
expected["ts"] = xr.DataArray(
name="ts",
data=np.ones((15, 4, 4)),
coords={
"lat": self.ds.lat,
"lon": self.ds.lon,
"time": time_new,
},
dims=["time", "lat", "lon"],
attrs={
"operation": "temporal_avg",
"mode": "time_series",
"freq": "month",
"weighted": "True",
"center_times": "False",
},
)
assert result.identical(expected)
def test_weighted_daily_avg(self):
ds = self.ds.copy()
result = ds.temporal._temporal_avg("ts", "time_series", "day")
expected = ds.copy()
expected = expected.drop_dims("time")
time_new = xr.DataArray(
data=np.array(
[
"2000-01-16T00:00:00.000000000",
"2000-02-15T00:00:00.000000000",
"2000-03-16T00:00:00.000000000",
"2000-04-16T00:00:00.000000000",
"2000-05-16T00:00:00.000000000",
"2000-06-16T00:00:00.000000000",
"2000-07-16T00:00:00.000000000",
"2000-08-16T00:00:00.000000000",
"2000-09-16T00:00:00.000000000",
"2000-10-16T00:00:00.000000000",
"2000-11-16T00:00:00.000000000",
"2000-12-16T00:00:00.000000000",
"2001-01-16T00:00:00.000000000",
"2001-02-15T00:00:00.000000000",
"2001-12-16T00:00:00.000000000",
],
dtype="datetime64[ns]",
),
coords={
"time": np.array(
[
"2000-01-16T00:00:00.000000000",
"2000-02-15T00:00:00.000000000",
"2000-03-16T00:00:00.000000000",
"2000-04-16T00:00:00.000000000",
"2000-05-16T00:00:00.000000000",
"2000-06-16T00:00:00.000000000",
"2000-07-16T00:00:00.000000000",
"2000-08-16T00:00:00.000000000",
"2000-09-16T00:00:00.000000000",
"2000-10-16T00:00:00.000000000",
"2000-11-16T00:00:00.000000000",
"2000-12-16T00:00:00.000000000",
"2001-01-16T00:00:00.000000000",
"2001-02-15T00:00:00.000000000",
"2001-12-16T00:00:00.000000000",
],
dtype="datetime64[ns]",
),
},
dims=["time"],
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
expected["ts"] = xr.DataArray(
name="ts",
data=np.ones((15, 4, 4)),
coords={
"lat": self.ds.lat,
"lon": self.ds.lon,
"time": time_new,
},
dims=["time", "lat", "lon"],
attrs={
"operation": "temporal_avg",
"mode": "time_series",
"freq": "day",
"weighted": "True",
"center_times": "False",
},
)
assert result.identical(expected)
def test_weighted_hourly_avg(self):
ds = self.ds.copy()
ds.coords["time"].attrs["bounds"] = "time_bnds"
result = ds.temporal._temporal_avg("ts", "time_series", "hour")
expected = ds.copy()
expected["ts_original"] = ds.ts.copy()
expected["ts"] = xr.DataArray(
name="ts",
data=np.ones((15, 4, 4)),
coords={
"lat": self.ds.lat,
"lon": self.ds.lon,
"year_month_day_hour": pd.MultiIndex.from_tuples(
[
(2000, 1, 16, 12),
(2000, 2, 15, 12),
(2000, 3, 16, 12),
(2000, 4, 16, 0),
(2000, 5, 16, 12),
(2000, 6, 16, 0),
(2000, 7, 16, 12),
(2000, 8, 16, 12),
(2000, 9, 16, 0),
(2000, 10, 16, 12),
(2000, 11, 16, 0),
(2000, 12, 16, 12),
(2001, 1, 16, 12),
(2001, 2, 15, 0),
(2001, 12, 16, 12),
]
),
},
dims=["year_month_day_hour", "lat", "lon"],
attrs={
"operation": "temporal_avg",
"mode": "time_series",
"freq": "hour",
"weighted": "True",
"center_times": "False",
},
)
expected = ds.copy()
expected = expected.drop_dims("time")
time_new = xr.DataArray(
data=np.array(
[
"2000-01-16T12:00:00.000000000",
"2000-02-15T12:00:00.000000000",
"2000-03-16T12:00:00.000000000",
"2000-04-16T00:00:00.000000000",
"2000-05-16T12:00:00.000000000",
"2000-06-16T00:00:00.000000000",
"2000-07-16T12:00:00.000000000",
"2000-08-16T12:00:00.000000000",
"2000-09-16T00:00:00.000000000",
"2000-10-16T12:00:00.000000000",
"2000-11-16T00:00:00.000000000",
"2000-12-16T12:00:00.000000000",
"2001-01-16T12:00:00.000000000",
"2001-02-15T00:00:00.000000000",
"2001-12-16T12:00:00.000000000",
],
dtype="datetime64[ns]",
),
coords={
"time": np.array(
[
"2000-01-16T12:00:00.000000000",
"2000-02-15T12:00:00.000000000",
"2000-03-16T12:00:00.000000000",
"2000-04-16T00:00:00.000000000",
"2000-05-16T12:00:00.000000000",
"2000-06-16T00:00:00.000000000",
"2000-07-16T12:00:00.000000000",
"2000-08-16T12:00:00.000000000",
"2000-09-16T00:00:00.000000000",
"2000-10-16T12:00:00.000000000",
"2000-11-16T00:00:00.000000000",
"2000-12-16T12:00:00.000000000",
"2001-01-16T12:00:00.000000000",
"2001-02-15T00:00:00.000000000",
"2001-12-16T12:00:00.000000000",
],
dtype="datetime64[ns]",
),
},
dims=["time"],
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
expected["ts"] = xr.DataArray(
name="ts",
data=np.ones((15, 4, 4)),
coords={
"lat": self.ds.lat,
"lon": self.ds.lon,
"time": time_new,
},
dims=["time", "lat", "lon"],
attrs={
"operation": "temporal_avg",
"mode": "time_series",
"freq": "hour",
"weighted": "True",
"center_times": "False",
},
)
assert result.identical(expected)
class TestClimatology:
# TODO: Update TestClimatology tests to use other numbers rather than 1's
# for better test reliability and accuracy. This may require subsetting.
@pytest.fixture(autouse=True)
def setup(self):
self.ds: xr.Dataset = generate_dataset(cf_compliant=True, has_bounds=True)
def test_raises_error_without_time_dimension(self):
ds = self.ds.copy()
ds = ds.drop_dims("time")
with pytest.raises(KeyError):
ds.temporal._temporal_avg("climatology", "season", "ts")
def test_raises_error_with_incorrect_freq_arg(self):
with pytest.raises(ValueError):
self.ds.temporal._temporal_avg(
"ts",
"climatology",
"incorrect_freq",
)
def test_raises_error_with_incorrect_dec_mode_arg(self):
with pytest.raises(ValueError):
self.ds.temporal._temporal_avg(
"ts",
"climatology",
freq="season",
season_config={"dec_mode": "incorrect"},
)
def test_raises_error_if_data_var_does_not_exist_in_dataset(self):
with pytest.raises(KeyError):
self.ds.temporal._temporal_avg(
"nonexistent_var", "climatology", freq="season"
)
def test_weighted_seasonal_climatology_with_DJF(self):
ds = self.ds.copy()
result = ds.temporal._temporal_avg(
"ts",
"climatology",
"season",
season_config={"dec_mode": "DJF", "drop_incomplete_djf": True},
)
expected = ds.copy()
expected = expected.drop_dims("time")
expected_time = xr.DataArray(
data=np.array(
[
cftime.datetime(1, 1, 1),
cftime.datetime(1, 4, 1),
cftime.datetime(1, 7, 1),
cftime.datetime(1, 10, 1),
],
),
coords={
"time": np.array(
[
cftime.datetime(1, 1, 1),
cftime.datetime(1, 4, 1),
cftime.datetime(1, 7, 1),
cftime.datetime(1, 10, 1),
],
),
},
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
expected["ts"] = xr.DataArray(
name="ts",
data=np.ones((4, 4, 4)),
coords={"lat": self.ds.lat, "lon": self.ds.lon, "time": expected_time},
dims=["time", "lat", "lon"],
attrs={
"operation": "temporal_avg",
"mode": "climatology",
"freq": "season",
"weighted": "True",
"center_times": "False",
"dec_mode": "DJF",
"drop_incomplete_djf": "True",
},
)
assert result.identical(expected)
@requires_dask
def test_chunked_weighted_seasonal_climatology_with_DJF(self):
ds = self.ds.copy().chunk({"time": 2})
result = ds.temporal._temporal_avg(
"ts",
"climatology",
"season",
season_config={"dec_mode": "DJF", "drop_incomplete_djf": True},
)
expected = ds.copy()
expected = expected.drop_dims("time")
expected_time = xr.DataArray(
data=np.array(
[
cftime.datetime(1, 1, 1),
cftime.datetime(1, 4, 1),
cftime.datetime(1, 7, 1),
cftime.datetime(1, 10, 1),
],
),
coords={
"time": np.array(
[
cftime.datetime(1, 1, 1),
cftime.datetime(1, 4, 1),
cftime.datetime(1, 7, 1),
cftime.datetime(1, 10, 1),
],
),
},
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
expected["ts"] = xr.DataArray(
name="ts",
data=np.ones((4, 4, 4)),
coords={"lat": self.ds.lat, "lon": self.ds.lon, "time": expected_time},
dims=["time", "lat", "lon"],
attrs={
"operation": "temporal_avg",
"mode": "climatology",
"freq": "season",
"weighted": "True",
"center_times": "False",
"dec_mode": "DJF",
"drop_incomplete_djf": "True",
},
)
assert result.identical(expected)
def test_weighted_seasonal_climatology_with_JFD(self):
ds = self.ds.copy()
result = ds.temporal._temporal_avg(
"ts",
"climatology",
"season",
season_config={"dec_mode": "JFD"},
)
expected = ds.copy()
expected = expected.drop_dims("time")
expected_time = xr.DataArray(
data=np.array(
[
cftime.datetime(1, 1, 1),
cftime.datetime(1, 4, 1),
cftime.datetime(1, 7, 1),
cftime.datetime(1, 10, 1),
],
),
coords={
"time": np.array(
[
cftime.datetime(1, 1, 1),
cftime.datetime(1, 4, 1),
cftime.datetime(1, 7, 1),
cftime.datetime(1, 10, 1),
],
),
},
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
expected["ts"] = xr.DataArray(
name="ts",
data=np.ones((4, 4, 4)),
coords={"lat": self.ds.lat, "lon": self.ds.lon, "time": expected_time},
dims=["time", "lat", "lon"],
attrs={
"operation": "temporal_avg",
"mode": "climatology",
"freq": "season",
"weighted": "True",
"center_times": "False",
"dec_mode": "JFD",
},
)
assert result.identical(expected)
def test_weighted_custom_seasonal_climatology(self):
# FIXME: Fix this test
ds = self.ds.copy()
custom_seasons = [
["Jan", "Feb", "Mar"],
["Apr", "May", "Jun"],
["Jul", "Aug", "Sep"],
["Oct", "Nov", "Dec"],
]
result = ds.temporal._temporal_avg(
"ts",
"climatology",
"season",
season_config={"custom_seasons": custom_seasons},
)
expected = ds.copy()
expected = expected.drop_dims("time")
expected_time = xr.DataArray(
data=np.array(
[
cftime.datetime(1, 2, 1),
cftime.datetime(1, 5, 1),
cftime.datetime(1, 8, 1),
cftime.datetime(1, 11, 1),
],
),
coords={
"time": np.array(
[
cftime.datetime(1, 2, 1),
cftime.datetime(1, 5, 1),
cftime.datetime(1, 8, 1),
cftime.datetime(1, 11, 1),
],
),
},
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
expected["ts"] = xr.DataArray(
name="ts",
data=np.ones((4, 4, 4)),
coords={"lat": self.ds.lat, "lon": self.ds.lon, "time": expected_time},
dims=["time", "lat", "lon"],
attrs={
"operation": "temporal_avg",
"mode": "climatology",
"freq": "season",
"weighted": "True",
"center_times": "False",
"custom_seasons": [
"JanFebMar",
"AprMayJun",
"JulAugSep",
"OctNovDec",
],
},
)
assert result.identical(expected)
def test_weighted_monthly_climatology(self):
result = self.ds.temporal._temporal_avg("ts", "climatology", "month")
expected = self.ds.copy()
expected = expected.drop_dims("time")
expected_time = xr.DataArray(
data=np.array(
[
cftime.datetime(1, 1, 1),
cftime.datetime(1, 2, 1),
cftime.datetime(1, 3, 1),
cftime.datetime(1, 4, 1),
cftime.datetime(1, 5, 1),
cftime.datetime(1, 6, 1),
cftime.datetime(1, 7, 1),
cftime.datetime(1, 8, 1),
cftime.datetime(1, 9, 1),
cftime.datetime(1, 10, 1),
cftime.datetime(1, 11, 1),
cftime.datetime(1, 12, 1),
],
),
coords={
"time": np.array(
[
cftime.datetime(1, 1, 1),
cftime.datetime(1, 2, 1),
cftime.datetime(1, 3, 1),
cftime.datetime(1, 4, 1),
cftime.datetime(1, 5, 1),
cftime.datetime(1, 6, 1),
cftime.datetime(1, 7, 1),
cftime.datetime(1, 8, 1),
cftime.datetime(1, 9, 1),
cftime.datetime(1, 10, 1),
cftime.datetime(1, 11, 1),
cftime.datetime(1, 12, 1),
],
),
},
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
expected["ts"] = xr.DataArray(
name="ts",
data=np.ones((12, 4, 4)),
coords={"lat": self.ds.lat, "lon": self.ds.lon, "time": expected_time},
dims=["time", "lat", "lon"],
attrs={
"operation": "temporal_avg",
"mode": "climatology",
"freq": "month",
"weighted": "True",
"center_times": "False",
},
)
assert result.identical(expected)
def test_unweighted_monthly_climatology(self):
result = self.ds.temporal._temporal_avg(
"ts", "climatology", "month", weighted=False
)
expected = self.ds.copy()
expected = expected.drop_dims("time")
expected_time = xr.DataArray(
data=np.array(
[
cftime.datetime(1, 1, 1),
cftime.datetime(1, 2, 1),
cftime.datetime(1, 3, 1),
cftime.datetime(1, 4, 1),
cftime.datetime(1, 5, 1),
cftime.datetime(1, 6, 1),
cftime.datetime(1, 7, 1),
cftime.datetime(1, 8, 1),
cftime.datetime(1, 9, 1),
cftime.datetime(1, 10, 1),
cftime.datetime(1, 11, 1),
cftime.datetime(1, 12, 1),
],
),
coords={
"time": np.array(
[
cftime.datetime(1, 1, 1),
cftime.datetime(1, 2, 1),
cftime.datetime(1, 3, 1),
cftime.datetime(1, 4, 1),
cftime.datetime(1, 5, 1),
cftime.datetime(1, 6, 1),
cftime.datetime(1, 7, 1),
cftime.datetime(1, 8, 1),
cftime.datetime(1, 9, 1),
cftime.datetime(1, 10, 1),
cftime.datetime(1, 11, 1),
cftime.datetime(1, 12, 1),
],
),
},
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
expected["ts"] = xr.DataArray(
name="ts",
data=np.ones((12, 4, 4)),
coords={"lat": self.ds.lat, "lon": self.ds.lon, "time": expected_time},
dims=["time", "lat", "lon"],
attrs={
"operation": "temporal_avg",
"mode": "climatology",
"freq": "month",
"weighted": "False",
"center_times": "False",
},
)
assert result.identical(expected)
def test_weighted_daily_climatology(self):
result = self.ds.temporal._temporal_avg(
"ts", "climatology", "day", weighted=True
)
expected = self.ds.copy()
expected = expected.drop_dims("time")
expected_time = xr.DataArray(
data=np.array(
[
cftime.datetime(1, 1, 16),
cftime.datetime(1, 2, 15),
cftime.datetime(1, 3, 16),
cftime.datetime(1, 4, 16),
cftime.datetime(1, 5, 16),
cftime.datetime(1, 6, 16),
cftime.datetime(1, 7, 16),
cftime.datetime(1, 8, 16),
cftime.datetime(1, 9, 16),
cftime.datetime(1, 10, 16),
cftime.datetime(1, 11, 16),
cftime.datetime(1, 12, 16),
],
),
coords={
"time": np.array(
[
cftime.datetime(1, 1, 16),
cftime.datetime(1, 2, 15),
cftime.datetime(1, 3, 16),
cftime.datetime(1, 4, 16),
cftime.datetime(1, 5, 16),
cftime.datetime(1, 6, 16),
cftime.datetime(1, 7, 16),
cftime.datetime(1, 8, 16),
cftime.datetime(1, 9, 16),
cftime.datetime(1, 10, 16),
cftime.datetime(1, 11, 16),
cftime.datetime(1, 12, 16),
],
),
},
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
expected["ts"] = xr.DataArray(
name="ts",
data=np.ones((12, 4, 4)),
coords={"lat": self.ds.lat, "lon": self.ds.lon, "time": expected_time},
dims=["time", "lat", "lon"],
attrs={
"operation": "temporal_avg",
"mode": "climatology",
"freq": "day",
"weighted": "True",
"center_times": "False",
},
)
assert result.identical(expected)
def test_unweighted_daily_climatology(self):
result = self.ds.temporal._temporal_avg(
"ts", "climatology", "day", weighted=False
)
expected = self.ds.copy()
expected = expected.drop_dims("time")
expected_time = xr.DataArray(
data=np.array(
[
cftime.datetime(1, 1, 16),
cftime.datetime(1, 2, 15),
cftime.datetime(1, 3, 16),
cftime.datetime(1, 4, 16),
cftime.datetime(1, 5, 16),
cftime.datetime(1, 6, 16),
cftime.datetime(1, 7, 16),
cftime.datetime(1, 8, 16),
cftime.datetime(1, 9, 16),
cftime.datetime(1, 10, 16),
cftime.datetime(1, 11, 16),
cftime.datetime(1, 12, 16),
],
),
coords={
"time": np.array(
[
cftime.datetime(1, 1, 16),
cftime.datetime(1, 2, 15),
cftime.datetime(1, 3, 16),
cftime.datetime(1, 4, 16),
cftime.datetime(1, 5, 16),
cftime.datetime(1, 6, 16),
cftime.datetime(1, 7, 16),
cftime.datetime(1, 8, 16),
cftime.datetime(1, 9, 16),
cftime.datetime(1, 10, 16),
cftime.datetime(1, 11, 16),
cftime.datetime(1, 12, 16),
],
),
},
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
expected["ts"] = xr.DataArray(
name="ts",
data=np.ones((12, 4, 4)),
coords={"lat": self.ds.lat, "lon": self.ds.lon, "time": expected_time},
dims=["time", "lat", "lon"],
attrs={
"operation": "temporal_avg",
"mode": "climatology",
"freq": "day",
"weighted": "False",
"center_times": "False",
},
)
assert result.identical(expected)
class TestSetObjAttrs:
@pytest.fixture(autouse=True)
def setup(self):
self.ds = generate_dataset(cf_compliant=True, has_bounds=True)
def test_raises_error_if_operation_is_not_supported(self):
with pytest.raises(ValueError):
self.ds.temporal._set_obj_attrs(
"unsupported",
freq="season",
weighted=True,
center_times=True,
season_config={
"dec_mode": "DJF",
"drop_incomplete_djf": False,
"custom_seasons": None,
},
)
def test_raises_error_if_freq_arg_is_not_supported_by_operation(self):
ds = self.ds.copy()
with pytest.raises(ValueError):
ds.temporal._set_obj_attrs(
"time_series",
freq="unsupported",
weighted=True,
center_times=True,
season_config={
"dec_mode": "DJF",
"drop_incomplete_djf": False,
"custom_seasons": None,
},
)
with pytest.raises(ValueError):
ds.temporal._set_obj_attrs(
"climatology",
freq="unsupported",
weighted=True,
center_times=True,
season_config={
"dec_mode": "DJF",
"drop_incomplete_djf": False,
"custom_seasons": None,
},
)
with pytest.raises(ValueError):
ds.temporal._set_obj_attrs(
"departures",
freq="unsupported",
weighted=True,
center_times=True,
season_config={
"dec_mode": "DJF",
"drop_incomplete_djf": False,
"custom_seasons": None,
},
)
def test_does_not_raise_error_if_freq_arg_is_supported_by_operation(self):
ds = self.ds.copy()
climatology_freqs = ["season", "month", "day"]
departure_freqs = ["season", "month", "day"]
time_series_freqs = ["year", "season", "month", "day", "hour"]
for freq in time_series_freqs:
ds.temporal._set_obj_attrs(
"time_series",
freq=freq,
weighted=True,
center_times=True,
season_config={
"dec_mode": "DJF",
"drop_incomplete_djf": False,
"custom_seasons": None,
},
)
for freq in climatology_freqs:
ds.temporal._set_obj_attrs(
"climatology",
freq=freq,
weighted=True,
center_times=True,
season_config={
"dec_mode": "DJF",
"drop_incomplete_djf": False,
"custom_seasons": None,
},
)
for freq in departure_freqs:
ds.temporal._set_obj_attrs(
"departures",
freq=freq,
weighted=True,
center_times=True,
season_config={
"dec_mode": "DJF",
"drop_incomplete_djf": False,
"custom_seasons": None,
},
)
def test_raises_error_if_season_config_key_is_not_supported(self):
with pytest.raises(KeyError):
self.ds.temporal._set_obj_attrs(
"climatology",
freq="season",
weighted=True,
center_times=True,
season_config={
"not_supported": "invalid",
},
)
def test_raises_error_if_december_mode_is_not_supported(self):
with pytest.raises(ValueError):
self.ds.temporal._set_obj_attrs(
"climatology",
freq="season",
weighted=True,
center_times=True,
season_config={
"dec_mode": "unsupported",
"drop_incomplete_djf": False,
"custom_seasons": None,
},
)
def test_sets_object_attributes(self):
ds = self.ds.copy()
ds.temporal._set_obj_attrs(
"climatology",
freq="season",
weighted=True,
center_times=True,
season_config={"dec_mode": "JFD"},
)
assert ds.temporal._mode == "climatology"
assert ds.temporal._freq == "season"
assert ds.temporal._center_times
assert ds.temporal._weighted
assert ds.temporal._season_config == {"dec_mode": "JFD"}
ds.temporal._set_obj_attrs(
"climatology",
freq="season",
weighted=True,
center_times=True,
season_config={
"custom_seasons": [
["Jan", "Feb", "Mar"],
["Apr", "May", "Jun"],
["Jul", "Aug", "Sep"],
["Oct", "Nov", "Dec"],
],
},
)
assert ds.temporal._season_config == {
"custom_seasons": {
"JanFebMar": ["Jan", "Feb", "Mar"],
"AprMayJun": ["Apr", "May", "Jun"],
"JulAugSep": ["Jul", "Aug", "Sep"],
"OctNovDec": ["Oct", "Nov", "Dec"],
}
}
class TestCustomSeasons:
@pytest.fixture(autouse=True)
def setup(self):
self.ds = generate_dataset(cf_compliant=True, has_bounds=True)
self.expected = [
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec",
]
def test_raises_error_if_month_str_not_supported(self):
# Incorrect str "J".
with pytest.raises(ValueError):
self.ds.temporal._form_seasons(
custom_seasons=[
["J", "Feb", "Mar"],
["Apr", "May", "Jun"],
["Jul", "Aug", "Sep"],
["Oct", "Nov", "Dec"],
]
)
# Incorrect str "January".
with pytest.raises(ValueError):
self.ds.temporal._form_seasons(
custom_seasons=[
["January", "Feb", "Mar"],
["Apr", "May", "Jun"],
["Jul", "Aug", "Sep"],
["Oct", "Nov", "Dec"],
]
)
def test_raises_error_if_missing_months(self):
with pytest.raises(ValueError):
# "Jan" is missing.
self.ds.temporal._form_seasons(
custom_seasons=[
["Feb", "Mar"],
["Apr", "May", "Jun"],
["Jul", "Aug", "Sep"],
["Oct", "Nov", "Dec"],
]
)
def test_raises_error_if_duplicate_months_were_found(self):
with pytest.raises(ValueError):
# "Jan" is duplicated.
self.ds.temporal._form_seasons(
custom_seasons=[
["Jan", "Jan", "Feb"],
["Apr", "May", "Jun"],
["Jul", "Aug", "Sep"],
["Oct", "Nov", "Dec"],
]
)
def test_does_not_raise_error(self):
result = self.ds.temporal._form_seasons(
custom_seasons=[
["Jan", "Feb", "Mar"],
["Apr", "May", "Jun"],
["Jul", "Aug", "Sep"],
["Oct", "Nov", "Dec"],
]
)
expected = {
"JanFebMar": ["Jan", "Feb", "Mar"],
"AprMayJun": ["Apr", "May", "Jun"],
"JulAugSep": ["Jul", "Aug", "Sep"],
"OctNovDec": ["Oct", "Nov", "Dec"],
}
assert result == expected
result = self.ds.temporal._form_seasons(
custom_seasons=[
["Jan", "Feb", "Mar", "Apr", "May", "Jun"],
["Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
]
)
expected = {
"JanFebMarAprMayJun": ["Jan", "Feb", "Mar", "Apr", "May", "Jun"],
"JulAugSepOctNovDec": ["Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
}
assert result == expected
result = self.ds.temporal._form_seasons(
custom_seasons=[
["Jan", "Feb", "Mar"],
["Apr", "May", "Jun", "Jul"],
["Aug", "Sep", "Oct", "Nov", "Dec"],
]
)
expected = {
"JanFebMar": ["Jan", "Feb", "Mar"],
"AprMayJunJul": ["Apr", "May", "Jun", "Jul"],
"AugSepOctNovDec": ["Aug", "Sep", "Oct", "Nov", "Dec"],
}
assert result == expected
class TestAverager:
# FIXME: Update test this so that it is accurate, rather than 1's
# for averages
# May involve subsetting
@pytest.fixture(autouse=True)
def setup(self):
self.ds: xr.Dataset = generate_dataset(cf_compliant=True, has_bounds=True)
self.ds.attrs.update({"operation_type": "climatology"})
def test_weighted_by_month_day(self):
ds = self.ds.copy()
# Set object attrs required to test the method
ds.temporal._time_bounds = ds.time_bnds.copy()
ds.temporal._mode = "climatology"
ds.temporal._freq = "day"
ds.temporal._weighted = True
ds.temporal._center_times = True
ds.temporal._time_grouped = xr.DataArray(
name="month_day",
data=np.array(
[
cftime.datetime(1, 1, 16),
cftime.datetime(1, 2, 15),
cftime.datetime(1, 3, 16),
cftime.datetime(1, 4, 16),
cftime.datetime(1, 5, 6),
cftime.datetime(1, 6, 16),
cftime.datetime(1, 7, 16),
cftime.datetime(1, 8, 16),
cftime.datetime(1, 9, 16),
cftime.datetime(1, 10, 16),
cftime.datetime(1, 11, 16),
cftime.datetime(1, 12, 16),
cftime.datetime(1, 1, 16),
cftime.datetime(1, 2, 15),
cftime.datetime(1, 12, 16),
],
),
coords={"time": ds.time},
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
# Compare result of the method against the expected.
ts_result = ds.temporal._averager(ds["ts"])
ts_expected = np.ones((12, 4, 4))
assert np.allclose(ts_result, ts_expected)
def test_unweighted_daily_climatology(self):
ds = self.ds.copy()
# Set object attrs required to test the method.
ds.temporal._time_bounds = ds.time_bnds.copy()
ds.temporal._mode = "climatology"
ds.temporal._freq = "day"
ds.temporal._weighted = False
ds.temporal._center_times = True
ds.temporal._time_grouped = xr.DataArray(
name="month_day",
data=np.array(
[
cftime.datetime(1, 1, 16),
cftime.datetime(1, 2, 15),
cftime.datetime(1, 3, 16),
cftime.datetime(1, 4, 16),
cftime.datetime(1, 5, 6),
cftime.datetime(1, 6, 16),
cftime.datetime(1, 7, 16),
cftime.datetime(1, 8, 16),
cftime.datetime(1, 9, 16),
cftime.datetime(1, 10, 16),
cftime.datetime(1, 11, 16),
cftime.datetime(1, 12, 16),
cftime.datetime(1, 1, 16),
cftime.datetime(1, 2, 15),
cftime.datetime(1, 12, 16),
],
),
coords={"time": ds.time},
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
# Compare result of the method against the expected.
ts_result = ds.temporal._averager(ds["ts"])
ts_expected = np.ones((12, 4, 4))
assert np.allclose(ts_result, ts_expected)
def test_weighted_annual_climatology(self):
ds = self.ds.copy()
# Set object attrs required to test the method.
ds.temporal._time_bounds = ds.time_bnds.copy()
ds.temporal._mode = "climatology"
ds.temporal._freq = "month"
ds.temporal._weighted = True
ds.temporal._center_times = True
ds.temporal._time_grouped = xr.DataArray(
name="month",
data=np.array(
[
cftime.datetime(1, 1, 1),
cftime.datetime(1, 2, 1),
cftime.datetime(1, 3, 1),
cftime.datetime(1, 4, 1),
cftime.datetime(1, 5, 1),
cftime.datetime(1, 6, 1),
cftime.datetime(1, 7, 1),
cftime.datetime(1, 8, 1),
cftime.datetime(1, 9, 1),
cftime.datetime(1, 10, 1),
cftime.datetime(1, 11, 1),
cftime.datetime(1, 12, 1),
cftime.datetime(1, 1, 1),
cftime.datetime(1, 2, 1),
cftime.datetime(1, 12, 1),
],
),
coords={"time": ds.time},
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
# Compare result of the method against the expected.
# Check non-bounds variables were properly grouped and averaged
ts_result = ds.temporal._averager(ds["ts"])
ts_expected = np.ones((12, 4, 4))
assert np.allclose(ts_result, ts_expected)
def test_weighted_seasonal_climatology_with_DJF_and_drop_incomplete_DJF(self):
ds = self.ds.copy()
# Drop the incomplete seasons
ds = ds.isel(time=slice(2, -1))
# Set object attrs required to test the method.
ds.temporal._time_bounds = ds.time_bnds.copy()
ds.temporal._mode = "climatology"
ds.temporal._freq = "season"
ds.temporal._weighted = True
ds.temporal._center_times = True
ds.temporal._season_config = {
"dec_mode": "DJF",
"drop_incomplete_djf": True,
}
ds.temporal._time_grouped = xr.DataArray(
name="season",
data=np.array(
[
# MAM
cftime.datetime(1, 3, 1),
cftime.datetime(1, 3, 1),
cftime.datetime(1, 3, 1),
# JJA
cftime.datetime(1, 7, 1),
cftime.datetime(1, 7, 1),
cftime.datetime(1, 7, 1),
# SON
cftime.datetime(1, 10, 1),
cftime.datetime(1, 10, 1),
cftime.datetime(1, 10, 1),
# DJF
cftime.datetime(1, 1, 1),
cftime.datetime(1, 1, 1),
cftime.datetime(1, 1, 1),
],
),
coords={"time": ds.time},
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
# Compare result of the method against the expected.
# Check non-bounds variables were properly grouped and averaged
ts_result = ds.temporal._averager(ds["ts"])
ts_expected = np.ones((4, 4, 4))
assert np.allclose(ts_result, ts_expected)
def test_weighted_seasonal_climatology_with_JFD(self):
ds = self.ds.copy()
# Set object attrs required to test the method.
ds.temporal._time_bounds = ds.time_bnds.copy()
ds.temporal._mode = "climatology"
ds.temporal._freq = "season"
ds.temporal._weighted = True
ds.temporal._center_times = True
ds.temporal._season_config = {"dec_mode": "JFD"}
ds.temporal._time_grouped = xr.DataArray(
name="season",
data=np.array(
[
# JFD
cftime.datetime(1, 1, 1),
cftime.datetime(1, 1, 1),
cftime.datetime(1, 1, 1),
# MAM
cftime.datetime(1, 3, 1),
cftime.datetime(1, 3, 1),
cftime.datetime(1, 3, 1),
# JJA
cftime.datetime(1, 7, 1),
cftime.datetime(1, 7, 1),
cftime.datetime(1, 7, 1),
# SON
cftime.datetime(1, 10, 1),
cftime.datetime(1, 10, 1),
cftime.datetime(1, 10, 1),
# JFD
cftime.datetime(1, 1, 1),
cftime.datetime(1, 1, 1),
cftime.datetime(1, 1, 1),
],
),
coords={"time": ds.time},
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
# Compare result of the method against the expected.
ts_result = ds.temporal._averager(ds["ts"])
ts_expected = np.ones((4, 4, 4))
assert np.allclose(ts_result, ts_expected)
class TestDropIncompleteDJF:
@pytest.fixture(autouse=True)
def setup(self):
self.ds: xr.Dataset = generate_dataset(cf_compliant=True, has_bounds=True)
def test_incomplete_DJF_seasons_are_dropped(self):
ds = self.ds.copy()
# Set object attrs required to test the method.
ds.temporal._time_bounds = ds.time_bnds.copy()
# Define method inputs.
ds["ts"] = xr.DataArray(
data=np.ones(5),
coords={
"time": [
datetime(2000, 1, 1),
datetime(2000, 2, 1),
datetime(2000, 3, 1),
datetime(2000, 4, 1),
datetime(2001, 12, 1),
]
},
dims=["time"],
)
# Compare result of the method against the expected.
result = ds.temporal._drop_incomplete_djf(ds)
expected = ds.copy()
# Drop the incomplete DJF seasons
expected = expected.isel(time=slice(2, -1))
expected["ts"] = xr.DataArray(
data=np.ones(2),
coords={"time": [datetime(2000, 3, 1), datetime(2000, 4, 1)]},
dims=["time"],
)
assert result.identical(expected)
def test_does_not_drop_incomplete_DJF_seasons_since_if_dont_exist(self):
ds = self.ds.copy()
# Set object attrs required to test the method.
ds.temporal._time_bounds = ds.time_bnds.copy()
# Update time coordinate points so that the months don't fall in
# incomplete seasons.
ds.time.values[0] = datetime(1999, 3, 1)
ds.time.values[1] = datetime(1999, 4, 1)
ds.time.values[-1] = datetime(1999, 5, 1)
# Compare result of the method against the expected.
result = ds.temporal._drop_incomplete_djf(ds)
expected = ds
assert result.identical(expected)
class TestGroupTimeCoords:
@pytest.fixture(autouse=True)
def setup(self):
self.ds = generate_dataset(cf_compliant=True, has_bounds=True)
def test_groups_time_coords_for_time_series_season_freq(self):
ds = self.ds.copy()
# Set object attrs required to test the method.
ds.temporal._mode = "time_series"
ds.temporal._freq = "season"
ds.temporal._season_config = {"dec_mode": "DJF", "drop_incomplete_djf": False}
# Compare result of the method against the expected.
result = ds.temporal._group_time_coords(ds.ts)
expected = xr.DataArray(
name="year_month",
data=np.array(
[
"2000-01-01T00:00:00.000000000",
"2000-01-01T00:00:00.000000000",
"2000-04-01T00:00:00.000000000",
"2000-04-01T00:00:00.000000000",
"2000-04-01T00:00:00.000000000",
"2000-07-01T00:00:00.000000000",
"2000-07-01T00:00:00.000000000",
"2000-07-01T00:00:00.000000000",
"2000-10-01T00:00:00.000000000",
"2000-10-01T00:00:00.000000000",
"2000-10-01T00:00:00.000000000",
"2001-01-01T00:00:00.000000000",
"2001-01-01T00:00:00.000000000",
"2001-01-01T00:00:00.000000000",
"2002-01-01T00:00:00.000000000",
],
dtype="datetime64[ns]",
),
coords={"time": ds.time},
dims=["time"],
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
assert result.identical(expected)
def test_groups_time_coords_for_climatology_season_freq(self):
ds = self.ds.copy()
# Set object attrs required to test the method.
ds.temporal._mode = "climatology"
ds.temporal._freq = "season"
ds.temporal._time_bounds = ds.time_bnds.copy()
ds.temporal._season_config = {"dec_mode": "DJF", "drop_incomplete_djf": False}
# Compare result of the method against the expected.
result = ds.temporal._group_time_coords(ds.ts)
expected = xr.DataArray(
name="month",
data=np.array(
[
cftime.datetime(1, 1, 1),
cftime.datetime(1, 1, 1),
cftime.datetime(1, 4, 1),
cftime.datetime(1, 4, 1),
cftime.datetime(1, 4, 1),
cftime.datetime(1, 7, 1),
cftime.datetime(1, 7, 1),
cftime.datetime(1, 7, 1),
cftime.datetime(1, 10, 1),
cftime.datetime(1, 10, 1),
cftime.datetime(1, 10, 1),
cftime.datetime(1, 1, 1),
cftime.datetime(1, 1, 1),
cftime.datetime(1, 1, 1),
cftime.datetime(1, 1, 1),
],
),
coords={"time": ds.time},
dims=["time"],
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
assert result.identical(expected)
class TestProcessSeasonDataFrame:
@pytest.fixture(autouse=True)
def setup(self):
self.ds = generate_dataset(cf_compliant=True, has_bounds=True)
self.df = pd.DataFrame(
data=np.array(
[
(2000, "DJF", 1),
(2000, "DJF", 2),
(2000, "MAM", 3),
(2000, "MAM", 4),
(2000, "MAM", 5),
(2000, "JJA", 6),
(2000, "JJA", 7),
(2000, "JJA", 8),
(2000, "SON", 9),
(2000, "SON", 10),
(2000, "SON", 11),
(2000, "DJF", 12),
],
dtype=object,
),
columns=["year", "season", "month"],
)
def test_maps_custom_seasons_if_custom_seasons_specified_and_drops_columns(self):
ds = self.ds.copy()
df = self.df.copy()
# Set object attrs required to test the method.
ds.temporal._mode = "time_series"
ds.temporal._season_config = {
"custom_seasons": {
"JanFebMar": ["Jan", "Feb", "Mar"],
"AprMayJun": ["Apr", "May", "Jun"],
"JulAugSep": ["Jul", "Aug", "Sep"],
"OctNovDec": ["Oct", "Nov", "Dec"],
}
}
# Compare result of the method against the expected.
result = ds.temporal._process_season_dataframe(df)
expected = pd.DataFrame(
data=np.array(
[
(2000, 2),
(2000, 2),
(2000, 2),
(2000, 5),
(2000, 5),
(2000, 5),
(2000, 8),
(2000, 8),
(2000, 8),
(2000, 11),
(2000, 11),
(2000, 11),
],
dtype=object,
),
columns=["year", "month"],
)
expected["month"] = expected.month.astype("int64")
assert result.equals(expected)
def test_shifts_decembers_for_DJF_if_DJF_is_specified(self):
ds = self.ds.copy()
df = self.df.copy()
# Set object attrs required to test the method.
ds.temporal._mode = "climatology"
ds.temporal._season_config = {
"dec_mode": "DJF",
"drop_incomplete_djf": True,
}
# Compare result of the method against the expected.
result = ds.temporal._process_season_dataframe(df)
expected = pd.DataFrame(
data=np.array(
[1, 1, 4, 4, 4, 7, 7, 7, 10, 10, 10, 1],
dtype="int64",
),
columns=["month"],
)
assert result.equals(expected)
class TestConvertDFtoDT:
@pytest.fixture(autouse=True)
def setup(self):
self.ds = generate_dataset(cf_compliant=True, has_bounds=True)
def test_converts_dataframe_to_datetime_for_seasonal_time_series(self):
ds = self.ds.copy()
df = pd.DataFrame(
data=[(2000, 1), (2000, 4), (2000, 7)],
columns=["year", "month"],
)
ds.temporal._mode = "time_series"
result = ds.temporal._convert_df_to_dt(df)
expected = np.array(
[
"2000-01-01T00:00:00.000000000",
"2000-04-01T00:00:00.000000000",
"2000-07-01T00:00:00.000000000",
],
dtype="datetime64[ns]",
)
assert np.array_equal(result, expected)
def test_converts_dataframe_to_datetime_for_seasonal_climatology(self):
ds = self.ds.copy()
df = pd.DataFrame(data=[1, 4, 7], columns=["month"])
ds.temporal._mode = "climatology"
result = ds.temporal._convert_df_to_dt(df)
expected = np.array(
[
cftime.datetime(1, 1, 1, 0),
cftime.datetime(1, 4, 1, 0),
cftime.datetime(1, 7, 1, 0),
]
)
assert np.array_equal(result, expected)
def test_converts_dataframe_to_datetime_for_seasonal_departures(self):
ds = self.ds.copy()
df = pd.DataFrame(data=[1, 4, 7], columns=["month"])
ds.temporal._mode = "departures"
result = ds.temporal._convert_df_to_dt(df)
expected = np.array(
[
cftime.datetime(1, 1, 1, 0),
cftime.datetime(1, 4, 1, 0),
cftime.datetime(1, 7, 1, 0),
]
)
assert np.array_equal(result, expected)
class TestMapMonthsToCustomSeasons:
@pytest.fixture(autouse=True)
def setup(self):
self.ds = generate_dataset(cf_compliant=True, has_bounds=True)
def test_raises_error_if_custom_seasons_are_not_mapped(self):
ds = self.ds.copy()
ds.temporal._season_config = {"custom_seasons": None}
df = pd.DataFrame(
data=np.array(
[
(2000, "DJF", 1),
(2000, "DJF", 2),
(2000, "MAM", 3),
(2000, "MAM", 4),
(2000, "MAM", 5),
(2000, "JJA", 6),
(2000, "JJA", 7),
(2000, "JJA", 8),
(2000, "SON", 9),
(2000, "SON", 10),
(2000, "SON", 11),
(2000, "DJF", 12),
],
dtype=object,
),
columns=["year", "season", "month"],
)
with pytest.raises(ValueError):
ds.temporal._map_months_to_custom_seasons(df)
def test_maps_three_month_custom_seasons(self):
ds = self.ds.copy()
# Set object attrs required to test the method.
ds.temporal._season_config = {
"custom_seasons": [
"JanFebMar",
"AprMayJun",
"JulAugSep",
"OctNovDec",
]
}
# Define method inputs.
# Includes default seasons.
df = pd.DataFrame(
data=np.array(
[
(2000, "DJF", 1),
(2000, "DJF", 2),
(2000, "MAM", 3),
(2000, "MAM", 4),
(2000, "MAM", 5),
(2000, "JJA", 6),
(2000, "JJA", 7),
(2000, "JJA", 8),
(2000, "SON", 9),
(2000, "SON", 10),
(2000, "SON", 11),
(2000, "DJF", 12),
],
dtype=object,
),
columns=["year", "season", "month"],
)
# Compare result of the method against the expected.
result = ds.temporal._map_months_to_custom_seasons(df)
expected = pd.DataFrame(
data=np.array(
[
(2000, "JanFebMar", 1),
(2000, "JanFebMar", 2),
(2000, "JanFebMar", 3),
(2000, "AprMayJun", 4),
(2000, "AprMayJun", 5),
(2000, "AprMayJun", 6),
(2000, "JulAugSep", 7),
(2000, "JulAugSep", 8),
(2000, "JulAugSep", 9),
(2000, "OctNovDec", 10),
(2000, "OctNovDec", 11),
(2000, "OctNovDec", 12),
],
dtype=object,
),
columns=["year", "season", "month"],
)
assert result.equals(expected)
def test_maps_six_month_custom_seasons(self):
ds = self.ds.copy()
# Set object attrs required to test the method.
ds.temporal._season_config = {
"custom_seasons": [
"JanFebMarAprMayJun",
"JulAugSepOctNovDec",
]
}
# Define method inputs.
# Includes default seasons.
df = pd.DataFrame(
data=np.array(
[
(2000, "DJF", 1),
(2000, "DJF", 2),
(2000, "MAM", 3),
(2000, "MAM", 4),
(2000, "MAM", 5),
(2000, "JJA", 6),
(2000, "JJA", 7),
(2000, "JJA", 8),
(2000, "SON", 9),
(2000, "SON", 10),
(2000, "SON", 11),
(2000, "DJF", 12),
],
dtype=object,
),
columns=["year", "season", "month"],
)
# Compare result of the method against the expected.
result = ds.temporal._map_months_to_custom_seasons(df)
expected = pd.DataFrame(
data=np.array(
[
(2000, "JanFebMarAprMayJun", 1),
(2000, "JanFebMarAprMayJun", 2),
(2000, "JanFebMarAprMayJun", 3),
(2000, "JanFebMarAprMayJun", 4),
(2000, "JanFebMarAprMayJun", 5),
(2000, "JanFebMarAprMayJun", 6),
(2000, "JulAugSepOctNovDec", 7),
(2000, "JulAugSepOctNovDec", 8),
(2000, "JulAugSepOctNovDec", 9),
(2000, "JulAugSepOctNovDec", 10),
(2000, "JulAugSepOctNovDec", 11),
(2000, "JulAugSepOctNovDec", 12),
],
dtype=object,
),
columns=["year", "season", "month"],
)
assert result.equals(expected)
def test_maps_three_month_custom_seasons_random_order(self):
ds = self.ds.copy()
# Set object attrs required to test the method.
ds.temporal._season_config = {
"custom_seasons": [
# Swapped Jan and Dec
"DecFebMar",
"AprMayJun",
"JulAugSep",
"OctNovJan",
]
}
# Define method inputs.
# Includes default seasons.
df = pd.DataFrame(
data=np.array(
[
(2000, "DJF", 1),
(2000, "DJF", 2),
(2000, "MAM", 3),
(2000, "MAM", 4),
(2000, "MAM", 5),
(2000, "JJA", 6),
(2000, "JJA", 7),
(2000, "JJA", 8),
(2000, "SON", 9),
(2000, "SON", 10),
(2000, "SON", 11),
(2000, "DJF", 12),
],
dtype=object,
),
columns=["year", "season", "month"],
)
# Compare result of the method against the expected.
result = ds.temporal._map_months_to_custom_seasons(df)
expected = pd.DataFrame(
data=np.array(
[
(2000, "OctNovJan", 1),
(2000, "DecFebMar", 2),
(2000, "DecFebMar", 3),
(2000, "AprMayJun", 4),
(2000, "AprMayJun", 5),
(2000, "AprMayJun", 6),
(2000, "JulAugSep", 7),
(2000, "JulAugSep", 8),
(2000, "JulAugSep", 9),
(2000, "OctNovJan", 10),
(2000, "OctNovJan", 11),
(2000, "DecFebMar", 12),
],
dtype=object,
),
columns=["year", "season", "month"],
)
assert result.equals(expected)
class TestMapSeasonstoMidMonths:
@pytest.fixture(autouse=True)
def setup(self):
self.ds = generate_dataset(cf_compliant=True, has_bounds=True)
def test_maps_predefined_seasons_to_middle_months(self):
ds = self.ds.copy()
ds.temporal._season_config = {"custom_seasons": None}
df = pd.DataFrame({"season": ["DJF", "MAM", "JJA", "SON"]})
result = ds.temporal._map_seasons_to_mid_months(df)
expected = pd.DataFrame({"month": [1, 4, 7, 10]})
assert result.equals(expected)
def test_maps_custom_seasons_with_odd_months_to_middle_months(self):
ds = self.ds.copy()
ds.temporal._season_config = {
"custom_seasons": {
"FebMarApr": ["Feb", "Mar", "Apr"],
"MayJunJul": ["May", "Jun", "Jul"],
"AugSepOct": ["Aug", "Sep", "Oct"],
"NovDecJan": ["Nov", "Dec", "Jan"],
}
}
df = pd.DataFrame(
{"season": ["FebMarApr", "MayJunJul", "AugSepOct", "NovDecJan"]}
)
result = ds.temporal._map_seasons_to_mid_months(df)
expected = pd.DataFrame({"month": [3, 6, 9, 12]})
assert result.equals(expected)
def test_maps_custom_seasons_with_even_months_to_middle_months(self):
ds = self.ds.copy()
ds.temporal._season_config = {
"custom_seasons": {
"FebMarAprMay": ["Feb", "Mar", "Apr", "May"],
"JunJulAugSep": ["Jun", "Jul", "Aug", "Sep"],
"OctNovDecJan": ["Oct", "Nov", "Dec", "Jan"],
}
}
df = pd.DataFrame({"season": ["FebMarAprMay", "JunJulAugSep", "OctNovDecJan"]})
result = ds.temporal._map_seasons_to_mid_months(df)
expected = pd.DataFrame({"month": [4, 8, 12]})
assert result.equals(expected)
class TestShiftDecembers:
@pytest.fixture(autouse=True)
def setup(self):
self.ds = generate_dataset(cf_compliant=True, has_bounds=True)
def test_decembers_shift_for_all_years(self):
ds = self.ds.copy()
# Define method inputs.
df = pd.DataFrame(
data=np.array(
[
(2000, "DJF", 1),
(2000, "DJF", 2),
(2000, "DJF", 12),
(2001, "DJF", 1),
(2001, "DJF", 2),
(2001, "DJF", 12),
],
dtype=object,
),
columns=["year", "season", "month"],
)
# Compare result of the method against the expected.
result = ds.temporal._shift_decembers(df)
expected = pd.DataFrame(
data=np.array(
[
(2000, "DJF", 1),
(2000, "DJF", 2),
(2001, "DJF", 12),
(2001, "DJF", 1),
(2001, "DJF", 2),
(2002, "DJF", 12),
],
dtype=object,
),
columns=["year", "season", "month"],
)
assert result.equals(expected)
class TestDropObsoleteColumns:
@pytest.fixture(autouse=True)
def setup(self):
self.ds = generate_dataset(cf_compliant=True, has_bounds=True)
def test_drops_month_col_for_time_series_operations(self):
ds = self.ds.copy()
# Set object attrs required to test the method.
ds.temporal._mode = "time_series"
# Define method inputs.
df = pd.DataFrame(columns=["year", "season", "month"])
# Compare result of the method against the expected.
result = ds.temporal._drop_obsolete_columns(df)
expected = pd.DataFrame(columns=["year", "season"])
assert result.equals(expected)
def test_drops_year_and_month_cols_for_climatology_and_departure_operations(self):
ds = self.ds.copy()
# Set object attrs required to test the method.
ds.temporal._mode = "climatology"
# Define method inputs.
df = pd.DataFrame(columns=["year", "season", "month"])
# Compare result of the method against the expected.
result = ds.temporal._drop_obsolete_columns(df)
expected = pd.DataFrame(columns=["season"])
assert result.equals(expected)
def test_raises_error_with_unsupported_operation(self):
ds = self.ds.copy()
# Set object attrs required to test the method.
ds.temporal._mode = "unsupported_operation"
df = pd.DataFrame(columns=["year", "season", "month"])
with pytest.raises(ValueError):
ds.temporal._drop_obsolete_columns(df)
class TestCalculateWeights:
class TestClimatology:
@pytest.fixture(autouse=True)
def setup(self):
self.ds: xr.Dataset = generate_dataset(cf_compliant=True, has_bounds=True)
def test_weights_for_seasonal_climatology_with_DJF(self):
ds = self.ds.copy()
# Replace time and time bounds with incomplete seasons removed
ds = ds.drop_dims("time")
ds.coords["time"] = xr.DataArray(
data=np.array(
[
"2000-03-16T12:00:00.000000000",
"2000-04-16T00:00:00.000000000",
"2000-05-16T12:00:00.000000000",
"2000-06-16T00:00:00.000000000",
"2000-07-16T12:00:00.000000000",
"2000-08-16T12:00:00.000000000",
"2000-09-16T00:00:00.000000000",
"2000-10-16T12:00:00.000000000",
"2000-11-16T00:00:00.000000000",
"2000-12-16T12:00:00.000000000",
"2001-01-16T12:00:00.000000000",
"2001-02-15T00:00:00.000000000",
],
dtype="datetime64[ns]",
),
dims=["time"],
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
},
)
ds["ts"] = xr.DataArray(
name="ts",
data=np.ones((12, 4, 4)),
coords={"time": ds.time, "lat": ds.lat, "lon": ds.lon},
dims=["time", "lat", "lon"],
)
ds["time_bnds"] = xr.DataArray(
name="time_bnds",
data=np.array(
[
[
"2000-03-01T00:00:00.000000000",
"2000-04-01T00:00:00.000000000",
],
[
"2000-04-01T00:00:00.000000000",
"2000-05-01T00:00:00.000000000",
],
[
"2000-05-01T00:00:00.000000000",
"2000-06-01T00:00:00.000000000",
],
[
"2000-06-01T00:00:00.000000000",
"2000-07-01T00:00:00.000000000",
],
[
"2000-07-01T00:00:00.000000000",
"2000-08-01T00:00:00.000000000",
],
[
"2000-08-01T00:00:00.000000000",
"2000-09-01T00:00:00.000000000",
],
[
"2000-09-01T00:00:00.000000000",
"2000-10-01T00:00:00.000000000",
],
[
"2000-10-01T00:00:00.000000000",
"2000-11-01T00:00:00.000000000",
],
[
"2000-11-01T00:00:00.000000000",
"2000-12-01T00:00:00.000000000",
],
[
"2000-12-01T00:00:00.000000000",
"2001-01-01T00:00:00.000000000",
],
[
"2001-01-01T00:00:00.000000000",
"2001-02-01T00:00:00.000000000",
],
[
"2001-02-01T00:00:00.000000000",
"2001-03-01T00:00:00.000000000",
],
],
dtype="datetime64[ns]",
),
coords={"time": ds.time},
dims=["time", "bnds"],
attrs={
"is_generated": "True",
},
)
# Set object attrs required to test the method.
ds.temporal._time_bounds = ds.time_bnds.copy()
ds.temporal._mode = "climatology"
ds.temporal._freq = "season"
ds.temporal._weighted = "True"
ds.temporal.season_config = {"dec_mode": "DJF"}
ds.temporal._time_grouped = xr.DataArray(
name="season",
data=np.array(
[
cftime.datetime(1, 4, 1),
cftime.datetime(1, 4, 1),
cftime.datetime(1, 4, 1),
cftime.datetime(1, 7, 1),
cftime.datetime(1, 7, 1),
cftime.datetime(1, 7, 1),
cftime.datetime(1, 10, 1),
cftime.datetime(1, 10, 1),
cftime.datetime(1, 10, 1),
cftime.datetime(1, 1, 1),
cftime.datetime(1, 1, 1),
cftime.datetime(1, 1, 1),
],
),
coords={"time": ds.time},
dims=["time"],
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
# Compare result of the method against the expected.
result = ds.temporal._get_weights(ds["ts"])
expected = np.array(
[
0.33695652,
0.32608696,
0.33695652,
0.32608696,
0.33695652,
0.33695652,
0.32967033,
0.34065934,
0.32967033,
0.34444444,
0.34444444,
0.31111111,
]
)
assert np.allclose(result, expected, equal_nan=True)
def test_weights_for_seasonal_climatology_with_JFD(self):
ds = self.ds.copy()
# Set object attrs required to test the method.
ds.temporal._time_bounds = ds.time_bnds.copy()
ds.temporal._mode = "climatology"
ds.temporal._freq = "season"
ds.temporal._weighted = "True"
ds.temporal.season_config = {"dec_mode": "JDF"}
ds.temporal._time_grouped = xr.DataArray(
name="season",
data=np.array(
[
cftime.datetime(1, 1, 1),
cftime.datetime(1, 1, 1),
cftime.datetime(1, 4, 1),
cftime.datetime(1, 4, 1),
cftime.datetime(1, 4, 1),
cftime.datetime(1, 7, 1),
cftime.datetime(1, 7, 1),
cftime.datetime(1, 7, 1),
cftime.datetime(1, 10, 1),
cftime.datetime(1, 10, 1),
cftime.datetime(1, 10, 1),
cftime.datetime(1, 1, 1),
cftime.datetime(1, 1, 1),
cftime.datetime(1, 1, 1),
cftime.datetime(1, 1, 1),
],
),
coords={"time": ds.time},
dims=["time"],
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
# Compare result of the method against the expected.
result = ds.temporal._get_weights(ds["ts"])
expected = np.array(
[
[
0.17127072,
0.16022099,
0.33695652,
0.32608696,
0.33695652,
0.32608696,
0.33695652,
0.33695652,
0.32967033,
0.34065934,
0.32967033,
0.17127072,
0.17127072,
0.15469613,
0.17127072,
]
]
)
assert np.allclose(result, expected, equal_nan=True)
def test_weights_for_annual_climatology(self):
ds = self.ds.copy()
# Set object attrs required to test the method.
ds.temporal._time_bounds = ds.time_bnds.copy()
ds.temporal._mode = "climatology"
ds.temporal._freq = "month"
ds.temporal._weighted = "True"
ds.temporal.season_config = {"dec_mode": "DJF"}
ds.temporal._time_grouped = xr.DataArray(
name="month",
data=np.array(
[
cftime.datetime(1, 1, 1),
cftime.datetime(1, 2, 1),
cftime.datetime(1, 3, 1),
cftime.datetime(1, 4, 1),
cftime.datetime(1, 5, 1),
cftime.datetime(1, 6, 1),
cftime.datetime(1, 7, 1),
cftime.datetime(1, 8, 1),
cftime.datetime(1, 9, 1),
cftime.datetime(1, 10, 1),
cftime.datetime(1, 11, 1),
cftime.datetime(1, 12, 1),
cftime.datetime(1, 1, 1),
cftime.datetime(1, 2, 1),
cftime.datetime(1, 12, 1),
],
),
coords={"time": ds.time},
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
# Compare result of the method against the expected.
result = ds.temporal._get_weights(self.ds["ts"])
expected = np.array(
[
[
0.5,
0.50877193,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
0.5,
0.5,
0.49122807,
0.5,
]
]
)
assert np.allclose(result, expected)
def test_weights_for_daily_climatology(self):
ds = self.ds.copy()
# Set object attrs required to test the method.
ds.temporal._time_bounds = ds.time_bnds.copy()
ds.temporal._mode = "climatology"
ds.temporal._freq = "day"
ds.temporal._weighted = "True"
ds.temporal._season_config = {
"dec_mode": "DJF",
"drop_incomplete_djf": True,
}
ds.temporal._time_grouped = xr.DataArray(
name="month_day",
data=np.array(
[
cftime.datetime(1, 1, 16),
cftime.datetime(1, 2, 15),
cftime.datetime(1, 3, 16),
cftime.datetime(1, 4, 16),
cftime.datetime(1, 5, 6),
cftime.datetime(1, 6, 16),
cftime.datetime(1, 7, 16),
cftime.datetime(1, 8, 16),
cftime.datetime(1, 9, 16),
cftime.datetime(1, 10, 16),
cftime.datetime(1, 11, 16),
cftime.datetime(1, 12, 16),
cftime.datetime(1, 1, 16),
cftime.datetime(1, 2, 15),
cftime.datetime(1, 12, 16),
],
),
coords={"time": ds.time},
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
# Compare result of the method against the expected.
result = ds.temporal._get_weights(self.ds["ts"])
expected = np.array(
[
0.5,
0.50877193,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
0.5,
0.5,
0.49122807,
0.5,
]
)
assert np.allclose(result, expected)
class TestTimeSeries:
@pytest.fixture(autouse=True)
def setup(self):
self.ds: xr.Dataset = generate_dataset(cf_compliant=True, has_bounds=True)
def test_weights_for_yearly_averages(self):
ds = self.ds.copy()
# Set object attrs required to test the method.
ds.temporal._time_bounds = ds.time_bnds.copy()
ds.temporal._mode = "time_series"
ds.temporal._freq = "year"
ds.temporal._weighted = "True"
ds.temporal._time_grouped = xr.DataArray(
name="year",
data=np.array(
[
"2000-01-01T00:00:00.000000000",
"2000-01-01T00:00:00.000000000",
"2000-01-01T00:00:00.000000000",
"2000-01-01T00:00:00.000000000",
"2000-01-01T00:00:00.000000000",
"2000-01-01T00:00:00.000000000",
"2000-01-01T00:00:00.000000000",
"2000-01-01T00:00:00.000000000",
"2000-01-01T00:00:00.000000000",
"2000-01-01T00:00:00.000000000",
"2000-01-01T00:00:00.000000000",
"2000-01-01T00:00:00.000000000",
"2001-01-01T00:00:00.000000000",
"2001-01-01T00:00:00.000000000",
"2001-01-01T00:00:00.000000000",
],
dtype="datetime64[ns]",
),
coords={"time": ds.time},
dims=["time"],
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
# Compare result of the method against the expected.
result = ds.temporal._get_weights(self.ds["ts"])
expected = np.array(
[
0.08469945,
0.07923497,
0.08469945,
0.08196721,
0.08469945,
0.08196721,
0.08469945,
0.08469945,
0.08196721,
0.08469945,
0.08196721,
0.08469945,
0.34444444,
0.31111111,
0.34444444,
]
)
assert np.allclose(result, expected)
def test_weights_for_monthly_averages(self):
ds = self.ds.copy()
# Set object attrs required to test the method.
ds.temporal._time_bounds = ds.time_bnds.copy()
ds.temporal._mode = "time_series"
ds.temporal._freq = "month"
ds.temporal._weighted = "True"
ds.temporal._time_grouped = xr.DataArray(
name="year_month",
data=np.array(
[
"2000-01-01T00:00:00.000000000",
"2000-02-01T00:00:00.000000000",
"2000-03-01T00:00:00.000000000",
"2000-04-01T00:00:00.000000000",
"2000-05-01T00:00:00.000000000",
"2000-06-01T00:00:00.000000000",
"2000-07-01T00:00:00.000000000",
"2000-08-01T00:00:00.000000000",
"2000-09-01T00:00:00.000000000",
"2000-10-01T00:00:00.000000000",
"2000-11-01T00:00:00.000000000",
"2000-12-01T00:00:00.000000000",
"2001-01-01T00:00:00.000000000",
"2001-02-01T00:00:00.000000000",
"20012-12-01T00:00:00.000000000",
],
dtype="datetime64[ns]",
),
coords={"time": ds.time},
dims=["time"],
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
# Compare result of the method against the expected.
result = ds.temporal._get_weights(self.ds["ts"])
expected = np.ones(15)
assert np.allclose(result, expected)
def test_weights_for_seasonal_averages_with_DJF_and_drop_incomplete_seasons(
self,
):
ds = self.ds.copy()
# Replace time and time bounds with incomplete seasons removed
ds = ds.drop_dims("time")
ds.coords["time"] = xr.DataArray(
data=np.array(
[
"2000-03-16T12:00:00.000000000",
"2000-04-16T00:00:00.000000000",
"2000-05-16T12:00:00.000000000",
"2000-06-16T00:00:00.000000000",
"2000-07-16T12:00:00.000000000",
"2000-08-16T12:00:00.000000000",
"2000-09-16T00:00:00.000000000",
"2000-10-16T12:00:00.000000000",
"2000-11-16T00:00:00.000000000",
"2000-12-16T12:00:00.000000000",
"2001-01-16T12:00:00.000000000",
"2001-02-15T00:00:00.000000000",
],
dtype="datetime64[ns]",
),
dims=["time"],
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
},
)
ds["ts"] = xr.DataArray(
name="ts",
data=np.ones((12, 4, 4)),
coords={"time": ds.time, "lat": ds.lat, "lon": ds.lon},
dims=["time", "lat", "lon"],
)
ds["time_bnds"] = xr.DataArray(
name="time_bnds",
data=np.array(
[
[
"2000-03-01T00:00:00.000000000",
"2000-04-01T00:00:00.000000000",
],
[
"2000-04-01T00:00:00.000000000",
"2000-05-01T00:00:00.000000000",
],
[
"2000-05-01T00:00:00.000000000",
"2000-06-01T00:00:00.000000000",
],
[
"2000-06-01T00:00:00.000000000",
"2000-07-01T00:00:00.000000000",
],
[
"2000-07-01T00:00:00.000000000",
"2000-08-01T00:00:00.000000000",
],
[
"2000-08-01T00:00:00.000000000",
"2000-09-01T00:00:00.000000000",
],
[
"2000-09-01T00:00:00.000000000",
"2000-10-01T00:00:00.000000000",
],
[
"2000-10-01T00:00:00.000000000",
"2000-11-01T00:00:00.000000000",
],
[
"2000-11-01T00:00:00.000000000",
"2000-12-01T00:00:00.000000000",
],
[
"2000-12-01T00:00:00.000000000",
"2001-01-01T00:00:00.000000000",
],
[
"2001-01-01T00:00:00.000000000",
"2001-02-01T00:00:00.000000000",
],
[
"2001-02-01T00:00:00.000000000",
"2001-03-01T00:00:00.000000000",
],
],
dtype="datetime64[ns]",
),
coords={"time": ds.time},
dims=["time", "bnds"],
attrs={
"is_generated": "True",
},
)
# Set object attrs required to test the method.
ds.temporal._time_bounds = ds.time_bnds.copy()
ds.temporal._mode = "time_series"
ds.temporal._freq = "season"
ds.temporal._weighted = "True"
ds.temporal.season_config = {"dec_mode": "DJF"}
ds.temporal._time_grouped = xr.DataArray(
name="year_season",
data=np.array(
[
"2000-04-01T00:00:00.000000000",
"2000-04-01T00:00:00.000000000",
"2000-04-01T00:00:00.000000000",
"2000-07-01T00:00:00.000000000",
"2000-07-01T00:00:00.000000000",
"2000-07-01T00:00:00.000000000",
"2000-10-01T00:00:00.000000000",
"2000-10-01T00:00:00.000000000",
"2000-10-01T00:00:00.000000000",
"2001-01-01T00:00:00.000000000",
"2001-01-01T00:00:00.000000000",
"2001-01-01T00:00:00.000000000",
],
dtype="datetime64[ns]",
),
coords={"time": ds.time},
dims=["time"],
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
# Compare result of the method against the expected.
result = ds.temporal._get_weights(ds["ts"])
expected = np.array(
[
0.33695652,
0.32608696,
0.33695652,
0.32608696,
0.33695652,
0.33695652,
0.32967033,
0.34065934,
0.32967033,
0.34444444,
0.34444444,
0.31111111,
]
)
assert np.allclose(result, expected, equal_nan=True)
def test_weights_for_seasonal_averages_with_JFD(self):
ds = self.ds.copy()
# Set object attrs required to test the method.
ds.temporal._time_bounds = ds.time_bnds.copy()
ds.temporal._mode = "time_series"
ds.temporal._freq = "season"
ds.temporal._weighted = "True"
ds.temporal.season_config = {"dec_mode": "JDF"}
ds.temporal._time_grouped = xr.DataArray(
name="year_season",
data=np.array(
[
"2000-01-01T00:00:00.000000000",
"2000-01-01T00:00:00.000000000",
"2000-04-01T00:00:00.000000000",
"2000-04-01T00:00:00.000000000",
"2000-04-01T00:00:00.000000000",
"2000-07-01T00:00:00.000000000",
"2000-07-01T00:00:00.000000000",
"2000-07-01T00:00:00.000000000",
"2000-10-01T00:00:00.000000000",
"2000-10-01T00:00:00.000000000",
"2000-10-01T00:00:00.000000000",
# This month is included in the JFD season
"2000-01-01T00:00:00.000000000",
"2001-01-01T00:00:00.000000000",
"2001-01-01T00:00:00.000000000",
"2002-01-01T00:00:00.000000000",
],
dtype="datetime64[ns]",
),
coords={"time": ds.time},
dims=["time"],
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
# Compare result of the method against the expected.
result = ds.temporal._get_weights(self.ds["ts"])
expected = np.array(
[
0.34065934,
0.31868132,
0.33695652,
0.32608696,
0.33695652,
0.32608696,
0.33695652,
0.33695652,
0.32967033,
0.34065934,
0.32967033,
0.34065934,
0.52542373,
0.47457627,
1.0,
]
)
assert np.allclose(result, expected)
def test_custom_season_time_series_weights(self):
ds = self.ds.copy()
# Set object attrs required to test the method.
ds.temporal._time_bounds = ds.time_bnds.copy()
ds.temporal._mode = "time_series"
ds.temporal._freq = "season"
ds.temporal._weighted = "True"
ds.temporal._season_config = {
"custom_seasons": {
"JanFebMar": ["Jan", "Feb", "Mar"],
"AprMayJun": ["Apr", "May", "Jun"],
"JulAugSep": ["Jul", "Aug", "Sep"],
"OctNovDec": ["Oct", "Nov", "Dec"],
}
}
ds.temporal._time_grouped = xr.DataArray(
name="year_season",
data=np.array(
[
"2000-02-01T00:00:00.000000000",
"2000-02-01T00:00:00.000000000",
"2000-02-01T00:00:00.000000000",
"2000-05-01T00:00:00.000000000",
"2000-05-01T00:00:00.000000000",
"2000-05-01T00:00:00.000000000",
"2000-08-01T00:00:00.000000000",
"2000-08-01T00:00:00.000000000",
"2000-08-01T00:00:00.000000000",
"2000-11-01T00:00:00.000000000",
"2000-11-01T00:00:00.000000000",
"2000-11-01T00:00:00.000000000",
"2001-02-01T00:00:00.000000000",
"2001-02-01T00:00:00.000000000",
"2002-02-01T00:00:00.000000000",
],
dtype="datetime64[ns]",
),
coords={"time": ds.time},
dims=["time"],
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
# Compare result of the method against the expected.
result = ds.temporal._get_weights(self.ds["ts"])
expected = np.array(
[
0.34065934,
0.31868132,
0.34065934,
0.32967033,
0.34065934,
0.32967033,
0.33695652,
0.33695652,
0.32608696,
0.33695652,
0.32608696,
0.33695652,
0.52542373,
0.47457627,
1.0,
]
)
assert np.allclose(result, expected)
def test_weights_for_daily_averages(self):
ds = self.ds.copy()
# Set object attrs required to test the method.
ds.temporal._time_bounds = ds.time_bnds.copy()
ds.temporal._mode = "time_series"
ds.temporal._freq = "daily"
ds.temporal._weighted = "True"
ds.temporal._time_grouped = xr.DataArray(
name="year_month_day",
data=np.array(
[
"2000-01-16T00:00:00.000000000",
"2000-02-15T00:00:00.000000000",
"2000-03-16T00:00:00.000000000",
"2000-04-16T00:00:00.000000000",
"2000-05-16T00:00:00.000000000",
"2000-06-16T00:00:00.000000000",
"2000-07-16T00:00:00.000000000",
"2000-08-16T00:00:00.000000000",
"2000-09-16T00:00:00.000000000",
"2000-10-16T00:00:00.000000000",
"2000-11-16T00:00:00.000000000",
"2000-12-16T00:00:00.000000000",
"2001-01-16T00:00:00.000000000",
"2001-02-15T00:00:00.000000000",
"2001-12-16T00:00:00.000000000",
],
dtype="datetime64[ns]",
),
coords={"time": ds.time},
dims=["time"],
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
# Compare result of the method against the expected.
result = ds.temporal._get_weights(self.ds["ts"])
expected = np.ones(15)
assert np.allclose(result, expected)
def test_weights_for_hourly_averages(self):
ds = self.ds.copy()
# Set object attrs required to test the method.
ds.temporal._time_bounds = ds.time_bnds.copy()
ds.temporal._mode = "time_series"
ds.temporal._freq = "hour"
ds.temporal._weighted = "True"
ds.temporal.season_config = {"dec_mode": "JDF"}
ds.temporal._time_grouped = xr.DataArray(
name="year_month_day_hour",
data=np.array(
[
"2000-01-16T12:00:00.000000000",
"2000-02-15T12:00:00.000000000",
"2000-03-16T12:00:00.000000000",
"2000-04-16T00:00:00.000000000",
"2000-05-16T12:00:00.000000000",
"2000-06-16T00:00:00.000000000",
"2000-07-16T12:00:00.000000000",
"2000-08-16T12:00:00.000000000",
"2000-09-16T00:00:00.000000000",
"2000-10-16T12:00:00.000000000",
"2000-11-16T00:00:00.000000000",
"2000-12-16T12:00:00.000000000",
"2001-01-16T12:00:00.000000000",
"2001-02-15T00:00:00.000000000",
"2001-12-16T12:00:00.000000000",
],
dtype="datetime64[ns]",
),
coords={"time": ds.time},
dims=["time"],
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
# Compare result of the method against the expected.
result = ds.temporal._get_weights(self.ds["ts"])
expected = np.ones(15)
assert np.allclose(result, expected)
class TestGroupByFreq:
@pytest.fixture(autouse=True)
def setup(self):
self.ds = generate_dataset(cf_compliant=True, has_bounds=True)
def test_groups_data_var_for_seasonal_averaging_with_JFD(self):
ds = self.ds.copy()
# Set object attrs required to test the method.
time_grouped = xr.DataArray(
name="year_season",
data=np.array(
[
"2000-01-01T00:00:00.000000000",
"2000-01-01T00:00:00.000000000",
"2000-04-01T00:00:00.000000000",
"2000-04-01T00:00:00.000000000",
"2000-04-01T00:00:00.000000000",
"2000-07-01T00:00:00.000000000",
"2000-07-01T00:00:00.000000000",
"2000-07-01T00:00:00.000000000",
"2000-10-01T00:00:00.000000000",
"2000-10-01T00:00:00.000000000",
"2000-10-01T00:00:00.000000000",
"2001-01-01T00:00:00.000000000",
"2001-01-01T00:00:00.000000000",
"2001-01-01T00:00:00.000000000",
"2002-01-01T00:00:00.000000000",
],
dtype="datetime64[ns]",
),
coords={"time": ds.time},
dims=["time"],
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
ds.temporal._time_grouped = time_grouped
ts = ds.ts.copy()
expected = ts.copy()
expected.coords["year_season"] = time_grouped
expected = expected.groupby("year_season")
result = ds.temporal._groupby_freq(ts)
assert result.groups == expected.groups
def test_groups_data_var_for_seasonal_climatology_with_DJF(self):
ds = self.ds.copy()
# Set object attrs required to test the method.
time_grouped = xr.DataArray(
name="season",
data=np.array(
[
# JFD
cftime.datetime(1, 1, 1),
cftime.datetime(1, 1, 1),
cftime.datetime(1, 1, 1),
# MAM
cftime.datetime(1, 3, 1),
cftime.datetime(1, 3, 1),
cftime.datetime(1, 3, 1),
# JJA
cftime.datetime(1, 7, 1),
cftime.datetime(1, 7, 1),
cftime.datetime(1, 7, 1),
# SON
cftime.datetime(1, 10, 1),
cftime.datetime(1, 10, 1),
cftime.datetime(1, 10, 1),
# JFD
cftime.datetime(1, 1, 1),
cftime.datetime(1, 1, 1),
cftime.datetime(1, 1, 1),
],
),
coords={"time": ds.time},
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
ds.temporal._time_grouped = time_grouped
ts = ds.ts.copy()
expected = ts.copy()
expected.coords["season"] = time_grouped
expected = expected.groupby("season")
result = ds.temporal._groupby_freq(ts)
assert result.groups == expected.groups
class TestAddOperationAttributes:
@pytest.fixture(autouse=True)
def setup(self):
self.ds = generate_dataset(cf_compliant=True, has_bounds=True)
def test_adds_attrs_to_data_var_with_DJF(self):
ds = self.ds.copy()
# Set object attrs required to test the method.
ds.temporal._mode = "climatology"
ds.temporal._freq = "season"
ds.temporal._weighted = True
ds.temporal._center_times = True
ds.temporal._season_config = {
"dec_mode": "DJF",
"drop_incomplete_djf": "True",
}
ds.temporal._time_grouped = xr.DataArray(
name="year_season",
data=np.array(
[
"2000-01-01T00:00:00.000000000",
"2000-01-01T00:00:00.000000000",
"2000-04-01T00:00:00.000000000",
"2000-04-01T00:00:00.000000000",
"2000-04-01T00:00:00.000000000",
"2000-07-01T00:00:00.000000000",
"2000-07-01T00:00:00.000000000",
"2000-07-01T00:00:00.000000000",
"2000-10-01T00:00:00.000000000",
"2000-10-01T00:00:00.000000000",
"2000-10-01T00:00:00.000000000",
"2001-01-01T00:00:00.000000000",
"2001-01-01T00:00:00.000000000",
"2001-01-01T00:00:00.000000000",
"2002-01-01T00:00:00.000000000",
],
dtype="datetime64[ns]",
),
coords={"time": ds.time},
dims=["time"],
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
# Compare result of the method against the expected.
result = ds.temporal._add_operation_attrs(ds.ts)
expected = ds.ts.copy()
expected.attrs.update(
{
"operation": "temporal_avg",
"mode": ds.temporal._mode,
"freq": ds.temporal._freq,
"weighted": "True",
"center_times": "True",
"dec_mode": "DJF",
"drop_incomplete_djf": "True",
}
)
assert result.identical(expected)
def test_adds_attrs_to_data_var_with_custom_seasons(self):
ds = self.ds.copy()
# Set object attrs required to test the method.
ds.temporal._mode = "climatology"
ds.temporal._freq = "season"
ds.temporal._weighted = True
ds.temporal._center_times = True
ds.temporal._season_config = {
"custom_seasons": {
"JanFebMar": ["Jan", "Feb", "Mar"],
"AprMayJun": ["Apr", "May", "Jun"],
"JulAugSep": ["Jul", "Aug", "Sep"],
"OctNovDec": ["Oct", "Nov", "Dec"],
}
}
ds.temporal._time_grouped = xr.DataArray(
name="year_season",
data=np.array(
[
"2000-01-01T00:00:00.000000000",
"2000-01-01T00:00:00.000000000",
"2000-04-01T00:00:00.000000000",
"2000-04-01T00:00:00.000000000",
"2000-04-01T00:00:00.000000000",
"2000-07-01T00:00:00.000000000",
"2000-07-01T00:00:00.000000000",
"2000-07-01T00:00:00.000000000",
"2000-10-01T00:00:00.000000000",
"2000-10-01T00:00:00.000000000",
"2000-10-01T00:00:00.000000000",
"2001-01-01T00:00:00.000000000",
"2001-01-01T00:00:00.000000000",
"2001-01-01T00:00:00.000000000",
"2002-01-01T00:00:00.000000000",
],
dtype="datetime64[ns]",
),
coords={"time": ds.time},
dims=["time"],
attrs={
"axis": "T",
"long_name": "time",
"standard_name": "time",
"bounds": "time_bnds",
},
)
# Compare result of the method against the expected.
result = ds.temporal._add_operation_attrs(ds.ts)
expected = ds.ts.copy()
expected.attrs.update(
{
"operation": "temporal_avg",
"mode": ds.temporal._mode,
"freq": ds.temporal._freq,
"weighted": "True",
"center_times": "True",
"custom_seasons": ["JanFebMar", "AprMayJun", "JulAugSep", "OctNovDec"],
}
)
assert result.identical(expected)
| 36.748624 | 87 | 0.40835 | 12,646 | 140,196 | 4.404476 | 0.030207 | 0.029803 | 0.09686 | 0.085154 | 0.926193 | 0.911381 | 0.896605 | 0.882817 | 0.872116 | 0.863732 | 0 | 0.168094 | 0.467709 | 140,196 | 3,814 | 88 | 36.758259 | 0.578291 | 0.038774 | 0 | 0.785168 | 1 | 0 | 0.171786 | 0.089559 | 0 | 0 | 0 | 0.000262 | 0.02266 | 1 | 0.029429 | false | 0 | 0.002649 | 0 | 0.039141 | 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 |
795b1ad40c5df92f4d060c187ab67908a61fbcd2 | 35 | py | Python | graphn/datasets/__init__.py | yop0/GraphN | 2aa56eea724c89f4c607ef432678bd4f1860592d | [
"MIT"
] | 2 | 2018-12-17T22:13:15.000Z | 2020-03-13T02:07:07.000Z | graphn/datasets/__init__.py | yop0/GraphN | 2aa56eea724c89f4c607ef432678bd4f1860592d | [
"MIT"
] | 1 | 2019-03-10T00:33:23.000Z | 2019-03-10T07:14:07.000Z | graphn/datasets/__init__.py | yop0/GraphN | 2aa56eea724c89f4c607ef432678bd4f1860592d | [
"MIT"
] | 1 | 2019-01-28T10:41:02.000Z | 2019-01-28T10:41:02.000Z | from . import cora
from . import dd | 17.5 | 18 | 0.742857 | 6 | 35 | 4.333333 | 0.666667 | 0.769231 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.2 | 35 | 2 | 19 | 17.5 | 0.928571 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 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 |
79a33131d8adfb1988bbedc5e206f469826a622e | 112 | py | Python | edukit/utilities/trustplatform/assets/python/trustplatform/__init__.py | TheAnton205/vax-scan3 | 6d6bd73d070372b750b06b489edaf6b8c17539ee | [
"Unlicense"
] | 78 | 2020-12-16T01:04:28.000Z | 2022-03-29T02:07:38.000Z | edukit/utilities/trustplatform/assets/python/trustplatform/__init__.py | TheAnton205/vax-scan3 | 6d6bd73d070372b750b06b489edaf6b8c17539ee | [
"Unlicense"
] | 88 | 2020-12-19T02:39:12.000Z | 2022-03-15T18:00:00.000Z | edukit/utilities/trustplatform/assets/python/trustplatform/__init__.py | TheAnton205/vax-scan3 | 6d6bd73d070372b750b06b489edaf6b8c17539ee | [
"Unlicense"
] | 47 | 2020-12-18T16:55:10.000Z | 2022-02-11T02:04:16.000Z | from .sys_helper import *
from .program_helper import *
from .path_helper import *
from .common_helper import *
| 22.4 | 29 | 0.785714 | 16 | 112 | 5.25 | 0.4375 | 0.571429 | 0.571429 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.142857 | 112 | 4 | 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 |
8dbd5da6b93a9cbf11852c7c7366a23fa96e280e | 375 | py | Python | ast/license.py | ErikWittern/libgraphqlparser | 4bf7b891ef97edbdeb178cb9f74a5c06149f4acb | [
"MIT"
] | 1,028 | 2015-08-19T18:44:39.000Z | 2022-03-24T23:43:07.000Z | ast/license.py | ErikWittern/libgraphqlparser | 4bf7b891ef97edbdeb178cb9f74a5c06149f4acb | [
"MIT"
] | 91 | 2015-08-20T15:55:33.000Z | 2022-01-08T03:57:01.000Z | ast/license.py | ErikWittern/libgraphqlparser | 4bf7b891ef97edbdeb178cb9f74a5c06149f4acb | [
"MIT"
] | 190 | 2015-08-20T00:24:05.000Z | 2022-02-09T12:30:47.000Z | # Copyright 2019-present GraphQL Foundation
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
C_LICENSE_COMMENT = '''/**
* Copyright 2019-present GraphQL Foundation
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'''
| 34.090909 | 66 | 0.76 | 57 | 375 | 4.964912 | 0.403509 | 0.141343 | 0.141343 | 0.190813 | 0.946996 | 0.946996 | 0.946996 | 0.946996 | 0.946996 | 0.946996 | 0 | 0.026059 | 0.181333 | 375 | 10 | 67 | 37.5 | 0.895765 | 0.429333 | 0 | 0 | 0 | 0 | 0.852381 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 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 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
8dee80a448e4c4539bb4c10801d994e8ba138186 | 338 | py | Python | chainerex/optimizers/__init__.py | corochann/chainerex | 15efb34a8fa6afab1ce5ad52c3802960ab6d49c2 | [
"MIT"
] | 1 | 2018-08-30T08:59:50.000Z | 2018-08-30T08:59:50.000Z | chainerex/optimizers/__init__.py | corochann/chainerex | 15efb34a8fa6afab1ce5ad52c3802960ab6d49c2 | [
"MIT"
] | null | null | null | chainerex/optimizers/__init__.py | corochann/chainerex | 15efb34a8fa6afab1ce5ad52c3802960ab6d49c2 | [
"MIT"
] | null | null | null | from chainerex.optimizers import EWC # NOQA
from chainerex.optimizers import hessian_free # NOQA
from chainerex.optimizers import ssa # NOQA
# import class and function
from chainerex.optimizers.EWC import EWC # NOQA
from chainerex.optimizers.hessian_free import HessianFree # NOQA
from chainerex.optimizers.ssa import SSA # NOQA
| 33.8 | 65 | 0.807692 | 45 | 338 | 6.022222 | 0.288889 | 0.287823 | 0.509225 | 0.398524 | 0.409594 | 0.265683 | 0 | 0 | 0 | 0 | 0 | 0 | 0.14497 | 338 | 9 | 66 | 37.555556 | 0.937716 | 0.162722 | 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 |
5c1e5ca149d9a59ba5afd0649c35ef5ea5772777 | 40 | py | Python | api/api_0/apiRequest/__init__.py | modulo-/knoydart | c1838b12704305b165466d89552fd1e99da5a444 | [
"Apache-2.0"
] | null | null | null | api/api_0/apiRequest/__init__.py | modulo-/knoydart | c1838b12704305b165466d89552fd1e99da5a444 | [
"Apache-2.0"
] | null | null | null | api/api_0/apiRequest/__init__.py | modulo-/knoydart | c1838b12704305b165466d89552fd1e99da5a444 | [
"Apache-2.0"
] | null | null | null | from .. import api
from .. import mysql
| 13.333333 | 20 | 0.7 | 6 | 40 | 4.666667 | 0.666667 | 0.714286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.2 | 40 | 2 | 21 | 20 | 0.875 | 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 |
5c302839c49b571912781feba4adce0d7b21e4e3 | 3,760 | py | Python | blog/models.py | ryanleonbutler/rbo | f51d19c5fd056ebdfba1416a9377b225eb1015e6 | [
"Apache-2.0"
] | null | null | null | blog/models.py | ryanleonbutler/rbo | f51d19c5fd056ebdfba1416a9377b225eb1015e6 | [
"Apache-2.0"
] | 8 | 2021-04-28T21:02:47.000Z | 2022-03-25T20:35:57.000Z | blog/models.py | ryanleonbutler/rbo | f51d19c5fd056ebdfba1416a9377b225eb1015e6 | [
"Apache-2.0"
] | null | null | null | from django.db import models
from django.urls import reverse
from django.utils import timezone
from django.utils.text import slugify
STATUS = ((0, "Draft"), (1, "Publish"))
class Category(models.Model):
name = models.CharField(max_length=20)
def __str__(self):
return self.name
class Meta:
"""Meta definition for Category."""
verbose_name = "Category"
verbose_name_plural = "Categories"
class NibbleCategory(models.Model):
name = models.CharField(max_length=20)
def __str__(self):
return self.name
class Meta:
"""Meta definition for Category."""
verbose_name = "Nibble Category"
verbose_name_plural = "Nibble Categories"
class Post(models.Model):
title = models.CharField(max_length=255)
slug = models.SlugField(default="", max_length=200, editable=False)
post_path = models.CharField(max_length=255, default="", blank=True)
preview = models.CharField(max_length=255, default="", blank=True)
created_on = models.DateTimeField(auto_now_add=True)
last_modified = models.DateTimeField(auto_now=True)
status = models.IntegerField(choices=STATUS, default=0)
publish_date = models.DateTimeField(default=timezone.now, null=True, blank=True)
categories = models.ManyToManyField("Category", related_name="posts")
read_time = models.IntegerField(default=0)
like_counter = models.IntegerField(default=0, blank=True, editable=False)
view_counter = models.IntegerField(default=0, blank=True, editable=False)
def get_absolute_url(self):
return reverse("post", kwargs={"slug": self.slug})
def save(self, *args, **kwargs):
value = self.title
self.slug = slugify(value, allow_unicode=True)
super().save(*args, **kwargs)
def __str__(self):
return self.title
class Meta:
"""Meta definition for Post."""
ordering = ["-publish_date"]
verbose_name = "Post"
verbose_name_plural = "Posts"
class Nibble(models.Model):
title = models.CharField(max_length=255)
slug = models.SlugField(default="", max_length=200, editable=False)
nibble_path = models.CharField(max_length=255, default="", blank=True)
preview = models.CharField(max_length=255, default="", blank=True)
created_on = models.DateTimeField(auto_now_add=True)
last_modified = models.DateTimeField(auto_now=True)
status = models.IntegerField(choices=STATUS, default=0)
publish_date = models.DateTimeField(default=timezone.now, null=True, blank=True)
categories = models.ManyToManyField("NibbleCategory", related_name="nibbles")
like_counter = models.IntegerField(default=0, blank=True, editable=False)
view_counter = models.IntegerField(default=0, blank=True, editable=False)
def get_absolute_url(self):
return reverse("nibble", kwargs={"slug": self.slug})
def save(self, *args, **kwargs):
value = self.title
self.slug = slugify(value, allow_unicode=True)
super().save(*args, **kwargs)
def __str__(self):
return self.title
class Meta:
"""Meta definition for a Nibble."""
ordering = ["-publish_date"]
verbose_name = "Nibble"
verbose_name_plural = "Nibbles"
class PostViews(models.Model):
ip_address = models.GenericIPAddressField()
post = models.ForeignKey("Post", on_delete=models.CASCADE)
def __str__(self):
return "{0} in {1} post".format(self.ip_address, self.post.title)
class NibbleViews(models.Model):
ip_address = models.GenericIPAddressField()
post = models.ForeignKey("Nibble", on_delete=models.CASCADE)
def __str__(self):
return "{0} in {1} nibble".format(self.ip_address, self.post.title)
| 32.695652 | 84 | 0.688298 | 457 | 3,760 | 5.485777 | 0.201313 | 0.035899 | 0.057439 | 0.076586 | 0.803351 | 0.779418 | 0.779418 | 0.753889 | 0.753889 | 0.700439 | 0 | 0.013425 | 0.187766 | 3,760 | 114 | 85 | 32.982456 | 0.807466 | 0.030585 | 0 | 0.615385 | 0 | 0 | 0.056291 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.128205 | false | 0 | 0.051282 | 0.102564 | 0.782051 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 7 |
30872835a12b5fab3186c418dc461a0c52035f7a | 1,534 | py | Python | dataset.py | atch841/pytorch-one-shot-texture-segmentation | 8b781b861d17eb1e1e7014f54f8fd39dc10dd2b8 | [
"MIT"
] | null | null | null | dataset.py | atch841/pytorch-one-shot-texture-segmentation | 8b781b861d17eb1e1e7014f54f8fd39dc10dd2b8 | [
"MIT"
] | null | null | null | dataset.py | atch841/pytorch-one-shot-texture-segmentation | 8b781b861d17eb1e1e7014f54f8fd39dc10dd2b8 | [
"MIT"
] | null | null | null | from torch.utils.data import Dataset
from data_loader import Data_loader
import numpy as np
'''
Dynamic generate data when training.
Load generated data when validating.
'''
class Texture_dataset_train(Dataset):
def __init__(self, data_size, textures_path, max_region=10):
self.data_size = data_size
self.data = Data_loader(textures_path, 1, max_region)
def __len__(self):
return self.data_size
def __getitem__(self, idx):
x, y, x_ref = self.data.get_batch_data()
x = x[0]
y = y[0]
x_ref = x_ref[0]
x = np.swapaxes(x, 1, 2)
x = np.swapaxes(x, 0, 1)
y = np.swapaxes(y, 1, 2)
y = np.swapaxes(y, 0, 1)
x_ref = np.swapaxes(x_ref, 1, 2)
x_ref = np.swapaxes(x_ref, 0, 1)
x, y, x_ref = x.astype('float32'), y.astype('float32'), x_ref.astype('float32')
return x, y, x_ref
class Texture_dataset_val(Dataset):
def __init__(self, data_size, textures_path, max_region=10):
self.data_size = data_size
self.data = Data_loader(textures_path, 1, max_region)
self.preload = []
for i in range(self.data_size):
x, y, x_ref = self.data.get_batch_data()
x = x[0]
y = y[0]
x_ref = x_ref[0]
x = np.swapaxes(x, 1, 2)
x = np.swapaxes(x, 0, 1)
y = np.swapaxes(y, 1, 2)
y = np.swapaxes(y, 0, 1)
x_ref = np.swapaxes(x_ref, 1, 2)
x_ref = np.swapaxes(x_ref, 0, 1)
x, y, x_ref = x.astype('float32'), y.astype('float32'), x_ref.astype('float32')
self.preload.append((x, y, x_ref))
def __len__(self):
return self.data_size
def __getitem__(self, idx):
return self.preload[idx] | 27.890909 | 82 | 0.671447 | 279 | 1,534 | 3.430108 | 0.182796 | 0.083595 | 0.091954 | 0.037618 | 0.714734 | 0.714734 | 0.714734 | 0.714734 | 0.714734 | 0.714734 | 0 | 0.038186 | 0.180574 | 1,534 | 55 | 83 | 27.890909 | 0.72315 | 0 | 0 | 0.772727 | 1 | 0 | 0.028906 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.136364 | false | 0 | 0.068182 | 0.068182 | 0.340909 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
30a01e4e64e7cc8aef8ded191bd04b4770395c89 | 29,757 | py | Python | tests/ut/python/tests/test_register_method.py | mindspore-ai/serving | e32d989ce629b4bdbbf3f16fefb02b28dce2dc4c | [
"Apache-2.0"
] | 157 | 2020-12-10T09:42:48.000Z | 2021-12-02T09:27:48.000Z | tests/ut/python/tests/test_register_method.py | mindspore-ai/serving | e32d989ce629b4bdbbf3f16fefb02b28dce2dc4c | [
"Apache-2.0"
] | 1 | 2021-12-08T11:39:59.000Z | 2022-01-17T09:09:54.000Z | tests/ut/python/tests/test_register_method.py | mindspore-ai/serving | e32d989ce629b4bdbbf3f16fefb02b28dce2dc4c | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""test Serving pipeline with client"""
import numpy as np
from common import ServingTestBase
from common import serving_test, create_client
from common import start_serving_server
from mindspore_serving import server
@serving_test
def test_register_method_with_model_success():
"""
Feature: test register method
Description: method with only python function stage, python function has model.call
Expectation: success to start serving server.
"""
servable_content = r"""
import numpy as np
from mindspore_serving.server import register
model = register.declare_model(model_file="tensor_add.mindir", model_format="MindIR", with_batch_dim=False)
def call_model(x1, x2):
y = model.call(x1, x2)
return y
@register.register_method(output_names="y")
def predict(x1, x2):
y = register.add_stage(call_model, x1, x2, outputs_count=1)
return y
"""
base = start_serving_server(servable_content, version_number=1, start_version_number=1)
# Client
x1 = np.array([[1.1, 2.2], [3.3, 4.4]], np.float32)
x2 = np.array([[5.5, 6.6], [7.7, 8.8]], np.float32)
y = x1 + x2
instances = [{"x1": x1, "x2": x2}]
client = create_client("localhost:5500", base.servable_name, "predict")
result = client.infer(instances)
print("result", result)
assert (result[0]["y"] == y).all()
@serving_test
def test_register_method_without_add_stage_success():
"""
Feature: test register method
Description: method without any stages
Expectation: success to start serving server.
"""
servable_content = r"""
import numpy as np
from mindspore_serving.server import register
model = register.declare_model(model_file="tensor_add.mindir", model_format="MindIR", with_batch_dim=False)
@register.register_method(output_names=["x1", "x2"])
def predict(x1, x2):
return x1, x2
"""
base = start_serving_server(servable_content)
# Client
x1 = np.array([[1.1, 2.2], [3.3, 4.4]], np.float32)
x2 = np.array([[5.5, 6.6], [7.7, 8.8]], np.float32)
instances = [{"x1": x1, "x2": x2}] * 3
client = create_client("localhost:5500", base.servable_name, "predict")
result = client.infer(instances)
print("result", result)
assert len(result) == 3
assert (result[0]["x1"] == x1).all()
assert (result[0]["x2"] == x2).all()
@serving_test
def test_register_method_without_register_method_failed():
"""
Feature: test register method
Description: without any methods
Expectation: failed to start serving server.
"""
servable_content = r"""
import numpy as np
from mindspore_serving.server import register
model = register.declare_model(model_file="tensor_add.mindir", model_format="MindIR", with_batch_dim=False)
"""
try:
start_serving_server(servable_content)
assert False
except RuntimeError as e:
assert "There is no method registered for servable" in str(e)
@serving_test
def test_register_method_two_input_one_output_one_model_stage_input_more_failed():
"""
Feature: test register method
Description: model input count not equal to model stage input count
Expectation: failed to start serving server.
"""
servable_content = r"""
import numpy as np
from mindspore_serving.server import register
tensor_add = register.declare_model(model_file="tensor_add.mindir", model_format="MindIR", with_batch_dim=False)
@register.register_method(output_names="y")
def predict(x1, x2, x3):
y = register.add_stage(tensor_add, x1, x2, x3, outputs_count=1)
return y
"""
try:
start_serving_server(servable_content, model_file="tensor_add.mindir")
assert False
except RuntimeError as e:
assert "The inputs count 3 in register_method not equal to the count 2 defined in model" in str(e)
@serving_test
def test_register_method_two_input_one_output_one_model_stage_input_less_failed():
"""
Feature: test register method
Description: model input count not equal to model stage input count
Expectation: failed to start serving server.
"""
servable_content = r"""
import numpy as np
from mindspore_serving.server import register
tensor_add = register.declare_model(model_file="tensor_add.mindir", model_format="MindIR", with_batch_dim=False)
@register.register_method(output_names="y")
def predict(x1, x2, x3):
y = register.add_stage(tensor_add, x1, outputs_count=1)
return y
"""
try:
start_serving_server(servable_content, model_file="tensor_add.mindir")
assert False
except RuntimeError as e:
assert "The inputs count 1 in register_method not equal to the count 2 defined in model" in str(e)
@serving_test
def test_register_method_two_input_one_output_one_model_stage_input_less2_failed():
"""
Feature: test register method
Description: model input count not equal to some model stage input count
Expectation: failed to start serving server.
"""
servable_content = r"""
import numpy as np
from mindspore_serving.server import register
tensor_add = register.declare_model(model_file="tensor_add.mindir", model_format="MindIR", with_batch_dim=False)
@register.register_method(output_names="y")
def predict(x1, x2, x3):
y = register.add_stage(tensor_add, x1, x2, outputs_count=1)
y = register.add_stage(tensor_add, y, outputs_count=1)
return y
"""
try:
start_serving_server(servable_content, model_file="tensor_add.mindir")
assert False
except RuntimeError as e:
assert "RegisterInputOutputInfo failed, inputs count 1 not match old count 2" in str(e)
@serving_test
def test_register_method_two_input_one_output_one_model_stage_input_less3_failed():
"""
Feature: test register method
Description: model input count not equal to model stage input count
Expectation: failed to start serving server.
"""
servable_content = r"""
import numpy as np
from mindspore_serving.server import register
tensor_add = register.declare_model(model_file="tensor_add.mindir", model_format="MindIR", with_batch_dim=False)
@register.register_method(output_names="y")
def predict(x1, x2, x3):
y = register.add_stage(tensor_add, x1, outputs_count=1)
return y
@register.register_method(output_names="y")
def predict2(x1, x2, x3):
y = register.add_stage(tensor_add, x1, x2, outputs_count=1)
return y
"""
try:
start_serving_server(servable_content, model_file="tensor_add.mindir")
assert False
except RuntimeError as e:
assert "RegisterInputOutputInfo failed, inputs count 2 not match old count 1" in str(e)
@serving_test
def test_register_method_two_input_one_output_one_model_stage_with_batch_dim_input_more_failed():
"""
Feature: test register method
Description: model input count not equal to model stage input count, with_batch_dim is True
Expectation: failed to start serving server.
"""
servable_content = r"""
import numpy as np
from mindspore_serving.server import register
tensor_add = register.declare_model(model_file="tensor_add.mindir", model_format="MindIR", with_batch_dim=True)
@register.register_method(output_names="y")
def predict(x1, x2, x3):
y = register.add_stage(tensor_add, x1, x2, x3, outputs_count=1)
return y
"""
try:
start_serving_server(servable_content, model_file="tensor_add.mindir")
assert False
except RuntimeError as e:
assert "The inputs count 3 in register_method not equal to the count 2 defined in model" in str(e)
@serving_test
def test_register_method_two_input_one_output_one_model_stage_with_batch_dim_input_less_failed():
"""
Feature: test register method
Description: model input count not equal to model stage input count, with_batch_dim is True
Expectation: failed to start serving server.
"""
servable_content = r"""
import numpy as np
from mindspore_serving.server import register
tensor_add = register.declare_model(model_file="tensor_add.mindir", model_format="MindIR", with_batch_dim=True)
@register.register_method(output_names="y")
def predict(x1, x2, x3):
y = register.add_stage(tensor_add, x1, outputs_count=1)
return y
"""
try:
start_serving_server(servable_content, model_file="tensor_add.mindir")
assert False
except RuntimeError as e:
assert "The inputs count 1 in register_method not equal to the count 2 defined in model" in str(e)
@serving_test
def test_register_method_two_input_two_output_one_model_stage_output_more_failed():
"""
Feature: test register method
Description: model output count not equal to model stage output count, with_batch_dim is True
Expectation: failed to start serving server.
"""
servable_content = r"""
import numpy as np
from mindspore_serving.server import register
tensor_add = register.declare_model(model_file="tensor_add_2_2.mindir", model_format="MindIR", with_batch_dim=True)
@register.register_method(output_names=["y1", "y2"])
def predict(x1, x2):
y1, y2, y3 = register.add_stage(tensor_add, x1, x2, outputs_count=3)
return y1, y2
"""
try:
start_serving_server(servable_content, model_file="tensor_add_2_2.mindir")
assert False
except RuntimeError as e:
assert "The outputs count 3 in register_method not equal to the count 2 defined in model" in str(e)
@serving_test
def test_register_method_three_input_two_output_one_model_stage_output_less_failed():
"""
Feature: test register method
Description: model output count not equal to model stage output count, with_batch_dim is True
Expectation: failed to start serving server.
"""
servable_content = r"""
import numpy as np
from mindspore_serving.server import register
tensor_add = register.declare_model(model_file="tensor_add_2_3.mindir", model_format="MindIR", with_batch_dim=True)
@register.register_method(output_names=["y1", "y2"])
def predict(x1, x2):
y1, y2 = register.add_stage(tensor_add, x1, x2, outputs_count=2)
return y1, y2
"""
try:
start_serving_server(servable_content, model_file="tensor_add_2_3.mindir")
assert False
except RuntimeError as e:
assert "The outputs count 2 in register_method not equal to the count 3 defined in model" in str(e)
@serving_test
def test_register_method_three_input_two_output_one_model_stage_output_less2_failed():
"""
Feature: test register method
Description: model output count not equal to some model stage output count, with_batch_dim is True
Expectation: failed to start serving server.
"""
servable_content = r"""
import numpy as np
from mindspore_serving.server import register
tensor_add = register.declare_model(model_file="tensor_add_2_3.mindir", model_format="MindIR", with_batch_dim=True)
@register.register_method(output_names=["y1", "y2"])
def predict(x1, x2):
y1, y2, y3 = register.add_stage(tensor_add, x1, x2, outputs_count=3)
y1, y2 = register.add_stage(tensor_add, y1, y2, outputs_count=2)
return y1, y2
"""
try:
start_serving_server(servable_content, model_file="tensor_add_2_3.mindir")
assert False
except RuntimeError as e:
assert "RegisterInputOutputInfo failed, outputs count 2 not match old count 3" in str(e)
@serving_test
def test_register_method_three_input_two_output_one_model_stage_output_less3_failed():
"""
Feature: test register method
Description: model output count not equal to some model stage output count, with_batch_dim is True
Expectation: failed to start serving server.
"""
servable_content = r"""
import numpy as np
from mindspore_serving.server import register
tensor_add = register.declare_model(model_file="tensor_add_2_3.mindir", model_format="MindIR", with_batch_dim=True)
@register.register_method(output_names=["y1", "y2"])
def predict(x1, x2):
y1, y2, y3 = register.add_stage(tensor_add, x1, x2, outputs_count=3)
return y1, y2
@register.register_method(output_names=["y1", "y2"])
def predict2(x1, x2):
y1, y2 = register.add_stage(tensor_add, x1, x2, outputs_count=2)
return y1, y2
"""
try:
start_serving_server(servable_content, model_file="tensor_add_2_3.mindir")
assert False
except RuntimeError as e:
assert "RegisterInputOutputInfo failed, outputs count 2 not match old count 3" in str(e)
@serving_test
def test_register_method_model_file_repeat_failed():
"""
Feature: test register method
Description: same model file repeatedly used in diff declare_model
Expectation: failed to start serving server.
"""
servable_content = r"""
import numpy as np
from mindspore_serving.server import register
tensor_add = register.declare_model(model_file="tensor_add.mindir", model_format="MindIR", with_batch_dim=True)
tensor_add2 = register.declare_model(model_file="tensor_add.mindir", model_format="MindIR", with_batch_dim=True)
@register.register_method(output_names=["y"])
def predict(x1, x2):
y = register.add_stage(tensor_add, x1, x2, outputs_count=1)
return y
"""
try:
start_serving_server(servable_content, model_file="tensor_add.mindir")
assert False
except RuntimeError as e:
assert "model file 'tensor_add.mindir' has already been used" in str(e)
@serving_test
def test_register_method_model_file_repeat2_failed():
"""
Feature: test register method
Description: same model file repeatedly used in diff declare_model
Expectation: failed to start serving server.
"""
servable_content = r"""
import numpy as np
from mindspore_serving.server import register
tensor_add = register.declare_model(model_file=["tensor_add.mindir", "tensor_sub.mindir"], model_format="MindIR")
tensor_add2 = register.declare_model(model_file="tensor_add.mindir", model_format="MindIR")
@register.register_method(output_names=["y"])
def predict(x1, x2):
y = register.add_stage(tensor_add, x1, x2, outputs_count=1)
return y
"""
try:
start_serving_server(servable_content, model_file=["tensor_add.mindir", "tensor_sub.mindir"])
assert False
except RuntimeError as e:
assert "model file 'tensor_add.mindir' has already been used" in str(e)
@serving_test
def test_register_method_model_file_repeat3_failed():
"""
Feature: test register method
Description: same model file repeatedly used in diff declare_model
Expectation: failed to start serving server.
"""
servable_content = r"""
import numpy as np
from mindspore_serving.server import register
tensor_add2 = register.declare_model(model_file="tensor_add.mindir", model_format="MindIR")
tensor_add = register.declare_model(model_file=["tensor_add.mindir", "tensor_sub.mindir"], model_format="MindIR")
@register.register_method(output_names=["y"])
def predict(x1, x2):
y = register.add_stage(tensor_add, x1, x2, outputs_count=1)
return y
"""
try:
start_serving_server(servable_content, model_file=["tensor_add.mindir", "tensor_sub.mindir"])
assert False
except RuntimeError as e:
assert "model file 'tensor_add.mindir' has already been used" in str(e)
@serving_test
def test_register_method_method_registered_repeat_failed():
"""
Feature: test register method
Description: methods with same name
Expectation: failed to start serving server.
"""
servable_content = r"""
from mindspore_serving.server import register
tensor_add = register.declare_model(model_file="tensor_add.mindir", model_format="MindIR")
@register.register_method(output_names=["y"])
def add_cast(x1, x2):
y = register.add_stage(tensor_add, x1, x2, outputs_count=1)
return y
@register.register_method(output_names=["y"])
def add_cast(x1, x2):
y = register.add_stage(tensor_add, x1, x2, outputs_count=1)
return y
"""
try:
start_serving_server(servable_content)
assert False
except RuntimeError as e:
assert "Method add_cast has been registered more than once." in str(e)
@serving_test
def test_register_method_input_arg_invalid_failed():
"""
Feature: test register method
Description: method input args invalid
Expectation: failed to start serving server.
"""
servable_content = r"""
from mindspore_serving.server import register
tensor_add = register.declare_model(model_file="tensor_add.mindir", model_format="MindIR")
@register.register_method(output_names=["y"])
def add_cast(x1, **x2):
y = register.add_stage(tensor_add, x1, x2, outputs_count=1)
return y
"""
try:
start_serving_server(servable_content)
assert False
except RuntimeError as e:
assert "'add_cast' input x2 cannot be VAR_KEYWORD !" in str(e)
@serving_test
def test_register_method_input_arg_invalid2_failed():
"""
Feature: test register method
Description: method input args invalid
Expectation: failed to start serving server.
"""
servable_content = r"""
from mindspore_serving.server import register
tensor_add = register.declare_model(model_file="tensor_add.mindir", model_format="MindIR")
@register.register_method(output_names=["y"])
def add_cast(x1, *x2):
y = register.add_stage(tensor_add, x1, x2, outputs_count=1)
return y
"""
try:
start_serving_server(servable_content)
assert False
except RuntimeError as e:
assert "'add_cast' input x2 cannot be VAR_POSITIONAL !" in str(e)
@serving_test
def test_register_method_function_stage_invalid_input_failed():
"""
Feature: test register method
Description: stage input args invalid
Expectation: failed to start serving server.
"""
servable_content = r"""
import numpy as np
from mindspore_serving.server import register
tensor_add = register.declare_model(model_file="tensor_add.mindir", model_format="MindIR")
def func_test(x1, x2):
return x1+1, x2+1
@register.register_method(output_names=["y"])
def add_cast(x1, x2):
x1, x2 = register.add_stage(func_test, x1, np.ones([2,2]), outputs_count=2)
y = register.add_stage(tensor_add, x1, x2, outputs_count=1)
return y
"""
try:
start_serving_server(servable_content)
assert False
except RuntimeError as e:
assert "Each value of parameter *args is a placeholder for data and" in str(e)
@serving_test
def test_register_method_function_stage_invalid_input2_failed():
"""
Feature: test register method
Description: stage input args invalid
Expectation: failed to start serving server.
"""
servable_content = r"""
import numpy as np
from mindspore_serving.server import register
tensor_add = register.declare_model(model_file="tensor_add.mindir", model_format="MindIR")
def postprocess(y, data):
return y
@register.register_method(output_names=["y"])
def add_cast(x1, x2):
y = register.add_stage(tensor_add, x1, x2, outputs_count=1)
y = register.add_stage(postprocess, y, np.ones([2,2]), outputs_count=1)
return y
"""
try:
start_serving_server(servable_content)
assert False
except RuntimeError as e:
assert "Each value of parameter *args is a placeholder for data and" in str(e)
@serving_test
def test_register_method_model_stage_invalid_input_failed():
"""
Feature: test register method
Description: stage input args invalid
Expectation: failed to start serving server.
"""
servable_content = r"""
import numpy as np
from mindspore_serving.server import register
tensor_add = register.declare_model(model_file="tensor_add.mindir", model_format="MindIR")
@register.register_method(output_names=["y"])
def add_cast(x1, x2):
y = register.add_stage(tensor_add, x1, np.ones([2,2]), outputs_count=1)
return y
"""
try:
start_serving_server(servable_content)
assert False
except RuntimeError as e:
assert "Each value of parameter *args is a placeholder for data and" in str(e)
@serving_test
def test_register_method_invalid_return_failed():
"""
Feature: test register method
Description: method return invalid
Expectation: failed to start serving server.
"""
servable_content = r"""
import numpy as np
from mindspore_serving.server import register
tensor_add = register.declare_model(model_file="tensor_add.mindir", model_format="MindIR")
@register.register_method(output_names=["y", "data"])
def add_cast(x1, x2):
y = register.add_stage(tensor_add, x1, x2, outputs_count=1)
return y, np.ones([2,2])
"""
try:
start_serving_server(servable_content)
assert False
except RuntimeError as e:
assert "Each value returned is a placeholder for data and must come from the method" in str(e)
@serving_test
def test_register_method_function_stage_batch_input_count_not_same_failed():
"""
Feature: test register method
Description: function stage input count diff in diff method
Expectation: failed to start serving server.
"""
servable_content = r"""
import numpy as np
from mindspore_serving.server import register
tensor_add = register.declare_model(model_file="tensor_add.mindir", model_format="MindIR")
def func_test_batch(instances):
results = []
for instance in instances:
y1 = instance[0] + instance[1]
y2 = instance[0] - instance[1]
results.append([y1, y2])
return results
@register.register_method(output_names=["y"])
def add_cast(x1, x2):
y = register.add_stage(tensor_add, x1, x2, outputs_count=1)
x1, x2 = register.add_stage(func_test_batch, x1, x2, outputs_count=2, batch_size=4)
return y
@register.register_method(output_names=["y"])
def add_cast2(x1, x2):
y = register.add_stage(tensor_add, x1, x2, outputs_count=1)
x1, x2 = register.add_stage(func_test_batch, x1, x2, y, outputs_count=2, batch_size=4)
return y
"""
base = ServingTestBase()
base.init_servable_with_servable_config(1, servable_content)
try:
server.start_servables(server.ServableStartConfig(base.servable_dir, base.servable_name, device_ids=0))
assert False
except RuntimeError as e:
assert f"'{base.servable_name}.func_test_batch' inputs count 3 " \
f"not match last registered count 2" in str(e)
@serving_test
def test_register_method_function_stage_batch_input_count_not_same2_failed():
"""
Feature: test register method
Description: function stage input count diff in diff method
Expectation: failed to start serving server.
"""
servable_content = r"""
import numpy as np
from mindspore_serving.server import register
tensor_add = register.declare_model(model_file="tensor_add.mindir", model_format="MindIR")
def func_test_batch(instances):
results = []
for instance in instances:
y1 = instance[0] + instance[1]
y2 = instance[0] - instance[1]
results.append([y1, y2])
return results
@register.register_method(output_names=["y"])
def add_cast(x1, x2):
x1, x2 = register.add_stage(func_test_batch, x1, x2, outputs_count=2, batch_size=4)
y = register.add_stage(tensor_add, x1, x2, outputs_count=1)
return y
@register.register_method(output_names=["y"])
def add_cast2(x1, x2, x3):
x1, x2 = register.add_stage(func_test_batch, x1, x2, x3, outputs_count=2, batch_size=4)
y = register.add_stage(tensor_add, x1, x2, outputs_count=1)
return y
"""
base = ServingTestBase()
base.init_servable_with_servable_config(1, servable_content)
try:
server.start_servables(server.ServableStartConfig(base.servable_dir, base.servable_name, device_ids=0))
assert False
except RuntimeError as e:
assert f"'{base.servable_name}.func_test_batch' inputs count 3 " \
f"not match last registered count 2" in str(e)
@serving_test
def test_register_method_function_stage_batch_output_count_not_same_failed():
"""
Feature: test register method
Description: function stage output count diff in diff method
Expectation: failed to start serving server.
"""
servable_content = r"""
import numpy as np
from mindspore_serving.server import register
tensor_add = register.declare_model(model_file="tensor_add.mindir", model_format="MindIR")
def func_test_batch(instances):
results = []
for instance in instances:
y1 = instance[0] + instance[1]
y2 = instance[0] - instance[1]
results.append([y1, y2])
return results
@register.register_method(output_names=["y"])
def add_cast(x1, x2):
y = register.add_stage(tensor_add, x1, x2, outputs_count=1)
x1, x2 = register.add_stage(func_test_batch, x1, x2, outputs_count=2, batch_size=4)
return y
@register.register_method(output_names=["y"])
def add_cast2(x1, x2):
y = register.add_stage(tensor_add, x1, x2, outputs_count=1)
x1, x2, x3 = register.add_stage(func_test_batch, x1, x2, outputs_count=3, batch_size=4)
return y
"""
base = ServingTestBase()
base.init_servable_with_servable_config(1, servable_content)
try:
server.start_servables(server.ServableStartConfig(base.servable_dir, base.servable_name, device_ids=0))
assert False
except RuntimeError as e:
assert f"'{base.servable_name}.func_test_batch' outputs count 3 " \
f"not match last registered count 2" in str(e)
@serving_test
def test_register_method_function_stage_batch_output_count_not_same2_failed():
"""
Feature: test register method
Description: function stage output count diff in diff method
Expectation: failed to start serving server.
"""
servable_content = r"""
import numpy as np
from mindspore_serving.server import register
tensor_add = register.declare_model(model_file="tensor_add.mindir", model_format="MindIR")
def func_test_batch(instances):
results = []
for instance in instances:
y1 = instance[0] + instance[1]
y2 = instance[0] - instance[1]
results.append([y1, y2])
return results
@register.register_method(output_names=["y"])
def add_cast(x1, x2):
x1, x2 = register.add_stage(func_test_batch, x1, x2, outputs_count=2, batch_size=4)
y = register.add_stage(tensor_add, x1, x2, outputs_count=1)
return y
@register.register_method(output_names=["y"])
def add_cast2(x1, x2):
x1, x2, x3 = register.add_stage(func_test_batch, x1, x2, outputs_count=3, batch_size=4)
y = register.add_stage(tensor_add, x1, x2, outputs_count=1)
return y
"""
base = ServingTestBase()
base.init_servable_with_servable_config(1, servable_content)
try:
server.start_servables(server.ServableStartConfig(base.servable_dir, base.servable_name, device_ids=0))
assert False
except RuntimeError as e:
assert f"'{base.servable_name}.func_test_batch' outputs count 3 " \
f"not match last registered count 2" in str(e)
@serving_test
def test_register_method_method_output_count_not_match_output_names_failed():
"""
Feature: test register method
Description: outputs count registered not equal to the count return in function
Expectation: failed to start serving server.
"""
servable_content = r"""
import numpy as np
from mindspore_serving.server import register
tensor_add = register.declare_model(model_file="tensor_add.mindir", model_format="MindIR")
@register.register_method(output_names=["y"])
def add_cast(x1, x2):
y = register.add_stage(tensor_add, x1, x2, outputs_count=1)
return y, x2
"""
base = ServingTestBase()
base.init_servable_with_servable_config(1, servable_content)
try:
server.start_servables(server.ServableStartConfig(base.servable_dir, base.servable_name, device_ids=0))
assert False
except RuntimeError as e:
assert "Method return output size 2 not match registered 1" in str(e)
@serving_test
def test_register_method_method_python_function_batch_size_exist_inconsistently_failed():
"""
Feature: test register method
Description: python function used in multi add_stage, one with batch_size, other without batch_size
Expectation: failed to start serving server.
"""
servable_content = r"""
import numpy as np
from mindspore_serving.server import register
tensor_add = register.declare_model(model_file="tensor_add.mindir", model_format="MindIR")
def stage_test_fun(x1, x2):
return x1+x2
@register.register_method(output_names=["y"])
def add_cast(x1, x2):
y = register.add_stage(stage_test_fun, x1, x2, outputs_count=1)
return y
@register.register_method(output_names=["y"])
def add_cast(x1, x2):
y = register.add_stage(stage_test_fun, x1, x2, outputs_count=1, batch_size=4)
return y
"""
base = ServingTestBase()
base.init_servable_with_servable_config(1, servable_content)
try:
server.start_servables(server.ServableStartConfig(base.servable_dir, base.servable_name, device_ids=0))
assert False
except RuntimeError as e:
assert "parameter 'batch_size' in multiple 'add_stage' should be enabled or disabled consistently" in str(e)
| 35.382878 | 116 | 0.729173 | 4,242 | 29,757 | 4.872702 | 0.053041 | 0.047025 | 0.050508 | 0.065409 | 0.929318 | 0.923416 | 0.909966 | 0.896178 | 0.884615 | 0.884277 | 0 | 0.020244 | 0.173304 | 29,757 | 840 | 117 | 35.425 | 0.82 | 0.159727 | 0 | 0.854386 | 0 | 0.022807 | 0.608529 | 0.280967 | 0 | 0 | 0 | 0 | 0.101754 | 1 | 0.050877 | false | 0 | 0.105263 | 0 | 0.233333 | 0.003509 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
a50d76381a855bf1b7adeaf0c29021d25f42e041 | 9,990 | py | Python | MLGame/games/pingpong/ml/rule_ungn.py | Liuian/1092_INTRODUCTION-TO-MACHINE-LEARNING-AND-ITS-APPLICATION-TO-GAMING | f4a58d0d9f5832a77a4a86352e084065dc7bae50 | [
"MIT"
] | null | null | null | MLGame/games/pingpong/ml/rule_ungn.py | Liuian/1092_INTRODUCTION-TO-MACHINE-LEARNING-AND-ITS-APPLICATION-TO-GAMING | f4a58d0d9f5832a77a4a86352e084065dc7bae50 | [
"MIT"
] | null | null | null | MLGame/games/pingpong/ml/rule_ungn.py | Liuian/1092_INTRODUCTION-TO-MACHINE-LEARNING-AND-ITS-APPLICATION-TO-GAMING | f4a58d0d9f5832a77a4a86352e084065dc7bae50 | [
"MIT"
] | null | null | null | """
The template of the script for the machine learning process in game pingpong
"""
import math
class MLPlay:
import random
def __init__(self, side):
"""
Constructor
@param side A string "1P" or "2P" indicates that the MLPlay is used by
which side.
"""
self.ball_served = False
self.side = side
self.start_frame = 0
self.current_ball_x = 0
self.current_ball_y = 0
self.last_ball_x = 0
self.current_ball_y = 0
self.des_x = 0
def update(self, scene_info):
"""
Generate the command according to the received scene information
"""
if scene_info["status"] != "GAME_ALIVE":
print(scene_info["ball_speed"])
return "RESET"
if not self.ball_served:
if scene_info["frame"]==149:
self.ball_served = True
rand=self.random.randint(0,1)
if rand==0:
return "SERVE_TO_LEFT"
else:
return "SERVE_TO_RIGHT"
else:
if self.side == "1P":
if scene_info["frame"]==self.start_frame or scene_info["frame"]==self.start_frame + 1:
self.current_ball_x=scene_info["ball"][0]
self.current_ball_y=scene_info["ball"][1]
self.des_x = 80
else:
self.last_ball_x = self.current_ball_x
self.last_ball_y = self.current_ball_y
self.current_ball_x=scene_info["ball"][0]
self.current_ball_y=scene_info["ball"][1]
# ball go down
if self.current_ball_y>self.last_ball_y:
# ball go right
if self.current_ball_x>self.last_ball_x:
if scene_info["ball_speed"][0]<=12 or scene_info["ball_speed"][1]<=9:
if scene_info["ball"][1]<200:
self.des_x=(scene_info["ball_speed"][0]/scene_info["ball_speed"][1])*(420-self.current_ball_y)+self.current_ball_x+3 #
else:
self.des_x=(scene_info["ball_speed"][0]/scene_info["ball_speed"][1])*(420-self.current_ball_y)+self.current_ball_x+3 #
else:
#if scene_info["ball_speed"][0]<=16:
if scene_info["ball"][1]<200:
self.des_x=(scene_info["ball_speed"][0]/scene_info["ball_speed"][1])*(420-self.current_ball_y)+self.current_ball_x+5#
else:
self.des_x=(scene_info["ball_speed"][0]/scene_info["ball_speed"][1])*(420-self.current_ball_y)+self.current_ball_x+5#
#else:
# if scene_info["ball"][1]<200:
# self.des_x=(scene_info["ball_speed"][0]/scene_info["ball_speed"][1])*(420-self.current_ball_y)+self.current_ball_x+2 #
# else:
# self.des_x=(scene_info["ball_speed"][0]/scene_info["ball_speed"][1])*(420-self.current_ball_y)+self.current_ball_x+3 #
# ball go left
else:
if scene_info["ball_speed"][0]<-12 or scene_info["ball_speed"][1]<=9:
if scene_info["ball"][1]<200:
self.des_x=self.current_ball_x+(-scene_info["ball_speed"][0]/scene_info["ball_speed"][1])*(420-self.current_ball_y)-3 #
else:
self.des_x=self.current_ball_x+(-scene_info["ball_speed"][0]/scene_info["ball_speed"][1])*(420-self.current_ball_y)-3 #
else:
#if scene_info["ball_speed"]<=16:
if scene_info["ball"][1]<200:
self.des_x=self.current_ball_x+(-scene_info["ball_speed"][0]/scene_info["ball_speed"][1])*(420-self.current_ball_y)-5 #
else:
self.des_x=self.current_ball_x+(-scene_info["ball_speed"][0]/scene_info["ball_speed"][1])*(420-self.current_ball_y)-6#
#else:
# if scene_info["ball"][1]<200:
# self.des_x=self.current_ball_x+(-scene_info["ball_speed"][0]/scene_info["ball_speed"][1])*(420-self.current_ball_y)-2 #
# else:
# self.des_x=self.current_ball_x+(-scene_info["ball_speed"][0]/scene_info["ball_speed"][1])*(420-self.current_ball_y)-3 #
# ball go up
if self.current_ball_y<self.last_ball_y:
self.des_x=100
#record current position for next update
self.last_ball_x = scene_info["ball"][0]
self.last_ball_y = scene_info["ball"][1]
while self.des_x>200 or self.des_x<0:
if self.des_x>200:
self.des_x=(200-(self.des_x-200))
else:
self.des_x=-self.des_x
if self.des_x < scene_info["platform_1P"][0] + 15 :
return "MOVE_LEFT"
elif self.des_x == scene_info["platform_1P"][0] +15 :
return "NONE"
else:
return "MOVE_RIGHT"
else:
if scene_info["frame"]==self.start_frame or scene_info["frame"]==self.start_frame + 1:
self.current_ball_x=scene_info["ball"][0]
self.current_ball_y=scene_info["ball"][1]
self.des_x = 80
else:
self.last_ball_x = self.current_ball_x
self.last_ball_y = self.current_ball_y
self.current_ball_x=scene_info["ball"][0]
self.current_ball_y=scene_info["ball"][1]
# ball go up
if self.current_ball_y<self.last_ball_y:
# ball go right
if self.current_ball_x>self.last_ball_x:
if scene_info["ball_speed"][0]<=12 or scene_info["ball_speed"][1]<=-9:
self.des_x=(-scene_info["ball_speed"][0]/scene_info["ball_speed"][1])*(self.current_ball_y - 80)+ self.current_ball_x #
else:
#if scene_info["ball_speed"][0]<=16:
if scene_info["ball"][1]<220:
self.des_x=(-scene_info["ball_speed"][0]/scene_info["ball_speed"][1])*(self.current_ball_y - 80)+ self.current_ball_x+1 #
else:
self.des_x=(-scene_info["ball_speed"][0]/scene_info["ball_speed"][1])*(self.current_ball_y - 80)+ self.current_ball_x+2.2#
#else:
# if scene_info["ball"][1]<220:
# self.des_x=(-scene_info["ball_speed"][0]/scene_info["ball_speed"][1])*(self.current_ball_y - 80)+ self.current_ball_x+2 #
# else:
# self.des_x=(-scene_info["ball_speed"][0]/scene_info["ball_speed"][1])*(self.current_ball_y - 80)+ self.current_ball_x+3 #
# ball go left
else:
if scene_info["ball_speed"][0]<=-12 or scene_info["ball_speed"][1]<-9:
self.des_x=self.current_ball_x-(scene_info["ball_speed"][0]/scene_info["ball_speed"][1])*(self.current_ball_y - 80) #
else:
#if scene_info["ball_speed"][0]<=16:
if scene_info["ball"][1]<220:
self.des_x=self.current_ball_x-(scene_info["ball_speed"][0]/scene_info["ball_speed"][1])*(self.current_ball_y - 80)-1 #
else:
self.des_x=self.current_ball_x-(scene_info["ball_speed"][0]/scene_info["ball_speed"][1])*(self.current_ball_y - 80)-2.2#
#else:
# if scene_info["ball"][1]<220:
# self.des_x=self.current_ball_x-(scene_info["ball_speed"][0]/scene_info["ball_speed"][1])*(self.current_ball_y - 80)-2 #
# else:
# self.des_x=self.current_ball_x-(scene_info["ball_speed"][0]/scene_info["ball_speed"][1])*(self.current_ball_y - 80)-3 #
# ball go down
if self.current_ball_y>self.last_ball_y:
self.des_x=100
#record current position for next update
self.last_ball_x = scene_info["ball"][0]
self.last_ball_y = scene_info["ball"][1]
while self.des_x>200 or self.des_x<0:
if self.des_x>200:
self.des_x=(200-(self.des_x-200))
else:
self.des_x=-self.des_x
if self.des_x < scene_info["platform_2P"][0] + 15 :
return "MOVE_LEFT"
elif self.des_x == scene_info["platform_2P"][0] + 15 :
return "NONE"
else:
return "MOVE_RIGHT"
def reset(self):
"""
Reset the status
"""
self.ball_served = False
| 56.123596 | 162 | 0.46997 | 1,203 | 9,990 | 3.588529 | 0.078138 | 0.18763 | 0.237897 | 0.237665 | 0.865647 | 0.864953 | 0.864953 | 0.86032 | 0.849664 | 0.837155 | 0 | 0.046441 | 0.409409 | 9,990 | 177 | 163 | 56.440678 | 0.685254 | 0.174174 | 0 | 0.675214 | 0 | 0 | 0.07492 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.025641 | false | 0 | 0.017094 | 0 | 0.128205 | 0.008547 | 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 |
eb9de3ed58a90ed8d077c84594796e5f9460d139 | 31,925 | py | Python | util/data/gen/nvwgf2umx.dll.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | util/data/gen/nvwgf2umx.dll.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | util/data/gen/nvwgf2umx.dll.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | symbols = []
exports = [{'type': 'function', 'name': '??0?$SafeEnum@UErrorEnum@cask@@@cask@@QEAA@W4Label@ErrorEnum@1@@Z', 'address': '0x7ffb1cd9ab50'}, {'type': 'function', 'name': '??0?$SafeEnum@UGemmChip_ENUMCLASS_SCOPEWRAPPER@cask@@@cask@@QEAA@W4Label@GemmChip_ENUMCLASS_SCOPEWRAPPER@1@@Z', 'address': '0x7ffb1cd9ab50'}, {'type': 'function', 'name': '??0?$SafeEnum@UGemmLayout_ENUMCLASS_SCOPEWRAPPER@cask@@@cask@@QEAA@W4Label@GemmLayout_ENUMCLASS_SCOPEWRAPPER@1@@Z', 'address': '0x7ffb1cd9ab50'}, {'type': 'function', 'name': '??0?$SafeEnum@UScalarType_ENUMCLASS_SCOPEWRAPPER@cask@@@cask@@QEAA@W4Label@ScalarType_ENUMCLASS_SCOPEWRAPPER@1@@Z', 'address': '0x7ffb1cd9ab50'}, {'type': 'function', 'name': '??0?$ShaderList@UConvolutionShader@cask@@VConvolution@2@@cask@@QEAA@AEBV01@@Z', 'address': '0x7ffb1cd8f5f0'}, {'type': 'function', 'name': '??0?$ShaderList@UGemmShader@cask@@VGemm@2@@cask@@QEAA@AEBV01@@Z', 'address': '0x7ffb1cd8f5f0'}, {'type': 'function', 'name': '??0?$ShaderList@VLinkableConvShader@cask@@VConvolution@2@@cask@@QEAA@AEBV01@@Z', 'address': '0x7ffb1cd8f5f0'}, {'type': 'function', 'name': '??0?$ShaderList@VLinkableGemmShader@cask@@VGemm@2@@cask@@QEAA@AEBV01@@Z', 'address': '0x7ffb1cd8f5f0'}, {'type': 'function', 'name': '??0?$ShaderList@VPoolingShader@cask@@VPoolingOperation@2@@cask@@QEAA@AEBV01@@Z', 'address': '0x7ffb1cd8f5f0'}, {'type': 'function', 'name': '??0?$ShaderList@VSoftmaxShader@cask@@VSoftmaxOperation@2@@cask@@QEAA@AEBV01@@Z', 'address': '0x7ffb1cd8f5f0'}, {'type': 'function', 'name': '??0Convolution@cask@@QEAA@AEBV01@@Z', 'address': '0x7ffb1d74eac0'}, {'type': 'function', 'name': '??0ConvolutionShader@cask@@QEAA@AEBU01@@Z', 'address': '0x7ffb1d74f1d0'}, {'type': 'function', 'name': '??0ConvolutionWeightGradient@cask@@QEAA@AEBV01@@Z', 'address': '0x7ffb1d74fef0'}, {'type': 'function', 'name': '??0Gemm@cask@@QEAA@AEBV01@@Z', 'address': '0x7ffb1d74f560'}, {'type': 'function', 'name': '??0GemmShader@cask@@QEAA@AEBU01@@Z', 'address': '0x7ffb1d74feb0'}, {'type': 'function', 'name': '??0Operation@cask@@QEAA@AEBV01@@Z', 'address': '0x7ffb1d74e830'}, {'type': 'function', 'name': '??0Operation@cask@@QEAA@XZ', 'address': '0x7ffb1d74aba0'}, {'type': 'function', 'name': '??0PoolingOperation@cask@@QEAA@AEBV01@@Z', 'address': '0x7ffb1d7508a0'}, {'type': 'function', 'name': '??0PoolingShader@cask@@QEAA@AEBV01@@Z', 'address': '0x7ffb1d750b90'}, {'type': 'function', 'name': '??0Shader@cask@@QEAA@AEBV01@@Z', 'address': '0x7ffb1d74e300'}, {'type': 'function', 'name': '??0SoftmaxOperation@cask@@QEAA@AEBV01@@Z', 'address': '0x7ffb1d750ce0'}, {'type': 'function', 'name': '??0WeightGradientShader@cask@@QEAA@AEBU01@@Z', 'address': '0x7ffb1d750080'}, {'type': 'function', 'name': '??1Convolution@cask@@UEAA@XZ', 'address': '0x7ffb1cd8d7f0'}, {'type': 'function', 'name': '??1ConvolutionShader@cask@@UEAA@XZ', 'address': '0x7ffb1d74a400'}, {'type': 'function', 'name': '??1ConvolutionWeightGradient@cask@@UEAA@XZ', 'address': '0x7ffb1cd8d7f0'}, {'type': 'function', 'name': '??1Gemm@cask@@UEAA@XZ', 'address': '0x7ffb1cd8d7f0'}, {'type': 'function', 'name': '??1GemmShader@cask@@UEAA@XZ', 'address': '0x7ffb1d74a400'}, {'type': 'function', 'name': '??1Operation@cask@@UEAA@XZ', 'address': '0x7ffb1cd8d7f0'}, {'type': 'function', 'name': '??1PoolingOperation@cask@@UEAA@XZ', 'address': '0x7ffb1cd8d7f0'}, {'type': 'function', 'name': '??1PoolingShader@cask@@UEAA@XZ', 'address': '0x7ffb1d74a400'}, {'type': 'function', 'name': '??1Shader@cask@@UEAA@XZ', 'address': '0x7ffb1d74a400'}, {'type': 'function', 'name': '??1SoftmaxOperation@cask@@UEAA@XZ', 'address': '0x7ffb1cd8d7f0'}, {'type': 'function', 'name': '??4?$SafeEnum@UErrorEnum@cask@@@cask@@QEAAAEAV01@$$QEAV01@@Z', 'address': '0x7ffb1d74e2f0'}, {'type': 'function', 'name': '??4?$SafeEnum@UErrorEnum@cask@@@cask@@QEAAAEAV01@AEBV01@@Z', 'address': '0x7ffb1d74e2f0'}, {'type': 'function', 'name': '??4?$SafeEnum@UGemmChip_ENUMCLASS_SCOPEWRAPPER@cask@@@cask@@QEAAAEAV01@$$QEAV01@@Z', 'address': '0x7ffb1d74e2f0'}, {'type': 'function', 'name': '??4?$SafeEnum@UGemmChip_ENUMCLASS_SCOPEWRAPPER@cask@@@cask@@QEAAAEAV01@AEBV01@@Z', 'address': '0x7ffb1d74e2f0'}, {'type': 'function', 'name': '??4?$SafeEnum@UGemmLayout_ENUMCLASS_SCOPEWRAPPER@cask@@@cask@@QEAAAEAV01@$$QEAV01@@Z', 'address': '0x7ffb1d74e2f0'}, {'type': 'function', 'name': '??4?$SafeEnum@UGemmLayout_ENUMCLASS_SCOPEWRAPPER@cask@@@cask@@QEAAAEAV01@AEBV01@@Z', 'address': '0x7ffb1d74e2f0'}, {'type': 'function', 'name': '??4?$SafeEnum@UScalarType_ENUMCLASS_SCOPEWRAPPER@cask@@@cask@@QEAAAEAV01@$$QEAV01@@Z', 'address': '0x7ffb1d74e2f0'}, {'type': 'function', 'name': '??4?$SafeEnum@UScalarType_ENUMCLASS_SCOPEWRAPPER@cask@@@cask@@QEAAAEAV01@AEBV01@@Z', 'address': '0x7ffb1d74e2f0'}, {'type': 'function', 'name': '??4?$SafeEnum@USplitKMode_ENUMCLASS_SCOPEWRAPPER@cask@@@cask@@QEAAAEAV01@$$QEAV01@@Z', 'address': '0x7ffb1d74e2f0'}, {'type': 'function', 'name': '??4?$SafeEnum@USplitKMode_ENUMCLASS_SCOPEWRAPPER@cask@@@cask@@QEAAAEAV01@AEBV01@@Z', 'address': '0x7ffb1d74e2f0'}, {'type': 'function', 'name': '??4?$SafeEnum@UTableSize_ENUMCLASS_SCOPEWRAPPER@cask@@@cask@@QEAAAEAV01@$$QEAV01@@Z', 'address': '0x7ffb1d74e2f0'}, {'type': 'function', 'name': '??4?$SafeEnum@UTableSize_ENUMCLASS_SCOPEWRAPPER@cask@@@cask@@QEAAAEAV01@AEBV01@@Z', 'address': '0x7ffb1d74e2f0'}, {'type': 'function', 'name': '??4?$SafeEnum@UTraitsEnum@ConvolutionShader@cask@@@cask@@QEAAAEAV01@$$QEAV01@@Z', 'address': '0x7ffb1d74e2f0'}, {'type': 'function', 'name': '??4?$SafeEnum@UTraitsEnum@ConvolutionShader@cask@@@cask@@QEAAAEAV01@AEBV01@@Z', 'address': '0x7ffb1d74e2f0'}, {'type': 'function', 'name': '??4?$SafeEnum@UTraitsEnum@PoolingShader@cask@@@cask@@QEAAAEAV01@$$QEAV01@@Z', 'address': '0x7ffb1d74e2f0'}, {'type': 'function', 'name': '??4?$SafeEnum@UTraitsEnum@PoolingShader@cask@@@cask@@QEAAAEAV01@AEBV01@@Z', 'address': '0x7ffb1d74e2f0'}, {'type': 'function', 'name': '??4?$SafeEnum@UTraitsEnum@WeightGradientShader@cask@@@cask@@QEAAAEAV01@$$QEAV01@@Z', 'address': '0x7ffb1d74e2f0'}, {'type': 'function', 'name': '??4?$SafeEnum@UTraitsEnum@WeightGradientShader@cask@@@cask@@QEAAAEAV01@AEBV01@@Z', 'address': '0x7ffb1d74e2f0'}, {'type': 'function', 'name': '??4?$SafeEnum@UTraits_ENUMCLASS_SCOPEWRAPPER@GemmImpl@cask@@@cask@@QEAAAEAV01@$$QEAV01@@Z', 'address': '0x7ffb1d74e2f0'}, {'type': 'function', 'name': '??4?$SafeEnum@UTraits_ENUMCLASS_SCOPEWRAPPER@GemmImpl@cask@@@cask@@QEAAAEAV01@AEBV01@@Z', 'address': '0x7ffb1d74e2f0'}, {'type': 'function', 'name': '??4?$ShaderList@UConvolutionShader@cask@@VConvolution@2@@cask@@QEAAAEAV01@AEBV01@@Z', 'address': '0x7ffb1cd8f6e0'}, {'type': 'function', 'name': '??4?$ShaderList@UGemmShader@cask@@VGemm@2@@cask@@QEAAAEAV01@AEBV01@@Z', 'address': '0x7ffb1cd8f6e0'}, {'type': 'function', 'name': '??4?$ShaderList@VLinkableConvShader@cask@@VConvolution@2@@cask@@QEAAAEAV01@AEBV01@@Z', 'address': '0x7ffb1cd8f6e0'}, {'type': 'function', 'name': '??4?$ShaderList@VLinkableGemmShader@cask@@VGemm@2@@cask@@QEAAAEAV01@AEBV01@@Z', 'address': '0x7ffb1cd8f6e0'}, {'type': 'function', 'name': '??4?$ShaderList@VPoolingShader@cask@@VPoolingOperation@2@@cask@@QEAAAEAV01@AEBV01@@Z', 'address': '0x7ffb1cd8f6e0'}, {'type': 'function', 'name': '??4?$ShaderList@VSoftmaxShader@cask@@VSoftmaxOperation@2@@cask@@QEAAAEAV01@AEBV01@@Z', 'address': '0x7ffb1cd8f6e0'}, {'type': 'function', 'name': '??4Convolution@cask@@QEAAAEAV01@AEBV01@@Z', 'address': '0x7ffb1cd92d90'}, {'type': 'function', 'name': '??4ConvolutionWeightGradient@cask@@QEAAAEAV01@AEBV01@@Z', 'address': '0x7ffb1cd92d90'}, {'type': 'function', 'name': '??4Gemm@cask@@QEAAAEAV01@AEBV01@@Z', 'address': '0x7ffb1cd92d90'}, {'type': 'function', 'name': '??4Operation@cask@@QEAAAEAV01@AEBV01@@Z', 'address': '0x7ffb1cd92ea0'}, {'type': 'function', 'name': '??4PoolingOperation@cask@@QEAAAEAV01@AEBV01@@Z', 'address': '0x7ffb1d7509d0'}, {'type': 'function', 'name': '??4SoftmaxOperation@cask@@QEAAAEAV01@AEBV01@@Z', 'address': '0x7ffb1d750e20'}, {'type': 'function', 'name': '??4TensorDesc@cask@@QEAAAEAU01@$$QEAU01@@Z', 'address': '0x7ffb1d74e760'}, {'type': 'function', 'name': '??4TensorDesc@cask@@QEAAAEAU01@AEBU01@@Z', 'address': '0x7ffb1d74e700'}, {'type': 'function', 'name': '??8TensorDesc@cask@@QEBA_NAEBU01@@Z', 'address': '0x7ffb1cd8d560'}, {'type': 'function', 'name': '??B?$SafeEnum@UGemmChip_ENUMCLASS_SCOPEWRAPPER@cask@@@cask@@QEBA?AW4Label@GemmChip_ENUMCLASS_SCOPEWRAPPER@1@XZ', 'address': '0x7ffb1c9b53c0'}, {'type': 'function', 'name': '??B?$SafeEnum@UGemmLayout_ENUMCLASS_SCOPEWRAPPER@cask@@@cask@@QEBA?AW4Label@GemmLayout_ENUMCLASS_SCOPEWRAPPER@1@XZ', 'address': '0x7ffb1c9b53c0'}, {'type': 'function', 'name': '??B?$SafeEnum@UScalarType_ENUMCLASS_SCOPEWRAPPER@cask@@@cask@@QEBA?AW4Label@ScalarType_ENUMCLASS_SCOPEWRAPPER@1@XZ', 'address': '0x7ffb1c9b53c0'}, {'type': 'function', 'name': '??B?$SafeEnum@USplitKMode_ENUMCLASS_SCOPEWRAPPER@cask@@@cask@@QEBA?AW4Label@SplitKMode_ENUMCLASS_SCOPEWRAPPER@1@XZ', 'address': '0x7ffb1c9b53c0'}, {'type': 'function', 'name': '??_7Convolution@cask@@6B@', 'address': '0x7ffb1e4ca848'}, {'type': 'function', 'name': '??_7ConvolutionShader@cask@@6B@', 'address': '0x7ffb1e5089d8'}, {'type': 'function', 'name': '??_7ConvolutionWeightGradient@cask@@6B@', 'address': '0x7ffb1e508d58'}, {'type': 'function', 'name': '??_7Gemm@cask@@6B@', 'address': '0x7ffb1e4ca858'}, {'type': 'function', 'name': '??_7GemmShader@cask@@6B@', 'address': '0x7ffb1e508b08'}, {'type': 'function', 'name': '??_7Operation@cask@@6B@', 'address': '0x7ffb1e4ca838'}, {'type': 'function', 'name': '??_7PoolingOperation@cask@@6B@', 'address': '0x7ffb1e508c18'}, {'type': 'function', 'name': '??_7PoolingShader@cask@@6B@', 'address': '0x7ffb1e508d68'}, {'type': 'function', 'name': '??_7Shader@cask@@6B@', 'address': '0x7ffb1e5089c8'}, {'type': 'function', 'name': '??_7SoftmaxOperation@cask@@6B@', 'address': '0x7ffb1e508c08'}, {'type': 'function', 'name': '??_7WeightGradientShader@cask@@6B@', 'address': '0x7ffb1e508c30'}, {'type': 'function', 'name': '?MAX_DIMS@TensorDesc@cask@@2HB', 'address': '0x7ffb1e508c28'}, {'type': 'function', 'name': '?QueryOccupancyProvider@Shader@cask@@UEAAAEBUOccupancyProvider@2@XZ', 'address': '0x7ffb1d1e4610'}, {'type': 'function', 'name': '?accumScalarType@WeightGradientShader@cask@@UEBA?AV?$SafeEnum@UScalarType_ENUMCLASS_SCOPEWRAPPER@cask@@@2@XZ', 'address': '0x7ffb1d750040'}, {'type': 'function', 'name': '?availableShaders@?$ShaderList@UConvolutionShader@cask@@VConvolution@2@@cask@@SAPEBV12@XZ', 'address': '0x7ffb1cd9ab00'}, {'type': 'function', 'name': '?availableShaders@?$ShaderList@UGemmShader@cask@@VGemm@2@@cask@@SAPEBV12@XZ', 'address': '0x7ffb1cd9aab0'}, {'type': 'function', 'name': '?availableShaders@?$ShaderList@VLinkableConvShader@cask@@VConvolution@2@@cask@@SAPEBV12@XZ', 'address': '0x7ffb1d74dc50'}, {'type': 'function', 'name': '?availableShaders@?$ShaderList@VLinkableGemmShader@cask@@VGemm@2@@cask@@SAPEBV12@XZ', 'address': '0x7ffb1d74dca0'}, {'type': 'function', 'name': '?availableShaders@?$ShaderList@VPoolingShader@cask@@VPoolingOperation@2@@cask@@SAPEBV12@XZ', 'address': '0x7ffb1d74dcf0'}, {'type': 'function', 'name': '?availableShaders@?$ShaderList@VSoftmaxShader@cask@@VSoftmaxOperation@2@@cask@@SAPEBV12@XZ', 'address': '0x7ffb1d76c5e0'}, {'type': 'function', 'name': '?biasType@ConvolutionShader@cask@@QEBA?AV?$SafeEnum@UScalarType_ENUMCLASS_SCOPEWRAPPER@cask@@@2@XZ', 'address': '0x7ffb1d74ac30'}, {'type': 'function', 'name': '?elementSize@TensorDesc@cask@@QEBA_KXZ', 'address': '0x7ffb1d74a1d0'}, {'type': 'function', 'name': '?getConstantMemParamOffset@ConvolutionShader@cask@@QEBA_KXZ', 'address': '0x7ffb1d74f050'}, {'type': 'function', 'name': '?getDescription@Convolution@cask@@QEBAAEBUDescription@Operation@2@XZ', 'address': '0x7ffb1cd8da10'}, {'type': 'function', 'name': '?getDescription@ConvolutionWeightGradient@cask@@QEBAAEBUDescription@Operation@2@XZ', 'address': '0x7ffb1cd8da10'}, {'type': 'function', 'name': '?getDescription@Gemm@cask@@QEBAAEBUDescription@Operation@2@XZ', 'address': '0x7ffb1cd8da10'}, {'type': 'function', 'name': '?getDescription@PoolingOperation@cask@@QEBAAEBUpoolingDescription@12@XZ', 'address': '0x7ffb1cd8da10'}, {'type': 'function', 'name': '?getDescription@SoftmaxOperation@cask@@QEBA?BUsoftmaxDescription@12@XZ', 'address': '0x7ffb1d750be0'}, {'type': 'function', 'name': '?getDim@TensorDesc@cask@@QEBA_KH@Z', 'address': '0x7ffb1cd8d7b0'}, {'type': 'function', 'name': '?getPoolingMode@PoolingOperation@cask@@QEBA?AW4poolingMode_t@12@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z', 'address': '0x7ffb1d750490'}, {'type': 'function', 'name': '?getSMidSize@GemmShader@cask@@UEAA_KAEAVRunInfo@2@@Z', 'address': '0x7ffb1c938540'}, {'type': 'function', 'name': '?getVersion@ConvolutionShader@cask@@QEBAHXZ', 'address': '0x7ffb1d74f0a0'}, {'type': 'function', 'name': '?getVersion@GemmShader@cask@@QEBAHXZ', 'address': '0x7ffb1d74fdd0'}, {'type': 'function', 'name': '?hasVectorization@TensorDesc@cask@@QEBA_NAEBU12@@Z', 'address': '0x7ffb1cd8d440'}, {'type': 'function', 'name': '?hasVectorization@TensorDesc@cask@@QEBA_NHH@Z', 'address': '0x7ffb1cd8d410'}, {'type': 'function', 'name': '?isBTransposed@ConvolutionShader@cask@@QEBA_NXZ', 'address': '0x7ffb1d74ee50'}, {'type': 'function', 'name': '?isFilter1x1@ConvolutionShader@cask@@QEBA_NXZ', 'address': '0x7ffb1d74ee70'}, {'type': 'function', 'name': '?isHmmaSp16832@GemmShader@cask@@QEBA_NXZ', 'address': '0x7ffb1d74f8a0'}, {'type': 'function', 'name': '?isImma16832@GemmShader@cask@@QEBA_NXZ', 'address': '0x7ffb1d74f790'}, {'type': 'function', 'name': '?isImma8816@GemmShader@cask@@QEBA_NXZ', 'address': '0x7ffb1d74f680'}, {'type': 'function', 'name': '?isImmaSp16864@GemmShader@cask@@QEBA_NXZ', 'address': '0x7ffb1d74f9c0'}, {'type': 'function', 'name': '?isNchw@ConvolutionShader@cask@@QEBA_NXZ', 'address': '0x7ffb1d74abf0'}, {'type': 'function', 'name': '?isNchw@WeightGradientShader@cask@@UEBA_NXZ', 'address': '0x7ffb1d750010'}, {'type': 'function', 'name': '?isNhwc@ConvolutionShader@cask@@QEBA_NXZ', 'address': '0x7ffb1d74abd0'}, {'type': 'function', 'name': '?isNhwcOutput@ConvolutionShader@cask@@QEBA_NXZ', 'address': '0x7ffb1d74ec70'}, {'type': 'function', 'name': '?isNhwcOutput@WeightGradientShader@cask@@UEBA_NXZ', 'address': '0x7ffb1d750030'}, {'type': 'function', 'name': '?isSimilar@TensorDesc@cask@@QEBA_NAEBU12@@Z', 'address': '0x7ffb1cd8d470'}, {'type': 'function', 'name': '?isSparse@GemmShader@cask@@QEBA_NXZ', 'address': '0x7ffb1d74fae0'}, {'type': 'function', 'name': '?isSparse@TensorDesc@cask@@QEAA_NXZ', 'address': '0x7ffb1d74e6f0'}, {'type': 'function', 'name': '?isSplitK@ConvolutionShader@cask@@QEBA_NXZ', 'address': '0x7ffb1d74ac20'}, {'type': 'function', 'name': '?isStridedB@ConvolutionShader@cask@@QEBA_NXZ', 'address': '0x7ffb1d74ac10'}, {'type': 'function', 'name': '?outputLayout@GemmShader@cask@@QEBA?AV?$SafeEnum@UGemmLayout_ENUMCLASS_SCOPEWRAPPER@cask@@@2@XZ', 'address': '0x7ffb1d74fb00'}, {'type': 'function', 'name': '?populateSMid@GemmShader@cask@@UEAA?AV?$SafeEnum@UErrorEnum@cask@@@2@AEAVRunInfo@2@PEAX_K@Z', 'address': '0x7ffb1d74e0d0'}, {'type': 'function', 'name': '?setADesc@Convolution@cask@@QEAAXAEBUTensorDesc@2@@Z', 'address': '0x7ffb1cd8da50'}, {'type': 'function', 'name': '?setADesc@ConvolutionWeightGradient@cask@@QEAAXAEBUTensorDesc@2@@Z', 'address': '0x7ffb1cd8da50'}, {'type': 'function', 'name': '?setADesc@Gemm@cask@@QEAAXAEBUTensorDesc@2@@Z', 'address': '0x7ffb1cd8da50'}, {'type': 'function', 'name': '?setAlpha@Convolution@cask@@QEAAXM@Z', 'address': '0x7ffb1cd8da20'}, {'type': 'function', 'name': '?setAlpha@ConvolutionWeightGradient@cask@@QEAAXM@Z', 'address': '0x7ffb1cd8da20'}, {'type': 'function', 'name': '?setAlpha@Gemm@cask@@QEAAXM@Z', 'address': '0x7ffb1cd8da20'}, {'type': 'function', 'name': '?setAlpha@Gemm@cask@@QEAAXN@Z', 'address': '0x7ffb1d74f460'}, {'type': 'function', 'name': '?setAlpha@Gemm@cask@@QEAAXUdouble2@@@Z', 'address': '0x7ffb1d74f480'}, {'type': 'function', 'name': '?setAlpha@Gemm@cask@@QEAAXUfloat2@@@Z', 'address': '0x7ffb1d74f470'}, {'type': 'function', 'name': '?setAlpha@PoolingOperation@cask@@QEAAXM@Z', 'address': '0x7ffb1d7502c0'}, {'type': 'function', 'name': '?setAlpha@SoftmaxOperation@cask@@QEAAXM@Z', 'address': '0x7ffb1d750c90'}, {'type': 'function', 'name': '?setAmDesc@Gemm@cask@@QEAAXAEBUTensorDesc@2@@Z', 'address': '0x7ffb1d74f4c0'}, {'type': 'function', 'name': '?setBDesc@Gemm@cask@@QEAAXAEBUTensorDesc@2@@Z', 'address': '0x7ffb1cd8dac0'}, {'type': 'function', 'name': '?setBeta@Convolution@cask@@QEAAXM@Z', 'address': '0x7ffb1cd8da30'}, {'type': 'function', 'name': '?setBeta@ConvolutionWeightGradient@cask@@QEAAXM@Z', 'address': '0x7ffb1cd8da30'}, {'type': 'function', 'name': '?setBeta@Gemm@cask@@QEAAXM@Z', 'address': '0x7ffb1cd8da30'}, {'type': 'function', 'name': '?setBeta@Gemm@cask@@QEAAXN@Z', 'address': '0x7ffb1d74f490'}, {'type': 'function', 'name': '?setBeta@Gemm@cask@@QEAAXUdouble2@@@Z', 'address': '0x7ffb1d74f4b0'}, {'type': 'function', 'name': '?setBeta@Gemm@cask@@QEAAXUfloat2@@@Z', 'address': '0x7ffb1d74f4a0'}, {'type': 'function', 'name': '?setBeta@PoolingOperation@cask@@QEAAXM@Z', 'address': '0x7ffb1d7502d0'}, {'type': 'function', 'name': '?setBeta@SoftmaxOperation@cask@@QEAAXM@Z', 'address': '0x7ffb1d750ca0'}, {'type': 'function', 'name': '?setBiasFlag@Convolution@cask@@QEAAX_N@Z', 'address': '0x7ffb1cd8dba0'}, {'type': 'function', 'name': '?setBiasFlag@ConvolutionWeightGradient@cask@@QEAAX_N@Z', 'address': '0x7ffb1cd8dba0'}, {'type': 'function', 'name': '?setBiasFlag@Gemm@cask@@QEAAX_N@Z', 'address': '0x7ffb1cd8dba0'}, {'type': 'function', 'name': '?setBiasSimdWidth@Convolution@cask@@QEAAX_K@Z', 'address': '0x7ffb1d74e960'}, {'type': 'function', 'name': '?setBiasSimdWidth@Gemm@cask@@QEAAX_K@Z', 'address': '0x7ffb1d74e960'}, {'type': 'function', 'name': '?setBiasType@Convolution@cask@@QEAAXV?$SafeEnum@UScalarType_ENUMCLASS_SCOPEWRAPPER@cask@@@2@@Z', 'address': '0x7ffb1cd8da40'}, {'type': 'function', 'name': '?setBiasType@ConvolutionWeightGradient@cask@@QEAAXV?$SafeEnum@UScalarType_ENUMCLASS_SCOPEWRAPPER@cask@@@2@@Z', 'address': '0x7ffb1cd8da40'}, {'type': 'function', 'name': '?setBiasType@Gemm@cask@@QEAAXV?$SafeEnum@UScalarType_ENUMCLASS_SCOPEWRAPPER@cask@@@2@@Z', 'address': '0x7ffb1cd8da40'}, {'type': 'function', 'name': '?setBlendFactor@PoolingOperation@cask@@QEAAXM@Z', 'address': '0x7ffb1d750310'}, {'type': 'function', 'name': '?setChunkK@Convolution@cask@@QEAAX_K@Z', 'address': '0x7ffb1d74e980'}, {'type': 'function', 'name': '?setChunkK@Gemm@cask@@QEAAX_K@Z', 'address': '0x7ffb1d74e980'}, {'type': 'function', 'name': '?setConvolutionDilationD@Convolution@cask@@QEAAX_K@Z', 'address': '0x7ffb1d74ea30'}, {'type': 'function', 'name': '?setConvolutionDilationD@ConvolutionWeightGradient@cask@@QEAAX_K@Z', 'address': '0x7ffb1d74ea30'}, {'type': 'function', 'name': '?setConvolutionDilationH@Convolution@cask@@QEAAX_K@Z', 'address': '0x7ffb1cd8dc10'}, {'type': 'function', 'name': '?setConvolutionDilationH@ConvolutionWeightGradient@cask@@QEAAX_K@Z', 'address': '0x7ffb1cd8dc10'}, {'type': 'function', 'name': '?setConvolutionDilationW@Convolution@cask@@QEAAX_K@Z', 'address': '0x7ffb1cd8dc20'}, {'type': 'function', 'name': '?setConvolutionDilationW@ConvolutionWeightGradient@cask@@QEAAX_K@Z', 'address': '0x7ffb1cd8dc20'}, {'type': 'function', 'name': '?setConvolutionGroups@Convolution@cask@@QEAAX_K@Z', 'address': '0x7ffb1d74ea40'}, {'type': 'function', 'name': '?setConvolutionGroups@ConvolutionWeightGradient@cask@@QEAAX_K@Z', 'address': '0x7ffb1d74ea40'}, {'type': 'function', 'name': '?setConvolutionPadBack@Convolution@cask@@QEAAX_K@Z', 'address': '0x7ffb1d74ea10'}, {'type': 'function', 'name': '?setConvolutionPadBack@ConvolutionWeightGradient@cask@@QEAAX_K@Z', 'address': '0x7ffb1d74ea10'}, {'type': 'function', 'name': '?setConvolutionPadBottom@Convolution@cask@@QEAAX_K@Z', 'address': '0x7ffb1cd8dbc0'}, {'type': 'function', 'name': '?setConvolutionPadBottom@ConvolutionWeightGradient@cask@@QEAAX_K@Z', 'address': '0x7ffb1cd8dbc0'}, {'type': 'function', 'name': '?setConvolutionPadD@Convolution@cask@@QEAAX_K@Z', 'address': '0x7ffb1d74e9f0'}, {'type': 'function', 'name': '?setConvolutionPadD@ConvolutionWeightGradient@cask@@QEAAX_K@Z', 'address': '0x7ffb1d74e9f0'}, {'type': 'function', 'name': '?setConvolutionPadFront@Convolution@cask@@QEAAX_K@Z', 'address': '0x7ffb1d74ea00'}, {'type': 'function', 'name': '?setConvolutionPadFront@ConvolutionWeightGradient@cask@@QEAAX_K@Z', 'address': '0x7ffb1d74ea00'}, {'type': 'function', 'name': '?setConvolutionPadH@Convolution@cask@@QEAAX_K@Z', 'address': '0x7ffb1d74e9d0'}, {'type': 'function', 'name': '?setConvolutionPadH@ConvolutionWeightGradient@cask@@QEAAX_K@Z', 'address': '0x7ffb1d74e9d0'}, {'type': 'function', 'name': '?setConvolutionPadLeft@Convolution@cask@@QEAAX_K@Z', 'address': '0x7ffb1cd8dbd0'}, {'type': 'function', 'name': '?setConvolutionPadLeft@ConvolutionWeightGradient@cask@@QEAAX_K@Z', 'address': '0x7ffb1cd8dbd0'}, {'type': 'function', 'name': '?setConvolutionPadRight@Convolution@cask@@QEAAX_K@Z', 'address': '0x7ffb1cd8dbe0'}, {'type': 'function', 'name': '?setConvolutionPadRight@ConvolutionWeightGradient@cask@@QEAAX_K@Z', 'address': '0x7ffb1cd8dbe0'}, {'type': 'function', 'name': '?setConvolutionPadTop@Convolution@cask@@QEAAX_K@Z', 'address': '0x7ffb1cd8dbb0'}, {'type': 'function', 'name': '?setConvolutionPadTop@ConvolutionWeightGradient@cask@@QEAAX_K@Z', 'address': '0x7ffb1cd8dbb0'}, {'type': 'function', 'name': '?setConvolutionPadW@Convolution@cask@@QEAAX_K@Z', 'address': '0x7ffb1d74e9e0'}, {'type': 'function', 'name': '?setConvolutionPadW@ConvolutionWeightGradient@cask@@QEAAX_K@Z', 'address': '0x7ffb1d74e9e0'}, {'type': 'function', 'name': '?setConvolutionStrideD@Convolution@cask@@QEAAX_K@Z', 'address': '0x7ffb1d74ea20'}, {'type': 'function', 'name': '?setConvolutionStrideD@ConvolutionWeightGradient@cask@@QEAAX_K@Z', 'address': '0x7ffb1d74ea20'}, {'type': 'function', 'name': '?setConvolutionStrideH@Convolution@cask@@QEAAX_K@Z', 'address': '0x7ffb1cd8dbf0'}, {'type': 'function', 'name': '?setConvolutionStrideH@ConvolutionWeightGradient@cask@@QEAAX_K@Z', 'address': '0x7ffb1cd8dbf0'}, {'type': 'function', 'name': '?setConvolutionStrideW@Convolution@cask@@QEAAX_K@Z', 'address': '0x7ffb1cd8dc00'}, {'type': 'function', 'name': '?setConvolutionStrideW@ConvolutionWeightGradient@cask@@QEAAX_K@Z', 'address': '0x7ffb1cd8dc00'}, {'type': 'function', 'name': '?setCrossCorrelationFlag@Convolution@cask@@QEAAX_N@Z', 'address': '0x7ffb1cd8dc30'}, {'type': 'function', 'name': '?setCrossCorrelationFlag@ConvolutionWeightGradient@cask@@QEAAX_N@Z', 'address': '0x7ffb1cd8dc30'}, {'type': 'function', 'name': '?setCtasPerWave@Convolution@cask@@QEAAX_K@Z', 'address': '0x7ffb1d74ea80'}, {'type': 'function', 'name': '?setCtasPerWave@Gemm@cask@@QEAAX_K@Z', 'address': '0x7ffb1d74ea80'}, {'type': 'function', 'name': '?setDynamicResize@Convolution@cask@@QEAAX_N@Z', 'address': '0x7ffb1d74ea70'}, {'type': 'function', 'name': '?setFilterDesc@Convolution@cask@@QEAAXAEBUTensorDesc@2@@Z', 'address': '0x7ffb1cd8dac0'}, {'type': 'function', 'name': '?setFilterDesc@ConvolutionWeightGradient@cask@@QEAAXAEBUTensorDesc@2@@Z', 'address': '0x7ffb1cd8dac0'}, {'type': 'function', 'name': '?setHardwareInfo@Convolution@cask@@QEAAXHHH@Z', 'address': '0x7ffb1d74ea90'}, {'type': 'function', 'name': '?setInputDesc@Convolution@cask@@QEAAXAEBUTensorDesc@2@@Z', 'address': '0x7ffb1cd8da50'}, {'type': 'function', 'name': '?setInputDesc@ConvolutionWeightGradient@cask@@QEAAXAEBUTensorDesc@2@@Z', 'address': '0x7ffb1cd8da50'}, {'type': 'function', 'name': '?setInputDesc@Gemm@cask@@QEAAXAEBUTensorDesc@2@@Z', 'address': '0x7ffb1cd8dac0'}, {'type': 'function', 'name': '?setInputDesc@PoolingOperation@cask@@QEAAXAEBUTensorDesc@2@@Z', 'address': '0x7ffb1cd8da50'}, {'type': 'function', 'name': '?setInputDesc@SoftmaxOperation@cask@@QEAAXAEBUTensorDesc@2@@Z', 'address': '0x7ffb1cd8da50'}, {'type': 'function', 'name': '?setIsDgrad@Convolution@cask@@QEAAX_N@Z', 'address': '0x7ffb1d74eab0'}, {'type': 'function', 'name': '?setIsWgrad1x1BatchedGEMM@Gemm@cask@@QEAAXH@Z', 'address': '0x7ffb1d74f540'}, {'type': 'function', 'name': '?setMode@Gemm@cask@@QEAAX_K@Z', 'address': '0x7ffb1d74f530'}, {'type': 'function', 'name': '?setNbDims@PoolingOperation@cask@@QEAA?AV?$SafeEnum@UErrorEnum@cask@@@2@I@Z', 'address': '0x7ffb1d750330'}, {'type': 'function', 'name': '?setOutputDesc@Convolution@cask@@QEAAXAEBUTensorDesc@2@@Z', 'address': '0x7ffb1cd8db30'}, {'type': 'function', 'name': '?setOutputDesc@ConvolutionWeightGradient@cask@@QEAAXAEBUTensorDesc@2@@Z', 'address': '0x7ffb1cd8db30'}, {'type': 'function', 'name': '?setOutputDesc@Gemm@cask@@QEAAXAEBUTensorDesc@2@@Z', 'address': '0x7ffb1cd8db30'}, {'type': 'function', 'name': '?setOutputDesc@PoolingOperation@cask@@QEAAXAEBUTensorDesc@2@@Z', 'address': '0x7ffb1d74f4c0'}, {'type': 'function', 'name': '?setOutputDesc@SoftmaxOperation@cask@@QEAAXAEBUTensorDesc@2@@Z', 'address': '0x7ffb1d74f4c0'}, {'type': 'function', 'name': '?setPaddingBottom@PoolingOperation@cask@@QEAAX_K@Z', 'address': '0x7ffb1d7503a0'}, {'type': 'function', 'name': '?setPaddingLeft@PoolingOperation@cask@@QEAAX_K@Z', 'address': '0x7ffb1d7503b0'}, {'type': 'function', 'name': '?setPaddingPost@PoolingOperation@cask@@QEAA?AV?$SafeEnum@UErrorEnum@cask@@@2@QEB_KI@Z', 'address': '0x7ffb1d750410'}, {'type': 'function', 'name': '?setPaddingPre@PoolingOperation@cask@@QEAA?AV?$SafeEnum@UErrorEnum@cask@@@2@QEB_KI@Z', 'address': '0x7ffb1d7503d0'}, {'type': 'function', 'name': '?setPaddingRight@PoolingOperation@cask@@QEAAX_K@Z', 'address': '0x7ffb1d7503c0'}, {'type': 'function', 'name': '?setPaddingTop@PoolingOperation@cask@@QEAAX_K@Z', 'address': '0x7ffb1d750390'}, {'type': 'function', 'name': '?setPerChannelAlphaDptr@PoolingOperation@cask@@QEAAXPEAM@Z', 'address': '0x7ffb1d7502e0'}, {'type': 'function', 'name': '?setPerChannelAlphaDptr@SoftmaxOperation@cask@@QEAAXPEAM@Z', 'address': '0x7ffb1d750cb0'}, {'type': 'function', 'name': '?setPerChannelBetaDptr@PoolingOperation@cask@@QEAAXPEAM@Z', 'address': '0x7ffb1d7502f0'}, {'type': 'function', 'name': '?setPerChannelBetaDptr@SoftmaxOperation@cask@@QEAAXPEAM@Z', 'address': '0x7ffb1d750cc0'}, {'type': 'function', 'name': '?setPerChannelScaling@Convolution@cask@@QEAAX_N@Z', 'address': '0x7ffb1d74e970'}, {'type': 'function', 'name': '?setPerChannelScaling@Gemm@cask@@QEAAX_N@Z', 'address': '0x7ffb1d74e970'}, {'type': 'function', 'name': '?setPoolingMode@PoolingOperation@cask@@QEAAXW4poolingMode_t@12@@Z', 'address': '0x7ffb1d750320'}, {'type': 'function', 'name': '?setReLuFlag@Convolution@cask@@QEAAXH@Z', 'address': '0x7ffb1cd8dc40'}, {'type': 'function', 'name': '?setReLuFlag@ConvolutionWeightGradient@cask@@QEAAXH@Z', 'address': '0x7ffb1cd8dc40'}, {'type': 'function', 'name': '?setReLuFlag@Gemm@cask@@QEAAXH@Z', 'address': '0x7ffb1cd8dc40'}, {'type': 'function', 'name': '?setReLuThreshold@Convolution@cask@@QEAAXM@Z', 'address': '0x7ffb1d74ea60'}, {'type': 'function', 'name': '?setReLuThreshold@Gemm@cask@@QEAAXM@Z', 'address': '0x7ffb1d74ea60'}, {'type': 'function', 'name': '?setReLuUpperBound@Convolution@cask@@QEAAXM@Z', 'address': '0x7ffb1d74ea50'}, {'type': 'function', 'name': '?setScalingMode@PoolingOperation@cask@@QEAAX_N@Z', 'address': '0x7ffb1d750300'}, {'type': 'function', 'name': '?setScalingMode@SoftmaxOperation@cask@@QEAAX_N@Z', 'address': '0x7ffb1d750cd0'}, {'type': 'function', 'name': '?setSparsityRatio@TensorDesc@cask@@QEAAXW4sparseRatio_t@SparsityHint@12@@Z', 'address': '0x7ffb1d74e6e0'}, {'type': 'function', 'name': '?setSplitH@ConvolutionWeightGradient@cask@@QEAAX_K@Z', 'address': '0x7ffb1d74fee0'}, {'type': 'function', 'name': '?setSplitK@ConvolutionWeightGradient@cask@@QEAAX_K@Z', 'address': '0x7ffb1d74e980'}, {'type': 'function', 'name': '?setSplitKBuffers@Convolution@cask@@QEAAX_K@Z', 'address': '0x7ffb1d74e9a0'}, {'type': 'function', 'name': '?setSplitKBuffers@ConvolutionWeightGradient@cask@@QEAAX_K@Z', 'address': '0x7ffb1d74e9a0'}, {'type': 'function', 'name': '?setSplitKBuffers@Gemm@cask@@QEAAX_K@Z', 'address': '0x7ffb1d74e9a0'}, {'type': 'function', 'name': '?setSplitKMode@Convolution@cask@@QEAAXV?$SafeEnum@USplitKMode_ENUMCLASS_SCOPEWRAPPER@cask@@@2@@Z', 'address': '0x7ffb1d74e990'}, {'type': 'function', 'name': '?setSplitKMode@ConvolutionWeightGradient@cask@@QEAAXV?$SafeEnum@USplitKMode_ENUMCLASS_SCOPEWRAPPER@cask@@@2@@Z', 'address': '0x7ffb1d74e990'}, {'type': 'function', 'name': '?setSplitKMode@Gemm@cask@@QEAAXV?$SafeEnum@USplitKMode_ENUMCLASS_SCOPEWRAPPER@cask@@@2@@Z', 'address': '0x7ffb1d74e990'}, {'type': 'function', 'name': '?setSplitKR@Convolution@cask@@QEAAX_N@Z', 'address': '0x7ffb1d74e9c0'}, {'type': 'function', 'name': '?setSplitKR@ConvolutionWeightGradient@cask@@QEAAX_N@Z', 'address': '0x7ffb1d74e9c0'}, {'type': 'function', 'name': '?setSplitKR@Gemm@cask@@QEAAX_N@Z', 'address': '0x7ffb1d74e9c0'}, {'type': 'function', 'name': '?setSplitKT@Convolution@cask@@QEAAX_N@Z', 'address': '0x7ffb1d74e9b0'}, {'type': 'function', 'name': '?setSplitKT@ConvolutionWeightGradient@cask@@QEAAX_N@Z', 'address': '0x7ffb1d74e9b0'}, {'type': 'function', 'name': '?setSplitKT@Gemm@cask@@QEAAX_N@Z', 'address': '0x7ffb1d74e9b0'}, {'type': 'function', 'name': '?setStrides@PoolingOperation@cask@@QEAA?AV?$SafeEnum@UErrorEnum@cask@@@2@QEB_KI@Z', 'address': '0x7ffb1d750450'}, {'type': 'function', 'name': '?setWeightDesc@Gemm@cask@@QEAAXAEBUTensorDesc@2@@Z', 'address': '0x7ffb1cd8da50'}, {'type': 'function', 'name': '?setWindowDims@PoolingOperation@cask@@QEAA?AV?$SafeEnum@UErrorEnum@cask@@@2@QEB_KI@Z', 'address': '0x7ffb1d750350'}, {'type': 'function', 'name': '?setWithoutReduction@Gemm@cask@@QEAAXH@Z', 'address': '0x7ffb1d74f550'}, {'type': 'function', 'name': '?sizeInBytes@TensorDesc@cask@@QEBA_KXZ', 'address': '0x7ffb1cd8d680'}, {'type': 'function', 'name': '?supportReluBias@ConvolutionShader@cask@@QEBA_NXZ', 'address': '0x7ffb1d74f040'}, {'type': 'function', 'name': '?transformATensor@GemmShader@cask@@UEAA?AV?$SafeEnum@UErrorEnum@cask@@@2@AEAVRunInfo@2@PEBXPEAXPEAUCUstream_st@@@Z', 'address': '0x7ffb1d74e0c0'}, {'type': 'function', 'name': '?transformAlpha@GemmShader@cask@@UEAA?AV?$SafeEnum@UErrorEnum@cask@@@2@AEAVRunInfo@2@PEBXPEAXPEAUCUstream_st@@@Z', 'address': '0x7ffb1d74e0c0'}, {'type': 'function', 'name': '?transformBTensor@GemmShader@cask@@UEAA?AV?$SafeEnum@UErrorEnum@cask@@@2@AEAVRunInfo@2@PEBXPEAXPEAUCUstream_st@@@Z', 'address': '0x7ffb1d74e0c0'}, {'type': 'function', 'name': '?transformBeta@GemmShader@cask@@UEAA?AV?$SafeEnum@UErrorEnum@cask@@@2@AEAVRunInfo@2@PEBXPEAXPEAUCUstream_st@@@Z', 'address': '0x7ffb1d74e0c0'}, {'type': 'function', 'name': '?transformBias@GemmShader@cask@@UEAA?AV?$SafeEnum@UErrorEnum@cask@@@2@AEAVRunInfo@2@PEBXPEAXPEAUCUstream_st@@@Z', 'address': '0x7ffb1d74e0c0'}, {'type': 'function', 'name': '?transformedATensorSize@GemmShader@cask@@UEAA_KAEAVRunInfo@2@@Z', 'address': '0x7ffb1c938540'}, {'type': 'function', 'name': '?transformedAlphaSize@GemmShader@cask@@UEAA_KAEAVRunInfo@2@@Z', 'address': '0x7ffb1c938540'}, {'type': 'function', 'name': '?transformedBTensorSize@GemmShader@cask@@UEAA_KAEAVRunInfo@2@@Z', 'address': '0x7ffb1c938540'}, {'type': 'function', 'name': '?transformedBetaSize@GemmShader@cask@@UEAA_KAEAVRunInfo@2@@Z', 'address': '0x7ffb1c938540'}, {'type': 'function', 'name': '?transformedBiasSize@GemmShader@cask@@UEAA_KAEAVRunInfo@2@@Z', 'address': '0x7ffb1c938540'}, {'type': 'function', 'name': 'NVAPI_Thunk', 'address': '0x7ffb1caa58c0'}, {'type': 'function', 'name': 'NVDEV_Thunk', 'address': '0x7ffb1caacdf0'}, {'type': 'function', 'name': 'NVENCODEAPI_Thunk', 'address': '0x7ffb1c9f6bb0'}, {'type': 'function', 'name': 'OpenAdapter10', 'address': '0x7ffb1d873270'}, {'type': 'function', 'name': 'OpenAdapter10_2', 'address': '0x7ffb1d873140'}, {'type': 'function', 'name': 'OpenAdapter12', 'address': '0x7ffb1d9bebd0'}] | 15,962.5 | 31,912 | 0.709131 | 3,146 | 31,925 | 7.133821 | 0.133821 | 0.143296 | 0.191062 | 0.023526 | 0.693446 | 0.613911 | 0.503186 | 0.49022 | 0.461391 | 0.314486 | 0 | 0.074885 | 0.050493 | 31,925 | 2 | 31,912 | 15,962.5 | 0.66549 | 0 | 0 | 0 | 0 | 6 | 0.780994 | 0.466704 | 0 | 0 | 0.117522 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
ebdbec79002151d8f5c2e7ee0a76eba5cbca8a95 | 60,879 | py | Python | src/sae/experiment.py | ashmanmode/AutoencoderTTS | 7424bf15dc94fe075690b3415ed4cff34f573a61 | [
"Apache-2.0"
] | 1 | 2019-05-23T00:46:24.000Z | 2019-05-23T00:46:24.000Z | src/sae/experiment.py | ashmanmode/AutoencoderTTS | 7424bf15dc94fe075690b3415ed4cff34f573a61 | [
"Apache-2.0"
] | null | null | null | src/sae/experiment.py | ashmanmode/AutoencoderTTS | 7424bf15dc94fe075690b3415ed4cff34f573a61 | [
"Apache-2.0"
] | null | null | null | """
This file is part of dnnmapper.
dnnmapper is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
dnnmapper is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with dnnmapper. If not, see <http://www.gnu.org/licenses/>.
"""
from utils import *
CUR_ACIVATION_FUNCTION = Sigmoid
def ae_all(out_file, hidden_layers_sizes=None,
corruption_levels=None,
pretrain_lr=None,
batch_size=None,
training_epochs=None): # ae all on TIMIT
print '... loading the data'
data=load_vc_all_speakers()
print '... loaded data with dimensions', str(data.shape[0]),'x', str(data.shape[1])
print '... normalizing the data'
mins, ranges = compute_normalization_factors(data)
import pickle
f=open('norm_male.pkl','w+')
pickle.dump(mins, f)#[24*7:24*7+24]##$
pickle.dump(ranges, f)#[24*7:24*7+24]##$
f.flush()
f.close()
new_data = normalize_data(data, mins, ranges)
numpy_rng = np.random.RandomState(89677)
import theano
n_train_batches = int(0.9*new_data.shape[0])
n_train_batches /= batch_size
#new_data = new_data.astype(np.float32)[:,24*7:24*7+24]
#mins = mins[24*7:24*7+24]
#ranges = ranges[24*7:24*7+24]
train_set = theano.shared(new_data[:int(0.9*new_data.shape[0]), :])
test_set = theano.shared(new_data[int(0.9*new_data.shape[0]):, :])
test_set_unnormalized = unnormalize_data(new_data[int(0.9*new_data.shape[0]):, :], mins, ranges)[:,24*7:24*7+24]
print '... building the model'
from ae_stacked import SdA
sda = SdA(
numpy_rng=numpy_rng,
n_ins=new_data.shape[1],
hidden_layers_sizes=hidden_layers_sizes,#[1000, 1000],
)
print '... getting the pretraining functions'
pretraining_fns = sda.pretraining_functions(train_set_x=train_set,
batch_size=batch_size)
print '...training the model'
import time
import pickle
start_time = time.clock()
reconstruct = theano.function(
inputs=[
],
outputs=sda.dA_layers[0].xrec,
givens={
sda.dA_layers[0].x: test_set
}
)
#corruption_levels = [0.2, 0.3]
lr = pretrain_lr
for i in xrange(sda.n_layers):
# go through pretraining epochs
for epoch in xrange(training_epochs):
# go through the training set
c = []
for batch_index in xrange(n_train_batches):
c.append(pretraining_fns[i](index=batch_index,
corruption=corruption_levels[i],
lr=pretrain_lr))
if i==0:
XH = reconstruct()
XH = unnormalize_data(XH, mins, ranges)[:,24*7:24*7+24]
print 'melCD', melCD(XH, test_set_unnormalized)
lr *= 0.99
if lr < 0.01:
lr = 0.01
import pickle
f=open(out_file,'w+')
pickle.dump(sda, f)
pickle.dump(mins, f)
pickle.dump(ranges, f)
f.flush()
f.close()
print 'Pre-training layer %i, epoch %d, cost ' % (i, epoch),
print np.mean(c)
end_time = time.clock()
print 'The pretraining code for file ' +\
os.path.split(__file__)[1] +\
' ran for %.2fm' % ((end_time - start_time) / 60.)
def model2_pre(x, y, xv, yv, xt, yt, mins, ranges,
hidden_layers_sizes=None,
corruption_levels=None,
lr=None,
batch_size=None,
training_epochs=None): # 1.(A, Bb_backprop, C_backprop),MCEP15
initial_learning_rate = lr
learning_rate_decay = 0.998
dropout=False
squared_filter_length_limit = 15.0
mom_start = 0.5
mom_end = 0.99
mom_epoch_interval = 500
mom_params = {"start": mom_start,
"end": mom_end,
"interval": mom_epoch_interval}
results_file_name = "results_backprop.txt"
dataset = 'test_xy'
train_set_x = x
train_set_y = y
valid_set_x = xv
valid_set_y = xv
test_set_x = xt
test_set_y = yt
# compute number of minibatches for training, validation and testing
n_train_batches = train_set_x.get_value(borrow=True).shape[0] / batch_size
n_valid_batches = valid_set_x.get_value(borrow=True).shape[0] / batch_size
n_test_batches = test_set_x.get_value(borrow=True).shape[0] / batch_size
######################
# BUILD ACTUAL MODEL #
######################
print '... building the model'
# allocate symbolic variables for the data
index = T.lscalar() # index to a [mini]batch
epoch = T.scalar()
x = T.matrix('x') # the data is presented as rasterized images
y = T.matrix('y') # the labels are presented as 1D vector of
# [int] labels
learning_rate = theano.shared(np.asarray(initial_learning_rate,
dtype=theano.config.floatX))
random_seed = 1234
rng = np.random.RandomState(random_seed)
# construct the MLP class
from dnn_dropout import MLP
if 0: # no pretraining
pretrained=None
elif 1: # ae pretraining + middle layer
f=open('ae_100_linear.pkl','r')
sda=pickle.load(f)
mins=pickle.load(f)
ranges=pickle.load(f)
f.close()
pretrained = MLP(rng=rng, input=x,
layer_sizes=hidden_layers_sizes,
dropout_rates=corruption_levels,
activations=[CUR_ACIVATION_FUNCTION]*len(hidden_layers_sizes),
use_bias=True
)
for i in range(len(sda.dA_layers)):
pretrained.layers[i].W = sda.dA_layers[i].W
pretrained.layers[i].b = sda.dA_layers[i].b
for i in range(len(sda.dA_layers)):
pretrained.layers[len(sda.dA_layers)+i].W = sda.dA_layers[len(sda.dA_layers)-i-1].W_prime
pretrained.layers[len(sda.dA_layers)+i].b = sda.dA_layers[len(sda.dA_layers)-i-1].b_prime
elif 0: # mlp pretraining
pass
classifier = MLP(rng=rng, input=x,
layer_sizes=hidden_layers_sizes,
dropout_rates=corruption_levels,
activations=[CUR_ACIVATION_FUNCTION]*len(hidden_layers_sizes),
use_bias=True,
pretrained=pretrained)
#from mlp import MLP
#classifier = MLP(
#rng=rng,
#input=x,
#n_in=24,
#n_hidden=75,
#n_out=24
#)
# Build the expresson for the cost function.
cost = classifier.mse(y)
dropout_cost = classifier.dropout_mse(y)
# Compile theano function for testing.
test_model = theano.function(inputs=[index],
outputs=classifier.mse(y),
givens={
x: test_set_x[index * batch_size:(index + 1) * batch_size],
y: test_set_y[index * batch_size:(index + 1) * batch_size]})
#theano.printing.pydotprint(test_model, outfile="test_file.png",
# var_with_name_simple=True)
# Compile theano function for validation.
validate_model = theano.function(inputs=[index],
outputs=classifier.mse(y),
givens={
x: valid_set_x[index * batch_size:(index + 1) * batch_size],
y: valid_set_y[index * batch_size:(index + 1) * batch_size]})
test_fprop = theano.function(inputs=[],
outputs=classifier.layers[-1].output,
givens={
x: test_set_x
})
#theano.printing.pydotprint(validate_model, outfile="validate_file.png",
# var_with_name_simple=True)
# Compute gradients of the model wrt parameters
gparams = []
for param in classifier.params:
# Use the right cost function here to train with or without dropout.
gparam = T.grad(dropout_cost if dropout else cost, param)
gparams.append(gparam)
# ... and allocate mmeory for momentum'd versions of the gradient
gparams_mom = []
for param in classifier.params:
gparam_mom = theano.shared(np.zeros(param.get_value(borrow=True).shape,
dtype=theano.config.floatX))
gparams_mom.append(gparam_mom)
from theano.ifelse import ifelse
# Compute momentum for the current epoch
mom = ifelse(epoch < mom_epoch_interval,
mom_start*(1.0 - epoch/mom_epoch_interval) + mom_end*(epoch/mom_epoch_interval),
mom_end)
from collections import OrderedDict
# Update the step direction using momentum
updates = OrderedDict()
for gparam_mom, gparam in zip(gparams_mom, gparams):
# Misha Denil's original version
#updates[gparam_mom] = mom * gparam_mom + (1. - mom) * gparam
# change the update rule to match Hinton's dropout paper
updates[gparam_mom] = mom * gparam_mom - (1. - mom) * learning_rate * gparam
# ... and take a step along that direction
for param, gparam_mom in zip(classifier.params, gparams_mom):
# Misha Denil's original version
#stepped_param = param - learning_rate * updates[gparam_mom]
# since we have included learning_rate in gparam_mom, we don't need it
# here
stepped_param = param + updates[gparam_mom]
# This is a silly hack to constrain the norms of the rows of the weight
# matrices. This just checks if there are two dimensions to the
# parameter and constrains it if so... maybe this is a bit silly but it
# should work for now.
if param.get_value(borrow=True).ndim == 2:
#squared_norms = T.sum(stepped_param**2, axis=1).reshape((stepped_param.shape[0],1))
#scale = T.clip(T.sqrt(squared_filter_length_limit / squared_norms), 0., 1.)
#updates[param] = stepped_param * scale
# constrain the norms of the COLUMNs of the weight, according to
# https://github.com/BVLC/caffe/issues/109
col_norms = T.sqrt(T.sum(T.sqr(stepped_param), axis=0))
desired_norms = T.clip(col_norms, 0, T.sqrt(squared_filter_length_limit))
scale = desired_norms / (1e-7 + col_norms)
updates[param] = stepped_param * scale
else:
updates[param] = stepped_param
# Compile theano function for training. This returns the training cost and
# updates the model parameters.
output = dropout_cost if dropout else cost
train_model = theano.function(inputs=[epoch, index], outputs=output,
updates=updates,
givens={
x: train_set_x[index * batch_size:(index + 1) * batch_size],
y: train_set_y[index * batch_size:(index + 1) * batch_size]})
#theano.printing.pydotprint(train_model, outfile="train_file.png",
# var_with_name_simple=True)
# Theano function to decay the learning rate, this is separate from the
# training function because we only want to do this once each epoch instead
# of after each minibatch.
decay_learning_rate = theano.function(inputs=[], outputs=learning_rate,
updates={learning_rate: learning_rate * learning_rate_decay})
###############
# TRAIN MODEL #
###############
print '... training'
best_params = None
best_validation_errors = np.inf
best_iter = 0
test_score = 0.
epoch_counter = 0
import time
start_time = time.clock()
results_file = open(results_file_name, 'wb')
X2=test_set_y.eval()
X2 = unnormalize_data(X2, mins, ranges)
X1=test_set_x.eval()
X1 = unnormalize_data(X1, mins, ranges)
last_reg = 10000.0
while epoch_counter < training_epochs:
# Train this epoch
epoch_counter = epoch_counter + 1
for minibatch_index in xrange(n_train_batches):
minibatch_avg_cost = train_model(epoch_counter, minibatch_index)
# Compute loss on validation set
validation_losses = [validate_model(i) for i in xrange(n_valid_batches)]
this_validation_errors = np.mean(validation_losses)
# Report and save progress.
print "epoch {}, test error {}, learning_rate={}{}".format(
epoch_counter, this_validation_errors,
learning_rate.get_value(borrow=True),
" **" if this_validation_errors < best_validation_errors else "")
best_validation_errors = min(best_validation_errors,
this_validation_errors)
results_file.write("{0}\n".format(this_validation_errors))
results_file.flush()
new_learning_rate = decay_learning_rate()
YH=test_fprop()
YH = unnormalize_data(YH, mins, ranges)
print 'Regression ', melCD(X2[:,24*7:24*7+24],YH[:,24*7:24*7+24])#np.mean(np.mean((YH-X2)**2,1))
print 'Baseline! ', melCD(X1[:,24*7:24*7+24],X2[:,24*7:24*7+24])#np.mean(np.mean((X1-X2)**2,1))
#print 'Regression ', melCD(X2,YH)#np.mean(np.mean((YH-X2)**2,1))
#print 'Baseline! ', melCD(X1,X2)#np.mean(np.mean((X1-X2)**2,1))
if np.mean(np.mean((YH-X2)**2,1)) < last_reg:
print 'This is better. Saving the model to ' + dataset+'.dnn.pkl'
f = open(dataset+'.dnn.pkl','w+')
pickle.dump(classifier, f)
f.flush()
f.close()
last_reg = np.mean(np.mean((YH-X2)**2,1))
end_time = time.clock()
print(('Optimization complete. Best validation score of %f %% '
'obtained at iteration %i, with test performance %f %%') %
(best_validation_errors * 100., best_iter, test_score * 100.))
print >> sys.stderr, ('The code for file ' +
os.path.split(__file__)[1] +
' ran for %.2fm' % ((end_time - start_time) / 60.))
def model0_pre(x, y, xv, yv, xt, yt, mins, ranges,
hidden_layers_sizes=None,
corruption_levels=None,
lr=None,
batch_size=None,
training_epochs=None): # GMM,MCEP
import sys
sys.path.append('../gitlab/pysig/src/python/')
from pysig.learning.mapping import JDGMM
model=JDGMM(Q=128,regularizer=0.02)
x=x.eval().astype(np.float64)[:,7*24:7*24+24]
y=y.eval().astype(np.float64)[:,7*24:7*24+24]
xt=xt.eval().astype(np.float64)[:,7*24:7*24+24]
yt=yt.eval().astype(np.float64)[:,7*24:7*24+24]
model.train(x, y)
YH=model.map(xt)
mins = mins[7*24:7*24+24]
ranges = ranges[7*24:7*24+24]
YH = unnormalize_data(YH, mins, ranges)
X2 = unnormalize_data(yt, mins, ranges)
X1 = unnormalize_data(xt, mins, ranges)
print 'Regression ', melCD(X2,YH)#np.mean(np.mean((YH-X2)**2,1))
print 'Baseline! ', melCD(X1,X2)#np.mean(np.mean((X1-X2)**2,1))
import pickle
f=open('jdgmm3_male.pkl','w+')
pickle.dump(model, f)
f.flush()
f.close()
pass
def model1_pre(x, y, xv, yv, xt, yt, mins, ranges,
hidden_layers_sizes=None,
corruption_levels=None,
lr=None,
batch_size=None,
training_epochs=None): # 4,(C_backprop),MCEP.
initial_learning_rate = lr
learning_rate_decay = 0.998
dropout=False
squared_filter_length_limit = 15.0
mom_start = 0.5
mom_end = 0.99
mom_epoch_interval = 500
mom_params = {"start": mom_start,
"end": mom_end,
"interval": mom_epoch_interval}
results_file_name = "results_backprop.txt"
dataset = 'test_xy'
train_set_x = x
train_set_y = y
valid_set_x = xv
valid_set_y = xv
test_set_x = xt
test_set_y = yt
# compute number of minibatches for training, validation and testing
n_train_batches = train_set_x.get_value(borrow=True).shape[0] / batch_size
n_valid_batches = valid_set_x.get_value(borrow=True).shape[0] / batch_size
n_test_batches = test_set_x.get_value(borrow=True).shape[0] / batch_size
######################
# BUILD ACTUAL MODEL #
######################
print '... building the model'
# allocate symbolic variables for the data
index = T.lscalar() # index to a [mini]batch
epoch = T.scalar()
x = T.matrix('x') # the data is presented as rasterized images
y = T.matrix('y') # the labels are presented as 1D vector of
# [int] labels
learning_rate = theano.shared(np.asarray(initial_learning_rate,
dtype=theano.config.floatX))
random_seed = 1234
rng = np.random.RandomState(random_seed)
# construct the MLP class
if 1: # no pretraining
pretrained=None
elif 0: # ae pretraining + middle layer
f = open('test.dnn.pkl','r')
pretrained = pickle.load(f)
f.close()
elif 0: # mlp pretraining
pass
from dnn_dropout import MLP
classifier = MLP(rng=rng, input=x,
layer_sizes=hidden_layers_sizes,
dropout_rates=corruption_levels,
activations=[CUR_ACIVATION_FUNCTION]*len(hidden_layers_sizes),
use_bias=True,
pretrained=pretrained)
#from mlp import MLP
#classifier = MLP(
#rng=rng,
#input=x,
#n_in=24,
#n_hidden=75,
#n_out=24
#)
# Build the expresson for the cost function.
cost = classifier.mse(y)
dropout_cost = classifier.dropout_mse(y)
# Compile theano function for testing.
test_model = theano.function(inputs=[index],
outputs=classifier.mse(y),
givens={
x: test_set_x[index * batch_size:(index + 1) * batch_size],
y: test_set_y[index * batch_size:(index + 1) * batch_size]})
#theano.printing.pydotprint(test_model, outfile="test_file.png",
# var_with_name_simple=True)
# Compile theano function for validation.
validate_model = theano.function(inputs=[index],
outputs=classifier.mse(y),
givens={
x: valid_set_x[index * batch_size:(index + 1) * batch_size],
y: valid_set_y[index * batch_size:(index + 1) * batch_size]})
test_fprop = theano.function(inputs=[],
outputs=classifier.layers[-1].output,
givens={
x: test_set_x
})
#theano.printing.pydotprint(validate_model, outfile="validate_file.png",
# var_with_name_simple=True)
# Compute gradients of the model wrt parameters
gparams = []
for param in classifier.params:
# Use the right cost function here to train with or without dropout.
gparam = T.grad(dropout_cost if dropout else cost, param)
gparams.append(gparam)
# ... and allocate mmeory for momentum'd versions of the gradient
gparams_mom = []
for param in classifier.params:
gparam_mom = theano.shared(np.zeros(param.get_value(borrow=True).shape,
dtype=theano.config.floatX))
gparams_mom.append(gparam_mom)
from theano.ifelse import ifelse
# Compute momentum for the current epoch
mom = ifelse(epoch < mom_epoch_interval,
mom_start*(1.0 - epoch/mom_epoch_interval) + mom_end*(epoch/mom_epoch_interval),
mom_end)
from collections import OrderedDict
# Update the step direction using momentum
updates = OrderedDict()
for gparam_mom, gparam in zip(gparams_mom, gparams):
# Misha Denil's original version
#updates[gparam_mom] = mom * gparam_mom + (1. - mom) * gparam
# change the update rule to match Hinton's dropout paper
updates[gparam_mom] = mom * gparam_mom - (1. - mom) * learning_rate * gparam
# ... and take a step along that direction
for param, gparam_mom in zip(classifier.params, gparams_mom):
# Misha Denil's original version
#stepped_param = param - learning_rate * updates[gparam_mom]
# since we have included learning_rate in gparam_mom, we don't need it
# here
stepped_param = param + updates[gparam_mom]
# This is a silly hack to constrain the norms of the rows of the weight
# matrices. This just checks if there are two dimensions to the
# parameter and constrains it if so... maybe this is a bit silly but it
# should work for now.
if param.get_value(borrow=True).ndim == 2:
#squared_norms = T.sum(stepped_param**2, axis=1).reshape((stepped_param.shape[0],1))
#scale = T.clip(T.sqrt(squared_filter_length_limit / squared_norms), 0., 1.)
#updates[param] = stepped_param * scale
# constrain the norms of the COLUMNs of the weight, according to
# https://github.com/BVLC/caffe/issues/109
col_norms = T.sqrt(T.sum(T.sqr(stepped_param), axis=0))
desired_norms = T.clip(col_norms, 0, T.sqrt(squared_filter_length_limit))
scale = desired_norms / (1e-7 + col_norms)
updates[param] = stepped_param * scale
else:
updates[param] = stepped_param
# Compile theano function for training. This returns the training cost and
# updates the model parameters.
output = dropout_cost if dropout else cost
train_model = theano.function(inputs=[epoch, index], outputs=output,
updates=updates,
givens={
x: train_set_x[index * batch_size:(index + 1) * batch_size],
y: train_set_y[index * batch_size:(index + 1) * batch_size]})
#theano.printing.pydotprint(train_model, outfile="train_file.png",
# var_with_name_simple=True)
# Theano function to decay the learning rate, this is separate from the
# training function because we only want to do this once each epoch instead
# of after each minibatch.
decay_learning_rate = theano.function(inputs=[], outputs=learning_rate,
updates={learning_rate: learning_rate * learning_rate_decay})
###############
# TRAIN MODEL #
###############
print '... training'
best_params = None
best_validation_errors = np.inf
best_iter = 0
test_score = 0.
epoch_counter = 0
import time
start_time = time.clock()
results_file = open(results_file_name, 'wb')
X2=test_set_y.eval()
X2 = unnormalize_data(X2, mins, ranges)
X1=test_set_x.eval()
X1 = unnormalize_data(X1, mins, ranges)
last_reg = 10000.0
while epoch_counter < training_epochs:
# Train this epoch
epoch_counter = epoch_counter + 1
for minibatch_index in xrange(n_train_batches):
minibatch_avg_cost = train_model(epoch_counter, minibatch_index)
# Compute loss on validation set
validation_losses = [validate_model(i) for i in xrange(n_valid_batches)]
this_validation_errors = np.mean(validation_losses)
# Report and save progress.
print "epoch {}, test error {}, learning_rate={}{}".format(
epoch_counter, this_validation_errors,
learning_rate.get_value(borrow=True),
" **" if this_validation_errors < best_validation_errors else "")
best_validation_errors = min(best_validation_errors,
this_validation_errors)
results_file.write("{0}\n".format(this_validation_errors))
results_file.flush()
new_learning_rate = decay_learning_rate()
YH=test_fprop()
YH = unnormalize_data(YH, mins, ranges)
#print 'Regression ', melCD(X2[:,24*7:24*7+24],YH[:,24*7:24*7+24])#np.mean(np.mean((YH-X2)**2,1))
#print 'Baseline! ', melCD(X1[:,24*7:24*7+24],X2[:,24*7:24*7+24])#np.mean(np.mean((X1-X2)**2,1))
print 'Regression ', melCD(X2,YH)#np.mean(np.mean((YH-X2)**2,1))
print 'Baseline! ', melCD(X1,X2)#np.mean(np.mean((X1-X2)**2,1))
if np.mean(np.mean((YH-X2)**2,1)) < last_reg:
print 'This is better. Saving the model to ' + dataset+'.dnn.pkl'
f = open(dataset+'.dnn.pkl','w+')
pickle.dump(classifier, f)
f.flush()
f.close()
last_reg = np.mean(np.mean((YH-X2)**2,1))
end_time = time.clock()
print(('Optimization complete. Best validation score of %f %% '
'obtained at iteration %i, with test performance %f %%') %
(best_validation_errors * 100., best_iter, test_score * 100.))
print >> sys.stderr, ('The code for file ' +
os.path.split(__file__)[1] +
' ran for %.2fm' % ((end_time - start_time) / 60.))
def model2_pre_from_siae(inp_file):
f=open(inp_file,'r')
sda=pickle.load(f)
f.close()
hidden_layers_sizes = [sda.dA_layers[0].n_visible]
for i in range(len(sda.dA_layers)):
hidden_layers_sizes.append(sda.dA_layers[i].n_hidden)
for i in range(len(sda.dA_layers)-1, -1, -1):
hidden_layers_sizes.append(sda.dA_layers[i].n_hidden)
hidden_layers_sizes.append(sda.dA_layers[0].n_visible)
random_seed = 1234
rng = np.random.RandomState(random_seed)
x = T.matrix('x') # the data is presented as rasterized images
from dnn_dropout import MLP
pretrained = MLP(rng=rng, input=x,
layer_sizes=hidden_layers_sizes,
dropout_rates=[0.0]*len(hidden_layers_sizes),
activations=[CUR_ACIVATION_FUNCTION]*len(hidden_layers_sizes),
use_bias=True
)
for i in range(len(sda.dA_layers)):
pretrained.layers[i].W = sda.dA_layers[i].W
pretrained.layers[i].b = sda.dA_layers[i].b
for i in range(len(sda.dA_layers)):
pretrained.layers[len(sda.dA_layers)+i].W = sda.dA_layers[len(sda.dA_layers)-i-1].W_prime
pretrained.layers[len(sda.dA_layers)+i].b = sda.dA_layers[len(sda.dA_layers)-i-1].b_prime
return pretrained
def model2_pre_from_speaker20(inp_file, midlayer=None, train_x=None, train_y=None):
f=open(inp_file,'r')
pretrained=pickle.load(f)
return pretrained
def dnn_train(pretrain_func, inp_file, out_file, x, y, xv, yv, xt, yt, mins, ranges,
hidden_layers_sizes=None,
middle_layers_sizes=None,
corruption_levels=None,
lr=None,
batch_size=None,
training_epochs=None): # 1.(A, Bb_backprop, C_backprop),MCEP15
initial_learning_rate = lr
learning_rate_decay = 0.998
dropout=False
squared_filter_length_limit = 15.0
mom_start = 0.5
mom_end = 0.99
mom_epoch_interval = 500
mom_params = {"start": mom_start,
"end": mom_end,
"interval": mom_epoch_interval}
results_file_name = "results_backprop.txt"
dataset = 'test_xy'
train_set_x = x
train_set_y = y
valid_set_x = xv
valid_set_y = xv
test_set_x = xt
test_set_y = yt
# compute number of minibatches for training, validation and testing
n_train_batches = train_set_x.get_value(borrow=True).shape[0] / batch_size
n_valid_batches = valid_set_x.get_value(borrow=True).shape[0] / batch_size
n_test_batches = test_set_x.get_value(borrow=True).shape[0] / batch_size
######################
# BUILD ACTUAL MODEL #
######################
print '... building the model'
# allocate symbolic variables for the data
index = T.lscalar() # index to a [mini]batch
epoch = T.scalar()
x = T.matrix('x') # the data is presented as rasterized images
y = T.matrix('y') # the labels are presented as 1D vector of
# [int] labels
learning_rate = theano.shared(np.asarray(initial_learning_rate,
dtype=theano.config.floatX))
random_seed = 1234
rng = np.random.RandomState(random_seed)
# construct the MLP class
from dnn_dropout import MLP
pretrained = pretrain_func(inp_file, middle_layers_sizes, train_set_x, train_set_y)
classifier = MLP(rng=rng, input=x,
layer_sizes=hidden_layers_sizes,
dropout_rates=corruption_levels,
activations=[CUR_ACIVATION_FUNCTION]*(len(hidden_layers_sizes)+2),
use_bias=True,
pretrained=pretrained)
#from mlp import MLP
#classifier = MLP(
#rng=rng,
#input=x,
#n_in=24,
#n_hidden=75,
#n_out=24
#)
# Build the expresson for the cost function.
cost = classifier.mse(y)
dropout_cost = classifier.dropout_mse(y)
# Compile theano function for testing.
test_model = theano.function(inputs=[index],
outputs=classifier.mse(y),
givens={
x: test_set_x[index * batch_size:(index + 1) * batch_size],
y: test_set_y[index * batch_size:(index + 1) * batch_size]})
#theano.printing.pydotprint(test_model, outfile="test_file.png",
# var_with_name_simple=True)
# Compile theano function for validation.
validate_model = theano.function(inputs=[index],
outputs=classifier.mse(y),
givens={
x: valid_set_x[index * batch_size:(index + 1) * batch_size],
y: valid_set_y[index * batch_size:(index + 1) * batch_size]})
test_fprop = theano.function(inputs=[],
outputs=classifier.layers[-1].output,
givens={
x: test_set_x
})
#theano.printing.pydotprint(validate_model, outfile="validate_file.png",
# var_with_name_simple=True)
# Compute gradients of the model wrt parameters
gparams = []
for param in classifier.params:
# Use the right cost function here to train with or without dropout.
gparam = T.grad(dropout_cost if dropout else cost, param)
gparams.append(gparam)
# ... and allocate mmeory for momentum'd versions of the gradient
gparams_mom = []
for param in classifier.params:
gparam_mom = theano.shared(np.zeros(param.get_value(borrow=True).shape,
dtype=theano.config.floatX))
gparams_mom.append(gparam_mom)
from theano.ifelse import ifelse
# Compute momentum for the current epoch
mom = ifelse(epoch < mom_epoch_interval,
mom_start*(1.0 - epoch/mom_epoch_interval) + mom_end*(epoch/mom_epoch_interval),
mom_end)
from collections import OrderedDict
# Update the step direction using momentum
updates = OrderedDict()
for gparam_mom, gparam in zip(gparams_mom, gparams):
# Misha Denil's original version
#updates[gparam_mom] = mom * gparam_mom + (1. - mom) * gparam
# change the update rule to match Hinton's dropout paper
updates[gparam_mom] = mom * gparam_mom - (1. - mom) * learning_rate * gparam
# ... and take a step along that direction
for param, gparam_mom in zip(classifier.params, gparams_mom):
# Misha Denil's original version
#stepped_param = param - learning_rate * updates[gparam_mom]
# since we have included learning_rate in gparam_mom, we don't need it
# here
stepped_param = param + updates[gparam_mom]
# This is a silly hack to constrain the norms of the rows of the weight
# matrices. This just checks if there are two dimensions to the
# parameter and constrains it if so... maybe this is a bit silly but it
# should work for now.
if param.get_value(borrow=True).ndim == 2:
#squared_norms = T.sum(stepped_param**2, axis=1).reshape((stepped_param.shape[0],1))
#scale = T.clip(T.sqrt(squared_filter_length_limit / squared_norms), 0., 1.)
#updates[param] = stepped_param * scale
# constrain the norms of the COLUMNs of the weight, according to
# https://github.com/BVLC/caffe/issues/109
col_norms = T.sqrt(T.sum(T.sqr(stepped_param), axis=0))
desired_norms = T.clip(col_norms, 0, T.sqrt(squared_filter_length_limit))
scale = desired_norms / (1e-7 + col_norms)
updates[param] = stepped_param * scale
else:
updates[param] = stepped_param
# Compile theano function for training. This returns the training cost and
# updates the model parameters.
output = dropout_cost if dropout else cost
train_model = theano.function(inputs=[epoch, index], outputs=output,
updates=updates,
givens={
x: train_set_x[index * batch_size:(index + 1) * batch_size],
y: train_set_y[index * batch_size:(index + 1) * batch_size]})
#theano.printing.pydotprint(train_model, outfile="train_file.png",
# var_with_name_simple=True)
# Theano function to decay the learning rate, this is separate from the
# training function because we only want to do this once each epoch instead
# of after each minibatch.
decay_learning_rate = theano.function(inputs=[], outputs=learning_rate,
updates={learning_rate: learning_rate * learning_rate_decay})
###############
# TRAIN MODEL #
###############
print '... training'
best_params = None
best_validation_errors = np.inf
best_iter = 0
test_score = 0.
epoch_counter = 0
import time
start_time = time.clock()
results_file = open(results_file_name, 'wb')
X2=test_set_y.eval()
X2 = unnormalize_data(X2, mins, ranges)
X1=test_set_x.eval()
X1 = unnormalize_data(X1, mins, ranges)
last_reg = 10000.0
while epoch_counter < training_epochs:
# Train this epoch
epoch_counter = epoch_counter + 1
for minibatch_index in xrange(n_train_batches):
minibatch_avg_cost = train_model(epoch_counter, minibatch_index)
# Compute loss on validation set
#validation_losses = [validate_model(i) for i in xrange(n_valid_batches)]
#this_validation_errors = np.mean(validation_losses)
## Report and save progress.
#print "epoch {}, test error {}, learning_rate={}{}".format(
#epoch_counter, this_validation_errors,
#learning_rate.get_value(borrow=True),
#" **" if this_validation_errors < best_validation_errors else "")
#best_validation_errors = min(best_validation_errors,
#this_validation_errors)
#results_file.write("{0}\n".format(this_validation_errors))
#results_file.flush()
new_learning_rate = decay_learning_rate()
YH=test_fprop()
YH = unnormalize_data(YH, mins, ranges)
print epoch_counter
print 'Regression ', melCD(X2[:,24*7:24*7+24],YH[:,24*7:24*7+24])#np.mean(np.mean((YH-X2)**2,1))
print 'Baseline! ', melCD(X1[:,24*7:24*7+24],X2[:,24*7:24*7+24])#np.mean(np.mean((X1-X2)**2,1))
#print 'Regression ', melCD(X2,YH)#np.mean(np.mean((YH-X2)**2,1))
#print 'Baseline! ', melCD(X1,X2)#np.mean(np.mean((X1-X2)**2,1))
if np.mean(np.mean((YH-X2)**2,1)) < last_reg:
print 'This is better. Saving the model to ' + dataset+'.dnn.pkl'
f = open(out_file,'w+')
pickle.dump(classifier, f)
f.flush()
f.close()
last_reg = np.mean(np.mean((YH-X2)**2,1))
end_time = time.clock()
print(('Optimization complete. Best validation score of %f %% '
'obtained at iteration %i, with test performance %f %%') %
(best_validation_errors * 100., best_iter, test_score * 100.))
print ('The code for file ' +
os.path.split(__file__)[1] +
' ran for %.2fm' % ((end_time - start_time) / 60.))
def model4_pre_from_siae(inp_file, midlayer, train_x, train_y): # 3.(A, Ba, Bb_backprop, C_backprop,SLT14),MCEP15
f=open(inp_file,'r')
sda=pickle.load(f)
f.close()
hidden_layers_sizes = [sda.dA_layers[0].n_visible]
for i in range(len(sda.dA_layers)):
hidden_layers_sizes.append(sda.dA_layers[i].n_hidden)
for i in range(len(midlayer)):
hidden_layers_sizes.append(midlayer[i])
for i in range(len(sda.dA_layers)-1, -1, -1):
hidden_layers_sizes.append(sda.dA_layers[i].n_hidden)
hidden_layers_sizes.append(sda.dA_layers[0].n_visible)
random_seed = 1234
rng = np.random.RandomState(random_seed)
x = T.matrix('x') # the data is presented as rasterized images
from dnn_dropout import MLP
pretrained = MLP(rng=rng, input=x,
layer_sizes=hidden_layers_sizes,
dropout_rates=[0.0]*len(hidden_layers_sizes),
activations=[CUR_ACIVATION_FUNCTION]*len(hidden_layers_sizes),
use_bias=True
)
for i in range(len(sda.dA_layers)):
pretrained.layers[i].W = sda.dA_layers[i].W
pretrained.layers[i].b = sda.dA_layers[i].b
for i in range(len(sda.dA_layers)):
pretrained.layers[len(sda.dA_layers)+len(midlayer)+i+1].W = sda.dA_layers[len(sda.dA_layers)-i-1].W_prime
pretrained.layers[len(sda.dA_layers)+len(midlayer)+i+1].b = sda.dA_layers[len(sda.dA_layers)-i-1].b_prime
middle_layer_size = [sda.dA_layers[-1].n_hidden]
for i in range(len(midlayer)):
middle_layer_size.append(midlayer[i])
middle_layer_size.append(sda.dA_layers[-1].n_hidden)
xhid= T.matrix('x')
yhid= T.matrix('x')
inbetween = MLP(rng=rng, input=xhid,
layer_sizes=middle_layer_size,
dropout_rates=[0.0]*len(middle_layer_size),
activations=[CUR_ACIVATION_FUNCTION]*len(hidden_layers_sizes),
use_bias=True,
pretrained=None)
encodex = theano.function(
inputs=[],
outputs=sda.dA_layers[-1].xhid,
givens={
sda.dA_layers[0].x: train_x
}
)
encodey = theano.function(
inputs=[],
outputs=sda.dA_layers[-1].xhid,
givens={
sda.dA_layers[0].x: train_y
}
)
xhid_value = encodex()
yhid_value = encodey()
xhid_value = theano.shared(xhid_value)
yhid_value = theano.shared(yhid_value)
cost=inbetween.mse(yhid)
gparams = []
for param in inbetween.params:
# Use the right cost function here to train with or without dropout.
gparam = T.grad(cost, param)
gparams.append(gparam)
updates = [
(param, param - 0.1 * gparam)
for param, gparam in zip(inbetween.params, gparams)
]
train_model = theano.function(inputs=[], outputs=cost,
updates=updates,
givens={
xhid: xhid_value,
yhid: yhid_value})
data_len = train_x.eval().shape[0]
batch_size = 10
index = T.lscalar()
train_model = theano.function(inputs=[index], outputs=cost,
updates=updates,
givens={
xhid: xhid_value[index * batch_size:(index + 1) * batch_size],
yhid: yhid_value[index * batch_size:(index + 1) * batch_size]})
for i in xrange(100):##$
cs = 0.0
for j in xrange(data_len/batch_size):
cs += train_model(j)
print i, cs
for i in range(len(midlayer)+1):
pretrained.layers[len(sda.dA_layers)+i].W = inbetween.layers[i].W
pretrained.layers[len(sda.dA_layers)+i].b = inbetween.layers[i].b
return pretrained
def model4_pre_from_speaker20(inp_file, midlayer=None, train_x=None, train_y=None): # 3.(A, Ba, Bb_backprop, C_backprop,SLT14),MCEP15
f=open(inp_file,'r')
pretrained=pickle.load(f)
return pretrained
def model3_pre_from_siae(inp_file, midlayer, train_x, train_y): # 2.(A, Ba, Bb_backprop, C_backprop),MCEP15
f=open(inp_file,'r')
sda=pickle.load(f)
f.close()
hidden_layers_sizes = [sda.dA_layers[0].n_visible]
for i in range(len(sda.dA_layers)):
hidden_layers_sizes.append(sda.dA_layers[i].n_hidden)
for i in range(len(midlayer)):
hidden_layers_sizes.append(midlayer[i])
for i in range(len(sda.dA_layers)-1, -1, -1):
hidden_layers_sizes.append(sda.dA_layers[i].n_hidden)
hidden_layers_sizes.append(sda.dA_layers[0].n_visible)
random_seed = 1234
rng = np.random.RandomState(random_seed)
x = T.matrix('x') # the data is presented as rasterized images
from dnn_dropout import MLP
pretrained = MLP(rng=rng, input=x,
layer_sizes=hidden_layers_sizes,
dropout_rates=[0.0]*len(hidden_layers_sizes),
activations=[CUR_ACIVATION_FUNCTION]*len(hidden_layers_sizes),
use_bias=True
)
for i in range(len(sda.dA_layers)):
pretrained.layers[i].W = sda.dA_layers[i].W
pretrained.layers[i].b = sda.dA_layers[i].b
for i in range(len(sda.dA_layers)):
pretrained.layers[len(sda.dA_layers)+len(midlayer)+i+1].W = sda.dA_layers[len(sda.dA_layers)-i-1].W_prime
pretrained.layers[len(sda.dA_layers)+len(midlayer)+i+1].b = sda.dA_layers[len(sda.dA_layers)-i-1].b_prime
middle_layer_size = [sda.dA_layers[-1].n_hidden]
for i in range(len(midlayer)):
middle_layer_size.append(midlayer[i])
middle_layer_size.append(sda.dA_layers[-1].n_hidden)
xhid= T.matrix('x')
yhid= T.matrix('x')
from dnn_dropout import HiddenLayer
inbetween = HiddenLayer(rng=rng, input=xhid,
n_in=sda.dA_layers[-1].n_hidden,
n_out=sda.dA_layers[-1].n_hidden,
activation=CUR_ACIVATION_FUNCTION,
use_bias=True
)
encodex = theano.function(
inputs=[],
outputs=sda.dA_layers[-1].xhid,
givens={
sda.dA_layers[0].x: train_x
}
)
encodey = theano.function(
inputs=[],
outputs=sda.dA_layers[-1].xhid,
givens={
sda.dA_layers[0].x: train_y
}
)
xhid_value = encodex()
yhid_value = encodey()
xhid_value = theano.shared(xhid_value)
yhid_value = theano.shared(yhid_value)
cost=inbetween.mse(yhid)
gparams = []
for param in inbetween.params:
# Use the right cost function here to train with or without dropout.
gparam = T.grad(cost, param)
gparams.append(gparam)
updates = [
(param, param - 0.1 * gparam)
for param, gparam in zip(inbetween.params, gparams)
]
train_model = theano.function(inputs=[], outputs=cost,
updates=updates,
givens={
xhid: xhid_value,
yhid: yhid_value})
data_len = train_x.eval().shape[0]
batch_size = 10
index = T.lscalar()
train_model = theano.function(inputs=[index], outputs=cost,
updates=updates,
givens={
xhid: xhid_value[index * batch_size:(index + 1) * batch_size],
yhid: yhid_value[index * batch_size:(index + 1) * batch_size]})
for i in xrange(100):##$
cs = 0.0
for j in xrange(data_len/batch_size):
cs += train_model(j)
print i, cs
for i in range(len(midlayer)+1):
pretrained.layers[len(sda.dA_layers)+i].W = inbetween.layers[i].W
pretrained.layers[len(sda.dA_layers)+i].b = inbetween.layers[i].b
return pretrained
def model3_pre_from_speaker20(inp_file, midlayer=None, train_x=None, train_y=None): # 2.(A, Ba, Bb_backprop, C_backprop),MCEP15
f=open(inp_file,'r')
pretrained=pickle.load(f)
return pretrained
def model5_pre_from_siae(inp_file, midlayer, train_x, train_y): # 1,(A, Bb_joint, Bb_backprop, C_joint, C_backprop),MCEP15
f=open(inp_file,'r')
sda=pickle.load(f)
f.close()
x1 = T.matrix('x1') # the data is presented as rasterized images
x2 = T.matrix('x2') # the data is presented as rasterized images
cor_reg = T.scalar('cor_reg')
rng = np.random.RandomState(123)
from theano.tensor.shared_randomstreams import RandomStreams
batch_size = 10
theano_rng = RandomStreams(rng.randint(2 ** 30))
from ae_joint import dA_joint
da = dA_joint(
numpy_rng=rng,
theano_rng=theano_rng,
input1=x1,
input2=x2,
cor_reg=0.2,
n_visible1=24*15,
n_visible2=24*15,
n_hidden=sda.dA_layers[0].n_hidden,
W1=theano.shared(sda.dA_layers[0].W.eval()),
bhid1=theano.shared(sda.dA_layers[0].b.eval()),
bvis1=theano.shared(sda.dA_layers[0].b_prime.eval()),
W2=theano.shared(sda.dA_layers[0].W.eval()),
bhid2=theano.shared(sda.dA_layers[0].b.eval()),
bvis2=theano.shared(sda.dA_layers[0].b_prime.eval())
)
cost, updates = da.get_cost_updates(
corruption_level=0.0,
learning_rate=0.01
)
index = T.lscalar() # index to a [mini]batch
cor_reg_val = np.float32(1.0)
train_da = theano.function(
[index],
cost,
updates=updates,
givens={
x1: train_x[index * batch_size: (index + 1) * batch_size],
x2: train_y[index * batch_size: (index + 1) * batch_size]
}
)
fprop_x1 = theano.function(
[],
outputs=da.output1,
givens={
x1: train_x
},
name='fprop_x1'
)
fprop_x2 = theano.function(
[],
outputs=da.output2,
givens={
x2: train_y
},
name='fprop_x2'
)
fprop_x1t = theano.function(
[],
outputs=da.output1,
givens={
x1: train_x
},
name='fprop_x1'
)
fprop_x2t = theano.function(
[],
outputs=da.output2,
givens={
x2: train_y
},
name='fprop_x2'
)
rec_x1 = theano.function(
[],
outputs=da.rec1,
givens={
x1: train_x
},
name='rec_x1'
)
rec_x2 = theano.function(
[],
outputs=da.rec2,
givens={
x2: train_y
},
name='rec_x2'
)
fprop_x1_to_x2 = theano.function(
[],
outputs=da.reg,
givens={
x1: train_x
},
name='fprop_x12x2'
)
updates_reg = [
(da.cor_reg, da.cor_reg+theano.shared(np.float32(0.1)))
]
update_reg = theano.function(
[],
updates=updates_reg
)
print 'initialize functions ended'
import time
start_time = time.clock()
f=open('norm_male.pkl','r')
mins=pickle.load(f)#[24*7:24*7+24]##$
ranges=pickle.load(f)#[24*7:24*7+24]##$
f.close()
############
# TRAINING #
############
print 'training started'
X1=unnormalize_data(train_x.eval(), mins, ranges)
X2=unnormalize_data(train_y.eval(), mins, ranges)
n_train_batches = train_x.get_value(borrow=True).shape[0] / batch_size
# go through training epochs
for epoch in xrange(30):
# go through trainng set
c = []
for batch_index in xrange(n_train_batches):
c.append(train_da(batch_index))
update_reg()
X1H=rec_x1()
X2H=rec_x2()
#H1=fprop_x1()
#H2=fprop_x2()
X2MAP = fprop_x1_to_x2()
#X2MAP=np.tanh(H1.dot(log_reg.W.eval())+log_reg.b.eval())
#X2MAP=(X2MAP.dot(da.W2_prime.eval())+da.b2_prime.eval())
X1H=unnormalize_data(X1H, mins, ranges)
X2H=unnormalize_data(X2H, mins, ranges)
X2MAP=unnormalize_data(X2MAP, mins, ranges)
print 'Training epoch', epoch
print 'Reconstruction', melCD(X1H[:,24*7:24*7+24], X1[:,24*7:24*7+24]), melCD(X2H[:,24*7:24*7+24], X2[:,24*7:24*7+24])
print 'Regression', melCD(X2MAP[:,24*7:24*7+24], X2[:,24*7:24*7+24])
f=open(inp_file.split('.')[0]+'.jda.pkl', 'w+')
pickle.dump(da,f)
f.flush()
f.close()
hidden_layers_sizes = [sda.dA_layers[0].n_visible]
for i in range(len(sda.dA_layers)):
hidden_layers_sizes.append(sda.dA_layers[i].n_hidden)
for i in range(len(sda.dA_layers)-1, -1, -1):
hidden_layers_sizes.append(sda.dA_layers[i].n_hidden)
hidden_layers_sizes.append(sda.dA_layers[0].n_visible)
random_seed = 1234
rng = np.random.RandomState(random_seed)
x = T.matrix('x') # the data is presented as rasterized images
from dnn_dropout import MLP
pretrained = MLP(rng=rng, input=x,
layer_sizes=hidden_layers_sizes,
dropout_rates=[0.0]*len(hidden_layers_sizes),
activations=[CUR_ACIVATION_FUNCTION]*len(hidden_layers_sizes),
use_bias=True
)
for i in range(len(sda.dA_layers)):
pretrained.layers[i].W = theano.shared(da.W1.eval())
pretrained.layers[i].b = theano.shared(da.b1.eval())
for i in range(len(sda.dA_layers)):
pretrained.layers[len(sda.dA_layers)+i].W = theano.shared(da.W2_prime.eval())
pretrained.layers[len(sda.dA_layers)+i].b = theano.shared(da.b2_prime.eval())
return pretrained
def model5_pre_from_speaker20(inp_file, midlayer=None, train_x=None, train_y=None): # 1,(A, Bb_joint, Bb_backprop, C_joint, C_backprop),MCEP15
f=open(inp_file,'r')
jda=pickle.load(f)
f.close()
x1 = T.matrix('x1') # the data is presented as rasterized images
x2 = T.matrix('x2') # the data is presented as rasterized images
cor_reg = T.scalar('cor_reg')
rng = np.random.RandomState(123)
from theano.tensor.shared_randomstreams import RandomStreams
batch_size = 10
theano_rng = RandomStreams(rng.randint(2 ** 30))
from ae_joint import dA_joint
da = dA_joint(
numpy_rng=rng,
theano_rng=theano_rng,
input1=x1,
input2=x2,
cor_reg=0.2,
n_visible1=24*15,
n_visible2=24*15,
n_hidden=jda.n_hidden,
W1=theano.shared(jda.W1.eval()),
bhid1=theano.shared(jda.b1.eval()),
bvis1=theano.shared(jda.b1_prime.eval()),
W2=theano.shared(jda.W2.eval()),
bhid2=theano.shared(jda.b2.eval()),
bvis2=theano.shared(jda.b2_prime.eval())
)
cost, updates = da.get_cost_updates(
corruption_level=0.0,
learning_rate=0.01
)
index = T.lscalar() # index to a [mini]batch
cor_reg_val = np.float32(1.0)
train_da = theano.function(
[index],
cost,
updates=updates,
givens={
x1: train_x[index * batch_size: (index + 1) * batch_size],
x2: train_y[index * batch_size: (index + 1) * batch_size]
}
)
fprop_x1 = theano.function(
[],
outputs=da.output1,
givens={
x1: train_x
},
name='fprop_x1'
)
fprop_x2 = theano.function(
[],
outputs=da.output2,
givens={
x2: train_y
},
name='fprop_x2'
)
fprop_x1t = theano.function(
[],
outputs=da.output1,
givens={
x1: train_x
},
name='fprop_x1'
)
fprop_x2t = theano.function(
[],
outputs=da.output2,
givens={
x2: train_y
},
name='fprop_x2'
)
rec_x1 = theano.function(
[],
outputs=da.rec1,
givens={
x1: train_x
},
name='rec_x1'
)
rec_x2 = theano.function(
[],
outputs=da.rec2,
givens={
x2: train_y
},
name='rec_x2'
)
fprop_x1_to_x2 = theano.function(
[],
outputs=da.reg,
givens={
x1: train_x
},
name='fprop_x12x2'
)
updates_reg = [
(da.cor_reg, da.cor_reg+theano.shared(np.float32(0.1)))
]
update_reg = theano.function(
[],
updates=updates_reg
)
print 'initialize functions ended'
import time
start_time = time.clock()
f=open('norm_male.pkl','r')
mins=pickle.load(f)#[24*7:24*7+24]##$
ranges=pickle.load(f)#[24*7:24*7+24]##$
f.close()
############
# TRAINING #
############
print 'training started'
X1=unnormalize_data(train_x.eval(), mins, ranges)
X2=unnormalize_data(train_y.eval(), mins, ranges)
n_train_batches = train_x.get_value(borrow=True).shape[0] / batch_size
# go through training epochs
for epoch in xrange(10):
# go through trainng set
c = []
for batch_index in xrange(n_train_batches):
c.append(train_da(batch_index))
update_reg()
X1H=rec_x1()
X2H=rec_x2()
#H1=fprop_x1()
#H2=fprop_x2()
X2MAP = fprop_x1_to_x2()
#X2MAP=np.tanh(H1.dot(log_reg.W.eval())+log_reg.b.eval())
#X2MAP=(X2MAP.dot(da.W2_prime.eval())+da.b2_prime.eval())
X1H=unnormalize_data(X1H, mins, ranges)
X2H=unnormalize_data(X2H, mins, ranges)
X2MAP=unnormalize_data(X2MAP, mins, ranges)
print 'Training epoch', epoch
print 'Reconstruction', melCD(X1H[:,24*7:24*7+24], X1[:,24*7:24*7+24]), melCD(X2H[:,24*7:24*7+24], X2[:,24*7:24*7+24])
print 'Regression', melCD(X2MAP[:,24*7:24*7+24], X2[:,24*7:24*7+24])
hidden_layers_sizes = [jda.n_visible1]
#for i in range(len(sda.dA_layers)):
#hidden_layers_sizes.append(sda.dA_layers[i].n_hidden)
#for i in range(len(sda.dA_layers)-1, -1, -1):
#hidden_layers_sizes.append(sda.dA_layers[i].n_hidden)
hidden_layers_sizes.append(jda.n_hidden)
hidden_layers_sizes.append(jda.n_visible2)
random_seed = 1234
rng = np.random.RandomState(random_seed)
x = T.matrix('x') # the data is presented as rasterized images
from dnn_dropout import MLP
pretrained = MLP(rng=rng, input=x,
layer_sizes=hidden_layers_sizes,
dropout_rates=[0.0]*len(hidden_layers_sizes),
activations=[CUR_ACIVATION_FUNCTION]*len(hidden_layers_sizes),
use_bias=True
)
pretrained.layers[0].W = theano.shared(da.W1.eval())
pretrained.layers[0].b = theano.shared(da.b1.eval())
pretrained.layers[1].W = theano.shared(da.W2_prime.eval())
pretrained.layers[1].b = theano.shared(da.b2_prime.eval())
return pretrained
def model3_pre(): # 2.(A, Ba, Bb_backprop, C_backprop),MCEP15
pass
def model4_pre(): # 3.(A, Ba, Bb_backprop, C_backprop,SLT14),MCEP15
pass
def model5_pre(): # 1,(A, Bb_joint, Bb_backprop, C_joint, C_backprop),MCEP15
pass
def model6_pre(): # 1,(A, Bb_joint, Bb_backprop, C_joint, C_backprop),MCEP
pass
def test_wav(feature_type, order, delta, neighbours,
emphasis, frame_size, frame_rate):
wpath = '../gitlab/voice-conversion/src/lib/arctic/cmu_us_rms_arctic/wav/arctic_a0001.wav'
fx = FeatureExtractor(feature_type, order, delta, neighbours, emphasis, frame_size, frame_rate)
cur_wav = read_wav(wpath)
cur_gci = None
data, ftr = fx.analyze(cur_wav, cur_gci)
f=open('norm_male.pkl','r')
mins=pickle.load(f)#[24*7:24*7+24]##$
ranges=pickle.load(f)#[24*7:24*7+24]##$
f.close()
if 0: #ann
f=open('dnn_male_1000_100.pkl','r')
dnn=pickle.load(f)
f.close()
x = T.matrix('x') # the data is presented as rasterized images
val = normalize_data(data.value,mins,ranges)
test_set_x=theano.shared(val.astype(np.float32))
test_fprop = theano.function(inputs=[],
outputs=dnn.layers[-1].output,
givens={
dnn.layers[0].input: test_set_x
})
mapped=test_fprop()
mapped=unnormalize_data(mapped,mins,ranges)
elif 1: #gmm
f=open('jdgmm1002_male.pkl')
model=pickle.load(f)
f.close()
val = normalize_data(data.value[:,24*7:24*7+24],mins[24*7:24*7+24],ranges[24*7:24*7+24])
mapped1=model.map(val)
mapped1=unnormalize_data(mapped1,mins,ranges)
mapped = data.value.copy()
mapped[:,24*7:24*7+24] = mapped1
ftr['pit'].value[ftr['pit'].value!=0] = np.linspace(140.0, 100.0, ftr['pit'].value[ftr['pit'].value!=0].shape[0])
new_wav=fx.synthesize(ftr, mapped)
return
def experiment():
if 1: # test
feature_type='MCEP'
order=24
delta=False
neighbours=7
emphasis=0.9##
frame_size= 0.020
frame_rate=0.010
test_wav(feature_type=feature_type, order=order, delta=delta, neighbours=neighbours,
emphasis=emphasis, frame_size= frame_size, frame_rate=frame_rate)
hidden_size = 1000
sentence_num = 100
ae_name = 'ae_'+str(hidden_size)+'_linear_male.pkl'
if 0: # train all TIMIT AE
ae_all(ae_name, hidden_layers_sizes=[1000,500],
corruption_levels=[0.1,0.1],
pretrain_lr=0.1,
batch_size=20,
training_epochs=10)
if 1: # load norm
f=open('norm_male.pkl','r')
mins=pickle.load(f)#[24*7:24*7+24]##$
ranges=pickle.load(f)#[24*7:24*7+24]##$
f.close()
if 1: # load xy20
x20, y20, xv20, yv20, xt20, yt20 = load_xy('../rms2mdl_pre.npy', num_sentences=200, mins=mins, ranges=ranges)
if 1: # load xy
x, y, xv, yv, xt, yt = load_xy('../rms2mdl.npy', num_sentences=sentence_num, mins=mins, ranges=ranges)
model0_pre(x, y, xv, yv, xt, yt, mins, ranges,
hidden_layers_sizes=[x.eval().shape[1], 100, y.eval().shape[1]],
corruption_levels=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
lr=0.1,
batch_size=10,
training_epochs=100)
if 0:
dnn_train(model5_pre_from_siae, ae_name, 'dnn_male_'+str(hidden_size)+'_spk20.pkl',
x20, y20, xv20, yv20, xt20, yt20, mins, ranges,
hidden_layers_sizes=[x20.eval().shape[1], 1000, y20.eval().shape[1]],
middle_layers_sizes=[100],
corruption_levels=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
lr=0.01,
batch_size=10,
training_epochs=100)
if 1:
dnn_train(model5_pre_from_speaker20, ae_name.split('.')[0]+'.jda.pkl', 'dnn_male_'+str(hidden_size)+'_'+str(sentence_num)+'.pkl', x, y, xv, yv, xt, yt, mins, ranges,
hidden_layers_sizes=[x.eval().shape[1], 1000, y.eval().shape[1]],
middle_layers_sizes=[100],
corruption_levels=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
lr=0.1,
batch_size=10,
training_epochs=100)
if __name__ == "__main__":
vcpath = '../gitlab/voice-conversion/src/'
import sys
sys.path.append(vcpath)
from vc import *
experiment() | 38.457991 | 173 | 0.589464 | 8,096 | 60,879 | 4.235301 | 0.067811 | 0.014436 | 0.031759 | 0.008574 | 0.894835 | 0.872437 | 0.859284 | 0.852023 | 0.841465 | 0.832454 | 0 | 0.03333 | 0.29033 | 60,879 | 1,583 | 174 | 38.457991 | 0.760323 | 0.169221 | 0 | 0.791349 | 0 | 0 | 0.040154 | 0.003225 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0.005937 | 0.030534 | null | null | 0.040712 | 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 |
ccfbf9c21f4fde1308d8a879764bf82380637813 | 118 | py | Python | src/deeply/ops/integrations/__init__.py | achillesrasquinha/deeply | fd1ce32da130591fc92df8df89e07f1497b2b902 | [
"MIT"
] | 2 | 2021-10-05T16:37:30.000Z | 2021-10-11T21:31:43.000Z | src/deeply/ops/integrations/__init__.py | achillesrasquinha/deeply | fd1ce32da130591fc92df8df89e07f1497b2b902 | [
"MIT"
] | null | null | null | src/deeply/ops/integrations/__init__.py | achillesrasquinha/deeply | fd1ce32da130591fc92df8df89e07f1497b2b902 | [
"MIT"
] | 1 | 2021-07-16T02:23:37.000Z | 2021-07-16T02:23:37.000Z | from deeply.ops.integrations.wandb import WeightsAndBiases
from deeply.ops.integrations.azure_ml import AzureML | 59 | 63 | 0.830508 | 15 | 118 | 6.466667 | 0.666667 | 0.206186 | 0.268041 | 0.515464 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.118644 | 118 | 2 | 64 | 59 | 0.932692 | 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 |
15c70d1005f38c79ca09b3fc2b99c873567d8d1c | 10,124 | py | Python | tests/system/data.py | dimensigon/dimensigon | 079d7c91a66e10f13510d89844fbadb27e005b40 | [
"Apache-2.0"
] | 2 | 2020-11-20T10:27:14.000Z | 2021-02-21T13:57:56.000Z | tests/system/data.py | dimensigon/dimensigon | 079d7c91a66e10f13510d89844fbadb27e005b40 | [
"Apache-2.0"
] | null | null | null | tests/system/data.py | dimensigon/dimensigon | 079d7c91a66e10f13510d89844fbadb27e005b40 | [
"Apache-2.0"
] | null | null | null | from dimensigon.web.config import Config
data1 = {
'ActionTemplateRepo': [
dict(id='aaaaaaaa-1234-5678-1234-56781234aaa1', name='mkdir', version=1, action_type='SHELL',
code='mkdir {dir}', expected_output=None, expected_rc=None,
system_kwargs={}, data_mark='20190101000530100000'),
dict(id='aaaaaaaa-1234-5678-1234-56781234aaa2', name='rmdir', version=1, action_type='SHELL',
code='rmdir {dir}', expected_output=None, expected_rc=None,
system_kwargs={}, data_mark='20190101000530100000')
],
'StepRepo': [
dict(id='eeeeeeee-1234-5678-1234-56781234eee1', undo=False, stop_on_error=True,
action_template='aaaaaaaa-1234-5678-1234-56781234aaa1',
step_expected_output=None, step_expected_rc=0, step_system_kwargs=None,
data_mark='20190101000530100000'),
dict(id='eeeeeeee-1234-5678-1234-56781234eee2', undo=True, stop_on_error=True,
action_template='aaaaaaaa-1234-5678-1234-56781234aaa2',
step_expected_output=None, step_expected_rc=0, step_system_kwargs=None, data_mark='20190101000530100000')
],
'OrchestrationRepo': [
dict(id='cccccccc-1234-5678-1234-56781234ccc1', name='create folder', version=1,
description='Creates a folder on the specified location',
steps=['eeeeeeee-1234-5678-1234-56781234eee1',
'eeeeeeee-1234-5678-1234-56781234eee2'],
dependencies={'eeeeeeee-1234-5678-1234-56781234eee1': ['eeeeeeee-1234-5678-1234-56781234eee2'],
'eeeeeeee-1234-5678-1234-56781234eee2': []},
data_mark='20190101000530100000')
],
'ServerRepo': [
dict(id='bbbbbbbb-1234-5678-1234-56781234bbb1', name='server1.localdomain', ip='127.0.0.1', port=80, birth=None,
keep_alive=None, available=True, granules=[], route=[], alt_route=[], data_mark='20190101000530100000'),
dict(id='bbbbbbbb-1234-5678-1234-56781234bbb2', name='server2.localdomain', ip='127.0.0.1', port=81, birth=None,
keep_alive=None, available=True, granules=[], route=[], alt_route=[], data_mark='20190101000530100000'),
dict(id='bbbbbbbb-1234-5678-1234-56781234bbb3', name='server3.localdomain', ip='127.0.0.1', port=80, birth=None,
keep_alive=None, available=True, granules=[], route=['bbbbbbbb-1234-5678-1234-56781234bbb2'],
alt_route=[], data_mark='20190101000530100000'),
],
'CatalogRepo': [
dict(entity='ActionTemplate', data_mark='20190101000530100000'),
dict(entity='Step', data_mark='20190101000530100000'),
dict(entity='Orchestration', data_mark='20190101000530100000'),
dict(entity='Server', data_mark='20190101000530100000'),
]
}
data2 = {'ActionTemplateRepo': [
dict(id='aaaaaaaa-1234-5678-1234-56781234aaa1', name='mkdir', version=1, action_type='SHELL',
code='mkdir {dir}', xpected_output=None, expected_rc=None,
system_kwargs={}, data_mark='20190101000532100000'),
dict(id='aaaaaaaa-1234-5678-1234-56781234aaa2', name='rmdir', version=1, action_type='SHELL',
code='rmdir {dir}', expected_output=None, expected_rc=None,
system_kwargs={}, data_mark='20190101000530100000'),
dict(id='aaaaaaaa-1234-5678-1234-56781234aaa3', name='install mysql', version=1, action_type='SHELL',
code='yum install mysql', expected_output=None, expected_rc=None,
system_kwargs={}, data_mark='20190101000531100000'),
dict(id='aaaaaaaa-1234-5678-1234-56781234aaa4', name='start mysql', version=1, action_type='SHELL',
code='service start mysql', expected_output=None, expected_rc=None,
system_kwargs={}, data_mark='20190101000531100000')
],
'StepRepo': [
dict(id='eeeeeeee-1234-5678-1234-56781234eee1', undo=False, stop_on_error=True,
action_template='aaaaaaaa-1234-5678-1234-56781234aaa1',
step_expected_output=None, step_expected_rc=0, step_system_kwargs=None,
data_mark='20190101000530100000'),
dict(id='eeeeeeee-1234-5678-1234-56781234eee2', undo=True, stop_on_error=True,
action_template='aaaaaaaa-1234-5678-1234-56781234aaa2',
step_expected_output=None, step_expected_rc=0, step_system_kwargs=None, data_mark='20190101000530100000'),
dict(id='eeeeeeee-1234-5678-1234-56781234eee3', undo=False, stop_on_error=True,
action_template='aaaaaaaa-1234-5678-1234-56781234aaa3',
step_expected_output=None, step_expected_rc=0, step_parameters={}, step_system_kwargs=None,
data_mark='20190101000532100000'),
dict(id='eeeeeeee-1234-5678-1234-56781234eee4', undo=True, stop_on_error=True,
action_template='aaaaaaaa-1234-5678-1234-56781234aaa4',
step_expected_output=None, step_expected_rc=0, step_parameters={}, step_system_kwargs=None,
data_mark='20190101000533100000')
],
'OrchestrationRepo': [
dict(id='cccccccc-1234-5678-1234-56781234ccc1', name='create folder', version=1,
description='Creates a folder on the specified location',
steps=['eeeeeeee-1234-5678-1234-56781234eee1',
'eeeeeeee-1234-5678-1234-56781234eee2'],
dependencies={'eeeeeeee-1234-5678-1234-56781234eee1': ['eeeeeeee-1234-5678-1234-56781234eee2'],
'eeeeeeee-1234-5678-1234-56781234eee2': []},
data_mark='20190101000530100000'),
dict(id='cccccccc-1234-5678-1234-56781234ccc2', name='create folder', version=1,
description='Creates a folder on the specified location',
steps=['eeeeeeee-1234-5678-1234-56781234eee3',
'eeeeeeee-1234-5678-1234-56781234eee4'],
dependencies={'eeeeeeee-1234-5678-1234-56781234eee3': ['eeeeeeee-1234-5678-1234-56781234eee4'],
'eeeeeeee-1234-5678-1234-56781234eee4': []},
data_mark='20190101000534100000')
],
'ServerRepo': [
dict(id='bbbbbbbb-1234-5678-1234-56781234bbb1', name='server1.localdomain', ip='127.0.0.1', port=80, birth=None,
keep_alive=None, available=True, granules=[], route=[], alt_route=[], data_mark='20190101000530100000'),
dict(id='bbbbbbbb-1234-5678-1234-56781234bbb2', name='server2.localdomain', ip='127.0.0.1', port=81, birth=None,
keep_alive=None, available=True, granules=[], route=[], alt_route=[], data_mark='20190101000530100000'),
dict(id='bbbbbbbb-1234-5678-1234-56781234bbb3', name='server3.localdomain', ip='127.0.0.1', port=80, birth=None,
keep_alive=None, available=True, granules=[], route=[], alt_route=[], data_mark='20190101000530200000'),
],
'CatalogRepo': [
dict(entity='ActionTemplate', data_mark='20190101000532100000'),
dict(entity='Step', data_mark='20190101000533100000'),
dict(entity='Orchestration', data_mark='20190101000534100000'),
dict(entity='Server', data_mark='20190101000530200000'),
]
}
delta = {'ActionTemplateRepo': [
dict(id='aaaaaaaa-1234-5678-1234-56781234aaa1', name='mkdir', version=1, action_type='SHELL',
code='mkdir {dir}', parameters={}, expected_output=None, expected_rc=None,
system_kwargs={}, data_mark='20190101000532100000'),
dict(id='aaaaaaaa-1234-5678-1234-56781234aaa3', name='install mysql', version=1, action_type='SHELL',
code='yum install mysql', parameters={}, expected_output=None, expected_rc=None,
system_kwargs={}, data_mark='20190101000531100000'),
dict(id='aaaaaaaa-1234-5678-1234-56781234aaa4', name='start mysql', version=1, action_type='SHELL',
code='service start mysql', parameters={}, expected_output=None, expected_rc=None,
system_kwargs={}, data_mark='20190101000531100000')
],
'StepRepo': [
dict(id='eeeeeeee-1234-5678-1234-56781234eee3', undo=False, stop_on_error=True,
action_template='aaaaaaaa-1234-5678-1234-56781234aaa3',
step_expected_output=None, step_expected_rc=0, step_parameters={}, step_system_kwargs=None,
data_mark='20190101000532100000'),
dict(id='eeeeeeee-1234-5678-1234-56781234eee4', undo=True, stop_on_error=True,
action_template='aaaaaaaa-1234-5678-1234-56781234aaa4',
step_expected_output=None, step_expected_rc=0, step_parameters={}, step_system_kwargs=None,
data_mark='20190101000533100000')
],
'OrchestrationRepo': [
dict(id='cccccccc-1234-5678-1234-56781234ccc2', name='create folder', version=1,
description='Creates a folder on the specified location',
steps=['eeeeeeee-1234-5678-1234-56781234eee3',
'eeeeeeee-1234-5678-1234-56781234eee4'],
dependencies={'eeeeeeee-1234-5678-1234-56781234eee3': ['eeeeeeee-1234-5678-1234-56781234eee4'],
'eeeeeeee-1234-5678-1234-56781234eee4': []},
data_mark='20190101000534100000')
],
'ServerRepo': [
dict(id='bbbbbbbb-1234-5678-1234-56781234bbb3', name='server3.localdomain', ip='127.0.0.1', port=80, birth=None,
keep_alive=None, available=True, granules=[], route=[], alt_route=[], data_mark='20190101000530200000'),
]
}
class Server1(Config):
DEVELOPMENT = True
DEBUG = True
ENV = 'development'
SERVER_NAME = 'server1.localdomain'
REPOSITORY = 'memory'
DM_DATABASE_CONTENT = data1
# SQLALCHEMY_DATABASE_URI = os.environ.get('DEV_DATABASE_URL') or \
# 'sqlite:///' + os.path.join(basedir, 'data-dev.sqlite')
SQLALCHEMY_DATABASE_URI = None
class Server2(Config):
DEVELOPMENT = True
DEBUG = True
ENV = 'development'
SERVER_NAME = 'server2.localdomain'
REPOSITORY = 'memory'
DM_DATABASE_CONTENT = data2
# SQLALCHEMY_DATABASE_URI = os.environ.get('DEV_DATABASE_URL') or \
# 'sqlite:///' + os.path.join(basedir, 'data-dev.sqlite')
SQLALCHEMY_DATABASE_URI = None
| 59.905325 | 132 | 0.663177 | 1,126 | 10,124 | 5.802842 | 0.111012 | 0.069789 | 0.104683 | 0.085706 | 0.968626 | 0.925467 | 0.898837 | 0.898837 | 0.898837 | 0.882308 | 0 | 0.245329 | 0.19113 | 10,124 | 168 | 133 | 60.261905 | 0.552571 | 0.029139 | 0 | 0.757962 | 0 | 0 | 0.382736 | 0.208876 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.006369 | 0 | 0.10828 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 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 |
15c8c5edc790d64b93c3d37c7e925d6a93601e94 | 24,639 | py | Python | tests/test_hep_tables.py | gordonwatts/hep_tables | 5b3735abded820ce5e8885b662e6985df5c0de09 | [
"MIT"
] | 2 | 2020-04-29T16:51:36.000Z | 2020-05-01T11:26:37.000Z | tests/test_hep_tables.py | gordonwatts/hep_tables | 5b3735abded820ce5e8885b662e6985df5c0de09 | [
"MIT"
] | 32 | 2020-04-27T01:30:43.000Z | 2020-09-13T22:32:43.000Z | tests/test_hep_tables.py | gordonwatts/hep_tables | 5b3735abded820ce5e8885b662e6985df5c0de09 | [
"MIT"
] | null | null | null | from dataframe_expressions import DataFrame
from func_adl_xAOD import ServiceXDatasetSource
import pytest
from servicex import clean_linq
from hep_tables import make_local, xaod_table
from .conftest import extract_selection, translate_linq
@pytest.fixture(autouse=True)
def reset_var_counter_alias():
from dataframe_expressions.alias import _reset_alias_catalog
_reset_alias_catalog()
yield None
_reset_alias_catalog()
def test_create_base(servicex_ds):
f = ServiceXDatasetSource(servicex_ds)
_ = xaod_table(f)
def test_copy_xaod_table_1(servicex_ds):
f = ServiceXDatasetSource(servicex_ds)
x1 = xaod_table(f)
import copy
x2 = copy.deepcopy(x1)
assert x1 is not x2
assert isinstance(x1, xaod_table)
def test_copy_xaod_table_2(servicex_ds):
f = ServiceXDatasetSource(servicex_ds)
x1 = xaod_table(f).jets.pt
import copy
x2 = copy.deepcopy(x1)
assert x1 is not x2
assert isinstance(x1, DataFrame)
def test_collect_pts(servicex_ds):
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = df.jets.pt
a = make_local(seq)
assert a is not None
assert len(a) == 283458
selection = extract_selection(servicex_ds)
txt = translate_linq(f
.Select("lambda e1: e1.jets()")
.Select("lambda e3: e3.Select(lambda e2: e2.pt())")
.AsROOTTTree("file.root", "treeme", ['col1']))
assert clean_linq(selection) == txt
def test_collect_pts_as_call(servicex_ds):
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = df.jets().pt()
a = make_local(seq)
assert a is not None
assert len(a) == 283458
selection = extract_selection(servicex_ds)
txt = translate_linq(f
.Select("lambda e1: e1.jets()")
.Select("lambda e3: e3.Select(lambda e2: e2.pt())")
.AsROOTTTree("file.root", "treeme", ['col1']))
assert clean_linq(selection) == txt
def test_abs_of_data(servicex_ds):
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = abs(df.jets.pt)
a = make_local(seq)
assert a is not None
selection = extract_selection(servicex_ds)
txt = translate_linq(f
.Select("lambda e1: e1.jets()")
.Select("lambda e4: e4.Select(lambda e2: e2.pt())")
.Select("lambda e5: e5.Select(lambda e3: abs(e3))")
.AsROOTTTree("file.root", "treeme", ['col1']))
assert clean_linq(selection) == txt
def test_abs_of_data_with_calls(servicex_ds):
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = abs(df.jets().pt())
a = make_local(seq)
assert a is not None
selection = extract_selection(servicex_ds)
txt = translate_linq(f
.Select("lambda e1: e1.jets()")
.Select("lambda e4: e4.Select(lambda e2: e2.pt())")
.Select("lambda e5: e5.Select(lambda e3: abs(e3))")
.AsROOTTTree("file.root", "treeme", ['col1']))
assert clean_linq(selection) == txt
def test_abs_of_top_leveldata(servicex_ds):
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = abs(df.met)
a = make_local(seq)
assert a is not None
selection = extract_selection(servicex_ds)
txt = translate_linq(f
.Select("lambda e1: e1.met()")
.Select("lambda e2: abs(e2)")
.AsROOTTTree("file.root", "treeme", ['col1']))
assert clean_linq(selection) == txt
def test_collect_xaod_jet_pts(servicex_ds):
'Do this with the actual call we need in ATLAS'
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = df.Jets("AntiKT4").pt
make_local(seq)
selection = extract_selection(servicex_ds)
txt = translate_linq(f
.Select("lambda e1: e1.Jets('AntiKT4')")
.Select("lambda e3: e3.Select(lambda e2: e2.pt())")
.AsROOTTTree("file.root", "treeme", ['col1']))
assert clean_linq(selection) == txt
def test_collect_xaod_ele_pts(servicex_ds):
'Do this with the actual call we need in ATLAS'
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = df.Electrons("Electrons").pt
make_local(seq)
selection = extract_selection(servicex_ds)
txt = translate_linq(f
.Select("lambda e1: e1.Electrons('Electrons')")
.Select("lambda e3: e3.Select(lambda e2: e2.pt())")
.AsROOTTTree("file.root", "treeme", ['col1']))
assert clean_linq(selection) == txt
def test_collect_xaod_call_with_number(servicex_ds):
'Do this with the actual call we need in ATLAS'
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = df.Jets(22.0).pt
make_local(seq)
selection = extract_selection(servicex_ds)
txt = translate_linq(f
.Select("lambda e1: e1.Jets(22.0)")
.Select("lambda e3: e3.Select(lambda e2: e2.pt())")
.AsROOTTTree("file.root", "treeme", ['col1']))
assert clean_linq(selection) == txt
def test_pt_div(servicex_ds):
'Do this with the actual call we need in ATLAS'
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = df.jets.pt / 1000.0
make_local(seq)
selection = extract_selection(servicex_ds)
txt = translate_linq(f
.Select("lambda e1: e1.jets()")
.Select("lambda e4: e4.Select(lambda e2: e2.pt())")
.Select("lambda e5: e5.Select(lambda e3: e3/1000.0)")
.AsROOTTTree("file.root", "treeme", ['col1']))
assert clean_linq(selection) == txt
def test_pt_mult(servicex_ds):
'Do this with the actual call we need in ATLAS'
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = df.jets.pt * 1000.0
make_local(seq)
selection = extract_selection(servicex_ds)
txt = translate_linq(f
.Select("lambda e1: e1.jets()")
.Select("lambda e4: e4.Select(lambda e2: e2.pt())")
.Select("lambda e5: e5.Select(lambda e3: e3 * 1000.0)")
.AsROOTTTree("file.root", "treeme", ['col1']))
assert clean_linq(selection) == txt
def test_pt_add(servicex_ds):
'Do this with the actual call we need in ATLAS'
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = df.jets.pt + 1000.0
make_local(seq)
selection = extract_selection(servicex_ds)
txt = translate_linq(f
.Select("lambda e1: e1.jets()")
.Select("lambda e4: e4.Select(lambda e2: e2.pt())")
.Select("lambda e5: e5.Select(lambda e3: e3 + 1000.0)")
.AsROOTTTree("file.root", "treeme", ['col1']))
assert clean_linq(selection) == txt
def test_pt_sub(servicex_ds):
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = df.jets.pt - 1000.0
make_local(seq)
selection = extract_selection(servicex_ds)
txt = translate_linq(f
.Select("lambda e1: e1.jets()")
.Select("lambda e4: e4.Select(lambda e2: e2.pt())")
.Select("lambda e5: e5.Select(lambda e3: e3 - 1000.0)")
.AsROOTTTree("file.root", "treeme", ['col1']))
assert clean_linq(selection) == txt
def test_pt_good(servicex_ds):
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = df.jets.pt > 1000.0
make_local(seq)
selection = extract_selection(servicex_ds)
txt = translate_linq(f
.Select("lambda e1: e1.jets()")
.Select("lambda e4: e4.Select(lambda e2: e2.pt())")
.Select("lambda e5: e5.Select(lambda e3: e3 > 1000.0)")
.AsROOTTTree("file.root", "treeme", ['col1']))
assert clean_linq(selection) == txt
def test_jet_pt_filter_pts_gt(servicex_ds):
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = df.jets.pt[df.jets.pt > 30.0]
make_local(seq)
selection = extract_selection(servicex_ds)
txt = translate_linq(f
.Select("lambda e1: e1.jets()")
.Select("lambda e5: e5.Select(lambda e2: e2.pt())")
.Select("lambda e6: e6.Where(lambda e3: e3 > 30.0)")
.AsROOTTTree("file.root", "treeme", ['col1']))
assert clean_linq(selection) == txt
def test_filter_lambda(servicex_ds):
def good_jet(pt):
return pt > 30.0
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = df.jets.pt[good_jet]
make_local(seq)
selection = extract_selection(servicex_ds)
txt = translate_linq(f
.Select("lambda e1: e1.jets()")
.Select("lambda e5: e5.Select(lambda e2: e2.pt())")
.Select("lambda e6: e6.Where(lambda e3: e3 > 30.0)")
.AsROOTTTree("file.root", "treeme", ['col1']))
assert clean_linq(selection) == txt
def test_filter_chain(servicex_ds):
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq1 = df.jets[df.jets.pt > 30.0]
seq = seq1[seq1.eta < 2.4].pt
make_local(seq)
selection = extract_selection(servicex_ds)
txt = translate_linq(f
.Select("lambda e1: e1.jets()")
.Select("lambda e6: e6.Where(lambda e3: e3.pt() > 30.0)")
.Select("lambda e7: e7.Where(lambda e4: e4.eta() < 2.4)")
.Select("lambda e5: e5.Select(lambda e2: e2.pt())")
.AsROOTTTree("file.root", "treeme", ['col1']))
assert clean_linq(selection) == txt
def test_filter_and_divide(servicex_ds):
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = df.jets.pt[df.jets.pt > 30.0] / 1000.0
make_local(seq)
selection = extract_selection(servicex_ds)
txt = translate_linq(f
.Select("lambda e1: e1.jets()")
.Select("lambda e6: e6.Select(lambda e2: e2.pt())")
.Select("lambda e7: e7.Where(lambda e3: e3 > 30.0)")
.Select("lambda e8: e8.Select(lambda e5: e5 / 1000.0)")
.AsROOTTTree("file.root", "treeme", ['col1']))
assert clean_linq(selection) == txt
def test_filter_and_divide_with_call(servicex_ds):
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = df.jets().pt[df.jets().pt > 30.0] / 1000.0
make_local(seq)
selection = extract_selection(servicex_ds)
txt = translate_linq(f
.Select("lambda e1: e1.jets()")
.Select("lambda e6: e6.Select(lambda e2: e2.pt())")
.Select("lambda e7: e7.Where(lambda e3: e3 > 30.0)")
.Select("lambda e8: e8.Select(lambda e5: e5 / 1000.0)")
.AsROOTTTree("file.root", "treeme", ['col1']))
assert clean_linq(selection) == txt
def test_jet_pt_filter_pts_ge(servicex_ds):
'Do this with the actual call we need in ATLAS'
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = df.jets.pt[df.jets.pt >= 30.0]
make_local(seq)
selection = extract_selection(servicex_ds)
txt = translate_linq(
f
.Select("lambda e1: e1.jets()")
.Select("lambda e5: e5.Select(lambda e2: e2.pt())")
.Select("lambda e6: e6.Where(lambda e4: e4 >= 30.0)")
.AsROOTTTree("file.root", "treeme", ['col1']))
assert clean_linq(selection) == txt
def test_jet_pt_filter_pts_lt(servicex_ds):
'Do this with the actual call we need in ATLAS'
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = df.jets.pt[df.jets.pt < 30.0]
make_local(seq)
selection = extract_selection(servicex_ds)
txt = translate_linq(f
.Select("lambda e1: e1.jets()")
.Select("lambda e5: e5.Select(lambda e2: e2.pt())")
.Select("lambda e6: e6.Where(lambda e4: e4 < 30.0)")
.AsROOTTTree("file.root", "treeme", ['col1']))
assert clean_linq(selection) == txt
def test_jet_pt_filter_pts_le(servicex_ds):
'Do this with the actual call we need in ATLAS'
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = df.jets.pt[df.jets.pt <= 30.0]
make_local(seq)
selection = extract_selection(servicex_ds)
txt = translate_linq(
f
.Select("lambda e1: e1.jets()")
.Select("lambda e5: e5.Select(lambda e2: e2.pt())")
.Select("lambda e6: e6.Where(lambda e4: e4 <= 30.0)")
.AsROOTTTree("file.root", "treeme", ['col1']))
assert clean_linq(selection) == txt
def test_jet_pt_filter_pts_eq(servicex_ds):
'Do this with the actual call we need in ATLAS'
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = df.jets.pt[df.jets.pt == 30.0]
make_local(seq)
selection = extract_selection(servicex_ds)
txt = translate_linq(
f
.Select("lambda e1: e1.jets()")
.Select("lambda e5: e5.Select(lambda e2: e2.pt())")
.Select("lambda e6: e6.Where(lambda e4: e4 == 30.0)")
.AsROOTTTree("file.root", "treeme", ['col1']))
assert clean_linq(selection) == txt
def test_jet_pt_filter_pts_ne(servicex_ds):
'Do this with the actual call we need in ATLAS'
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = df.jets.pt[df.jets.pt != 30.0]
make_local(seq)
selection = extract_selection(servicex_ds)
txt = translate_linq(
f
.Select("lambda e1: e1.jets()")
.Select("lambda e5: e5.Select(lambda e2: e2.pt())")
.Select("lambda e6: e6.Where(lambda e4: e4 != 30.0)")
.AsROOTTTree("file.root", "treeme", ['col1']))
assert clean_linq(selection) == txt
def test_filter_jet_objects(servicex_ds):
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = df.jets[df.jets.pt > 30].pt
make_local(seq)
selection = extract_selection(servicex_ds)
txt = translate_linq(
f
.Select("lambda e1: e1.jets()")
.Select("lambda e7: e7.Where(lambda e2: e2.pt() > 30)")
.Select("lambda e8: e8.Select(lambda e6: e6.pt())")
.AsROOTTTree("file.root", "treeme", ['col1']))
assert clean_linq(selection) == txt
def test_filter_jet_by_attribute(servicex_ds):
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = df.jets[df.jets.hasProdVtx].pt
make_local(seq)
selection = extract_selection(servicex_ds)
txt = translate_linq(
f
.Select("lambda e1: e1.jets()")
.Select("lambda e7: e7.Where(lambda e2: e2.hasProdVtx())")
.Select("lambda e8: e8.Select(lambda e6: e6.pt())")
.AsROOTTTree("file.root", "treeme", ['col1']))
assert clean_linq(selection) == txt
def test_filter_jet_by_attributes(servicex_ds):
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = df.jets[df.jets.hasProdVtx & df.jets.hasDecayVtx].pt
make_local(seq)
selection = extract_selection(servicex_ds)
txt = translate_linq(
f
.Select("lambda e1: e1.jets()")
.Select("lambda e7: e7.Where(lambda e2: e2.hasProdVtx() and e2.hasDecayVtx())")
.Select("lambda e8: e8.Select(lambda e6: e6.pt())")
.AsROOTTTree("file.root", "treeme", ['col1']))
assert clean_linq(selection) == txt
def test_filter_and(servicex_ds):
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = df.jets[(df.jets.pt > 30.0) & (df.jets.pt > 40.0)].pt
make_local(seq)
selection = extract_selection(servicex_ds)
txt = translate_linq(
f
.Select("lambda e1: e1.jets()")
.Select("lambda e9: e9.Where(lambda e7: (e7.pt() > 30.0) and (e7.pt() > 40.0))")
.Select("lambda e10: e10.Select(lambda e8: e8.pt())")
.AsROOTTTree("file.root", "treeme", ['col1']))
assert clean_linq(selection) == txt
def test_filter_or(servicex_ds):
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = df.jets[(df.jets.pt > 30.0) | (df.jets.pt > 40.0)].pt
make_local(seq)
selection = extract_selection(servicex_ds)
txt = translate_linq(
f
.Select("lambda e1: e1.jets()")
.Select("lambda e9: e9.Where(lambda e7: (e7.pt() > 30.0) or (e7.pt() > 40.0))")
.Select("lambda e10: e10.Select(lambda e8: e8.pt())")
.AsROOTTTree("file.root", "treeme", ['col1']))
assert clean_linq(selection) == txt
def test_filter_not(servicex_ds):
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = df.jets[~(df.jets.pt > 30.0)].pt
make_local(seq)
selection = extract_selection(servicex_ds)
txt = translate_linq(
f
.Select("lambda e1: e1.jets()")
.Select("lambda e9: e9.Where(lambda e7: not (e7.pt() > 30.0))")
.Select("lambda e10: e10.Select(lambda e8: e8.pt())")
.AsROOTTTree("file.root", "treeme", ['col1']))
assert clean_linq(selection) == txt
def test_filter_and_abs(servicex_ds):
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = df.jets[(df.jets.pt > 30.0) & (abs(df.jets.eta) < 2.5)].pt
make_local(seq)
selection = extract_selection(servicex_ds)
txt = translate_linq(
f
.Select("lambda e1: e1.jets()")
.Select("lambda e10: e10.Where(lambda e8: (e8.pt() > 30.0) and (abs(e8.eta()) < 2.5))")
.Select("lambda e11: e11.Select(lambda e9: e9.pt())")
.AsROOTTTree("file.root", "treeme", ['col1']))
assert clean_linq(selection) == txt
def test_binop_in_filter(servicex_ds):
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = df.jets[(df.jets.pt / 1000.0) > 30].pt
make_local(seq)
selection = extract_selection(servicex_ds)
txt = translate_linq(
f
.Select("lambda e1: e1.jets()")
.Select("lambda e7: e7.Where(lambda e5: e5.pt()/1000.0 > 30)")
.Select("lambda e8: e8.Select(lambda e6: e6.pt())")
.AsROOTTTree("file.root", "treeme", ['col1']))
assert clean_linq(selection) == txt
def test_count_of_events(servicex_ds):
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = df.Count()
with pytest.raises(Exception) as e:
make_local(seq)
assert 'Count' in str(e.value)
def test_count_of_objects(servicex_ds):
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = df.jets.Count()
make_local(seq)
selection = extract_selection(servicex_ds)
txt = translate_linq(
f
.Select("lambda e1: e1.jets()")
.Select("lambda e2: e2.Count()")
.AsROOTTTree("file.root", "treeme", ['col1']))
assert clean_linq(selection) == txt
def test_count_of_values(servicex_ds):
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = df.jets.pt.Count()
make_local(seq)
selection = extract_selection(servicex_ds)
txt = translate_linq(
f
.Select("lambda e1: e1.jets()")
.Select("lambda e4: e4.Select(lambda e2: e2.pt())")
.Select("lambda e3: e3.Count()")
.AsROOTTTree("file.root", "treeme", ['col1']))
assert clean_linq(selection) == txt
def test_count_at_eventLevel(servicex_ds):
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = df[df.jets.Count() == 2].jets.pt
make_local(seq)
selection = extract_selection(servicex_ds)
txt = translate_linq(
f
.Where("lambda e4: e4.jets().Count() == 2")
.Select("lambda e5: e5.jets()")
.Select("lambda e7: e7.Select(lambda e6: e6.pt())")
.AsROOTTTree("file.root", "treeme", ['col1']))
assert clean_linq(selection) == txt
def test_first_at_object_level(servicex_ds):
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = df.jets.First().pt
make_local(seq)
selection = extract_selection(servicex_ds)
txt = translate_linq(
f
.Select("lambda e5: e5.jets()")
.Select("lambda e7: e7.First()")
.Select("lambda e8: e8.pt()")
.AsROOTTTree("file.root", "treeme", ['col1']))
assert clean_linq(selection) == txt
def test_first_at_leaf_level(servicex_ds):
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = df.jets.pt.First()
make_local(seq)
selection = extract_selection(servicex_ds)
txt = translate_linq(
f
.Select("lambda e5: e5.jets()")
.Select("lambda e7: e7.Select(lambda e4: e4.pt())")
.Select("lambda e9: e9.First()")
.AsROOTTTree("file.root", "treeme", ['col1']))
assert clean_linq(selection) == txt
def test_make_local_twice(servicex_ds):
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = df.jets.pt
make_local(seq)
json_1 = clean_linq(extract_selection(servicex_ds))
make_local(seq)
json_2 = clean_linq(extract_selection(servicex_ds))
assert json_1 == json_2
def test_make_local_twice_check_test(servicex_ds):
# Make sure this method of testing continues to work
# references and dicts in python are funny!
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = df.jets.pt
make_local(seq)
json_1 = clean_linq(extract_selection(servicex_ds))
make_local(seq / 1000.0)
json_2 = clean_linq(extract_selection(servicex_ds))
assert json_1 != json_2
def test_make_local_twice_filter(servicex_ds):
f = ServiceXDatasetSource(servicex_ds)
df = xaod_table(f)
seq = df.jets[df.jets.pt > 30].pt
make_local(seq)
json_1 = clean_linq(extract_selection(servicex_ds))
make_local(seq)
json_2 = clean_linq(extract_selection(servicex_ds))
assert json_1 == json_2
# def test_count_in_nested_filter(servicex_ds):
# df = xaod_table(f)
# seq1 = df.jets[df.jets.pt > 20000.0]
# seq2 = seq1.jets[seq1.Count() == 2].pt
# make_local(seq2)
# selection = extract_selection(servicex_ds)
# txt = translate_linq(
# f
# .Select("lambda e1: e1.jets()")
# .Where("lambda e8: e8.Select(lambda e9: e9.pt() > 20000.0)")
# .Where("lambda e8: e8.Count() == 2")
# .Select("lambda e2: e2.Select(lambda e3: e3.pt())")
# .AsROOTTTree("file.root", "treeme", ['col1']))
# assert clean_linq(selection) == txt
# def test_math_func_in_filter(servicex_ds):
# df = xaod_table(f)
# seq = df.jets[abs(df.jets.eta) < 2.5].pt
# make_local(seq)
# selection = extract_selection(servicex_ds)
# txt = translate_linq(
# f
# .Select("lambda e1: e1.jets()")
# .Select("lambda e7: e7.Where(lambda e5: abs(e5.eta()) < 2.5)")
# .Select("lambda e8: e8.Select(lambda e6: e6.pt())")
# .AsROOTTTree("file.root", "treeme", ['col1']))
# assert clean_linq(selection) == txt
# def test_filter_on_single_object():
# df = xaod_table(f)
# seq = df[df.met > 30.0].jets.pt
# # make_local(seq)
# assert False
# def test_count_in_simple_filter(servicex_ds):
# df = xaod_table(f)
# seq = df.jets.pt[df.jets.pt.Count() == 2]
# make_local(seq)
# selection = extract_selection(servicex_ds)
# txt = translate_linq(
# f
# .Select("lambda e1: e1.jets()")
# .Select("lambda e6: e6.Select(lambda e2: e2.pt())")
# .Where("lambda e5: e5.Count() == 2")
# .AsROOTTTree("file.root", "treeme", ['col1']))
# assert clean_linq(selection) == txt
# def test_count_in_called_filter(servicex_ds):
# Commented out b.c. we are trying to filter at the event level, which is not making sense
# here. The result is not correct here and is more complex.
# df = xaod_table(f)
# seq = df.jets[df.jets.pt.Count() == 2].pt
# make_local(seq)
# selection = extract_selection(servicex_ds)
# txt = translate_linq(
# f
# .Select("lambda e1: e1.jets()")
# .Where("lambda e5: e5.Select(lambda e6: e6.pt()).Count() == 2")
# .Select("lambda e8: e8.Select(lambda e7: e7.pt())")
# .AsROOTTTree("file.root", "treeme", ['col1']))
# assert clean_linq(selection) == txt
| 35.451799 | 95 | 0.605098 | 3,269 | 24,639 | 4.386357 | 0.05598 | 0.133901 | 0.033475 | 0.083409 | 0.901527 | 0.88751 | 0.880745 | 0.878653 | 0.877607 | 0.876491 | 0 | 0.038371 | 0.255368 | 24,639 | 694 | 96 | 35.502882 | 0.743173 | 0.116482 | 0 | 0.714556 | 0 | 0.007561 | 0.214045 | 0.001125 | 0 | 0 | 0 | 0 | 0.096408 | 1 | 0.085066 | false | 0 | 0.017013 | 0.00189 | 0.10397 | 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 |
d6f356bb5c962f26f7e15d1eaaaef88e61d959ad | 15,736 | py | Python | single_level.py | NicholasBermuda/multilevelRBF | 23059d3bf0df99724843fb8753b42233a1a872e6 | [
"MIT"
] | null | null | null | single_level.py | NicholasBermuda/multilevelRBF | 23059d3bf0df99724843fb8753b42233a1a872e6 | [
"MIT"
] | null | null | null | single_level.py | NicholasBermuda/multilevelRBF | 23059d3bf0df99724843fb8753b42233a1a872e6 | [
"MIT"
] | null | null | null | import numpy as np
import time
from rbf import rbf_2_mat
from quadrature import gauleg
from build_mat import build_2d_neumann_problem, build_2d_dirichlet_problem
import matplotlib.pyplot as plt
from matplotlib import cm
from mpl_toolkits.mplot3d import Axes3D
def homogeneous_dirichlet():
start = time.time()
bdy = [-1., 1., -1., 1.]
# generate the centres -- this can easily be changed for different rectangular domains
# needs more thought for non-rectangles!
N = 17
xcentres, ycentres = np.meshgrid(np.linspace(bdy[0], bdy[1], N),np.linspace(bdy[2], bdy[3], N))
xcentres = xcentres.reshape(N*N,)
ycentres = ycentres.reshape(N*N,)
# forcing term
f = lambda x, y: np.sin(np.pi*x)*np.sin(np.pi*y)
# use Gauss-Legendre quadrature to integrate overlapping supports:
# faster to generate the pts and weights just once and shift/scale as needed
# could pick a different number of points depending on accuracy needed
pts, weights = gauleg(30) # number related to no. of basis funcs/support radius
# rethink number of points as we do multilevel
# pick a value for delta
delta = 0.7
homog_bc = lambda x, y: 0.0
# homog_bc = lambda x, y: np.sin(np.pi*x)*np.sin(np.pi*y)/(2*np.pi**2 + 1)
# make the full A
# print('Not yet implemented')
# raise Exception
A_mat, rhs_vec = build_2d_dirichlet_problem(N, xcentres, ycentres, pts, weights, f, delta, homog_bc)
A_mat_full = A_mat + A_mat.transpose() - np.diag(np.diag(A_mat))
# and solve the linear system
c = np.linalg.solve(A_mat_full, rhs_vec)
print('Condition number of stiffness matrix is {:.3E}'.format(np.linalg.cond(A_mat_full)))
# exact solution lambda function
u = lambda x, y: np.sin(np.pi*x)*np.sin(np.pi*y)/(2*np.pi**2 + 1) # vectorised
# evaluate the solution at a set of points
test_pt_ct = 40
x_test_pts_g, y_test_pts_g = np.meshgrid(np.linspace(bdy[0], bdy[1], test_pt_ct), np.linspace(bdy[2], bdy[3], test_pt_ct))
x_test_pts = x_test_pts_g.reshape(test_pt_ct**2,)
y_test_pts = y_test_pts_g.reshape(test_pt_ct**2,)
exact_sol = u(x_test_pts, y_test_pts).reshape((test_pt_ct**2,))
# evaluate the basis functions and numerical soln at the same set of points
RBF_vals = rbf_2_mat(delta, x_test_pts, y_test_pts, xcentres.reshape((N*N,)), ycentres.reshape((N*N,)))
numerical_sol = np.dot(RBF_vals, c)
rms_err = (exact_sol - numerical_sol)
rms_err_m = rms_err.reshape((test_pt_ct, test_pt_ct))
# find the error in the numerical solutions
print('RMS Error = {:.6E}'.format(np.linalg.norm(exact_sol - numerical_sol, 2) / test_pt_ct))
print('Maximum Error = {:.6E}'.format(np.linalg.norm(exact_sol - numerical_sol, np.inf)))
print('Total time taken was {:.3f} seconds'.format(time.time() - start))
# should move the following to a plotting module
fig = plt.figure()
ax = fig.add_subplot(1, 2, 1, projection='3d')
# plt.plot(xcentres, ycentres,[0]*N*N,'k*')
surf = ax.plot_surface(x_test_pts_g, y_test_pts_g,
numerical_sol.reshape((test_pt_ct,test_pt_ct)), cmap = cm.coolwarm,
linewidth=0, antialiased=False)
fig.colorbar(surf, shrink=0.5, aspect=5)
ax = fig.add_subplot(1, 2, 2, projection='3d')
errsurf = ax.plot_surface(x_test_pts_g, y_test_pts_g,
rms_err.reshape((test_pt_ct,test_pt_ct)), cmap = cm.coolwarm,
linewidth=0, antialiased=False)
fig.colorbar(errsurf, shrink=0.5, aspect=5)
plt.savefig('helmholtz_test.eps', format='eps', dpi=1000)
plt.show()
fig = plt.figure()
ax = fig.add_subplot(1, 2, 2)
ax.set_title('Error: Exact - Numerical')
errconts = plt.contourf(x_test_pts_g, y_test_pts_g, rms_err_m,15, cmap = cm.BrBG)
fig.colorbar(errconts, shrink=0.5, aspect=5)
ax = fig.add_subplot(1,2,1)
ax.set_title('Numerical Solution')
conts = plt.contourf(x_test_pts_g, y_test_pts_g, numerical_sol.reshape((test_pt_ct,test_pt_ct)),15,cmap=cm.viridis)
fig.colorbar(conts, shrink=0.5, aspect=5)
plt.show()
return
def inhomogeneous_dirichlet():
start = time.time()
# choose a different boundary for testing
bdy = (-1./2, 1./2, -1./2, 1./2)
# and use the solution as boundary condition -- this works fine for testing
def inhomog_bc(x, y):
return np.sin(np.pi*x)*np.sin(np.pi*y)/(2*np.pi**2 + 1)
# generate the centres -- this can easily be changed for different rectangular domains
# needs more thought for non-rectangles!
N = 17
xcentres, ycentres = np.meshgrid(np.linspace(bdy[0], bdy[1], N), np.linspace(bdy[2], bdy[3], N))
xcentres = xcentres.reshape(N*N,)
ycentres = ycentres.reshape(N*N,)
# forcing term
f = lambda x, y: np.sin(np.pi*x)*np.sin(np.pi*y)
# use Gauss-Legendre quadrature to integrate overlapping supports:
# faster to generate the pts and weights just once and shift/scale as needed
# could pick a different number of points depending on accuracy needed
pts, weights = gauleg(30) # number related to no. of basis funcs/support radius
# rethink number of points as we do multilevel
# pick a value for delta
delta = 1.183
# make the full A
# print('Not yet implemented')
# raise Exception
A_mat, rhs_vec = build_2d_dirichlet_problem(N, xcentres, ycentres, pts, weights, f, delta, inhomog_bc)
A_mat_full = A_mat + A_mat.transpose() - np.diag(np.diag(A_mat))
# and solve the linear system
c = np.linalg.solve(A_mat_full, rhs_vec)
print('Condition number of stiffness matrix is {:.3E}'.format(np.linalg.cond(A_mat_full)))
# exact solution lambda function
u = lambda x, y: np.sin(np.pi*x)*np.sin(np.pi*y)/(2*np.pi**2 + 1) # vectorised
# evaluate the solution at a set of points
test_pt_ct = 40
x_test_pts_g, y_test_pts_g = np.meshgrid(np.linspace(bdy[0], bdy[1], test_pt_ct), np.linspace(bdy[2], bdy[3], test_pt_ct))
x_test_pts = x_test_pts_g.reshape(test_pt_ct**2,)
y_test_pts = y_test_pts_g.reshape(test_pt_ct**2,)
exact_sol = u(x_test_pts, y_test_pts).reshape((test_pt_ct**2,))
# evaluate the basis functions and numerical soln at the same set of points
RBF_vals = rbf_2_mat(delta, x_test_pts, y_test_pts, xcentres.reshape((N*N,)), ycentres.reshape((N*N,)))
numerical_sol = np.dot(RBF_vals, c)
rms_err = (exact_sol - numerical_sol)
rms_err_m = rms_err.reshape((test_pt_ct, test_pt_ct))
# find the error in the numerical solutions
print('RMS Error = {:.6E}'.format(np.linalg.norm(exact_sol - numerical_sol, 2) / test_pt_ct))
print('Maximum Error = {:.6E}'.format(np.linalg.norm(exact_sol - numerical_sol, np.inf)))
print('Total time taken was {:.3f} seconds'.format(time.time() - start))
# should move the following to a plotting module
fig = plt.figure()
ax = fig.add_subplot(1, 2, 1, projection='3d')
# plt.plot(xcentres, ycentres,[0]*N*N,'k*')
surf = ax.plot_surface(x_test_pts_g, y_test_pts_g,
numerical_sol.reshape((test_pt_ct,test_pt_ct)), cmap = cm.coolwarm,
linewidth=0, antialiased=False)
fig.colorbar(surf, shrink=0.5, aspect=5)
ax = fig.add_subplot(1, 2, 2, projection='3d')
errsurf = ax.plot_surface(x_test_pts_g, y_test_pts_g,
rms_err.reshape((test_pt_ct,test_pt_ct)), cmap = cm.coolwarm,
linewidth=0, antialiased=False)
fig.colorbar(errsurf, shrink=0.5, aspect=5)
plt.savefig('helmholtz_test.eps', format='eps', dpi=1000)
plt.show()
fig = plt.figure()
ax = fig.add_subplot(1, 2, 2)
ax.set_title('Error: Exact - Numerical')
errconts = plt.contourf(x_test_pts_g, y_test_pts_g, rms_err_m,15, cmap = cm.BrBG)
fig.colorbar(errconts, shrink=0.5, aspect=5)
ax = fig.add_subplot(1,2,1)
ax.set_title('Numerical Solution')
conts = plt.contourf(x_test_pts_g, y_test_pts_g, numerical_sol.reshape((test_pt_ct,test_pt_ct)),15,cmap=cm.viridis)
fig.colorbar(conts, shrink=0.5, aspect=5)
plt.show()
return
def inhomogeneous_neumann():
start = time.time()
bdy = [-1.0, 1.0, -1.0, 1.0]
# this is a bc for a unit square
def bc(x, y, which):
factor = np.pi/(2*np.pi**2 + 1)
if which == 0.0 or which == 2.0: # bottom and left
sign = 1.
else: # top and right
sign = -1.
if which == 2. or which == 3.: # bottom and top
val = y
else:
val = x
return sign*factor*np.sin(np.pi*val)
# generate the centres -- this can easily be changed for different rectangular domains
# needs more thought for non-rectangles!
N = 17
xcentres, ycentres = np.meshgrid(np.linspace(bdy[0], bdy[1], N),np.linspace(bdy[2], bdy[3], N))
xcentres = xcentres.reshape(N*N,)
ycentres = ycentres.reshape(N*N,)
# forcing term
f = lambda x, y: np.cos(np.pi * x) * np.cos(np.pi * y)
# use Gauss-Legendre quadrature to integrate overlapping supports:
# faster to generate the pts and weights just once and shift/scale as needed
# could pick a different number of points depending on accuracy needed
pts, weights = gauleg(30) # number related to no. of basis funcs/support radius
# rethink number of points as we do multilevel
# pick a value for delta
delta = 1.183
# make the full A
A_mat, rhs_vec = build_2d_neumann_problem(N, xcentres, ycentres, pts, weights, f, delta, bc, bdy)
A_mat_full = A_mat + A_mat.transpose() - np.diag(np.diag(A_mat))
# and solve the linear system
c = np.linalg.solve(A_mat_full, rhs_vec)
print('Condition number of stiffness matrix is {:.3E}'.format(np.linalg.cond(A_mat_full)))
# exact solution lambda function
u = lambda x, y: np.cos(np.pi*x)*np.cos(np.pi*y)/(2*np.pi**2 + 1) # vectorised
# evaluate the solution at a set of points
test_pt_ct = 40
x_test_pts_g, y_test_pts_g = np.meshgrid(np.linspace(bdy[0], bdy[1], test_pt_ct), np.linspace(bdy[2], bdy[3], test_pt_ct))
x_test_pts = x_test_pts_g.reshape(test_pt_ct**2,)
y_test_pts = y_test_pts_g.reshape(test_pt_ct**2,)
exact_sol = u(x_test_pts, y_test_pts).reshape((test_pt_ct**2,))
# evaluate the basis functions and numerical soln at the same set of points
RBF_vals = rbf_2_mat(delta, x_test_pts, y_test_pts, xcentres.reshape((N*N,)), ycentres.reshape((N*N,)))
numerical_sol = np.dot(RBF_vals, c)
rms_err = (exact_sol - numerical_sol)
rms_err_m = rms_err.reshape((test_pt_ct, test_pt_ct))
# find the error in the numerical solutions
print('RMS Error = {:.6E}'.format(np.linalg.norm(exact_sol - numerical_sol, 2) / test_pt_ct))
print('Maximum Error = {:.6E}'.format(np.linalg.norm(exact_sol - numerical_sol, np.inf)))
print('Total time taken was {:.3f} seconds'.format(time.time() - start))
# should move the following to a plotting module
fig = plt.figure()
ax = fig.add_subplot(1, 2, 1, projection='3d')
# plt.plot(xcentres, ycentres,[0]*N*N,'k*')
surf = ax.plot_surface(x_test_pts_g, y_test_pts_g,
numerical_sol.reshape((test_pt_ct,test_pt_ct)), cmap = cm.coolwarm,
linewidth=0, antialiased=False)
fig.colorbar(surf, shrink=0.5, aspect=5)
ax = fig.add_subplot(1, 2, 2, projection='3d')
errsurf = ax.plot_surface(x_test_pts_g, y_test_pts_g,
rms_err.reshape((test_pt_ct,test_pt_ct)), cmap = cm.coolwarm,
linewidth=0, antialiased=False)
fig.colorbar(errsurf, shrink=0.5, aspect=5)
plt.savefig('helmholtz_test.eps', format='eps', dpi=1000)
plt.show()
fig = plt.figure()
ax = fig.add_subplot(1, 2, 2)
ax.set_title('Error: Exact - Numerical')
errconts = plt.contourf(x_test_pts_g, y_test_pts_g, rms_err_m,15, cmap = cm.BrBG)
fig.colorbar(errconts, shrink=0.5, aspect=5)
ax = fig.add_subplot(1,2,1)
ax.set_title('Numerical Solution')
conts = plt.contourf(x_test_pts_g, y_test_pts_g, numerical_sol.reshape((test_pt_ct,test_pt_ct)),15,cmap=cm.viridis)
fig.colorbar(conts, shrink=0.5, aspect=5)
plt.show()
return
def homogeneous_neumann():
start = time.time()
bdy = [-1., 1., -1., 1.]
# generate the centres -- this can easily be changed for different rectangular domains
# needs more thought for non-rectangles!
N = 17
xcentres, ycentres = np.meshgrid(np.linspace(-1, 1, N),np.linspace(-1, 1, N))
xcentres = xcentres.reshape(N*N,)
ycentres = ycentres.reshape(N*N,)
# forcing term
f = lambda x, y: np.cos(np.pi * x) * np.cos(np.pi * y)
# use Gauss-Legendre quadrature to integrate overlapping supports:
# faster to generate the pts and weights just once and shift/scale as needed
# could pick a different number of points depending on accuracy needed
pts, weights = gauleg(30) # number related to no. of basis funcs/support radius
# rethink number of points as we do multilevel
# pick a value for delta
delta = 1.183
# make the full A
A_mat, rhs_vec = build_2d_neumann_problem(N, xcentres, ycentres, pts, weights, f, delta)
A_mat_full = A_mat + A_mat.transpose() - np.diag(np.diag(A_mat))
# and solve the linear system
c = np.linalg.solve(A_mat_full, rhs_vec)
print('Condition number of stiffness matrix is {:.3E}'.format(np.linalg.cond(A_mat_full)))
# exact solution lambda function
u = lambda x, y: np.cos(np.pi*x)*np.cos(np.pi*y)/(2*np.pi**2 + 1) # vectorised
# evaluate the solution at a set of points
test_pt_ct = 40
x_test_pts_g, y_test_pts_g = np.meshgrid(np.linspace(bdy[0], bdy[1], test_pt_ct), np.linspace(bdy[2], bdy[3], test_pt_ct))
x_test_pts = x_test_pts_g.reshape(test_pt_ct**2,)
y_test_pts = y_test_pts_g.reshape(test_pt_ct**2,)
exact_sol = u(x_test_pts, y_test_pts).reshape((test_pt_ct**2,))
# evaluate the basis functions and numerical soln at the same set of points
RBF_vals = rbf_2_mat(delta, x_test_pts, y_test_pts, xcentres.reshape((N*N,)), ycentres.reshape((N*N,)))
numerical_sol = np.dot(RBF_vals, c)
rms_err = (exact_sol - numerical_sol)
rms_err_m = rms_err.reshape((test_pt_ct, test_pt_ct))
# find the error in the numerical solutions
print('RMS Error = {:.6E}'.format(np.linalg.norm(exact_sol - numerical_sol, 2) / test_pt_ct))
print('Maximum Error = {:.6E}'.format(np.linalg.norm(exact_sol - numerical_sol, np.inf)))
print('Total time taken was {:.3f} seconds'.format(time.time() - start))
# should move the following to a plotting module
fig = plt.figure()
ax = fig.add_subplot(1, 2, 1, projection='3d')
# plt.plot(xcentres, ycentres,[0]*N*N,'k*')
surf = ax.plot_surface(x_test_pts_g, y_test_pts_g,
numerical_sol.reshape((test_pt_ct,test_pt_ct)), cmap = cm.coolwarm,
linewidth=0, antialiased=False)
fig.colorbar(surf, shrink=0.5, aspect=5)
ax = fig.add_subplot(1, 2, 2, projection='3d')
errsurf = ax.plot_surface(x_test_pts_g, y_test_pts_g,
rms_err.reshape((test_pt_ct,test_pt_ct)), cmap = cm.coolwarm,
linewidth=0, antialiased=False)
fig.colorbar(errsurf, shrink=0.5, aspect=5)
plt.savefig('helmholtz_test.eps', format='eps', dpi=1000)
plt.show()
fig = plt.figure()
ax = fig.add_subplot(1, 2, 2)
ax.set_title('Error: Exact - Numerical')
errconts = plt.contourf(x_test_pts_g, y_test_pts_g, rms_err_m,15, cmap = cm.BrBG)
fig.colorbar(errconts, shrink=0.5, aspect=5)
ax = fig.add_subplot(1,2,1)
ax.set_title('Numerical Solution')
conts = plt.contourf(x_test_pts_g, y_test_pts_g, numerical_sol.reshape((test_pt_ct,test_pt_ct)),15,cmap=cm.viridis)
fig.colorbar(conts, shrink=0.5, aspect=5)
plt.show()
return
if __name__ == '__main__':
inhomogeneous_dirichlet()
| 41.962667 | 126 | 0.676792 | 2,662 | 15,736 | 3.805409 | 0.08565 | 0.049753 | 0.047384 | 0.041461 | 0.939783 | 0.935439 | 0.930898 | 0.930898 | 0.930898 | 0.930898 | 0 | 0.024982 | 0.19109 | 15,736 | 374 | 127 | 42.074866 | 0.770838 | 0.225216 | 0 | 0.850877 | 0 | 0 | 0.062784 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.026316 | false | 0 | 0.035088 | 0.004386 | 0.087719 | 0.070175 | 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 |
ba4fe4adde0377b6682570916f6d1b966fc7e6be | 24,001 | py | Python | tests/test_gostsignature.py | drobotun/gostcrypto | 1590311620d6d03d1d8e1b6abe1966da4c8550ed | [
"MIT"
] | 7 | 2020-09-14T16:35:29.000Z | 2022-01-12T17:41:29.000Z | tests/test_gostsignature.py | drobotun/gostcrypto | 1590311620d6d03d1d8e1b6abe1966da4c8550ed | [
"MIT"
] | 1 | 2020-09-14T16:35:17.000Z | 2020-09-15T17:42:01.000Z | tests/test_gostsignature.py | drobotun/gostcrypto | 1590311620d6d03d1d8e1b6abe1966da4c8550ed | [
"MIT"
] | 3 | 2020-04-14T22:10:09.000Z | 2021-03-29T09:11:34.000Z | import unittest
import os
import pytest
from unittest import mock
import gostcrypto
from gostcrypto.utils import bytearray_to_int
from gostcrypto.utils import int_to_bytearray
from gostcrypto.gostsignature import GOSTSignatureError
TEST_CURVE = {
'id-tc26-gost-3410-2012-256-paramSetTest':dict(
p=bytearray_to_int(bytearray.fromhex('8000000000000000000000000000000000000000000000000000000000000431')),
a=0x07,
b=bytearray_to_int(bytearray.fromhex('5fbff498aa938ce739b8e022fbafef40563f6e6a3472fc2a514c0ce9dae23b7e')),
m=bytearray_to_int(bytearray.fromhex('8000000000000000000000000000000150fe8a1892976154c59cfc193accf5b3')),
q=bytearray_to_int(bytearray.fromhex('8000000000000000000000000000000150fe8a1892976154c59cfc193accf5b3')),
x=0x02,
y=bytearray_to_int(bytearray.fromhex('08e2a8a0e65147d4bd6316030e16d19c85c97f0a9ca267122b96abbcea7e8fc8'))
),
'id-tc26-gost-3410-2012-256-paramSetTest_raises_1':dict(
p=bytearray_to_int(bytearray.fromhex('8000000000000000000000000000000150fe8a1892976154c59cfc193accf5b3')),
a=0x07,
b=bytearray_to_int(bytearray.fromhex('5fbff498aa938ce739b8e022fbafef40563f6e6a3472fc2a514c0ce9dae23b7e')),
m=bytearray_to_int(bytearray.fromhex('8000000000000000000000000000000150fe8a1892976154c59cfc193accf5b3')),
q=bytearray_to_int(bytearray.fromhex('8000000000000000000000000000000150fe8a1892976154c59cfc193accf5b3')),
x=0x02,
y=bytearray_to_int(bytearray.fromhex('08e2a8a0e65147d4bd6316030e16d19c85c97f0a9ca267122b96abbcea7e8fc8'))
),
'id-tc26-gost-3410-2012-256-paramSetTest_raises_2':dict(
p=bytearray_to_int(bytearray.fromhex('8000000000000000000000000000000000000000000000000000000000000431')),
a=0x07,
b=bytearray_to_int(bytearray.fromhex('5fbff498aa938ce739b8e022fbafef40563f6e6a3472fc2a514c0ce9dae23b7e')),
m=bytearray_to_int(bytearray.fromhex('8000000000000000000000000000000150fe8a1892976154c59cfc193accf5b3')),
q=0x41,
x=0x02,
y=bytearray_to_int(bytearray.fromhex('08e2a8a0e65147d4bd6316030e16d19c85c97f0a9ca267122b96abbcea7e8fc8'))
),
'id-tc26-gost-3410-2012-256-paramSetTest_raises_3':dict(
p=0x02,
a=0x07,
b=bytearray_to_int(bytearray.fromhex('5fbff498aa938ce739b8e022fbafef40563f6e6a3472fc2a514c0ce9dae23b7e')),
m=bytearray_to_int(bytearray.fromhex('8000000000000000000000000000000150fe8a1892976154c59cfc193accf5b3')),
q=0x70,
x=0x02,
y=bytearray_to_int(bytearray.fromhex('08e2a8a0e65147d4bd6316030e16d19c85c97f0a9ca267122b96abbcea7e8fc8'))
),
'id-tc26-gost-3410-2012-256-paramSetTest_raises_6':dict(
p=bytearray_to_int(bytearray.fromhex('8000000000000000000000000000000000000000000000000000000000000431')),
a=0x07,
b=0x0e,
m=bytearray_to_int(bytearray.fromhex('8000000000000000000000000000000150fe8a1892976154c59cfc193accf5b3')),
q=bytearray_to_int(bytearray.fromhex('8000000000000000000000000000000150fe8a1892976154c59cfc193accf5b3')),
x=0x02,
y=bytearray_to_int(bytearray.fromhex('08e2a8a0e65147d4bd6316030e16d19c85c97f0a9ca267122b96abbcea7e8fc8'))
),
'id-tc26-gost-3410-2012-512-paramSetTest':dict(
p=bytearray_to_int(bytearray.fromhex('4531acd1fe0023c7550d267b6b2fee80922b14b2ffb90f04d4eb7c09b5d2d15df1d852741af4704a0458047e80e4546d35b8336fac224dd81664bbf528be6373')),
a=0x07,
b=bytearray_to_int(bytearray.fromhex('1cff0806a31116da29d8cfa54e57eb748bc5f377e49400fdd788b649eca1ac4361834013b2ad7322480a89ca58e0cf74bc9e540c2add6897fad0a3084f302adc')),
m=bytearray_to_int(bytearray.fromhex('4531acd1fe0023c7550d267b6b2fee80922b14b2ffb90f04d4eb7c09b5d2d15da82f2d7ecb1dbac719905c5eecc423f1d86e25edbe23c595d644aaf187e6e6df')),
q=bytearray_to_int(bytearray.fromhex('4531acd1fe0023c7550d267b6b2fee80922b14b2ffb90f04d4eb7c09b5d2d15da82f2d7ecb1dbac719905c5eecc423f1d86e25edbe23c595d644aaf187e6e6df')),
x=bytearray_to_int(bytearray.fromhex('24d19cc64572ee30f396bf6ebbfd7a6c5213b3b3d7057cc825f91093a68cd762fd60611262cd838dc6b60aa7eee804e28bc849977fac33b4b530f1b120248a9a')),
y=bytearray_to_int(bytearray.fromhex('2bb312a43bd2ce6e0d020613c857acddcfbf061e91e5f2c3f32447c259f39b2c83ab156d77f1496bf7eb3351e1ee4e43dc1a18b91b24640b6dbb92cb1add371e'))
),
'id-tc26-gost-3410-2012-512-paramSetTest_raises_4':dict(
p=bytearray_to_int(bytearray.fromhex('4531acd1fe0023c7550d267b6b2fee80922b14b2ffb90f04d4eb7c09b5d2d15df1d852741af4704a0458047e80e4546d35b8336fac224dd81664bbf528be6373')),
a=0x07,
b=bytearray_to_int(bytearray.fromhex('1cff0806a31116da29d8cfa54e57eb748bc5f377e49400fdd788b649eca1ac4361834013b2ad7322480a89ca58e0cf74bc9e540c2add6897fad0a3084f302adc')),
m=bytearray_to_int(bytearray.fromhex('4531acd1fe0023c7550d267b6b2fee80922b14b2ffb90f04d4eb7c09b5d2d15da82f2d7ecb1dbac719905c5eecc423f1d86e25edbe23c595d644aaf187e6e6df')),
q=0x02,
x=bytearray_to_int(bytearray.fromhex('24d19cc64572ee30f396bf6ebbfd7a6c5213b3b3d7057cc825f91093a68cd762fd60611262cd838dc6b60aa7eee804e28bc849977fac33b4b530f1b120248a9a')),
y=bytearray_to_int(bytearray.fromhex('2bb312a43bd2ce6e0d020613c857acddcfbf061e91e5f2c3f32447c259f39b2c83ab156d77f1496bf7eb3351e1ee4e43dc1a18b91b24640b6dbb92cb1add371e'))
),
'id-tc26-gost-3410-2012-512-paramSetTest_raises_5':dict(
p=bytearray_to_int(bytearray.fromhex('4531acd1fe0023c7550d267b6b2fee80922b14b2ffb90f04d4eb7c09b5d2d15df1d852741af4704a0458047e80e4546d35b8336fac224dd81664bbf528be6373')),
a=0x07,
b=bytearray_to_int(bytearray.fromhex('1cff0806a31116da29d8cfa54e57eb748bc5f377e49400fdd788b649eca1ac4361834013b2ad7322480a89ca58e0cf74bc9e540c2add6897fad0a3084f302adc')),
m=bytearray_to_int(bytearray.fromhex('4531acd1fe0023c7550d267b6b2fee80922b14b2ffb90f04d4eb7c09b5d2d15da82f2d7ecb1dbac719905c5eecc423f1d86e25edbe23c595d644aaf187e6e6df')),
q=0x41,
x=bytearray_to_int(bytearray.fromhex('24d19cc64572ee30f396bf6ebbfd7a6c5213b3b3d7057cc825f91093a68cd762fd60611262cd838dc6b60aa7eee804e28bc849977fac33b4b530f1b120248a9a')),
y=bytearray_to_int(bytearray.fromhex('2bb312a43bd2ce6e0d020613c857acddcfbf061e91e5f2c3f32447c259f39b2c83ab156d77f1496bf7eb3351e1ee4e43dc1a18b91b24640b6dbb92cb1add371e'))
),
'id-tc26-gost-3410-2012-256-paramSetTestEdvardsA': dict(
p=bytearray_to_int(bytearray([
0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd,
0x97
])),
e=0x01,
d=bytearray_to_int(bytearray([
0x06, 0x05, 0xf6, 0xb7, 0xc1, 0x83, 0xfa, 0x81,
0x57, 0x8b, 0xc3, 0x9c, 0xfa, 0xd5, 0x18, 0x13,
0x2b, 0x9d, 0xf6, 0x28, 0x97, 0x00, 0x9a, 0xf7,
0xe5, 0x22, 0xc3, 0x2d, 0x6d, 0xc7, 0xbf, 0xfb
])),
m=bytearray_to_int(bytearray([
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x3f, 0x63, 0x37, 0x7f, 0x21, 0xed, 0x98,
0xd7, 0x04, 0x56, 0xbd, 0x55, 0xb0, 0xd8, 0x31,
0x9c
])),
q=bytearray_to_int(bytearray([
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0f, 0xd8, 0xcd, 0xdf, 0xc8, 0x7b, 0x66, 0x35,
0xc1, 0x15, 0xaf, 0x55, 0x6c, 0x36, 0x0c, 0x67
])),
u=0x0d,
v=bytearray_to_int(bytearray([
0x60, 0xca, 0x1e, 0x32, 0xaa, 0x47, 0x5b, 0x34,
0x84, 0x88, 0xc3, 0x8f, 0xab, 0x07, 0x64, 0x9c,
0xe7, 0xef, 0x8d, 0xbe, 0x87, 0xf2, 0x2e, 0x81,
0xf9, 0x2b, 0x25, 0x92, 0xdb, 0xa3, 0x00, 0xe7
])),
),
'id-tc26-gost-3410-2012-256-paramSetTestEdvardsB': dict(
p=bytearray_to_int(bytearray([
0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd,
0x97
])),
a=bytearray_to_int(bytearray([
0x00, 0xc2, 0x17, 0x3f, 0x15, 0x13, 0x98, 0x16,
0x73, 0xaf, 0x48, 0x92, 0xc2, 0x30, 0x35, 0xa2,
0x7c, 0xe2, 0x5e, 0x20, 0x13, 0xbf, 0x95, 0xaa,
0x33, 0xb2, 0x2c, 0x65, 0x6f, 0x27, 0x7e, 0x73,
0x35
])),
b=bytearray_to_int(bytearray([
0x29, 0x5f, 0x9b, 0xae, 0x74, 0x28, 0xed, 0x9c,
0xcc, 0x20, 0xe7, 0xc3, 0x59, 0xa9, 0xd4, 0x1a,
0x22, 0xfc, 0xcd, 0x91, 0x08, 0xe1, 0x7b, 0xf7,
0xba, 0x93, 0x37, 0xa6, 0xf8, 0xae, 0x95, 0x13
])),
e=0x01,
d=bytearray_to_int(bytearray([
0x06, 0x05, 0xf6, 0xb7, 0xc1, 0x83, 0xfa, 0x81,
0x57, 0x8b, 0xc3, 0x9c, 0xfa, 0xd5, 0x18, 0x13,
0x2b, 0x9d, 0xf6, 0x28, 0x97, 0x00, 0x9a, 0xf7,
0xe5, 0x22, 0xc3, 0x2d, 0x6d, 0xc7, 0xbf, 0xfb
])),
m=bytearray_to_int(bytearray([
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x3f, 0x63, 0x37, 0x7f, 0x21, 0xed, 0x98,
0xd7, 0x04, 0x56, 0xbd, 0x55, 0xb0, 0xd8, 0x31,
0x9c
])),
q=bytearray_to_int(bytearray([
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0f, 0xd8, 0xcd, 0xdf, 0xc8, 0x7b, 0x66, 0x35,
0xc1, 0x15, 0xaf, 0x55, 0x6c, 0x36, 0x0c, 0x67
])),
x=bytearray_to_int(bytearray([
0x00, 0x91, 0xe3, 0x84, 0x43, 0xa5, 0xe8, 0x2c,
0x0d, 0x88, 0x09, 0x23, 0x42, 0x57, 0x12, 0xb2,
0xbb, 0x65, 0x8b, 0x91, 0x96, 0x93, 0x2e, 0x02,
0xc7, 0x8b, 0x25, 0x82, 0xfe, 0x74, 0x2d, 0xaa,
0x28
])),
y=bytearray_to_int(bytearray([
0x32, 0x87, 0x94, 0x23, 0xab, 0x1a, 0x03, 0x75,
0x89, 0x57, 0x86, 0xc4, 0xbb, 0x46, 0xe9, 0x56,
0x5f, 0xde, 0x0b, 0x53, 0x44, 0x76, 0x67, 0x40,
0xaf, 0x26, 0x8a, 0xdb, 0x32, 0x32, 0x2e, 0x5c
])),
u=0x0d,
v=bytearray_to_int(bytearray([
0x60, 0xca, 0x1e, 0x32, 0xaa, 0x47, 0x5b, 0x34,
0x84, 0x88, 0xc3, 0x8f, 0xab, 0x07, 0x64, 0x9c,
0xe7, 0xef, 0x8d, 0xbe, 0x87, 0xf2, 0x2e, 0x81,
0xf9, 0x2b, 0x25, 0x92, 0xdb, 0xa3, 0x00, 0xe7
])),
)
}
TEST_PRIVATE_KEY_256 = bytearray.fromhex('7a929ade789bb9be10ed359dd39a72c11b60961f49397eee1d19ce9891ec3b28')
TEST_DIGEST_256 = bytearray.fromhex('2dfbc1b372d89a1188c09c52e0eec61fce52032ab1022e8e67ece6672b043ee5')
TEST_RANDOM_256 = bytearray.fromhex('77105c9b20bcd3122823c8cf6fcc7b956de33814e95b7fe64fed924594dceab3')
TEST_RANDOM_256_EDVARDS = bytearray.fromhex('37105c9b20bcd3122823c8cf6fcc7b956de33814e95b7fe64fed924594dceab3')
TEST_SIGNATURE_256 = bytearray.fromhex('41aa28d2f1ab148280cd9ed56feda41974053554a42767b83ad043fd39dc049301456c64ba4642a1653c235a98a60249bcd6d3f746b631df928014f6c5bf9c40')
TEST_SIGNATURE_256_ZERO = bytearray.fromhex('00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000')
TEST_PUBLIC_KEY_256 = bytearray.fromhex('7f2b49e270db6d90d8595bec458b50c58585ba1d4e9b788f6689dbd8e56fd80b26f1b489d6701dd185c8413a977b3cbbaf64d1c593d26627dffb101a87ff77da')
TEST_PRIVATE_KEY_512 = bytearray.fromhex('0ba6048aadae241ba40936d47756d7c93091a0e8514669700ee7508e508b102072e8123b2200a0563322dad2827e2714a2636b7bfd18aadfc62967821fa18dd4')
TEST_DIGEST_512 = bytearray.fromhex('3754f3cfacc9e0615c4f4a7c4d8dab531b09b6f9c170c533a71d147035b0c5917184ee536593f4414339976c647c5d5a407adedb1d560c4fc6777d2972075b8c')
TEST_RANDOM_512 = bytearray.fromhex('0359e7f4b1410feacc570456c6801496946312120b39d019d455986e364f365886748ed7a44b3e794434006011842286212273a6d14cf70ea3af71bb1ae679f1')
TEST_SIGNATURE_512 = bytearray.fromhex('2f86fa60a081091a23dd795e1e3c689ee512a3c82ee0dcc2643c78eea8fcacd35492558486b20f1c9ec197c90699850260c93bcbcd9c5c3317e19344e173ae361081b394696ffe8e6585e7a9362d26b6325f56778aadbc081c0bfbe933d52ff5823ce288e8c4f362526080df7f70ce406a6eeb1f56919cb92a9853bde73e5b4a')
TEST_PUBLIC_KEY_512 = bytearray.fromhex('115dc5bc96760c7b48598d8ab9e740d4c4a85a65be33c1815b5c320c854621dd5a515856d13314af69bc5b924c8b4ddff75c45415c1d9dd9dd33612cd530efe137c7c90cd40b0f5621dc3ac1b751cfa0e2634fa0503b3d52639f5d7fb72afd61ea199441d943ffe7f0c70a2759a3cdb84c114e1f9339fdf27f35eca93677beec')
count_urandom = 0
def os_urandom(value):
add = bytearray([0xff, 0xff])
global count_urandom
count_urandom = count_urandom + 1
if count_urandom == 1:
return TEST_RANDOM_512 + add
else:
return TEST_RANDOM_512
@pytest.mark.signature
class TestMODE256(unittest.TestCase):
def test_init_raises(self):
with self.assertRaises(GOSTSignatureError) as context:
test_sign = gostcrypto.gostsignature.new(None, TEST_CURVE['id-tc26-gost-3410-2012-512-paramSetTest'])
self.assertTrue('unsupported signature mode' in str(context.exception))
def test_init_raises_0(self):
none_curve = dict(f = 0x00, u = 0x00)
with self.assertRaises(GOSTSignatureError) as context:
test_sign = gostcrypto.gostsignature.new(gostcrypto.gostsignature.MODE_256,
none_curve)
self.assertTrue('invalid parameters of the elliptic curve' in str(context.exception))
def test_init_raises_1(self):
with self.assertRaises(GOSTSignatureError) as context:
test_sign = gostcrypto.gostsignature.new(gostcrypto.gostsignature.MODE_256,
TEST_CURVE['id-tc26-gost-3410-2012-256-paramSetTest_raises_1'])
self.assertTrue('invalid parameters of the elliptic curve' in str(context.exception))
def test_init_raises_2(self):
with self.assertRaises(GOSTSignatureError) as context:
test_sign = gostcrypto.gostsignature.new(gostcrypto.gostsignature.MODE_256,
TEST_CURVE['id-tc26-gost-3410-2012-256-paramSetTest_raises_2'])
TEST_CURVE['id-tc26-gost-3410-2012-512-paramSetTest']['q'] = old_q
self.assertTrue('invalid parameters of the elliptic curve' in str(context.exception))
def test_init_raises_3(self):
with self.assertRaises(GOSTSignatureError) as context:
test_sign = gostcrypto.gostsignature.new(gostcrypto.gostsignature.MODE_256,
TEST_CURVE['id-tc26-gost-3410-2012-256-paramSetTest_raises_3'])
self.assertTrue('invalid parameters of the elliptic curve' in str(context.exception))
def test_init_raises_4(self):
with self.assertRaises(GOSTSignatureError) as context:
test_sign = gostcrypto.gostsignature.new(gostcrypto.gostsignature.MODE_512,
TEST_CURVE['id-tc26-gost-3410-2012-512-paramSetTest_raises_4'])
self.assertTrue('invalid parameters of the elliptic curve' in str(context.exception))
def test_init_raises_5(self):
with self.assertRaises(GOSTSignatureError) as context:
test_sign = gostcrypto.gostsignature.new(gostcrypto.gostsignature.MODE_512,
TEST_CURVE['id-tc26-gost-3410-2012-512-paramSetTest_raises_5'])
self.assertTrue('invalid parameters of the elliptic curve' in str(context.exception))
def test_init_raises_6(self):
with self.assertRaises(GOSTSignatureError) as context:
test_sign = gostcrypto.gostsignature.new(gostcrypto.gostsignature.MODE_256,
TEST_CURVE['id-tc26-gost-3410-2012-256-paramSetTest_raises_6'])
self.assertTrue('invalid parameters of the elliptic curve' in str(context.exception))
def test_sign_256(self):
test_sign = gostcrypto.gostsignature.new(gostcrypto.gostsignature.MODE_256,
TEST_CURVE['id-tc26-gost-3410-2012-256-paramSetTest'])
self.assertEqual(test_sign.sign(TEST_PRIVATE_KEY_256, TEST_DIGEST_256, TEST_RANDOM_256),
TEST_SIGNATURE_256)
def test_sign_edvards_a(self):
signature = bytearray.fromhex('33dd7cffb7abd971669508fe0d4a1248c3a656108292ed18280cc02d7f0bd3f72e3746c7f6a77491c0edc7b2493f36d007b88c411761c1b303ba851947113166')
test_sign = gostcrypto.gostsignature.new(gostcrypto.gostsignature.MODE_256,
TEST_CURVE['id-tc26-gost-3410-2012-256-paramSetTestEdvardsA'])
self.assertEqual(test_sign.sign(TEST_PRIVATE_KEY_256, TEST_DIGEST_256, TEST_RANDOM_256_EDVARDS),
signature)
def test_sign_edvards_b(self):
signature = bytearray.fromhex('33dd7cffb7abd971669508fe0d4a1248c3a656108292ed18280cc02d7f0bd3f72e3746c7f6a77491c0edc7b2493f36d007b88c411761c1b303ba851947113166')
test_sign = gostcrypto.gostsignature.new(gostcrypto.gostsignature.MODE_256,
TEST_CURVE['id-tc26-gost-3410-2012-256-paramSetTestEdvardsB'])
self.assertEqual(test_sign.sign(TEST_PRIVATE_KEY_256, TEST_DIGEST_256, TEST_RANDOM_256_EDVARDS),
signature)
def test_sign_raises(self):
#Test 'invalid private key value'
test_sign = gostcrypto.gostsignature.new(gostcrypto.gostsignature.MODE_256,
TEST_CURVE['id-tc26-gost-3410-2012-256-paramSetTest'])
with self.assertRaises(GOSTSignatureError) as context:
self.assertEqual(test_sign.sign('test_private_key', TEST_DIGEST_256, TEST_RANDOM_256),
TEST_SIGNATURE_256)
self.assertTrue('invalid private key value' in str(context.exception))
#Test 'invalid digest value'
test_sign = gostcrypto.gostsignature.new(gostcrypto.gostsignature.MODE_256,
TEST_CURVE['id-tc26-gost-3410-2012-256-paramSetTest'])
with self.assertRaises(GOSTSignatureError) as context:
self.assertEqual(test_sign.sign(TEST_PRIVATE_KEY_256, 'test_digest', TEST_RANDOM_256),
TEST_SIGNATURE_256)
self.assertTrue('invalid digest value' in str(context.exception))
#Test 'invalid random value' (not a byte object)
test_sign = gostcrypto.gostsignature.new(gostcrypto.gostsignature.MODE_256,
TEST_CURVE['id-tc26-gost-3410-2012-256-paramSetTest'])
with self.assertRaises(GOSTSignatureError) as context:
test_sign.sign(TEST_PRIVATE_KEY_256, TEST_DIGEST_256, 'test_random')
self.assertTrue('invalid random value' in str(context.exception))
#Test 'invalid random value' (random value >= 'q')
test_sign = gostcrypto.gostsignature.new(gostcrypto.gostsignature.MODE_256,
TEST_CURVE['id-tc26-gost-3410-2012-256-paramSetTest'])
with self.assertRaises(GOSTSignatureError) as context:
test_sign.sign(TEST_PRIVATE_KEY_256, TEST_DIGEST_256, TEST_RANDOM_512)
self.assertTrue('invalid random value' in str(context.exception))
def test_verify_256(self):
test_sign = gostcrypto.gostsignature.new(gostcrypto.gostsignature.MODE_256,
TEST_CURVE['id-tc26-gost-3410-2012-256-paramSetTest'])
self.assertEqual(test_sign.verify(TEST_PUBLIC_KEY_256, TEST_DIGEST_256,
TEST_SIGNATURE_256), True)
test_sign = gostcrypto.gostsignature.new(gostcrypto.gostsignature.MODE_256,
TEST_CURVE['id-tc26-gost-3410-2012-256-paramSetTest'])
self.assertEqual(test_sign.verify(TEST_PUBLIC_KEY_256, TEST_DIGEST_256,
TEST_SIGNATURE_256_ZERO), False)
def test_verify_raises(self):
#Test 'invalid public key value'
test_sign = gostcrypto.gostsignature.new(gostcrypto.gostsignature.MODE_256,
TEST_CURVE['id-tc26-gost-3410-2012-256-paramSetTest'])
with self.assertRaises(GOSTSignatureError) as context:
test_sign.verify('test_public_key', TEST_DIGEST_256, TEST_SIGNATURE_256)
self.assertTrue('invalid public key value' in str(context.exception))
#Test 'invalid signature value'
test_sign = gostcrypto.gostsignature.new(gostcrypto.gostsignature.MODE_256,
TEST_CURVE['id-tc26-gost-3410-2012-256-paramSetTest'])
with self.assertRaises(GOSTSignatureError) as context:
test_sign.verify(TEST_PUBLIC_KEY_256, TEST_DIGEST_256, 'test_signature')
self.assertTrue('invalid signature value' in str(context.exception))
#Test 'invalid digest value'
test_sign = gostcrypto.gostsignature.new(gostcrypto.gostsignature.MODE_256,
TEST_CURVE['id-tc26-gost-3410-2012-256-paramSetTest'])
with self.assertRaises(GOSTSignatureError) as context:
test_sign.verify(TEST_PUBLIC_KEY_256, 'test_digest', TEST_SIGNATURE_256)
self.assertTrue('invalid digest value' in str(context.exception))
def test_public_key_generate_256(self):
test_sign = gostcrypto.gostsignature.new(gostcrypto.gostsignature.MODE_256,
TEST_CURVE['id-tc26-gost-3410-2012-256-paramSetTest'])
self.assertEqual(test_sign.public_key_generate(TEST_PRIVATE_KEY_256), TEST_PUBLIC_KEY_256)
def test_public_key_generate_raises(self):
test_sign = gostcrypto.gostsignature.new(gostcrypto.gostsignature.MODE_256,
TEST_CURVE['id-tc26-gost-3410-2012-256-paramSetTest'])
with self.assertRaises(GOSTSignatureError) as context:
test_sign.public_key_generate('test_private_key')
self.assertTrue('invalid private key' in str(context.exception))
class TestMODE512(unittest.TestCase):
def test_sign_512(self):
test_sign = gostcrypto.gostsignature.new(gostcrypto.gostsignature.MODE_512,
TEST_CURVE['id-tc26-gost-3410-2012-512-paramSetTest'])
self.assertEqual(test_sign.sign(TEST_PRIVATE_KEY_512, TEST_DIGEST_512, TEST_RANDOM_512),
TEST_SIGNATURE_512)
def test_verify_512(self):
test_sign = gostcrypto.gostsignature.new(gostcrypto.gostsignature.MODE_512,
TEST_CURVE['id-tc26-gost-3410-2012-512-paramSetTest'])
self.assertEqual(test_sign.verify(TEST_PUBLIC_KEY_512, TEST_DIGEST_512,
TEST_SIGNATURE_512), True)
def test_public_key_generate_512(self):
test_sign = gostcrypto.gostsignature.new(gostcrypto.gostsignature.MODE_512,
TEST_CURVE['id-tc26-gost-3410-2012-512-paramSetTest'])
self.assertEqual(test_sign.public_key_generate(TEST_PRIVATE_KEY_512), TEST_PUBLIC_KEY_512)
def test_sign_urandom(self):
test_sign = gostcrypto.gostsignature.new(gostcrypto.gostsignature.MODE_512,
TEST_CURVE['id-tc26-gost-3410-2012-512-paramSetTest'])
with mock.patch('os.urandom', os_urandom):
test_result = test_sign.sign(TEST_PRIVATE_KEY_512, TEST_DIGEST_512)
self.assertEqual(test_result, TEST_SIGNATURE_512)
def test_oid(self):
test_sign = gostcrypto.gostsignature.new(gostcrypto.gostsignature.MODE_256,
TEST_CURVE['id-tc26-gost-3410-2012-256-paramSetTest'])
self.assertEqual(test_sign.oid.__str__(), '1.2.643.7.1.1.1.1')
self.assertEqual(test_sign.oid.digit, tuple([1, 2, 643, 7, 1, 1, 1, 1]))
self.assertEqual(test_sign.oid.name, 'id-tc26-gost3410-12-256')
self.assertEqual(test_sign.oid.octet, bytearray([0x06, 0x08, 0x2a, 0x85, 0x03, 0x07, 0x01, 0x01, 0x01, 0x01,]))
test_sign = gostcrypto.gostsignature.new(gostcrypto.gostsignature.MODE_512,
TEST_CURVE['id-tc26-gost-3410-2012-512-paramSetTest'])
self.assertEqual(test_sign.oid.__str__(), '1.2.643.7.1.1.1.2')
self.assertEqual(test_sign.oid.digit, tuple([1, 2, 643, 7, 1, 1, 1, 2]))
self.assertEqual(test_sign.oid.name, 'id-tc26-gost3410-12-512')
self.assertEqual(test_sign.oid.octet, bytearray([0x06, 0x08, 0x2a, 0x85, 0x03, 0x07, 0x01, 0x01, 0x01, 0x02,]))
| 61.383632 | 299 | 0.732428 | 2,420 | 24,001 | 7.065702 | 0.119835 | 0.028072 | 0.039301 | 0.050529 | 0.801977 | 0.78642 | 0.771449 | 0.759986 | 0.752734 | 0.731856 | 0 | 0.274392 | 0.174118 | 24,001 | 390 | 300 | 61.541026 | 0.588235 | 0.010125 | 0 | 0.606232 | 0 | 0 | 0.314429 | 0.288493 | 0 | 0 | 0.084375 | 0 | 0.147309 | 1 | 0.062323 | false | 0 | 0.022663 | 0 | 0.096317 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 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 |
babcb199b3849a13b81b99c672e0414014b3268e | 850 | py | Python | examples/umm/test/athletics_event/more_events.py | ppoile/pyschedule | 118737a9b1441bec26ff15fcf1b9aa93ab16c248 | [
"Apache-2.0"
] | null | null | null | examples/umm/test/athletics_event/more_events.py | ppoile/pyschedule | 118737a9b1441bec26ff15fcf1b9aa93ab16c248 | [
"Apache-2.0"
] | null | null | null | examples/umm/test/athletics_event/more_events.py | ppoile/pyschedule | 118737a9b1441bec26ff15fcf1b9aa93ab16c248 | [
"Apache-2.0"
] | null | null | null | from single_event import BaseEventWithWettkampfHelper
class MoreEvents(BaseEventWithWettkampfHelper):
def test_scheduling_of_first_and_last_disziplin_for_wettkampf_WOM_7K_and_U16M_6K_and_MAN_10K(self):
wettkampf_budget_data = {
"U16M_6K": (0, 31),
"WOM_7K": (16, 34),
"MAN_10K": (12, 38),
}
self.wettkampf_helper(wettkampf_budget_data=wettkampf_budget_data, wettkampf_day=self._SATURDAY)
def test_scheduling_of_first_and_last_disziplin_for_wettkampf_U16W_5K_and_WOM_7K_and_U16M_6K_and_MAN_10K(self):
wettkampf_budget_data = {
"U16M_6K": (0, 34),
"WOM_7K": (18, 38),
"U16W_5K": (23, 52),
"MAN_10K": (12, 57),
}
self.wettkampf_helper(wettkampf_budget_data=wettkampf_budget_data, wettkampf_day=self._SATURDAY)
| 40.47619 | 115 | 0.689412 | 109 | 850 | 4.816514 | 0.376147 | 0.171429 | 0.217143 | 0.213333 | 0.708571 | 0.708571 | 0.708571 | 0.708571 | 0.708571 | 0.708571 | 0 | 0.084337 | 0.218824 | 850 | 20 | 116 | 42.5 | 0.706325 | 0 | 0 | 0.235294 | 0 | 0 | 0.055294 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.117647 | false | 0 | 0.058824 | 0 | 0.235294 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
bac027579a47c515c0f4443afec5b7d55906bc25 | 144 | py | Python | exercicios/eXcript_Python/lista1.py | IgoPereiraBarros/maratona-data-science-brasil | cc07476579134a2764f00d229d415657555dcdd1 | [
"MIT"
] | null | null | null | exercicios/eXcript_Python/lista1.py | IgoPereiraBarros/maratona-data-science-brasil | cc07476579134a2764f00d229d415657555dcdd1 | [
"MIT"
] | null | null | null | exercicios/eXcript_Python/lista1.py | IgoPereiraBarros/maratona-data-science-brasil | cc07476579134a2764f00d229d415657555dcdd1 | [
"MIT"
] | null | null | null | lista = [1,2,3,4,5,6,7,8,9]
print(lista)
lista = list("eXcript")
print(lista)
lista = list(("eXcript",))
print(lista)
a = (5,)
print(type(a)) | 13.090909 | 27 | 0.611111 | 27 | 144 | 3.259259 | 0.555556 | 0.340909 | 0.340909 | 0.431818 | 0.704545 | 0.704545 | 0.704545 | 0 | 0 | 0 | 0 | 0.079365 | 0.125 | 144 | 11 | 28 | 13.090909 | 0.619048 | 0 | 0 | 0.375 | 0 | 0 | 0.096552 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | null | 1 | 1 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 7 |
bad0c43553372d4a1f0d83934743e741d2004898 | 156 | py | Python | tests/unittests/__init__.py | mjpcollins/crs-utils | 6aaf95436fe1571ec8b474497e044ce2b34a36de | [
"MIT"
] | 1 | 2022-01-20T17:46:20.000Z | 2022-01-20T17:46:20.000Z | tests/unittests/__init__.py | mjpcollins/crs-utils | 6aaf95436fe1571ec8b474497e044ce2b34a36de | [
"MIT"
] | null | null | null | tests/unittests/__init__.py | mjpcollins/crs-utils | 6aaf95436fe1571ec8b474497e044ce2b34a36de | [
"MIT"
] | null | null | null | from tests.unittests.test_service_auth import TestServiceAuth
from tests.unittests.test_direct import TestDirect
from tests.unittests.test_ps import TestPS
| 39 | 61 | 0.884615 | 22 | 156 | 6.090909 | 0.545455 | 0.201493 | 0.402985 | 0.492537 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.076923 | 156 | 3 | 62 | 52 | 0.930556 | 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 |
24646fa9ff195c9eb56a841e0660b392eb713946 | 3,747 | py | Python | utils/scripts/OOOlevelGen/src/daily_levels/Hit_It_Harder.py | fullscreennl/monkeyswipe | c56192e202674dd5ab18023f6cf14cf51e95fbd0 | [
"MIT"
] | null | null | null | utils/scripts/OOOlevelGen/src/daily_levels/Hit_It_Harder.py | fullscreennl/monkeyswipe | c56192e202674dd5ab18023f6cf14cf51e95fbd0 | [
"MIT"
] | null | null | null | utils/scripts/OOOlevelGen/src/daily_levels/Hit_It_Harder.py | fullscreennl/monkeyswipe | c56192e202674dd5ab18023f6cf14cf51e95fbd0 | [
"MIT"
] | null | null | null | import LevelBuilder
from sprites import *
def render(name,bg):
lb = LevelBuilder.LevelBuilder(name+".plist",background=bg)
lb.addObject(SpikeyBuddy.SpikeyBuddySprite(x=65, y=181,width=17,height=17,restitution=0.5,static='false',friction=0.5,density=20 ))
lb.addObject(Beam.BeamSprite(x=215, y=-4,width=126,height=61,angle='22',restitution=0.2,static='true',friction=0.5,density=20 ).setName('Beam'))
lb.addObject(Hero.HeroSprite(x=25, y=182,width=32,height=32))
lb.addObject(Launcher.LauncherSprite(name='defaultValue',x=453, y=15, trigger_x=410, trigger_y=231))
lb.addObject(Beam.BeamSprite(x=313, y=9,width=126,height=61,angle='22',restitution=0.2,static='true',friction=0.5,density=20 ).setName('Beam'))
lb.addObject(Beam.BeamSprite(x=393, y=26,width=66,height=69,angle='0',restitution=0.2,static='true',friction=0.5,density=20 ).setName('Beam'))
lb.addObject(Beam.BeamSprite(x=439, y=180,width=13,height=168,angle='0',restitution=0.2,static='true',friction=0.5,density=20 ).setName('Beam'))
lb.addObject(Beam.BeamSprite(x=349, y=251,width=13,height=172,angle='-86',restitution=0.2,static='true',friction=0.5,density=20 ).setName('Beam'))
lb.addObject(Beam.BeamSprite(x=449, y=314,width=126,height=26,angle='-20',restitution=0.2,static='true',friction=0.5,density=20 ).setName('Beam'))
lb.addObject(Beam.BeamSprite(x=264, y=315,width=577,height=26,angle='0',restitution=0.2,static='true',friction=0.5,density=20 ).setName('Beam'))
lb.addObject(Beam.BeamSprite(x=159, y=252,width=13,height=172,angle='86',restitution=0.2,static='true',friction=0.5,density=20 ).setName('Beam'))
lb.addObject(Enemy.EnemySprite(x=220, y=271,width=32,height=32,angle='0',restitution=0.2,static='false',friction=0.5,density=20 ))
lb.addObject(Star.StarSprite(x=254, y=267,width=32,height=32))
lb.addObject(Enemy.EnemySprite(x=288, y=271,width=32,height=32,angle='0',restitution=0.2,static='false',friction=0.5,density=20 ))
lb.addObject(Enemy.EnemySprite(x=320, y=274,width=32,height=32,angle='0',restitution=0.2,static='false',friction=0.5,density=20 ))
lb.addObject(Enemy.EnemySprite(x=357, y=275,width=32,height=32,angle='0',restitution=0.2,static='false',friction=0.5,density=20 ))
lb.addObject(Enemy.EnemySprite(x=393, y=280,width=32,height=32,angle='0',restitution=0.2,static='false',friction=0.5,density=20 ))
lb.addObject(Enemy.EnemySprite(x=426, y=280,width=32,height=32,angle='0',restitution=0.2,static='false',friction=0.5,density=20 ))
lb.addObject(Enemy.EnemySprite(x=185, y=273,width=32,height=32,angle='0',restitution=0.2,static='false',friction=0.5,density=20 ))
lb.addObject(Enemy.EnemySprite(x=152, y=277,width=32,height=32,angle='0',restitution=0.2,static='false',friction=0.5,density=20 ))
lb.addObject(Enemy.EnemySprite(x=119, y=278,width=32,height=32,angle='0',restitution=0.2,static='false',friction=0.5,density=20 ))
lb.addObject(Enemy.EnemySprite(x=86, y=281,width=32,height=32,angle='0',restitution=0.2,static='false',friction=0.5,density=20 ))
lb.addObject(Enemy.EnemySprite(x=279, y=44,width=32,height=32,angle='0',restitution=0.2,static='false',friction=0.5,density=20 ))
lb.addObject(Rotor.RotorSprite(x=365,y=173,speed=0,angle=0,torque=100))
lb.addObject(Enemy.EnemySprite(x=325, y=201,width=32,height=32,angle='0',restitution=0.2,static='false',friction=0.5,density=20 ))
lb.addObject(Enemy.EnemySprite(x=405, y=201,width=32,height=32,angle='0',restitution=0.2,static='false',friction=0.5,density=20 ))
lb.addObject(Beam.BeamSprite(x=74, y=-4,width=175,height=61,angle='-14',restitution=0.8,static='true',friction=0.5,density=20 ).setName('Beam'))
lb.addObject(Beam.BeamSprite(x=31, y=287,width=13,height=111,angle='56',restitution=0.2,static='true',friction=0.5,density=20 ).setName('Beam'))
lb.render() | 3,747 | 3,747 | 0.747798 | 666 | 3,747 | 4.204204 | 0.174174 | 0.11 | 0.085714 | 0.145714 | 0.790357 | 0.758929 | 0.740357 | 0.740357 | 0.740357 | 0.740357 | 0 | 0.12469 | 0.032559 | 3,747 | 1 | 3,747 | 3,747 | 0.647724 | 0 | 0 | 0 | 0 | 0 | 0.053629 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.030303 | false | 0 | 0.060606 | 0 | 0.090909 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
031054c4fa338e4766c4a742c67bc97848733c93 | 20,045 | py | Python | sdk/python/pulumi_vault/consul/secret_backend_role.py | pulumi/pulumi-vault | 1682875f4a5d7d508f36e166529ad2b8aec34090 | [
"ECL-2.0",
"Apache-2.0"
] | 10 | 2019-10-07T17:44:18.000Z | 2022-03-30T20:46:33.000Z | sdk/python/pulumi_vault/consul/secret_backend_role.py | pulumi/pulumi-vault | 1682875f4a5d7d508f36e166529ad2b8aec34090 | [
"ECL-2.0",
"Apache-2.0"
] | 79 | 2019-10-11T18:13:07.000Z | 2022-03-31T21:09:41.000Z | sdk/python/pulumi_vault/consul/secret_backend_role.py | pulumi/pulumi-vault | 1682875f4a5d7d508f36e166529ad2b8aec34090 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2019-10-28T10:08:40.000Z | 2020-03-17T14:20:55.000Z | # 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__ = ['SecretBackendRoleArgs', 'SecretBackendRole']
@pulumi.input_type
class SecretBackendRoleArgs:
def __init__(__self__, *,
policies: pulumi.Input[Sequence[pulumi.Input[str]]],
backend: Optional[pulumi.Input[str]] = None,
local: Optional[pulumi.Input[bool]] = None,
max_ttl: Optional[pulumi.Input[int]] = None,
name: Optional[pulumi.Input[str]] = None,
token_type: Optional[pulumi.Input[str]] = None,
ttl: Optional[pulumi.Input[int]] = None):
"""
The set of arguments for constructing a SecretBackendRole resource.
:param pulumi.Input[Sequence[pulumi.Input[str]]] policies: The list of Consul ACL policies to associate with these roles.
:param pulumi.Input[str] backend: The unique name of an existing Consul secrets backend mount. Must not begin or end with a `/`. One of `path` or `backend` is required.
:param pulumi.Input[bool] local: Indicates that the token should not be replicated globally and instead be local to the current datacenter.
:param pulumi.Input[int] max_ttl: Maximum TTL for leases associated with this role, in seconds.
:param pulumi.Input[str] name: The name of the Consul secrets engine role to create.
:param pulumi.Input[str] token_type: Specifies the type of token to create when using this role. Valid values are "client" or "management".
:param pulumi.Input[int] ttl: Specifies the TTL for this role.
"""
pulumi.set(__self__, "policies", policies)
if backend is not None:
pulumi.set(__self__, "backend", backend)
if local is not None:
pulumi.set(__self__, "local", local)
if max_ttl is not None:
pulumi.set(__self__, "max_ttl", max_ttl)
if name is not None:
pulumi.set(__self__, "name", name)
if token_type is not None:
pulumi.set(__self__, "token_type", token_type)
if ttl is not None:
pulumi.set(__self__, "ttl", ttl)
@property
@pulumi.getter
def policies(self) -> pulumi.Input[Sequence[pulumi.Input[str]]]:
"""
The list of Consul ACL policies to associate with these roles.
"""
return pulumi.get(self, "policies")
@policies.setter
def policies(self, value: pulumi.Input[Sequence[pulumi.Input[str]]]):
pulumi.set(self, "policies", value)
@property
@pulumi.getter
def backend(self) -> Optional[pulumi.Input[str]]:
"""
The unique name of an existing Consul secrets backend mount. Must not begin or end with a `/`. One of `path` or `backend` is required.
"""
return pulumi.get(self, "backend")
@backend.setter
def backend(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "backend", value)
@property
@pulumi.getter
def local(self) -> Optional[pulumi.Input[bool]]:
"""
Indicates that the token should not be replicated globally and instead be local to the current datacenter.
"""
return pulumi.get(self, "local")
@local.setter
def local(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "local", value)
@property
@pulumi.getter(name="maxTtl")
def max_ttl(self) -> Optional[pulumi.Input[int]]:
"""
Maximum TTL for leases associated with this role, in seconds.
"""
return pulumi.get(self, "max_ttl")
@max_ttl.setter
def max_ttl(self, value: Optional[pulumi.Input[int]]):
pulumi.set(self, "max_ttl", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
The name of the Consul secrets engine role to create.
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter(name="tokenType")
def token_type(self) -> Optional[pulumi.Input[str]]:
"""
Specifies the type of token to create when using this role. Valid values are "client" or "management".
"""
return pulumi.get(self, "token_type")
@token_type.setter
def token_type(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "token_type", value)
@property
@pulumi.getter
def ttl(self) -> Optional[pulumi.Input[int]]:
"""
Specifies the TTL for this role.
"""
return pulumi.get(self, "ttl")
@ttl.setter
def ttl(self, value: Optional[pulumi.Input[int]]):
pulumi.set(self, "ttl", value)
@pulumi.input_type
class _SecretBackendRoleState:
def __init__(__self__, *,
backend: Optional[pulumi.Input[str]] = None,
local: Optional[pulumi.Input[bool]] = None,
max_ttl: Optional[pulumi.Input[int]] = None,
name: Optional[pulumi.Input[str]] = None,
policies: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
token_type: Optional[pulumi.Input[str]] = None,
ttl: Optional[pulumi.Input[int]] = None):
"""
Input properties used for looking up and filtering SecretBackendRole resources.
:param pulumi.Input[str] backend: The unique name of an existing Consul secrets backend mount. Must not begin or end with a `/`. One of `path` or `backend` is required.
:param pulumi.Input[bool] local: Indicates that the token should not be replicated globally and instead be local to the current datacenter.
:param pulumi.Input[int] max_ttl: Maximum TTL for leases associated with this role, in seconds.
:param pulumi.Input[str] name: The name of the Consul secrets engine role to create.
:param pulumi.Input[Sequence[pulumi.Input[str]]] policies: The list of Consul ACL policies to associate with these roles.
:param pulumi.Input[str] token_type: Specifies the type of token to create when using this role. Valid values are "client" or "management".
:param pulumi.Input[int] ttl: Specifies the TTL for this role.
"""
if backend is not None:
pulumi.set(__self__, "backend", backend)
if local is not None:
pulumi.set(__self__, "local", local)
if max_ttl is not None:
pulumi.set(__self__, "max_ttl", max_ttl)
if name is not None:
pulumi.set(__self__, "name", name)
if policies is not None:
pulumi.set(__self__, "policies", policies)
if token_type is not None:
pulumi.set(__self__, "token_type", token_type)
if ttl is not None:
pulumi.set(__self__, "ttl", ttl)
@property
@pulumi.getter
def backend(self) -> Optional[pulumi.Input[str]]:
"""
The unique name of an existing Consul secrets backend mount. Must not begin or end with a `/`. One of `path` or `backend` is required.
"""
return pulumi.get(self, "backend")
@backend.setter
def backend(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "backend", value)
@property
@pulumi.getter
def local(self) -> Optional[pulumi.Input[bool]]:
"""
Indicates that the token should not be replicated globally and instead be local to the current datacenter.
"""
return pulumi.get(self, "local")
@local.setter
def local(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "local", value)
@property
@pulumi.getter(name="maxTtl")
def max_ttl(self) -> Optional[pulumi.Input[int]]:
"""
Maximum TTL for leases associated with this role, in seconds.
"""
return pulumi.get(self, "max_ttl")
@max_ttl.setter
def max_ttl(self, value: Optional[pulumi.Input[int]]):
pulumi.set(self, "max_ttl", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
The name of the Consul secrets engine role to create.
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter
def policies(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
"""
The list of Consul ACL policies to associate with these roles.
"""
return pulumi.get(self, "policies")
@policies.setter
def policies(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "policies", value)
@property
@pulumi.getter(name="tokenType")
def token_type(self) -> Optional[pulumi.Input[str]]:
"""
Specifies the type of token to create when using this role. Valid values are "client" or "management".
"""
return pulumi.get(self, "token_type")
@token_type.setter
def token_type(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "token_type", value)
@property
@pulumi.getter
def ttl(self) -> Optional[pulumi.Input[int]]:
"""
Specifies the TTL for this role.
"""
return pulumi.get(self, "ttl")
@ttl.setter
def ttl(self, value: Optional[pulumi.Input[int]]):
pulumi.set(self, "ttl", value)
class SecretBackendRole(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
backend: Optional[pulumi.Input[str]] = None,
local: Optional[pulumi.Input[bool]] = None,
max_ttl: Optional[pulumi.Input[int]] = None,
name: Optional[pulumi.Input[str]] = None,
policies: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
token_type: Optional[pulumi.Input[str]] = None,
ttl: Optional[pulumi.Input[int]] = None,
__props__=None):
"""
Manages a Consul secrets role for a Consul secrets engine in Vault. Consul secret backends can then issue Consul tokens.
## Example Usage
```python
import pulumi
import pulumi_vault as vault
test = vault.consul.SecretBackend("test",
path="consul",
description="Manages the Consul backend",
address="127.0.0.1:8500",
token="4240861b-ce3d-8530-115a-521ff070dd29")
example = vault.consul.SecretBackendRole("example",
backend=test.path,
policies=["example-policy"])
```
## Import
Consul secret backend roles can be imported using the `backend`, `/roles/`, and the `name` e.g.
```sh
$ pulumi import vault:consul/secretBackendRole:SecretBackendRole example consul/roles/my-role
```
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] backend: The unique name of an existing Consul secrets backend mount. Must not begin or end with a `/`. One of `path` or `backend` is required.
:param pulumi.Input[bool] local: Indicates that the token should not be replicated globally and instead be local to the current datacenter.
:param pulumi.Input[int] max_ttl: Maximum TTL for leases associated with this role, in seconds.
:param pulumi.Input[str] name: The name of the Consul secrets engine role to create.
:param pulumi.Input[Sequence[pulumi.Input[str]]] policies: The list of Consul ACL policies to associate with these roles.
:param pulumi.Input[str] token_type: Specifies the type of token to create when using this role. Valid values are "client" or "management".
:param pulumi.Input[int] ttl: Specifies the TTL for this role.
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: SecretBackendRoleArgs,
opts: Optional[pulumi.ResourceOptions] = None):
"""
Manages a Consul secrets role for a Consul secrets engine in Vault. Consul secret backends can then issue Consul tokens.
## Example Usage
```python
import pulumi
import pulumi_vault as vault
test = vault.consul.SecretBackend("test",
path="consul",
description="Manages the Consul backend",
address="127.0.0.1:8500",
token="4240861b-ce3d-8530-115a-521ff070dd29")
example = vault.consul.SecretBackendRole("example",
backend=test.path,
policies=["example-policy"])
```
## Import
Consul secret backend roles can be imported using the `backend`, `/roles/`, and the `name` e.g.
```sh
$ pulumi import vault:consul/secretBackendRole:SecretBackendRole example consul/roles/my-role
```
:param str resource_name: The name of the resource.
:param SecretBackendRoleArgs 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(SecretBackendRoleArgs, 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,
backend: Optional[pulumi.Input[str]] = None,
local: Optional[pulumi.Input[bool]] = None,
max_ttl: Optional[pulumi.Input[int]] = None,
name: Optional[pulumi.Input[str]] = None,
policies: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
token_type: Optional[pulumi.Input[str]] = None,
ttl: Optional[pulumi.Input[int]] = 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__ = SecretBackendRoleArgs.__new__(SecretBackendRoleArgs)
__props__.__dict__["backend"] = backend
__props__.__dict__["local"] = local
__props__.__dict__["max_ttl"] = max_ttl
__props__.__dict__["name"] = name
if policies is None and not opts.urn:
raise TypeError("Missing required property 'policies'")
__props__.__dict__["policies"] = policies
__props__.__dict__["token_type"] = token_type
__props__.__dict__["ttl"] = ttl
super(SecretBackendRole, __self__).__init__(
'vault:consul/secretBackendRole:SecretBackendRole',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None,
backend: Optional[pulumi.Input[str]] = None,
local: Optional[pulumi.Input[bool]] = None,
max_ttl: Optional[pulumi.Input[int]] = None,
name: Optional[pulumi.Input[str]] = None,
policies: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
token_type: Optional[pulumi.Input[str]] = None,
ttl: Optional[pulumi.Input[int]] = None) -> 'SecretBackendRole':
"""
Get an existing SecretBackendRole 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] backend: The unique name of an existing Consul secrets backend mount. Must not begin or end with a `/`. One of `path` or `backend` is required.
:param pulumi.Input[bool] local: Indicates that the token should not be replicated globally and instead be local to the current datacenter.
:param pulumi.Input[int] max_ttl: Maximum TTL for leases associated with this role, in seconds.
:param pulumi.Input[str] name: The name of the Consul secrets engine role to create.
:param pulumi.Input[Sequence[pulumi.Input[str]]] policies: The list of Consul ACL policies to associate with these roles.
:param pulumi.Input[str] token_type: Specifies the type of token to create when using this role. Valid values are "client" or "management".
:param pulumi.Input[int] ttl: Specifies the TTL for this role.
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _SecretBackendRoleState.__new__(_SecretBackendRoleState)
__props__.__dict__["backend"] = backend
__props__.__dict__["local"] = local
__props__.__dict__["max_ttl"] = max_ttl
__props__.__dict__["name"] = name
__props__.__dict__["policies"] = policies
__props__.__dict__["token_type"] = token_type
__props__.__dict__["ttl"] = ttl
return SecretBackendRole(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter
def backend(self) -> pulumi.Output[Optional[str]]:
"""
The unique name of an existing Consul secrets backend mount. Must not begin or end with a `/`. One of `path` or `backend` is required.
"""
return pulumi.get(self, "backend")
@property
@pulumi.getter
def local(self) -> pulumi.Output[Optional[bool]]:
"""
Indicates that the token should not be replicated globally and instead be local to the current datacenter.
"""
return pulumi.get(self, "local")
@property
@pulumi.getter(name="maxTtl")
def max_ttl(self) -> pulumi.Output[Optional[int]]:
"""
Maximum TTL for leases associated with this role, in seconds.
"""
return pulumi.get(self, "max_ttl")
@property
@pulumi.getter
def name(self) -> pulumi.Output[str]:
"""
The name of the Consul secrets engine role to create.
"""
return pulumi.get(self, "name")
@property
@pulumi.getter
def policies(self) -> pulumi.Output[Sequence[str]]:
"""
The list of Consul ACL policies to associate with these roles.
"""
return pulumi.get(self, "policies")
@property
@pulumi.getter(name="tokenType")
def token_type(self) -> pulumi.Output[Optional[str]]:
"""
Specifies the type of token to create when using this role. Valid values are "client" or "management".
"""
return pulumi.get(self, "token_type")
@property
@pulumi.getter
def ttl(self) -> pulumi.Output[Optional[int]]:
"""
Specifies the TTL for this role.
"""
return pulumi.get(self, "ttl")
| 41.847599 | 176 | 0.629434 | 2,435 | 20,045 | 5.026694 | 0.080903 | 0.097059 | 0.093137 | 0.048529 | 0.852533 | 0.836275 | 0.813235 | 0.801144 | 0.796977 | 0.789461 | 0 | 0.004545 | 0.264605 | 20,045 | 478 | 177 | 41.935146 | 0.825792 | 0.366276 | 0 | 0.789272 | 1 | 0 | 0.063992 | 0.005991 | 0 | 0 | 0 | 0 | 0 | 1 | 0.16092 | false | 0.003831 | 0.019157 | 0 | 0.275862 | 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 |
03479b56b7ef134847e49c0ba5c66c93e2eb8bc2 | 733,611 | py | Python | temp.py | goncalo-rodrigues/thesis | c6d531b72ddeaf2320a4346912df5519138d11d7 | [
"MIT"
] | null | null | null | temp.py | goncalo-rodrigues/thesis | c6d531b72ddeaf2320a4346912df5519138d11d7 | [
"MIT"
] | null | null | null | temp.py | goncalo-rodrigues/thesis | c6d531b72ddeaf2320a4346912df5519138d11d7 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
rollouts = {10: [-10, -10, -10, -10, -10, -10, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -6, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -9, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -6, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -8, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -6, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -10, -10, -10, -10, -10, -10, -10, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -6, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -6, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -8, -4, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -6, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -9, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -6, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -6, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -2, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -9, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -9, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -2, -10, -10, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -2, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -9, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -9, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -2, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -2, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -2, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -6, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -4, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -2, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -9, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -9, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -1, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -9, -10, -10, -10, -10, -10, -4, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -6, -10, -10, -10, -10, -10, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -9, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -9, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -2, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -6, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -9, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -6, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -6, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -1, -10, -10, -10, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -1, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -6, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -6, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -2, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -2, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -6, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -6, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -9, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -9, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -9, -10, -10, -10, -6, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -2, -10, -6, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -9, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -6, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -2, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -6, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -3, -10, -8, -10, -10, -10, -10, -10, -6, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -9, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -6, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -2, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -9, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -9, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -9, -10, -2, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -10, -10, -10, -10, -10, -9, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -9, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -6, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -9, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -9, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -9, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -9, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -9, -10, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -2, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -6, -10, -10, -10, -10, -10, -10, -10, -10, -10, -2, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -10, -10, -10, -10, -10, -10, -10, -2, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -1, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -2, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -2, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -2, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -2, -10, -10, -10, -10, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -6, -10, -10, -10, -10, -10, -10, -10, -3, -10, -10, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -6, -10, -8, -10, -10, -10, -1, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -10, -9, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -6, -10, -10, -10, -10, -10, -10, -10, -10, -1, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -1, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -2, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -2, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -1, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -6, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -6, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -1, -10, -10, -10, -10, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -1, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -3, -10, -10, -10, -10, -1, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -6, -10, -10, -10, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -1, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -1, -1, -10, -10, -10, -10, -10, -6, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -1, -10, -10, -10, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, 0, -10, -10, -1, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -9, -10, -10, -10, 0, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -2, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -2, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -10, -10, -10, -10, -10, -6, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -2, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -2, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -2, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -6, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -2, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -3, -10, -10, -10, -9, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -1, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -2, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -6, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -1, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -1, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -1, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -1, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -2, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -2, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -9, -10, -10, -10, -6, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -9, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -10, -10, -6, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -1, -10, -10, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -6, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -2, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -2, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -2, -10, -10, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -6, -10, -10, -10, -10, -2, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -2, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -6, -10, -10, -10, -2, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -10, -7, -10, -3, -10, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -10, -10, -10, -2, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -1, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -1, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -1, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -2, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10, -3, -10, -10, -10, -10, 0, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -2, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -2, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, 0, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -1, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10, -10, -1, -10, -10, -10, -10, -10, -10, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, -10, -10, -10, -9, -10, -10, -10, -10, -10, -10, -10, -10, -1, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -7, -10, -10, -10, -10, -10, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -2, -1, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -1, -10, -10, -10, -10, -10, -10, -10, -10, -10, -2, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -1, -10, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10, -10, -10, -10, -4, -10, -10, -5, -10, -10, -4, -10, 0, -10, -10, -10, -6, -10, 0, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10, -2, -10, 0, -10, -10, -10, -10, -10, -10, -10, -1, -10, -10, -10, 0, 0, -10, -6, -10, -10, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, -10, 0, -10, -10, 0, 0, -10, -10, -9, -10, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 0, 0, -10, -10, -2, -10, -10, -10, -10, -10, -1, -10, -10, -10, -10, -8, -10, -10, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, -1, -10, -10, -10, -10, 0, -10, -10, 0, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -6, 0, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10, -10, -2, -10, -10, -10, -10, -10, -10, 0, 0, -10, -10, 0, -8, -10, -10, -6, -10, -10, -10, 0, -10, -10, -10, -1, 0, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, -10, -10, -1, -10, -10, -10, 0, -10, -10, -10, -10, -5, -10, 0, -10, -10, 0, -10, -10, -10, -10, -2, -10, 0, -10, -10, -4, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 0, -10, -10, -4, -10, -10, -10, -10, -10, -10, -10, -10, -7, 0, -10, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, -5, -10, 0, -10, 0, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -1, -10, -10, -10, -10, -10, 0, -10, -10, 0, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 0, -10, -10, 0, 0, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 0, -10, -10, -3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 0, -10, 0, -10, -10, -10, -10, -10, 0, -10, -10, -10, 0, -2, -10, -10, -10, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -2, -10, -10, -10, -10, -10, -10, -10, 0, -10, -10, 0, -10, -10, -10, 0, -10, -10, -10, -10, -10, -10, -2, -10, -10, -10, -10, -10, 0, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 0, -10, -10, 0, -10, -10, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, 0, -3, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, 0, 0, -10, -10, -10, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10, -10, -10, -1, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10, -10, -10, 0, -10, 0, -10, -10, -10, -10, -10, -10, 0, -1, -10, -6, -10, -1, -10, -10, 0, -10, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, -2, -10, -10, -10, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10, -10, 0, -10, -10, -10, -10, 0, -10, -4, 0, -10, 0, -10, -10, -10, 0, -10, -10, -10, -8, 0, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 0, -10, -10, -6, -10, -10, -3, 0, -10, -10, -10, -2, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10, 0, -10, -1, -10, -10, -10, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, -10, 0, -10, 0, -10, -10, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, -10, -10, -5, -10, -10, -1, -5, -8, -10, -10, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, -10, 0, -10, 0, -10, 0, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, -10, -10, -4, -10, 0, 0, -10, -10, -10, -8, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 0, -10, -10, 0, -10, -10, 0, -10, -10, -1, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, -10, 0, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10, -10, 0, 0, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10, -10, 0, -10, -10, -10, -9, 0, 0, -10, -10, -10, 0, -10, -10, -10, -10, 0, 0, -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 0, 0, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 0, -10, -10, 0, -10, -10, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, 0, -10, -4, -1, -10, -10, -10, -10, -10, -10, -10, 0, 0, -10, -10, -10, -10, -10, -10, -10, 0, -4, -10, -10, -2, 0, -10, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, 0, -10, -10, 0, 0, 0, -10, -10, -3, -10, -10, -2, 0, -10, -10, -10, -10, -10, -10, -10, 0, 0, -10, -10, -6, -10, -10, -10, 0, -10, -10, -1, -10, 0, -10, -10, -10, -10, 0, -10, -2, -10, -10, -10, -2, 0, -10, -10, 0, -10, -10, -10, 0, -10, 0, -10, 0, -10, -10, 0, 0, -10, -10, -10, 0, -10, -10, -10, 0, -10, -10, -10, 0, -1, -10, -10, -2, -10, -10, 0, -10, -10, 0, -10, -10, -10, 0, -10, -10, 0, -10, -10, -10, 0, -10, -10, -10, 0, -10, -10, -10, 0, -10, -2, -10, 0, 0, -1, -10, 0, 0, -10, -10, 0, -10, -10, 0, 0, -10, -10, -10, 0, -10, -10, -10, 0, -10, -10, -10, 0, -10, -10, -10, 0, -10, -6, -10, 0, -10, -10, -10, 0, -10, 0, 0, -10, -10, -10, 0, -10, -10, -10, 0, -10, -10, 0, -10, -10, 0, -10, -9, -10, 0, -10, -10, -10, -10, -10, -10, -10, 0, -10, -9, -10, 0, 0, -2, -10, 0, -10, -10, -10, 0, -10, -10, -10, 0, -10, -10, -10, 0, -7, -5, -10, -10, -10, 0, -10, 0, 0, -10, -10, -10, 0, -4, -10, 0, -10, -10, 0, -10, -10, -10, 0, -2, -10, -10, -10, -10, -10, -10, 0, -10, 0, -10, 0, -3, 0, 0, -10, -1, -10, 0, -10, -1, -10, 0, -10, -10, 0, -10, -10, -10, 0, -3, -10, -10, 0, -10, -10, -10, -10, -10, 0, 0, 0, -10, -10, -10, 0, -10, -10, -10, 0, -10, -10, -10, 0, 0, -10, -6, 0, -10, -10, -10, 0, -10, -3, 0, -10, -10, -10, 0, -10, -10, -10, 0, -10, -10, 0, -10, -10, -10, 0, 0, -10, -10, 0, -10, -10, 0, -10, 0, -10, 0, -10, -10, -10, 0, -10, -10, -10, 0, 0, 0, -10, 0, -10, -10, -10, 0, -10, -10, -10, 0, -10, -10, 0, -1, -10, -10, 0, -10, -1, -10, 0, -10, 0, -10, 0, -10, -10, -10, 0, -10, -10, 0, -10, 0, -10, 0, -10, -4, -10, 0, 0, -10, 0, -10, -10, -10, 0, -10, -10, -10, 0, 0, 0, -10, 0, -10, -10, -10, 0, -10, -10, -10, 0, -10, -10, 0, -10, -10, -10, 0, -10, -10, -10, 0, -10, -10, -10, 0, -10, -10, -10, 0, -10, -10, 0, 0, -10, -10, 0, -10, -10, 0, 0, -10, -10, 0, -10, -10, -10, 0, -10, -10, -10, 0, -10, -10, -10, 0, -10, -10, 0, 0, -10, 0, 0, -10, -1, -10, 0, -10, -10, -10, 0, -10, -10, 0, 0, -10, -2, 0, 0, -10, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10, 0, -10, -10, 0, -10, -10, 0, -10, -10, -3, 0, -10, -10, -10, 0, -3, -10, 0, -10, -10, -10, -10, -10, -10, -10, 0, -10, -7, 0, 0, -10, -10, -10, 0, -10, -10, 0, 0, 0, -10, 0, 0, -10, -10, 0, 0, -10, -10, -10, 0, -10, -10, -10, 0, -1, 0, -10, -10, -10, 0, -10, -10, -10, 0, -10, -10, -10, 0, -10, -10, 0, -10, -10, -1, 0, -3, -10, 0, 0, -10, -10, 0, 0, -10, -10, -10, 0, -10, -10, -10, 0, -10, -10, -10, 0, -7, -3, -10, 0, -10, -10, 0, 0, -10, 0, -10, -10, -10, -10, -10, -10, -10, 0, 0, -10, 0, -10, -3, -10, 0, -10, -10, -10, 0, -10, -10, -10, 0, 0, -10, -5, -10, -10, -10, -10, 0, -10, -2, -10, 0, -10, -10, -10, 0, -10, -10, -10, 0, -10, 0, 0, -10, -3, -10, 0, -10, -10, -10, 0, -10, 0, -10, -10, -10, 0, -10, -10, -10, 0, -10, 0, -10, 0, -10, -10, -10, 0, -10, -10, -10, 0, -10, -10, -10, 0, 0, -2, 0, 0, -10, -10, 0, -10, -10, -6, 0, -10, 0, -10, 0, 0, -10, 0, -10, -10, -10, -10, 0, -10, 0, -7, -10, -10, 0, -10, -10, -10, 0, -10, -10, -10, 0, -10, -10, -10, 0, -10, -10, 0, 0, -10, -10, -10, 0, -10, -10, -10, 0, -10, 0, 0, -10, -9, -10, 0, -10, -10, 0, -10, -10, 0, -10, -10, -2, 0, -1, -10, -4, 0, -10, 0, 0, -10, -5, -10, -10, 0, -10, -10, 0, -10, -10, -7, -10, 0, 0, 0, -10, 0, -10, -10, -10, 0, -10, -10, 0, 0, -4, -10, -10, -10, -10, -10, -10, 0, 0, -10, 0, -10, -10, 0, -10, -4, -10, 0, -10, -10, 0, -10, -10, -10, 0, -10, -10, -10, 0, -10, -10, -10, 0, -10, -10, -10, 0, -10, -10, -1, 0, -10, -10, -10, 0, -10, -2, 0, -10, -8, 0, -10, -10, -10, 0, -10, -7, 0, -10, -10, 0, 0, -10, -10, -10, 0, -10, -10, -10, 0, 0, 0, -10, 0, -8, -10, -10, 0, -10, -10, -3, 0, -10, -10, -10, 0, -10, -10, 0, -10, 0, 0, -2, -10, -10, 0, -10, -10, 0, -10, -10, -10, 0, -10, -10, -10, 0, -10, -10, -10, 0], 100: [-100, -29, -100, -100, -78, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -20, -100, -100, -100, -63, -100, -100, -48, -100, -53, -100, -53, -100, -100, -11, -98, -89, -100, -100, -100, -100, -13, -26, -60, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -46, -100, -59, -100, -100, -100, -100, -100, -100, -44, -100, -100, -100, -100, -100, -20, -100, -100, -100, -52, -100, -100, -95, -90, -100, -100, -100, -100, -100, -100, -100, -76, -6, -66, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -50, -100, -75, -3, -100, -100, -100, -100, -63, -100, -100, -100, -79, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -23, -100, -100, -93, -100, -100, -100, -100, -100, -100, -100, -100, -47, -100, -100, -73, -100, -84, -100, -100, -100, -100, -100, -100, -46, -28, -100, -100, -100, -85, -100, -20, -47, -100, -100, -52, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -7, -100, -100, -6, -54, -100, -100, -100, -100, -24, -100, -100, -100, -100, -100, -91, -100, -100, -100, -100, -86, -100, -100, -100, -83, -100, -100, -100, -92, -78, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -61, -100, -100, -100, -100, -100, -6, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -84, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -31, -100, -100, -47, -100, -8, -100, -100, -100, -100, -18, -100, -100, -100, -100, -100, -100, -28, -7, -100, -100, -100, -100, -100, -44, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -29, -46, -70, -100, -100, -100, -100, -100, -100, -100, -100, -53, -100, -8, -100, -100, -100, -100, -100, -100, -100, -30, -100, -100, -100, -100, -100, -41, -100, -100, -100, -16, -100, -84, -100, -100, -100, -100, -100, -100, -100, -100, -85, -57, -43, -100, -100, -100, -100, -21, -100, -100, -100, -100, -100, -100, -27, -100, -36, -99, -100, -100, -100, -56, -100, -5, -100, -100, -100, -100, -100, -100, -100, -20, -100, -100, -58, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -16, -63, -100, -100, -100, -100, -100, -49, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -59, -100, -70, -100, -100, -100, -100, -87, -100, -100, -100, -100, -100, -30, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -54, -100, -51, -100, -100, -18, -100, -100, -100, -100, -61, -92, -100, -100, -100, -12, -37, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -68, -100, -100, -100, -100, -100, -100, -100, -100, -100, -34, -100, -100, -100, -100, -100, -100, -100, -95, -100, -100, -100, -100, -100, -17, -100, -100, -100, -100, -100, -100, -88, -20, -6, -100, -100, -19, -100, -100, -100, -100, -100, -100, -100, -26, -100, -13, -82, -100, -100, -100, -100, -100, -100, -49, -100, -100, -100, -100, -100, -100, -100, -60, -75, -100, -100, -100, -10, -100, -100, -100, -100, -100, -13, -100, -100, -100, -100, -100, -100, -100, -7, -100, -100, -100, -100, -100, -9, -100, -100, -61, -100, -100, -100, -100, -100, -100, -100, -71, -100, -37, -100, -100, -100, -100, -100, -28, -100, -42, -100, -100, -100, -100, -100, -100, -100, -100, -8, -100, -100, -100, -100, -100, -100, -97, -100, -100, -100, -9, -32, -100, -100, -17, -100, -100, -100, -65, -100, -100, -84, -100, -100, -100, -100, -100, -100, -100, -100, -100, -51, -100, -100, -100, -100, -100, -100, -100, -100, -90, -100, -100, -51, -77, -100, -100, -100, -37, -4, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -9, -100, -38, -100, -100, -100, -100, -100, -15, -100, -10, -100, -100, -100, -100, -100, -82, -41, -70, -100, -100, -54, -100, -100, -100, -100, -100, -100, -100, -39, -100, -100, -87, -100, -100, -100, -100, -49, -100, -100, -100, -100, -100, -100, -100, -100, -100, -67, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -58, -100, -100, -78, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -37, -31, -38, -100, -100, -100, -100, -36, -100, -100, -100, -100, -36, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -39, -100, -20, -10, -100, -56, -100, -100, -100, -100, -56, -100, -55, -5, -100, -100, -100, -100, -96, -100, -74, -100, -100, -64, -100, -90, -100, -100, -100, -91, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10, -100, -100, -13, -100, -100, -100, -100, -99, -11, -100, -10, -100, -62, -100, -100, -100, -100, -100, -100, -100, -100, -5, -100, -100, -100, -39, -100, -100, -100, -100, -100, -100, -41, -100, -100, -100, -100, -100, -100, -100, -31, -78, -100, -100, -100, -100, -100, -100, -100, -100, -100, -8, -15, -100, -100, -100, -100, -60, -44, -100, -11, -48, -24, -100, -71, -100, -100, -100, -100, -100, -17, -100, -15, -100, -100, -100, -100, -100, -100, -100, -100, -100, -16, -100, -100, -100, -100, -100, -100, -100, -100, -33, -100, -100, -100, -100, -100, -100, -70, -100, -100, -100, -100, -100, -31, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -14, -8, -72, -100, -100, -100, -100, -100, -51, -100, -100, -48, -100, -100, -74, -100, -43, -73, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -27, -100, -100, -100, -100, -67, -100, -100, -100, -100, -91, -55, -100, -100, -100, -100, -100, -3, -100, -100, -100, -34, -100, -100, -35, -100, -100, -100, -18, -100, -100, -100, -100, -100, -76, -100, -100, -100, -100, -100, -100, -100, -98, -100, -52, -42, -16, -100, -22, -100, -100, -12, -100, -93, -50, -100, -100, -43, -100, -100, -100, -100, -100, -40, -100, -100, -75, -100, -100, -100, -20, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -46, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -56, -100, -100, -100, -44, -100, -100, -100, -100, -100, -48, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -53, -100, -100, -19, -100, -10, -100, -100, -100, -44, -8, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -30, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -34, -100, -100, -61, -100, -100, -33, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -4, -100, -100, -100, -100, -100, -100, -100, -100, -28, -100, -100, -100, -100, -100, -16, -100, -100, -100, -100, -100, -40, -100, -100, -40, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -76, -100, -100, -100, -95, -91, -100, -100, -100, -100, -100, -100, -100, -100, -100, -49, -50, -100, -100, -100, -100, -59, -100, -100, -100, -100, -26, -100, -100, -100, -100, -50, -100, -100, -68, -42, -100, -100, -89, -6, -6, -100, -73, -100, -12, -100, -100, -100, -100, -100, -100, -100, -100, -100, -4, -66, -100, -100, -74, -27, -19, -36, -100, -100, -46, -84, -100, -100, -100, -100, -100, -100, -100, -100, -100, -46, -100, -100, -89, -100, -100, -48, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -82, -30, -100, -100, -100, -100, -100, -100, -100, -100, -29, -100, -100, -100, -100, -100, -100, -37, -100, -100, -100, -26, -100, -100, -100, -100, -100, -100, -100, -66, -100, -100, -100, -100, -100, -100, -100, -100, -100, -97, -100, -100, -27, -100, -100, -100, -100, -100, -100, -82, -100, -100, -100, -26, -88, -100, -100, -100, -93, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -88, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -81, -100, -100, -100, -100, -100, -100, -100, -95, -100, -57, -15, -21, -100, -32, -100, -100, -100, -100, -12, -87, -100, -100, -14, -100, -100, -100, -100, -100, -100, -100, -100, -100, -55, -100, -100, -100, -100, -48, -100, -12, -35, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -79, -18, -100, -100, -100, -100, -100, -100, -100, -100, -96, -100, -72, -100, -100, -80, -35, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -76, -45, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -64, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -40, -100, -36, -100, -100, -100, -100, -75, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -14, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -93, -100, -100, -100, -100, -100, -100, -100, -100, -21, -39, -100, -100, -100, -100, -100, -100, -100, -100, -19, -100, -88, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -36, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -23, -100, -100, -100, -55, -100, -100, -100, -100, -100, -46, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -84, -100, -69, -100, -100, -100, -100, -40, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -51, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -17, -100, -85, -100, -100, -100, -58, -100, -100, -100, -100, -54, -100, -100, -100, -100, -100, -53, -100, -100, -100, -100, -81, -100, -60, -58, -79, -100, -9, -23, -100, -100, -100, -100, -100, -32, -100, -100, -100, -100, -63, -100, -31, -100, -26, -100, -100, -100, -100, -100, -100, -36, -100, -13, -100, -100, -100, -100, -100, -100, -100, -100, -71, -100, -100, -78, -100, -100, -100, -100, -100, -100, -100, -100, -100, -47, -33, -22, -100, -100, -100, -100, -82, -100, -100, -100, -100, -100, -100, -57, -100, -3, -100, -100, -100, -100, -100, -40, -100, -100, -100, -100, -100, -59, -100, -100, -100, -100, -100, -100, -44, -44, -61, -91, -100, -100, -41, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -63, -100, -100, -100, -100, -100, -100, -64, -100, -100, -100, -100, -94, -100, -100, -94, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -14, -100, -100, -100, -100, -100, -100, -100, -79, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -47, -100, -100, -100, -100, -100, -100, -100, -100, -20, -100, -100, -49, -100, -100, -100, -100, -53, -100, -100, -100, -100, -100, -100, -100, -37, -100, -100, -100, -60, -100, -100, -100, -100, -24, -99, -46, -100, -100, -100, -100, -61, -36, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -16, -33, -6, -100, -19, -100, -100, -100, -100, -100, -100, -100, -100, -100, -85, -100, -100, -100, -100, -100, -71, -100, -92, -100, -100, -100, -100, -100, -25, -100, -100, -100, -100, -98, -100, -100, -100, -100, -100, -30, -9, -44, -100, -100, -100, -100, -100, -100, -100, -100, -91, -100, -29, -100, -100, -100, -100, -44, -100, -100, -100, -100, -100, -100, -100, -100, -62, -100, -100, -100, -86, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -9, -55, -100, -100, -83, -100, -100, -100, -100, -100, -100, -100, -100, -25, -100, -38, -51, -100, -100, -100, -100, -100, -100, -84, -100, -95, -100, -100, -100, -45, -46, -100, -100, -100, -100, -100, -67, -100, -58, -100, -100, -100, -62, -100, -100, -100, -100, -100, -100, -86, -100, -100, -100, -100, -96, -100, -100, -100, -100, -100, -87, -100, -100, -31, -100, -100, -43, -100, -100, -9, -57, -100, -100, -100, -100, -100, -100, -100, -100, -96, -100, -100, -88, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -45, -100, -100, -95, -49, -100, -100, -10, -81, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -73, -79, -100, -100, -100, -100, -100, -100, -100, -100, -100, -45, -92, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -67, -43, -100, -100, -100, -61, -95, -100, -100, -100, -100, -100, -100, -53, -100, -100, -100, -5, -70, -100, -35, -100, -100, -100, -100, -100, -100, -36, -88, -100, -100, -100, -100, -79, -100, -100, -100, -100, -100, -100, -69, -100, -100, -100, -100, -100, -100, -100, -100, -100, -91, -100, -100, -100, -100, -11, -100, -100, -100, -100, -100, -96, -100, -100, -100, -67, -100, -100, -100, -100, -100, -62, -100, -36, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -9, -87, -100, -99, -100, -100, -100, -100, -100, -100, -100, -63, -16, -75, -77, -100, -100, -100, -100, -100, -100, -100, -8, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -76, -100, -100, -100, -100, -100, -52, -100, -100, -100, -92, -100, -100, -100, -100, -100, -100, -100, -100, -100, -65, -47, -11, -58, -100, -100, -100, -100, -47, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -30, -100, -100, -100, -94, -100, -67, -100, -100, -100, -100, -100, -100, -100, -100, -71, -100, -100, -100, -57, -94, -100, -100, -100, -100, -100, -55, -100, -100, -100, -58, -100, -100, -100, -59, -100, -48, -100, -100, -100, -100, -100, -100, -95, -100, -100, -100, -100, -35, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -35, -100, -20, -100, -100, -100, -100, -100, -100, -100, -100, -59, -100, -100, -11, -100, -100, -43, -97, -100, -36, -100, -100, -65, -100, -18, -100, -100, -6, -100, -95, -100, -100, -100, -73, -100, -100, -100, -50, -100, -100, -100, -35, -100, -100, -100, -93, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -20, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -99, -100, -100, -100, -100, -100, -50, -39, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -85, -100, -23, -100, -100, -100, -100, -100, -100, -92, -100, -100, -100, -100, -68, -100, -100, -100, -100, -100, -100, -100, -100, -89, -100, -100, -65, -22, -100, -100, -100, -90, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -22, -16, -100, -100, -100, -100, -100, -100, -22, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10, -9, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -48, -38, -100, -100, -100, -100, -100, -100, -100, -23, -100, -100, -100, -100, -100, -100, -100, -100, -100, -21, -43, -100, -100, -100, -100, -69, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -92, -85, -48, -100, -100, -91, -100, -100, -28, -100, -100, -100, -100, -13, -100, -100, -100, -100, -100, -100, -100, -100, -60, -83, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -50, -100, -11, -100, -100, -100, -100, -100, -37, -83, -100, -100, -100, -100, -100, -100, -100, -100, -9, -100, -100, -100, -6, -85, -91, -100, -100, -100, -100, -15, -100, -100, -100, -100, -100, -100, -67, -100, -100, -100, -100, -94, -100, -100, -100, -100, -100, -100, -100, -100, -88, -100, -42, -7, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -17, -100, -100, -100, -100, -69, -100, -100, -100, -100, -100, -100, -100, -100, -100, -63, -100, -100, -100, -100, -100, -100, -100, -100, -79, -93, -100, -30, -100, -100, -57, -51, -100, -63, -100, -100, -100, -31, -100, -100, -100, -100, -91, -100, -67, -100, -100, -100, -100, -13, -100, -76, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -83, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -65, -100, -100, -100, -100, -94, -100, -100, -100, -100, -100, -100, -100, -100, -44, -100, -100, -11, -100, -100, -100, -100, -100, -100, -100, -68, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -73, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -15, -100, -49, -100, -100, -100, -100, -100, -100, -54, -49, -100, -100, -100, -48, -100, -2, -100, -100, -100, -100, -100, -100, -63, -100, -100, -100, -100, -100, -100, -100, -69, -17, -30, -100, -100, -100, -96, -100, -100, -100, -100, -100, -39, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -82, -100, -100, -100, -100, -38, -100, -100, -53, -100, -11, -41, -100, -100, -100, -100, -100, -100, -100, -100, -11, -86, -100, -16, -100, -100, -100, -100, -100, -23, -100, -100, -100, -100, -100, -100, -100, -100, -100, -79, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10, -100, -100, -100, -100, -100, -100, -100, -100, -100, -8, -100, -61, -100, -89, -100, -100, -100, -100, -58, -100, -100, -100, -100, -100, -100, -100, -43, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -72, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -36, -51, -13, -100, -100, -100, -100, -100, -45, -96, -100, -100, -100, -100, -100, -100, -100, -79, -100, -100, -91, -100, -100, -100, -40, -100, -100, -100, -100, -100, -100, -100, -100, -15, -100, -53, -54, -100, -18, -26, -100, -100, -100, -100, -100, -100, -100, -34, -100, -100, -100, -100, -100, -100, -5, -100, -42, -54, -100, -100, -100, -100, -100, -100, -12, -100, -35, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -22, -100, -92, -100, -100, -100, -100, -36, -18, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -79, -6, -100, -100, -100, -100, -100, -51, -100, -100, -100, -100, -9, -17, -100, -100, -11, -100, -100, -100, -100, -54, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -76, -60, -48, -100, -100, -100, -100, -7, -43, -100, -100, -96, -100, -100, -100, -28, -100, -67, -100, -100, -100, -100, -100, -100, -22, -100, -100, -100, -100, -100, -100, -100, -92, -100, -100, -100, -100, -6, -100, -100, -100, -100, -100, -78, -100, -100, -100, -100, -100, -33, -100, -100, -100, -65, -37, -91, -100, -100, -100, -100, -100, -81, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -27, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -5, -100, -100, -87, -47, -100, -92, -100, -38, -100, -86, -100, -100, -100, -54, -100, -27, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -30, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -39, -100, -100, -100, -100, -24, -100, -100, -100, -100, -100, -100, -100, -100, -100, -65, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -60, -100, -12, -100, -100, -100, -100, -100, -100, -47, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -70, -32, -100, -100, -44, -100, -72, -100, -100, -100, -99, -51, -19, -100, -100, -100, -100, -59, -100, -100, -100, -100, -100, -100, -100, -79, -61, -100, -61, -100, -100, -100, -10, -100, -100, -100, -100, -100, -26, -100, -97, -100, -100, -100, -100, -80, -6, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -15, -100, -100, -100, -100, -38, -100, -100, -100, -100, -100, -100, -100, -56, -100, -100, -100, -72, -100, -100, -45, -100, -100, -100, -27, -100, -100, -100, -100, -100, -32, -11, -100, -100, -100, -100, -100, -74, -100, -100, -100, -100, -79, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -23, -100, -100, -100, -100, -100, -100, -79, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -85, -100, -100, -100, -47, -100, -30, -100, -100, -100, -100, -100, -100, -100, -86, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -23, -100, -100, -100, -100, -100, -100, -84, -100, -100, -63, -85, -100, -100, -46, -100, -100, -58, -100, -100, -100, -100, -100, -100, -100, -77, -100, -76, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -18, -100, -2, -100, -100, -100, -52, -100, -100, -48, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -43, -41, -100, -100, -100, -100, -1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -45, -73, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -33, -61, -100, -100, -86, -100, -100, -100, -100, -100, -100, -100, -100, -36, -97, -7, -100, -100, -100, -100, -100, -100, -100, -21, -100, -100, -100, -100, -100, -41, -100, -33, -100, -100, -100, -28, -100, -100, -100, -100, -100, -100, -100, -100, -98, -100, -100, -100, -100, -100, -100, -35, -100, -3, -100, -79, -100, -100, -100, -34, -100, -100, -100, -100, -100, -100, -100, -100, -99, -100, -100, -100, -100, -100, -100, -100, -10, -100, -100, -100, -100, -64, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -63, -95, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -34, -55, -100, -47, -100, -100, -100, -100, -100, -48, -100, -93, -100, -100, -100, -100, -100, -100, -6, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -70, -100, -100, -100, -100, -42, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -7, -100, -100, -73, -91, -100, -100, -100, -100, -100, -100, -100, -100, -68, -100, -100, -100, -100, -100, -37, -100, -88, -100, -100, -100, -32, -100, -100, -100, -12, -100, -100, -15, -100, -100, -100, -100, -22, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -44, -100, -77, -100, -39, -100, -100, -68, -100, -100, -100, -100, -46, -100, -100, -100, -100, -100, -100, -100, -60, -60, -100, -100, -100, -52, -100, -100, -100, -100, -100, -3, -100, -100, -100, -29, -100, -100, -100, -100, -100, -100, -27, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -47, -100, -100, -23, -68, -95, -100, -100, -100, -100, -100, -100, -19, -100, -100, -100, -42, -100, -100, -25, -100, -100, -100, -100, -100, -100, -18, -100, -100, -100, -10, -100, -100, -100, -100, 0, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -85, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -8, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -86, -51, -100, -100, -4, -100, -23, -100, -100, -35, -100, -100, -100, -65, -100, -100, -100, -100, -100, -100, -100, -75, -100, -100, -100, -100, -100, -100, -64, -83, -100, -51, -100, -100, -100, -17, -75, -67, -100, -100, -100, -100, -100, -100, -100, -100, -54, -100, -100, -44, -7, -100, -100, -100, -27, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -27, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -81, -100, -100, -100, -100, -66, -100, -100, -84, -78, -100, -17, -100, -85, -100, -100, -100, -100, -100, -100, -100, -100, -100, -4, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -28, -63, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -67, -26, -100, -100, -100, -100, -100, -5, -100, -100, -100, -100, -100, -100, -100, -100, -7, -100, -100, -100, -100, -69, -100, 0, -100, -61, -100, -100, -100, -100, -98, -100, -100, -100, -14, -95, -100, -100, -100, -100, -100, -100, -48, -100, -100, -100, -100, -100, -100, -22, -100, -100, -100, -100, -66, -100, -100, -100, -100, -100, -100, -37, -77, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -72, -100, -65, -100, -100, -100, -100, -40, -100, -100, -86, -100, -100, -100, -98, -100, -100, -34, -100, -100, -100, -100, -100, -100, -18, -100, -100, -100, -100, -100, -69, -100, -100, -100, -64, -100, -100, -64, -100, -87, -100, -48, -70, -100, -50, -100, -100, -100, -86, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -25, -100, -12, -78, -54, -89, -16, -11, -100, -100, -100, -99, -85, -100, -100, -100, -17, -100, -100, -8, -58, -6, -100, -100, -100, -100, -100, -19, -100, -100, -34, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -37, -100, -100, -100, -100, -100, -100, -91, -100, -100, -100, -100, -100, -32, -82, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -40, -100, -38, -100, -100, -100, -100, -100, -95, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -93, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -17, -25, -100, -55, -100, -100, -15, -100, -100, -100, -100, -100, -100, -74, -83, -29, -70, -100, -100, -100, -100, -100, -100, -100, -100, -36, -100, -100, -100, -100, -100, -100, -44, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -41, -100, -100, -100, -100, -100, -74, -100, -100, -72, -100, -100, -100, -100, -2, -100, -100, -100, -100, -100, -100, -52, -100, -100, -100, -17, -77, -100, -100, -100, -100, -100, -100, -100, -56, -100, -100, -3, -100, -100, -71, -71, -53, -49, -4, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -82, -40, -100, -100, -100, -34, -100, -100, -100, -100, -100, -100, -100, -100, -24, -47, -100, -100, -100, -47, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -78, -68, -100, -100, -9, -100, -100, -100, -100, -100, -94, -100, -100, -100, -51, -100, -100, -100, -100, -100, -100, -100, -6, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -56, -100, -100, -100, -100, -100, -67, -100, -100, -100, -100, -100, -100, -44, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -82, -87, -100, -100, -100, -100, -100, -100, -100, -75, -100, -100, -23, -100, -74, -100, -100, -7, -100, -81, -100, -100, -100, -100, -99, -100, -100, -58, -100, -100, -100, -100, -82, -100, -100, -100, -100, -100, -100, -100, -100, -7, -100, -100, -100, -100, -100, -100, -44, -100, -100, -100, -46, -100, -100, -50, -44, -100, -100, -100, -100, -7, -100, -100, -93, -100, -100, -100, -100, -100, -58, -100, -100, -100, -100, -100, -100, -100, -33, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -92, -100, -100, -100, -100, -7, -100, -100, -100, -100, -62, -100, -100, -76, -100, -100, -100, -100, -100, -100, -100, -13, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -63, -100, -100, -100, -100, -100, -100, -100, -100, -97, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -63, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -54, -100, -100, -100, -47, -100, -100, -100, -100, -100, -100, -1, -100, -100, -100, -100, -100, -100, -100, -100, -81, -100, -18, -100, -60, -100, -100, -66, -100, -100, -100, -100, -100, -48, -100, -100, -97, -100, -100, -65, -100, -100, -100, -100, -97, -100, -100, -100, -62, -100, -100, -100, -100, -100, -100, -53, -100, -100, -15, -6, -99, -100, -100, -100, -40, -100, -68, -100, -100, -100, -100, -100, -100, -4, -100, -100, -81, -100, -100, -100, -100, -41, -100, -100, -100, -22, -3, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -66, -17, -92, -100, -100, -100, -100, -100, -100, -100, -100, -100, -42, -100, -100, -11, -100, -100, -100, 0, -100, -100, -100, -100, -100, -57, -100, -43, -100, -100, -100, -100, -100, -100, -27, -100, -68, -100, -28, -100, -100, -100, -96, -27, -100, -100, -100, -100, -100, -100, -100, -68, -100, -41, -28, -100, -100, -100, -100, -100, -98, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -27, -100, -100, -100, -100, -13, -100, -100, -100, -100, -100, -100, -100, -100, -100, -64, -100, -73, -100, -100, -100, -72, -100, -100, -100, -100, -100, -100, -100, -100, -100, -95, -100, -76, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -86, -100, -11, -100, -66, -100, -100, -100, -75, -100, -100, -100, -59, -100, -100, -100, -100, -100, -100, -100, -32, -100, -100, -100, -100, -56, -100, -100, -100, -100, -96, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -19, -100, -100, -100, -100, -100, -100, -100, -100, -100, -42, -100, -100, -100, -80, -100, -100, -74, -37, -100, -100, -100, -100, -100, -100, -100, -19, -100, -69, -100, -100, -100, -100, -100, -100, -100, -42, -24, -100, -100, -100, -100, -100, -4, -100, -100, -100, -100, -100, -52, -45, -100, -100, -100, -100, -100, -76, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -25, -100, -100, -100, -100, -100, -100, -12, -100, 0, -100, -100, -1, -100, -100, -80, -100, -100, -100, -100, -93, -82, -100, -100, -49, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -67, -100, -100, -100, -100, -100, -100, -100, -100, -100, -25, -100, -100, -100, -100, -100, -74, -100, -100, -100, -100, -17, -100, -100, -100, -100, -100, -100, -27, -69, -100, -100, -100, -100, -100, -100, -100, -100, -100, -99, -100, -100, -41, -100, -100, -100, -100, -100, -100, -100, -36, -100, -100, -100, -100, -100, -46, -100, -100, -100, -100, -43, -100, -100, -100, -98, -100, -100, -100, -44, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -76, -100, -63, -60, -100, -2, -100, -100, -16, -100, -100, -100, -100, -100, -100, -100, -81, -100, -100, -100, -100, -100, -100, -100, -100, -5, -100, -100, -87, -100, -59, -100, -100, -100, -30, -100, -100, -100, -31, -100, -100, -100, -100, -100, -100, -100, -100, -100, -90, -100, -56, -100, -31, -100, -67, -100, -100, -41, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -38, -88, -100, -100, -100, -100, -100, -100, -87, -100, -100, -100, -100, -100, -100, -100, -100, -32, -33, -100, -100, -100, -98, -100, -100, -100, -100, -100, -100, -100, -25, -100, -100, -100, -100, -100, -100, -100, -71, -100, -51, -100, -18, -20, -74, -100, -100, -100, -100, -43, -100, -40, -100, -100, -100, -100, -100, -100, -8, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1, -100, -97, -32, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -30, -100, -100, -100, -7, -31, -100, -100, -78, -100, -85, -58, -100, -100, -100, -100, -100, -100, -100, -100, -18, -100, -24, -100, -100, -46, -100, -100, -100, -100, -100, -1, -100, -30, -100, -100, -100, -100, -100, -2, -100, -72, -100, -100, -100, -53, -30, -100, -88, -100, -100, -100, -92, -100, -100, -100, -100, -100, -100, -100, 0, -100, -100, -100, -100, -100, -100, -100, -100, -100, -68, -100, -100, -100, -100, -100, -100, -100, -100, -15, -100, -100, -100, -100, -100, -100, -100, -100, -100, -98, -100, -100, -100, -100, -100, -100, -100, -100, -81, -30, -100, -8, -100, -100, -100, -100, -100, -100, -100, -60, -56, 0, -100, -49, -100, -100, -68, -52, -100, -100, -100, -100, -100, -51, -100, -62, -100, -100, -98, -100, -100, -100, -100, -100, -28, -21, -58, -100, -100, -100, -77, -100, -100, -100, -100, -100, -100, -100, -100, -100, -88, -60, -100, -100, -97, -48, -100, -100, -100, -100, -5, -100, -100, -10, -100, -46, -27, -100, -100, -100, -100, -100, -100, -100, -100, -33, -100, -100, -100, -100, -100, -100, -100, -100, -6, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -16, -79, -100, -100, -100, -100, -100, -100, -100, -76, -100, -100, -100, -100, -100, -100, -100, -100, -26, -100, -100, -100, -100, -100, -100, -100, -48, -100, -4, -80, -64, -100, -100, -100, -39, -27, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -47, -100, -100, -100, -100, -100, -100, -56, -100, -100, -100, -100, -89, -100, -83, -100, -100, -13, -100, -100, -100, -100, -43, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -30, -100, -100, -100, -100, -100, -100, -100, -100, -100, -65, -100, -100, -100, -100, -100, -18, -100, -77, -100, -43, -100, -100, -100, -100, -100, -77, -100, -100, -100, -100, -100, -32, -100, -92, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -35, -100, -100, -100, -66, -100, -100, -100, -81, -100, -100, -100, -100, -100, -100, -100, -100, -33, -100, -100, -100, -100, -100, -61, -62, -100, -100, -38, -100, -100, -100, -100, -12, -100, -100, -62, -100, -100, -100, -100, -100, -100, -100, -100, -27, -100, -11, -100, -100, -73, -71, -89, -100, -43, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -43, -86, -22, -100, -100, -100, -63, -100, -100, -100, -100, -100, -100, -100, -17, -78, -100, -100, -100, -100, -38, -100, -87, -100, -100, -13, -100, -100, -100, -100, -13, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -47, -100, -100, -100, -100, -86, -100, -100, -41, -100, -49, -100, -13, -100, -100, -48, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -83, -100, -100, -100, -100, -100, -100, -100, -11, -98, -100, -100, -100, -100, -100, -100, -98, -100, -100, -100, -100, -37, -100, -100, -56, -100, -100, -100, -17, -100, -100, -100, -100, -24, -100, -100, -100, -100, -53, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -86, -100, -100, -100, -100, -100, -100, -100, -38, -100, -100, -100, -100, -100, -100, -50, -100, -100, -100, -100, -100, -8, -100, -38, -100, -100, -30, -79, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -68, -100, -100, -100, -40, -87, -100, -100, -100, -14, -33, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -33, -100, -100, -100, -100, -100, -100, -100, -72, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -97, -100, -100, -100, -100, -100, -100, -51, -100, -53, -41, -100, -41, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -99, -100, -36, -100, -100, -100, -100, -100, -100, -100, -100, -55, -100, -100, -100, -100, -100, -80, -100, -100, -100, -100, -100, -71, -100, -100, -75, -100, -100, -100, -100, -100, -92, -100, -100, -64, -39, -100, -100, -100, -100, -100, -100, -100, -83, -100, -45, -100, -100, -100, -100, -35, -40, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -30, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -62, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -56, -87, -100, -28, -100, -51, -4, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -84, -68, -100, -100, -87, -100, -100, -100, -100, -100, -100, -29, -100, -100, -100, -100, -100, -100, -82, -3, -100, -100, -96, -6, -100, -100, -38, -100, -100, -100, -100, -100, -100, -100, -100, -100, -88, -100, -100, -100, -100, -100, -100, -55, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -7, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -83, -100, -9, -100, -100, -87, -100, -100, -100, -100, -100, -68, -100, -62, -100, -100, -100, -100, -100, -26, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -15, -100, -60, -100, -71, -100, -54, -72, -100, -100, -100, -100, -100, -100, -100, -9, -100, -100, -100, -100, -100, -100, -4, -100, -100, -100, -73, -100, -100, -100, -100, -19, -100, -100, -100, -100, -100, -100, -26, -100, -100, -100, -6, -40, -100, -7, -100, -100, -100, -69, -100, -100, -100, -100, -100, -100, -100, -100, -94, -100, -100, -51, -34, -79, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -53, -100, -46, -100, -100, -7, -100, -100, -100, -21, -52, -100, -100, -84, -86, -100, -100, -62, -100, -76, -100, -100, -100, -100, -79, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -49, -99, -100, -100, -100, -52, -100, -100, -100, -100, -100, -100, -19, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -4, -100, -100, -100, -100, -69, -100, -100, -100, -97, -10, -100, -100, -37, -100, -100, -100, -100, -98, -100, -26, -100, -100, -100, -100, -96, -100, -49, -100, -100, -100, -100, -100, -100, -100, -100, -12, -100, -100, -100, -100, -37, -100, -100, -46, -100, -48, -100, -100, -100, -100, -100, -91, -100, -48, -100, -85, -100, -100, -100, -100, -100, -47, -100, -100, -100, -55, -66, -36, -100, -100, -100, -100, -100, -100, -81, -6, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -57, -100, -100, -31, -100, -100, -100, -58, -10, -100, -100, -100, -100, -100, -100, -100, -82, -100, -9, -100, -100, -75, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -24, -100, -4, -100, -100, -23, -43, -96, -100, -100, -100, -100, -84, -100, -82, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -78, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10, -100, -100, -100, -100, -20, -100, -100, -100, -100, -100, -100, -100, -60, -100, -100, -100, -100, -100, -100, -100, -100, -100, -56, -100, -100, -66, -100, -100, -100, -100, -45, -100, -100, -100, -100, -21, -100, -100, -100, -100, -47, -15, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -14, -100, -100, -50, -100, -100, -100, -70, -100, -100, -100, -100, -100, -100, -100, -63, -100, -100, -99, -100, -100, -100, -100, -100, -100, -100, -12, -100, -100, -100, -100, -100, -100, -100, -100, -12, -100, -100, -100, -100, -77, -100, -100, -70, -100, -100, -100, -100, -61, -66, -100, -4, -100, -100, -100, -100, -100, -100, -100, -79, -100, -87, -21, -79, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -52, -100, -100, -100, -15, -100, -94, -100, -100, -100, -19, -100, -7, -100, -100, -4, -100, -100, -21, -100, -100, -100, -100, -100, -100, -100, -14, -100, -100, -100, -100, -50, -13, -100, -100, -100, -100, -12, -100, -100, -100, -100, -100, -100, -10, -100, -100, -100, -94, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -43, -100, -100, -100, -100, -100, -100, -100, -48, -100, -100, -59, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -59, -62, -100, -100, -100, -100, -100, -100, -17, -100, -100, -100, -100, -100, -100, -100, -54, -100, -31, -45, -100, -100, -100, -100, -100, -100, -100, -76, -100, -100, -82, -100, -100, -59, -39, -100, -100, -100, -100, -23, -100, -36, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -8, -100, -45, -100, -100, -100, -100, -100, -100, -100, -100, -57, -100, -33, -100, -8, -100, -57, -100, -100, -100, -22, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -13, -100, -100, -100, -16, -100, -100, -100, -100, -100, -100, -100, -100, -43, -100, -100, -84, -15, -32, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -45, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -49, -60, -100, -100, -100, -100, -100, -100, -100, -100, -100, -98, -100, -100, -100, -100, -100, -69, -100, -100, -100, -100, -100, -100, -100, -12, -100, -100, -100, -37, -32, -100, -100, -66, -32, -100, -100, -100, -100, -100, -100, -8, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -59, -100, -100, -78, -100, -100, -100, -100, -100, -100, -47, -100, -100, -19, -100, -86, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -71, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -60, -100, -30, -40, -100, -100, -36, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -89, -27, -100, -32, -100, -11, -100, -16, -100, -100, -100, -100, -100, -100, -93, -100, -98, -100, -100, -100, -100, -100, -100, -100, -100, -47, -100, -100, -57, -80, -100, -19, -100, -100, -100, -68, -100, -100, -100, -100, -43, -100, -100, -100, -100, -100, -100, -100, -37, -100, -40, -100, -100, -100, -100, -29, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -25, -100, -100, -100, -100, -100, -100, -100, -100, -100, -86, -100, -66, -100, -100, -100, -100, -100, -100, -100, -47, -100, -100, -53, -100, -4, -100, -100, -100, -100, -59, -100, -21, -100, -100, -100, -100, -100, -100, -100, -58, -100, -100, -100, -100, -65, -100, -100, -100, -100, -100, -100, -100, -10, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -13, -88, -100, -100, -100, -100, -100, -23, -100, -100, -58, -1, -100, -100, -100, -100, -100, -100, -16, -100, -100, -10, -65, -100, -100, -100, -100, -100, -100, -100, -39, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -72, -100, -100, -22, -31, -56, -100, -100, -100, -100, -90, -94, -60, -100, -100, -100, -100, -100, -100, -97, -100, -100, -100, -100, -100, -87, -100, -72, -38, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -68, -100, -85, -100, -7, -11, -100, -100, -100, -100, -4, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -42, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -37, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -29, -100, -100, -100, -100, -100, -100, -100, -80, -61, -100, -100, -100, -38, -100, -100, -100, -9, -100, -67, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -3, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -18, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -5, -100, -14, -17, -100, -100, -100, -100, -100, -100, -100, -100, -100, -83, -37, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -31, -100, -100, -100, -35, -100, -100, -100, -57, -100, -100, -100, -42, -97, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10, -100, -100, -100, -100, -100, -19, -100, -100, -49, -100, -91, -57, -100, -100, -100, -100, -100, -91, -100, -61, -100, -100, -100, -100, -100, -100, -54, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -43, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -56, -100, -82, -100, -100, -100, -100, -4, -100, -100, -100, -100, -89, -100, -100, -100, -100, -100, -100, -100, -11, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -40, -24, -12, -100, -38, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -51, -58, -100, -39, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -46, -30, -26, -100, -43, -100, -100, -53, -100, -13, -100, -100, -12, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -33, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -63, -77, -100, -3, -100, -30, -100, -100, -100, -58, -100, -100, -100, -100, -100, -100, -100, -21, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -51, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -89, -100, -100, -100, -100, -74, -100, -100, -100, -100, -100, -100, -66, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -36, -90, -100, -100, -100, -13, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -70, -100, -97, -26, -100, -100, -100, -100, -100, -100, -100, -100, -13, -100, -100, -100, -100, -91, -100, -100, -74, -100, -100, -100, -100, -100, -100, -66, -50, -100, -100, -100, -100, -100, -100, -100, -100, -51, -100, -100, -100, -100, -100, -100, -100, -53, -100, -86, -100, -37, -100, -100, -100, -76, -69, -100, -100, -100, -100, -100, -100, -100, -21, -100, -100, -100, -16, -100, -62, -100, -100, -54, -2, -100, -100, -100, -100, -100, -100, -47, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -72, -100, -59, -100, -23, -100, -100, -100, -100, -100, -100, -33, -100, -100, -29, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -32, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -35, -100, -72, -100, -100, -100, -100, -76, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -23, -100, -100, -100, -100, -100, -100, -100, -100, -36, -66, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -93, -100, -95, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10, -52, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -93, -100, -100, -100, -100, -100, -100, -23, -100, -100, -100, -100, -100, -100, -88, -100, -100, -96, -100, -100, -100, -100, -100, -100, -28, -100, -100, -100, -80, -100, -51, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -75, -100, -100, -100, -100, -100, -100, -100, -5, -100, -100, -21, -100, -100, -100, -41, -100, -100, -100, -21, -17, -86, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -36, -89, -100, -60, -100, -74, -32, -100, -33, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -35, -100, -100, -15, -100, -100, -100, -100, -18, -60, -100, -100, -76, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -89, -100, -100, -100, -100, -100, -100, -68, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -98, -60, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -64, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -35, -100, -100, -100, -100, -100, -13, -100, -29, -100, -100, -100, -100, -100, -100, -100, -100, -44, -100, -100, -100, -100, -100, -52, -100, -100, -86, -100, -100, -18, -100, -100, -100, -100, -100, -100, -22, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -60, -76, -100, -77, -100, -100, -100, -100, -100, -16, -87, -100, -100, -100, -100, -49, -100, -100, -100, -100, -100, -100, -100, -100, -65, -19, -65, -78, -100, -100, -100, -100, -100, -83, -100, -100, -37, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -83, -100, -9, -24, -88, -100, -98, -100, -35, -100, -100, -100, -41, -100, -100, -66, -100, -100, -27, -100, -85, -100, -100, -100, -100, -100, -100, -95, -100, -85, -100, -100, -100, -100, -100, -100, -100, -100, -100, -38, -100, -100, -100, -100, -100, -100, -100, -50, -100, -18, -100, -100, -100, -100, -100, -56, -100, -100, -100, -100, -100, -100, -100, -100, -8, -100, -100, -62, -100, -100, -100, -100, -100, -100, -84, -100, -100, -100, -100, -98, -100, -54, -100, -100, -26, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -2, -100, -100, -63, -100, -100, -100, -98, -100, -100, -100, -38, -100, -100, -100, -100, -100, -16, -35, -100, -100, -15, -18, -100, -100, -100, -78, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -41, -100, -100, -100, -100, -100, -100, -100, -100, -3, -100, -100, -41, -100, -100, -100, -10, -100, -99, -92, -100, -100, -100, -56, -19, -100, -100, -100, -100, -100, -34, -22, -100, -100, -100, -49, -100, -78, -76, -100, -100, -100, -100, -100, -100, -100, -100, -80, -58, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -38, -100, -17, -100, -47, -100, -100, -76, -100, -100, -100, -100, -100, -100, -49, -19, -84, -100, -39, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -91, -100, -100, -78, -47, -28, -100, -100, -100, -100, -100, -100, -100, -100, -100, -31, -100, -100, -47, -100, -27, -85, -7, -100, -100, -58, -21, -75, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -95, -100, -100, -100, -100, -100, -100, -100, -100, -41, -55, -100, -100, -100, -100, -100, -100, -100, -42, -88, -100, -20, -100, -100, -100, -100, -100, -84, -100, -48, -100, -100, -100, -100, -100, -100, -100, -100, -100, -80, -100, -100, -100, -100, -64, -100, -100, -100, -100, -100, -100, -100, -32, -100, -21, -100, -100, -60, -15, -100, -100, -100, -100, -100, -100, -100, -100, -25, -100, -65, -100, -100, -100, -81, -64, -100, -100, -100, -100, -100, -100, -100, -100, -100, -93, -100, -100, -100, -100, -100, -87, -100, -100, -97, -15, -100, -99, -100, -100, -100, -100, -100, -100, -28, -100, -100, -100, -100, -100, -100, -100, -39, -100, -100, -33, -100, -100, -100, -100, -100, -100, -26, -100, -100, -58, -19, -100, -100, -100, -100, -70, -100, -100, -100, -41, -100, -100, -100, -88, -100, -100, -51, -100, -100, -44, -100, -100, -100, -100, -100, -100, -100, -67, -14, -100, -100, -100, -100, -58, -100, -22, -100, -100, -100, -100, -100, -81, -100, -11, -100, -100, -48, -100, -86, -100, -100, -100, -100, -76, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -89, -100, -100, -100, -100, -100, -100, -51, -100, -21, -100, -100, -100, -31, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -86, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -77, -100, -100, -100, -100, -100, -100, -56, -61, -100, -100, -100, -5, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -32, -55, -10, -100, -100, -100, -100, -100, -100, -95, -100, -100, -82, -100, -74, -100, -66, -100, -69, -100, -100, -100, -80, -100, -100, -62, -100, -100, -100, -76, -100, -100, -100, -100, -35, -100, -100, -100, -33, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -59, -25, -100, -100, -100, -100, -100, -100, -100, -98, -100, -32, -100, -100, -100, -2, -100, -32, -100, -100, -100, -100, -100, -100, -100, -99, -100, -100, -100, -100, -100, -100, -100, -1, -100, -100, -100, -9, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -57, -100, -100, -100, -100, -100, -29, -100, -100, -100, -100, -100, -60, -100, -58, -100, -100, -100, -100, -100, -100, -100, -100, -66, -63, -100, -100, -16, -100, -100, -100, -100, -100, -100, -100, -100, -23, -100, -100, -100, -100, -100, -100, -100, -100, -100, -84, -100, -100, -49, -58, -100, -100, -100, -100, -100, -46, -100, -100, -83, -100, -100, -100, -100, -100, -100, -100, -100, -50, -7, -100, -100, -100, -100, -37, -100, -100, -100, -100, -11, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -73, -100, -100, -68, -100, -100, -86, -100, -100, -100, -61, -30, -17, -100, -17, -56, -100, -100, -100, -100, -100, -100, -100, -38, -100, -34, -100, -100, -100, -8, -100, -100, -100, -30, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -31, -100, -100, -100, -100, -100, -100, -100, -100, -27, -100, -100, -100, -100, -100, -100, -100, -100, -53, -100, -100, -100, -100, -100, -48, -100, -100, -100, -100, -100, -100, -99, -100, -100, -100, -100, -100, -100, -100, -100, -63, -100, -66, -100, -100, -100, -100, -91, -100, -100, -100, -100, -100, -19, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -68, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -99, -100, -100, -89, -100, -100, -100, -100, -100, -100, -88, -100, -91, -100, -32, -70, -68, -100, -100, -100, -100, -100, -100, -63, -100, -88, -100, -21, -90, -100, -91, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -7, -100, -100, -94, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -34, -100, -100, -100, -100, -100, -100, -100, -86, -11, -100, -50, -100, -100, -100, -100, -100, -78, -100, -100, -20, -21, -100, -100, -74, -100, -100, -100, -33, -100, -100, -100, -25, -100, -73, -100, -100, -77, -100, -47, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -48, -93, -100, -100, -100, -100, -48, -100, -100, -100, -100, -100, -100, -14, -100, -100, -100, -100, -78, -100, -100, -85, -100, -100, -100, -95, -100, -100, -100, -100, -100, -100, -100, -82, -100, -100, -100, -100, -46, -100, -100, -100, -100, -100, -90, -100, -100, -99, -26, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -85, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -79, -93, -100, -40, -100, -34, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -40, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -60, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -54, -100, -100, -100, -100, -100, -100, -11, -50, -100, -100, -100, -100, -100, -100, -100, -100, -100, -72, -75, -6, -100, -100, -80, -28, -100, -44, -100, -45, -100, -100, -43, -100, -91, -100, -100, -10, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -11, -100, -100, -66, -100, -100, -100, -100, -100, -72, -100, -34, -100, -100, -100, -100, -100, -100, -24, -100, -100, -92, -100, -100, -94, -100, -100, -100, -80, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -19, -100, -100, -100, -5, -100, -100, -50, -100, -100, -100, -100, -100, -28, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -95, -100, -100, -100, -82, -100, -100, -100, -100, -91, -100, -100, -100, -100, -100, -100, -100, -100, -100, -23, -21, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -11, -100, -100, -100, -100, -100, -43, -100, -100, -100, -100, -100, -100, -84, -27, -100, -100, -74, -100, -100, -100, -100, -96, -70, -100, -100, -100, -100, -100, -100, -100, -100, -36, -100, -4, -83, -100, -100, -100, -100, -100, -100, -100, -100, -100, -36, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -23, -100, -100, -100, -52, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -85, -100, -100, -100, -100, -26, -21, -71, -28, -89, -100, -2, -100, -8, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -79, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -86, -100, -100, -100, -100, -100, -100, -98, -100, -100, -17, -100, -100, -85, -100, -100, -100, -100, -100, -100, -100, -92, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -33, -100, -100, -100, -93, -100, -100, -100, -100, -100, -10, -100, -100, -100, -79, -100, -100, -100, -1, -100, -68, -100, -100, -28, -75, -100, -100, -100, -100, -100, -100, -99, -100, -100, -100, -61, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -27, -48, -100, -99, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -7, -100, -85, -100, -100, -80, -100, -100, -83, -37, -100, -100, -100, -100, -41, -100, -96, -67, -100, -100, -100, -100, -92, -88, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -12, -100, -100, -100, -100, -100, -100, -100, -100, -99, -62, -100, -100, -100, -100, -100, -100, -100, -38, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -80, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -66, -92, -100, -100, -100, -100, -36, -100, -100, -100, -100, -100, -100, -100, -100, -37, -100, -100, -100, -100, -100, -100, -100, -100, -65, -100, -100, -100, -96, -100, -100, -100, -100, -100, -1, -100, -37, -100, -100, -100, -100, -100, -100, -100, -100, -100, -3, -100, -28, -100, -50, -100, -15, -100, -4, -100, -100, -100, -60, -71, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -36, -100, -100, -81, -100, -100, -100, -5, -100, -100, -100, -1, -100, -100, -100, -100, -100, -42, -100, -100, -100, -50, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -14, -100, -100, -27, -100, -100, -100, -100, -100, -100, -100, -100, -100, -15, -100, -100, -100, -100, -100, -100, -72, -100, -32, -100, -100, -100, -7, -100, -100, -100, -50, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -35, -100, -100, -100, -100, -23, -100, -100, -30, -100, -100, -100, -100, -25, -100, -100, -100, -100, -100, -100, -14, -9, -100, -100, -21, -100, -100, -100, -100, -100, -37, -100, -100, -100, -100, -100, -100, -100, -100, -100, -38, -62, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -72, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -26, -100, -55, -100, -100, -100, -100, -100, -42, -28, -100, -100, -66, -100, -100, -100, -96, -100, -100, -25, -100, -100, -88, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -89, -100, -100, -100, -31, -41, -13, -37, -100, -1, -100, -100, -100, -100, -100, -79, -100, -8, -100, -100, -100, -100, -22, -100, -67, -76, -100, -100, -100, -100, -100, -100, -27, -53, -100, -39, -100, -100, -100, -100, -100, -100, -100, -99, -19, -100, -100, -44, -100, -100, -100, -100, -42, -100, -100, -2, -100, -100, -100, -83, -100, -100, -43, -100, -100, -100, -62, -100, -100, -5, -100, -9, -100, -100, -100, -100, -100, -100, -100, -9, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -57, -34, -100, -100, -100, -100, -100, -100, -100, -82, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -49, -100, -97, -52, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -51, -3, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -79, -100, -100, -100, -100, -100, -100, -34, -100, -100, -100, -100, -100, -100, -100, -50, -39, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -80, -30, -100, -100, -100, -100, -100, -39, -47, -100, -28, -100, -100, -100, -100, -100, -100, -63, -100, -100, -100, -100, -100, -100, -100, -100, -100, -6, -64, -100, -100, -100, -100, -100, -100, -46, -100, -100, -70, -12, -100, -36, -100, -100, -100, -100, -100, -35, -100, -100, -100, -100, -100, -100, -100, -87, -32, -100, -100, -100, -45, -100, -46, -100, -100, -100, -100, -100, -100, -100, -40, -100, -100, -100, -100, -100, -100, -71, -100, -100, -100, -100, -100, -4, -100, -100, 0, -100, -100, -100, -100, -72, -100, -100, -100, -100, -57, -100, -100, -67, -100, -100, -100, -100, -100, -100, -100, -100, -64, -6, -100, -100, -71, -100, -100, -100, -100, -33, -93, -100, -100, -100, -100, -100, -100, -100, -100, -100, 0, -100, -100, -100, -100, -17, -100, -100, -49, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -88, -100, -100, -100, -96, -100, -100, -100, -20, -100, -100, -100, -100, -100, -100, -100, -100, -16, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -64, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -65, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -9, -100, -100, -71, -100, -100, -100, -100, -100, -100, -100, -52, -100, -100, -98, -54, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -56, -100, -100, -100, -100, -100, -32, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -98, -100, -100, -100, -100, -100, -100, -72, -100, -100, -100, -100, -100, -94, -4, -100, -100, -100, -100, -100, -99, -100, -46, -100, -100, -100, -100, -83, -100, -100, -100, -100, -44, -100, -100, -100, -100, -100, -96, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -61, -34, -100, -14, -77, -100, -100, -56, -100, -94, -100, -100, -100, 0, -100, -100, -92, -100, -90, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -13, -100, -100, -100, -100, -100, -95, -1, -100, -100, -100, -70, -65, -73, -100, -100, -100, -100, -36, -100, -100, -100, -100, -100, -100, -100, -100, -100, -42, -14, -99, -100, -86, -100, -100, -100, -100, -100, -100, -100, -100, -100, -11, -100, -100, -100, -10, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -26, -100, -100, -100, -100, -36, -52, -100, -100, -100, -100, -100, -89, -100, -100, -100, -47, -100, -51, -16, -100, -100, -100, -100, -100, -100, -100, -8, -100, -100, -100, -100, -100, -75, -100, -100, -100, -4, -100, -100, -100, -100, -100, -100, -23, -100, -100, -100, -100, -20, -100, -100, -100, -100, -100, -100, -100, -7, -100, -89, -100, -100, -100, -100, -100, -96, -100, -100, -56, -100, -100, -100, -100, -100, -100, -100, -100, -44, -100, -100, -100, -100, -27, -100, -100, -69, -100, -100, -100, -100, -100, -100, -60, -50, -100, -100, -100, -100, -20, 0, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -91, -100, -100, -100, -100, -13, -100, -24, -100, -100, -40, -55, -100, -100, -100, -100, -100, -100, -100, -25, -98, -100, -45, -100, -47, -100, -100, -100, -57, -1, -100, -100, 0, -100, -100, -100, -100, -100, -94, -100, -100, -100, -67, -100, -80, -100, -65, -100, -100, -100, -100, -100, -100, -19, -100, -100, -93, -100, -100, -100, -100, -73, -100, -12, -100, -100, -100, -100, -100, -82, -100, -50, -100, -100, -34, -100, -65, -100, -100, -86, -100, -100, -100, -100, -100, -3, -100, -100, -100, -100, -100, -100, -100, -100, -100, -30, -100, -100, -100, -100, -100, -100, -100, -11, -97, -40, -100, -100, -100, -100, -100, -100, -100, -50, -100, -100, -100, -100, -69, -100, -100, -100, -100, -100, -100, -100, -100, -100, -39, -100, -100, -23, -100, -100, -83, -100, -100, -100, -100, -100, -76, -100, -100, -100, -100, -100, -100, -100, -100, -79, -100, -100, -100, -100, -100, -91, -100, -100, -100, -100, -100, -100, -100, -100, -21, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -32, -45, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -20, -100, -100, 0, -100, -48, -41, -72, -21, -100, -65, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -25, -78, -100, -100, -69, -41, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -47, -51, -62, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -99, -100, -100, -100, -100, -100, -100, -11, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -94, -17, -100, -57, -100, -86, -100, -39, -100, -100, -100, -100, -24, -100, -100, -100, -100, -100, -100, -83, -68, -100, -100, -60, -100, -1, -100, -100, -100, -100, -59, -100, -100, -100, -100, -100, -100, -92, -100, -100, 0, -100, -100, -100, -5, -100, -100, -100, -100, -100, -100, -100, -85, -100, -100, -100, -100, -100, -40, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -40, -100, -100, -100, -100, -100, -100, -100, -100, -43, -36, -100, -9, -100, -100, -100, -100, -100, -100, -45, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -37, -100, -100, -60, -100, -100, -100, -100, -100, -100, -100, -29, -100, -100, -100, -100, -100, -6, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -93, -100, -100, -72, -100, -100, -100, -100, -100, -32, -100, -100, -100, -2, -100, -100, -100, -100, -100, -100, -100, -100, -51, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -15, -100, -100, -100, -100, -100, -100, -2, -100, -53, -100, -100, -70, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -81, -89, -100, -21, -100, -100, -100, -100, -100, -100, -4, -100, -75, -71, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -45, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -28, -1, -100, -100, -6, -100, -11, -63, -100, -100, -100, -100, -100, -100, -100, -37, -84, -100, -100, -100, -100, -100, -100, -100, -100, -100, -16, -100, -100, -68, -100, -100, -100, -100, -100, -100, -83, -100, -77, -100, -100, -100, -49, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -64, -100, -100, -100, -100, -100, -100, -39, -100, -82, -100, -100, -50, -100, -100, -100, -100, -100, -42, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -43, -100, -75, -100, -100, -63, -100, -100, -39, -100, -100, -94, -100, -31, -19, -100, -100, -100, -100, -100, -100, -100, -100, -51, -27, -21, -100, -100, -100, -100, -76, -100, -100, -100, -60, -100, -100, -100, -100, -58, -100, -100, -100, -41, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -12, -100, -100, -99, -30, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -92, -100, -100, -100, -100, -53, -100, -100, -100, -100, -100, -100, -100, -100, -91, -100, -79, -33, -100, -100, -100, -100, -100, -100, -100, -100, -100, -27, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -80, -100, -100, -63, -43, -100, -30, -100, -100, -16, -100, -100, -100, -100, -100, -100, -100, -90, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -74, -100, -100, -54, -100, -100, -100, -19, -20, -100, -91, -100, -52, -92, -100, -100, -25, -100, -23, -100, -100, -100, -100, -100, -100, -100, -100, -100, -50, -100, -100, -100, -73, -100, -89, -100, -100, -100, -100, -100, -100, -100, -49, -100, -100, -100, -73, -100, -100, -100, -100, -84, -100, -100, -100, -4, -100, -100, -100, -100, -100, -100, -100, -100, -100, -84, -100, -100, -3, -100, -100, -100, -100, -100, -100, -98, -54, -100, -100, -100, -100, -100, -100, -100, -100, -1, -100, -100, -100, -100, -100, -6, -100, -100, -100, -100, -100, -72, -100, -100, -100, -100, -100, -100, -4, -100, -100, -100, -100, -100, -32, -100, -100, -100, -100, -100, -100, -100, -100, -100, -22, -100, -100, -100, -100, -100, -86, -100, -100, -100, -100, -100, -100, -17, -100, -100, -100, -100, -100, -100, -100, -100, -100, -3, -99, -68, -100, -100, -18, -100, -100, -100, -100, -100, -60, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -5, -100, -100, -100, -100, -100, -3, -100, -100, -37, -8, -68, -31, -70, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -51, -100, -100, -100, -100, -100, -100, -100, -93, -91, -100, -66, -100, -100, -100, -100, -37, -3, -100, -49, -100, -100, -100, -56, -44, -51, -100, -100, -3, -100, -100, -100, -100, -100, -100, -100, -2, -100, -16, -100, -5, -83, -100, -100, -100, -100, -100, -100, -100, -56, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -88, -100, -100, -100, -55, -100, -59, -100, -100, -100, -100, -83, -100, -100, -100, -100, -100, -8, -100, -43, -100, -100, -80, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -63, -100, -100, -44, -100, -67, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -57, -100, -100, -84, -100, -100, -100, -100, -100, -100, -66, -100, -100, -100, -45, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -90, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -80, -47, -4, -100, -100, -100, -100, -100, -100, -100, -100, -100, -93, -100, -100, -100, -100, -100, -91, -95, -100, -100, -92, -100, -48, -100, -100, -100, -100, -100, -16, -31, -100, -57, -100, -100, -100, -100, -23, -100, -100, -100, -100, -100, -100, -100, -100, -38, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -82, -100, -100, -100, -100, -100, -100, -100, -100, -100, -20, -100, -100, -100, -91, -100, -100, -100, -100, -100, -100, -100, -84, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -63, -100, -100, -100, -100, -100, -82, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -52, -19, -100, -100, -30, -100, -100, -1, -100, -100, -44, -100, -12, -100, -100, -100, -100, -100, -100, -100, -100, -100, -57, -14, -25, -100, -100, -100, -100, -100, -100, -100, -22, -100, -100, -42, -100, -100, -100, -100, -6, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -80, -100, -100, -100, -100, -100, -100, -1, -92, -100, -100, -100, -28, -100, -90, -100, -100, -11, -100, -100, -100, -34, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -87, -100, -100, -100, -52, -100, -100, -14, -100, -100, -100, -71, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -73, -100, -100, -100, -100, -100, -100, -100, -100, -100, -89, -100, -38, -100, -100, -100, -77, -100, -100, -100, -100, -86, -17, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10, -100, -100, -100, -100, -100, -100, -1, -100, -58, -100, -100, -12, -100, -100, -100, -100, -100, -100, -100, -100, -100, -63, -100, -100, -100, -100, -100, -100, -100, -100, -25, -100, -55, -100, -100, -33, -30, -100, -100, -100, -100, -100, -100, -100, -100, -100, -85, -100, -100, -100, -100, -100, -40, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -80, -55, -6, -100, -68, -100, -100, -42, -32, -100, -100, -100, -100, -100, -100, -100, -100, -45, -97, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -96, -84, -100, -100, -100, -100, -100, -100, -100, -7, -100, -100, -100, -100, -50, -100, -100, -100, -100, -100, -100, -45, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -96, -100, -24, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -41, -100, -65, -100, -9, -100, -100, -100, -100, -100, -100, -23, -100, -55, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -48, -72, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -85, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -29, -100, -100, -100, -61, -17, -19, -100, -100, -79, -100, -100, -100, -23, -100, -100, -100, -100, -22, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -27, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10, -100, -100, -100, -100, -100, -80, -13, -100, -100, -100, -100, -100, -81, -100, -100, -100, -100, -100, -100, -82, -100, -100, -100, -100, -52, -100, -100, -100, -100, -22, -52, -100, -100, -15, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -55, -48, -100, -94, -100, -100, -100, -100, -100, -100, -100, -74, -100, -100, -100, -100, -100, -100, -51, -100, -100, -39, -100, -100, -100, -100, -100, -62, -100, -100, -100, -100, -24, -100, -100, -100, -100, -100, -100, -100, -100, -100, -43, -100, -100, -87, -100, -100, -100, -100, -54, -100, -100, -100, -100, -100, -100, -100, -74, -100, -62, -100, -100, -100, -100, -100, -100, -78, -100, -100, -100, -100, -100, -16, -100, -100, -100, -73, -100, -100, -100, -100, -100, -93, -100, -100, -68, -100, -100, -72, -100, -100, -100, -100, -100, -100, -100, -100, -100, -33, -77, -100, -100, -100, -100, -100, 0, -100, -100, -45, -61, -100, -87, -100, -100, -81, -100, -61, -100, -100, -100, -100, -100, -26, -22, -100, -10, -100, -100, -100, -100, -100, -18, -100, -100, -93, -100, -100, -100, -86, -100, -27, -76, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -18, -100, -100, -15, -100, -100, -100, -16, -100, -100, -9, -100, -6, -100, -91, -100, -56, -100, -100, -100, -100, -100, -100, -100, -39, -87, -100, -100, -100, -100, -100, -100, -100, -100, -100, -28, -100, -100, -100, -100, -100, -46, -71, -100, -89, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -92, -100, -100, -24, -100, -100, -100, -100, -100, -80, -41, -100, -49, -100, -100, -100, -100, -100, -100, -100, -77, -100, -100, -100, -100, -38, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -88, -100, -100, -100, -100, -100, -27, -100, -100, -100, -100, -100, -100, -100, -100, -60, -100, -78, -100, -100, -32, -100, -59, -100, -70, -100, -47, -100, -100, -75, -100, -100, -15, -56, -100, -100, -100, -100, -100, -100, -100, -100, -92, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -39, -71, -100, -55, -100, -100, -100, -100, -82, -100, -100, -100, -100, -100, -100, -100, -100, -60, -100, -100, -100, -11, -100, -100, -100, -100, -100, -100, -85, -100, -100, -100, -100, -100, -100, -100, -100, -100, -67, -100, -100, -100, -28, -100, -100, -100, -100, -25, -100, -100, -100, -100, -100, -100, -100, -11, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -79, -100, -100, -100, -100, -100, -100, -100, -11, -100, -100, -100, -18, -100, -99, -100, -100, -100, -29, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -44, -61, -100, -100, -100, -100, -100, -100, -100, -95, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -97, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -73, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -58, -100, -100, -100, -100, -85, -100, -100, -10, -100, -100, -100, -100, -81, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -13, -100, -100, -36, -100, -100, -100, -100, -100, -100, -100, -100, -87, -100, -100, -100, -100, -100, -100, -21, -100, -100, -100, -100, -100, -100, -84, -100, -91, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -68, -100, -100, -100, -100, -100, -100, -100, -53, -84, -100, -100, -100, -93, -98, -2, -100, -100, -100, -54, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -36, -100, -100, -100, -100, -100, -100, -100, -100, -100, -90, -100, -100, -100, -100, -100, -100, -100, -100, -100, -89, -100, -100, -72, -100, -100, -100, -100, -100, -100, -12, -100, -100, -68, -96, -100, -100, -100, -100, -100, -100, -100, -61, -100, -100, -100, -100, -43, -68, -100, -100, -100, -100, -100, -100, -100, -100, -100, -65, -100, -100, -75, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -71, -100, -100, -100, -100, -83, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -36, -100, -100, -100, -100, -100, -100, -12, -100, -100, -100, -100, -100, -100, -100, -33, -94, -100, -100, -93, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -49, -100, -100, -100, -5, -14, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -59, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -28, -100, -100, -86, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -95, -100, -100, -100, -93, -100, -100, -100, -100, -100, -100, -100, -88, -100, -100, -100, -100, -100, -100, -100, -99, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -84, -100, -100, -3, -66, -31, -100, -100, -100, -64, -86, -100, -100, -3, -100, -68, -100, -90, -100, -100, -100, -100, -100, -30, -100, -100, -5, -100, -95, -100, -100, -100, -75, -100, -100, -98, -100, -100, -93, -100, -100, -100, -100, -80, -100, -100, -100, -100, -100, -100, -100, -100, -100, -5, -100, -100, -100, -100, -100, -93, -100, -100, -100, -100, -100, -90, -100, -64, -100, -72, -100, -100, -100, -100, -100, -100, -100, -57, -2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -32, -100, -100, -100, -100, -100, -28, -100, -100, -100, -100, -100, -44, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -46, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -31, -93, -100, -100, -100, -100, -100, -100, -92, -100, -78, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -75, -100, -100, -100, -100, -100, -100, -100, -47, -100, -100, -29, -100, -56, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -15, -100, -66, -100, -100, -100, -30, -100, -100, -100, -89, -100, -93, -71, -100, -100, -100, -7, -100, -73, -100, -100, -100, -60, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -92, -100, -100, -100, -79, -100, -100, -100, -100, -100, -100, -57, -100, -100, -100, -100, -100, -100, -100, -77, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10, -100, -100, -100, -100, -100, -26, -39, -100, -100, -100, -100, -100, -100, -100, -27, -100, -100, -100, -75, -100, -100, -37, -100, -100, -75, -37, -100, -100, -100, -100, -63, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -40, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -80, -100, -100, -100, -100, -90, -100, -100, -100, -100, -100, -93, -100, -100, -100, -100, -100, -100, -100, -56, -100, -15, -100, -100, -100, -100, -100, -7, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -62, -100, -100, -100, -100, -100, -100, -100, -100, -27, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -57, -9, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -83, -100, -100, -100, -100, -45, -100, -92, -100, -100, -100, -100, -100, -100, -100, -100, -95, -100, -100, -100, -19, -100, -100, -100, -100, -100, -100, -74, -100, -100, -100, -100, -4, -100, -100, -89, -60, -100, -100, -100, -100, -82, -100, -100, -100, -100, -100, -100, -9, -100, -65, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -5, -100, -100, -100, -4, -100, -100, -43, -58, -100, -100, -100, -100, -100, -70, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -48, -40, -9, -100, -10, -100, -100, -100, -49, -27, -100, -100, -100, -100, -15, -100, -100, -100, -100, -100, -100, -100, -100, -81, -74, -100, -16, -100, -100, -100, -100, -100, -77, -100, -100, -48, -100, -100, -100, -23, -49, -100, -100, -43, -100, -100, -55, -100, -32, -100, -100, -100, -100, -48, -100, -100, -100, -100, -18, -29, -100, -71, -100, -100, -100, -100, -100, -35, -100, -100, -100, -100, -100, -100, -100, -17, -100, -100, -100, -84, -100, -100, -100, -100, -100, -100, -100, -36, -67, -83, -100, -100, -100, -100, -50, -100, -100, -100, -100, -100, -41, -100, -100, -20, -100, -100, -100, -100, -100, -100, -34, -100, -100, -100, -100, -19, -100, -68, -100, -100, -100, -100, -100, -100, -8, -100, -100, -88, -55, -100, -100, -52, -100, -100, -100, -100, -100, -100, -35, -100, -72, -100, -100, -100, -100, -100, -100, -100, -100, -91, -100, -22, -80, -100, -35, -100, -100, -100, -100, -100, -82, -100, -100, -100, -100, -100, -16, -100, -100, -100, -100, -100, -100, -5, -100, -100, -100, -100, -55, -100, -100, -100, -100, -24, -100, -100, -100, -100, -35, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -28, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -97, -100, -100, -100, -25, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -62, -100, -100, -27, -100, -100, -100, -82, -100, -26, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -36, -95, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -78, -94, -100, -100, -100, -100, -100, -100, -100, -45, -100, -100, -41, -100, -100, -100, -100, -100, -100, -66, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -44, -19, -100, -53, -100, -48, -100, -46, -100, -100, -100, -100, -40, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -93, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -43, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -31, -66, -100, -100, -100, -100, -86, -100, -100, -100, -100, -100, -100, -85, -100, -100, -100, -100, -50, -100, -100, -100, -100, -74, -100, -100, -100, -100, -100, -100, -67, -100, -26, -100, -100, -100, -73, -100, -100, -77, -100, -100, -100, -100, -100, -78, -100, -100, -100, -47, -100, -86, -100, -100, -100, -100, -100, -100, -100, -27, -100, -100, -100, -100, -100, -67, -100, -100, -100, -100, -100, -100, -100, -100, -100, -75, -100, -100, -100, -100, -100, -6, -100, -100, -100, -100, -61, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -54, -100, -100, -100, -100, -19, -100, -100, -100, -100, -22, -100, -100, -100, -100, -100, -100, -100, -81, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -92, -30, -100, -100, -100, -100, -100, -100, -49, -20, -100, -100, -60, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -78, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -64, -100, -72, -100, -100, -100, -100, -100, -100, -100, -60, -15, -100, -69, -7, -100, -100, -88, -91, -100, -70, -100, -100, -100, -100, -100, -100, -100, -100, -91, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -72, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -22, -41, -100, -100, -100, -100, -100, -100, -100, -100, -100, -47, -100, -100, -100, -100, -100, -100, -100, -100, -10, -100, -100, -64, -100, -100, -100, -87, -100, -47, -100, -100, -100, -100, -97, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -16, -84, -100, -100, -78, -100, -100, -100, -100, -100, -93, -100, -100, -36, -16, -100, -100, -100, -16, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -23, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -57, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -19, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -34, -100, -100, -100, -70, -100, -100, -100, -100, -100, -100, -100, -100, -100, -51, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -97, -100, -100, -100, -100, -100, -58, -100, -100, -70, -100, -100, -100, -100, -50, -100, -100, -92, -100, -100, -100, -40, -100, -100, -100, -100, -100, -46, -100, -100, -77, -100, -100, -100, -84, -100, -100, -100, -100, -72, -65, -100, -86, -100, -100, -100, -100, -40, -36, -100, -100, -100, -100, -53, -100, -100, -100, -100, -13, -100, -100, -100, -61, -100, -100, -100, -100, -6, -100, -100, -100, -100, -97, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -52, -100, -62, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -66, -100, -100, -100, -42, -100, -100, -100, -100, -100, -100, -49, -65, -100, -100, -100, -100, -100, -100, -100, -100, -100, -78, -100, -100, -100, -100, -100, -97, -100, -100, -68, -100, -100, -100, -100, -15, -100, -100, -90, -34, -100, -100, -100, -100, -100, -100, -96, -100, -100, -100, -100, -100, -59, -96, -100, -100, -100, -34, -100, -100, -85, -100, -100, -41, -100, -100, -100, -100, -100, -100, -100, -100, -28, -100, -100, -100, -100, -63, -78, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -31, -100, -100, -44, -100, -100, -4, -100, -57, -90, -100, -47, -100, -100, -100, -100, -100, -100, -8, -100, -100, -100, -100, -100, -100, -100, -100, -100, -55, -100, -100, -73, -100, -100, -100, -100, -100, -100, -100, -100, -79, -100, -100, -100, -100, -100, -62, -95, -100, -100, -100, -100, -24, -89, -100, -100, -100, -100, -53, -100, -100, -100, -100, -78, -100, -50, -100, -100, -100, -8, -100, -100, -100, -43, -100, -92, -100, -100, -100, -100, -100, -100, -100, -32, -100, -98, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -50, -53, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -91, -25, -100, -100, -100, -100, -100, -100, -100, -89, -100, -100, -60, -100, -100, -100, -100, -82, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -29, -100, -100, -100, -100, -57, -11, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -80, -96, -100, -100, -100, -48, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -78, -92, -100, -100, -100, -9, -100, -100, -100, -100, -100, -100, -100, -12, -100, -100, -95, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -89, -100, -100, -100, -66, -22, -100, -100, -100, -100, -100, -76, -100, -100, -100, -25, -100, -100, -100, -100, -100, -100, -100, -100, -100, -62, -100, -100, -100, -100, -100, -47, -100, -100, -100, -100, -100, -100, -90, -100, -100, -100, -100, -100, -33, -100, -100, -100, -31, -100, -100, -92, -100, -23, -100, -100, -68, -100, -100, -100, -100, -100, -100, -100, -13, -100, -100, -100, -100, -100, -83, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -48, -100, -100, -100, -100, -100, -100, -100, -56, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -50, -100, -10, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -70, -100, -100, -35, -100, -100, -100, -100, -100, -100, -61, -43, -51, -100, -100, -100, -100, -100, -100, -100, -100, -25, -62, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -62, -100, -49, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -37, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -89, -24, -89, -100, -23, -100, -100, -100, -88, -100, -100, -100, -100, -100, -100, -24, -100, -100, -100, -100, -100, -100, -100, -100, -9, -100, -100, -22, -100, -100, -100, -100, -50, -100, -100, -77, -98, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -26, -100, -100, -100, -24, -100, -17, -100, -37, -100, -100, -32, -100, -100, -100, -100, -100, -82, -100, -100, -100, -100, -100, -71, -100, -100, -7, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -9, -100, -100, -100, -100, -25, -100, -100, -31, -74, -100, -100, -100, -100, -100, -100, -100, -100, -16, -60, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -35, -100, -100, -100, -100, -100, -100, -100, -100, -23, -100, -100, -75, -92, -100, -100, -77, -100, -100, -100, -100, -100, -100, -97, -42, -100, -67, -100, -100, -100, -100, -100, -63, -100, -100, -100, -5, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -97, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -28, -100, -19, -100, -44, -100, -100, -80, -100, -100, -100, -100, -59, -100, -17, -100, -100, -100, -100, -100, -100, -100, -95, -77, -100, -100, -100, -100, -100, -100, -32, -100, -100, -100, -100, -100, -100, -100, -48, -100, -100, -100, -100, -80, -100, -100, -10, -100, -100, -100, -100, -100, -35, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -39, -100, -100, -100, -100, -100, -100, -49, -97, -43, -82, -100, -100, -100, -89, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -9, -100, -100, -100, -100, -14, -6, -100, -100, -100, -100, -47, -13, -100, -100, -100, -100, -100, -100, -100, -67, -100, -100, -100, -100, -100, -100, -41, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -22, -100, -100, -100, -100, -100, -100, -100, -51, -100, -84, -100, -100, -100, -100, -100, -100, -100, -66, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -76, -100, -55, -100, -100, -69, -16, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -22, -100, -100, -100, -100, -100, -100, -100, -100, -62, -100, -100, -100, -100, -100, -100, -100, -33, -100, -100, -100, -100, -100, -26, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -17, -100, -98, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -95, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -68, -100, -100, -100, -100, -100, -100, -100, -93, -100, -100, -74, -46, -44, -63, -100, -100, -100, -100, -82, -100, -100, -100, -100, -100, -100, -100, -100, -24, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -29, -100, -100, -100, -100, -49, -100, -100, -100, -38, -39, -91, -99, -100, -100, -100, -100, -100, -100, -54, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -51, -100, -47, -71, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -57, -100, -100, -100, -100, -100, -100, -100, -100, -81, -100, -100, -100, -100, -100, -100, -12, -100, -100, -100, -46, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -92, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -48, -42, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -33, -100, -100, -57, -100, -100, -7, -95, -100, -13, -100, -100, -100, -19, -100, -100, -100, -100, -75, -100, -38, -100, -100, -49, -87, -100, -100, -11, -100, -100, -100, -14, -100, -100, -85, -100, -100, -100, -100, -100, -100, -100, -21, -100, -100, -97, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -88, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -58, -100, -100, -100, -39, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -67, -100, -100, -80, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -76, -100, -100, -100, -100, -21, -100, -100, -100, -100, -100, -100, -100, -100, -31, -40, -100, -100, -88, -100, -100, -100, -100, -100, -100, -49, -100, -100, -82, -100, -100, -100, -100, -100, -32, -100, -100, -100, -100, -100, -80, -100, -100, -86, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -17, -100, -49, -100, -77, -100, -47, -100, -100, -100, -100, -100, -100, -100, -100, -89, -100, -100, -100, -100, -100, -100, -100, -38, -100, -100, -100, -100, -100, -87, -100, -100, -100, -39, -100, -100, -25, -100, -46, -100, -20, -100, -100, -100, -100, -100, -100, -100, -100, -72, -100, -100, -100, -100, -89, -100, -91, -100, -100, -100, -100, -72, -100, -100, -100, -100, -100, -100, -100, -100, -100, -74, -100, -100, -100, -100, -30, -100, -100, -78, -100, -100, -18, -100, -100, -36, -100, -100, -100, -100, -100, -100, -100, -100, -100, -28, -100, -100, -100, -100, -35, -100, -100, -100, -98, -100, -69, -100, -100, -100, -100, -100, -7, -91, -100, -63, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -12, -100, -100, -100, -100, -100, -100, -42, -100, -100, -91, -100, -12, -82, -100, -100, -100, -52, -100, -100, -100, -100, -100, -20, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -88, -15, -100, -100, -100, -74, -68, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -92, -100, -100, -100, -26, -100, -31, -100, -100, -100, -25, -100, -100, -100, -100, -100, -93, -6, -76, -100, -100, -100, -100, -100, -100, -100, -100, -100, -74, -100, -100, -89, -100, -100, -100, -100, -43, -29, -100, -100, -100, -100, -100, -100, -80, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -81, -100, -100, -100, -100, -100, -97, -100, -100, -100, -86, -100, -41, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -80, -2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -82, -100, -6, -100, -100, -100, -100, -58, -100, -100, -100, -100, -100, -100, -69, -13, -65, -100, -100, -100, -100, -37, -100, -100, -100, -100, -100, -80, -100, -100, -100, -25, -100, -100, -100, -100, -100, -32, -100, -100, -48, -100, -100, -100, -100, -100, -100, -18, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -61, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -48, -100, -100, -100, -100, -96, -100, -100, -46, -100, -100, -100, -100, -100, -100, -66, -100, -100, -94, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -20, -100, -100, -100, -5, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -88, -100, -100, -100, -100, -100, -51, -100, -54, -100, -100, -100, -100, -100, -100, -100, -100, -100, -96, -23, -33, -100, -100, -43, -100, -100, -100, -100, -100, -100, -43, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -41, -100, -100, -100, -100, -100, -100, -67, -100, -100, -100, -15, -100, -100, -90, -100, -83, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -7, -100, -100, -100, -74, -100, -23, -100, -100, -100, -100, -26, -100, -100, -95, -100, -100, -100, -100, -56, -100, -100, -100, -24, -100, -77, -31, -100, -100, -100, -100, -100, -67, -94, -100, -100, -100, -100, -100, -32, -80, -100, -100, -100, -15, -100, -100, -100, -100, -38, -100, -100, -100, -100, -100, -89, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -27, -100, -56, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -59, -100, -100, -100, -100, -24, -100, -100, -100, -100, -100, -52, -100, -100, -100, -42, -100, -100, -68, -67, -35, -61, -100, -100, -100, -100, -100, -100, -100, -37, -100, -82, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -65, -61, -5, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -58, -100, -100, -9, -100, -100, -100, -100, -93, -100, -100, -100, -100, -13, -44, -62, -55, -100, -49, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -46, -100, -100, -42, -100, -100, -100, -100, -100, -100, -38, -100, -100, -100, -100, -100, -28, -100, -49, -65, -18, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -29, -100, -37, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -39, -100, -100, -100, -96, -100, -100, -100, -100, -93, -100, -100, -100, -100, -100, -100, -100, -100, -100, -82, -100, -100, -100, -100, -100, -100, -40, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -49, -100, -100, -27, -100, -100, -86, -24, -100, -100, -12, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -57, -100, -100, -100, -88, -100, -100, -100, -100, -77, -14, -100, -100, -100, -100, -100, -100, -35, -100, -100, -100, -100, -100, -100, -100, -100, -12, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -34, -100, -100, -38, -100, -44, -100, -17, -100, -100, -100, -100, -100, -98, -100, -100, -100, -100, -100, -77, -100, -100, -100, -100, -48, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -60, -100, -100, -77, -59, -16, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -15, -100, -100, -100, -45, -100, -70, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -32, -100, -86, -55, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -65, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -64, -100, -100, -100, -81, -100, -18, -61, -99, -17, -100, -100, -100, -100, -100, -100, -64, -51, -92, -100, -100, -32, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -3, -100, -100, -96, -100, -100, -100, -11, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -75, -100, -100, -100, -100, -100, -100, -13, -100, -100, -100, -100, -100, -41, -100, -100, -100, -100, -100, -100, -43, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -32, -91, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -14, -100, -100, -100, -100, -100, -100, -100, -100, -100, -80, -100, -100, -100, -20, -64, -100, -100, -100, -100, -100, -100, -100, -46, -100, -100, -100, -100, -25, -100, -53, -100, -100, -100, -100, -100, -100, -100, -100, -91, -100, -100, -58, -60, -7, -100, -100, -100, -100, -78, -100, -100, -100, -46, -72, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -34, -100, -64, -100, -100, -100, -44, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -31, -100, -100, -100, -100, -100, -100, -100, -60, -100, -93, -100, -100, -100, -100, -21, -54, -54, -100, -100, -100, -88, -100, -100, -100, -100, -100, -100, -100, -53, -100, -100, -89, -100, -100, -100, -100, -100, -100, -100, -100, -100, -43, -97, -100, -100, -100, -100, -81, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -95, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -99, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -50, -100, -100, -46, -100, -100, -100, -100, -100, -100, -100, -100, -29, -50, -94, -100, -100, -100, -100, -100, -100, -40, -100, -100, -100, -56, -100, -100, -100, -100, -76, -78, -100, -12, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -53, -100, -100, -100, -100, -100, -17, -100, -100, -100, -100, -100, -100, -100, -100, -100, -4, -100, -100, -100, -16, -100, -19, -65, -100, -100, -100, -49, -100, -100, -100, -100, -100, -100, -100, -100, -100, -52, -75, -13, -100, -100, -7, -100, -100, -100, -100, -26, -100, -100, -100, -100, -100, -100, -100, -61, -100, -31, -100, -100, -100, -100, -100, -20, -100, -100, -100, -100, -75, -100, -100, -100, -96, -100, -100, -100, -100, -100, -100, -100, -79, -100, -100, -100, -100, -100, -100, -20, -100, -100, -60, -36, -100, -100, 0, -100, -100, -56, -100, -100, -100, -100, -100, -67, -3, -100, -34, -100, -100, -100, -100, -100, -100, -62, -100, -100, -100, -32, -100, -100, -100, -100, -100, -51, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -78, -100, -30, -100, -100, -98, -100, -91, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -32, -100, -100, -100, -100, -100, -23, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -20, -100, -72, -100, -100, -100, -14, -100, -100, -100, -100, -41, -100, -100, -100, -100, -27, -73, -100, -21, -14, -100, -100, -95, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -19, -100, -100, -100, -100, -100, -92, -100, -100, -100, -100, -100, -100, -100, -100, -100, -13, -100, -45, -24, -100, -100, -100, -100, -100, -100, -100, -100, -83, -100, -100, -38, -100, -100, -65, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -95, -100, -100, -100, -100, -21, -100, -100, -100, -13, -79, -100, -12, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -94, -100, -100, -100, -100, -100, -100, -40, -100, -100, -14, -36, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -89, -100, -100, -100, -100, -100, -100, -100, -78, -100, -100, -100, -100, -100, -100, -100, -100, -62, -52, -100, -100, -100, -100, -100, -100, -100, -24, -100, -100, -45, -100, -12, -100, -100, -100, -100, -100, -100, -11, -100, -100, -34, -100, -100, -100, -100, -100, -100, -100, -100, -100, -16, -50, -100, -100, -72, -99, -100, -100, -23, -100, -100, -100, -100, -100, -70, -82, -100, -100, -39, -93, -100, -100, -100, -100, -100, -100, -92, -100, -100, -100, -100, -100, -100, -100, -100, -99, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -92, -100, -100, -100, -100, -98, -100, -100, -100, -100, -100, -82, -100, -100, -100, -100, -100, -100, -100, -78, -100, -100, -100, -74, -100, -100, -31, -100, -100, -100, -100, -20, -100, -100, -43, -100, -100, -100, -100, -52, -100, -49, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -98, -100, -100, -100, -100, -100, -100, -100, -100, -56, -100, -100, -100, -57, -18, -9, -66, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -28, -81, -100, -100, -100, -100, -83, -33, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -84, -100, -41, -100, -100, -82, -100, -100, -80, -100, -100, -22, -46, -100, -100, -100, -100, -100, -100, -100, -15, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -79, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -99, -49, -52, -100, -14, -100, -100, -70, -100, -100, -100, -39, -100, -100, -100, -100, -100, -100, -100, -100, -100, -19, -100, -100, -100, -40, -100, -100, -85, -100, -100, -100, -100, -100, -100, -100, -100, -100, -32, -100, -100, -100, -100, -88, -100, -100, -86, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -53, -100, -100, -100, -98, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -99, -25, -17, -100, -100, -100, -100, -51, -30, -30, -99, -62, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -79, -99, -100, -100, -100, -100, -42, -100, -13, -100, -100, -80, -100, -5, -100, -100, -20, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -69, -100, -69, -100, -100, -100, -100, -100, -100, -64, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -12, -100, -100, -100, -100, -100, -100, -100, -100, -90, -100, -100, -100, -100, -44, -100, -100, -100, -100, -100, -100, -100, -100, -100, -60, -88, -19, -100, -96, -100, -100, -100, -100, -29, -100, -100, -28, -100, -100, -100, -88, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -58, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -69, -100, -100, -12, -100, -100, -100, -100, -100, -100, -100, -100, -43, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -81, -100, -100, -100, -100, -100, -100, -100, -36, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -90, -100, -100, -100, -24, -100, -100, -100, -100, -100, -100, -51, -80, -100, -100, -100, -50, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -73, -100, -100, -100, -100, -59, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -46, -100, -100, -57, -100, -100, -100, -100, -100, -48, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -88, -91, -100, -100, -100, -100, -100, -100, -100, -100, -47, -100, -100, -100, -100, -12, -100, -59, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -52, -79, -100, -100, -100, -100, -100, -100, -100, -100, -100, -38, -100, -100, -100, -100, -100, -29, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -24, -100, -100, -100, -100, -100, -100, -100, -100, -94, -100, -100, -39, -40, -48, -22, -100, -100, -100, -100, -81, -100, -100, -100, -100, -19, -100, -100, -100, -9, -100, -100, -100, -100, -100, -57, -100, -100, -39, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -61, -68, -49, -100, -100, -100, -100, -34, -90, -100, -46, -100, -100, -72, -100, -100, -100, -33, -100, -100, -100, -11, -100, -100, -100, -100, -100, -100, -100, -66, -100, -38, -42, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -46, -100, -100, -100, -100, -100, -69, -100, -100, -100, -100, -100, -100, -100, -100, -70, -30, -100, -100, -100, -100, -100, -36, -93, -87, -100, -100, -100, -100, -71, -100, -100, -100, -100, -100, -100, -100, -19, -100, -100, -100, -100, -79, -100, -100, -100, -100, -97, -100, -100, -100, -100, -100, -100, -79, -68, -100, -100, -100, -100, -100, -100, -25, -73, -100, -100, -100, -100, -100, -92, -69, -100, -100, -73, -100, -78, -100, -100, -100, -59, -100, -59, -100, -37, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -21, -100, -37, -100, -100, -81, -100, -11, -100, -100, -100, -45, -100, -100, -100, -100, -100, -100, -46, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -86, -53, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -61, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -75, -100, -100, -100, -41, -100, -100, -100, -100, -39, -100, -100, -100, -100, -100, -100, -100, -100, -100, -11, -100, -56, -26, -100, -100, -100, -68, -100, -100, -100, -100, -100, -100, -100, -100, -100, -54, -100, -100, -100, -10, -89, -100, -100, -100, -100, -67, -100, -100, -100, -100, -79, -100, -100, -100, -17, -100, -33, -87, -100, -100, -100, -54, -100, -20, -100, -43, -100, -100, -100, -81, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -40, -100, -100, -100, -78, -100, -100, -50, -100, -100, -100, -100, -100, -100, -17, -100, -100, -100, -24, -94, -100, -100, -4, -100, -100, -100, -100, -100, -93, -100, -100, -100, -100, -94, -55, -100, -100, -100, -100, -100, -100, -49, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -51, -84, -100, -100, -100, -100, -100, -100, -45, -100, -100, -100, -72, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -24, -69, -100, -100, -100, -100, -100, -100, -100, -31, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -85, -100, -100, -40, -23, -100, -81, -100, -100, -100, -78, -100, -100, -100, -100, -100, -100, -100, -100, -100, -64, -100, -100, -62, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -72, -100, -22, -100, -83, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -47, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -78, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -82, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -63, -100, -55, -51, -100, -100, -100, -100, -100, -100, -100, -47, -100, -100, -100, -100, -100, -100, -100, -100, -100, -62, -100, -4, -83, -100, -100, -100, -29, -100, -100, -24, -100, -100, -22, -80, -100, -100, -100, -100, -100, -100, -23, -100, -57, -21, -100, -100, -100, -100, -100, -100, -100, -100, -93, -55, -100, -100, -100, -100, -100, -100, -34, -100, -82, -44, -70, -100, -62, -99, -100, -100, -56, -100, -100, -100, -100, -100, -45, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -28, -100, -37, -100, -100, -100, -100, -73, -100, -100, -100, -100, -29, -100, -100, -100, -100, -100, -56, -100, -100, -82, -39, -100, -100, -100, -46, -93, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -25, -100, -100, -100, -100, -100, -100, -100, -100, -72, -92, -100, -100, -100, -3, -100, -92, -100, -100, -100, -100, -14, -100, -100, -68, -100, -100, -100, -100, -100, -100, -40, -100, -93, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -68, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -74, -100, -100, -95, -19, -100, -100, -100, -13, -100, -100, -100, -100, -46, -100, -100, -100, -100, -27, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -9, -100, -100, -100, -100, -100, -100, -100, -79, -100, -7, -100, -39, -100, -100, -100, -100, -100, -100, -100, -100, -13, -100, -100, -100, -100, -100, -100, -25, -100, -100, -100, -29, -50, -100, -100, -100, -100, -100, -100, -63, -41, -100, -76, -100, -100, -100, -100, -100, -100, -60, -100, -100, -100, -100, -100, -100, -100, -100, -89, -100, -67, -43, -100, -18, -57, -100, -100, -100, -100, -100, -100, -100, -100, -100, -16, -100, -100, -55, -100, -100, -61, -100, -27, -100, -100, -100, -12, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -14, -100, -100, -100, -100, -70, -100, -100, -100, -36, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -90, -100, -100, -62, -37, -100, -100, -100, -100, -60, -100, -100, -100, -100, -100, -100, -100, -28, -36, -100, -100, -100, -100, -100, -100, -100, -93, -100, -100, -41, -100, -100, -100, -100, -100, -100, -100, -56, -100, -100, -100, -100, -74, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -63, -100, -100, -100, -100, -100, -100, -100, -100, -100, -91, -100, -100, -100, -100, -100, -100, -12, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -45, -100, -44, -100, -100, -100, -100, -100, -15, -100, -100, -100, -100, -100, -100, -14, -100, -69, -100, -95, -100, -100, -100, -100, -100, -100, -100, -7, -100, -100, -38, -100, -100, -100, -100, -100, -38, -100, -100, -100, -100, -100, -97, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -22, -90, -100, -100, -100, -100, -100, -100, -9, -100, -100, -100, -100, -94, -100, -100, -100, -100, -100, -100, -100, -100, -44, -64, -100, -100, -96, -100, -100, -100, -72, -100, -100, -100, -100, -100, -100, -76, -100, -100, -18, -100, -100, -100, -100, -100, -100, -37, -32, -5, -100, -100, -100, -100, -73, -100, -46, -100, -100, -100, -100, -21, -100, -100, -100, -75, -100, -100, -100, -100, -100, -11, -100, -100, -34, -100, -100, -100, -100, -100, -57, -100, -100, -100, -100, -100, -100, -87, -28, -100, -100, -100, -100, -36, -16, -100, -88, -60, -100, -100, -64, -100, -100, -100, -100, -12, -100, -100, -100, -100, -100, -56, -100, -100, -100, -100, -100, -23, -100, -100, -100, -100, -100, -100, -100, -26, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -7, -17, -100, -100, -31, -100, -18, -78, -100, -100, -100, -100, -100, -30, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -29, -100, -69, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -27, -100, -100, -100, -100, -77, -100, -100, -59, -100, -35, -100, -100, -14, -100, -100, -100, -100, -100, -100, -39, -100, -100, -100, -100, -100, -100, -58, -100, -100, -82, -100, -100, -100, -100, -100, -5, -100, -100, -100, -100, -100, -44, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -69, -100, -100, -100, -93, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -61, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -89, -100, -100, -100, -100, -100, -100, -90, -100, -100, -100, -100, -100, -34, -93, -100, -100, -58, -100, -100, -100, -18, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -32, -100, -100, -100, -100, -100, -100, -100, -100, -100, -13, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -19, -100, -73, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -80, -8, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -16, -100, -100, -19, -44, -100, -100, -30, -100, -100, -100, -100, -100, -96, -100, -100, -100, -79, -86, -100, -100, -70, -100, -100, -100, -100, -100, -96, -100, -100, -100, -28, -100, -100, -100, -16, -100, -100, -100, -100, -100, -100, -60, -100, -100, -100, -100, -100, -26, -100, -100, -100, -50, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -62, -58, -8, -100, -51, -100, -25, -100, -100, -45, -48, -100, -100, -91, -100, -100, -100, -100, -100, -100, -100, -100, -100, -84, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -76, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -29, -100, -100, -100, -100, -100, -100, -100, -48, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -51, -100, -100, -100, -100, -100, -100, -100, -100, -100, -59, -100, -100, -100, -100, -96, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -58, -100, -26, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -97, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -61, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -63, -100, -100, -100, -100, -100, -96, -100, -100, -82, -100, -100, -100, -100, -48, -100, -86, -100, -83, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -3, -100, -100, -100, -95, -100, -100, -26, -100, -100, -100, -100, -100, -100, -99, -100, -100, -100, -100, -84, -20, -100, -100, -100, -100, -100, -100, -87, -100, -100, -100, -100, -100, -33, -100, -43, -100, -100, -100, -100, -24, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -89, -100, -100, -100, -100, -100, -100, -52, -41, -100, -100, -100, -100, -100, -100, -100, -100, -44, -100, -100, -100, -100, -100, -83, -100, -90, -100, -45, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -55, -100, -23, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -50, -100, -100, -100, -26, -100, -56, -100, -100, -80, -100, -100, -100, -100, -100, -100, -100, -57, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -76, -100, -100, -100, -100, -100, -76, -100, -100, -100, -100, -100, -100, -66, -42, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -65, -100, -100, -100, -100, -100, -100, -100, -70, -100, -100, -100, -100, -100, -66, -100, -100, -100, -100, -35, -100, -100, -100, -100, -90, -88, -100, -100, -100, -100, -76, -100, -100, -100, -100, -68, -100, -27, -100, -100, -100, -100, -100, -69, -100, -100, -100, -100, -100, -90, -100, -100, -93, -100, -100, -100, -100, -85, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -28, -39, -100, -100, -100, -100, -100, -100, -100, -19, -100, -7, -100, -68, -100, -100, -100, -68, -100, -100, -6, -100, -100, -100, -100, -100, -100, -100, -100, -82, -100, -2, -100, -100, -100, -100, -100, -100, -100, -100, -66, -63, -97, -100, -65, -100, -95, -100, -100, -100, -100, -26, -100, -45, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -71, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -78, -100, -100, -63, -100, -100, -100, -100, -100, -66, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -22, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -79, -100, -100, -23, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -45, -100, -21, -40, -12, -100, -100, -100, -32, -34, -100, -100, -100, -100, -100, -98, -100, -100, -100, -24, -100, -100, -100, -100, -98, -100, -100, -37, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -32, -100, -100, -100, -100, -100, -100, -100, -100, -59, -100, -100, -100, -96, -9, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -66, -76, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -62, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -96, -100, -100, -100, -100, -100, -39, -100, -100, -97, -100, -100, -94, -100, -100, -100, -100, -100, -100, -100, -100, -10, -100, -100, -62, -42, -18, -100, -70, -46, -42, -25, -100, -68, -100, -100, -100, -100, -100, -100, -100, -100, -100, -21, -100, -100, -28, -97, -100, -100, -22, -4, -100, -100, -100, -18, -58, -100, -100, -4, -100, -100, -30, -53, -100, -100, -100, -100, -100, -58, -100, -100, -100, -53, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -69, -100, -100, -100, -100, -100, -100, -100, -100, -48, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -94, -100, -100, -100, -100, -85, -79, -100, -100, -100, -100, -100, -51, -100, -100, -100, -7, -100, -93, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -15, -100, -57, -100, -100, -100, -100, -89, -100, -100, -100, -100, -100, -100, -100, -62, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -48, -17, -100, -100, -100, -100, -34, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -44, -100, -100, -100, -100, -100, -100, -100, -100, -39, -100, -100, -100, -100, -100, -100, -100, -88, -100, -100, -61, -100, -100, -70, -100, -100, -100, -100, -100, -100, -100, -100, -100, -92, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -61, -73, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -29, -100, -100, -100, -100, -100, -100, -100, -45, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -35, -100, -100, -100, -100, -100, -100, -100, -52, -100, -62, -100, -100, -100, -55, -100, -100, -100, -100, -100, -27, -100, -100, -100, -100, -89, -100, -100, -22, -100, -35, -100, -54, -100, -100, -100, -100, -100, -100, -100, -87, -100, -100, -100, -100, -100, -100, -100, -100, -38, -100, -100, -81, -100, -100, -100, -98, -100, -100, -100, -100, -100, -100, -100, -100, -100, -40, -100, -100, -100, -100, -100, -100, -18, -33, -100, -100, -100, -100, -76, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -64, -100, -100, -100, -93, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -33, -100, -100, -100, -77, -100, -100, -42, -100, -100, -76, -100, -72, -100, -100, -100, -100, -100, -100, -38, -21, -67, -100, -100, -100, -100, -100, -100, -100, -100, -29, -100, -100, -100, -100, -100, -95, -100, -100, -100, -30, -27, -100, -65, -100, -100, -65, -100, -64, -100, -20, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -50, -100, -100, -100, -100, -100, -46, -100, -100, -53, -68, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -28, -100, -88, -97, -100, -100, -100, -100, -100, -18, -100, -100, -100, -100, -61, -100, -100, -100, -100, -100, -100, -100, -53, -100, -100, -82, -100, -100, -100, -100, -100, -100, -100, -100, -100, -97, -100, -100, -100, -100, -100, -100, -100, -100, -59, -100, -100, -100, -100, -100, -96, -100, -100, -100, -100, -100, -100, -100, -83, -39, -100, -100, -100, -100, -100, -98, -82, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -54, -100, -100, -100, -100, -100, -100, -14, -27, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -70, -100, -100, -100, -100, -100, -100, -13, -100, -100, -100, -100, -100, -100, -100, -28, -100, -100, -100, -100, -100, -49, -100, -100, -100, -100, -87, -100, -100, -36, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -99, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -40, -100, -100, -77, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -36, -100, -100, -33, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -28, -81, -100, -100, -41, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -77, -93, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -54, -100, -100, -50, -30, -100, -100, -72, -100, -100, -21, -100, -100, -100, -100, -100, -100, -100, -100, -19, -100, -100, -100, -100, -100, -100, -53, -100, -100, -100, -100, -100, -20, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -16, -100, -94, -100, -100, -100, -62, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -39, -74, -100, -100, -100, -100, -65, -100, -100, -100, -90, -25, -19, -88, -100, -100, -100, -100, -12, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -15, -100, -100, -100, -58, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -63, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -64, -100, -100, -50, -42, -100, -100, -100, -44, -100, -100, -100, -100, -100, -100, -100, -100, -34, -100, -100, -100, -16, -100, -100, -100, -100, -100, -100, -100, -100, -100, -64, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -37, -20, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -26, -100, -100, -100, -100, -100, -100, -100, -29, -100, -100, -100, -100, -100, -100, -100, -87, -100, -100, -100, -100, -100, -84, -100, -100, -100, -100, -75, -100, -100, -100, -100, -100, -32, -100, -100, -100, -99, -100, -100, -100, -100, -100, -100, -100, -36, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -78, -100, -100, -100, -100, -100, -91, -100, -100, -60, -23, -100, -100, -100, -24, -71, -100, -100, -100, -100, -100, -100, -28, -100, -83, -74, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -60, -100, -100, -100, -100, -72, -100, -16, -86, -100, -100, -100, -36, -100, -100, -100, -100, -100, -38, -100, -53, -71, -100, -100, -25, -100, -100, -100, -100, -100, -100, -34, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -32, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -54, -100, -100, -100, -100, -100, -100, -100, -100, -16, -100, -49, -100, -100, -100, -100, -100, -100, -22, -100, -100, -100, -100, -24, -84, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -60, -100, -100, -100, -38, -8, -100, -100, -21, -100, -100, -100, -100, -100, -100, -100, -100, -24, -100, -100, -100, -100, -100, -100, -100, -46, -81, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -14, -100, -100, -100, -100, -100, -100, -100, -36, -55, -100, -100, -55, -49, -55, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -29, -100, -100, -100, -100, -83, -100, -100, -100, -17, -100, -81, -100, -100, -84, -96, -100, -100, -100, -100, -52, -100, -100, -25, -100, -100, -100, -100, -100, -100, -79, -100, -100, -100, -100, -65, -100, -100, -100, -100, -93, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -64, -100, -100, -100, -100, -100, -100, -100, -100, -29, -100, -100, -16, -100, -100, -100, -100, -100, -100, -71, -100, -100, -100, -100, -49, -100, -100, -100, -100, -100, -76, -100, -100, -100, -100, -100, -100, -78, -100, -100, -100, -100, -100, -100, -54, -100, -100, -100, -100, -100, -62, -100, -100, -100, -100, -100, -100, -100, -63, -100, -100, -100, -100, -73, -100, -65, -100, -29, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -78, -100, -100, -36, -100, -100, -32, -100, -100, -100, -100, -81, -92, -100, -100, -100, -90, -100, -49, -16, -86, -100, -100, -100, -34, -72, -100, -100, -100, -100, -95, -100, -56, -100, -100, -45, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -91, -100, -100, -100, -100, -77, -45, -100, -100, -100, -100, -100, -17, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -89, -100, -29, -52, -100, -85, -100, -100, -100, -100, -100, -100, -44, -100, -100, -100, -51, -100, -100, -100, -100, -15, -24, -100, -100, -50, -100, -100, -100, -81, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -69, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -44, -100, -100, -100, -99, -100, -100, -47, -100, -100, -100, -100, -100, -49, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -56, -100, -100, -100, -100, -100, -32, -100, -100, -100, -100, -100, -100, -4, -100, -100, -100, -100, -100, -21, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -27, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -24, -100, -100, -100, -10, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -21, -47, -100, -100, -54, -100, -100, -19, -12, -100, -15, -100, -100, -100, -100, -100, -60, -100, -100, -100, -100, -100, -100, -100, -77, -100, -100, -20, -100, -45, -100, -100, -100, -63, -100, -48, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -99, -100, -100, -45, -77, -100, -100, -100, -100, -100, -15, -100, -100, -100, -100, -100, -100, -49, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -40, -64, -56, -100, -100, -100, -100, -100, -4, -32, -100, -44, -100, -82, -100, -100, -100, -100, -100, -100, -100, -37, -62, -100, -100, -100, -100, -95, -95, -100, -100, -100, -100, -98, -100, -100, -100, -100, -100, -100, -11, -37, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -60, -100, -100, -100, -100, -5, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -59, -100, -100, -100, -100, -100, -100, -44, -100, -100, -100, -100, -100, -100, -100, -100, -100, -66, -100, -100, -100, -100, -100, -53, -100, -100, -100, -100, -100, -100, -100, -20, -56, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -70, -100, -97, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -55, -100, -100, -59, -92, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -70, -100, -100, -100, -100, -100, -100, -100, -100, -97, -100, -9, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -78, -100, -28, -100, -100, -100, -100, -100, -100, -37, -100, -100, -100, -82, -100, -100, -100, -100, -100, -98, -27, -100, -100, -100, -100, -100, -100, -100, -100, -100, -53, -100, -100, -100, -100, -23, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -47, -100, -96, -100, -100, -19, -100, -48, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -78, -66, -49, -100, -100, -100, -100, -67, -100, -100, -100, -100, -100, -100, -100, -100, -48, -100, -89, -100, -100, -100, -100, -100, -40, -100, -70, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -38, -100, -100, -100, -100, -59, -100, -100, -100, -76, -100, -29, -100, -100, -100, -100, -100, -51, -100, -100, -24, -100, -100, -100, -100, -100, -85, -100, -100, -100, -100, -100, -100, -47, -100, -100, -100, -100, -100, -34, -100, -100, -100, -100, -100, -22, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -66, -100, -100, -100, -100, -100, -16, -31, -100, -100, -100, -100, -100, -100, -76, -100, -19, -100, -100, -100, -100, -100, -100, -100, -100, -32, -97, -69, -100, -100, -100, -100, -100, -52, -100, -100, -42, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -61, -100, -57, -100, -100, -100, -100, -42, -100, -100, -100, -100, -16, -100, -100, -100, -17, -100, -91, -100, -100, -70, -37, -100, -48, -16, -100, -87, -100, -100, -100, -100, -100, -100, -100, -100, -56, -100, -100, -100, -100, -100, -100, -100, -100, -100, -67, -100, -100, -100, -100, -100, -100, -100, -41, -100, -100, -46, -28, -39, -100, -100, -100, -100, -100, -92, -100, -81, -100, -100, -100, -100, -100, -71, -100, -37, -54, -100, -48, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -21, -100, -68, -100, -42, -100, -100, -100, -100, -100, -100, -100, -27, -100, -100, -100, -100, -83, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -27, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -16, -100, -100, -100, -100, -100, -100, -100, -100, -100, -96, -100, -100, -100, -98, -100, -100, -100, -100, -69, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -89, -100, -100, -100, -100, -100, -100, -11, -100, -57, -100, -100, -100, -100, -100, -100, -100, -100, -20, -100, -93, -100, -100, -45, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -91, -100, -100, -100, -100, -100, -100, -100, -20, -86, -100, -100, -100, -100, -100, -100, -100, -100, -100, -2, -100, -100, -100, -35, -100, -100, -26, -35, -100, -100, -64, -100, -85, -100, -100, -100, -100, -100, -100, -42, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -87, -100, -100, -100, -100, -100, -100, -100, -100, -100, -29, -100, -100, -100, -100, -100, -100, -100, -100, -100, -78, -79, -100, -100, -100, -100, -100, -60, -100, -100, -84, -58, -100, -100, -100, -100, -100, -100, -100, -100, -100, -64, -100, -100, -100, -100, -100, -100, -100, -79, -100, -100, -100, -93, -60, -100, -100, -100, -26, -100, -80, -43, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -59, -100, -100, -100, -42, -100, -100, -87, -100, -100, -18, -100, -100, -100, -100, -100, -100, -100, -100, -100, -53, -100, -31, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -26, -100, -100, -100, -92, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -50, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -74, -100, -37, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -92, -100, -85, -100, -100, -100, -100, -100, -100, -56, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -69, -100, -100, -100, -100, -100, -100, -100, -78, -100, -100, -40, -23, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -44, -100, -100, -100, -100, -100, -7, -100, -100, -100, -100, -100, -100, -100, -100, -100, -41, -100, -100, -100, -41, -100, -73, -100, -82, -100, -100, -100, -100, -34, -43, -34, -100, -100, -100, -100, -100, -100, -95, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -69, -22, -64, -100, -100, -92, -100, -100, -75, -100, -100, -100, -100, -100, -21, -100, -100, -100, -57, -100, -64, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -20, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -41, -100, -100, -100, -12, -75, -100, -100, -100, -100, -63, -55, -100, -100, -15, -5, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -20, -28, -100, -100, -47, -100, -100, -79, -100, -64, -100, -100, -100, -100, -100, -74, -49, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -66, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -21, -100, -100, -100, -100, -100, -100, -100, -100, -2, -59, -100, -100, -100, -9, -28, -98, -100, -100, -100, -11, -100, -100, -100, -100, -100, -100, -27, -39, -100, -100, -100, -85, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -18, -100, -100, -100, -100, -100, -100, -54, -18, -45, -78, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -91, -100, -76, -44, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -86, -100, -100, -100, -100, -100, -100, -100, -100, -100, -87, -100, -100, -100, -100, -34, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -83, -100, -100, -100, -100, -100, -100, -65, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -60, -100, -100, -100, -100, -100, -100, -62, -100, -100, -100, -100, -100, -100, -100, -100, -100, -91, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -68, -100, -100, -48, -100, -100, -100, -100, -100, -16, -17, -100, -100, -100, -100, -100, -29, -100, -44, -100, -100, -100, -100, -100, -100, -100, -53, -100, -97, -100, -100, -100, -100, -19, -100, -77, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -57, -61, -100, -66, -100, -36, -100, -39, -22, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -28, -100, -100, -30, -100, -100, -100, -100, -100, -100, -100, -83, -100, -100, -100, -100, -100, -39, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -86, -100, -100, -100, -100, -100, -96, -100, -100, -100, -100, -71, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -81, -100, -74, -100, -100, -100, -100, -100, -100, -70, -100, -100, -100, -100, -100, -100, -100, -100, -100, -22, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -70, -100, -100, -100, -100, -22, -100, -100, -100, -6, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -49, -94, -100, -100, -100, -100, -100, -100, -100, -74, -100, -100, -100, -100, -100, -69, -100, -98, -100, -100, -100, -49, -100, -100, -100, -100, -100, -100, -11, -100, -62, -100, -100, -88, -100, -100, -100, -100, -100, -100, -53, -100, -98, -34, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -78, -100, -83, -100, -100, -100, -100, -100, -100, -12, -100, -100, -100, -100, -100, -100, -100, -23, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -58, -100, -100, -36, -100, -100, -100, -100, -100, -17, -12, -100, -100, -90, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -61, -84, -100, -100, -100, -100, -100, -100, -100, -59, -100, -100, -46, -100, -100, -100, -100, -86, -100, -100, -100, -100, -100, -88, -100, -100, -100, -100, -100, -24, -100, -100, -100, -100, -100, -100, -29, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -14, -100, -100, -100, -82, -13, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -90, -100, -64, -100, -100, -100, -100, -71, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -69, -100, -100, -100, -100, -100, -25, -100, -17, -100, -100, -100, -100, -100, -15, -100, -59, -100, -100, -100, -100, -21, -100, -100, -100, -100, -9, -100, -100, -100, -100, -100, -100, -100, -81, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -96, -100, -9, -100, -100, -64, -100, -100, -100, -100, -49, -100, -100, -100, -100, -88, -100, -100, -100, -100, -100, -100, -100, -93, -62, -100, -100, -100, -100, -100, -100, -100, -100, -93, -100, -100, -100, -100, -90, -100, -100, -100, -19, -100, -100, -100, -100, -51, -41, -100, -100, -100, -100, -100, -22, -21, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -25, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -20, -100, -100, -100, -30, -100, -100, -100, -100, -100, -100, -28, -100, -100, -100, -100, -79, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -42, -100, -100, -63, -100, -100, -12, -100, -100, -71, -100, -100, -100, -83, -100, -7, -98, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -16, -100, -8, -100, -100, -100, -100, -100, -100, -100, -10, -100, -100, -100, -100, -100, -100, -100, -100, -100, -68, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -65, -17, -51, -100, -100, -43, -100, -100, -100, -100, -100, -100, -49, -100, -100, -100, -100, -100, -100, -100, -100, -30, -100, -100, -100, -100, -75, -100, -100, -100, -100, -100, -75, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -59, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -80, -100, -100, -53, -100, -100, -100, -100, -100, -62, -100, -100, -100, -100, -100, -100, -96, -95, -19, -100, -100, -100, -28, -100, -35, -100, -100, -100, -100, -100, -100, -100, -100, -100, -24, -100, -30, -100, -100, -100, -100, -14, -100, -100, -100, -45, -54, -100, -72, -100, -100, -100, -100, -100, -100, -100, -100, -100, -76, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -96, -100, -100, -100, -100, -42, -100, -16, -100, -100, -100, -99, -100, -100, -72, -75, -92, -100, -100, -100, -100, -100, -100, -100, -100, -43, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -78, -27, -100, -34, -100, -100, -100, -100, -100, -100, -100, -75, -100, -100, -100, -100, -99, -1, -100, -100, -100, -97, -100, -77, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -58, -100, -100, -16, -100, -100, -100, -100, -100, -71, -100, -100, -100, -100, -100, -100, -100, -100, -62, -100, -100, -100, -100, -100, -34, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -26, -100, -100, -41, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -69, -47, -100, -100, -100, -100, -19, -55, -100, -100, -100, -100, -100, -100, -31, -100, -28, -100, -100, -100, -100, -100, -27, -100, -83, -100, -100, -100, -100, -100, -63, -100, -100, -56, -3, -100, -100, -100, -100, -100, -58, -100, -100, -100, -100, -100, -100, -100, -100, -35, -100, -100, -100, -100, -100, -100, -100, -100, -11, -47, -100, -29, -100, -100, -50, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -27, -100, -46, -100, -22, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -86, -100, -100, -6, -100, -66, -100, -100, -100, -100, -100, -100, -45, -100, -100, -100, -100, -100, -54, -100, -100, -100, -100, -100, -63, -100, -100, -100, -100, -93, -100, -70, -100, -100, -100, -100, -100, -100, -100, -28, -100, -69, -100, -100, -100, -100, -100, -100, -100, -100, -92, -79, -100, -100, -100, -12, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -42, -100, -21, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -86, -100, -100, -100, -100, -100, -100, -100, -100, -10, -100, -100, -91, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -95, -100, -100, -32, -100, -59, -100, -100, -100, -100, -100, -100, -100, -35, -21, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -68, -100, -100, -100, -100, -51, -100, -100, -100, -100, -100, -100, -100, -100, -40, -48, -100, -100, -100, -100, -100, -100, -29, -95, -10, -100, -100, -100, -100, -10, -57, -100, -100, -6, -100, -100, -100, -100, -94, -100, -100, -7, -100, -100, -100, -62, -84, -100, -34, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -37, -100, -100, -100, -12, -100, -25, -100, -47, -100, -100, -100, -100, -100, -100, -100, -62, -100, -100, -100, -100, -96, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -46, -100, -100, -100, -100, -15, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -12, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -24, -100, -100, -100, -100, -100, -100, -100, -100, -54, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10, -100, -100, -100, -70, -100, -100, -100, -100, -100, -100, -100, -74, -100, -100, -100, -100, -100, -14, -100, -100, -100, -100, -100, -100, -100, -100, -100, -52, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -49, -54, -100, -100, -100, -65, -100, -100, -100, -100, -100, -100, -100, -84, -81, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -29, -100, -65, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -33, -100, -100, -100, -100, -100, -100, -100, -8, -100, -70, -100, -100, -71, -100, -100, -100, -100, -100, -100, -100, -100, -100, -48, -100, -100, -100, -100, -47, -100, -100, -63, -100, -100, -100, -100, -100, -100, -100, -100, -94, -100, -85, -31, -100, -100, -100, -100, -48, -100, -100, -75, -100, -32, -100, -100, -100, -100, -100, -16, -100, -100, -15, -100, -18, -100, -100, -53, -100, -100, -43, -100, -100, -100, -100, -100, -100, -100, -5, -100, -12, -100, -100, -100, -100, -100, -100, -100, -57, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -5, -100, -100, -100, -100, -64, -100, -100, -100, -100, -100, -100, -100, -72, -100, -47, -100, -100, -85, -100, -100, -100, -100, -100, -100, -100, -100, -16, -100, -100, -100, -100, -100, -100, -23, -100, -100, -5, -100, -100, -100, -100, -100, -78, -100, -8, -41, -100, -15, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -43, -100, -100, -100, -100, -100, -73, -100, -100, -100, -100, -100, -100, -100, -100, -100, -44, -100, -100, -100, -100, -100, -100, -100, -100, -22, -43, -100, -100, -100, -69, -100, -100, -100, -75, -100, -100, -100, -100, -100, -100, -100, -40, -100, -52, -100, -100, -100, -100, -74, -100, -82, -100, -100, -100, -100, -100, -100, -21, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -92, -100, -100, -100, -50, -100, -100, -100, -18, -47, -100, -100, -100, -100, -100, -100, -100, -100, -36, -100, -100, -100, -100, -100, -100, -48, -100, -100, -100, -100, -100, -100, -100, -19, -54, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -65, -100, -100, -100, -100, -100, -100, -100, -100, -38, -100, -100, -100, -100, -100, -100, -61, -100, -100, -100, -100, -100, -100, -100, -42, -100, -100, -100, -20, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -32, -100, -100, -100, -100, -70, -100, -100, -100, -27, -100, -100, -100, -100, -100, -100, -100, -100, -77, -73, -100, -100, -100, -100, -100, -29, -100, -94, -19, -100, -61, -100, -100, -100, -100, -80, -55, -57, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -16, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -70, -36, -100, -59, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -79, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -76, -100, -100, -21, -100, -100, -100, -100, -100, -100, -100, -100, -25, -100, -100, -100, -100, -100, -100, -100, -87, -100, -100, -100, -77, -100, -100, -100, -100, -100, -91, -100, -100, -100, -100, -48, -94, -100, -55, -100, -100, -100, -100, -65, -100, -100, -100, -100, -100, -100, -100, -99, -100, -100, -100, -9, -100, -100, -100, -82, -100, -62, -100, -100, -100, -100, -100, -100, -100, -32, -100, -100, -100, -84, -100, -100, -100, -100, -100, -100, -100, -44, -100, -100, -84, -100, -36, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -31, -100, -100, -100, -100, -37, -46, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -16, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -78, -9, -100, -100, -100, -100, -100, -100, -100, -49, -100, -96, -100, -100, -100, -100, -100, -100, -100, -28, -100, -95, -100, -100, -100, -100, -100, -76, -100, -100, -100, -29, -69, -100, -100, -100, -100, -100, -76, -100, -100, -100, -100, -100, -98, -100, -100, -18, -100, -100, -100, -90, -100, -100, -100, -67, -100, -100, -64, -100, -100, -100, -30, -100, -100, -100, -25, -100, -100, -73, -100, -100, -81, -100, -100, -100, -100, -100, -100, -96, -77, -100, -100, -100, -100, -11, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -34, -100, -52, -100, -100, -37, -100, -100, -100, -19, -100, -100, -100, -100, -100, -100, -100, -94, -100, -100, -21, -60, -100, -100, -100, -100, -100, -100, -100, -29, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -16, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -73, -100, -100, -86, -100, -100, -100, -100, -100, -100, -100, -35, -100, -100, -100, -100, -86, -100, -44, -100, -100, -100, -100, -100, -38, -100, -100, -100, -100, -100, -100, -100, -100, -100, -8, -100, -100, -100, -100, -53, -100, -100, -25, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -71, -100, -100, -100, -89, -100, -100, -100, -100, -14, -46, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -39, -34, -100, -100, -100, -100, -100, -71, -100, -55, -100, -100, -100, -100, -100, -100, -45, -100, -100, -100, -95, -100, -100, -31, -82, -100, -100, -100, -71, -100, -100, -100, -100, -100, -100, -100, -100, -100, -87, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -93, -100, -100, -100, -100, -100, -7, -14, -100, -100, -47, -32, -100, -100, -100, -100, -100, -70, -100, -100, -100, -100, -100, -100, -100, -91, -100, -44, -100, -100, -100, -100, -100, -100, -100, -100, -100, -79, -100, -100, -100, -100, -100, -100, -100, -100, -100, -60, -29, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -34, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -16, -43, -100, -100, -100, -29, -100, -100, -100, -100, -100, -26, -100, -100, -100, -100, -54, -100, -100, -100, -100, -47, -42, -100, -100, -100, -100, -100, -100, -100, -100, -100, -90, -100, -92, -100, -100, -59, -100, -91, -100, -100, -100, -100, -100, -100, -100, -100, -100, -39, -100, -100, -100, -100, -100, -100, -100, -100, -100, -94, -100, -100, -45, -100, -100, -39, -100, -100, -100, -100, -43, -100, -100, -9, -100, -100, -100, -100, -100, -100, -100, -100, -100, -65, -100, -100, -100, -100, -100, -100, -68, -100, -100, -100, -100, -100, -7, -100, -76, -100, -100, -100, -100, -100, -48, -100, -100, -25, -100, -100, -100, -100, -35, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -25, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -94, -100, -86, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -16, -100, -100, -100, -100, -17, -63, -100, -100, -100, -100, -100, -61, -100, -100, -100, -79, -100, -74, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -39, -100, -100, -100, -100, -100, -23, -100, -100, -100, -100, -100, -56, -100, -100, -100, -21, -100, -100, -15, -100, -91, -100, -100, -100, -100, -100, -100, -100, -100, -100, -90, -100, -89, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -23, -100, -6, -100, -100, -100, -100, -100, -100, -100, -4, -100, -100, -100, -100, -100, -100, -68, -100, -100, -100, -100, -100, -100, -50, -100, -100, -100, -100, -100, -95, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -11, -100, -100, -100, -68, -100, -100, -100, -100, -100, -25, -100, -100, -100, -100, -28, -100, -100, -100, -65, -47, -100, -47, -100, -100, -100, -100, -100, -100, -100, -100, -55, -100, -100, -100, -100, -100, -47, -33, -98, -100, -100, -100, -49, -100, -100, -100, -97, -100, -33, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -38, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -87, -100, -54, -100, -100, -100, -66, -9, -100, -100, -100, -100, -81, -100, -41, -100, -84, -100, -51, -100, -100, -100, -100, -100, -100, -100, -100, -41, -100, -100, -100, -100, -100, -100, -99, -100, -100, -74, -100, -100, -100, -100, -100, -100, -86, -100, -100, -11, -100, -100, -100, -18, -57, -82, -100, -100, -100, -100, -78, -100, -100, -88, -100, -100, -100, -43, -100, -100, -100, -100, -100, -100, -7, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -68, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -37, -100, -100, -87, -100, -38, -100, -100, -100, -100, -100, -99, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -56, -100, -100, -77, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -48, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -41, -100, -77, -51, -38, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -35, -100, -100, -9, -100, -100, -100, -100, -100, -100, -100, -100, -39, -100, -100, -100, -100, -39, -100, -100, -41, -100, -100, -100, -100, -100, -100, -16, -100, -100, -100, -100, -100, -100, -100, -100, -100, -57, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -54, -100, -100, -100, -100, -100, -100, -100, -100, -97, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -68, -55, -100, -100, -49, -100, -100, -100, -100, -81, -100, -100, -100, -100, -100, -33, -100, -89, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -65, -100, -80, -100, -100, -100, -100, -88, -100, -100, -100, -100, -81, -100, -100, -100, -100, -100, -100, -21, -100, -100, -100, -26, -100, -100, -100, -100, -100, -18, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -31, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -59, -100, -100, -100, -100, -100, -100, -86, -100, -100, -100, -100, -100, -35, -100, -100, -100, -25, -100, -46, -75, -100, -9, -39, -100, -80, -100, -100, -100, -100, -100, -25, -42, -100, -100, -100, -95, -100, -100, -33, -100, -70, -100, -100, -100, -100, -65, -100, -85, -100, -100, -100, -100, -46, -100, -100, -100, -85, -100, -100, -100, -100, -14, -100, -100, -100, -100, -100, -100, -51, -100, -100, -31, -35, -100, -100, -100, -43, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -18, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -66, -100, -100, -38, -100, -100, -100, -21, -100, -100, -100, -100, -100, -100, -9, -100, -100, -70, -100, -100, -100, -100, -100, -64, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -47, -74, -100, -56, -100, -100, -100, -100, -72, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -93, -100, -100, -100, -100, -27, -100, -100, -100, -24, -100, -100, -72, -100, -100, -100, -100, -100, -100, -100, -100, -25, -100, -100, -100, -100, -13, -67, -100, -100, -37, -100, -100, -100, -40, -100, -100, -100, -100, -100, -34, -100, -100, -100, -100, -100, -95, -100, -100, -100, -100, -100, -100, -100, -33, -100, -100, -100, -100, -77, -100, -30, -100, -100, -100, -92, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -44, -100, -100, -100, -100, -100, -100, -100, -100, -63, -100, -19, -100, -100, -100, -20, -100, -100, -100, -100, -100, -100, -31, -100, -100, -100, -100, -100, -62, -100, -100, -100, -100, -100, -100, -100, -100, -100, -87, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -28, -100, -100, -100, -75, -100, -100, -100, -100, -100, -100, -69, -100, -100, -100, -72, -100, -100, -100, -14, -100, -100, -100, -66, -30, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -33, -100, -70, -100, -63, -88, -100, -100, -100, -100, -100, -100, -82, -100, -100, -100, -86, -100, -100, -100, -100, -100, -100, -100, -92, -100, -41, -67, -100, -100, -100, -100, -100, -100, -100, -36, -100, -100, -100, -100, -100, -100, -100, -67, -100, -100, -100, -100, -29, -100, -100, -100, -100, -100, -100, -46, -100, -100, -100, -100, -100, -78, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -52, -100, -100, -42, -100, -100, -100, -25, -100, -69, -100, -72, -100, -33, -100, -100, -100, -100, -13, -100, -100, -100, -100, -100, -49, -91, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -66, -100, -100, -100, -100, -100, -100, -100, -100, -40, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -68, -100, -100, -100, -100, -100, -100, -75, -79, -100, -7, -100, -100, -100, -99, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -92, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -20, -100, -100, -20, -100, -17, -100, -100, -100, -100, -9, -100, -100, -100, -100, -100, -100, -100, -100, -60, -100, -100, -100, -100, -100, -100, -100, -100, -100, -23, -87, -100, -54, -100, -100, -100, -100, -100, -100, -100, -90, -50, -100, -100, -100, -100, -39, -100, -100, -45, -72, -100, -100, -85, -100, -100, -100, -100, -100, -100, -63, -100, -100, -81, -100, -89, -100, -100, -100, -100, -100, -100, -82, -100, -87, -100, -100, -100, -100, -100, -100, -58, -100, -100, -100, -100, -100, -100, -36, -100, -85, -100, -100, -100, -89, -28, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -83, -100, -100, -100, -100, -100, -100, -54, -100, -100, -100, -100, -59, -37, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -26, -100, -100, -100, -100, -100, -88, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -72, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -20, -100, -100, -100, -100, -100, -21, -100, -100, -100, -100, -100, -83, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -52, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -99, -100, -100, -100, -100, -100, -99, -72, -100, -100, -51, -100, -39, -100, -36, -100, -100, -100, -100, -100, -100, -100, -43, -100, -22, -100, -100, -100, -100, -100, -100, -98, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -49, -100, -10, -100, -100, -100, -100, -100, -100, -100, -54, -43, -100, -100, -100, -100, -72, -100, -100, -100, -24, -100, -100, -100, -100, -100, -100, -100, -21, -100, -100, -100, -42, -100, -100, -100, -87, -100, -51, -33, -100, -100, -100, -100, -100, -100, -48, -100, -100, -100, -100, -100, -100, -100, -100, -8, -100, -100, -100, -100, -100, -100, -100, -53, -100, -100, -38, -65, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -37, -100, -42, -100, -100, -100, -96, -56, -100, -100, -100, -100, -100, -100, -100, -67, -100, -100, -100, -100, -100, -100, -100, -100, -79, -100, -100, -25, -4, -100, -52, -66, -100, -100, -100, -24, -100, -100, -100, -100, -100, -100, -100, -37, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -85, -100, -100, -100, -100, -100, -100, -100, -100, -18, -100, -100, -100, -100, -100, -99, -100, -85, -100, -100, -100, -15, -100, -100, -100, -92, -100, -45, -100, -100, -100, -100, -73, -100, -100, -100, -100, -100, -100, -100, -100, -100, -40, -100, -100, -100, -100, -100, -49, -100, -100, -100, -100, -34, -100, -100, -100, -100, -100, -100, -100, -100, -47, -100, -64, -100, -100, -55, -100, -100, -37, -100, -100, -100, -100, -37, -78, -100, -100, -100, -100, -100, -100, -62, -100, -100, -100, -100, -36, -100, -100, -100, -100, -100, -26, -100, -100, -100, -100, -100, -100, -100, -100, -69, -100, -100, -100, -100, -100, -31, -100, -97, -100, -56, -100, -11, -100, -100, -100, -80, -100, -100, -55, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -45, -100, -100, -13, -100, -100, -100, -100, -100, -100, -74, -70, -92, -100, -100, -35, -100, -100, -100, -100, -100, -100, -100, -100, -61, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -76, -100, -100, -100, -100, -100, -100, -100, -100, -28, -100, -100, -100, -100, -100, -100, -100, -100, -32, -100, -100, -100, -100, -100, -100, -68, -100, -100, -100, -100, -100, -64, -100, -100, -100, -100, -100, -100, -73, -100, -100, -100, -100, -100, -100, -100, -100, -100, -21, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -21, -100, -100, -100, -24, -100, -41, -100, -100, -100, -100, -27, -100, -100, -100, -100, -100, -100, -100, -100, -100, -36, -100, -100, -100, -66, -100, -100, -100, -69, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -77, -100, -100, -100, -33, -100, -100, -4, -100, -100, -100, -100, -78, -77, -100, -100, -100, -100, -76, -71, -100, -100, -95, -99, -100, -100, -100, -100, -100, -100, -18, -22, -59, -16, -100, -52, -100, -100, -64, -100, -100, -100, -100, -100, -100, -26, -100, -100, -100, -100, -100, -100, -100, -7, -25, -100, -100, -100, -100, -100, -100, -84, -100, -100, -100, -100, -50, -100, -100, -75, -22, -58, -100, -100, -100, -100, -84, -30, -100, -28, -100, -100, -100, -74, -100, -100, -100, -100, -13, -100, -22, -100, -100, -100, -100, -80, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -45, -40, -100, -100, -100, -100, -100, -100, -52, -100, -100, -100, -67, -100, -100, -100, -100, -100, -100, -89, -75, -100, -100, -100, -100, -100, -100, -100, -68, -100, -100, -76, -100, -77, -76, -100, -100, -100, -100, -100, -100, -100, -100, -78, -100, -100, -100, -100, -14, -100, -100, -100, -100, -100, -100, -100, -100, -12, -100, -100, -98, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -52, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -65, -69, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -95, -100, -90, -100, -100, -100, -100, -100, -100, -77, -100, -100, -75, -100, -100, -62, -100, -100, -100, -96, -100, -12, -100, -56, -23, -100, -47, -100, -100, -100, -50, -100, -21, -100, -78, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -70, -100, -81, -100, -100, -100, -100, -100, -100, -40, -100, -100, -100, -100, -100, -100, -100, -100, -26, -88, -100, -100, -100, -100, -100, -100, -100, -12, -100, -100, -22, -100, -100, -93, -24, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -60, -14, -100, -100, -100, -100, -100, -100, -100, -100, -83, -43, -100, -100, -15, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -61, -100, -100, -100, -100, -100, -53, -30, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -5, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -89, -65, -40, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -3, -100, -100, -100, -61, -100, -100, -100, -100, -82, -100, -100, -100, -100, -100, -28, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -69, -100, -50, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -71, -100, -100, -100, -52, -100, -100, -100, -100, -100, -100, -100, -9, -100, -100, -100, -100, -100, -56, -51, -15, -100, -100, -10, -100, -77, -100, -100, -54, -100, -11, -100, -100, -68, -100, -60, -100, -100, -100, -100, -100, -100, -80, -100, -100, -100, -100, -82, -6, -100, -100, -100, -100, -100, -100, -100, -100, -95, -100, -100, -100, -100, -27, -100, -100, -100, -100, -100, -16, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -91, -100, -78, -100, -100, -100, -100, -71, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -6, -100, -100, -100, -95, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -85, -100, -100, -100, -57, -100, -100, -100, -100, -100, -62, -100, -100, -22, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -51, -100, -100, -100, -100, -42, -96, -100, -100, -73, -100, -41, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -53, -100, -100, -100, -100, -100, -100, -56, -100, -100, -20, -100, -100, -90, -100, -100, -100, -76, -100, -10, -100, -100, -100, -100, -100, -100, -100, -100, -54, -100, -10, -100, -92, -100, -64, -100, -49, -100, -100, -100, -100, -100, -93, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -11, -79, -100, -67, -100, -100, -100, -100, -100, -100, -100, -100, -78, -100, -100, -100, -100, -100, -22, -100, -100, -100, -100, -100, -88, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -93, -100, -100, -100, -100, -100, -100, -100, -100, -100, -78, -40, -6, -100, -14, -50, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -23, -100, -100, -100, -100, -100, -100, -100, -48, -100, -100, -100, -100, -100, -85, -100, -100, -100, -100, -100, -100, -18, -100, -100, -78, -100, -100, -100, -100, -100, -65, -100, -100, -47, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -47, -73, -100, -100, -6, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -60, -27, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -58, -100, -100, -100, -100, -100, -88, -100, -34, -100, -100, -100, -100, -100, -100, -100, -100, -18, -100, -100, -100, -100, -100, -100, -85, -100, -100, -100, -100, -25, -100, -100, -100, -100, -100, -57, -100, -100, -100, -100, -100, -34, -100, -91, -100, -100, -100, -100, -100, -18, -66, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -70, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -23, -100, -100, -18, -100, -100, -23, -100, -100, -20, -100, -7, -100, -100, -100, -100, -1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -71, -100, -100, -100, -100, -99, -23, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -62, -100, -100, -9, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -81, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -32, -100, -100, -100, -96, -100, -100, -100, -100, -100, -28, -100, -100, -2, -100, -100, -100, -53, -100, -100, -100, -95, -100, -57, -100, -100, -100, -100, -100, -100, -100, -100, -100, -43, -100, -100, -35, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -19, -100, -100, -100, -100, -75, -100, -100, -100, -100, -100, -100, -100, -100, -100, -20, -100, -100, -100, -100, -38, -100, -100, -85, -100, -100, -100, -100, -47, -100, -100, -100, -100, -100, -100, -100, -37, -100, -100, -100, -100, -100, -100, -11, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, 0, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -67, -100, -100, -100, -100, -100, -100, -100, -100, -99, -21, -13, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -64, -100, -100, -100, -37, -100, -100, -100, -100, -100, -100, -100, -100, -92, -100, -100, -17, -100, -100, -35, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -58, -100, -100, -100, -100, -32, -100, -100, -100, -100, -24, -100, -100, -100, -68, -100, -100, -100, -17, -100, -100, -100, -69, -100, -62, -100, -100, -36, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10, -100, -100, -100, -8, -100, -100, -100, -100, -100, -100, -100, -64, -100, -100, -14, -100, -100, -100, -20, -100, -100, -100, -100, -10, -100, -100, -100, -100, -100, -100, -100, -18, -59, -82, -100, -100, -100, -100, -100, -100, -46, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -97, -100, -100, -100, -100, -100, -100, -100, -100, -29, -47, -100, -35, -100, -100, -100, -69, -11, -100, -100, -64, -100, -100, -100, -100, -100, -100, -100, -41, -63, -38, -39, -100, -86, -99, -100, -100, -100, -100, -100, -100, -100, -29, -100, -100, -100, -100, -100, -100, -100, -100, -97, -100, -100, -100, -71, -100, -100, -100, -100, -100, -96, -97, -100, -24, -100, -100, -100, -100, -100, -52, -100, -100, -100, -100, -100, -83, -100, -8, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -27, -100, -100, -100, -100, -73, -100, -100, -100, -100, -100, -100, -100, -100, -2, -100, -100, -100, -100, -100, -100, -100, -77, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -67, -39, -100, -100, -11, -100, -100, -13, -100, -53, -19, -100, -100, -100, -100, -100, -100, -79, -100, -100, -100, -100, -100, -100, -100, -89, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -59, -100, -100, -100, -100, -51, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -58, -100, -100, -100, -100, -100, -60, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -25, -100, -100, -100, -49, -100, -19, -100, -100, -43, -100, -100, -100, -100, -100, -100, -64, -100, -60, -100, -100, -100, -100, -100, -93, -100, -100, -100, -100, -100, -100, -100, -100, -100, -78, -100, -41, -100, -100, -100, -100, -100, -6, -100, -22, -88, -96, -49, -100, -100, -19, -100, -100, -58, -51, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -23, -57, -100, -100, -7, -100, -100, -100, -77, -100, -100, -21, -100, -100, -100, -65, -36, -38, -100, -100, -22, -100, -78, -100, -100, -100, -100, -100, -100, -100, -18, -81, -100, -100, -19, -100, -83, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -25, -100, -100, -100, -100, -100, -100, -62, -100, -100, -100, -76, -42, -100, -100, -100, -100, -100, -100, -100, -100, -100, -76, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -76, -100, -24, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -36, -100, -100, -100, -100, -100, -72, -100, -100, -100, -100, -100, -100, -100, -95, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -72, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -46, -74, -100, -16, -100, -100, -100, -100, -100, -100, -100, -84, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -20, -100, -100, -100, -100, -100, -33, -100, -100, -64, -100, -100, -100, -47, -100, -100, -100, -7, -64, -100, -100, -100, -100, -100, -63, -100, -100, -100, -100, -57, -100, -25, -100, -60, -63, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -83, -56, -100, -100, -100, -64, -100, -100, -100, -100, -100, -100, -20, -100, -100, -64, -100, -27, -100, -100, -23, -100, -100, -25, -100, -100, -100, -44, -100, -100, -100, -100, -40, -100, -100, -100, -100, -100, -39, -100, -100, -100, -100, -100, -100, -63, -91, -50, -100, -100, -100, -100, -100, -100, -73, -100, -100, -100, -100, -36, -100, -100, -100, -73, -100, -100, -100, -100, -100, -100, -100, -100, -100, -65, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -89, -100, -100, -100, -31, -29, -55, -100, -100, -100, -100, -100, -100, -65, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -34, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -69, -100, -100, -100, -100, -100, -19, -100, -100, -100, -100, -100, -69, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -3, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -82, -100, -100, -100, -100, -100, -100, -100, -100, -100, -80, -98, -100, -100, -25, -100, -100, -54, -100, -100, -79, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -12, -100, -100, -100, -100, -100, -100, -100, -16, -99, -44, -100, -17, -100, -75, -100, -100, -99, -100, -100, -100, -100, -100, -100, -100, -1, -86, -100, -100, -100, -85, -100, -100, -100, -100, -100, -100, -64, -100, -100, -100, -78, -61, -100, -100, -72, -100, -100, -100, -100, -100, -100, -59, -100, -100, -78, -100, -100, -100, -100, -100, -62, -100, -100, -100, -100, -16, -100, -100, -66, -100, -100, -100, -100, -100, -100, -100, -100, -100, -85, -100, -100, -100, -100, -100, -100, -100, -77, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -61, -100, -100, -100, -100, -100, -42, -100, -100, -100, -100, -100, -100, -100, -100, -24, -100, -100, -100, -100, -100, -100, -100, -100, -15, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -71, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -7, -100, -100, -100, -79, -100, -100, -100, -45, -100, -100, -100, -100, -100, -100, -100, -85, -100, -100, -100, -56, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -70, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -5, -6, -100, -70, -90, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -28, -100, -100, -100, -100, -100, -100, -100, -30, -98, -10, -22, -100, -100, -100, -100, -100, -84, -53, -100, -100, -100, -4, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -28, -100, -100, -49, -100, -100, -100, -100, -100, -100, -100, -100, -79, -100, -45, -100, -100, -69, -100, -100, -100, -100, -100, -100, -100, -100, -88, -100, -100, -100, -100, -100, -100, -100, -100, -100, -5, -100, -100, -100, -77, -100, -100, -100, -100, -81, -1, -100, -93, -100, -100, -100, -100, -78, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -2, -100, -100, -100, -100, -100, -100, -100, -97, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -16, -100, -100, -100, -100, -13, -100, -100, -100, -100, -100, -100, -100, -100, -23, -100, -100, -100, -100, -71, -100, -100, -100, -100, -100, -94, -58, -100, -100, -100, -100, -49, -100, -100, -43, -67, -100, -100, -100, -85, -13, -100, -100, -100, -100, -81, -100, -100, -5, -100, -100, -69, -100, -100, -100, -100, -100, -100, -100, -100, -51, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -39, -100, -100, -100, -100, -100, -100, -13, -100, -81, -45, -13, -100, -100, -100, -100, -100, -56, -100, -84, -100, -100, -100, -100, -3, -62, -100, -100, -100, -69, -100, -100, -100, -58, -80, -100, -100, -50, -100, -100, -100, -100, -100, -100, -100, -100, -3, -100, -100, -100, -100, -100, -100, -100, -98, -100, -100, -46, -100, -42, -100, -86, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -66, -100, -100, -100, -100, -100, -100, -26, -83, -63, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -60, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -66, -100, -100, -100, -100, -44, -100, -100, -100, -100, -54, -100, -100, -100, -100, -100, -60, -100, -100, -84, -100, -33, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -86, -100, -100, -60, -100, -9, -80, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -16, -100, -100, -100, -100, -100, -43, -100, -100, -100, -100, -7, -100, -100, -100, -100, -100, -100, -55, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -44, -100, -100, -100, -100, -100, -66, -100, -79, -20, -84, -14, -100, -100, -100, -100, -100, -100, -100, -93, -100, -100, -39, -100, -100, -97, -81, -100, -50, -100, -100, -100, -100, -100, -52, -100, -88, -100, -21, -100, -100, -91, -100, -100, -100, -94, -99, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -81, -100, -100, -100, -100, -100, -100, -64, -100, -31, -100, -60, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -70, -100, -12, -100, -100, -100, -100, -58, -94, -36, -100, -100, -100, -100, -100, -100, -100, -100, -50, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -95, -34, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -2, -100, -50, -100, -15, -100, -100, -100, -100, -100, -100, -100, -3, -100, -100, -100, -100, -100, -100, -100, -64, -64, -100, -100, -100, -100, -100, -100, -100, -31, -100, -100, -100, -100, -100, -100, -43, -100, -100, -50, -21, -100, -100, -32, -100, -100, -100, -3, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -44, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1, -40, -100, -100, -22, -100, -1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -62, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -47, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -50, -100, -100, -70, -71, -100, -100, -100, -80, -100, -100, -100, -100, -100, -100, -100, -100, -79, -100, -99, -100, -100, -74, -100, -100, -100, -51, -100, -100, -100, -100, -100, -82, -100, -52, -91, -11, -97, -89, -100, -100, -40, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -43, -25, -1, -4, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -89, -100, -100, -100, -40, -60, -100, -100, -100, -100, -100, -36, -100, -100, -100, -100, -100, -100, -100, -99, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -8, -100, -100, -100, -21, -100, -100, -25, -100, -100, -100, -100, -100, -100, -65, -100, -100, -100, -100, -94, -100, -100, -100, -100, -100, -100, -100, -100, -76, -4, -100, -100, -100, -100, -100, -100, -100, -33, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -32, -63, -18, -100, -100, -100, -100, -100, -100, -100, -96, -100, -100, -100, -100, -100, -100, -87, -100, -100, -68, -100, -100, -100, -100, -97, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -45, -100, -100, -100, -100, -100, -100, -3, -100, -100, -100, -100, -65, -100, -100, 0, -100, -100, -32, -100, -100, -100, -100, -100, -100, -100, -20, -100, -36, -100, -100, -100, -100, -100, -80, -100, -100, -100, -100, -100, -100, -100, -100, -100, -98, -100, -100, -100, -100, -100, -100, -100, -4, -82, -100, -100, -100, -100, -100, -100, -100, -100, -100, -8, -100, -100, -100, -100, -7, -100, -100, -100, -100, -51, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -82, -100, -100, -100, -100, -100, -100, -100, -100, -21, -100, -100, -100, -100, -100, -100, -100, -100, -100, -55, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -30, -100, -7, -100, -100, -100, -100, -59, -100, -26, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -31, -100, -100, -100, -100, -100, -100, -100, -42, -100, -100, -100, -100, -100, -100, -86, -100, -100, -100, -100, -73, -100, -100, -16, -100, -100, -100, -100, -25, -100, -100, -100, -100, -89, -100, -100, -100, -100, -34, -100, -100, -100, -100, -100, -100, -14, -100, -100, -100, -100, -96, -100, -100, -43, -100, -100, -100, -100, -100, -42, -73, -75, -100, -59, -100, -100, -100, -100, -100, -34, -100, -70, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -77, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -6, -100, -100, -100, -100, -66, -100, -100, -17, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -5, -100, -100, -100, -60, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10, -100, -100, -100, -2, -23, -100, -91, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -96, -100, -100, -100, -100, -100, -100, -99, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -18, -100, -100, -100, -100, -100, -100, -100, -100, -90, -100, -40, -100, -70, -100, -100, -100, -100, -100, -100, -100, -100, -100, -29, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -89, -100, -100, -78, -66, -100, -100, -100, -97, -100, -100, -100, -100, -100, -84, -100, -81, -100, -100, -100, -100, -100, -100, -100, -100, -100, -3, -100, -100, -100, -100, -5, -100, -98, -100, -100, -100, -100, -100, -100, -100, -100, -100, -82, -100, -100, -100, -100, -100, -100, -100, -45, -100, -100, -100, -100, -18, -100, -50, -100, -100, -7, -100, -100, -100, -100, -100, -100, -35, -100, -100, -100, -61, -100, -100, -100, -100, -100, -100, -100, -100, -100, -25, -100, -100, -100, -60, -100, -100, -52, -18, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -7, -16, -100, -5, -100, -100, -80, -100, -100, -100, -88, -100, -100, -100, -100, -15, -100, -100, -100, -36, -7, -100, -100, -100, -100, -100, -60, -100, -100, -80, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -41, -67, -100, -100, -100, -100, -100, -6, -69, -100, -15, -100, -100, -100, -100, -100, -25, -100, -100, -100, -100, -100, -100, -100, -100, -100, -17, -100, -100, -100, -100, -46, -100, -100, -100, -100, -48, -100, -100, -61, -100, -100, -100, -100, -100, -100, -51, -100, -100, -55, -100, -33, -100, -100, -62, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -69, 0, -100, -100, -100, -100, -28, -100, -100, -26, -100, -44, -100, -100, -100, -100, -100, -100, -100, -51, -99, -100, -100, -100, -100, -100, -100, -100, -100, -80, -100, -4, -100, -100, -100, -100, -100, -2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -28, -100, -100, -86, -100, 0, -100, -61, -100, -100, -100, -93, -100, -100, -21, -100, -100, -100, -100, -85, -100, -100, -100, -100, 0, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -75, -100, -100, -100, -100, 0, 0, -100, -100, -100, -100, -79, -100, -74, -100, -100, -100, -100, -100, -1, -100, -100, -100, -100, -65, -100, -100, -100, -100, -100, -100, -100, -100, -100, -6, -100, -100, -92, -100, -100, -2, -100, -100, -100, -100, -100, -100, -71, -100, -60, -71, -100, -100, -100, -100, -100, -100, -5, -100, -100, -100, -67, -100, -100, -100, -79, -100, -52, -100, -100, -33, -100, -100, -100, -100, -100, -100, -14, -100, -100, -100, -100, -100, -90, -19, -100, -59, -100, -100, -100, -100, -100, -94, -100, -100, -100, -100, -100, -100, -100, -26, -100, -100, -100, -100, -100, -100, -100, -53, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, 0, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -47, -100, -100, -100, -100, -100, -100, -66, -100, 0, -100, -100, -100, -100, -5, -100, -100, -100, -100, -3, -7, -100, -87, -100, -100, -100, -100, -23, -100, -1, -100, -100, -100, -100, -100, -100, -100, -100, -51, 0, -41, -100, -64, -100, -100, -100, -100, -100, -47, -100, -100, -100, -98, -100, -100, -100, -100, -100, -100, -93, -100, -100, -100, -100, -100, -80, -100, -100, -41, -68, -100, -77, -54, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -37, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -63, -34, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -50, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -6, -100, -100, -100, -100, -91, -100, -14, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -20, -100, -100, -100, -20, -100, -100, -20, -100, -100, -100, -100, -100, -100, -100, -100, -62, -100, -100, -100, -2, -100, -92, -100, -100, -3, -100, -1, -100, -100, -100, -100, -100, -100, -100, -40, -50, -100, -100, -100, -100, -37, -100, -100, -100, -100, -100, -38, -100, -24, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -9, -50, -100, -3, -100, -45, 0, -100, -100, -100, -100, -100, -5, -27, -100, -100, -100, -100, -26, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, 0, -1, -100, -100, -59, -100, -14, -100, -100, -100, -100, -100, -100, -100, 0, -100, -100, -66, -100, -100, -100, -100, -100, -1, -100, -100, -100, -100, -100, -100, -1, -100, -100, -100, -100, -100, -100, -100, -3, -100, -1, -100, -100, -100, -4, -100, -100, -100, -1, -100, -100, -100, -100, -100, -100, -100, -31, -100, -100, -100, -100, -100, -100, -87, -100, -100, -100, -100, 0, -100, -100, -100, -100, -100, -22, -100, -100, -100, -100, -36, -100, -100, -100, -100, -100, -100, -38, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -86, -100, -100, -94, -100, -100, -100, -100, -100, -100, -100, -100, -100, -7, -100, 0, -100, -100, -100, -41, -100, -100, -56, -75, -37, -100, -100, -100, -100, -52, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -78, -12, -97, -100, -22, -100, -100, -100, -100, -88, -100, -100, -100, -35, -100, -100, -100, -9, -100, -19, -100, -100, -100, -100, -40, -100, -100, -100, -74, -100, -61, -100, -100, -100, -100, -100, -100, -100, -100, -63, -100, -100, -25, -100, -85, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -49, -100, -100, -100, -100, -100, -100, -100, -100, -100, -64, -100, -100, -100, -100, -75, -100, -76, -24, -100, 0, -100, -100, -74, -100, -100, -100, -100, -21, -100, -93, -100, -100, -100, -49, -100, -100, -100, -100, -100, -1, -50, -100, -100, -100, -100, -100, -100, 0, -100, -100, -100, -100, -100, -100, -100, -8, -100, -26, -100, -100, -100, -100, -37, -100, -100, -8, -100, -100, -33, 0, -100, -100, -100, -100, -100, -64, -100, -35, -100, -100, -100, -100, -100, -8, -43, -8, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -48, -82, -100, -33, -42, -100, -29, -100, -100, -43, -100, 0, -100, -100, -100, -35, -100, -100, -100, -6, -84, -100, -100, -100, -100, -100, -94, -57, -100, -100, -46, -74, -100, -62, -100, -100, -6, -100, -100, -100, -100, -73, -31, -85, -100, -100, -100, -100, -1, -100, -100, -100, -100, -100, -21, -100, -100, -100, -100, -100, -100, -20, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -3, -100, -100, -100, -100, -100, -52, -100, -100, -100, -100, -1, -100, -13, -100, -100, -100, -100, -100, -100, -100, -100, -100, -48, -1, -100, -1, -100, -100, -100, -100, -100, -100, 0, -100, -100, -100, -100, -100, -100, -57, -100, -1, -100, -55, -100, -4, -100, -100, -1, -26, -100, -100, -100, -100, -100, -58, -100, -3, -100, -100, -100, -100, -100, -29, -100, -17, -31, -87, -80, -4, -100, -100, -100, -100, -8, -60, -100, -72, -100, -21, -26, -100, -100, -100, -100, -29, 0, -100, -100, -100, -100, -53, -100, 0, -100, -100, -100, 0, -23, -100, -100, -1, -2, -100, -100, -100, -100, -100, -100, 0, -100, -100, -100, -84, -100, -100, 0, 0, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -52, -100, -100, -100, -95, -42, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -98, -100, -100, -1, -1, -100, -4, -100, -100, -100, -3, -100, -100, -100, -100, -100, -100, -43, -88, -100, -100, -100, -100, -100, 0, -100, -19, -100, -100, -100, -15, -2, -67, -100, -100, 0, -12, -2, -100, -100, -39, -2, -100, -100, -100, -100, -5, -2, -100, -100, -100, -100, -100, -100, -72, -100, -100, 0, 0, -100, -100, -100, -100, -100, -100, -100, -97, -98, -1, -45, 0, -10, -100, -100, -100, -35, -6, -100, -100, -100, -100, -100, -100, -2, -100, -100, 0, -3, 0, -100, 0, -91, -5, -100, -100, -100, -100, -100, -100, -100, -78, -100, 0, -100, -100, -100, 0, -100, -100, -53, 0, -68, -100, -100, -100, -100, -100, -2, -100, -100, -100, -100, -100, -9, -69, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -59, -100, -100, -100, -100, -100, -100, -100, -37, 0, -100, -100, -100, -100, -100, -100, -100, -28, -1, -100, -100, 0, -10, -100, 0, -100, -100, -3, -100, -100, -100, -100, -100, -18, -100, -100, -51, -100, -100, -97, -100, -10, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -33, -100, -100, -6, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, 0, -100, -94, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -99, -100, -100, 0, -100, -100, -100, -100, -43, -100, -100, -20, -1, -34, -100, -100, -100, -100, -100, -100, -100, -100, -92, -20, 0, -100, -84, -100, -100, -100, -100, -100, -1, -100, -100, -100, -8, -4, -19, -100, -100, -70, 0, -100, -42, -100, -100, -100, -100, -100, -100, -39, -100, -100, -100, -52, -100, -100, -100, -100, -100, -100, -100, -66, -32, -100, -68, 0, -100, -31, -100, -100, -100, -100, -100, -100, -100, -100, -25, -100, -100, -100, -100, -100, 0, -11, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -3, -100, -100, 0, -4, -100, -22, -100, -100, -31, -9, 0, -100, -100, -100, -100, -100, 0, -100, -1, -100, -100, -20, -100, -100, -100, -24, -100, -100, -29, 0, -100, -89, -100, -100, -100, -100, -54, -100, -100, -100, -73, -100, -1, -100, -100, -5, -100, -100, 0, -100, -100, -2, -100, -100, -100, -35, -15, -100, -100, -72, -100, -83, -100, 0, -100, -100, -100, -45, -100, -100, 0, -100, -100, -38, -100, -100, -100, 0, -100, -100, -100, -100, -100, -31, -100, -100, -100, -56, -100, -58, -100, -100, -16, -100, -100, -100, -100, -100, -100, -62, 0, -59, -100, -100, -4, -100, -100, -22, -77, -100, -100, -100, -100, 0, 0, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -28, -54, -100, 0, -100, -7, -9, -100, -100, -87, -100, -100, -100, -100, -100, 0, -100, -59, -6, -100, -100, -100, -100, -100, -100, -51, -100, -100, -11, -30, -100, -78, -5, -70, -30, -100, -23, -1, -100, -100, -100, -100, -16, -100, -99, -4, -3, 0, -100, 0, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -61, -100, -100, -1, -5, -100, -9, -100, -100, -100, -100, -100, -37, -78, -41, -100, -100, -41, -100, -100, -100, -100, -100, -100, 0, -45, -100, -100, -100, -100, -100, -100, -40, -100, 0, -100, -40, -100, -3, -100, -100, -100, -100, 0, -100, -16, -100, 0, -100, -8, -100, -4, -100, -86, -1, -100, -1, -100, -100, -50, -100, -71, -83, -62, -100, -68, -100, -100, -100, -100, -100, -100, -7, -100, -100, 0, -100, -100, -100, -100, 0, -100, -100, -100, -100, 0, -100, -100, -8, -10, -100, -100, -100, -43, -100, -100, -100, -29, -35, -100, -100, -100, -1, -100, -100, -100, -52, -100, -39, -49, -100, -100, -100, 0, -100, -100, -100, -100, -32, -3, -100, -100, -100, -26, -100, -100, -100, -92, -97, -100, -100, -100, -100, -100, -4, -100, -100, -100, -100, -100, -52, -41, -100, -89, -100, -100, -100, -50, -100, -100, 0, -100, 0, -100, -2, -62, -100, -36, -4, -100, 0, -100, -100, -100, -12, -100, -100, -34, 0, -100, -100, 0, -100, -100, -100, -68, -100, -58, -74, -100, -100, -100, -100, -100, -100, -100, -100, -1, 0, -100, -100, -100, -100, -100, -100, -20, -1, -100, -100, -100, -100, -100, -80, -100, -100, -100, -100, -100, -100, -76, -100, -77, -100, -41, -100, -100, -100, -88, -100, -100, -94, -100, -100, -100, -100, -14, -100, -79, -100, -1, -100, -100, -100, -100, -100, -100, -100, -100, -35, -100, -100, -80, -100, -100, -1, -100, 0, -100, -100, -75, -11, -100, -42, -100, -100, -100, -9, -100, 0, -100, 0, -54, -100, -100, -100, -100, -38, -100, -100, -36, -100, -18, -100, -100, -100, -100, -100, -100, -100, 0, -63, -100, -100, -74, 0, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, 0, -100, -100, -100, -93, -100, -100, 0, -100, -2, -100, -13, -57, 0, -72, -100, -7, -11, -100, -100, -100, -100, -100, -100, 0, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, 0, -100, -67, -100, -100, -100, -100, -100, -100, -9, -35, 0, -100, -53, -100, -2, -100, -100, -100, -100, -15, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1, -2, -100, -18, -100, -4, -100, -100, -100, -100, -4, -19, -100, -4, -100, -100, -100, -100, -100, -30, -100, -56, -100, -100, -100, -100, -41, -100, -100, -100, -100, -98, -100, -100, -100, -100, -100, -1, -1, -100, -100, -100, -100, -100, -100, -100, -100, -91, -100, -100, -72, -100, -26, -100, -74, -100, -100, -100, -100, -100, -100, -100, -12, 0, -100, -100, -100, -100, -59, -100, -100, -100, -100, -56, -100, -100, -25, -100, -100, -100, -100, -100, -100, -100, -2, -92, -100, -5, -100, -71, 0, -11, -32, -66, -100, -100, -100, -100, -4, -100, -100, -100, -100, -100, -100, -100, -7, -100, -100, -100, -100, -100, -100, -100, -52, -100, -100, -100, -100, -7, -11, -100, -100, -49, -100, -100, -100, -100, -100, -100, -100, -5, -100, -55, -19, -100, -20, 0, -94, -93, -100, 0, -100, -100, -100, -100, -100, -100, -100, -29, -100, -75, -100, -100, -10, 0, -13, -100, -100, -100, -100, -100, -100, -5, -100, -100, -100, -100, -46, -100, -100, -100, -100, -100, -72, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -38, -100, -100, -100, -100, -100, -100, -100, -100, -36, -100, -100, -59, -100, -100, -46, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, 0, -100, -100, -100, -100, -100, -100, -20, -65, -100, -100, -13, -100, -100, -100, -93, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, 0, -55, -100, -100, -100, -100, -100, -100, -100, -38, 0, -100, -100, -100, -58, -100, -100, -100, -100, 0, -90, -7, -100, -100, -100, -100, -100, -5, -100, -100, -100, -81, -100, -100, -26, -100, -100, -100, -100, -100, -100, -100, -100, -87, -34, -87, -100, -100, -7, -38, -95, -100, -100, -100, -100, -100, -48, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1, -100, -100, -100, -73, -100, -90, -100, -100, -100, -100, -100, -9, -100, -100, -100, -100, -100, -100, -100, -25, -100, -100, -1, -100, -100, -100, -100, -100, -44, -100, -2, -100, -2, -90, -100, -1, -100, -100, -25, -100, -73, -100, -100, -50, -100, -100, -100, -100, -100, -100, -100, -64, -100, -62, -100, -100, -100, -2, -100, -100, -29, -100, -100, -49, -26, 0, -100, -1, -100, -100, -100, -100, -100, -100, -98, -34, -100, -100, -100, -100, -100, -3, -100, -100, -100, -100, -100, -100, -100, -100, 0, -100, -3, -3, -50, -100, -100, -100, -100, -79, -100, -100, -100, -100, -59, -100, -2, -100, -100, -100, -9, -100, -86, -24, -21, -100, -100, -42, -100, -25, -100, -100, -100, -100, -100, -100, -100, -84, -100, -100, -100, -31, -100, -100, -100, -100, -100, 0, -100, -100, -100, -14, -100, -99, -58, -100, -100, -100, -100, -17, -46, -100, -100, -100, -100, -100, -67, -100, -100, -100, -100, -100, -100, -100, -5, -100, -97, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, 0, -100, -100, -100, -100, -100, -100, -100, -100, -100, -52, -14, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -24, -94, -57, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -93, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -88, -100, -100, -61, -100, -100, -100, -29, 0, -100, -100, -100, -100, -100, -11, -100, -100, -100, -100, -100, -2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, 0, -100, -100, -100, -100, -100, -14, -41, -100, -100, -57, -100, -100, -100, -100, -100, -100, -100, -6, -100, -100, -100, -23, -100, -72, -100, -100, -100, -100, -5, -100, -100, -100, -100, -100, -100, -100, 0, -100, -100, -100, 0, -100, -22, -100, -100, -100, -100, -100, -100, 0, -100, -100, -100, -100, -100, -100, -100, -1, -100, -100, -7, -100, -100, -100, -1, -2, -100, -100, -100, -22, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -3, -96, -100, -100, -23, -8, -100, -100, -100, -23, -100, -100, -100, -100, -100, -100, -100, -100, -51, -76, -24, -100, -100, -95, -9, -100, -50, -100, -100, -100, -100, -5, -100, -100, -100, -100, -100, -80, -100, -100, -100, -100, -100, -4, -100, -100, -78, -100, 0, -100, -11, -100, -100, -100, -100, -100, 0, -100, -100, -100, -48, -100, -78, -18, -100, -43, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -95, -100, -100, -100, -100, -100, -100, -100, -97, -100, -26, -100, -42, -54, -100, -100, -87, -100, -100, -100, -100, -100, -100, -100, -70, -2, -28, -100, -100, -100, -100, -100, -70, -43, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -64, 0, -100, -100, -100, -100, -58, -100, -100, -100, -100, -100, -100, -100, -100, -6, -37, -100, -100, -100, -100, -1, -100, -100, -100, -100, -100, -100, -100, -99, -31, -48, -100, -100, -87, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -31, -100, -100, -100, -100, -100, -100, -1, -100, -58, -100, -100, -75, -100, -100, -100, -71, -83, -80, -100, -100, -100, -57, -100, -100, -100, -100, -100, -100, -100, -100, -28, -100, 0, -100, -34, -100, -100, -54, -100, -100, -76, -22, -100, -100, -100, -100, -42, -100, -100, -100, -100, -100, -100, -100, -100, -100, -48, -100, -100, -100, -100, -100, -25, -1, -100, -100, -100, -100, -100, -100, -9, -100, -25, 0, -89, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -95, -100, -100, -100, -100, -100, -100, -31, -100, -85, -100, -100, -49, -100, -100, -100, -3, -100, -72, -100, -100, -100, -4, -94, -100, -51, -100, -11, -51, -100, -100, -100, -100, -100, -100, -100, -10, -100, -100, -100, -100, -100, -100, -2, -100, -1, -41, -100, -7, -75, -100, -100, -100, -100, -100, -100, -100, -16, -31, -100, -100, -100, -100, -100, -100, -100, -100, -100, -22, -100, -100, -100, -67, -100, -100, -56, -73, -57, -100, -100, -100, -51, -100, -100, -100, -38, -100, -100, -27, -100, -100, -100, -100, -6, -100, -100, -8, -100, -100, -100, -11, -100, -100, -100, -100, -90, -6, -93, -100, -100, -100, -84, -3, -100, -100, -8, -100, -100, -100, -100, -84, -100, -100, -100, -100, -100, -100, -100, -1, -100, -100, -100, -79, -14, -100, -100, -100, -100, -73, -100, -10, -100, -100, -100, -100, -57, -5, -100, -100, -100, -100, -100, -100, -95, -100, -100, -100, -61, -100, -100, -100, -13, -12, -100, -100, -100, -4, -100, -100, -100, -100, -100, -100, -100, -2, -100, -1, -100, -100, -50, -100, -100, -100, -100, -100, -62, -100, -100, -100, -100, -100, -13, -100, -100, -14, -100, -100, -19, -100, -100, -100, -100, -9, -100, -100, -100, -100, -100, -100, -100, -100, -75, -100, -100, -100, -73, -100, -100, -100, -100, -100, -100, -1, -100, -100, -100, -100, -100, -100, 0, -100, -1, -100, -100, -100, -100, -100, -49, -100, -100, -100, -2, -100, -53, -100, -64, -60, -17, -79, -18, -100, 0, -100, -100, -5, -100, -100, -100, -98, -100, -8, -6, -100, -100, -45, -100, -100, -100, -100, -100, -100, -76, -100, -100, -68, -100, -90, -100, -100, -100, -74, -100, -100, -100, -56, -100, -100, -100, -100, -43, -100, -3, -100, -100, -42, -100, -100, -4, -100, -100, -100, -100, -100, -100, -100, -100, -100, -20, -100, -100, -2, -100, -100, -3, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -82, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, 0, -100, -4, -100, -100, -100, -87, -100, -100, -100, -100, -97, -100, -43, -94, -100, -39, -100, -100, -93, -47, -29, -100, -100, -100, -2, -100, -100, -100, -51, -3, -100, -100, -100, -100, -100, -11, -83, -100, -100, -100, -100, -100, -100, -5, -100, -100, -100, -50, -100, -100, -8, -52, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, 0, -100, -100, -54, -100, -90, -33, -100, -90, -100, -100, -100, -100, -5, -100, -100, -100, -100, -17, -100, -3, -100, -100, -32, -50, -100, -100, -100, -100, -100, -8, -9, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -30, -98, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, 0, -100, -100, -100, -100, -61, -100, -1, -28, -100, -100, -100, -100, -100, -100, -1, -100, -100, -100, -100, -42, -100, -98, -100, -100, -100, -2, -78, -100, -100, -17, -20, -11, -100, -100, -100, -100, -100, -16, -100, -67, -100, -100, -100, -100, -18, -100, -100, -100, -12, -100, -100, -100, -100, -100, -1, -3, -100, -100, -100, -82, -100, -5, -30, -100, -100, -100, -82, -100, -100, -100, 0, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -92, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -8, -34, -89, -54, -100, -100, -100, -100, -35, -67, -100, -43, -100, -3, -100, -100, -1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -19, -100, -100, -2, -100, -100, -2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -52, -92, -100, -1, -100, -100, -100, -100, -62, -100, -100, -7, -100, -100, 0, -100, -9, -6, -7, -100, -100, -100, -44, -26, -100, -100, -100, -100, -100, -1, -100, -100, -7, -100, -22, -100, -100, -32, -100, -100, -100, -100, -57, -100, -100, -100, -100, -100, -100, -28, -100, -100, -100, -1, -100, -100, -100, -4, -100, -49, -17, -100, -100, -100, -100, -100, -94, -100, -100, -100, -100, -76, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -74, -100, -100, -100, -98, -100, -51, -53, -49, -6, -37, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -48, -100, -100, -47, -100, -8, -100, -100, -1, -100, -100, -100, -7, -100, -100, -98, -100, -100, -50, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, 0, -100, -36, -100, -100, -100, -100, -100, -100, -100, -55, -100, -100, -100, -2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -9, -100, -53, -1, -100, -100, -100, -100, -49, -100, -100, -100, -100, -100, -100, -74, -100, -100, -100, -57, -100, -100, -100, -68, -100, -100, -100, -100, -100, -100, -100, -87, -100, -100, -100, -100, -81, -100, -100, -100, -100, -100, -20, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -5, -100, -3, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -73, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -96, -100, -100, -100, -100, -100, -100, 0, -1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, 0, -100, -100, -100, -100, -100, -100, -1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -94, -100, -100, -74, -100, -3, -100, -100, -100, -9, -100, -23, -100, -100, -100, -77, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, 0, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, 0, -67, -100, -16, -8, -87, -100, -1, -100, -100, -100, -10, -100, -100, -100, -100, -100, -100, -100, -25, -100, -100, -100, -73, -100, -100, -100, -100, -53, -100, -100, -100, -100, -27, 0, -100, -18, -100, -100, -100, -2, -88, -100, -11, -100, -100, -100, -100, -100, -100, 0, -100, 0, -100, -100, -100, -100, -100, -100, -100, -100, -100, -2, -100, -100, -100, -100, -100, -100, -100, -100, 0, -18, -10, -59, -100, -100, -9, 0, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1, -72, -100, -100, -100, -20, -4, -99, -100, -100, -100, 0, -100, -100, -100, -100, -51, -100, -55, -100, -100, -100, -2, -100, -100, -100, -100, -100, -100, -8, -100, -100, -42, -100, -78, -3, -100, 0, -100, -100, -100, -33, -100, -100, -4, -8, -2, -100, -100, -100, 0, -100, -100, -100, -100, -100, -100, 0, -100, -72, -35, -64, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -4, 0, -100, -100, -100, -100, -100, -100, -100, 0, -100, -100, -100, -100, -5, -100, -100, -100, 0, 0, -6, -2, -100, -100, -100, -100, -100, -100, -100, -100, -100, 0, -100, -100, -100, -1, -100, -100, -100, -100, -58, -80, -100, -100, -100, -100, -61, -40, -100, -100, -100, 0, -100, 0, -100, 0, 0, -100, -100, -100, -1, -18, 0, -3, -100, 0, -100, 0, -93, 0, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, 0, -100, -12, -100, -3, -100, -74, -100, -100, 0, -100, -100, -4, -100, -100, -100, -100, -100, -100, -100, -100, -5, 0, -100, -14, -100, -100, -100, -56, -100, -100, -100, -66, -76, -100, -100, -100, -68, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -17, -100, -100, -100, -100, -100, -100, -89, -100, -100, -100, -100, -8, -100, -100, 0, 0, -100, -100, -7, -100, -100, -3, -100, -100, -100, -100, -100, -4, -100, -60, -100, -100, -87, -100, -100, -52, -100, -16, -100, -100, 0, -1, -100, -100, -100, -3, -100, 0, -100, -61, -100, -100, -100, -100, -100, -100, -100, -100, -74, -81, -100, -100, -2, -100, -100, -35, -59, -100, -100, -100, -100, -100, -3, -100, -100, 0, -100, -100, -62, -100, -100, -100, -100, -100, -100, -100, -100, -100, -35, -47, -100, -100, -4, -100, -100, 0, -100, -100, -100, 0, -39, -100, -79, -100, -66, -100, -100, -16, -100, -45, 0, -100, -100, -100, 0, -100, -100, -7, -100, -100, -100, -100, -100, -100, 0, -100, -100, -3, -82, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -86, -100, -1, -100, -100, -100, -100, -100, -100, -100, 0, -35, -100, -100, -100, -100, -44, 0, -5, -100, -5, -100, -100, -100, -41, -100, -100, -100, -3, -100, -100, -100, -100, -100, -82, -100, -100, -100, -100, -100, -100, -100, -100, -100, 0, -100, -100, -100, 0, -71, -3, -100, -100, 0, 0, 0, -100, -100, -100, 0, -100, -100, -100, 0, -100, -100, -100, 0, -100, -100, -9, -100, -100, -100, -100, 0, -100, -100, -100, 0, 0, -58, -100, -2, -100, -100, -100, -100, -100, -100, -100, -45, 0, -100, 0, -66, -100, -100, -18, -100, -100, -100, -100, -45, -100, -100, -1, -5, -100, -100, -100, -99, 0, -100, -100, -100, -100, -100, 0, 0, -52, 0, -80, -68, -100, -100, -100, -72, -100, -100, -100, -100, 0, -100, -100, -2, -100, -100, -100, -45, -52, -37, -100, -100, -100, 0, 0, -100, -100, -100, -100, -100, -100, -13, -100, -100, -100, -100, 0, -100, 0, -100, -100, -100, -100, -100, -100, -14, -100, -100, 0, -100, -100, -100, -38, -85, -100, -100, 0, -100, 0, -100, -100, 0, -100, -100, -100, -100, -100, -100, -100, 0, -100, 0, -100, -100, -39, -100, 0, -100, -100, -100, -100, -100, -100, -100, -100, -100, -4, -100, 0, -100, -100, -100, -100, -5, -3, -87, -100, 0, -100, -100, -100, -100, -100, -61, -100, -100, -100, -100, -100, -4, -100, -100, 0, -100, 0, -100, -100, -4, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -56, 0, -100, -100, -100, -100, -100, -100, 0, -97, -1, -100, -100, -100, -100, -100, -100, -100, -100, -100, 0, -6, -100, -2, -100, -100, -100, -100, -100, -78, -100, -100, -100, 0, 0, -100, -100, -100, -100, -100, -53, -100, -100, 0, -100, 0, 0, -100, -100, -100, -100, -100, -100, -56, -100, -100, -1, -100, -100, -100, -100, -100, -100, 0, -100, -15, -100, -100, -100, 0, -100, -100, -100, -100, -100, -6, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -3, -100, -100, -100, -100, -100, -100, -100, -92, -100, 0, -100, -100, -100, 0, -1, -100, -100, -74, -100, -100, 0, -100, -100, -100, -100, -40, -100, -100, -100, -62, -100, -100, -100, 0, -100, -100, -100, -100, 0, -100, -100, -100, -100, -100, -100, -100, -100, 0, -100, -100, -77, -9, -36, -100, -100, -6, -100, -100, 0, -100, -100, -8, -100, -100, -100, -100, -44, -10, -100, -100, -100, -100, 0, -6, -100, -100, -100, 0, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1, -65, -100, 0, -100, -100, -44, -100, -100, -1, -100, -100, -33, -100, -88, -100, -100, -100, -100, -100, -23, 0, -20, -100, -100, -17, -100, -1, -100, 0, -100, -100, -100, -30, 0, 0, 0, -100, -100, -100, -100, -100, -100, -100, -100, -61, -100, 0, -61, -100, -100, 0, -89, -47, 0, -100, -100, -81, -3, -100, -100, -100, -100, -67, -100, -100, -100, -100, 0, -100, -100, 0, -100, -100, 0, 0, -100, -30, -100, -100, -100, -100, -100, -100, 0, -40, -100, -100, -100, -100, -100, 0, -19, -100, -68, -100, -3, -100, 0, -100, -100, -87, -13, -100, -100, -100, -100, 0, -97, -100, -100, -38, 0, -100, -49, -100, -1, -1, -54, -37, -100, -86, 0, -2, -100, 0, 0, -100, -100, -1, -6, 0, 0, -100, -100, -100, -100, 0, -100, -100, -100, -100, -100, -67, -100, -100, 0, -100, -100, -29, -100, 0, -100, -3, -100, -100, 0, -100, -2, -100, -100, -7, 0, -100, 0, 0, -100, -100, -100, 0, -56, 0, -100, -100, -2, -100, -100, -100, -100, -100, 0, -100, -100, -100, -100, 0, 0, 0, -9, -33, -100, -100, -100, 0, -100, -100, -100, -100, -55, -2, -100, -100, 0, 0, -100, 0, -100, -100, -100, -1, -100, -100, -31, -100, -100, -100, -30, 0, 0, 0, 0, -11, -100, -62, -100, -100, -1, 0, -39, -100, -98, -100, -100, -100, -9, -100, -100, -85, 0, 0, -100, -100, -100, -100, -91, -100, -100, 0, -80, -97, -19, -100, 0, -100, 0, 0, -100, 0, -9, -100, -100, -100, -100, -100, -100, -32, -100, -69, -67, -85, -100, -85, -100, -100, -100, -100, -91, -100, -100, -100, -100, -100, 0, -100, -100, -50, -100, -100, -100, -90, -28, -100, -100, -15, -100, 0, -26, -12, -2, -100, 0, -78, -46, -100, -100, -100, -100, 0, -100, -94, -100, 0, -100, -100, -100, 0, -100, -100, -100, -100, -100, -100, 0, -100, 0, -1, 0, 0, -100, 0, -100, -100, -100, -100, -100, -100, -100, -100, -100, 0, -100, -36, -100, -84, -100, -1, 0, 0, -100, 0, -100, -100, -100, -100, -100, -100, -100, 0, -100, -100, 0, -100, 0, 0, -70, -19, -49, -6, -100, -2, 0, -100, -41, -5, 0, -100, -100, 0, -100, -100, -100, -100, -26, 0, -100, -100, -58, -1, -4, -100, -100, -100, -100, -100, -100, 0, -100, -97, -100, 0, -100, -100, -100, -28, -100, 0, 0, -100, -100, -98, -100, -54, -48, -100, -100, -62, -100, -100, -100, -18, 0, -81, -81, 0, -100, -100, 0, 0, -100, 0, -15, -100, -100, -34, -100, 0, 0, 0, -100, -26, 0, -100, -100, -100, -100, -18, -100, -100, -100, -100, -100, -100, 0, -31, -100, -100, -100, 0, -100, 0, -100, -100, 0, 0, -2, -100, -100, -100, 0, -100, -100, -100, 0, -100, -100, -100, -60, -100, -100, -100, -100, -100, -100, -50, 0, -100, -100, -100, -100, -100, -100, -100, -100, -3, 0, -65, -100, -100, -100, 0, -100, -100, -100, -100, -100, -100, 0, -100, -69, 0, -100, -100, -100, -100, -100, -100, 0, -100, -100, -100, -69, -100, 0, 0, 0, -100, -100, -100, -43, 0, 0, -100, -100, -100, -7, -66, 0, -100, -100, 0, 0, 0, -100, -69, -100, -100, 0, -100, -31, -100, -100, -29, 0, -25, -100, 0, -100, -100, 0, 0, -100, 0, -100, -100, -31, 0, 0, -21, -100, -100, -61, 0, 0, -100, 0, -100, 0, -100, 0, -59, 0, -100, -100, 0, -100, -100, -100, -100, -100, 0, -9, 0, -100, -100, -100, -100, -100, -100, -20, -100, 0, 0, -100, -100, -100, -100, 0, -100, -100, -25, -4, 0, -100, -100, -100, -100, -100, -100, 0, -100, 0, -100, 0, -100, 0, -4, -100, -1, -100, -5, -100, -100, -30, -8, -100, -100, -100, -100, -100, -100, 0, -100, -100, 0, 0, 0, 0, -100, -100, -100, 0, 0, -100, -100, -100, -100, -100, -100, -100, -54, -27, 0, -100, -100, -100, -100, -100, -100, 0, -100, 0, -100, 0, -100, -3, -100, -100, 0, -100, -77, -100, -100, 0, 0, -18, -100, -54, -100, 0, -100, -100, -100, -100, -100, -100, 0, -59, -100, 0, -100, -100, -100, -100, -48, 0, -95, -5, 0, -100, -100, -100, 0, -100, 0, -100, -100, -100, -100, -100, -100, -100, -100, 0, -100, -100, -6, 0, 0, -100, -73, 0, -100, -100, -50, -100, 0, 0, 0, -100, -92, 0, -100, -63, 0, -100, -100, -100, -80, -100, 0, -100, -100, -73, -100, -100, -100, -74, -100, 0, -100, -69, -30, -37, -100, 0, 0, 0, 0, -100, -100, 0, -40, -100, -100, -100, -100, -100, 0, -100, -100, -100, 0, -100, -100, -100, -23, 0, 0, 0, -100, -100, -70, -100, -100, -100, -100, -59, -100, -57, -100, 0, -100, -100, -100, -100, 0, 0, -99, -100, -100, 0, 0, -44, -100, 0, 0, 0, -100, -27, -31, -14, -100, -100, -100, 0, 0, -100, 0, -17, -86, 0, -100, -100, -100, -100, -100, -100, 0, -100, -100, 0, -2, -68, -100, -100, 0, -92, -100, -100, -100, 0, -100, -45, -15, 0, -100, -100, -12, 0, -100, -100, -100, 0, 0, 0, -100, 0, -100, -100, 0, 0, -100, -9, -100, 0, -100, -100, -100, -100, -100, -94, -100, 0, -100, -100, -100, -100, -2, -100, -95, 0, 0, -100, 0, 0, 0, -100, -100, 0, -100, -100, -100, 0, -100, -100, -100, 0, -100, 0, 0, -100, -100, -15, -100, 0, 0, -100, -100, 0, -61, -39, -100, -100, -100, -95, 0, -100, -100, -100, -100, 0, -100, 0, -11, -100, 0, 0, -100, -100, 0, -100, -100, -50, 0, -100, -100, 0, 0, -100, 0, 0, 0, 0, -100, -4, 0, -100, -100, 0, 0, -100, -100, 0, 0, -100, -100, -100, 0, -4, -100, -100, 0, -24, -100, -100, 0, -71, -100, 0, 0, -100, -100, -77, 0, -100, 0, -1, 0, 0, -100, -90, 0, -100, -1, -100, 0, -100, -100, -94, 0, 0, 0, -100, -100, -100, -100, -49, 0, -100, 0, -100, 0, -3, -100, 0, 0, 0, -100, -100, -100, -100, 0, 0, -100, 0, 0, -29, -100, -100, 0, -4, 0, 0, -18, -100, -100, 0, 0, -100, -100, 0, -5, -100, -100, 0, -100, -100, -100, 0, -100, -100, 0, 0, -66, -100, 0, 0, -55, -100, -100, 0, 0, 0, -100, 0, -100, -100, -100, 0, -100, 0, -37, -100, -80, -100, -44, 0, -100, 0, -100, 0, -7, 0, -100, 0, -100, -100, 0, 0, -2, -100, -80, 0, 0, -100, 0, -74, -100, 0, 0, -100, -100, 0, 0, 0, -100, -100, 0, 0, 0, 0, -100, -100, -100, 0, -99, -100, 0, -68, 0, -100, 0, -100, -100, -100, -100, 0, -100, 0, -100, -100, -100, 0, 0, -1, -100, -100, 0, -100, -100, -100, -100, 0, 0, 0, 0, 0, -100, 0, 0, -100, -52, -100, 0, -100, -100, -100, -100, 0, -100, 0, 0, -100, -3, -100, 0, -100, -100, -100, 0, -100, -100, -100, 0, -100, -100, 0, 0, -100, 0, -100, 0, 0, -100, 0, -100, -100, 0, -100, -100, -100, 0, -100, -100, -100, 0, 0, -16, -100, 0, -100, 0, 0, -3, -100, -100, 0, 0, -100, -5, 0, -100, -88, 0, 0, -100, -100, 0, -4, 0, -100, -100, 0, 0, 0, 0, 0, -45, -100, 0, 0, -100, -1, -100, 0, -100, -100, 0, 0, -68, -100, -2, 0, 0, -100, -21, 0, -100, -14, -100, 0, -100, -2, 0, 0, -100, 0, 0, -100, -100, -100, -100, 0, 0, 0, 0, 0, -65, 0, -100, -100, -100, -37, 0, -77, 0, -2, 0, -100, 0, -100, -100, -100, -100, -100, -100, -100, 0, 0, -100, -100, 0, -100, 0, -100, 0, -100, -100, 0, 0, -100, 0, -100, 0, -100, 0, -100, 0, 0, 0, -100, 0, -100, 0, 0, 0, -3, -100, -12, 0, -7, -100, -100, 0, 0, 0, -100, -100, -100, -100, -100, -100, -6, 0, 0, 0, -100, -100, 0, 0, 0, 0, 0, -98, 0, -100, 0, -44, -100, -100, 0, 0, -100, -100, 0, 0, -100, -100, 0, -100, -100, 0, -100, -100, 0, 0, -100, -100, -1, 0, -67, -100, 0, -86, 0, 0, 0, 0, 0, 0, 0, 0, -100, -100, 0, -100, -100, -100, 0, 0, -13, -58, 0, -100, -100, -100, 0, 0, -100, -100, 0, -91, -54, 0, -100, -100, -100, -100, -2, 0, 0, 0, -100, 0, -100, -45, -100, -100, -100, 0, -50, -100, 0, 0, -100, 0, 0, 0, -100, 0, 0, -100, -100, -4, 0, -100, 0, -100, 0, 0, -100, -100, 0, 0, 0, 0, 0, -100, -100, -100, 0, -100, 0, -100, -100, -100, 0, -100, -100, -100, -43, 0, 0, 0, -100, 0, -100, -100, -100, 0, -100, -1, -100, -100, -1, -100, 0, -36, 0, 0, 0, 0, -100, -100, 0, -100, -1, -100, 0, -100, -100, -100, 0, 0, -41, 0, 0, -29, 0, 0, -12, -100, -52, 0, -12, -100, -18, 0, -100, -2, -100, 0, -100, 0, 0, 0, 0, -100, -100, 0, 0, -100, 0, 0, -100, -100, 0, 0, -100, -100, -100, 0, -100, -4, 0, 0, 0, -100, 0, -100, 0, 0, -2, 0, -100, 0, 0, -2, -100, 0, -100, -100, -100, 0, 0, -100, 0, 0, -100, 0, -45, 0, -100, -100, 0, -100, -2, -100, 0, -100, -100, 0, 0, 0, -100, -100, 0, -21, -100, -100, 0, -17, -100, -100, 0, -70, 0, 0, 0, -8, -100, -100, 0, -100, -31, 0, -100, 0, 0, -17, -33, 0, 0, -100, 0, -100, 0, 0, -100, -6, 0, -100, -100, -1, 0, -69, -100, -100, 0, -100, -100, -100, 0, 0, -46, -100, 0, -100, -100, -100, 0, -100, 0, 0, -100, -100, 0, 0, 0, -15, -35, 0, -100, 0], 1000: [-717, -351, -577, -404, -68, -135, -709, -361, -229, -736, -359, -189, -70, -613, -314, -11, -752, -45, -37, -103, -626, -5, -583, -799, -542, -82, -411, -473, -1000, -528, -76, -259, -261, -240, -64, -622, -828, -1000, -579, -149, -129, -172, -85, -30, -286, -450, -603, -172, -347, -30, -115, -446, -402, -91, -110, -395, -1000, -110, -24, -603, -219, -449, -185, -1000, -167, -261, -104, -20, -1000, -405, -8, -487, -125, -667, -300, -18, -700, -170, -393, -447, -264, -294, -84, -14, -263, -386, -82, -278, -420, -82, -1000, -165, -71, -36, -39, -134, -354, -657, -189, -432, -816, -441, -25, -721, -336, -148, -509, -174, -1000, -53, -931, -353, -325, -1000, -366, -15, -1000, -455, -26, -58, -4, -148, -193, -423, -1000, -18, -8, -425, -1000, -684, -163, -86, -77, -495, -527, -626, -207, -99, -270, -177, -865, -38, -604, -449, -76, -282, -4, -575, -1000, -75, -1000, -941, -1000, -530, -48, -138, -830, -103, -425, -27, -168, -183, -18, -819, -410, -63, -233, -1000, -1000, -118, -8, -63, -440, -1000, -169, -93, -733, -1000, -67, -379, -20, -27, -333, -389, -1000, -351, -82, -331, -813, -5, -100, -116, -517, -200, -777, -981, -1000, -511, -393, -124, -559, -530, -799, -1000, -415, -88, -549, -547, -458, -283, -69, -329, -411, -106, -466, -363, -700, -106, -1000, -766, -437, -89, -468, -263, -93, -279, -378, -271, -87, -779, -763, -184, -170, -471, -643, -648, -66, -395, -1000, -185, -627, -57, -437, -394, -815, -815, -265, -842, -256, -11, -515, -91, -886, -273, -493, -83, -44, -44, -113, -635, -1000, -743, -268, -181, -633, -53, -97, -333, -996, -721, -1000, -1000, -1000, -805, -633, -661, -662, -1000, -492, -98, -917, -405, -337, -321, -85, -476, -71, -21, -286, -394, -109, -121, -216, -64, -483, -5, -192, -1000, -22, -323, -62, -393, -299, -167, -1000, -471, -524, -1000, -26, -92, -642, -105, -1000, -336, -84, -37, -948, -6, -111, -1000, -101, -407, -501, -571, -106, -761, -240, -243, -121, -43, -637, -639, -164, -606, -611, -51, -701, -756, -1000, -1000, -302, -173, -204, -88, -465, -89, -715, -217, -438, -41, -869, -347, -176, -932, -49, -201, -59, -690, -110, -466, -476, -815, -466, -1000, -112, -320, -323, -257, -124, -153, -1000, -86, -123, -1000, -100, -88, -70, -107, -455, -178, -317, -252, -526, -54, -156, -120, -561, -9, -59, -333, -31, -1000, -4, -1000, -744, -170, -58, -420, -1000, -126, -1000, -234, -333, -67, -188, -294, -158, -241, -203, -1000, -159, -543, -247, -7, -832, -104, -1000, -45, -600, -1000, -1000, -642, -447, -1000, -440, -447, -738, -632, -262, -162, -610, -28, -192, -17, -223, -1000, -1000, -108, -142, -51, -168, -204, -547, -732, -127, -288, -654, -1000, -354, -191, -368, -47, -77, -132, -1000, -260, -506, -232, -36, -1000, -22, -165, -859, -238, -787, -1000, -180, -107, -604, -372, -412, -102, -469, -652, -310, -115, -614, -39, -1000, -754, -229, -54, -508, -267, -34, -211, -131, -1000, -617, -435, -460, -745, -187, -746, -1000, -530, -1000, -597, -252, -6, -366, -804, -5, -797, -196, -110, -284, -1000, -385, -311, -380, -647, -31, -494, -232, -76, -993, -599, -124, -310, -353, -1000, -454, -367, -24, -32, -171, -84, -84, -263, -754, -774, -310, -360, -16, -35, -327, -606, -1000, -995, -374, -428, -206, -483, -263, -1000, -1000, -274, -230, -172, -35, -769, -1000, -1000, -410, -691, -220, -5, -1000, -300, -438, -755, -571, -311, -128, -177, -136, -180, -73, -193, -389, -84, -144, -1000, -383, -193, -3, -88, -5, -273, -728, -517, -996, -577, -524, -313, -493, -566, -1000, -240, -50, -36, -31, -1000, -85, -80, -576, -709, -477, -830, -148, -77, -7, -166, -39, -63, -73, -201, -914, -56, -1000, -778, -112, -8, -175, -467, -476, -253, -711, -147, -897, -910, -1000, -108, -1000, -544, -144, -90, -884, -79, -931, -497, -1000, -650, -109, -244, -1000, -162, -368, -584, -1000, -409, -448, -241, -214, -134, -225, -19, -301, -76, -299, -1000, -90, -301, -387, -801, -579, -414, -1000, -238, -330, -285, -971, -1000, -310, -60, -195, -1000, -136, -630, -379, -1000, -693, -1000, -95, -9, -423, -994, -78, -5, -345, -463, -1000, -320, -421, -53, -239, -760, -449, -334, -379, -1000, -129, -281, -147, -345, -565, -178, -1000, -97, -494, -396, -1000, -34, -23, -317, -1000, -197, -48, -1000, -1000, -567, -973, -49, -1000, -302, -243, -791, -100, -1000, -49, -47, -1000, -1000, -231, -1000, -838, -427, -148, -168, -302, -261, -275, -115, -554, -56, -179, -138, -149, -432, -785, -220, -717, -284, -215, -122, -1000, -168, -331, -573, -182, -220, -300, -90, -516, -1000, -318, -533, -230, -1000, -80, -603, -1000, -1000, -427, -1000, -365, -469, -49, -115, -943, -887, -12, -727, -170, -522, -229, -759, -410, -286, -121, -925, -391, -97, -51, -118, -550, -301, -579, -251, -439, -81, -862, -244, -93, -165, -186, -436, -76, -151, -56, -882, -196, -189, -493, -707, -467, -64, -289, -209, -447, -579, -296, -281, -161, -316, -252, -706, -237, -1000, -91, -463, -424, -122, -309, -194, -325, -1000, -569, -20, -1000, -815, -1000, -273, -85, -241, -1000, -1000, -1000, -149, -102, -228, -49, -215, -1000, -220, -5, -41, -126, -304, -871, -72, -103, -785, -455, -114, -104, -420, -179, -488, -485, -12, -963, -623, -104, -570, -454, -234, -128, -612, -175, -456, -412, -159, -23, -159, -132, -781, -1000, -210, -157, -200, -517, -1000, -450, -1000, -24, -339, -256, -233, -1000, -504, -989, -114, -532, -1000, -63, -176, -139, -275, -538, -412, -101, -415, -1000, -1000, -1000, -748, -630, -940, -517, -222, -211, -717, -15, -1000, -79, -294, -5, -821, -149, -392, -259, -1000, -334, -109, -282, -94, -68, -157, -1000, -682, -120, -35, -352, -412, -35, -189, -201, -592, -338, -1000, -1000, -558, -175, -716, -1000, -556, -219, -493, -42, -396, -299, -239, -76, -58, -93, -928, -14, -7, -28, -194, -5, -195, -393, -85, -295, -309, -1000, -144, -1000, -450, -1000, -1000, -525, -355, -87, -201, -488, -20, -48, -418, -92, -180, -127, -57, -663, -171, -833, -188, -75, -278, -253, -72, -138, -722, -954, -782, -486, -997, -165, -1000, -1000, -302, -375, -706, -283, -1000, -101, -90, -74, -1000, -71, -1000, -289, -43, -1000, -252, -518, -578, -101, -72, -90, -189, -1000, -66, -323, -752, -160, -600, -284, -139, -276, -675, -899, -281, -341, -465, -96, -1000, -392, -11, -1000, -618, -901, -661, -512, -122, -309, -1000, -37, -26, -529, -65, -1000, -465, -706, -140, -374, -717, -556, -149, -186, -1000, -562, -45, -758, -338, -138, -89, -166, -577, -11, -129, -242, -182, -26, -38, -996, -1000, -454, -267, -1000, -28, -239, -1000, -198, -496, -185, -145, -155, -775, -965, -144, -1000, -1000, -1000, -436, -336, -169, -250, -426, -1000, -146, -144, -115, -992, -503, -266, -390, -1000, -447, -549, -56, -66, -158, -212, -134, -595, -368, -673, -272, -436, -294, -329, -339, -1000, -157, -111, -614, -542, -91, -254, -1000, -956, -92, -250, -785, -122, -9, -225, -188, -347, -1000, -354, -34, -1000, -15, -250, -831, -765, -518, -45, -97, -56, -1000, -123, -290, -286, -238, -81, -161, -43, -162, -111, -379, -55, -320, -82, -218, -39, -83, -44, -9, -257, -886, -234, -680, -523, -186, -20, -22, -491, -572, -830, -167, -448, -1000, -238, -732, -242, -658, -268, -616, -273, -485, -585, -45, -367, -442, -766, -1000, -54, -1000, -142, -596, -288, -105, -320, -21, -48, -113, -13, -548, -288, -945, -69, -1000, -407, -153, -1000, -542, -89, -528, -218, -710, -642, -549, -428, -62, -196, -88, -1000, -585, -229, -34, -41, -560, -377, -447, -1000, -255, -384, -60, -206, -65, -120, -258, -390, -517, -42, -800, -715, -26, -92, -323, -357, -278, -1000, -100, -1000, -1000, -105, -168, -96, -1000, -656, -1000, -700, -329, -116, -33, -129, -617, -566, -283, -1000, -841, -363, -516, -1000, -749, -53, -60, -1000, -497, -273, -952, -167, -572, -546, -1000, -211, -712, -1000, -275, -378, -265, -276, -601, -294, -111, -1000, -565, -418, -775, -303, -16, -14, -65, -176, -255, -466, -397, -1000, -1000, -86, -547, -761, -5, -313, -202, -1000, -692, -91, -123, -100, -61, -119, -52, -354, -414, -1000, -1000, -44, -366, -485, -1000, -201, -128, -240, -314, -816, -375, -1000, -681, -303, -344, -40, -478, -129, -830, -491, -249, -467, -531, -22, -445, -276, -116, -74, -689, -87, -1000, -1000, -1000, -1000, -107, -709, -18, -274, -226, -1000, -1000, -461, -686, -1000, -102, -194, -468, -160, -281, -144, -373, -647, -1000, -483, -120, -110, -833, -104, -1000, -75, -371, -423, -13, -573, -804, -20, -64, -583, -31, -459, -317, -722, -42, -162, -11, -563, -717, -10, -17, -186, -12, -1000, -658, -245, -184, -218, -19, -333, -504, -351, -1000, -167, -180, -19, -953, -246, -751, -101, -232, -91, -217, -183, -1000, -675, -111, -600, -776, -977, -413, -35, -492, -457, -594, -257, -706, -257, -496, -68, -106, -128, -549, -250, -311, -541, -49, -718, -137, -933, -31, -153, -451, -105, -221, -337, -98, -1000, -254, -118, -292, -1000, -148, -21, -1000, -1000, -1000, -221, -508, -989, -645, -584, -489, -469, -217, -453, -5, -860, -147, -375, -89, -932, -924, -305, -61, -196, -52, -689, -345, -245, -289, -284, -522, -168, -786, -60, -1000, -317, -1000, -70, -223, -445, -691, -129, -360, -69, -743, -210, -893, -293, -83, -106, -25, -8, -950, -169, -308, -754, -625, -240, -1000, -1000, -101, -236, -249, -64, -412, -727, -31, -124, -495, -23, -847, -50, -1000, -26, -142, -234, -865, -260, -150, -126, -540, -161, -147, -872, -133, -54, -331, -415, -250, -1000, -393, -1000, -105, -565, -15, -825, -537, -473, -366, -553, -693, -197, -1000, -67, -852, -277, -803, -927, -272, -1000, -288, -365, -15, -304, -414, -262, -160, -44, -538, -755, -312, -684, -97, -86, -103, -644, -455, -599, -625, -100, -165, -83, -843, -46, -680, -1000, -261, -931, -121, -62, -153, -1000, -491, -219, -86, -7, -1000, -130, -484, -19, -291, -704, -282, -87, -243, -1000, -321, -719, -11, -952, -166, -381, -293, -337, -77, -10, -346, -477, -689, -42, -633, -1000, -21, -195, -1000, -1000, -1000, -29, -212, -217, -384, -1000, -66, -912, -999, -293, -30, -59, -312, -313, -322, -367, -133, -1000, -823, -216, -76, -520, -119, -1000, -351, -304, -1000, -398, -202, -172, -67, -406, -274, -700, -968, -216, -691, -288, -89, -1000, -551, -1000, -4, -5, -381, -585, -365, -146, -843, -278, -112, -1000, -52, -329, -477, -216, -322, -370, -737, -579, -108, -1000, -186, -183, -363, -30, -217, -736, -222, -156, -157, -831, -243, -52, -532, -549, -130, -376, -987, -641, -778, -1000, -403, -17, -500, -76, -320, -1000, -31, -744, -168, -982, -96, -401, -606, -1000, -565, -840, -1000, -6, -247, -445, -1000, -233, -1000, -981, -1000, -249, -1000, -572, -301, -478, -187, -358, -1000, -87, -495, -443, -934, -166, -536, -97, -87, -314, -628, -279, -978, -874, -330, -627, -184, -1000, -366, -87, -1000, -653, -598, -401, -6, -162, -19, -54, -237, -706, -139, -16, -226, -417, -78, -930, -291, -740, -780, -704, -620, -623, -1000, -309, -1000, -1000, -74, -287, -8, -42, -679, -171, -253, -253, -1000, -675, -635, -1000, -1000, -66, -116, -6, -480, -150, -87, -1000, -1000, -28, -626, -321, -76, -122, -468, -484, -52, -23, -183, -1000, -336, -571, -111, -110, -164, -272, -35, -138, -362, -87, -427, -1000, -825, -618, -518, -589, -762, -630, -1000, -558, -134, -435, -340, -339, -623, -1000, -423, -447, -784, -167, -19, -407, -218, -1000, -264, -185, -582, -117, -791, -215, -39, -579, -547, -498, -608, -305, -39, -422, -32, -521, -1000, -1000, -136, -26, -246, -103, -452, -477, -354, -834, -80, -659, -437, -594, -622, -201, -196, -62, -1000, -497, -862, -151, -861, -1000, -556, -303, -300, -55, -553, -436, -687, -161, -262, -86, -139, -1000, -427, -400, -164, -229, -525, -885, -265, -277, -606, -654, -1000, -480, -614, -452, -325, -408, -5, -438, -594, -1000, -987, -87, -1000, -885, -612, -1000, -1000, -531, -728, -1000, -387, -80, -61, -82, -524, -674, -864, -129, -563, -214, -521, -785, -43, -221, -15, -95, -34, -295, -1000, -894, -44, -42, -46, -1000, -172, -636, -4, -206, -808, -262, -208, -229, -488, -155, -366, -196, -274, -768, -105, -1000, -541, -140, -166, -108, -507, -525, -111, -266, -15, -601, -42, -657, -264, -391, -108, -7, -9, -575, -256, -658, -1000, -176, -292, -291, -741, -393, -629, -530, -182, -413, -323, -98, -314, -404, -49, -348, -1000, -645, -509, -358, -255, -419, -316, -713, -559, -360, -485, -15, -693, -438, -478, -7, -144, -621, -6, -199, -230, -1000, -57, -605, -1000, -70, -8, -5, -362, -12, -1000, -6, -1000, -147, -1000, -117, -100, -603, -50, -1000, -266, -106, -1000, -134, -872, -130, -167, -202, -740, -509, -276, -841, -1000, -114, -51, -292, -26, -401, -1000, -665, -257, -13, -552, -325, -288, -913, -321, -208, -479, -220, -410, -517, -484, -213, -1000, -426, -154, -1000, -213, -1000, -354, -847, -14, -421, -1000, -639, -38, -153, -419, -1000, -76, -648, -564, -77, -890, -29, -448, -428, -362, -4, -11, -4, -102, -99, -1000, -1000, -392, -629, -184, -147, -61, -262, -284, -253, -538, -141, -781, -400, -229, -142, -383, -629, -637, -484, -220, -1000, -305, -151, -184, -56, -718, -50, -546, -310, -683, -126, -11, -170, -772, -165, -504, -745, -8, -239, -362, -274, -603, -835, -688, -111, -316, -780, -1000, -266, -442, -504, -1000, -1000, -511, -365, -888, -481, -620, -215, -733, -648, -589, -1000, -37, -468, -125, -883, -249, -472, -1000, -1000, -227, -252, -624, -318, -743, -673, -45, -72, -97, -320, -396, -1000, -154, -783, -462, -367, -148, -291, -32, -153, -65, -37, -640, -692, -1000, -936, -54, -1000, -359, -113, -438, -13, -430, -88, -383, -977, -753, -1000, -177, -697, -668, -367, -210, -943, -666, -428, -132, -273, -4, -482, -130, -408, -37, -330, -1000, -206, -1000, -288, -1000, -46, -680, -575, -625, -23, -34, -777, -417, -159, -5, -27, -121, -1000, -1000, -76, -721, -781, -71, -494, -1000, -223, -1000, -438, -472, -26, -72, -813, -841, -156, -185, -932, -263, -60, -642, -3, -178, -365, -36, -874, -410, -709, -174, -60, -578, -849, -557, -104, -167, -719, -50, -70, -634, -816, -1000, -110, -492, -538, -1000, -151, -63, -953, -580, -14, -513, -647, -1000, -364, -44, -142, -214, -276, -521, -1000, -120, -289, -189, -9, -245, -79, -526, -111, -20, -887, -182, -553, -178, -621, -223, -162, -1000, -455, -881, -180, -285, -473, -133, -411, -1000, -79, -1000, -1000, -515, -208, -193, -769, -453, -70, -19, -561, -77, -533, -187, -230, -434, -563, -900, -692, -901, -13, -388, -306, -766, -66, -848, -828, -68, -851, -623, -788, -1000, -728, -394, -839, -185, -275, -474, -274, -306, -93, -93, -878, -44, -162, -1000, -162, -189, -8, -108, -40, -95, -130, -934, -121, -1000, -260, -612, -32, -1000, -1000, -4, -897, -2, -266, -220, -95, -877, -366, -43, -340, -523, -1000, -965, -584, -100, -70, -203, -211, -476, -36, -522, -1000, -668, -801, -574, -396, -291, -759, -232, -106, -549, -638, -31, -320, -123, -442, -258, -22, -761, -632, -14, -195, -411, -543, -450, -249, -148, -877, -1000, -600, -340, -48, -687, -365, -111, -618, -608, -880, -787, -168, -1000, -280, -719, -345, -22, -4, -647, -153, -314, -365, -165, -455, -386, -8, -485, -402, -114, -44, -451, -244, -443, -123, -428, -89, -272, -171, -548, -624, -127, -1000, -1000, -1000, -90, -622, -521, -559, -226, -925, -1000, -420, -171, -292, -879, -45, -1000, -157, -555, -156, -913, -737, -83, -572, -474, -967, -674, -828, -1000, -47, -226, -497, -346, -654, -45, -968, -1000, -58, -315, -289, -181, -456, -102, -259, -444, -63, -178, -954, -808, -97, -98, -967, -240, -242, -647, -923, -315, -158, -462, -89, -646, -481, -999, -267, -387, -276, -575, -462, -262, -200, -557, -277, -256, -1000, -330, -1000, -6, -288, -1000, -230, -333, -1000, -203, -283, -144, -307, -225, -1000, -354, -616, -155, -35, -8, -350, -1000, -202, -575, -264, -49, -469, -284, -553, -213, -636, -424, -373, -994, -516, -143, -80, -370, -545, -3, -1000, -39, -55, -1000, -87, -375, -216, -1000, -645, -190, -271, -130, -988, -452, -293, -155, -254, -614, -442, -607, -304, -149, -1000, -45, -340, -349, -1000, -1000, -808, -104, -193, -134, -518, -865, -823, -197, -339, -838, -365, -21, -1000, -659, -190, -910, -162, -6, -1000, -856, -653, -419, -44, -455, -525, -1000, -801, -78, -3, -237, -1000, -454, -89, -307, -631, -386, -89, -151, -702, -922, -116, -490, -1000, -28, -247, -536, -30, -1000, -356, -411, -212, -4, -292, -924, -187, -486, -619, -451, -4, -1000, -308, -85, -23, -604, -67, -106, -251, -173, -61, -468, -165, -83, -207, -48, -246, -6, -429, -194, -163, -269, -659, -22, -37, -46, -680, -1000, -36, -451, -182, -1000, -6, -526, -314, -82, -37, -499, -75, -46, -278, -595, -178, -750, -31, -617, -208, -168, -364, -181, -198, -1000, -250, -6, -554, -208, -130, -823, -394, -204, -69, -454, -3, -78, -438, -676, -156, -1000, -20, -507, -525, -132, -62, -649, -1000, -952, -1000, -655, -12, -285, -4, -118, -709, -215, -371, -705, -332, -720, -23, -974, -146, -1000, -319, -606, -650, -402, -1000, -217, -368, -144, -6, -918, -50, -528, -304, -333, -256, -334, -21, -220, -37, -113, -204, -90, -94, -504, -330, -780, -328, -64, -52, -785, -66, -108, -156, -266, -1000, -1000, -452, -2, -1000, -858, -646, -882, -1000, -469, -306, -997, -1000, -1000, -667, -95, -415, -758, -244, -215, -138, -268, -1000, -813, -43, -1000, -338, -105, -22, -1000, -248, -1000, -374, -218, -4, -584, -659, -319, -1000, -754, -473, -534, -247, -28, -931, -429, -1000, -457, -1000, -43, -146, -19, -259, -708, -376, -4, -1000, -508, -894, -99, -379, -40, -8, -571, -283, -1000, -378, -133, -647, -58, -883, -1000, -331, -912, -124, -331, -172, -362, -198, -56, -53, -309, -46, -42, -10, -341, -214, -127, -855, -1000, -589, -500, -890, -309, -511, -177, -206, -478, -870, -768, -81, -210, -5, -20, -687, -381, -204, -87, -166, -217, -95, -69, -1000, -75, -578, -377, -201, -282, -975, -240, -7, -470, -171, -1000, -212, -1000, -13, -489, -439, -1000, -692, -1000, -8, -518, -403, -3, -159, -776, -285, -203, -171, -745, -717, -622, -241, -1000, -273, -84, -241, -709, -215, -118, -521, -626, -34, -865, -409, -257, -103, -576, -10, -97, -767, -520, -20, -459, -13, -5, -303, -1000, -1000, -208, -1000, -114, -19, -1000, -1000, -197, -374, -1000, -697, -81, -486, -1000, -38, -12, -462, -623, -338, -495, -74, -217, -989, -2, -420, -371, -217, -217, -528, -614, -526, -1000, -70, -1000, -427, -884, -481, -246, -497, -89, -765, -428, -812, -268, -6, -825, -520, -531, -85, -3, -263, -560, -189, -389, -237, -139, -357, -201, -421, -3, -225, -1000, -33, -266, -1000, -688, -276, -294, -139, -170, -512, -198, -452, -225, -217, -209, -58, -132, -449, -253, -1000, -1000, -141, -762, -84, -35, -144, -57, -390, -299, -166, -367, -28, -212, -1000, -115, -56, -18, -376, -231, -311, -3, -241, -399, -3, -175, -40, -686, -3, -419, -944, -588, -265, -177, -13, -1000, -769, -315, -98, -761, -299, -931, -418, -455, -76, -380, -1000, -63, -464, -123, -14, -409, -177, -3, -1000, -627, -1000, -297, -1000, -920, -52, -44, -280, -129, -1, -52, -116, -665, -114, -52, -257, -1000, -31, -932, -635, -429, -882, -889, -506, -433, -527, -2, -719, -164, -73, -489, -390, -401, -109, -488, -862, -243, -3, -520, -420, -1000, -55, -824, -861, -44, -824, -860, -532, -787, -315, -157, -139, -714, -27, -469, -449, -196, -1000, -149, -205, -56, -62, -93, -434, -469, -5, -613, -599, -70, -250, -163, -408, -777, -270, -15, -1000, -10, -168, -268, -639, -107, -168, -389, -1000, -722, -177, -102, -607, -690, -395, -505, -892, -3, -628, -33, -638, -1000, -806, -31, -181, -704, -247, -98, -118, -83, -836, -1000, -1000, -123, -126, -687, -392, -121, -401, -937, -349, -35, -112, -712, -1000, -374, -733, -827, -164, -81, -188, -1000, -257, -28, -1000, -669, -225, -197, -605, -355, -64, -967, -1000, -854, -130, -202, -231, -271, -121, -98, -55, -207, -461, -99, -75, -558, -545, -197, -229, -19, -54, -1000, -842, -1000, -100, -43, -317, -538, -1000, -1000, -86, -17, -189, -589, -26, -45, -1000, -227, -828, -1000, -3, -249, -878, -205, -207, -6, -17, -403, -882, -2, -258, -287, -461, -178, -126, -353, -670, -1000, -262, -1000, -512, -1, -374, -26, -198, -141, -351, -141, -931, -1000, -709, -469, -250, -800, -1000, -298, -338, -403, -765, -383, -399, -79, -193, -232, -102, -252, -366, -1000, -953, -997, -137, -507, -633, -579, -67, -315, -78, -184, -280, -123, -5, -31, -155, -139, -791, -1000, -4, -410, -328, -1000, -179, -804, -921, -6, -1000, -681, -664, -78, -296, -433, -292, -15, -923, -25, -959, -124, -42, -493, -37, -100, -216, -910, -1000, -500, -1000, -206, -193, -233, -328, -1000, -29, -1000, -151, -644, -720, -10, -302, -572, -52, -413, -147, -89, -538, -106, -28, -855, -132, -339, -164, -342, -430, -1000, -2, -533, -842, -228, -263, -128, -24, -1000, -677, -5, -1000, -129, -525, -761, -131, -812, -144, -292, -1000, -531, -18, -178, -716, -1000, -379, -179, -77, -178, -2, -200, -839, -176, -159, -271, -83, -776, -509, -819, -528, -226, -316, -177, -648, -1000, -39, -110, -356, -178, -300, -709, -1000, -1000, -30, -324, -51, -480, -18, -30, -715, -123, -759, -477, -1000, -570, -198, -240, -30, -47, -147, -368, -279, -206, -513, -559, -1000, -430, -284, -127, -665, -56, -351, -70, -216, -357, -74, -376, -493, -888, -936, -559, -458, -171, -105, -83, -492, -631, -1000, -95, -21, -342, -834, -462, -177, -560, -370, -382, -27, -222, -300, -1000, -377, -72, -134, -1000, -287, -346, -938, -18, -446, -381, -1000, -204, -367, -1000, -868, -1000, -802, -482, -1000, -164, -841, -179, -417, -196, -210, -1000, -48, -537, -148, -1000, -75, -149, -265, -1000, -72, -204, -126, -338, -608, -274, -922, -167, -206, -995, -76, -145, -282, -72, -254, -200, -339, -575, -804, -61, -154, -511, -87, -380, -39, -217, -152, -262, -170, -246, -2, -540, -581, -257, -780, -718, -1000, -208, -66, -544, -57, -705, -366, -6, -497, -48, -92, -87, -78, -323, -260, -29, -13, -137, -897, -186, -168, -336, -70, -111, -1000, -34, -203, -1000, -60, -229, -10, -408, -251, -4, -174, -295, -427, -464, -27, -47, -121, -177, -686, -198, -140, -569, -305, -259, -80, -129, -1000, -593, -51, -310, -293, -169, -735, -267, -814, -567, -561, -508, -13, -1000, -255, -215, -24, -643, -35, -5, -486, -901, -1000, -1000, -59, -204, -256, -468, -419, -949, -430, -195, -805, -32, -3, -93, -132, -662, -161, -36, -34, -136, -195, -179, -23, -515, -835, -783, -414, -256, -128, -94, -88, -180, -216, -323, -74, -143, -377, -560, -183, -998, -103, -977, -875, -1000, -235, -54, -93, -534, -1, -3, -356, -81, -607, -810, -1000, -970, -149, -257, -199, -1000, -149, -718, -34, -334, -46, -99, -568, -942, -281, -268, -188, -48, -883, -882, -1000, -37, -39, -78, -667, -63, -13, -442, -617, -614, -446, -1000, -44, -563, -1000, -529, -645, -397, -183, -420, -2, -1000, -139, -1000, -148, -443, -268, -179, -440, -359, -594, -335, -711, -66, -240, -408, -64, -138, -550, -1000, -356, -1000, -67, -274, -4, -85, -616, -279, -109, -280, -6, -6, -15, -624, -309, -629, -387, -51, -707, -293, -1000, -759, -24, -260, -301, -16, -153, -644, -294, -299, -411, -816, -17, -30, -178, -684, -191, -115, -843, -160, -1000, -241, -1000, -272, -54, -175, -92, -82, -914, -535, -81, -1, -455, -616, -821, -305, -1000, -515, -580, -145, -772, -14, -397, -273, -416, -63, -167, -284, -6, -4, -207, -96, -1000, -441, -532, -573, -423, -12, -731, -681, -490, -71, -837, -46, -118, -846, -498, -8, -156, -525, -787, -340, -265, -111, -412, -45, -74, -939, -149, -863, -34, -1000, -11, -1000, -1000, -182, -506, -133, -607, -1000, -102, -3, -213, -131, -241, -406, -560, -209, -246, -226, -1000, -603, -204, -945, -28, -21, -121, -1000, -2, -234, -1, -81, -1000, -99, -1000, -165, -1000, -239, -102, -1000, -226, -334, -1000, -405, -792, -1, -1, -588, -524, -263, -621, -155, -171, -391, -1000, -2, -382, -1000, -638, -576, -556, -344, -619, -201, -1, -111, -955, -1000, -4, -146, -41, -559, -38, -83, -411, -232, -558, -1000, -934, -115, -51, -294, -416, -1000, -3, -151, -532, -8, -153, -774, -724, -50, -30, -8, -208, -420, -451, -208, -986, -32, -205, -1000, -2, -328, -1000, -65, -1000, -482, -24, -262, -101, -445, -103, -649, -348, -8, -1000, -105, -53, -121, -474, -151, -1, -318, -743, -713, -142, -126, -1000, -31, -166, -224, -13, -272, -23, -118, -82, -387, -91, -807, -3, -5, -1000, -752, -937, -1000, -130, -523, -79, -868, -371, -1000, -468, -629, -550, -1000, -249, -490, -77, -239, -730, -176, -544, -83, -161, -650, -189, -750, -474, -163, -461, -198, -336, -274, -3, -85, -122, -511, -157, -23, -467, -36, -373, -173, -522, -177, -512, -22, -771, -6, -810, -1, -799, -51, -135, -131, -1000, -363, -30, -393, -390, -224, -1, -1000, -460, -111, -1, -731, -38, -860, -178, -342, -231, -213, -93, -135, -20, -128, -1, -381, -31, -185, -49, -42, -1, -145, -2, -719, -661, -8, -71, -430, -241, -872, -218, -465, -193, -1000, -915, -438, -1000, -2, -603, -102, -596, -203, -383, -4, -42, -133, -388, -291, -865, -105, -80, -140, -2, -78, -641, -59, -210, -69, -34, -6, -156, -278, -1000, -719, -784, -240, -164, -1, -571, -14, -31, -19, -917, -1, -35, -1000, -1, -153, -183, -110, -178, -124, -83, -1000, -1000, -63, -7, -368, -570, -125, -283, -120, -274, -182, -1000, -1000, -534, -102, -50, -9, -2, -36, -629, -259, -665, -104, -81, -160, -18, -1, -110, -43, -975, -185, -1000, -1000, -131, -301, -303, -23, -43, -610, -670, -23, -347, -12, -115, -15, -2, -44, -283, -79, -269, -282, -1000, -516, -9, -281, -30, -190, -126, -117, -75, -146, -355, -9, -14, -58, -1000, -35, -43, -975, -715, -437, -226, -1000, -1000, -94, -305, -174, -1000, -62, -1000, -25, -83, -1, -405, -1000, -403, -11, -997, -329, -497, -30, -613, -342, -44, -252, -504, -484, -1000, -86, -322, -1000, -268, -376, -208, -152, -411, -215, -1000, -912, -1000, -479, -906, -699, -141, -1000, -360, -2, -266, -992, -415, -513, -851, -1000, -957, -334, -208, -686, -196, -100, -587, -388, -20, -741, -353, -251, -1000, -149, -714, -4, -368, -814, -527, -513, -58, -745, -674, -62, -272, -833, -1000, -310, -1000, -195, -9, -164, -348, -52, -1000, -168, -868, -249, -1000, -152, -937, -178, -423, -1000, -182, -680, -933, -48, -140, -52, -246, -933, -1000, -62, -13, -1000, -16, -2, -118, -596, -893, -277, -1000, -1, -401, -477, -506, -239, -11, -360, -84, -623, -529, -1000, -291, -183, -391, -997, -178, -196, -588, -353, -199, -1000, -56, -68, -142, -211, -1000, -33, 0, -618, -93, -272, -49, -309, -288, -152, -1, -1000, -628, -2, -429, -1, -303, -1000, -720, -691, -210, -10, -342, -927, -1000, -582, -460, -20, -109, -118, -1000, -184, -428, -173, -673, -292, -595, -668, -2, -29, -1000, -508, -179, -18, -387, -580, -382, -264, -1000, -1000, -826, -100, -139, -339, -90, -185, -307, -790, -148, -1000, -730, -80, -168, -37, -33, -443, -378, -71, -25, -1000, -362, -145, -110, -1000, -1000, -136, -81, -261, -11, -49, -448, -429, -2, -463, -372, -615, -546, -385, -151, -584, -2, -1000, -516, -1000, -78, -382, -19, -110, -255, -14, -548, -1000, -58, -421, -339, -658, -752, -788, -126, -523, -112, -1000, -95, -693, -2, -666, -4, -556, -692, -183, -368, -214, -540, -42, -65, -531, -943, -167, -1, -576, -268, -151, -315, -18, -391, -599, -5, -1000, -167, -334, -94, -4, -971, -205, -439, -281, -543, -1, -556, -378, -201, -780, -231, -49, -1000, -226, -605, -1, -242, -317, -1000, -317, -584, -244, -2, -143, -384, -520, -429, -158, -73, -396, -112, -411, -69, -4, -246, -156, -1000, -20, -491, -366, -1000, -742, -49, -1000, -435, -886, -161, -570, -373, -207, -318, -347, -115, -372, -80, -4, -201, -948, -1000, -116, -1000, -158, -121, -3, -60, -1000, -608, -267, -383, -117, -56, -235, -264, -33, -624, -79, -258, -250, -176, -287, -1000, -34, -1, -454, -655, -311, -391, -133, -1000, -866, -1000, -3, -4, -85, -773, -651, -452, -102, -484, -867, -805, -50, -309, -32, -16, -147, -537, -691, -4, -1000, -480, -882, -31, -109, -217, -269, -683, -121, -742, -531, -31, -459, -1000, -1000, -501, -43, -162, -164, -912, -149, -387, -221, -596, -812, -337, -397, -7, -1000, -64, -2, -62, -6, -478, -52, -1000, -1000, -239, -532, -10, -582, -90, -170, -432, -319, -617, -307, -41, -127, -294, -547, -1000, -1000, -192, -86, -112, -1000, -705, -273, -491, -61, -6, -185, -36, -311, -93, -132, -28, -245, -860, -559, -426, -1000, -1000, -313, -196, -236, -381, -32, -957, -775, -625, -91, -1000, -454, -500, -993, -952, -863, -244, -61, -1, -290, -578, -121, -412, -1000, -405, -1000, -401, -765, -179, -869, -454, -1000, -325, -1000, -318, -7, -735, -139, -1000, -574, -709, -639, -80, -192, -913, -111, -76, -411, -4, -472, -415, -156, -430, -394, -172, -1000, -98, -368, -228, -2, -1000, -1000, -1, -1, -68, -28, -116, -103, -1000, -76, -1000, -98, -1000, -59, -808, -2, -520, -1, -302, -592, -336, -1000, -231, -265, -1000, -450, -1000, -601, -20, -473, -1000, -441, -871, -140, -137, -1, -483, -271, -200, -2, -367, -515, -723, -1000, 0, -138, -44, -79, -752, -1000, -418, -65, -335, -1000, -29, -69, -246, -151, -632, -672, 0, 0, -610, -749, -160, -125, -925, 0, -19, -5, -18, -1000, -825, -650, -1, -8, -461, 0, -370, -10, -596, -229, -523, -1000, -901, -906, -210, -414, -581, -622, 0, -1000, -455, -407, -387, -20, -10, -259, -105, -435, -307, -738, -760, -582, -822, -399, -1000, -380, -87, -38, -736, -42, 0, 0, -41, -291, -44, -118, -302, -102, -47, -45, -222, -30, -236, -19, 0, -187, -632, -1, -1000, -246, -936, -1000, -1000, -12, -1000, -1000, -392, -283, -649, -110, -1000, -190, -37, -418, -1000, -247, -220, -77, -501, -982, -10, -1000, -37, -1000, -316, -2, -15, -616, -4, -183, -174, -667, -12, -244, -660, -955, -1, -324, -421, -680, 0, -551, -337, -478, -230, -728, -56, -7, -128, -556, 0, -326, -26, -326, -90, -262, -1000, -12, -252, -45, -136, -654, -154, -458, -95, -122, -459, -70, -139, -185, -1000, -231, -888, -950, 0, -254, 0, -29, -211, -712, -1000, -1000, -186, -103, -198, -688, -240, -170, -657, -682, -359, -1, -355, -474, 0, -1000, -184, -1000, -2, -1, -75, -559, -31, -561, -640, -1000, -1, -474, -373, -166, -174, -740, -856, -1000, -230, -253, -27, -1000, -210, -242, -1000, -1000, -100, -415, -1000, -267, -1000, -331, -167, -313, -201, -54, -674, -468, -145, -99, -1000, -381, -298, -2, -1000, -219, -636, -202, -794, -189, -837, -997, -395, -307, -8, -132, -659, -467, -441, -271, -601, -1000, -2, -560, -1000, -372, -90, -176, -1000, -910, -486, -104, -29, -298, -978, -66, -235, -332, -944, -190, -161, -191, -649, -740, -4, -1000, 0, -806, -1000, -1000, -624, -269, -330, -943, -796, -74, -462, -685, -198, -391, -228, -162, -12, -224, -348, -235, -4, -353, -814, -1, 0, -417, -612, -130, -152, -62, -483, -123, -574, -382, -77, -785, 0, -323, -579, -17, -747, -2, -219, -3, -178, -28, -580, -138, -404, -111, -464, -139, -2, -112, -1000, -353, -272, -419, -1000, 0, -289, -768, -425, -532, -8, -70, -215, -369, 0, -1, -46, -436, -20, -821, -645, -47, -448, -522, -1000, -330, -1000, -420, -260, -49, -128, -346, -350, -122, -668, -79, -364, -264, -495, -831, -19, -233, -663, -35, -438, -372, -1, -739, -302, -162, -35, -153, -21, -1, -198, -1, -1000, -755, -1000, -326, -49, -1000, -308, -787, -708, -446, -180, -224, -232, -85, -325, -165, -1, 0, -1000, -245, 0, -1000, -79, -374, -239, -153, -1, -5, -88, -604, -258, -1000, -4, -107, -161, -163, -1000, 0, -6, -519, -210, -94, -326, -62, 0, -248, -382, -171, -2, -42, -126, -48, -112, -2, -193, 0, -181, -89, -430, -452, -181, -1000, -814, -841, -59, -77, -17, -495, -89, -1000, 0, -1, -303, -237, -126, 0, -1000, -60, -59, 0, -1, -254, -282, -3, -5, -330, -316, -155, -32, -73, -590, -3, -22, -713, -2, -237, -1000, -353, -1, -125, -80, -579, -20, -323, -826, -715, -388, -180, -458, -80, -86, -1000, -121, -1000, -2, -7, -419, -945, -473, -1000, -204, -614, -403, -255, -1000, -267, -58, -135, -138, -1000, -123, -24, -254, -606, 0, -305, -135, -86, -142, 0, -849, -2, -79, -160, -6, -93, -445, -398, -152, -391, -163, -1000, -248, -3, -333, -157, -315, -230, -428, -287, -337, -260, -513, -8, 0, -588, -567, -1000, -237, -21, -1000, -104, -735, -35, -341, -820, 0, -657, -19, -901, -356, 0, -21, -633, -94, -251, -1000, -112, -987, -680, -116, -12, -371, -40, -294, -383, -78, -1000, -202, -666, -106, -224, -391, -180, -1000, -103, -945, -241, -43, -1, -118, 0, -722, -16, -494, -407, -1000, -594, -4, -1000, 0, -497, -280, -652, -471, -299, -833, -176, -299, -115, -450, -315, -624, -172, -154, -948, -180, -814, -162, -3, -422, -186, -192, -278, -658, 0, -53, -162, -50, 0, -50, -62, -31, -312, -1000, -1000, -875, -2, -104, -1000, -292, -975, -1000, -1000, -122, -71, -1000, -699, -279, -304, -170, -655, -174, -360, -2, -330, -701, -502, -9, -231, -1000, -456, -419, -309, -85, -25, -414, -10, -95, -181, -53, -157, -732, -4, -1000, -27, -757, -202, -56, -923, -1000, -59, -487, -176, -812, -1, -9, -356, -407, -538, -2, -544, -2, -9, -58, 0, -690, -478, -806, -231, -506, 0, -70, 0, 0, -48, -887, -183, -257, -84, -438, -26, -353, -368, -847, 0, -140, -12, -2, -184, -113, -58, -171, -325, -570, -30, -953, -192, -570, -171, -310, -223, -1000, -69, -6, -173, -68, -296, -454, -55, -4, -346, -145, 0, -9, 0, 0, -668, -802, -46, -366, -543, -196, -399, -1000, -41, -39, -279, -394, -890, -371, -61, -867, -279, 0, 0, -1000, -116, -20, -367, -38, -40, -558, -224, 0, -111, -719, -5, -1, 0, -393, 0, -1, -653, -836, -715, -774, 0, -2, -1000, -285, -1000, -656, -30, 0, -288, -274, -397, -26, -171, -275, -1000, -180, -963, -1000, -900, 0, -14, -1000, -1000, -7, -160, -451, -290, -115, -53, -34, -635, -708, -186, -190, -1000, 0, -937, -988, -4, 0, -599, -890, -751, 0, -241, -1, -1000, -1000, -367, -933, -632, -163, -98, -319, -160, -20, 0, -7, -116, -93, -502, -716, 0, -285, -502, -8, -1000, 0, -4, -665, -247, -509, -679, -629, -377, -1, -469, -1000, -1000, -2, -893, -100, 0, -277, -325, -691, -297, -421, -147, -196, -1000, 0, -578, -257, -1000, -132, -3, -460, -2, -625, -221, -1000, -281, -371, -484, -129, 0, -1000, -792, -3, -1000, -1000, -680, 0, -56, 0, -352, -260, -896, -1000, 0, 0, -347, -1000, -90, -297, -574, -342, -470, 0, -97, -52, -1000, -597, -21, -3, -170, -766, -272, 0, -433, -444, -252, -323, -83, -454, -287, -1000, -462, 0, -1, -286, -1, -84, -93, 0, -112, -51, -193, -977, -851, -38, -597, -1000, -231, -852, -450, -216, -16, -349, -59, -1000, -11, 0, -653, -548, -700, -875, -621, 0, -167, -15, -49, 0, -695, -99, -285, -1000, -853, -35, -416, 0, -92, -114, -153, -287, -2, -90, -171, -1000, -1000, -53, -470, -302, -258, -295, -619, -7, -1000, -132, -291, -844, -151, -101, -659, -70, -346, -46, -1000, -722, -576, 0, -658, -765, -681, -8, -31, -1000, -783, -78, -42, -1000, -649, -186, -1000, -1, 0, -95, 0, -395, -114, -663, -800, -1000, 0, -24, -506, -227, -667, -30, -173, -375, 0, -6, -2, -1000, -1000, -585, -213, -252, -372, -468, -706, -1, -936, -897, -10, -155, -523, -246, -285, -62, -123, -529, -460, -600, -1000, -124, -390, -85, -610, -1000, -2, -324, -547, -1000, -663, -275, -76, -266, -957, -430, -145, -1000, -5, -16, -17, -279, -203, -99, -506, -411, -118, -78, -2, -976, -55, 0, -119, -399, -1000, -170, -5, -1000, -423, -196, -120, -407, 0, 0, 0, -364, -646, -1, -842, -488, -743, -845, -322, -271, -181, -1000, -391, -901, 0, -376, -1000, -214, -84, -172, -343, -371, -51, -1000, 0, -672, -222, -672, -862, -27, -253, 0, -589, -48, 0, -273, -130, -669, 0, 0, -68, -1000, -613, -124, -289, -434, -859, -722, -1000, -430, -1000, -964, -494, -207, -2, -660, 0, -127, -901, -1000, -363, 0, -587, -627, -110, -581, -343, -129, -36, -267, 0, -295, 0, -308, 0, -860, -56, -21, -40, -122, -28, -212, -157, -4, -265, -337, -389, -94, -1000, -25, -447, 0, -375, -366, -167, -131, -95, 0, 0, -610, -79, -127, 0, -340, -825, -348, 0, -690, -374, -495, -211, -673, -831, -988, -39, -71, -353, -1, -1000, 0, -210, -133, -1000, -247, -161, 0, -811, -466, -538, -19, -1000, -229, -196, -425, -247, -634, -445, -548, -60, -383, -151, -434, -23, -645, -870, -1, -283, -147, -790, -474, -32, -293, -519, 0, -67, -244, -802, -150, -103, -1, -1, -513, -292, -1000, -268, -440, -615, -3, -495, -440, -396, -40, -159, 0, -152, -921, -1000, -1000, -995, -170, 0, -1000, -1000, -144, -297, -55, -775, -1000, -1, -1, -63, -3, -207, -189, -159, -1000, -153, -108, -184, -310, -198, 0, -341, -274, -1, -138, 0, -261, -138, -131, -942, -408, -267, -1000, -430, -434, -42, -165, -166, -1000, 0, -357, -1000, -571, 0, -1000, -4, -4, 0, -17, -1000, -88, -35, -131, -245, -415, -1000, 0, -96, 0, -610, -87, -231, 0, -324, -884, -1000, -95, -724, -51, -150, -290, -567, -714, -1000, -726, -378, -134, -190, -365, -88, -87, -587, -888, -243, -1, 0, -1, -172, -741, -435, -65, -1000, -519, -218, -278, -301, 0, -18, -88, -155, -205, -1000, -87, -2, -477, -189, 0, -938, -825, -340, -585, -558, 0, 0, -707, -832, -31, -567, -1000, -587, -667, -28, -441, -1000, 0, -1000, -90, -549, -600, -431, -645, -1000, -76, -156, -37, 0, -122, -695, -194, 0, -1000, -638, -2, -63, -342, -149, -64, 0, -649, -1000, -508, -671, -1000, -156, -1000, -216, -5, -416, -470, -176, 0, -654, -636, -323, -1000, -101, -1000, -735, -77, -423, -363, -1000, -1000, 0, -265, -697, -8, -778, -43, -2, -981, 0, -695, -1000, -481, -80, -189, -267, -1000, -1, -179, -731, -339, -292, -246, -711, -33, -1000, -129, -176, -291, -696, -102, -136, -11, -486, -326, -318, -528, -225, -34, -22, -1, -25, 0, 0, -526, -513, -1, 0, 0, -301, -590, 0, -5, -16, -148, -166, -238, -262, -197, -1000, -219, 0, -957, 0, -470, -31, -1000, -3, -251, -218, -121, -121, -227, -325, -69, -113, 0, -267, -7, -325, -3, -89, -160, -1000, -104, -1000, -2, 0, -383, -81, -249, -149, -400, 0, -321, -35, -469, -578, -7, -352, -122, -52, -24, -138, -186, -128, -820, -115, -13, -440, -677, -114, -563, -1000, -360, -359, -121, -26, -1000, -17, -1000, -826, -175, -369, -1000, -463, -44, -1000, -584, -276, -154, -615, -341, 0, -368, -4, -1, -773, -386, -190, -201, -78, -4, -142, -670, -35, -314, -1, -203, -109, -92, -370, -497, -503, -229, -867, -1000, -509, -9, -765, -313, -155, -111, -1, -195, -932, -934, -555, -819, -499, -759, -270, -147, -518, -1, -894, -1000, -383, -248, -275, -741, -28, -40, -234, -613, -483, -379, -883, -238, -402, -244, -526, -588, -443, -928, -405, -112, -108, -10, -1, -776, -321, -247, -189, -483, -1000, -104, -1, -637, -142, -1, -1000, -267, -50, -505, 0, -1000, -251, -1000, -14, -454, 0, -17, -510, -2, -229, -852, -210, 0, -271, -75, -211, -1000, -1000, -168, -1000, -216, -242, -88, -279, -406, -29, -1000, -683, -109, -1000, -651, -2, -688, -215, -295, -45, -789, -4, -506, -237, -435, -706, -7, -120, -1000, -280, -1000, 0, -381, -382, -524, 0, -149, -351, -81, 0, -335, -1000, -210, -862, -32, -647, -357, 0, -909, -281, -68, -141, -568, -374, -243, -961, -165, -488, -37, -189, -400, -892, -1000, -53, -103, -221, -51, -135, -158, -1000, -1000, -950, -17, -109, 0, -76, -971, -4, -321, 0, 0, -450, -1000, -807, -604, -702, -504, -1000, -370, -172, -3, 0, -667, -143, -238, -190, -501, -203, -108, -2, -154, -183, -958, -800, -1000, -336, -71, -38, 0, -1000, -416, -86, -214, -26, -106, 0, -258, -1000, -155, -959, -910, -263, -1000, -519, -34, -461, -2, -372, -676, -552, -336, -694, -844, -160, -202, -200, -307, -276, -658, -1000, -168, -722, -350, -290, -2, -1000, -217, -438, -34, -562, -148, 0, -445, -1000, -97, -189, -712, -517, -4, -136, -543, -1000, -160, 0, -719, -110, -728, -154, -223, -313, -422, 0, -636, -1000, 0, -871, -642, -1000, -336, -247, -373, -171, -734, -229, 0, -217, -555, 0, -686, -367, -584, -1000, -607, -60, -420, -137, -248, -1000, -105, -209, -383, -281, -304, 0, -48, -944, -411, -7, -22, -419, -79, -1000, 0, -437, -919, -18, -459, -1000, -862, -537, -941, -47, -909, -345, -46, -584, -114, -638, -134, -709, -53, -728, -311, -491, -194, -144, -117, -783, -795, 0, -11, -104, -969, -1, -864, -275, -235, -316, -781, -690, 0, -281, -396, -276, -569, -1000, -154, -390, -954, -914, -799, -776, -879, -207, -1000, -680, -43, -8, -116, -1000, -1000, -115, -514, -1000, -1000, 0, -347, -1000, -75, -215, -21, -292, -366, -18, -208, -338, -282, -65, -537, -395, -19, -284, -929, -191, -1000, -284, -6, -432, -742, -340, -90, -404, -847, -484, -1000, -2, -620, -1, -197, -470, -2, -311, -301, -866, -778, -595, -194, -382, -457, -131, -26, -1000, 0, 0, -40, -1000, -239, -973, -371, -481, -56, -410, -1000, -551, -1000, -194, -1000, -379, -708, -54, -26, -1000, -1000, -69, -182, -33, -898, -265, -1000, -374, -685, -194, -742, 0, -182, -5, -294, -44, -549, -248, -1000, -179, -157, -17, -290, -738, -371, -68, -76, -700, -641, -127, -546, -276, -271, -1000, -1, -1000, -414, -152, -107, -240, -107, -326, -251, -292, -214, -1000, -746, -1000, -237, -74, -1000, 0, -344, -1000, -88, -501, -156, 0, -819, -229, -110, -734, -1000, 0, -830, -162, -36, -179, -679, -291, -370, -747, -360, -472, -603, -386, -113, -500, -3, -111, -4, -180, -28, -1000, -332, -100, -226, -720, -1000, -869, -302, -857, -903, -1000, -616, -10, -303, -447, -912, 0, -248, -1000, -621, 0, -111, -1000, -501, -557, -535, -202, -116, -109, -3, -27, -381, -1000, -5, -86, -561, -56, -72, 0, 0, -91, -173, -546, -701, -119, -319, -504, -49, -740, -4, -275, -513, -391, -9, -618, -516, -241, -21, -71, -117, -287, -203, -159, -880, -4, -79, -270, -627, -345, -556, -393, 0, -623, 0, -159, -29, -843, -778, -1000, -213, -1000, -142, -656, -391, -184, 0, -613, -251, -449, -120, -287, -423, -1000, -500, -572, -272, -503, -218, -116, -375, -1000, -175, -182, -3, -76, -408, -123, -1000, -399, -1000, -10, -768, -530, -937, -233, -167, 0, -24, -499, -1000, -708, -1000, -140, -279, -130, -278, -284, -323, -77, -568, -435, -982, -475, -41, -493, -106, -517, -1000, -524, -629, -124, 0, -311, -470, -759, -124, -500, -716, -731, -815, -118, -113, -8, -394, -592, -1000, 0, -45, -111, -487, -1000, -1000, -56, -1000, -328, -414, -75, -516, -1000, -736, -346, -1, -564, -694, -88, -314, -526, -353, -780, -652, -98, -54, -240, -224, -1000, -933, -231, -741, -443, -372, -868, -481, -667, -326, -12, -1000, -1000, -1, -4, -9, -237, -1000, -300, -234, -50, -141, -477, -24, -158, 0, -1000, -158, -524, -254, -34, -144, -813, -18, -469, -1000, -211, -567, -474, -751, -1000, 0, -2, -1000, -51, -915, -45, -1000, -1000, -976, -545, 0, -297, -735, -251, -246, -1000, -394, -69, -215, -373, -569, -960, -4, -159, -871, -167, -75, -849, -710, -711, -827, -1000, 0, 0, -559, -1000, -300, -6, -839, -26, 0, -32, -381, -925, -663, -361, -543, -285, -569, -105, -188, -1000, -758, -505, -413, 0, -686, -649, -178, -243, -365, -472, -354, -121, -518, -361, -362, -1000, 0, -414, -249, -139, -668, -942, -99, -623, -159, -497, -208, -527, -67, -265, -188, -263, -319, -360, -64, -207, -112, -953, -12, -1000, -1000, 0, -509, -445, -516, -64, -91, -516, -326, -431, -8, -1000, -85, -368, -192, -1000, -886, -256, -323, -495, -863, -503, -835, -747, -798, -633, -663, 0, -25, -150, -112, -530, -289, 0, -2, -1, -641, -174, -1000, -51, -87, -587, -241, -99, -258, -358, -5, -936, -366, -263, -274, -1000, -313, -328, -414, -1000, -359, -1000, -68, -914, -799, -13, -320, 0, -431, -190, -1000, -616, -49, -592, -83, -298, -713, -1000, -1000, -96, -282, -853, -466, -445, -1000, -493, -408, 0, -59, -1000, -132, -108, -105, -58, -1000, -226, -298, -1000, 0, -30, -971, -35, -74, -483, -54, -729, -240, 0, -440, -158, -355, -622, -9, -691, -1000, -576, -5, -352, -462, -484, 0, -191, -269, -786, -777, 0, -156, -1000, -696, -297, -220, -432, -95, -591, -170, -253, -1000, -158, -546, -673, -622, -1000, -250, -97, -1000, -494, -192, -174, -63, -2, -56, -328, -209, -533, -1000, -294, -493, 0, -63, 0, -135, -52, -122, -1000, -247, -97, -129, -1000, -75, -797, -139, -44, -661, -152, 0, -482, -617, -12, -1, -11, -1000, -903, -372, -22, -29, -1000, -37, -598, -1, -248, -683, -77, -1000, -1000, -329, -548, -76, 0, -12, -260, -862, -224, -180, -27, -532, -373, -896, -89, -60, -364, -433, -327, -540, -1000, -572, -449, -999, -21, -301, -1000, -351, -145, -1000, -136, -1000, -1000, -603, -436, -499, -221, -10, -573, -889, -193, -111, -44, -160, -583, -393, -273, -237, -381, -36, -172, -66, -367, -734, -95, -242, -1000, -81, -406, -273, -7, -251, -519, -392, -697, -521, -151, -340, -861, -22, -1, -297, -23, -1000, -1000, -101, -775, -389, -212, -151, -127, -1000, -454, -2, -1000, -170, -123, -137, -262, -7, -795, -364, -339, -148, -1000, -217, -291, -538, -138, -194, -156, -1000, -621, -154, -607, -427, -467, -774, -82, -952, -754, -268, -1000, -641, -451, -397, -114, -249, -138, -933, -170, -720, -83, -325, -101, -218, -1000, -92, -805, -29, -461, -802, -211, -521, -886, -1000, -871, -226, -873, -84, -830, -757, -128, -215, -337, -737, -27, -384, -754, -119, -264, -36, -1000, -249, -843, 0, -142, -1000, -276, -1000, -403, -281, -8, 0, -1000, -7, -291, -132, -631, -891, -222, -508, -1000, -338, -917, -1000, -378, -169, -62, -393, -765, -185, -429, -563, -16, -66, 0, -106, -285, -479, -798, -513, -1000, -163, -99, -261, -501, -480, -307, -402, -77, -447, -445, -92, -621, -583, -1000, -6, -535, -288, -634, -11, -55, -29, -290, -23, -66, -352, -198, 0, -426, -3, -545, -56, -42, -1000, -1000, -159, -73, -474, -416, -68, -724, -194, -282, -122, -45, -1000, -408, -374, -381, -338, -312, -568, -86, -870, -1000, -145, -139, 0, -193, -45, -816, -237, -452, -890, -274, -552, -108, -42, -442, -1000, -77, 0, -244, -1000, -384, 0, -1000, -660, -1000, -1000, -283, -172, -124, -119, 0, -223, -699, -10, -705, -363, -236, -97, -707, -714, -2, -380, -10, -324, -99, -183, -632, -136, -1000, -385, -233, -252, -258, -726, -946, -504, -546, -699, -341, -217, -197, -31, -118, -208, -1000, -1000, -699, -1000, -393, -650, -173, -276, -178, -105, -301, -49, -422, -61, -453, -640, -186, -67, -57, -710, -350, -66, -581, -192, -469, -386, -926, -126, -235, -627, -2, -1000, -1000, -993, -473, 0, -916, -886, -179, -563, -1000, -5, -1, -579, -4, -13, -1000, -216, -7, -771, -249, -49, -295, -519, -95, -402, -1000, -4, -43, -22, -626, -52, -1000, -328, -185, -1000, -414, -275, -89, -547, -971, -45, -857, -409, -42, -808, -862, -139, -365, 0, -119, -207, -156, -480, -42, -60, -890, -796, -1000, -623, -614, -178, -1000, -8, -1000, 0, -358, -68, -614, 0, -361, -177, -470, -371, -536, -710, -508, -3, -1000, -1000, -538, -1000, -135, -735, -814, -33, -732, -654, -213, -881, -759, -499, -450, -55, -771, 0, -575, -1000, -29, 0, -165, -942, -166, -97, -27, -537, -792, -315, -318, -420, -339, -76, -573, -262, -839, -667, -215, -403, -467, -78, -300, -408, -670, -816, -452, -313, -289, -162, -212, -262, -553, -167, -240, -352, -304, -28, -315, -130, -224, -764, -695, -515, -286, -3, -1000, -1000, -763, -41, -1, -15, -1, -544, -8, -852, -340, -823, -263, -614, -2, -1000, -465, -356, -296, -134, -864, -639, -820, -212, -52, -1000, -3, -201, -27, -222, 0, -576, -354, -366, -6, -135, -370, -159, -322, -9, -255, -101, -461, -38, -429, -74, -125, -10, -212, -1000, -448, -338, -421, -150, -120, -739, -500, -303, -431, -4, -507, -91, 0, -1000, -1000, -51, -1000, -66, -39, -1000, -212, -5, -687, -732, -295, -649, -1000, -234, -265, -500, -306, -1, -1000, -1000, -690, -29, -928, -134, -388, -541, -274, -714, -51, -309, -78, -270, -36, -1000, -349, -422, -1000, -196, -78, -790, -471, -798, 0, -18, 0, -100, -1000, -840, -41, -309, -24, 0, -500, -595, -702, -24, -90, -829, -165, -473, -241, -142, -1000, -80, -255, -88, -5, -42, -610, -218, -132, -555, -445, -230, -638, -1000, -246, -32, -240, -1000, 0, -886, -433, -497, -1000, -862, -1000, -156, -39, -168, -98, -228, -569, -659, -279, -520, -105, -613, -312, -180, -110, -133, -138, -162, -29, -195, -425, -599, -476, -353, -566, -845, -568, -124, -767, -24, -155, -901, -977, -621, -1000, -190, -462, -312, -9, -761, -710, -854, -263, -339, -88, -282, -258, 0, -1000, -409, -535, -1000, -49, -343, -480, -1000, -1000, -199, -31, -256, -614, -449, -201, -492, -96, -104, -340, -36, -659, -1000, -608, -480, -4, -8, -131, -185, -334, -1000, -253, -233, -784, -796, -358, 0, -686, -1000, -569, -482, -24, -127, -99, -1000, -310, -2, -140, -850, -181, -263, -138, -293, -49, -90, -8, -1000, -194, -701, -710, -85, -290, -278, -266, -558, -688, -624, -896, -710, -1000, -125, -202, -72, -1000, -636, -678, -492, -1000, -760, -369, -1, -199, -184, -32, -728, -31, -90, -31, -486, -72, -204, -12, -4, -100, -50, -5, -252, 0, -581, 0, -1000, -1000, -250, -3, -366, -55, -409, -941, 0, -1000, -276, -283, -291, -185, -712, -10, -398, -552, -83, -412, -433, -1000, -11, -464, -421, -1000, -760, -85, -741, -96, -1000, -916, -950, -103, -245, -85, -446, -341, -49, -331, -13, -729, -102, -121, -433, -977, -1000, 0, -1000, 0, -682, -868, -99, -1000, -194, -190, -690, -128, -480, -174, -131, -795, -27, -172, -75, -445, -107, -84, -173, -1000, -348, -1000, -363, -4, -183, -96, -406, -548, -126, -7, -324, -380, -384, -177, -1000, -195, -837, -60, -1000, -217, -332, -2, -55, -192, 0, -384, -121, -168, -253, -733, -143, -244, -104, -386, -409, -1000, -55, -150, -64, -158, -442, -488, -190, -5, -185, -1000, -245, -325, -216, -274, -256, -474, -229, -254, -84, -260, -1000, -649, -40, -757, -117, -647, -244, -365, -586, -21, 0, -1000, -232, -7, 0, -292, -80, -14, -657, -1000, 0, -625, -252, -839, -221, -633, -192, -255, -6, -70, -1000, -97, -277, -261, -643, -588, -94, -562, -43, -62, -434, -471, -826, -22, -262, -289, -29, -491, -438, -19, -258, -398, -348, -9, -729, -185, -506, -388, -917, -687, -120, -528, -461, -469, -645, -304, -131, -475, -271, -222, -1000, -203, -307, -244, -1000, -830, -127, -257, -433, -1000, -85, -30, -264, -62, -306, -330, -9, -320, -386, -207, -181, -57, -925, -245, -477, -214, -424, -356, -628, -49, -232, -245, -169, -1000, -785, -935, -366, -656, -385, -590, -3, -496, -1000, -500, -61, -59, -1000, -706, -400, -473, -61, -729, -767, -78, -159, -840, -1000, -68, -493, -465, -1000, -927, -1000, -8, -910, -405, -109, -507, -294, -427, -208, -179, -743, -412, -301, -215, -151, -90, -1000, -583, -267, -274, -283, -381, -562, -314, -99, -352, -150, -334, -75, -276, -367, -794, -1000, -405, -194, -457, -596, -634, -99, -69, -38, -370, -172, -787, -477, -514, -138, -780, -297, -845, -66, -91, -426, -453, -715, -143, -327, -457, -175, -374, -4, -792, -1000, -689, -1000, -1000, -1000, -259, -648, -425, -74, -76, -145, -209, -125, -175, -130, -70, -114, -377, -137, -263, -517, -351, -810, -78, -166, -281, -241, -187, -37, -574, -1000, -531, -211, -5, -701, -419, -74, -905, -41, -80, -449, -161, -142, -619, -340, -432, -198, -180, -1000, -1000, -422, -1000, -382, -136, -273, -311, -196, -1000, -315, -85, -205, -649, -1000, -559, -1000, -128, -952, -420, -46, -75, -432, -355, -386, -1000, -233, -182, -349, -1000, -289, -32, -269, -319, -40, -137, -573, -1000, -7, -812, -216, -365, -171, -611, -58, -493, -1000, -254, -163, -116, -142, -608, -738, -541, -428, -1000, -548, -419, -437, -593, -653, -80, -499, -57, -466, -156, -72, -1000, -10, -276, -399, -1000, -275, -162, -36, -178, -738, -571, -1000, -99, -526, -888, -176, -551, -746, -55, -219, -881, -1000, -4, -142, -876, -202, -245, -8, -24, -48, -115, -7, -1000, -12, -327, -114, -1000, -348, -929, -69, -40, -197, -220, -162, -97, -950, -469, -261, -1000, -1000, -14, -35, -169, -220, -753, -383, -551, -1000, -1000, -31, -243, -654, -564, -59, -1000, -1000, -879, -288, -241, -1000, -342, -92, -1000, -453, -9, -58, -276, -569, -1000, -554, -165, -112, -1000, -421, -906, -402, -285, -57, -23, -359, -29, -50, -362, -643, -76, -747, -371, -1000, -242, -424, -27, -614, -86, -745, -101, -103, -260, -298, -559, -114, -350, -1000, -722, -73, -110, -404, -416, -1000, -427, -529, -87, -64, -185, -469, -404, -57, -171, -31, -177, -373, -35, -166, -745, -160, -6, -345, -70, -108, -1000, -249, -296, -66, -910, -95, -803, -512, -818, -208, -571, -706, -842, -645, -7, -64, -228, -226, -81, -220, -935, -7, -410, -1000, -241, -646, -65, -149, -35, -160, -563, -150, -811, -254, -663, -394, -1000, -425, -1000, -236, -385, -55, -769, -311, -458, -1000, -504, -172, -1000, -82, -1000, -448, -805, -93, -23, -67, -72, -4, -1000, -99, -523, -563, -1000, -374, -834, -298, -45, -225, -1000, -145, -330, -109, -356, -128, -444, -50, -11, -552, -544, -1000, -63, -284, -324, -122, -660, -50, -1000, -244, -122, -240, -372, -348, -1000, -1000, -162, -258, -210, -17, -103, -1000, -155, -56, -573, -614, -309, -603, -516, -945, -1000, -131, -288, -94, -376, -229, -13, -829, -102, -163, -775, -912, -86, -54, -284, -669, -284, -318, -298, -925, -440, -492, -96, -119, -458, -408, -760, -356, -431, -219, -42, -401, -11, -945, -1000, -871, -229, -389, -109, -995, -558, -439, -926, -83, -83, -221, -576, -898, -294, -1000, -71, -154, -68, -1000, -1000, -695, -284, -773, -781, -1000, -31, -355, -60, -149, -306, -957, -1000, -350, -1000, -565, -777, -1000, -318, -63, -171, -225, -32, -739, -184, -63, -141, -279, -407, -1000, -505, -35, -717, -92, -399, -271, -26, -516, -1000, -525, -1000, -622, -649, -202, -224, -1000, -225, -333, -241, -437, -59, -414, -546, -298, -286, -900, -6, -591, -454, -6, -149, -254, -172, -613, -1000, -103, -521, -138, -62, -58, -520, -953, -313, -210, -244, -10, -479, -100, -244, -223, -369, -6, -665, -1000, -602, -576, -501, -56, -509, -601, -248, -789, -180, -234, -178, -767, -192, -240, -248, -1000, -1000, -83, -524, -789, -506, -614, -11, -1000, -34, -56, -893, -924, -419, -333, -181, -319, -1000, -81, -430, -1000, -59, -253, -73, -161, -27, -137, -409, -55, -107, -22, -667, -1000, -1000, -692, -431, -134, -1000, -3, -61, -391, -28, -635, -245, -412, -979, -112, -54, -559, -205, -233, -25, -27, -422, -32, -123, -286, -279, -681, -38, -878, -266, -471, -197, -583, -180, -126, -326, -171, -412, -159, -562, -210, -75, -718, -196, -336, -627, -331, -655, -69, -310, -528, -275, -272, -148, -1000, -361, -242, -1000, -531, -626, -305, -295, -240, -631, -505, -211, -1000, -130, -117, -67, -942, -544, -1000, -180, -129, -733, -204, -529, -292, -145, -1000, -197, -954, -10, -295, -976, -612, -7, -422, -311, -711, -1000, -51, -654, -477, -162, -715, -19, -55, -114, -140, -75, -904, -895, -168, -125, -262, -191, -193, -30, -887, -820, -581, -703, -68, -938, -183, -35, -707, -921, -690, -331, -724, -34, -1000, -118, -1000, -120, -73, -705, -522, -298, -191, -81, -431, -1000, -1000, -303, -999, -377, -357, -1000, -142, -1000, -198, -1000, -531, -98, -646, -1000, -7, -66, -960, -254, -101, -1000, -448, -458, -388, -618, -404, -129, -267, -78, -1000, -105, -1000, -469, -1000, -518, -520, -643, -296, -294, -133, -675, -406, -237, -154, -165, -1000, -1000, -186, -140, -685, -275, -227, -1000, -1000, -147, -230, -229, -520, -950, -583, -444, -244, -707, -544, -77, -687, -93, -659, -197, -554, -83, -1000, -136, -973, -282, -419, -695, -330, -3, -103, -188, -863, -136, -422, -81, -121, -960, -434, -1, -199, -358, -481, -321, -384, -1000, -516, -16, -63, -1000, -299, -1000, -284, -729, -773, -733, -361, -1000, -386, -1000, -699, -806, -487, -47, -561, -124, -254, -286, -195, -22, -971, -493, -1000, -1000, -105, -11, -64, -598, -229, -265, -66, -1000, -184, -641, -624, -195, -88, -157, -31, -96, -522, -704, -150, -579, -204, -315, -474, -221, -1000, -853, -173, -97, -164, -695, -824, -789, -1000, -2, -91, -1000, -334, -70, -679, -152, -1000, -204, -744, -543, -491, -521, -238, -133, -82, -126, -548, -261, -205, -1000, -485, -845, -317, -606, -128, -1000, -1000, -50, -387, -277, -431, -250, -2, -1000, -128, -275, -22, -304, -287, -1000, -326, -692, -8, -43, -363, -368, -647, -148, -141, -23, -568, -1000, -411, -403, -209, -812, -1000, -5, -232, -634, -253, -30, -21, -185, -195, -361, -325, -24, -618, -342, -324, -243, -314, -779, -88, -1000, -51, -892, -187, -289, -500, -326, -1, -213, -396, -50, -1000, -11, -272, -80, -21, -67, -60, -1000, -396, -170, -1000, -707, -373, -640, -21, -185, -981, -431, -13, -98, -500, -166, -57, -730, -991, -671, -127, -109, -106, -137, -52, -448, -529, -788, -1000, -443, -368, -520, -59, -8, -351, -65, -572, -152, -1000, -29, -150, -8, -8, -59, -21, -817, -689, -45, -366, -381, -524, -1000, -2, -509, -56, -561, -350, -240, -977, -251, -340, -207, -1000, -302, -1000, -76, -181, -858, -723, -576, -7, -112, -71, -928, -73, -237, -679, -597, -1000, -46, -2, -1000, -12, -640, -992, -314, -94, -514, -305, -73, -678, -784, -892, -252, -152, -104, -55, -1000, -884, -849, -871, -728, -1000, -818, -135, -152, -121, -59, -295, -214, -169, -1000, -572, -15, -136, -116, -575, -1000, -28, -626, -49, -819, -346, -285, -422, -583, -181, -6, -509, -210, -57, -460, -1, -18, -328, -1000, -1000, -353, -16, -6, -619, -640, -1000, -252, -100, -832, -9, -1000, -1000, -141, -5, -484, -139, -500, -11, -1000, -522, -327, -118, -1000, -811, -1, -4, -927, -2, -2, -596, -693, -192, -355, -162, -105, -1000, -548, -468, -191, -322, -235, -1000, -417, -900, -64, -308, -2, -122, -467, -2, -262, -1000, -273, -1000, -4, -629, -54, -543, -61, -286, -98, -264, -302, -1, -289, -326, -214, -50, -19, -67, -1000, -1000, -325, -680, -282, -244, -182, -416, -85, -87, -57, -1000, -371, -534, -1000, -362, -104, -1000, -276, -171, -1000, -343, -67, -321, -841, -787, -1000, -414, -200, -110, -210, -194, -512, -70, -46, -1, -94, -314, -178, -716, -682, -477, -401, -6, -9, -251, -439, -736, -381, -325, -18, -311, -331, -239, -208, -50, -658, -34, -1000, -707, -792, -61, -29, -880, -665, -606, -1000, -412, -935, -384, -291, -26, -138, -49, -28, -324, -211, -3, -492, -612, -551, -276, -1000, -69, -248, -195, -1000, -103, -114, -31, -471, -513, -16, -31, -664, -397, -35, -745, -461, -55, -202, -190, -832, -79, -115, -265, -189, -256, -336, -489, -1000, -693, -1000, -274, -167, -425, -211, -292, -90, -525, -388, -235, -492, -171, -88, -1000, -749, -1000, -200, -390, -1, -230, -608, -120, -221, -539, -551, -1000, -708, -903, -481, -77, -297, -90, -353, -1000, -566, -621, -261, -1, -1000, -566, -69, -908, -16, -131, -57, -473, -656, -327, -4, -178, -7, -176, -294, -1000, -233, -10, -1000, -1000, -287, -19, -120, -1000, -85, -527, -1000, -154, -69, -160, -986, -653, -182, -1000, -379, -262, -367, -525, -759, -430, -596, -457, -650, -1000, -474, -16, -1000, -157, -43, -85, -29, -1, -456, -633, -63, -324, -35, -112, -700, -189, -181, -1000, -215, -8, -271, -221, -198, -541, -1, -459, -30, -432, -1000, -1, -11, -395, -402, -277, -751, -1000, -1000, -377, -306, -713, -217, -716, -837, -12, -91, -1000, -112, -208, -245, -80, -986, -3, -334, -265, -64, -111, -752, -787, -326, -101, -938, -729, -310, -399, -10, -830, -242, -196, -1000, -17, -572, -299, -243, -477, -349, -1000, -181, -176, -631, -58, -773, -892, -340, -141, -1000, -1000, -1000, -64, -83, -22, -154, -66, -276, -330, -508, -1, -200, -819, -720, -363, -8, -54, -1000, -774, -503, -140, -263, -3, -4, -115, -55, -2, -283, -245, -321, -1000, -233, -163, -121, -6, -12, -834, -1000, -647, -68, -255, -419, -329, -618, -1000, -1000, -38, -496, -18, -333, -45, -1, -908, -768, -22, -888, -258, -685, -303, -1000, -256, -611, -94, -46, -97, -12, -602, -179, -37, -706, -455, -409, -140, -296, -15, -9, -1000, -621, -785, -153, -75, -1000, -213, -643, -206, -209, -1000, -721, -260, -1000, -1000, -157, -229, -1000, -970, -104, -1000, -341, -3, -174, -123, -68, -56, -188, -180, -217, -424, -258, -171, -281, -437, -153, -534, -180, -83, -170, -77, -1000, -467, -820, -146, -365, -883, -2, -72, -46, -347, -54, -415, -146, -249, -252, -112, -230, -510, -881, -950, -439, -103, -250, -120, -109, -611, -1000, -229, -10, -6, -1000, -444, -1000, -491, -713, -274, -1000, -1, -277, -23, -202, -18, -482, -637, -614, -385, -254, -279, -11, -1000, -213, -962, -190, -145, -125, -320, -349, -1000, -231, -146, -1000, -359, -289, -31, -881, -257, -1000, -548, -101, -706, -536, -808, -716, -126, -691, -919, -896, -236, -758, -60, -309, -68, -608, -1000, -1, -131, -584, -146, -616, -77, -6, -230, -29, -207, -865, -23, -114, -1000, -422, -524, -756, -1, -764, -520, -360, -2, -590, -749, -41, -35, -142, -508, -674, -924, -354, -269, -282, -285, -42, -109, -237, -103, -3, -292, -170, -374, -34, -38, -1000, -1000, -392, -244, -260, -1000, -73, -296, -14, -445, -519, -628, -46, -1000, -687, -491, -1000, -46, -12, -151, -1000, -308, -221, -523, -2, -237, -169, -1000, -264, -741, -213, -522, -121, -628, -470, -1000, -304, -1000, -130, -1, -272, -1000, -59, -564, -75, -331, -1000, -644, -1000, -93, -711, -136, -380, -334, -79, -336, -106, -331, -368, -700, -797, -361, -54, -190, -744, -349, -213, -187, -297, -183, -312, -73, -194, -30, -669, -317, -131, -199, -231, -1000, -167, -262, -611, -1000, -5, -41, -182, -232, -466, -747, -718, -152, -789, -108, -127, -60, -251, -89, -1000, -143, -940, -406, -281, -173, -1, -1000, -1000, -173, -150, -132, -253, -87, -1000, -199, -25, -839, -261, -769, -274, -1000, -65, -139, -33, -217, -403, -437, -9, -446, -541, -66, -1000, -795, -153, -1000, -1000, -398, -4, -459, -867, -1000, -367, -744, -24, -336, -896, -143, -1000, -237, -75, -188, -249, -903, -291, -221, -80, -816, -1000, -223, -170, -231, -277, -699, -207, -202, -270, -581, -31, -1000, -625, -310, -464, -241, -490, -234, -1000, -273, -579, -202, -824, -36, -34, -360, -110, -18, -364, -679, -221, -210, -133, -59, -62, -242, -859, -371, -19, -1000, -209, -1000, -1000, -103, -220, -1000, -13, -200, -118, -33, -827, -42, -393, -9, -659, -11, -1000, -330, -94, -574, -1000, -415, -1000, -101, -333, -1000, -485, -635, -468, -1000, -155, -161, -117, -256, -71, -51, -577, -511, -8, -162, -82, -328, -1000, -524, -763, -241, -20, -211, -6, -155, -5, -1000, -1, -836, -42, -25, -1000, -155, -473, -610, -356, -28, -735, -1000, -726, -25, -183, -285, -643, -3, -154, -31, -4, -699, -107, -76, -204, -1000, -581, -56, -158, -1000, -454, -10, -41, -263, -660, -125, -24, -6, -1000, -1000, -105, -37, -259, -143, -379, -209, -1000, -36, -986, -1000, -192, -128, -16, -677, -92, -454, -241, -73, -438, -532, -529, -593, -269, -36, -476, -328, -550, -315, -2, -166, -243, -240, -576, -344, -380, -159, -1000, -184, -187, -341, -167, -1000, -106, -463, -179, -6, -222, -303, -2, -146, -141, -62, -299, -7, -657, -623, -78, -289, -472, -17, -310, -81, -1000, -10, -232, -118, -58, -729, -129, -486, -95, -357, -764, -504, -197, -5, -126, -591, -61, -1000, -1000, -554, -894, -148, -280, -102, -2, -1000, -3, -312, -1000, -1, -631, -825, -663, -255, -185, -225, -276, -154, -165, -468, -17, -44, -1000, -578, -485, -610, -2, -455, -805, -32, -751, -65, -182, -615, -2, -133, -201, -1000, -53, -622, -15, -1, -414, -695, -175, -898, -1000, -355, -725, -3, -242, -483, -519, -547, 0, -438, -61, -117, -3, -815, -434, -180, -646, -83, -306, -954, -1000, -464, -324, -6, -313, -3, -626, -190, -571, -88, -684, -122, 0, -77, -990, -369, -734, -631, -116, -1000, -481, -733, -891, 0, -1000, -431, -235, -524, -26, -934, -114, -471, -72, -7, -263, -338, -240, -33, -190, -245, -1000, -822, -4, -501, -1000, -292, -39, -1, -276, -340, -56, -1000, -213, -126, -75, -684, -23, -339, -736, -59, -158, -370, -184, -44, -116, -470, -920, 0, -688, -696, -984, -393, -262, -716, -285, -231, -829, -468, -3, -1000, -1000, -487, -457, -283, -35, -3, -4, -919, -84, -495, -930, -869, -95, -1000, -209, -114, -87, -69, -87, -1000, -734, -22, -1000, -288, -532, -359, 0, -248, -748, -199, -523, -147, -60, -227, -74, -1000, -686, -1000, -666, -496, -655, -506, -836, -629, -338, -58, -729, -129, -324, -567, -417, -625, -675, -112, -5, -101, -850, -685, -5, -26, -709, -1000, -305, -684, -1000, -1000, -10, -239, -248, -2, -863, -50, -237, -395, -330, -567, -53, -269, -100, -1000, -4, -52, -288, -542, -3, -238, -1000, -1000, -332, -798, -192, -301, -801, -71, -150, -240, -350, -188, -218, -69, -224, -179, -321, -805, -53, -15, -193, -4, -46, -37, -608, -894, -131, -1000, -1, -1, -298, -242, -21, -292, -81, -596, -164, -1000, -366, -391, -61, -244, -51, -1000, -279, -346, -264, -565, -467, -314, -57, -161, -68, -104, -421, -507, -1000, -1000, -267, -2, -3, -901, -378, -549, -708, -1000, -239, -250, -567, -441, -492, -735, -580, 0, -918, -249, -222, -69, -1, -304, -599, -1000, -1, -489, -308, -373, -717, -511, -828, -223, -1000, -245, -750, -596, 0, -213, -1000, -174, -182, -17, -232, -98, -6, -116, -680, -5, -3, -2, -1000, -221, -298, -989, -264, -451, -1000, -373, -14, -28, -767, -222, -10, -16, -152, -39, -1000, -452, -5, -176, -9, -133, -249, -429, -18, -113, -1000, -1, -183, -297, -70, -286, -1000, -425, -294, -250, -11, -490, -752, -155, -246, -301, -1000, -406, -853, -96, -2, -4, -263, -32, -139, -212, -458, -602, -1000, -151, -168, -86, -3, -1000, -92, -675, -1, -211, -112, -301, -199, -488, -471, -781, -308, -352, -6, -28, -295, -769, -936, -1000, -13, -151, -500, -199, -269, -1, -5, -302, -347, -325, -1000, -189, -170, -110, -533, -5, -59, -47, -1000, -1000, -611, -8, -253, -4, -1000, -136, -1000, -289, -29, -478, -577, -222, -75, -2, -328, -168, -115, -766, -207, -218, -950, -63, -783, -180, -448, -244, -91, -557, -313, -145, -255, -237, -655, -98, -796, -220, -13, -251, -106, -7, -192, -1000, -415, -1000, -335, -4, -103, -329, -1000, -290, -1000, -184, -181, -54, -146, -650, -52, -1000, -439, -3, -47, -644, -322, -2, -720, -8, -4, -678, -3, -1000, -335, -560, -274, -1000, -381, -499, -1000, -21, -142, -208, 0, -10, -461, -680, -789, -1000, -198, -429, -1000, -78, -365, -8, -659, -565, -694, -849, -2, -29, -706, -172, -155, -190, -319, -378, -303, -361, -215, -101, -485, -594, -631, -245, -1000, -456, -1000, -1, -4, -1000, -2, -1000, -6, -154, -4, -90, -365, -870, -510, -943, -88, -1000, -137, -302, 0, -8, -536, -117, -664, -368, -146, -6, -141, -497, -18, 0, -208, -91, -79, -930, -6, -266, -44, -74, -480, -211, -527, -619, -1, -482, -521, -748, -9, -79, -273, -584, -275, -242, -37, -102, -293, -238, -365, -783, -328, -964, -1000, -907, -189, -637, -446, -300, -1, -1000, -117, -460, -299, -137, 0, -460, -56, -235, -478, -78, -107, -202, -806, -1000, -546, -36, -1000, -1, -1000, -186, -780, -116, -4, -740, -1000, -278, -42, -677, -134, -9, -2, -85, -444, -409, -239, -285, -554, -693, -569, -3, -457, -250, -75, -223, -53, -615, -400, -150, -19, -816, -106, -345, -578, -345, -48, -381, -84, -57, -402, -290, 0, -590, -103, -537, -434, -710, -436, -143, -164, -924, -607, -409, -932, -431, -992, -323, -1000, -617, -535, -289, -862, -700, -1000, -326, -1000, -197, -3, -907, -181, -206, -809, -103, -99, -46, -55, -358, -3, -659, -516, -474, -252, -282, -241, -289, -83, -1000, -434, -308, -253, -102, -1000, -504, -54, -55, -166, -29, -478, -69, -1000, -389, -27, -226, -308, -1000, -350, -758, -18, -766, -94, -569, -283, -1000, -1000, -156, -956, -239, -706, -945, -85, -68, -291, -743, -257, -254, -6, -51, -225, -1000, -483, -1, -72, -374, -121, -181, -4, -264, -594, -824, -110, -5, -272, -8, -17, -744, -201, -1000, -129, -4, -960, -247, -281, -13, -170, -100, -302, -73, -668, -185, -68, -1000, -193, -4, -202, -45, -399, -1000, -1000, -756, -110, -100, -149, -754, -518, -1000, -504, -259, -671, -82, -33, -1000, -1000, -137, -1000, -379, -261, -301, -422, -406, -350, -76, -1000, -816, -286, -593, -887, -16, -1, -815, -75, -1000, -1, -439, -421, -993, -337, -570, -826, -589, -212, -86, -956, -390, -114, -694, -501, -993, -43, -475, -220, -441, -813, -40, -76, -1000, -661, -25, -41, -99, -1000, -198, -1, -51, -161, -121, -602, -1000, -132, -229, -312, -52, -158, -74, -173, -544, -185, -119, -1000, -777, -331, -182, -210, -932, -928, -545, -71, -325, -385, -215, -15, -497, -1000, -15, -66, -1000, -1000, -5, -1000, -827, -209, -802, -141, -254, -1000, -278, -80, -141, -100, -9, -1000, -149, -419, -729, -107, -1000, -125, -462, -86, -404, -941, -380, -438, -662, -3, -328, -391, -567, -1000, -588, -395, -339, -11, -7, -142, -57, -1000, -41, -139, -1, -220, -498, -836, -138, -1000, -1000, -341, -1000, -427, -736, 0, -73, -1000, -888, -154, -178, -26, -298, -305, -127, -48, -388, -799, -32, -969, -474, -509, -148, -197, -1000, -68, -247, -105, -466, -183, -23, -928, -59, -136, -369, -7, -119, -1000, -1000, -1000, -233, -159, -228, -553, -43, -1000, -999, -874, -358, -499, -377, -7, -338, -743, -685, -1, -44, -475, -61, -75, -277, -462, -300, -491, -1000, -699, -478, -128, -157, -319, -1000, -154, -561, -3, -624, -8, -371, -1000, -1000, -37, -76, -300, -610, -556, -538, -37, -1000, -550, -16, -342, -5, -142, -2, -564, -511, -680, -1000, -234, -4, -764, -316, -1000, -85, -165, -110, -159, -507, -87, -357, -513, -131, -672, -304, -29, -712, -642, -1000, -280, -375, -590, -70, -36, -1, -481, -414, -1000, -19, -1, -980, -154, -559, -628, -639, -167, -370, -173, -519, -774, -1000, -769, -79, -30, -469, -207, -59, -190, -1000, -1000, -35, -152, -90, -129, -679, -823, -668, -304, -13, -380, -12, -846, -151, -98, -271, -301, -489, -201, -974, -203, -254, -342, -727, -53, -547, -271, -2, -241, -232, -79, -961, -340, -213, -261, -126, -282, -263, -294, -266, -471, -803, -1000, -318, -976, -280, -790, -13, -920, -1000, -149, -738, -859, -97, -99, -197, -582, -577, -387, -134, -438, -1, -67, -88, -1000, -725, -483, -4, -547, -142, -36, -1000, -772, -1000, -141, -249, -217, -122, -1000, -37, -42, -754, -803, -4, -34, -1000, -35, -488, -630, -159, -169, -346, -1000, -234, -1000, -285, -639, -223, -1, -838, -91, -930, -1000, -656, -42, -757, -129, -355, -1000, -794, -782, -1, -453, -1000, -109, -124, -1, -446, -1, -1000, -815, -76, -729, -641, -1000, -891, -16, -1000, -599, -1000, -608, -1000, -160, -492, -91, -77, -413, -50, -324, -2, -10, -1000, -1000, -5, -1000, -389, 0, -79, -462, -112, -1000, -59, -191, -207, -125, -524, -2, -32, -385, -907, -427, -56, -1000, -749, -1000, -391, -795, -88, -68, -87, -235, -38, -1000, -4, -785, -6, -773, -147, -262, -73, -3, -51, -644, -69, -145, -375, -8, -91, -282, -475, -4, -328, -108, -161, -962, -142, -573, -2, -156, -22, -7, -174, -166, -106, -68, -874, -764, -308, -1000, -1000, -735, -739, -99, -144, -132, -254, -1000, -736, -259, -53, -347, -249, -817, 0, -83, -569, -899, -101, -504, -807, -126, -238, -512, -522, -18, -57, -320, -978, -9, -556, -237, -657, -398, -145, -226, -144, -761, -1000, -414, -111, -332, -84, -1000, -133, -185, -1000, -353, -303, -234, -423, -166, -1000, -141, -409, -1000, -420, -94, -96, -763, -803, -8, -530, -206, -65, -1000, -383, -173, -1000, -87, -534, -9, -25, -120, -295, -578, -637, -486, -559, -49, -111, -851, -73, -100, -775, -436, -1000, -765, -34, -62, -689, -159, -165, -56, -69, -2, -194, 0, -975, -240, -4, -57, -355, -37, -770, -66, -516, -143, -895, -198, -1000, -442, -105, -297, -207, -1000, -41, -6, -1000, -1000, -265, -240, -177, 0, -19, -537, -1000, -1000, -571, -158, 0, -314, -380, -245, -326, -345, -145, -51, -273, -833, -101, -292, -100, -760, -266, -1000, -149, -342, -1, -343, -346, -1000, -1000, -673, -101, -347, -173, -149, -4, -680, -1000, -781, -839, -124, -504, -1000, -1000, -274, -547, -34, -184, -288, -48, -541, -1000, -830, -1000, -581, -1000, -1000, -1, -164, -44, -9, -347, -26, -161, -1000, -543, -1000, -338, -161, -139, -230, -433, -1000, -363, -132, -240, -1000, -26, -106, -470, -908, -347, -1000, -36, -758, -1000, -433, -83, -182, -903, -220, -339, -584, -1000, -891, -578, -3, -36, -438, -194, -1000, -723, -941, -422, -9, -443, -78, -1000, -176, -91, -74, -4, -846, -607, -82, -477, -185, -1, -771, -251, -764, -743, -561, -811, -194, -585, -6, -396, -971, -1000, -85, -716, -985, -325, -13, -286, -733, -13, -883, -355, -292, -699, -459, -18, -245, -422, -675, -196, -69, -631, -119, -582, -1000, -1000, -417, -405, -59, -426, -119, -1000, -581, -43, -270, -470, -122, -68, -97, -532, -254, -175, -1000, -599, -12, -31, -593, -17, -1, -83, -30, -113, -90, -154, -133, -102, -2, -510, -784, -345, -1000, -287, -645, -3, -281, -1000, -361, -722, -118, -85, -66, -1000, -725, -885, -396, -755, -28, -9, -411, -78, -55, -33, -357, -137, -506, -1000, -180, -96, -242, -4, -435, -247, -117, -404, -515, -10, -547, -213, -403, -52, -4, -326, -82, -168, -143, -421, -170, -1000, -339, -1000, -105, -230, -202, -429, -702, -406, -1000, -1000, -835, -78, -1000, -600, -1000, -777, -6, -136, -153, -27, -415, -1000, -325, -1000, -366, -1000, -515, -261, -725, -145, -75, -281, -937, 0, -237, -627, -224, -951, -429, -3, -720, -1000, -379, -1000, -1000, -88, 0, -40, -601, -104, -404, -8, -219, -1000, -2, -1000, -129, -386, 0, 0, -1000, -309, -1000, -233, -77, -567, -333, -760, -656, -1000, -179, 0, -690, -127, -444, -551, -1000, -147, -617, -288, -177, 0, -543, -1, -420, -271, -661, -226, -4, -13, -184, -207, -677, -45, -138, 0, -1, -538, -1000, -26, 0, -181, -333, -414, -446, -1000, -473, -753, 0, -1, -62, -116, -380, -643, -110, -770, -71, -217, -1000, 0, -4, 0, -410, 0, 0, -10, -1000, 0, -22, -48, -37, -291, -138, -337, -56, -752, -1000, -807, -215, -37, -1, -136, 0, -70, -408, -3, -309, -318, -739, -306, -605, -1, -516, -403, -877, -195, -481, -272, -39, -153, -787, -75, -51, -589, -208, -1000, -1000, 0, 0, -556, 0, -208, 0, -2, -849, -701, -714, 0, -580, -103, -283, 0, -1000, -20, -65, -5, -89, -303, -401, -213, -337, -262, -81, -1000, -580, -202, -639, -673, -519, -195, -344, 0, -562, -602, -81, -921, 0, -70, -728, -449, -104, -1000, -978, 0, -659, -3, 0, 0, -661, -183, -83, -200, -1000, 0, -802, -1000, -36, 0, -495, 0, -594, -582, -575, -621, -594, -154, -4, -2, -948, -72, -276, -660, -600, -641, -707, -21, -143, -312, -72, -94, -173, -317, 0, 0, -23, -104, -344, 0, -369, -115, -309, -791, -3, -181, -1, -1, -175, -1, -1000, -233, -990, -1000, -140, -1000, -365, -1000, 0, -918, -763, 0, -660, -1000, -357, -292, -1, -806, -796, -1000, -21, 0, -379, 0, -5, -328, -394, -337, -71, -189, -315, -537, -1000, 0, -658, -626, 0, -369, -8, -144, -1000, -587, 0, -974, 0, -241, -733, -428, -224, 0, -1000, -178, -294, -119, -418, -1000, -1000, -1000, -592, 0, -668, -153, -37, -207, -69, -1000, -480, 0, -1000, -1000, -519, -1000, -95, -1000, 0, -836, -174, -1000, -5, -593, -161, 0, -629, -114, -42, -267, -111, -32, 0, -253, -797, -461, -50, -195, 0, -182, -9, 0, -65, -109, 0, -612, -165, -48, -30, -787, -246, -188, -1000, -83, -232, -1000, -738, -262, -157, -210, -312, -415, -643, 0, -211, -110, -110, -188, -1000, 0, -590, 0, -803, 0, -166, -78, -337, -88, -94, -606, -618, -185, 0, 0, -274, -710, -132, 0, -325, 0, -704, 0, -335, -317, -866, 0, -386, -10, -54, -1, -1000, -337, -129, -205, -474, -123, 0, 0, -147, -189, 0, -1000, -510, -675, -1000, -460, -371, -1000, 0, -143, -63, 0, -375, 0, -74, -169, 0, 0, -261, -466, -158, -1000, -482, -276, -7, -466, -219, -271, -5, -1000, -31, -946, -56, -79, -376, -73, -88, -628, -1000, -820, -937, -1, -14, -1000, -165, 0, -168, -790, -1000, -351, -140, -13, 0, 0, -230, -125, -369, 0, -11, -309, -413, -194, -346, -136, -80, -29, -82, 0, -20, 0, -65, -40, 0, 0, -1000, -663, -716, -9, -57, -1000, -855, -22, -182, -1000, -46, -542, -182, 0, -534, -1000, 0, -531, -612, -243, -221, -93, -140, -183, -362, -1000, -765, -309, -75, -350, -1000, -4, -215, -163, -117, 0, 0, -583, -324, -556, -560, -320, -174, 0, -26, -97, -347, -1000, -1000, -1000, -125, 0, -140, -558, -1, -172, -520, -1000, -382, 0, -396, -602, -1000, -1, -1000, -3, -178, 0, -331, -1000, -20, -1000, -40, -59, -71, -1, -377, -1000, -32, 0, -101, -136, -22, 0, -480, 0, 0, -644, -64, -445, -1000, -6, -40, -362, -1, -393, 0, 0, -731, -109, -747, -441, -651, -70, -387, -271, -290, -24, -601, -966, -108, -1000, -407, -371, -142, -530, -14, -318, -1000, -441, -685, -121, -407, -371, -1000, -88, -243, -844, -657, -1000, -1000, 0, -198, -72, -32, 0, -236, -212, -141, -615, -43, -8, -756, -238, -465, -1000, -528, 0, -551, -588, -146, 0, -165, -1000, -373, -127, -199, -288, -306, -660, -297, -18, -308, 0, -1000, -234, -62, 0, 0, -395, -133, -552, -1000, -403, -289, 0, -302, -218, -964, -273, -8, -152, 0, 0, -49, -1000, -398, -605, -4, -183, -157, -434, -566, -335, 0, -513, -105, 0, -25, -422, -149, 0, -467, -195, -716, -85, -226, -348, -372, -562, -934, 0, -103, -618, -719, 0, -206, -371, 0, -50, -501, -278, -211, -115, -998, -822, -258, -1000, -427, 0, -95, -1000, -623, -857, -294, -106, -4, -596, -250, -150, -1000, -1000, -397, -473, -66, -320, -243, 0, -230, -1000, -56, -14, -1000, 0, 0, -226, -53, 0, -36, -14, -26, -423, -5, 0, -1000, -723, 0, -122, -160, -522, -1000, -332, -6, -85, -1000, -463, -63, 0, -898, -77, -1000, 0, -42, -955, -257, -5, -197, -161, -290, -1000, -185, -311, 0, 0, -341, -900, -706, -133, -602, -383, -33, -188, -490, -218, -1000, -91, -49, -1000, -763, -475, 0, -143, -316, -427, -296, 0, -678, -169, 0, 0, -147, 0, -590, -848, -1000, 0, -143, -1000, -596, -328, -538, 0, -398, -565, -359, -116, -1000, -1000, -1000, -354, 0, -596, -54, -165, -44, -1000, 0, 0, -3, -2, 0, 0, -776, -546, -1000, -1, -1000, -375, -178, -825, -855, 0, -180, 0, -111, -28, -50, 0, -860, -103, -252, -137, -2, -5, -650, -663, -5, -7, 0, 0, -454, -929, -440, -600, -77, -2, -245, -956, 0, -510, -226, -521, 0, -754, -29, -1000, 0, -233, -168, 0, -158, -103, 0, 0, 0, -411, 0, -1000, -546, -27, 0, -204, -289, -293, -467, 0, -1000, -155, -332, -9, -826, -386, -147, -543, 0, -85, -138, -2, -55, 0, -63, -88, -350, -1000, -93, -61, 0, -13, -101, -466, 0, -13, 0, -261, -360, -251, 0, 0, -467, -1000, -101, -895, -478, -402, -299, -11, -433, -484, -235, -649, -1, -300, -1000, 0, -110, -1, -274, -499, -897, -394, -385, -240, 0, -2, 0, -1, 0, -1000, 0, -35, -199, -962, -1000, -1000, -408, -883, -67, 0, -1000, -127, -181, -934, 0, -138, -1000, -75, 0, -73, -1000, -154, 0, 0, -816, 0, -498, -908, -171, -9, 0, -1000, -1000, -1000, -1000, 0, -4, -644, 0, -66, -1000, -598, -16, -214, -195, -120, -80, -463, 0, -414, -109, -153, 0, -1000, 0, -1000, -385, 0, 0, -21, 0, 0, -837, -376, -217, 0, 0, -457, 0, 0, 0, 0, -488, 0, 0, -10, 0, 0, 0, -274, -179, 0, 0, -178, -155, 0, 0, -931, -44, 0, -6, -596, 0, 0, -110, -238, -14, 0, 0, 0, 0, 0, -1000, -7, -206, 0, 0, -14, 0, 0, 0, -149, -267, 0, 0, 0, -221, 0, 0, -2, -551, 0, -548, -102, 0, 0, 0, -327, -388, 0, 0, 0, -255, 0, 0, -541, -182, 0, 0, 0, 0, 0, -153, -183, -935, 0, -496, -780, -896, 0, 0, -327, -722, 0, -146, -478, 0, -214, -379, -246, 0, 0, 0, -1000, -563, -257, -1, -235, -25, -63, 0, -379, -1000, 0, 0, 0, 0, -1000, -61, -1, 0, -307, -499, -644, 0, -421, -1, -75, -220, -33, -64, -161, 0, -610, 0, 0, 0, -567, -312, 0, 0, -10, -677, -622, 0, -153, 0, -10, 0, -200, -571, -654, 0, -586, -2, -111, 0, -83, 0, 0, 0, 0, -350, -1, 0, -1, 0, -19, 0, -1000, -330, -532, 0, -1000, 0, 0, 0, -1000, 0, 0, 0, -962, 0, 0, -784, -514, -22, 0, -729, -36, -1000, 0, -59, -677, 0, 0, -184, -290, 0, 0, -18, 0, -205, -58, -40, -103, 0, 0, 0, -620, 0, 0, -1000, -92, -295, 0, -891, 0, 0, 0, -189, -263, -43, 0, 0, -155, 0, 0, -359, 0, -568, 0, -1000, -659, -62, -606, -52, 0, 0, 0, -1000, -698, 0, 0, 0, 0, -770, -547, -42, -1000, -1000, 0, -419, 0, -943, 0, -1000, 0, 0, -994, -61, 0, 0, -315, 0, -26, 0, 0, 0, 0, 0, -280, -1000, -314, 0, -411, -490, -390, 0, -251, 0, 0, -63, -3, 0, 0, 0, 0, -5, 0, 0, -2, -7, 0, 0, -57, -3, 0, 0, -171, 0, 0, -106, 0, -3, 0, -266, -316, -1000, 0, -225, -8, -161, 0, 0, -1000, -693, 0, -25, 0, -530, 0, 0, -210, 0, 0, 0, 0, -334, 0, 0, -506, -161, 0, 0, 0, -360, 0, -735, 0, 0, 0, 0, -260, -247, -1000, 0, -52, -15, 0, 0, 0, -254, -397, -549, -420, -315, 0, -8, -1000, 0, -223, 0, -231, -1000, 0, 0, -387, -1000, 0, -1000, 0, 0, -479, 0, -185, 0, -1000, 0, -780, 0, 0, 0, -1000, 0, 0, 0, -713, 0, -453, 0, 0, 0, 0, -472, -277, 0, -1000, 0, -460, 0, 0, -108, -47, 0, -1000, 0, -998, 0, 0, -1000, -108, 0, -714, 0, 0, -1000, 0, -675, 0, -1000, 0, 0, 0, -58, -1000, -219, 0, -138, 0, 0, 0, 0, 0, -928, 0, -173, -246, -912, 0, -494, -262, -1000, 0, -976, -253, 0, 0, -195, 0, 0, 0, 0, -440, -768, 0, -1000, 0, -626, 0, -365, 0, -11, 0, -680, -1000, -502, 0, -475, -194, -1000, 0, 0, 0, 0, 0, -491, 0, -75, 0, -1000, 0, -947, 0, -669, 0, 0, 0, 0, 0, -847, -72, -150, -43, 0, -218, 0, -43, 0, -80, -43, -4, 0, -404, -138, 0, 0, 0, 0, 0, 0, -10, 0, -141, 0, -210, 0, -1, 0, -256, -302, -6, 0, 0, -2, -274, 0, -330, -152, 0, 0, -565, 0, 0, -313, -750, 0, -415, -440, -378, -1000, -147, 0, 0, -504, 0, 0, 0, 0, -1, 0, 0, -433, -106, 0, -8, -400, 0, 0, -2, 0, 0, 0, 0, -935, -149, 0, 0, 0, 0, 0, -266, 0, 0, 0, -182, 0, 0, 0, -1000, -1000, 0, -311, 0, 0, 0, 0, -5, -237, 0, -266, -864, -351, 0, -649, -362, -85, 0, -280, 0, 0, -2, -69, -82, -165, 0, -640, -107, -59, -315, -270, -143, -612, 0, 0, -243, 0, 0, -68, 0, -1000, -606, -560, -593, 0, 0, -39, -220, 0, 0, 0, 0, 0, -115, -318, -148, 0, 0, -31, -164, 0, 0, -72, -976, 0, -1000, 0, 0, 0, 0, -641, 0, 0, 0, -234, 0, 0, -1000, -75, -27, 0, 0, 0, -17, 0, -6, -221, -189, 0, -221, -394, 0, 0, 0, -618, -19, 0, 0, 0, -692, 0, 0, -1000, -157, 0, -155, -102, 0, 0, -214, -60, -743, 0, 0, -151, 0, -1000, 0, -1000, 0, 0, -404, -1000, 0, -278, -3, -233, 0, 0, -578, 0, 0, -246, 0, -22, 0, -591, -1000, -56, 0, -9, 0, -44, 0, 0, 0, -3, 0, -40, 0, 0, 0, -42, 0, -356, 0, 0, 0, 0, -155, -192, 0, 0, -3, -478, 0, 0, -68, -578, 0, 0, 0, 0, -6, 0, -1000, -218, 0, 0, -1, -962, 0, 0, -699, -498, 0, -65, -332, -22, -23, 0, -536, 0, 0, 0, -36, -6, -273, 0, 0, 0, -203, 0, -424, 0, -108, -313, -338, -158, -520, 0, 0, 0, -727, 0, 0, 0, 0, 0, -926, 0, -20, 0, -130, -257, -603, 0, -192, -230, -377, 0, -1, 0, 0, 0, -220, 0, -688, 0, -937, 0, -1, -719, -174, -729, -231, 0, 0, -285, 0, 0, 0, -4, -211, 0, -480, -1000, 0, -11, 0, -270, 0, -218, -9, -228, 0, 0, -1000, -292, 0, -469, 0]}
rewards = {10: [-87, -5, -32, -33, -21, -10, -5, -14, -137, -19, -102, -53, -10, -24, -6, -39, -9, -4, -3, -65, -18, -15, -11, -74, -5, -5, -14, -39, -62, -113, -4, -6, -32, -36, -274, -12, -10, -5, -10, -23, -22, -44, -112, -38, -52, -4, -24, -75, -4, -6, -33, -6, -95, -5, -5, -3, -132, -16, -51, -14, -7, -15, -29, -215, -4, -105, -43, -69, -5, -6, -39, -105, -12, -81, -50, -4, -43, -9, -28, -151, -19, -59, -50, -18, -50, -67, -77, -6, -10, -27, -51, -159, -60, -8, -3, -4, -53, -4, -101, -41, -62, -67, -44, -3, -4, -15, -176, -38, -18, -18, -45, -18, -9, -44, -48, -38, -12, -143, -247, -63, -124, -67, -56, -32, -31, -6, -63, -29, -78, -5, -39, -21, -4, -9, -15, -31, -5, -6, -4, -6, -13, -248, -2, -89, -4, -47, -51, -4, -27, -57, -16, -11, -5, -34, -145, -11, -39, -21, -164, -182, -25, -13, -4, -26, -102, -66, -20, -181, -138, -57, -69, -124, -23, -12, -148, -7, -57, -6, -26, -12, -47, -17, -151, -57, -235, -184, -74, -73, -6, -9, -142, -5, -76, -7, -79, -28, -58, -8, -58, -130, -111, -149, -4, -67, -3, -140, -76, -15, -163, -8, -31, -42, -18, -15, -43, -34, -71, -5, -89, -34, -66, -60, -58, -4, -33, -115, -99, -4, -258, -12, -11, -3, -3, -57, -3, -84, -33, -9, -4, -4, -67, -18, -31, -37, -5, -119, -39, -3, -38, -5, -84, -19, -66, -24, -12, -128, -15, -57, -55, -42, -6, -4, -28, -126, -126, -76, -25, -10, -96, -112, -5, -64, -32, -28, -12, -2, -126, -28, -10, -3, -8, -59, -77, -75, -6, -5, -105, -10, -3, -8, -5, -17, -25, -39, -3, -3, -82, -135, -36, -76, -5, -29, -111, -3, -27, -6, -55, -98, -10, -12, -101, -46, -5, -3, -114, -4, -62, -15, -38, -124, -10, -77, -128, -6, -85, -155, -51, -102, -8, -228, -13, -32, -3, -80, -129, -9, -4, -9, -92, -60, -122, -12, -5, -34, -6, -27, -35, -70, -4, -16, -18, -7, -11, -128, -4, -46, -21, -21, -7, -7, -4, -108, -27, -66, -178, -16, -164, -27, -4, -39, -5, -3, -51, -2, -79, -88, -3, -76, -32, -7, -60, -5, -3, -94, -24, -6, -60, -18, -6, -29, -39, -16, -15, -143, -10, -69, -86, -49, -8, -30, -34, -10, -5, -21, -18, -14, -51, -61, -8, -88, -9, -123, -2, -6, -44, -36, -25, -5, -12, -30, -5, -86, -4, -16, -14, -91, -3, -83, -6, -17, -15, -39, -196, -76, -93, -5, -70, -4, -85, -98, -4, -17, -33, -2, -11, -32, -8, -44, -4, -75, -3, -187, -4, -175, -22, -58, -4, -9, -3, -70, -66, -12, -5, -15, -60, -20, -15, -7, -30, -21, -4, -72, -6, -4, -18, -64, -3, -23, -78, -32, -80, -84, -41, -23, -33, -2, -5, -38, -19, -18, -263, -4, -34, -9, -13, -265, -10, -28, -123, -15, -54, -131, -4, -5, -186, -6, -128, -4, -70, -112, -84, -55, -49, -3, -9, -96, -77, -36, -46, -17, -9, -92, -4, -73, -3, -4, -59, -24, -249, -3, -88, -31, -5, -50, -20, -30, -91, -14, -15, -89, -11, -98, -159, -128, -2, -43, -158, -2, -77, -25, -3, -5, -7, -120, -4, -15, -3, -59, -61, -60, -19, -5, -2, -40, -4, -18, -88, -40, -38, -89, -4, -102, -107, -105, -29, -24, -30, -3, -121, -3, -59, -98, -68, -107, -34, -16, -7, -61, -96, -80, -87, -6, -24, -4, -11, -8, -2, -7, -15, -9, -58, -8, -74, -37, -39, -41, -59, -34, -9, -7, -55, -115, -24, -17, -17, -47, -19, -4, -32, -5, -13, -32, -6, -98, -4, -8, -40, -19, -64, -5, -47, -16, -41, -14, -62, -24, -76, -113, -23, -3, -36, -5, -125, -7, -10, -76, -118, -7, -14, -143, -152, -6, -9, -76, -35, -26, -58, -193, -82, -36, -35, -39, -3, -10, -17, -46, -34, -16, -33, -3, -3, -125, -5, -22, -41, -28, -10, -10, -31, -41, -119, -110, -82, -110, -61, -13, -144, -18, -47, -21, -12, -86, -59, -13, -36, -103, -26, -42, -17, -32, -53, -69, -53, -46, -32, -80, -27, -11, -61, -7, -35, -13, -4, -111, -39, -42, -3, -17, -40, -71, -45, -5, -146, -34, -10, -108, -50, -4, -43, -10, -132, -7, -47, -32, -10, -56, -6, -51, -7, -11, -28, -5, -41, -147, -36, -5, -14, -14, -8, -10, -4, -14, -6, -24, -60, -85, -84, -98, -104, -115, -9, -193, -42, -114, -14, -36, -55, -16, -3, -20, -95, -20, -63, -5, -3, -37, -20, -27, -24, -8, -23, -53, -56, -6, -82, -173, -42, -4, -7, -112, -65, -45, -51, -30, -17, -167, -15, -46, -219, -19, -64, -23, -24, -4, -134, -78, -79, -56, -97, -4, -28, -17, -90, -9, -24, -4, -124, -29, -122, -4, -3, -49, -68, -3, -48, -252, -78, -104, -61, -7, -111, -25, -7, -27, -91, -9, -6, -116, -12, -46, -13, -39, -20, -54, -22, -52, -13, -27, -5, -33, -4, -19, -22, -146, -57, -4, -35, -108, -53, -34, -3, -78, -43, -80, -204, -11, -3, -172, -15, -14, -375, -139, -50, -90, -31, -120, -27, -143, -60, -67, -11, -127, -14, -14, -7, -15, -7, -62, -29, -65, -44, -63, -88, -23, -133, -20, -22, -22, -20, -4, -21, -20, -83, -7, -3, -176, -90, -185, -50, -4, -3, -289, -31, -31, -156, -13, -166, -34, -133, -20, -4, -4, -7, -43, -83, -60, -43, -3, -25, -41, -5, -68, -8, -19, -67, -93, -6, -3, -50, -121, -82, -26, -99, -55, -22, -30, -181, -14, -198, -75, -4, -8, -4, -17, -102, -5, -51, -158, -13, -75, -62, -35, -160, -55, -34, -13, -11, -120, -9, -4, -98, -3, -17, -3, -45, -12, -13, -3, -94, -6, -93, -76, -22, -11, -10, -3, -112, -8, -113, -110, -44, -6, -5, -46, -67, -58, -13, -185, -3, -47, -68, -35, -8, -33, -193, -67, -5, -63, -196, -9, -166, -116, -48, -66, -61, -128, -15, -76, -22, -6, -66, -42, -6, -4, -23, -46, -5, -81, -75, -26, -10, -40, -15, -62, -38, -23, -43, -49, -47, -23, -60, -43, -89, -4, -57, -16, -68, -6, -236, -18, -3, -80, -27, -276, -3, -2, -45, -21, -126, -185, -12, -28, -110, -8, -30, -34, -4, -18, -60, -8, -21, -10, -29, -18, -97, -11, -70, -16, -85, -2, -5, -84, -21, -75, -8, -110, -99, -2, -128, -2, -20, -5, -3, -61, -11, -74, -29, -9, -3, -20, -9, -3, -9, -38, -30, -240, -4, -5, -6, -13, -38, -34, -26, -39, -19, -95, -172, -80, -2, -70, -126, -34, -58, -7, -4, -6, -3, -40, -3, -68, -157, -61, -9, -6, -102, -71, -29, -39, -9, -16, -20, -68, -2, -18, -22, -72, -100, -37, -2, -32, -53, -38, -4, -82, -6, -19, -6, -42, -2, -64, -8, -1, -2, -4, -4, -5, -220, -3, -54, -6, -31, -10, -22, -56, -4, -11, -5, -43, -67, -14, -24, -6, -17, -10, -6, -113, -64, -39, -14, -154, -70, -7, -194, -65, -71, -43, -17, -4, -8, -52, -41, -3, -40, -47, -6, -105, -49, -77, -3, -12, -97, -23, -83, -23, -67, -6, -160, -21, -26, -65, -22, -4, -46, -11, -36, -159, -52, -62, -13, -71, -119, -10, -138, -127, -65, -7, -7, -19, -6, -32, -38, -18, -165, -128, -4, -72, -78, -27, -2, -85, -82, -3, -3, -3, -53, -99, -6, -7, -80, -11, -114, -50, -53, -16, -38, -4, -4, -109, -3, -30, -3, -34, -8, -2, -40, -15, -2, -80, -60, -2, -17, -1, -62, -55, -88, -5, -31, -3, -3, -30, -21, -65, -28, -129, -155, -38, -14, -148, -7, -3, -63, -13, -23, -25, -73, -19, -99, -32, -27, -3, -27, -17, -5, -4, -22, -2, -13, -63, -57, -24, -7, -3, -17, -35, -167, -12, -15, -10, -39, -42, -97, -164, -220, -2, -60, -176, -91, -17, -39, -57, -168, -5, -67, -65, -6, -4, -61, -3, -15, -116, -100, -5, -108, -39, -59, -38, -115, -11, -5, -84, -35, -160, -53, -3, -4, -119, -29, -4, -42, -4, -2, -3, -4, -147, -39, -4, -5, -100, -10, -12, -55, -8, -26, -43, -7, -102, -97, -30, -71, -7, -99, -124, -8, -91, -28, -5, -90, -52, -24, -8, -5, -129, -21, -100, -4, -3, -56, -9, -92, -73, -205, -257, -36, -298, -25, -102, -80, -14, -3, -122, -39, -22, -22, -59, -90, -4, -4, -4, -170, -16, -64, -19, -3, -20, -20, -26, -26, -17, -87, -8, -8, -87, -48, -81, -50, -4, -79, -36, -318, -19, -3, -15, -7, -67, -67, -3, -6, -19, -60, -3, -41, -3, -128, -82, -17, -8, -53, -83, -12, -4, -40, -3, -3, -36, -8, -3, -44, -16, -146, -31, -7, -127, -16, -7, -4, -37, -29, -138, -15, -3, -39, -10, -37, -2, -53, -28, -11, -5, -8, -10, -96, -20, -13, -28, -51, -37, -37, -9, -36, -20, -4, -14, -6, -23, -57, -31, -58, -8, -105, -19, -18, -76, -37, -159, -34, -2, -12, -3, -42, -9, -38, -243, -126, -38, -96, -154, -14, -68, -3, -22, -41, -60, -23, -8, -28, -21, -50, -380, -106, -10, -2, -86, -31, -2, -42, -19, -29, -4, -92, -9, -11, -37, -7, -5, -14, -26, -66, -2, -49, -103, -23, -21, -56, -197, -102, -71, -212, -31, -276, -24, -186, -29, -130, -30, -113, -14, -4, -34, -53, -9, -18, -115, -6, -25, -10, -55, -10, -3, -38, -43, -15, -4, -22, -12, -32, -8, -43, -8, -24, -13, -24, -3, -31, -10, -59, -3, -6, -5, -51, -34, -90, -11, -39, -10, -122, -91, -7, -32, -2, -64, -101, -2, -55, -56, -14, -161, -16, -70, -66, -21, -56, -3, -46, -14, -13, -81, -39, -118, -17, -20, -23, -4, -133, -75, -26, -16, -38, -20, -195, -296, -61, -45, -8, -47, -32, -19, -98, -34, -261, -4, -28, -28, -40, -98, -98, -113, -167, -74, -3, -22, -90, -8, -32, -3, -25, -109, -91, -7, -89, -59, -23, -117, -108, -3, -4, -82, -63, -53, -8, -8, -9, -10, -30, -72, -3, -46, -12, -3, -35, -13, -31, -4, -7, -8, -4, -42, -49, -26, -95, -1, -3, -29, -58, -20, -46, -56, -8, -50, -11, -2, -188, -10, -48, -46, -33, -26, -26, -45, -141, -17, -148, -16, -72, -7, -26, -15, -5, -68, -78, -4, -31, -11, -53, -139, -6, -73, -6, -245, -31, -25, -17, -52, -69, -3, -108, -64, -7, -110, -10, -16, -25, -16, -62, -117, -155, -101, -32, -36, -6, -15, -71, -7, -3, -120, -95, -15, -3, -35, -32, -3, -12, -6, -28, -43, -3, -6, -6, -37, -62, -6, -48, -64, -4, -79, -23, -6, -3, -3, -223, -50, -96, -53, -9, -157, -68, -49, -50, -10, -41, -198, -14, -8, -12, -12, -34, -4, -41, -59, -69, -5, -41, -59, -87, -56, -61, -9, -61, -132, -31, -3, -70, -64, -2, -77, -3, -5, -56, -10, -63, -120, -81, -152, -46, -31, -32, -5, -52, -20, -19, -65, -122, -10, -13, -57, -17, -6, -58, -48, -5, -30, -42, -4, -45, -92, -44, -48, -12, -17, -21, -22, -3, -73, -3, -20, -17, -15, -30, -10, -106, -26, -149, -91, -5, -2, -98, -25, -20, -101, -18, -53, -141, -39, -4, -19, -77, -10, -49, -7, -4, -56, -27, -11, -85, -60, -27, -51, -3, -38, -5, -5, -3, -128, -2, -16, -4, -64, -51, -123, -38, -61, -139, -85, -40, -86, -3, -15, -170, -4, -3, -37, -54, -44, -26, -37, -3, -7, -96, -297, -169, -211, -2, -52, -45, -3, -35, -126, -25, -6, -7, -5, -175, -36, -64, -14, -51, -62, -134, -5, -94, -12, -65, -69, -106, -47, -59, -11, -41, -65, -14, -22, -90, -15, -14, -1, -54, -18, -110, -273, -2, -3, -36, -143, -80, -86, -218, -50, -242, -5, -51, -72, -24, -112, -4, -51, -9, -114, -89, -28, -15, -120, -19, -95, -69, -62, -6, -8, -7, -57, -17, -79, -5, -14, -4, -9, -19, -36, -113, -2, -50, -147, -2, -111, -31, -45, -103, -51, -20, -36, -51, -12, -65, -74, -98, -31, -26, 0, -1, -1, -7, -76, -45, -1, -82, -34, -40, -11, -135, -22, -29, -243, -79, -28, -51, -175, -30, -8, -52, -83, -95, -11, -52, -83, -20, -57, -97, -33, -36, -4, -78, -27, -15, -11, -5, -4, -50, -60, -3, -46, -4, -69, -60, -28, -74, -5, -2, -30, -168, -118, -74, -43, -39, -37, -47, -129, -27, -97, -29, -75, -20, -97, -41, -39, -64, -58, -8, -11, -33, -227, -5, -97, -112, -37, -20, -47, -114, -35, -22, -19, -8, -52, -3, -43, -128, -74, -38, -29, -109, -75, -49, -17, -229, -16, -26, -5, -71, -88, -62, -101, -27, -25, -4, -49, -63, -47, -82, -96, -49, -29, -4, -292, -40, -53, -4, -70, -9, -3, -105, -62, -21, -25, -52, -102, -27, -48, -8, -6, -20, -24, -37, -41, -52, -73, -6, -51, -47, -58, -26, -42, -61, -19, -68, -163, -189, -28, -25, -416, -183, -23, -100, -1, -15, -81, -55, -73, -178, -77, -27, -1, -61, -3, -21, -39, -32, -126, -145, -91, -66, -11, -124, -34, -3, -44, -7, -68, -79, -76, -46, -10, -115, -110, -76, -54, -126, -14, -55, -4, -21, -11, -16, -3, -95, -62, -37, -58, -143, -20, -38, -244, -52, -9, -36, -146, -87, -264, -16, -13, -189, -64, -95, -12, -4, -49, -73, -62, -7, -90, -24, -11, -82, -24, -37, -11, -53, -60, -49, -22, -18, -8, -96, -3, -90, -24, -99, -43, -62, -39, -8, -30, -94, -148, -115, -75, -54, -68, -66, -2, -97, -64, -31, -7, -18, -26, -13, -186, -90, -89, -21, -42, -8, -30, -4, -104, -85, -6, -15, -2, -11, -144, -49, -34, -129, -36, -29, -107, -68, -32, -9, -8, -21, -175, -3, -35, -49, -7, -94, -32, -14, -81, -15, -33, -77, -3, -107, -15, -17, -3, -33, -7, -22, -43, -95, -38, -63, -29, -70, -77, -5, -101, -86, -102, -10, -109, -100, -80, -3, -49, -102, -19, -130, -86, -81, -24, -87, -88, -7, -76, -33, -116, -64, -117, -25, -125, -70, -98, -64, -28, -66, -2, -190, -70, -59, -10, -10, -49, -12, -21, -85, -36, -3, -66, -176, -14, -89, -6, -24, -106, -21, -16, -27, -76, -210, -111, -39, -47, -20, -31, -55, -5, -55, -52, -42, -41, -15, -73, -159, -19, -27, -6, -12, -18, -62, -89, -15, -182, -86, -48, -72, -80, -49, -7, -12, -16, -83, -4, -66, -3, -62, -14, -86, -38, -65, -97, -76, -56, -158, -40, -155, -87, -20, -23, -134, -223, -43, -3, -58, -118, -21, -31, -124, -44, -3, -29, -134, -46, -31, -80, -60, -115, -56, -66, -1, -131, -122, -3, -71, -36, -11, -6, -37, -7, -1, -142, -6, -115, -23, -34, -19, -6, -137, -34, -127, -25, -18, -56, -119, -63, -81, -81, -118, -19, -152, -49, -26, -7, -144, -21, -19, -24, -50, -105, -58, -3, -46, -2, -3, -64, -140, -119, -27, -99, -3, -19, -64, -23, -33, -121, -13, -60, -20, -31, -5, -29, -76, -68, -15, -30, -14, -2, -120, -40, -17, -3, -4, -40, -13, -184, -19, -25, -130, -48, -32, -21, -37, -12, -90, -48, -43, -12, -39, -64, -32, -5, -54, -8, -48, -36, -19, -3, -174, -29, -45, -73, -56, -5, -39, -37, -2, -57, -100, -9, -15, -44, -97, -4, -40, -168, -29, -66, -29, -98, -108, -20, -5, -2, -36, -63, -57, -16, -35, -70, -6, -52, -4, -40, -83, -31, -127, -14, -19, -81, -53, -84, -47, -29, -2, -42, -62, -20, -44, -21, -110, -59, -1, -37, -35, -91, -129, -84, -49, -4, -29, -7, -57, -4, -66, -49, -24, -17, -45, -110, -115, -77, -41, -214, -23, -34, -12, -172, -7, -6, -66, -37, -59, -16, -30, -70, -63, -96, -85, -143, -2, -17, -18, -13, -57, -30, -26, -50, -45, -74, -135, -16, -2, -24, -4, -40, -26, -136, -3, -3, -2, -34, -26, -2, -37, -167, -28, -68, -44, -85, -31, -6, -26, -54, -15, -22, -8, -11, -3, -73, -23, -82, -98, -37, -44, -64, -239, -39, -145, -171, -44, -12, -1, -49, -44, -9, -16, -8, -152, -14, -10, -2, -24, -100, -48, -3, -110, -30, -121, -37, -4, -46, -186, -40, -86, -138, -69, -42, -22, -137, -64, -45, -17, -32, -51, -97, -73, -29, -76, -89, -12, -5, -45, -34, -22, -72, -100, -14, -38, -82, -16, -103, -102, -3, -140, -10, -4, -160, -66, -66, -38, -3, -2, -7, -23, -23, -12, -42, -39, -55, -75, -8, -11, -3, -107, -63, -3, -4, -13, -117, -89, -31, -13, -101, -25, -164, -194, -103, -6, -84, -122, -9, -39, -160, -90, -67, -12, -9, -87, -168, -20, -94, -15, -11, -39, -260, -30, -28, -25, -84, -30, -10, -3, -31, -98, -3, -70, -49, -3, -27, -14, -51, -31, -11, -109, -102, -169, -119, -32, -31, -24, -79, -74, -15, -57, -75, -50, -193, -38, -9, -51, -25, -127, -93, -184, -50, -74, -27, -11, -12, -110, -152, -183, -24, -28, -71, -8, -16, -40, -4, -27, -141, -80, -9, -29, -16, -22, -34, -179, -165, -6, -7, -18, -24, -9, -74, -70, -72, -106, -6, -119, -36, -54, -4, -42, -36, -52, -180, -31, -46, -23, -19, -164, -41, -13, -141, -242, -46, -73, -89, -148, -128, -2, -71, -110, -6, -318, -2, -39, -16, -5, -8, -34, -33, -46, -9, -80, -104, -34, -89, -57, -23, -219, -32, -70, -45, -58, -13, -115, -142, -20, -21, -72, -48, -288, -16, -98, -59, -55, -22, -84, -66, -4, -20, -20, -45, -28, -52, -174, -128, -169, -33, -80, -12, -69, -14, -116, -132, -23, -21, -60, -6, -3, -13, -16, -60, -132, -19, -34, -1, -157, -85, -57, -67, -37, -15, -4, -8, -30, -67, -11, -85, -24, -8, -205, -44, -8, -301, -107, -37, -71, -46, -42, -95, -67, -26, -1, -64, -24, -51, -12, -196, -17, -39, -7, -127, -173, -20, -27, -16, -41, -199, -28, -11, -48, -60, -18, -82, -22, -38, -7, -3, -67, -79, -27, -44, -39, -20, -24, -75, -55, -170, -53, -14, -21, -24, -3, -232, -2, -107, -53, -62, -27, -50, -119, -93, -10, -25, -87, -15, -89, -28, -78, -20, -49, -6, -28, -62, -36, -108, -9, -44, -125, -2, -33, -13, -6, -33, -186, -58, -143, -21, -31, -94, -83, -54, -23, -81, -32, -21, -84, -38, -17, -21, -2, -61, -28, -29, -13, -31, -15, -25, -12, -17, -20, -6, -35, -59, -13, -5, -5, -48, -14, -60, -13, -131, -99, -6, -97, -87, -70, -19, -41, -25, -177, -16, -146, -61, -28, -19, -49, -22, -49, -79, -35, -31, -73, -15, -119, -7, -96, -87, -41, -59, -1, -47, -21, -38, -86, -53, -51, -25, -21, -2, -57, -30, -244, -9, -20, -127, -12, -97, -169, -3, -11, -36, -31, -64, -8, -170, -19, -16, -31, -29, -49, -47, -5, -68, -2, -79, -165, -25, -49, -39, -35, -176, -69, -37, -65, -173, -25, -26, -24, -8, -41, -58, -49, -22, -33, -69, -20, -33, -12, -7, -27, -7, -16, -9, -73, -3, -38, -21, -1, -82, -34, -84, -6, -27, -68, -105, -111, -25, -171, -66, -21, -3, -31, -67, -12, -2, -4, -22, -6, -140, -102, -13, -23, -4, -81, -29, -39, -13, -81, -8, -6, -186, -20, -4, -143, -36, -44, -65, -30, -23, -19, -27, -100, -38, -20, -160, -76, -73, -8, -10, -306, -26, -15, -47, -22, -6, -127, -18, -38, -53, -36, -67, -50, -57, -9, -33, -17, -129, -17, -48, -82, -123, -157, -58, -11, -179, -5, -54, -163, -22, -50, -14, -13, -136, -89, -86, -75, -32, -37, -28, -16, -25, -6, -2, -3, -63, -18, -34, -56, -6, -87, -30, -12, -43, -43, -116, -115, -13, -2, -1, -127, -57, -73, -53, -19, -64, -31, -19, -176, -150, -51, -1, -14, -15, -13, -6, -75, -14, -31, -35, -38, -73, -21, -5, -24, -59, -40, -8, -35, -5, -47, -6, -19, -27, -48, -21, -40, -34, -80, -43, -115, -12, -96, -49, -18, -70, -13, -2, -53, -240, -9, -60, -45, -29, -10, -49, -14, -66, -2, -2, -28, -1, -28, -62, -5, -3, -12, -16, -7, -71, -58, -92, -241, -82, -54, -10, -43, -38, -18, -30, -40, -3, -16, -21, -29, -54, -4, -3, -72, -28, -15, -82, -90, -92, -39, -114, -58, -14, -13, -23, -21, -167, -32, -8, -69, -127, -28, -6, -182, -12, -72, -2, -120, -114, -208, -16, -113, -2, -88, -90, -11, -18, -135, -89, -218, -95, -23, -6, -33, -89, -224, -21, -70, -47, -16, -24, -5, -46, -4, -51, -2, -17, -51, -27, -66, -43, -41, -12, -21, -76, -37, -34, -12, -75, -23, -23, -81, -19, -50, -105, -64, -75, -112, -52, -204, -27, -16, -116, -33, -28, -21, -31, -30, -87, -38, -2, -148, -64, -26, -22, -3, -112, -28, -42, -40, -210, -59, -1, -61, -2, -97, -16, -17, -66, -93, -5, -130, -66, -8, -34, -93, -116, -225, -50, -15, -57, -10, -120, -48, -7, -110, -71, -40, -59, -36, -38, -93, -82, -52, -38, -13, -18, -75, -47, -42, -43, -35, -12, -7, -103, -20, -125, -68, -90, -3, -18, -144, -5, -86, -8, -30, -4, -12, -76, -37, -49, -6, -61, -122, -100, -120, -22, -75, -91, -27, -55, -75, -14, -92, -13, -59, -2, -222, -39, -13, -82, -3, -49, -85, -5, -35, -39, -29, -32, -3, -120, -46, -136, -12, -43, -26, -8, -9, -48, -18, -124, -1, -15, -44, -31, -32, -22, -9, -14, -92, -51, -97, -120, -1, -20, -59, -65, -20, -6, -54, -9, -56, -16, -71, -17, -20, -190, -6, -3, -80, -14, -6, -17, -124, -74, -83, -29, -5, -205, -1, -57, -43, -79, -81, -41, -30, -68, -66, -18, -56, -37, -65, -171, -160, -96, -52, -6, -25, -117, -9, -94, -11, -85, -69, -63, -10, -70, -28, -53, -104, -96, -14, -156, -26, -149, -68, -52, -71, -38, -26, -44, -43, -54, -23, -17, -25, -86, -182, -8, -21, -50, -79, -116, -20, -72, -36, -156, -214, -121, -123, -83, -33, -49, -126, -68, -97, -46, -98, -22, -11, -124, -102, -111, -116, -88, -5, -15, -89, -92, -72, -30, -119, -118, -28, -14, -47, -36, -14, -15, -51, -79, -15, -5, -17, -16, -18, -14, -15, -4, -85, -16, -22, -4, -18, -46, -9, -26, -180, -81, -6, -34, -38, -138, -15, -55, -11, -173, -116, -73, -92, -130, -13, -221, -15, -95, -90, -37, -10, -8, -107, -23, -127, -23, -35, -34, -22, -31, -81, -68, -48, -84, -27, -2, -32, -52, -11, -7, -61, -12, -59, -70, -98, -160, -8, -59, -42, -7, -70, -39, -63, -46, -43, -1, -41, -7, -130, -65, -24, -2, -86, -19, -21, -93, -59, -15, -85, -7, -19, -32, -75, -57, -10, -16, -43, -28, -39, -72, -46, -26, -10, -37, -7, -18, -161, -43, -46, -31, -66, -31, -58, -102, -16, -8, -109, -20, -46, -102, -4, -18, -6, -6, -59, -12, -9, -98, -2, -2, -52, -11, -10, -57, -193, -41, -9, -54, -6, -4, -8, -164, -64, -16, -12, -2, -50, -4, -9, -34, -142, -32, -99, -9, -103, -12, -2, -24, -11, -7, -13, -10, -95, -425, -162, -29, -82, -42, -62, -15, -87, -153, -31, -32, -19, -108, -24, -42, -229, -189, -35, -7, -63, -10, -27, -7, -10, -10, -158, -180, -174, -81, -9, -11, -115, -17, -7, -109, -33, -131, -6, -117, -18, -4, -41, -21, -25, -16, -156, -59, -74, -4, -19, -47, -36, -91, -4, -61, -97, -48, -9, -118, -48, -79, -41, -5, -30, -5, -55, -16, -114, -21, -3, -8, -6, -65, -39, -15, -3, -104, -2, -15, -44, -19, -38, -102, -52, -37, -14, -18, -19, -4, -7, -67, -54, -9, -10, -92, -94, -92, -32, -134, -35, -12, -114, -105, -93, -31, -10, -89, -13, -37, -39, -11, -86, -65, -56, -72, -24, -141, -5, -116, -110, -38, -226, -4, -79, -3, -35, -37, -14, -31, -25, -8, -70, -4, -56, -6, -4, -13, -2, -48, -16, -59, -53, -19, -80, -72, -80, -9, -18, -10, -122, -5, -149, -6, -103, -31, -21, -8, -15, -7, -12, -37, -5, -100, -114, -63, -15, -6, -24, -32, -23, -24, -125, -33, -27, -143, -57, -52, -15, -93, -10, -9, -6, -131, -36, -15, -36, -16, -22, -6, -39, -6, -13, -4, -18, -4, -16, -26, -37, -7, -14, -41, -126, -17, -37, -23, -132, -8, -12, -41, -17, -12, -6, -23, -16, -100, -4, -7, -108, -38, -178, -29, -30, -6, -14, -3, -6, -17, -55, -47, -30, -83, -33, -28, -4, -15, -16, -69, -27, -17, -41, -22, -96, -5, -15, -62, -11, -156, -7, -68, -103, -6, -11, -73, -54, -7, -74, -88, -21, -57, -141, -25, -19, -26, -51, -52, -39, -37, -69, -2, -7, -32, -38, -18, -20, -7, -110, -34, -49, -4, -31, -5, -89, -59, -44, -35, -23, -14, -95, -42, -25, -57, -38, -55, -69, -124, -69, -78, -18, -17, -198, -14, -22, -20, -7, -261, -93, -8, -5, -1, -4, -168, -140, -54, -4, -83, -8, -65, -105, -6, -92, -44, -104, -89, -28, -2, -11, -52, -2, -4, -41, -34, -9, -84, -50, -61, -9, -76, -14, -7, -8, -3, -4, -8, -8, -49, -60, -38, -46, -38, -5, -134, -66, -130, -183, -101, -35, -9, -84, -33, -43, -45, -152, -35, -9, -6, -12, -4, -56, -61, -36, -5, -20, -64, -51, -72, -6, -1, -40, -6, -39, -11, -26, -5, -14, -30, -79, -175, -12, -15, -22, -4, -7, -99, -99, -157, -17, -20, -38, -21, -7, -49, -7, -21, -55, -37, -144, -30, -28, -7, -4, -4, -11, -1, -107, -48, -93, -243, -17, -6, -66, -3, -7, -130, -4, -16, -56, -120, -60, -5, -30, 0, -21, -64, -21, -31, -4, -17, -7, -68, -44, -14, -4, -49, -77, -6, -61, -5, -7, -47, -76, -8, -9, -57, -3, -75, -84, -36, -4, -81, -248, -22, -25, -94, -7, -22, -58, -169, -28, -54, -50, -11, -6, -33, -44, -47, -8, -121, -157, -52, -82, -5, -35, -8, -14, -166, -27, -71, -4, -106, -22, -6, -55, -90, -16, -13, -31, -4, -49, -3, -9, -106, -57, -4, -119, -64, -28, -52, -1, -93, -81, -25, -4, -85, -159, -19, -69, -14, -75, -53, -8, -51, -112, -51, -19, -118, -42, -42, -25, -5, -33, -79, -45, -10, -53, -7, -4, -41, -8, -5, -9, -49, -60, -21, -220, -17, -50, -42, -21, -15, -17, -134, -5, -11, -5, -122, -35, -6, -17, -10, -36, -47, -42, -40, -45, -26, -24, -95, -8, -3, -5, -6, -8, -9, -15, -66, -32, -15, -27, -35, -12, -39, -22, -2, -33, -25, -44, -126, -26, -65, -117, -8, -52, -48, -55, -158, -54, -59, -7, -27, -52, -93, -41, -8, -48, -2, -52, -2, -3, -6, -95, -39, -3, -74, -29, -35, -3, -61, -8, -118, -57, -6, -99, -29, -4, -27, -20, -60, -43, -197, -86, -14, -8, -8, -80, -34, -12, -58, -118, -47, -49, -1, -9, -5, -6, -9, -27, -29, -114, -1, -24, -69, -10, -4, -27, -24, -116, -32, -9, -6, -3, -21, -35, -9, -61, -29, -49, -26, -5, -42, -41, -43, -17, -3, -3, -6, -19, -16, -43, -33, -9, -190, -144, -8, -45, -8, -57, -4, -35, -50, -57, -5, -2, -7, -42, -42, -60, -31, -11, -40, -6, -4, -47, -18, -3, -5, -11, -89, -41, -54, -41, -32, -36, -90, -21, -54, -83, -71, -13, -34, -5, 0, -53, -111, -116, -69, -8, -51, -3, -27, -31, -39, -107, -16, -4, -9, -61, -48, -17, -30, -49, -36, -48, -13, -7, -5, -39, -7, -48, -120, -10, -11, -3, -24, -79, -69, -89, -25, -34, -127, -26, -62, -3, -263, -66, -18, -13, -3, -57, -9, -18, -44, -11, -36, -18, -59, -32, -53, -22, -9, -53, -168, -107, -102, -20, -23, -13, -3, -59, -5, -6, -86, -13, -97, -14, -86, -4, -15, -7, -22, -100, -108, -3, -12, -23, -2, -5, -2, -8, -28, -91, -66, -81, -109, -253, -6, -136, -4, -73, -32, -8, -5, -49, -39, -42, -17, -76, -22, -64, -176, -6, -13, -10, -14, -38, -79, -20, -47, -59, -17, -9, -27, -25, -177, -12, -198, -7, -16, -11, -70, -46, -68, -11, -59, -117, -48, -80, -12, 0, -46, -52, -6, -20, -94, -34, -14, -49, -14, -9, -24, -155, -43, -6, -64, -133, -97, -32, -2, -41, -45, -5, -56, -10, -10, -44, -33, -5, -300, -11, -26, -89, -31, -13, -5, -13, -20, -43, -45, -134, -56, -168, -18, -4, -34, -46, -8, -83, -111, -1, -6, -84, -24, -17, -8, -61, -221, -101, -46, -13, -37, -6, -148, -65, -90, -51, -24, -5, -19, -13, -33, -110, -72, -3, -6, -84, -4, -48, -30, -29, -27, -34, -13, -89, -23, -41, -9, -9, -80, -19, -5, -11, -4, -8, -74, -124, -7, -4, -4, -4, -92, -15, -24, -35, -59, -27, -3, -37, -29, -5, -4, -20, -18, -2, -125, -9, -27, -37, -59, -2, -56, -19, -3, -7, -10, -9, -40, -7, -7, -9, -104, -7, -4, -11, -59, -24, -164, -40, -50, -57, -51, -74, -54, -38, -238, -21, -190, -17, -55, -40, -47, -35, -3, -327, -60, -78, -140, -12, -51, -182, -11, -3, -215, -9, -9, -47, -59, -6, -140, -9, -6, -12, -7, -13, -62, -47, -67, -35, -96, -14, -9, -22, -39, -12, -95, -61, -59, -46, -5, -54, -74, -31, -114, -9, -31, -16, -31, -21, -124, -4, -24, -9, -21, -17, -27, -77, -31, -49, -14, -56, -36, -12, -52, -19, -14, -22, -6, -1, -13, -7, -83, -7, -87, -87, -5, -14, -39, -42, -9, -4, -2, -62, -142, -146, -7, -131, -122, -53, -6, -35, -10, -16, -61, -93, -52, -3, -35, -7, -18, -53, -77, -14, -51, -5, -124, -15, -14, -133, -87, -15, -156, -29, -45, -13, -8, -58, -139, -7, -25, -39, -61, -6, -4, -35, -42, -26, -62, -6, -4, -8, -45, -25, -260, -47, -122, -18, -40, -9, -48, -39, -92, -41, -7, -4, -62, -69, -7, -5, -2, -175, -10, -46, -49, -13, -70, -73, -29, -3, -2, -19, -140, -4, -95, -6, -238, -3, -182, -30, -8, -29, -24, -89, -1, -39, -12, -24, -74, -86, -2, -13, -19, -83, -5, -85, -69, -18, -56, -70, -3, -14, -16, -22, -7, -129, -26, -39, -194, -19, -29, -8, -103, -42, -13, -5, -147, -3, -15, -2, -10, -8, -25, -6, -35, -38, -48, -72, -20, -130, -89, -3, -38, -10, -7, -222, -12, -23, -70, -39, -51, -58, -3, -39, -82, -14, -32, -43, -14, -8, -7, -35, -41, -29, -14, -46, -160, -49, -5, -22, -17, -37, -114, -165, -99, -2, -10, -45, -5, -3, -28, -14, -9, -6, -48, -96, -14, -34, -3, -159, -24, -143, -7, -37, -9, -34, -66, -21, -34, -124, -33, -7, -110, -13, -40, -42, -5, -10, -277, -29, -44, -9, -185, -10, -46, -10, -37, -65, -41, -5, -7, -67, -11, -196, -21, -76, -30, -102, -32, -33, -53, -5, -20, -5, -231, -45, -14, -47, -73, -75, -75, -8, -21, -4, -21, -34, -4, -45, -42, -64, -61, -21, -144, -17, -11, -153, -6, -4, -7, -68, -73, -23, -179, -60, -13, -93, -55, -33, -22, -48, -36, -70, -27, -165, -101, -61, -7, -49, -11, -19, -15, -89, -10, -64, -6, -5, -3, -4, -8, -4, -140, -10, -114, -2, -68, -288, -12, -174, -6, -33, -2, -23, -25, -50, -16, -79, -16, -19, -224, -31, -3, -46, -73, -62, -53, -8, -6, -2, -23, -76, -77, -9, -74, -40, -5, -20, -29, -6, -39, -57, -15, -88, -138, -42, -56, -46, -6, -74, -257, -105, -309, -47, -25, -31, -15, -9, -55, -225, -39, -19, -3, -6, -54, -24, -197, -6, -34, -60, -116, -33, -7, -52, -16, -8, -50, -18, -126, -122, -107, -17, -107, -82, -91, -123, -9, -18, -63, -13, -12, -18, -46, -198, -177, -75, -89, -80, -111, -27, -82, -172, -15, -96, -6, -86, -116, -67, -122, -8, -65, -59, -6, -183, -7, -89, -10, -11, -3, -71, -7, -46, -75, -38, -38, 0, -6, -9, -11, -31, -22, -6, -13, -1, -12, -8, -7, -21, -3, -10, -38, -30, -16, -13, -42, -69, -53, -5, -138, -54, -4, -4, -8, -48, -30, -20, -64, -73, -2, -76, -39, -3, -56, -10, -62, -23, -10, -106, -25, -41, -20, -37, -26, -36, -9, -122, -20, -23, -39, -5, -9, -41, -7, -35, -71, -12, -48, -50, -127, -128, -22, -28, -140, -19, -1, -30, -30, -9, -6, -6, -45, -21, -221, -31, -232, -100, -88, -5, -10, -17, -79, -7, -39, -30, -4, -74, -22, -5, -141, -94, -119, -127, -51, -13, -6, -41, -129, -44, -94, -9, -70, -119, -93, -31, -3, -3, -35, -13, -21, -12, -5, -60, -1, -102, -41, -32, -18, -7, -95, -142, -6, -52, -5, -19, -116, -36, -10, -14, -10, -134, -8, -26, -7, -20, -147, -34, -105, -17, -194, -3, -11, -9, -105, -75, -4, -27, -4, -11, -77, -28, -26, -26, -10, -43, -12, -25, -9, -16, -176, -18, -25, -7, -6, -62, -32, -20, -9, -42, -43, -39, -4, -94, -52, -70, -6, -28, -19, -116, -23, -4, -10, -19, -51, -108, -62, -14, -129, -101, -85, -4, -9, -3, -47, -7, -54, -3, -88, -8, -10, -136, -98, -3, -42, -5, -28, -11, -29, -12, -8, -14, -6, -7, -3, -4, -11, -114, -211, -66, -15, -15, -7, -22, -31, -16, -83, -4, -72, -129, -28, -9, -125, -21, -107, -9, -2, -122, -14, -77, -127, -99, -3, -6, -47, -37, -64, -42, -100, -4, -5, -29, -6, -132, -12, -36, -13, -115, -10, -10, -12, -31, -24, -3, -5, -51, -6, -6, -6, -50, -18, -40, -10, -74, -13, -5, -27, -54, -63, -47, -7, -14, -66, -31, -51, -7, -18, -14, -61, -4, -90, -3, -85, -48, -28, -180, -193, -75, -10, -28, -5, -37, -54, -16, -18, -2, -4, -36, -74, -9, -26, -5, -58, -5, -59, -53, -55, -63, -53, -91, -157, -43, -19, -141, -33, -37, -7, -11, -34, -26, -7, -64, -109, -9, -74, -28, -102, -34, -98, -3, -58, -58, -167, -131, -10, -12, -273, -136, -4, -10, -30, -19, -47, -68, -44, -7, -84, -37, -23, -48, -13, -54, -85, -50, -197, -5, -8, -8, -64, -16, -12, -14, -46, -5, -91, -15, -19, -23, -5, -14, -1, -17, -8, -76, -108, -5, -54, -9, -61, -265, -66, -18, -200, -21, -25, -1, -25, -207, -13, -38, -18, -52, -29, -78, -3, -2, -52, -96, -58, -2, -50, -6, -114, 0, -40, -13, -49, 0, -121, -24, -5, -29, -8, -5, -225, -19, -1, -39, -46, -133, -7, -19, -7, -31, -70, -10, -8, -8, -34, -33, -61, -12, -104, -3, -73, -27, -218, -181, -20, -15, -56, -63, -53, -9, -9, -59, -41, -50, -51, -62, -15, -141, -107, -163, -33, -62, -103, -66, -14, -37, -4, -6, -83, -4, -49, -5, -1, -70, -19, -9, -207, -36, -10, -103, -25, -49, -85, -17, -15, -21, -39, -11, -4, -22, -40, -27, -9, -51, -31, -58, -28, -78, -65, -33, -4, -54, -140, -28, -99, -302, -35, -50, -57, -60, -8, -36, -17, -70, -27, -9, -33, -62, -32, -3, -45, -47, -9, -31, -15, -49, -5, -151, -10, -30, -34, -96, -126, -43, -37, -10, -48, -148, -95, -74, -66, -65, -24, -18, -8, -2, -83, -23, -43, -36, -62, -45, -26, -51, -60, -28, -123, -10, -9, -63, -35, -125, -35, -13, -14, -55, -27, -4, -6, -47, -1, -15, -1, -44, -5, -7, -203, -254, -39, -8, -110, -23, -289, -84, -128, -8, -113, -29, -29, -101, -33, -3, -190, -9, -86, -1, -11, -2, -10, -8, -102, -134, -23, -234, -20, -100, -6, -40, -81, -31, -17, -4, -53, -96, -83, -20, -29, -4, -10, -3, -5, -27, -51, -32, -5, -209, -30, -8, -12, -21, -63, -185, -114, -15, -35, -16, -148, -10, -30, -5, -25, -51, -18, -7, -28, -43, -6, -6, -49, -81, -88, -22, -43, -92, -17, -30, -16, -109, -8, -51, -208, -1, -31, -20, -12, -92, -204, -33, -84, -10, -75, -16, 0, -154, -86, -12, -23, -11, 0, -4, -60, -52, -163, -4, -9, -2, -18, -1, -34, -155, -37, -21, -89, -28, -160, -86, -24, -1, -27, -71, -29, -25, -8, -133, -117, -115, -126, -33, -85, -103, -5, -99, -36, -6, -25, -7, -90, -22, -40, -110, -108, -43, -121, -90, -39, -82, -4, -1, -81, -42, -4, -14, -12, -24, -111, -6, -58, -65, -1, -48, -473, 0, -17, -78, -51, -41, -149, -176, -5, -20, -8, -18, -39, -33, -1, -66, -92, -5, -118, -3, -62, -35, -20, -56, -29, -95, -34, -6, -40, -40, -29, -16, -14, -58, -13, -12, -36, -22, -40, -103, -15, -52, -30, -191, -106, -8, -28, -54, -86, -31, -30, -1, -7, -141, -49, -5, -11, -38, -2, -27, -79, -51, -90, -181, -5, -94, -24, -3, -9, -143, -64, -6, -197, -13, -141, -13, -30, -28, -71, -2, -26, -92, -16, -150, -5, -15, -90, -13, -3, -57, -28, -58, -21, -2, -18, -3, -261, -8, -33, -137, -136, -45, -22, -33, -10, -187, -39, -75, -43, -7, -21, -3, -21, -8, -43, -53, -23, -117, -5, -5, -26, -194, -74, -212, -36, -96, -42, -54, -9, -37, -61, -62, -68, -6, -2, -1, -21, -35, -222, -69, -13, -74, -31, -72, -29, -114, -6, -83, -16, -105, -122, 0, -9, -30, -35, -35, -6, -23, -51, -52, -5, -87, -7, -9, -12, -26, -7, -64, -72, -23, -99, -44, -5, -19, -32, -33, -26, -9, -17, -232, -37, -10, -2, -45, -18, -126, -46, -29, -28, -69, -43, -91, -8, -227, -8, -12, -66, -34, -35, -32, -31, -15, -9, -138, -275, -43, -7, -45, -46, -119, -28, -128, -7, -8, -19, -68, -203, -65, -67, -2, -43, -14, -29, -24, -112, -46, -20, -4, -40, -21, -43, -13, -3, -109, -7, -5, -59, -69, -189, -84, -8, -67, -109, -6, -6, -38, -13, -15, -7, -60, -200, -27, -5, -53, -11, -33, -259, -33, -42, -85, -88, -55, -87, -27, -6, -15, -25, -30, -14, -21, -235, -10, -236, -74, -7, -13, -52, -5, -56, -12, -46, -1, -23, -9, -27, -8, -17, -29, -18, -47, -5, -20, -78, -36, -129, -4, -64, -15, -110, -72, -28, -10, -77, -4, -47, -19, -200, -3, -13, -47, -25, -4, -4, -24, -31, -171, -35, -16, -41, -97, -6, -59, -13, -99, -87, -19, -61, -39, -35, -7, -108, -126, -3, -93, -84, -29, -61, -51, -24, -30, -10, -104, -3, -85, -65, -40, -14, -38, -43, -4, -43, -57, -114, -20, -2, -5, -15, -4, -97, -54, -4, -3, -30, -73, -13, -66, -8, -30, -106, -19, -77, -25, -19, -11, -33, -164, -13, -34, -9, -11, -178, -16, -3, -9, -225, -53, -2, -30, -25, -16, -58, -18, -20, -64, -65, -7, -11, -32, 0, -41, -49, -24, 0, -47, -21, -27, -12, -24, -16, -29, -6, -2, 0, -75, -11, -45, -155, -158, -4, -9, -22, -3, -8, -42, -9, -107, -80, -3, -137, -109, -92, -5, -12, -50, -15, -144, -56, -18, -4, -4, -18, -37, -8, -40, -27, -104, -8, -34, -15, -33, -81, 0, -177, -101, -6, -166, -25, -22, -75, -57, -11, -24, -10, -4, -14, -67, -5, -4, -5, -42, -10, -13, -14, -26, -69, -98, -99, -7, -49, -27, -152, -22, -49, -45, -28, -49, -5, -14, -46, -77, -11, -67, -139, -75, -28, -10, -56, -4, -81, -89, -65, -28, -85, -70, -7, -19, -109, -61, -44, -85, -71, -6, -203, -7, -27, -160, -166, -52, -184, -82, -12, -59, -43, -2, -53, -285, -90, -6, -6, -136, -10, -29, -77, -44, -7, -75, -25, -38, -79, -100, -3, -23, -214, -53, -82, -4, -19, -5, -9, -57, -100, -17, -106, -64, -97, -244, -56, -53, -64, -41, -113, -95, -39, -20, -25, -66, -55, -176, -54, -20, -26, -42, -54, -2, -4, -113, -146, -28, -76, -22, -2, -97, -38, -37, -35, -69, -7, -23, -4, -195, -29, -64, -54, -6, -70, -14, -5, -87, -159, -33, -11, -195, -6, -14, -3, -24, -32, -35, -64, -80, -64, -19, -7, -4, -57, -158, -178, -47, -84, -68, -106, -65, -1, -14, -22, -6, -22, -13, -17, -65, -116, -39, -100, -5, -37, -36, -13, -2, -20, -2, -158, -115, -25, -21, -3, -92, -6, -52, -139, -91, -19, -4, -14, -23, -32, -40, -5, -47, -52, -102, -107, -71, -95, -79, -31, -23, -139, -36, -120, -81, -9, -39, -19, -136, -118, -58, -6, -62, -69, -7, -9, -44, -4, -1, -15, -53, -3, -29, -37, -37, -21, -7, -72, -135, -24, -47, -60, -6, -6, -156, -14, -74, -53, -40, -36, -108, -104, -231, -47, -3, -23, -57, -10, -87, -98, -26, -20, -117, -6, -24, -118, -39, -23, -51, -11, -41, -49, -45, -205, -26, -96, -5, -18, -28, -10, -39, -5, -22, -68, -134, -75, -23, -40, -8, -4, -39, -59, -11, -9, -83, -50, -83, -73, -90, -160, -14, -39, -24, -49, -48, -2, -56, -2, -64, -261, -65, -5, -58, -13, -101, -136, -60, -14, -32, -16, -15, -9, -25, -63, -23, -24, -150, -19, -68, -4, -82, -81, -15, -3, -46, -32, -84, -115, -46, -12, -7, -61, -32, -16, -130, -256, -17, -74, -64, -37, -106, -2, -20, -48, -1, -15, -47, -12, -36, -31, -53, -20, -17, -4, -71, -45, -47, -189, -357, -48, -69, -151, -35, -53, -43, -15, -25, -94, -130, -56, -155, -9, -180, -16, -18, -31, -161, -33, -83, -5, -46, -38, -2, -13, -26, -15, -5, -6, -114, -44, -172, -86, -316, -36, -3, -15, -47, -47, -104, -9, -73, -11, -34, -31, -77, -115, -34, -12, -22, -5, -27, -40, -7, -15, -197, -11, -3, -12, -67, -7, -134, -49, -104, -83, -157, -47, -43, -50, -32, -75, -74, -22, -43, -16, -4, -127, -4, -2, -118, -7, -21, -371, -73, -15, -2, -34, -87, -111, -65, -44, -61, -5, -140, -31, -36, -9, -189, -76, -146, -1, -114, -84, -14, -42, -27, -36, -64, -14, -14, -92, -3, -29, -6, -43, -3, -35, -40, -12, -40, -50, -15, -197, -107, -27, -24, -68, -16, -41, -47, -26, -254, -14, -41, -8, -4, -58, -162, -17, -130, -25, -53, -1, -18, 0, -144, -28, -6, -104, -5, -5, -9, -19, -51, -67, -25, -98, -27, -220, -58, -161, -17, -56, -107, -134, -54, -62, -30, -36, -8, -26, -29, -8, -170, -64, -37, -74, -9, -5, -4, -151, -95, -71, -20, -193, -150, -5, -17, -9, -101, -84, -14, -42, -27, -29, -71, -10, -33, -37, -15, -57, -34, -21, -7, -36, -41, -6, -99, -64, -3, -12, -52, -67, -3, -5, -35, -4, -119, -30, -70, -188, -22, -118, -17, -23, -60, -92, -85, -83, -15, -7, -9, -52, -23, -26, -16, -85, -22, -106, -79, -60, -34, -25, -9, -10, -39, -41, -60, -57, -87, -62, -76, -41, -14, -61, -168, -22, -2, -72, -42, -3, -66, -17, -64, -123, -143, -1, -36, -55, -45, -10, -33, -49, -62, -8, -15, -76, -94, -86, -51, -9, -42, -108, -43, -23, -60, -34, -57, -69, -136, -5, -19, -45, -58, -70, -9, -32, -18, -3, -3, -42, -171, -5, -21, -83, -119, -103, -31, -19, -78, -91, -22, -20, -55, -61, -27, -47, -24, -112, -126, -106, -110, -41, -90, -8, -99, -17, -24, -35, -34, -3, -145, -76, -24, -9, -60, -42, -29, -1, -5, -75, -117, -43, -65, -15, -14, -31, -66, -10, -62, -111, -88, -13, -99, -21, -48, -13, -63, -80, -31, -42, -55, -29, -176, -57, -87, -38, -20, -28, -54, -135, -38, -165, -5, -6, -27, -66, -14, -356, -72, -65, -120, -28, -71, -40, -4, -167, -80, -39, -39, -19, -99, -6, -142, -138, -62, -27, -67, -22, -8, -23, -46, -88, -1, -108, -93, -41, -5, -40, -53, -39, -3, -91, -4, -5, -117, -75, -6, -226, -7, -44, -136, -66, -54, -44, -37, -60, -42, -25, -72, -49, -23, -20, -24, -23, -60, -160, -110, -61, -31, -54, -67, -17, -26, -41, -207, -38, -6, -82, -26, -94, -6, -51, -50, -19, -41, -51, -84, -132, -168, -18, -3, -55, -3, -14, -144, -18, -36, -11, -21, -42, -26, -6, -18, -89, -23, -5, -50, -68, -5, -21, -38, -12, -81, -110, -227, -4, -67, -161, -108, -3, -87, -252, -4, -42, -28, -128, -111, -53, -13, -107, -73, -34, -108, -53, -54, -64, -156, -48, -39, -144, -44, -17, -1, -25, -2, -140, -10, -25, -72, -56, -171, -10, -72, -97, -68, -50, -41, -73, -29, -58, -3, -2, -94, -10, -7, -52, -132, -25, -43, -60, -92, -41, -74, -23, -76, -27, -33, -22, -35, -181, -48, -17, -27, -100, -4, -79, -3, -225, -50, -127, -38, -53, -5, -50, -70, -8, -42, -53, -3, -21, -10, -97, -40, -5, -51, -103, -15, -150, -6, -138, -42, -54, -70, -27, -19, -23, -12, -258, -11, -39, -77, -39, -8, -81, -13, -19, -31, -80, -85, -13, -43, -82, -42, -9, -9, -40, -91, -8, -28, -29, -24, -20, -65, -145, -18, -52, -5, -29, -42, -54, -19, -32, -91, -27, -38, -55, -30, -45, -42, -76, -67, -6, -15, -29, -41, -6, -24, -48, -31, -11, -29, -5, -27, -87, -35, -29, -6, -113, -70, -4, -5, -107, -139, -84, -21, -4, -52, -87, -9, -12, -9, -13, -17, -5, -13, -13, -108, -29, -34, -173, -10, -20, -7, -31, -57, -44, -3, -17, -104, -31, -14, -76, -4, -93, -120, -15, -78, -41, -61, -24, -5, -12, -73, -43, -30, -139, -4, -223, -5, -133, -47, -15, -103, -36, -22, -2, -56, -6, -10, -7, -19, -81, -3, -20, -4, -19, -31, -6, -29, -64, -3, -45, -6, -87, -61, -194, -180, -180, -5, -7, -9, -49, -23, -6, -67, -37, -21, -92, -75, -93, -23, -92, -74, -57, -34, -8, -61, -88, -53, -236, -63, -4, -9, -111, -1, -4, -9, -58, -28, -13, -23, -10, -45, -26, -68, -139, -29, -30, -31, -127, -22, -31, -16, -63, -30, -68, -19, -23, -141, -31, -22, -44, -36, -10, -5, -2, -2, -8, -5, -6, -12, -6, -14, -75, -83, -4, -56, -4, -131, -110, -34, -39, -21, -35, -55, -10, -7, -9, -12, -46, -6, -8, -322, -15, -157, -198, -23, -11, -168, -126, -169, -7, -6, -70, -17, -47, -5, -76, -17, -45, -156, -55, -11, -53, -58, -20, -103, -13, -36, -2, -29, -117, -61, -43, -32, -11, -4, -78, -13, -111, -25, -24, -9, -20, -9, -39, -6, -29, -31, -119, -10, -19, -18, -5, -9, -114, -11, -44, -12, -7, -9, -97, -71, -29, -21, -127, -31, -32, -71, -17, -49, -62, -4, -37, -187, -11, -16, -78, -21, -38, -149, -99, -11, -14, -39, -11, -200, -240, -12, -76, -77, -134, -81, -125, -13, -117, -6, -14, -46, -22, -6, -115, -168, -17, -90, -179, -109, -9, -61, -87, -53, -245, -4, -28, -76, -51, -158, -24, -7, -143, -24, -18, -41, -21, -7, -6, -5, -54, -58, -64, -75, -40, -196, -4, -42, -57, -34, -207, -10, -63, -178, -8, -34, -40, -113, -30, -31, -11, -20, -16, -3, -9, -7, -11, -8, -88, -243, -34, -4, -80, -72, -3, -199, -6, -68, -8, -14, -5, -8, -25, -107, -57, -43, -9, -49, -23, -234, -147, -24, -5, -11, -76, -9, -9, -235, -10, -9, -49, -56, -151, -12, -58, -5, -48, -32, -14, -17, -68, -21, -27, -22, -21, -36, -11, -32, -60, -1, -119, -59, -29, -28, -50, -6, -7, -5, -6, -19, -42, -6, -75, -27, -101, -47, -74, -46, -3, -49, -87, -3, -16, -39, -100, -140, -12, -161, -7, -5, -56, -7, -25, -50, -144, -32, -67, -87, -7, -48, -12, -42, -46, -15, -22, -65, -13, -22, -37, -50, -8, -157, -33, -61, -74, -6, -60, -48, -7, -67, -62, -42, -145, -36, -40, -13, -5, -143, -12, -96, -11, -16, -92, -15, -17, -35, -67, -39, -3, -2, -17, -46, -12, -96, -148, -21, -198, -143, -14, -171, -12, -26, -25, -192, -17, -37, -14, -13, -19, -160, -27, -3, -48, -35, -24, -176, -2, -27, -57, -17, -20, -19, -29, -42, -38, -17, -17, -142, -46, -174, -22, -31, -5, -5, -53, -313, -26, -4, -32, -80, -9, -57, -27, -3, -139, -88, -4, -68, -15, -7, -19, -11, -51, -6, -14, -62, -10, -115, -15, -5, -56, -78, -61, -98, -29, -101, -65, -83, -422, -36, -46, -99, -77, -15, -32, -6, -181, -64, -69, -17, -30, -28, -67, -12, -34, -65, -70, -8, -61, -31, -7, -19, -48, -7, -43, -104, -46, -223, -60, -127, -5, -17, -13, -20, -47, -19, -3, -9, -6, -88, -5, -8, -35, -3, -6, -8, -108, -38, -38, -14, -22, -24, -76, -20, -5, -115, -73, -147, -55, -4, -20, -61, -42, -1, -8, -15, -118, -51, -39, -260, -3, -38, -106, -126, -61, -45, -22, -6, -11, -25, -32, -14, -65, -26, -197, -20, -22, -7, -16, -34, -124, -72, -11, -71, -16, -4, -12, -21, -30, -58, -4, -39, -5, -96, -21, -6, -23, -19, -107, -10, -14, -11, -10, -5, -6, -6, -10, -23, -31, -76, -61, -18, -132, -45, -245, -17, -27, -6, -66, -16, -69, -193, -66, -202, -4, -51, -7, -50, -50, -55, -96, -59, -50, -3, -4, -37, -44, -48, -158, -88, -44, -3, -75, -8, -5, -35, -15, -201, -7, -9, -15, -44, -92, -45, -37, -34, -7, -64, -60, -18, -134, -24, -197, -23, -25, -6, -74, -2, -62, -20, -80, -20, -5, -32, -169, -133, -12, -10, -11, -21, -39, -2, -26, -117, -36, -166, -7, -84, -18, -49, -41, -149, -58, -3, -50, -126, -46, -12, -27, -54, -64, -43, -10, -9, -19, -106, -41, -7, -19, -159, -2, -9, -69, -64, -21, -52, -54, -98, -46, -43, -45, -29, -47, -18, -22, -114, -68, -21, -46, -10, -55, -2, -9, -30, -3, -3, -52, -13, -47, -4, -27, -199, -44, -31, -34, -10, -99, -12, -5, -13, -6, -8, -2, -20, -81, -146, -161, -142, -62, -43, -43, -70, -14, -32, -134, -35, -59, -7, -37, -110, -5, -7, -34, -36, -26, -17, -73, -16, -21, -4, -16, -96, -68, -28, -42, -164, -145, -96, -13, -31, -30, -13, -13, -24, -15, -3, -51, -13, -18, -38, -90, -235, -93, -9, -47, -7, -63, -7, -20, -177, -167, -15, -145, -99, -58, -100, -6, -4, -42, -58, -12, -10, -119, -37, -14, -7, -5, -157, -66, -91, -4, -89, -14, -134, -2, -29, -8, -54, -45, -5, -14, -31, -34, -7, -33, -20, -5, -12, -26, -62, -14, -124, -15, -286, -28, -16, -14, -13, -77, -39, -196, -27, -52, -16, -24, -9, -14, -12, -50, -8, -268, -71, -27, -11, -43, -20, -3, -103, -70, -4, -13, -58, -72, -62, -76, -172, -17, -176, -50, -4, -14, -44, -6, -7, -6, -21, -12, -16, -46, -12, -183, -6, -44, -4, -53, -14, -66, -34, -78, -6, -9, -39, -34, -5, -9, -16, -41, -240, -5, -63, -59, -18, -43, -106, -45, -6, -16, -36, -35, -8, -15, -103, -150, -34, -25, -4, -139, -53, -10, -86, -22, -51, -53, -82, -73, -61, -46, -14, -29, -3, -10, -36, -5, -8, -7, -40, -77, -117, -96, -28, -18, -62, -19, -92, -10, -70, -71, -14, -4, -6, -7, -43, -39, -49, -54, -3, -9, -59, -40, -57, -77, -8, -20, -20, -8, -19, -29, -51, -15, -90, -9, -139, -63, -109, -10, -199, -39, -17, -4, -52, -20, -14, -5, -16, -68, -37, -12, -3, -69, -13, -32, -83, -43, -89, -143, -59, -16, -29, -31, -82, -53, -96, -106, -12, -51, -117, -11, -5, -21, -29, -63, -65, -82, -5, -5, -39, -120, -7, -8, -23, -9, -33, -77, -17, -68, -33, -12, -4, -54, -46, -8, -10, -29, -56, -16, -54, -32, -13, -11, -2, -8, -55, -119, -32, -3, -19, -15, -103, -26, -48, -6, -32, -40, -15, -15, -91, -23, -18, -43, -10, -5, -30, -30, -41, -105, -6, -11, -14, -61, -52, -5, -22, -49, -5, -122, -40, -45, -55, -82, -14, -16, -17, -10, -86, -48, -24, -39, -163, -173, -36, -6, -39, -72, -59, -218, -147, -37, -17, -33, -127, -124, -9, -2, -80, -5, -72, -27, -38, -27, -11, -20, -12, -68, -19, -56, -51, 0, -11, -36, -18, -22, -54, -104, -58, -4, -73, -108, -20, -34, -29, -45, -63, -8, -3, -30, -43, -23, -42, -58, -75, -101, -95, -58, -10, -28, -76, -11, -55, -32, -61, -147, -10, -42, -34, -24, -68, -25, -37, -28, -7, -49, -61, -52, -10, -72, -91, -56, -6, -95, -54, -79, -9, -23, -32, -2, -23, -21, -102, -101, -26, -19, -82, -16, -34, -20, -169, -64, -45, -6, -8, -123, -92, -32, -63, -55, -75, -73, -23, -18, -67, -152, -122, -37, -47, -86, -6, -137, -28, -11, -60, -12, -52, -17, -4, -16, -31, -6, -14, -208, -16, -143, -12, -31, -28, -3, -36, -36, -14, -1, -65, -99, -5, -45, -67, -28, -9, -87, -106, -85, -119, -25, -161, -18, -18, -50, -33, -46, -27, -21, -50, -42, -89, -70, -28, -62, -46, -57, -45, -16, -21, -59, -17, -121, -121, -23, -25, -73, -2, -67, -6, -14, -11, -68, -38, -16, -13, -24, -23, -10, -112, -2, -67, -15, -52, -288, -35, -39, -16, -12, -47, -46, -11, -12, -35, -33, -33, -54, -35, -13, -17, -47, -6, -128, -79, -63, -8, -4, -90, -3, -36, -58, -11, -7, -15, -107, -30, -5, -27, -24, -50, -47, -2, -19, -42, -29, -11, -86, -31, -69, -43, -28, -19, -22, -3, -261, -40, -57, -12, -29, -32, -25, -82, -50, -70, -39, -40, -19, -23, -147, -3, -12, -9, -152, -26, -19, -85, -61, -7, -46, -8, -14, -37, -20, -10, -8, -71, -54, -195, -11, -34, -154, -61, -8, -130, -52, -81, -11, -18, -44, -60, -16, -176, -20, -6, -158, -10, -65, -44, -28, -12, -60, -14, -109, -39, -117, -92, -111, -52, -2, -6, -9, -155, -5, -4, -4, -49, -66, -6, -141, -9, -43, -17, -126, -23, -57, -33, -6, -6, -16, -27, -59, -7, -95, -46, -12, -99, -58, -48, -12, -4, -2, -6, -62, -13, -151, -10, -6, -17, -342, -4, -5, -47, -32, -21, -67, -11, -23, -71, -44, -80, -26, -19, -10, -82, -54, -121, -26, -132, -22, -13, -12, -98, -102, -25, -68, -6, -126, -30, -14, -123, -70, -178, -25, -3, -78, -29, -11, -67, -248, -66, -30, -8, -134, -93, -28, -5, -56, -18, -22, -9, -26, -11, -6, -112, -64, -6, -15, -38, -70, -62, -13, -15, -164, -8, -53, -9, -51, -61, -48, -116, -109, -3, -5, -12, -50, -9, -12, -89, -2, -22, -7, -71, -74, -78, -134, -78, -47, -29, -119, -6, -79, -23, -4, -13, -116, -12, -376, -74, -174, -50, -312, -123, -7, -14, -21, -32, -59, -10, -34, -10, -36, -42, -5, -122, -19, -5, -96, -50, -10, -5, -19, -6, -42, -17, -14, -22, -8, -7, -90, -85, -2, -43, -5, -56, -18, -46, -5, -72, -123, -71, -7, -11, -153, -54, -63, -247, -46, -35, -70, -148, -11, -9, -41, -33, -1, -32, -119, -13, -90, -96, -15, -18, -11, -3, -9, -90, -34, -4, -50, -12, -32, -15, -37, -4, -44, -107, -6, -71, -13, -12, -59, -54, -74, -6, -31, -20, -99, -25, -60, -15, -62, -4, -9, -44, -73, -11, -25, -37, -119, -7, -77, -1, -88, -80, -3, -18, -48, -38, -23, -8, -57, -53, -104, -3, -6, -54, -39, -11, -5, -87, -32, -11, -84, -6, -11, -9, -12, -147, -7, -50, -36, -52, -141, -104, -21, -103, -45, -65, -22, -13, -7, -89, -4, -80, -50, -18, -30, -23, -37, -18, -7, -29, -47, -236, -56, -5, -16, -128, -2, -13, -11, -26, -33, -32, -16, -101, -129, -176, -32, -71, -36, -33, -238, -148, -16, -15, -15, -48, -41, -11, -81, -78, -7, -7, -51, -61, -4, -65, -23, -23, -83, -4, -66, -39, -11, -16, -17, -6, -65, -12, -32, -92, -34, -159, -100, -47, -150, -43, -27, -141, -5, -50, -45, -25, -4, -8, -7, -127, -7, -9, -72, -50, -38, -21, -27, -12, -4, -37, -11, -9, -34, -207, -29, -18, -69, -46, -115, -2, -15, -27, -16, -74, -25, -40, -28, -7, -11, -20, -26, -75, -29, -8, -58, -39, -34, -6, -17, -10, -9, -6, -55, -6, -63, -94, -13, -140, -6, -31, -35, -129, -77, -41, -56, -71, -42, -11, -7, -14, -42, -154, -17, -4, -19, -36, -10, -119, -11, -23, -8, -5, -7, -40, -91, -11, -6, -135, -43, -48, -153, -47, -48, -51, -14, -14, -55, -30, -70, -23, -43, -114, -99, -10, -14, -91, -78, -11, -16, -2, -12, -79, -17, -17, -23, -143, -5, -73, -12, -28, -50, -32, -4, -20, -6, -53, -17, -143, -34, -9, -4, -88, -6, -9, -31, -12, -11, -53, -45, -25, -19, -185, -111, -49, -41, -49, -21, -68, -29, -10, -72, -62, -13, -25, -67, -1, -8, -11, -47, -23, -5, -6, -44, -220, -5, -86, -111, -15, -39, -5, -6, -41, -15, -61, -62, -19, -118, -83, -2, -233, -4, -10, -86, -29, -20, -55, -75, -13, -9, -65, -8, -26, -5, -7, -7, -232, -56, -8, -10, -352, -14, -92, -13, -73, -6, -39, -11, -71, -7, -15, -10, -34, -61, -8, -6, -71, -48, -48, -41, -6, -3, -10, -121, -39, -108, -21, -43, -54, -29, -75, -60, -4, -1, -11, -72, -4, -50, -7, -8, -18, -62, -89, -5, -47, -45, -31, -277, -126, -46, -9, -120, -50, -19, -6, -31, 0, -142, -121, -4, -11, -42, -57, -261, -9, -4, -14, -14, -10, -198, -13, -29, -183, -21, -44, -10, -223, -91, -5, -30, -39, -64, -5, -36, -76, -46, -8, -26, -104, -28, -17, -59, -29, -1, -8, -132, -23, -59, -4, -53, -33, -44, -6, -91, -66, -37, -13, -1, -81, -150, -14, -15, -5, -28, -12, -24, -60, -2, -7, -51, -112, -31, -16, -33, -66, -73, -10, -6, -22, -8, -68, -8, -3, -26, -7, -60, -8, -63, -30, -87, -5, -10, -13, -4, -2, -7, -18, -11, -145, -9, -46, -37, -15, -57, -97, -156, -10, -8, -184, -35, -58, -15, -32, -18, -45, -41, -1, -7, -5, -33, -26, -5, -6, -9, -122, -31, -76, -58, -40, -14, -217, -22, -24, -93, -65, -21, -3, -152, -21, -12, -3, -34, -21, -3, -16, -104, -106, -70, -74, -60, -220, -9, -8, -25, -15, -17, -10, -55, -4, -47, -5, -5, -37, -15, -19, -8, -82, -6, -3, -46, -93, -114, -10, -45, -198, -50, -3, -10, -27, -79, -31, -7, -47, -56, -32, -153, -34, -23, -117, -6, -4, -84, -44, -140, -36, -5, -4, -106, -124, -7, -25, -25, -36, -4, -18, -36, -191, -63, -18, -18, -32, -57, -30, -8, -56, -113, -16, -17, -116, -10, -4, -6, -86, -30, -72, -34, -62, -53, -15, -84, -11, -12, -24, -189, -87, -13, -86, -5, -15, -65, -15, -11, -96, -29, -78, -6, -15, -8, -151, -16, -12, -28, -61, -68, -28, -38, -57, -3, -29, -226, -12, -22, -41, -28, -17, -13, -7, -67, -19, -48, -64, -20, -50, -21, -52, -179, -39, -86, -113, -46, -44, -5, -67, -179, -4, -95, -68, -23, -124, -49, -8, -48, -3, -16, -15, -8, -115, -89, -71, -133, -119, -194, -227, -15, -119, -8, -83, -48, -24, -24, -91, -5, -7, -13, -73, -30, -109, -9, -14, -11, -63, -8, -22, -242, -28, -38, -88, -14, -31, -18, -38, -60, -23, -141, -23, -51, -112, -3, -42, -8, -23, -2, -100, -5, -181, -197, -6, -1, -9, -110, -125, -4, -70, -2, -36, -13, -5, -53, -105, -57, -48, -13, -11, -77, -4, -20, -36, -4, -8, -59, -9, -2, -12, -1, -82, -74, -2, -169, -77, -45, -7, -71, -93, -65, -91, -96, -3, -26, -7, -5, -128, -8, -8, -17, -27, -11, -2, -69, -191, -26, -183, -62, -131, -89, -9, -7, -28, -75, -40, -3, -13, -180, -16, -7, -21, -6, -26, -25, -102, -5, -16, -2, -63, -14, -40, -105, -6, -19, -82, -50, -23, -5, -11, -186, -61, -14, -30, -356, -25, -76, -21, -4, -115, -168, -16, -270, -48, -30, -6, -40, -44, -40, -4, -121, -140, -24, -69, -91, -111, -3, -17, -129, -23, -14, -5, -2, -76, -19, -92, -92, -41, -5, -19, -7, -145, -55, -11, -10, -17, -6, -118, -63, -14, -27, -19, -62, -32, -24, -11, -61, -123, -5, -29, -170, -63, -141, -47, -104, -74, -99, -45, -2, -113, -9, -151, -33, -42, -42, -13, -20, -70, -14, -4, -20, -46, -59, -11, -204, -29, -6, -48, -47, -5, -11, -8, -97, -21, -74, -36, -25, -31, -56, -24, -94, -41, -16, -74, -70, -32, -9, -9, -123, -59, -12, -47, -22, -116, -11, -23, -56, -1, -6, -7, -5, -78, -5, -72, -24, -44, -84, -23, -81, -42, -26, -61, -69, -17, -28, -18, -22, -6, -17, -53, -19, -44, -79, -56, -56, -6, -5, -10, -3, -37, -25, -9, -6, -148, -56, -192, -22, -191, -64, -54, -3, -16, -20, -45, -29, -16, -28, -71, -58, -8, -34, -129, -204, -36, -49, -20, -29, -29, -39, -11, -48, -55, -8, -13, -103, -16, -23, -1, -198, -20, -122, -29, -6, -39, -8, -6, -22, -54, -38, -50, -8, -4, -81, -9, -12, -48, -16, -3, -1, -315, -6, -41, -18, -39, -49, -25, -8, -19, -5, -4, -176, -169, -61, -63, -7, -42, -45, -37, -128, -75, -21, -1, -88, -27, -79, -66, -6, -12, -6, -17, -114, -50, -5, -36, -8, -189, -63, -12, -4, -68, -59, -35, -73, -4, -13, -14, -72, -18, -8, -8, -39, -12, -7, -34, -9, -45, -6, -53, -51, -94, -113, -84, -52, -17, -45, -10, -3, -36, -6, -64, -14, -68, -44, -5, -18, -34, -187, -27, -76, -26, -39, -1, -67, -234, -98, -12, -55, -1, -6, -65, -18, -104, -35, -33, -33, -5, -5, -43, -48, -74, -49, -122, -23, -26, -4, -30, -9, -29, -56, -8, -37, -4, -36, -20, -29, -20, -34, -58, -60, -20, -30, -32, -17, -8, -31, -30, -40, -161, -4, -11, -68, -38, -29, -1, -66, -83, -7, -85, -6, -102, -12, -7, -52, -44, -6, -18, -12, -7, -32, -38, -11, -201, -4, -34, -232, -3, -20, -8, -160, -14, -5, -18, -18, -1, -9, -6, -7, -24, -53, -87, -26, -48, -3, -34, -70, -6, -31, -2, -6, -63, -19, -17, -17, -64, -33, -2, -50, -106, -50, -28, -8, -8, -33, -120, -28, -45, -92, -166, -2, -225, -34, -9, -8, -51, -44, -162, -6, -13, -74, -29, -149, -36, -162, -198, -7, -106, -1, -55, -27, -5, -10, -139, -8, -14, -18, -7, -131, -40, -53, -45, -107, -67, -57, -43, -54, -24, -43, -50, -1, -87, -3, -6, -59, -66, -76, -11, -45, -12, -252, -52, -99, -103, -100, -13, -100, -206, -64, -19, -95, -74, -54, -54, -32, 0, -6, -16, -6, -5, -43, -10, -72, -232, -34, -53, -7, -100, -68, -53, -38, -15, -74, -19, -57, -48, -50, -25, -56, -15, -22, -23, -20, -19, -22, -64, -26, -198, -120, -26, -49, -183, -26, -29, -52, -127, -49, -29, -9, -27, -17, -162, -202, -14, -128, -8, -327, -6, -19, -9, -19, -78, -5, -5, -6, -64, -6, -26, -45, -36, -8, -18, -32, -20, -65, -65, -16, -37, -253, -7, -17, -98, -38, -32, -52, -60, -198, -24, -7, -72, -92, -31, -41, -127, -24, -6, -36, -7, -129, -74, -12, -14, -88, -83, -59, -4, -4, -51, -20, -106, -54, -5, -21, -92, -69, -57, -75, -62, -19, -75, -6, -21, -4, -50, -15, -11, -9, -31, -30, -53, -70, -90, -62, -13, -59, -16, -19, -56, -14, -27, -64, -26, -4, -19, -16, -80, -58, -69, -377, -236, -17, -5, -55, -172, -59, -25, -16, -36, -62, -55, -30, -16, -28, -40, -66, -24, -42, -60, -28, -118, -61, -34, -23, -8, -33, -177, -21, -61, -15, -28, -5, -40, -17, -61, -4, -33, -8, -41, -43, -52, -4, -81, -116, -9, -60, -12, -22, -42, -3, -7, -3, -20, -20, -28, -23, -22, -64, -16, -6, -45, -110, -146, -47, -73, -38, -6, -10, -69, -6, -31, -2, -3, -150, -55, -7, -32, -51, -4, -79, -12, -72, -10, -45, -87, -73, -9, -14, -9, -46, -58, -98, -59, -25, -69, -19, -41, -37, -73, -40, -6, -20, -130, -27, -12, -86, -8, -59, -3, -36, -4, -94, -84, -23, -16, -43, -180, -201, -16, -65, -49, -35, -8, -127, -13, -110, -22, -25, -11, -19, -12, -59, -26, -78, -6, -3, -3, -31, -164, -163, -62, -48, -4, -25, -29, -22, -39, -39, -52, -16, -47, -104, -134, -87, -53, -41, -3, -171, -44, -5, -18, -57, -9, -2, -26, -77, -46, -84, -118, -28, -118, -26, -6, -104, -152, -120, -34, -9, -98, -114, -11, -8, -20, -52, -3, -152, -3, -38, -35, -34, -3, -4, -12, -58, -37, -2, -14, -21, -12, -5, -26, -95, -32, -7, -43, -199, -13, -59, -62, 0, -22, -31, -112, -26, -6, -5, -69, -35, -7, -52, -70, -36, -24, -91, -37, -8, -5, -8, -34, -47, -15, -21, -62, -4, -18, -87, -17, -4, -4, -10, -16, -23, -30, -23, -14, -8, -15, -58, -131, -10, -12, -29, -108, -56, -3, -11, -128, -3, -20, -35, -68, -30, -10, -74, -138, -93, -61, -28, -91, -20, -28, -35, -34, -7, -224, -80, -150, -8, -8, -186, -15, -138, -19, -33, -12, -23, -25, -5, -33, -3, -35, -28, -59, -10, -6, -35, -24, -45, -65, -38, -123, -48, -27, -91, -22, -36, -6, -39, -131, -86, -33, -33, -116, -5, -75, -63, -20, -11, -6, -40, -6, -49, -13, -83, -34, -105, -30, -4, -102, -26, -52, -7, -47, -91, -44, -18, -29, -36, -89, -56, -23, -75, -47, -42, -11, -2, -135, -109, -16, -68, -80, -80, -135, -61, -6, -67, -74, -12, -53, -65, -107, -145, -19, -22, -51, -19, -40, -46, -15, -12, -19, -35, -17, -70, -12, -150, -90, -41, -54, -67, -22, -102, -66, -164, -47, -29, -30, -10, -15, -60, -60, -35, -6, -22, -54, -64, -21, -138, -52, -9, -18, -15, -72, -33, -83, -62, -62, -28, -62, -50, -70, -34, -73, -198, -8, -69, -138, -99, -80, -23, -77, 0, -1, -4, -45, -87, -89, -48, -55, -323, -39, -59, -60, -22, -13, -11, -3, -24, -61, -71, -22, -46, -52, -42, -6, -32, -134, -6, -8, -9, -12, -74, -4, -87, -16, -44, -11, -14, -5, -46, -11, -138, -82, -47, -33, -17, -7, -30, -15, -16, -23, -125, -24, -16, -76, -7, -8, -6, -1, -250, -44, -88, -125, -52, -91, -1, -207, -37, -10, -70, -18, -43, -53, -16, -15, -121, -7, -27, -28, -4, -84, -155, -6, -26, -2, -77, -166, -78, -15, -11, -3, -159, -148, -22, -93, -34, -67, -145, -6, -105, -9, -68, -244, -65, -21, -58, -8, -8, -20, -18, -17, -302, -84, -66, -9, -24, -82, -69, -8, -184, -88, -15, -15, -86, -31, -33, -32, -90, -20, -57, -297, -110, -14, -1, -8, -16, -55, -128, -134, -9, -3, -64, -23, -40, -125, -4, -6, -12, -45, -4, -61, -4, -169, -69, -12, -50, -31, -89, -285, -131, -100, -21, -82, -112, -170, -20, -86, -207, -51, -5, -90, -21, -54, -5, -146, -2, -15, -24, -12, -52, -16, -148, -106, -46, -70, -97, -29, -58, -7, -20, -138, -53, -316, -1, 0, -4, -30, -124, -102, -61, -5, -131, -113, -85, -30, -20, -11, -44, -33, 0, -32, -56, -42, -93, -9, -24, -31, -76, -128, -10, -158, -51, -4, -37, -12, -32, -17, -88, -1, -25, -11, -109, -68, -158, -72, -151, -30, -7, -62, -121, -91, -16, -14, -32, -26, -1, -41, -51, -30, -40, -22, -95, -14, -5, -57, -6, -144, -9, -133, -52, -13, -19, -1, -76, -46, -93, -39, -12, -10, -18, -19, -115, -83, -68, -95, -1, -10, -36, -104, -50, -1, -1, -14, -70, -1, -9, -167, -6, -58, -56, -14, -22, -22, 0, -51, -82, -102, -94, -75, -12, -143, -137, -12, -41, -10, -80, -109, -1, -44, -5, -78, -81, -52, -14, -13, -44, -61, -29, -63, -30, -83, -19, -83, -11, -1, 0, -8, -11, -171, -22, -12, -16, -166, -29, -88, -94, -69, -46, -10, -11, -8, -7, -36, -1, -19, -36, -34, -63, -4, -228, -122, -93, -13, -74, -2, -33, -37, -95, -41, -31, -35, -12, -19, -39, -77, -62, -66, -19, -33, -26, -51, -25, -143, -111, -167, -47, -32, -169, -81, -2, -43, -20, -5, -143, -15, -22, -90, -83, -251, -15, -5, -4, -89, -106, -20, 0, -45, -7, -83, -32, -76, -70, -34, -8, -42, -41, -43, -13, -40, -69, -2, -13, -45, -16, -11, -20, -105, -24, -26, -20, 0, -31, -112, -12, -34, -2, -36, -15, -63, -47, -25, -41, -29, -68, -6, -104, -1, -32, -30, -15, -153, -37, -29, -88, -10, -15, -2, -16, -20, -31, -305, -53, -16, -128, -167, -161, -9, -123, -16, -5, -37, -25, -59, -124, -180, -63, -42, 0, -28, -1, -38, -14, -24, -81, -41, -35, -20, -47, -38, -43, -45, -20, -1, -61, -47, -32, -53, -11, -17, -79, -31, -93, -33, -7, -58, 0, -15, -288, -69, -2, -67, -102, -98, -49, -69, -57, -16, -95, -10, 0, -14, -5, -18, -12, -344, -20, -107, -32, -39, -12, -90, -22, -10, -20, -110, -15, -3, -81, -134, -24, -13, -165, -41, -26, -6, -22, -169, -47, -14, -53, 0, -44, -47, -38, -7, -82, -57, -5, -13, -10, -29, -110, -31, -230, -3, -2, -53, -70, -134, -6, -13, -26, -25, -15, -76, -3, -26, -39, -66, -104, -19, -106, -112, -87, -25, -76, -117, -53, -73, -4, -35, -106, -12, -35, -37, -91, -52, -29, -28, -101, -58, -84, -28, -79, -44, -3, -12, -39, -151, -9, -85, -16, 0, -25, -8, -7, -168, -84, -16, -86, -138, -8, -28, -36, -168, -85, -57, -3, -39, -14, -153, -87, -147, -78, -12, -39, -176, -7, -17, -101, -117, -47, -15, -82, -73, -8, -33, -25, -87, -52, -136, -207, -11, -58, -89, -25, -51, -96, -73, -62, -13, -109, -122, -2, -50, -4, -67, -41, -2, -38, -11, -171, -19, -15, -38, -72, -16, -21, -25, -5, -64, -19, -189, -111, -29, -42, -126, -15, -13, -24, -15, -151, -131, -6, -91, -26, -82, -12, -64, -13, -8, -44, -97, -31, -95, -18, -14, -29, -30, -20, -11, -225, -13, -98, -66, -96, -116, -43, -38, -200, -13, 0, -133, -116, -16, -38, -25, -39, -51, -75, -115, -79, -62, -8, -2, -13, -81, -5, -43, -223, -98, -11, -2, -14, -47, -15, -65, -15, -67, -66, -91, -12, -18, -62, -26, -30, -28, -13, -1, -1, -30, -153, -42, -50, -76, -19, -52, -13, -13, -32, -86, -68, -86, -127, -2, -87, -77, -7, -15, -4, -42, -18, -17, -47, -21, -65, -169, -2, -8, -36, 0, -54, -21, -43, -25, -54, -77, -3, -36, -2, -45, -20, -23, -50, -54, -230, -17, -106, -74, -10, -15, -2, -73, -27, -8, -48, -36, -84, -181, -47, -48, -69, -41, -103, -59, -15, -16, -64, -64, -19, -34, -41, -237, -87, -58, -214, -119, -13, -46, -25, -39, -57, -48, -51, -103, -12, -103, -57, -58, -64, -26, -31, -72, -19, -97, -2, -114, -52, -85, -159, -12, -70, -7, -43, -54, -10, -20, -31, -11, -94, -20, -46, -88, -36, -47, -9, -128, -8, 0, -53, -34, -18, -17, -165, 0, -71, -14, -35, -7, -1, -2, -17, -5, -20, -45, -18, -9, -85, -420, -1, -101, -4, -79, 0, -31, -75, -90, -98, -83, -8, -32, -80, -56, -8, -10, -2, -26, -9, -138, -2, -32, -64, -160, -29, -61, -376, -85, -12, -44, -34, 0, -13, -7, -28, -34, -18, -86, -192, -145, -51, -36, -91, -169, -39, -1, -79, -222, -50, -31, -21, -131, -143, -39, -250, -20, -71, -43, -5, -63, -80, -63, -238, -36, -97, -19, -113, -4, -5, -33, -26, 0, -180, -21, -3, -249, -31, -37, -17, -26, 0, -148, -1, -39, -20, -16, -48, -88, -91, -53, -19, 0, -126, -48, -89, -91, -39, -85, -9, -8, -59, -26, -173, -45, -54, 0, -6, -86, -15, -17, -111, -51, -88, -178, -1, -72, -17, -11, -48, 0, 0, -19, -34, -18, -56, -14, -9, -38, -81, -64, -23, -111, -116, -40, -42, -64, -8, -14, -70, -47, -8, -35, -5, -60, -59, -52, -27, -6, -14, -2, -8, -67, -45, -150, -234, -66, -142, 0, -23, -150, -9, -31, -13, -118, -116, -87, -58, -42, -99, -24, -6, -17, -41, -191, -282, -69, -179, 0, -27, -84, -20, -76, -30, -146, -34, -34, -3, 0, -176, -44, -6, -121, -38, -8, -27, 0, -21, -15, 0, -60, -79, -22, -17, -154, -43, -104, -12, -50, -29, -4, -10, -73, -79, -41, -4, -32, -120, -48, -5, -38, -19, -31, 0, -4, -120, 0, -145, -118, -12, -28, -1, -34, -335, -12, -39, -23, -97, -55, -36, -20, -7, -74, -5, -48, -259, -39, -16, -17, -2, -27, -118, -61, -35, -142, -9, -2, -103, -56, -42, -26, -49, -28, -112, -14, -104, -46, -67, -28, -81, -3, -1, -21, -7, -185, -2, -33, -216, -28, -1, -19, -18, -285, -61, -17, -37, -25, -7, -1, -22, -57, -60, -18, -88, -20, -102, -35, -90, -55, -32, -13, -155, -11, -32, -26, -206, -45, -18, -45, -62, -96, -54, -152, -61, -47, -74, -34, -21, -12, -112, -18, -6, -61, -168, -5, -23, -62, -13, -60, -33, -46, -8, -54, -155, -4, -10, -76, -76, -64, -37, -67, -152, -29, -49, -65, -128, -122, -37, -62, -49, -34, -20, -15, -19, -61, -52, -46, -12, -52, -62, -27, -118, -15, -28, -79, -46, -26, -42, -13, -287, -25, -49, -29, -28, -91, -55, -116, -102, -5, -10, -257, -174, -38, -20, -75, -24, -55, -187, -33, -54, -81, -25, -57, -14, -12, -7, -35, -15, -12, -115, -38, -11, -5, -56, -81, -47, -41, -85, -71, -38, -107, -134, -66, -34, -30, -1, -35, -16, -26, -7, -43, -71, -27, -42, -5, -110, -32, -86, -14, -26, -151, -92, -65, -31, -39, -77, -6, -49, -19, -50, -15, -171, -211, -6, -92, -176, -29, -26, -78, -89, -32, -56, -19, -83, -1, -61, -11, -44, -134, -155, -129, -6, -23, -3, -81, -177, -151, -40, -21, -35, -21, -90, -30, -56, -57, -19, -152, -35, -78, -33, -33, -52, -16, -99, -10, -19, -42, -266, -12, -2, -78, -36, -280, -23, -117, -48, -4, -58, -148, -95, -17, -19, -5, -230, -115, -4, -35, -42, -32, -16, -46, -35, -33, -25, -53, -34, -93, -77, -33, -42, -28, -127, -67, -33, -38, -149, -29, -53, -12, -36, -7, -15, -127, -42, -35, -92, -59, -130, -75, -2, -21, -25, -118, -88, -63, -7, -250, -68, -94, -76, -29, -12, -15, -95, -4, -14, -27, -72, -39, -62, -30, -4, -50, -495, -93, -19, -32, -47, -197, -8, -10, -51, -105, -18, -26, -54, -136, -203, -23, -29, -104, -67, -168, -41, -49, -18, -11, -97, -154, -52, -9, -149, -68, -47, -211, -53, -78, -38, -77, -47, -10, -50, -19, -23, -124, -49, -36, -76, -18, -86, -14, -130, -48, -34, -126, -104, -38, -13, -8, -19, -18, -110, -8, -129, -44, -24, -69, -42, -360, -22, -25, -174, -34, -109, -36, -40, -30, -84, -33, -113, -81, -10, -32, -47, -71, -82, -29, -44, -78, -184, -7, -30, -47, -68, -40, -17, -65, -162, -56, -85, -73, -35, -35, -77, -50, -22, -254, -78, -66, -10, -44, -1, -27, -13, -24, -6, -62, -81, -92, -22, -142, -41, -164, -2, -136, -122, -37, -71, -41, -18, -205, -120, -43, -85, -40, -53, -17, -10, -41, -39, -32, -158, -5, -45, -49, -38, -15, -19, -70, -3, -68, -103, -69, -31, -206, -32, -31, -43, -12, -15, -42, -49, -219, -53, -8, -148, -58, -13, -37, -48, -9, -88, -97, -17, -23, -24, -48, -2, -125, -242, -39, -79, -31, -37, -112, -10, -61, -146, -273, -55, -9, -89, -7, -30, -79, -102, -9, -3, -2, -50, -86, -110, -72, -20, -144, -17, -199, -75, -125, -52, -32, -21, -140, -41, -83, -15, -16, -53, -9, -43, -62, -34, -21, -53, -34, -39, -176, -74, -62, -77, -11, -71, -211, -21, -15, -5, -18, -21, -61, -48, -16, -134, -8, -52, -97, -170, -17, -11, -13, -2, -75, -76, -90, -74, -7, -38, -29, -4, -27, -19, -36, -80, -21, -12, -8, -42, -54, -74, -91, -20, -30, -36, -51, -88, -38, -23, -101, -61, -68, -61, -160, -21, -39, -55, -228, -17, -6, -38, -16, -88, -12, -13, -7, -96, -69, -38, -54, -30, -251, -62, -243, -22, -102, -94, -23, -25, -120, -17, -127, -6, -47, -73, -71, -61, -120, -19, -84, -21, -116, -71, -56, -73, -22, -1, -21, -62, -43, -18, -31, -7, -42, -137, -18, -6, -27, -2, -20, -185, -103, -11, -29, -12, -50, -50, -47, -30, -163, -96, -66, -82, -31, -26, -47, -43, -64, -88, -40, -43, -70, -23, -12, -96, -50, -22, -102, -33, -52, -22, -52, -26, -19, -10, -41, -70, -35, -39, -37, -151, -20, -24, -13, -37, -91, -84, -2, -43, -25, -31, -24, -19, -53, -24, -90, 0, -4, -42, -59, -7, -38, -18, -16, -10, -191, -69, -42, -34, -42, -72, -63, -14, -33, -15, -72, -144, -87, -6, -135, -56, -22, -204, -34, -55, -53, -18, -28, -39, -40, -9, -20, -43, -61, -19, -49, -35, -103, -40, -4, -64, -97, -87, -13, -98, -28, -15, -28, -88, -128, -74, -67, -4, -17, -49, -70, -32, -73, -95, -49, -45, -40, -78, -39, -46, -16, -26, -103, -95, -30, -26, -19, -55, -25, -15, -10, -36, -239, -37, -15, -67, -129, -37, -179, -53, -9, -84, -135, -32, -29, -58, -33, -88, -102, -19, -38, -106, -25, -45, -87, -54, -1, -13, -33, -24, -68, -108, -72, -36, -13, -23, -10, -12, -77, -88, -14, -46, -29, -30, -8, -36, -14, -9, -24, -33, -66, -56, -4, -43, -25, -116, -93, -60, -2, -67, -18, -52, -77, -10, -6, -28, -17, -49, -70, -18, -124, -101, -38, -43, -11, -33, -101, -205, -116, -245, -140, -58, -47, -127, -26, -103, -4, -9, -85, -7, -26, -28, -63, -91, -121, -29, -21, -14, -40, -13, -48, -8, -24, -24, -40, -179, -108, -4, -6, -144, -18, -18, -58, -5, -26, -65, -117, -24, -3, -4, -47, -38, -64, -12, -92, -84, -81, -3, -46, -148, -67, -40, -37, -69, -125, -12, -33, -69, -61, -55, -10, -13, -147, -87, -65, -54, -90, -41, -1, -46, -85, -43, -129, -34, -17, -199, -31, -27, -17, -281, -44, -11, -100, -12, -10, -78, -26, -74, -43, -116, -35, -49, -8, -78, -40, -21, -134, -21, -12, -143, -73, -69, -124, -56, -137, -91, -10, -29, -21, -21, -42, -109, -81, -11, -18, -15, -48, -204, -112, -32, -54, -38, -24, -92, -19, -23, -93, -60, -37, -76, -92, -27, -264, -76, -46, -3, -29, -130, -201, -106, -25, -74, -32, -25, -23, -72, -16, -81, -5, -3, -39, -12, -12, -69, -11, -23, -17, -28, -155, -4, -10, -29, -113, -55, -37, -14, -13, -50, -82, -249, -45, -2, -129, -61, -29, -100, -6, -23, -62, -21, -45, -36, -24, -29, -127, -49, -66, -23, -42, -12, -96, -44, -37, -19, -92, -20, -20, -60, -44, -43, -24, -68, -100, -43, -6, -9, -16, -89, -28, -131, -201, -1, -186, -131, -17, -43, -217, -20, -59, -215, -16, -88, -52, -57, -35, -21, -30, -13, -75, -65, -83, -7, -102, -53, -10, -6, -70, -102, -115, -44, -72, -35, -87, -33, -81, -35, -12, -85, -45, -18, -35, -106, -34, -142, -19, -2, -3, -13, -21, -5, -139, -53, -27, -49, -57, -27, -37, -38, -4, -59, -43, -15, -42, -21, -58, -110, -52, -8, -135, -103, -4, -190, -158, -52, -65, -15, -16, -46, -147, -205, -25, -15, -18, -30, -176, -49, -49, -7, -204, -7, -30, -23, -64, -42, -35, -44, -25, -7, -133, -30, -49, -86, -59, -15, -6, -24, -253, -51, -71, -169, -37, -61, -284, -4, -73, -247, -91, -48, -187, -45, -36, -9, -95, -81, -4, -42, -22, -49, -86, -138, -37, -12, -106, -30, -24, -32, -41, -29, -4, -18, -17, -81, -168, -2, -35, -155, -29, -13, -26, -63, -32, -32, -38, -23, -12, -17, -122, -101, -73, -247, -27, -186, -136, -68, -7, -44, -111, -6, -77, -67, -34, -27, -97, -37, -37, -4, -59, -95, -5, -45, -31, -31, -72, -34, -79, -84, -234, -15, -68, -96, -5, -38, -72, -121, -4, -122, -42, -65, -18, -27, -82, -36, -90, -15, -16, -71, -38, -32, -11, -72, -46, -7, -313, -73, -4, -14, -80, -14, -10, -93, -30, -72, -72, -31, -22, -72, -81, -127, -185, -57, -43, -42, -5, -26, -6, -29, -28, -35, -140, -14, -50, -4, -6, -90, -24, -125, -20, -53, -127, -67, -8, -15, -113, -21, -8, -32, -53, -119, -42, -45, -131, -48, -140, -45, -65, -12, -170, -43, -174, -34, -62, -21, -4, -119, -23, -1, -28, -72, -97, -93, -86, -19, -10, -14, -75, -5, -17, -83, -13, -16, -136, -94, -22, -80, -16, -3, -94, -125, -68, -44, -232, -91, -155, -156, -74, -58, -150, -82, -25, -11, -10, -118, -94, -43, -111, -52, -17, -46, -18, -21, -29, -53, -55, -45, -7, -70, -25, -3, -6, -59, -153, -82, -111, -61, -69, -40, -69, -24, -3, -55, -90, -141, -17, -127, -19, -6, -9, -53, -30, -8, -28, -107, -10, -19, -6, -68, -117, -33, -16, -56, -94, -73, -6, -110, -13, -29, -135, -5, -5, -13, -20, -57, -16, -136, -36, -136, -26, -44, -164, -60, -40, -25, -34, -59, -104, -75, -17, -28, -29, -45, -112, -8, -24, -54, -9, -56, -37, -9, -112, -85, -117, -27, -8, -68, -94, -44, -53, -37, -7, -125, -37, -29, -11, -18, -83, -26, -40, -15, -16, -29, -130, -104, -87, -58, -161, -56, -50, -121, -24, -61, -9, -19, -126, -86, -14, -12, -138, -40, -158, -55, -36, -88, -9, -105, -27, -30, -87, -414, -106, -3, -4, -77, -5, -20, -37, -27, -43, -63, -13, -46, -85, -126, -4, -25, -15, -97, -62, -116, -37, -23, -7, -61, -38, -235, -26, -56, -23, -16, -21, -240, -24, -23, -5, -158, -26, -31, -36, -34, -13, -145, -136, -7, -25, -98, -10, -12, -150, -26, -30, -22, -14, -15, -27, -64, -66, -131, -24, -23, -74, -25, -19, -14, -26, -24, -121, -122, -15, -19, -49, -47, -22, -200, -4, -10, -131, -23, -94, -51, -19, -25, -116, -40, -4, -99, -57, -35, -23, -19, -4, -35, -55, -13, -70, -193, -10, -71, -125, -86, -33, -17, -50, -10, -71, -17, -24, -214, -114, -139, -8, -24, -60, -34, -56, -58, -22, -194, -12, -66, -38, -105, -62, -197, -101, -151, -129, -5, -25, -111, -29, -25, -135, -93, -28, -107, -46, -152, -10, -53, -68, -12, -5, -16, -44, -14, -4, -92, -98, -135, -28, -111, -110, -121, -3, -132, -82, -21, -13, -13, -26, -146, -34, -82, -57, -97, -115, -135, -50, -173, -16, -4, -125, -121, -2, -45, -20, -58, -4, -55, -30, -49, -63, -49, -71, -60, -57, -25, -8, -58, -94, -14, -10, -42, -49, -99, -2, -61, -27, -22, -53, -185, -12, -4, -4, -65, -72, -42, -25, -71, -227, -4, -22, -53, -82, -63, -67, -33, -9, -84, -6, -48, -32, -10, -37, -146, -7, -52, -156, -86, -22, -45, -28, -5, -11, -74, -59, -26, -58, -43, -80, -26, -17, -36, -11, -206, -56, -115, -39, -240, -79, -62, -25, -61, -6, -62, -28, -24, -3, -82, -6, -43, -42, -14, -43, -25, -11, -107, -12, -62, -146, -58, -13, -178, -4, -61, -11, -34, -81, -79, -33, -139, -16, -112, -54, -2, -82, -8, -64, -24, -2, -10, -153, -50, -91, -102, -7, -26, -307, -43, -152, -283, -25, -117, -186, -28, -5, -141, 0, -5, -80, -42, -9, -11, -64, -91, -2, -3, -53, -67, -11, -100, -27, -7, -15, -17, -19, -54, -116, -6, -19, -78, -65, -5, -69, -105, -7, -18, -35, -19, -71, -8, -28, -8, -39, -77, -31, -72, -39, -24, -195, -35, -12, -3, -13, -60, -24, -75, -35, -22, -29, -40, -10, -121, -35, -7, -30, -59, -20, -98, -27, -43, -53, -5, -2, -127, -82, -124, -74, -12, -7, -148, -36, -22, -44, -17, -71, -24, -7, -5, -160, -118, -51, -5, -193, -332, -50, -3, -37, -34, -57, -17, -29, -236, -20, -2, -24, -25, -103, -16, -8, -65, -3, -135, -187, -231, -151, -10, -62, -44, -75, -39, -5, -53, -45, -87, -254, -29, -28, -28, -49, -66, -78, -27, -5, -59, -36, -5, -18, -24, -97, -3, -7, -51, -67, -31, -4, -19, -8, -5, -42, -40, -36, -29, -208, -6, -50, -51, -29, -100, -27, -18, -34, -47, -9, -9, -3, -47, -7, -50, -43, -87, -130, -38, -19, -10, -84, -58, -46, -93, -38, -8, -9, -100, -17, -11, -67, -83, -215, -28, -98, -34, -163, -39, -189, -60, -71, -215, -26, -254, -204, -2, -13, -29, -32, -65, -10, -70, -51, -33, -92, -78, -54, -10, -36, -184, -84, -21, -6, -63, -4, -40, -15, -14, -66, -190, -25, -104, -213, -2, -9, -16, -44, -6, -131, -31, -103, -82, -3, -8, -42, -169, -2, -41, -93, -13, -17, -19, -25, -106, 0, -15, -6, -107, -38, -84, -36, -5, -119, -37, -37, -34, -51, -20, -86, -8, -4, -51, -41, -79, -14, -117, -14, -43, -5, -10, -47, -157, -46, -136, -59, -20, -1, -5, -18, -121, -24, -17, -54, -51, -130, -77, -71, -22, -32, -32, -359, -76, -38, -16, -35, -65, -2, -119, -46, -164, -2, -76, -109, -58, -12, -18, -35, -29, -12, -18, -54, -36, -1, -62, -21, -6, -7, -74, -122, -59, -2, -14, -48, -36, -3, -20, -13, -35, -409, -80, -31, -5, -8, -161, -64, -2, -8, -91, -98, -45, -52, -200, -81, -60, -31, -122, -40, -21, -10, -47, -4, -26, -5, -47, -5, -17, -14, -93, -2, -6, -31, -87, -2, -13, -3, -37, -126, -6, -5, -60, -256, -75, -39, -59, -7, -66, -5, -5, -31, -2, -49, -24, -4, -64, -7, -64, -8, -236, -19, -74, -5, -30, -2, -30, -22, -58, -31, -103, -37, -90, -5, -3, -18, -5, -10, -43, -123, -4, -47, -29, -8, -80, -6, -68, -71, -14, -78, -45, -1, -7, -38, -45, -10, -39, -122, -174, -7, -31, -49, -61, -9, -81, -53, -16, -49, -9, -38, -18, -20, -128, -186, -120, -143, -56, -98, -137, -164, -1, -35, -48, -49, -54, -37, -27, -47, -52, -12, -50, -23, -73, -27, -89, -16, -122, -60, -11, -10, -3, -24, -46, -84, -34, -194, -1, -2, -45, -101, -129, -5, -1, -17, -52, -57, -16, -11, -22, -17, -83, -79, -114, -68, -41, -11, -99, -157, -61, -4, -5, -87, -7, -8, -11, -29, -5, -24, -31, -31, -39, -42, -9, -47, -14, -30, -9, -74, -3, -34, -4, -31, -9, -16, -5, -6, -99, -9, -6, -158, 0, -284, -7, -161, -51, -70, -6, -135, -207, -23, -20, -6, -19, -48, -7, -130, -41, -75, -8, -7, -17, -53, -33, -50, -46, -53, -15, -36, -127, -21, -37, -208, -32, -85, -21, -2, -144, -31, -18, -62, -7, -214, -13, -4, -3, -34, -21, -46, -24, -52, -3, -35, -48, -59, -7, -48, -25, -32, -14, -53, -8, -12, -43, -49, -89, -222, -125, -16, -48, -56, -17, -14, -10, -98, -21, -144, -14, -67, -23, -107, -5, -21, -67, -97, -5, -117, -54, -140, -72, -79, -150, -100, -37, -21, -82, -18, -42, -52, -25, -111, -5, -10, -5, -17, -8, -15, -27, -5, -28, -11, -87, -51, -16, -4, -36, -85, -23, -8, -46, -27, -68, -128, -115, -38, -3, -36, -66, -3, -65, -48, -47, -44, -41, -51, -3, -146, -41, -134, -48, -15, -129, -170, -76, -40, -72, -10, -36, -66, -95, -49, -5, -85, -28, -25, -40, -81, -93, -2, -12, -84, -4, -20, -58, -2, -69, -21, -47, -47, 0, -124, -60, -70, -13, -38, -6, -161, -24, -70, -7, -53, 0, -7, -12, -1, -107, -13, -38, -16, -5, -143, -93, -97, -45, -13, -26, -34, -24, -125, -75, -2, -16, -49, -6, -28, -40, -47, -4, -63, -176, -42, -74, -36, -48, -19, -12, -11, -4, -46, -7, -109, -14, -9, -6, -170, -60, -17, -9, -16, -40, -59, -5, -21, -69, -42, -28, -32, -71, -33, -9, -197, -11, -103, -161, -45, -4, -93, -66, -126, -4, -103, -8, -98, -5, -34, -84, -32, -29, -201, -41, -152, -57, -40, -134, -67, -1, -24, -52, -38, -18, -72, -24, -5, -4, -8, -28, -9, -6, -28, -106, -39, -29, -6, -66, -53, -54, -16, -28, -171, -83, -110, -86, -51, -219, -4, -80, -149, -38, -17, -34, -1, -4, -1, -9, -44, -182, -2, -65, -37, -22, -25, -96, -17, -365, -12, -62, -62, -87, -47, -5, -51, -36, -81, -69, -3, -3, -40, -16, -39, -30, -21, -13, -56, -58, -3, -59, -71, -21, -2, -80, -17, -148, -16, -24, -4, -92, -2, -6, -28, -57, -67, -99, -51, -49, -60, -39, -44, -223, -1, -100, -18, -454, -59, -97, -1, -5, -295, -53, -75, -78, -106, -28, -39, -82, -20, -68, -24, -102, -80, -63, -12, -17, -55, -77, -39, -87, -3, -19, -4, -82, -26, -97, -8, -53, -143, -53, -105, -3, -16, -1, -14, -49, -27, -61, -119, -51, -17, -73, -129, -18, -29, -17, -55, -3, -8, -36, -20, -9, -52, -167, -67, -62, -16, -1, -24, -28, -72, -16, -38, -20, -15, -85, -3, -55, -85, -61, -16, -75, -54, -11, -26, -56, -6, -27, -33, -7, -15, -5, -12, -18, -10, -106, -11, -166, -25, -13, -5, -29, -30, -47, -17, -55, -11, -42, -27, -78, -75, -98, -57, -173, -2, -33, -82, -38, -131, -36, -65, -92, -63, -42, -6, -65, -37, -131, -46, -4, -14, -16, -7, -63, -1, -61, -63, -9, -3, -2, -15, -27, -162, -16, -111, -103, -3, -78, -44, -126, -68, -62, -117, -17, -37, -241, -100, -21, -61, -77, -71, -90, -65, -18, -58, -64, -87, 0, -19, -10, -13, -10, -223, -43, -2, -63, -41, -26, -41, -13, -45, -9, -52, -38, -22, -14, -8, -68, -20, -70, -2, -63, -11, -59, -45, -11, -32, -3, -18, -97, -42, -34, -56, -30, -12, -183, -53, -86, -382, -114, -5, -2, -10, -66, 0, -5, -127, -20, -25, -30, -99, -27, -36, -8, -88, -6, -222, -18, -33, -192, -46, -14, -99, -164, -142, -13, -138, -92, -13, -16, -162, -182, -6, -85, -114, -14, -44, -1, -110, -33, -61, -57, -61, -54, -148, -20, -19, -35, -39, -138, -184, -116, -2, -205, -26, -65, -15, -60, -49, -16, -62, 0, -55, -108, -50, -27, -48, -46, -83, -7, -14, -10, -54, -3, -38, -69, -14, -11, -138, -94, -22, 0, -59, -41, -15, -83, -10, -2, -72, -80, -21, -62, -138, -30, -33, -93, -216, -19, -57, 0, -71, -172, -53, -6, -71, -92, -11, -75, -10, -77, -23, -4, -11, -1, -38, -115, -39, -62, -50, -10, -127, -5, -52, -17, -10, -26, -32, -62, -16, -121, -81, -27, -28, -137, -28, -153, -87, -80, -4, -29, -28, -9, -70, -115, -44, -112, -25, -30, -68, -81, -50, -19, -37, -11, -260, -147, -2, -126, -77, -2, -35, -71, -18, -23, -67, -165, -102, -3, -38, -1, -124, -15, -164, -63, -33, -17, -109, -26, -164, -58, -64, -80, -12, -28, -32, -1, -57, -28, -12, 0, -35, -5, -29, -20, -29, -218, -21, -115, -53, -2, -3, -21, -23, -94, -10, -51, -27, -2, -29, -13, -173, -108, -168, -73, -86, -72, -69, -45, -23, -22, -27, -80, -83, -93, -187, -46, -15, -12, -10, -36, -145, -52, -6, -12, -15, -80, -32, -35, -15, -67, -105, -18, -17, -14, -55, -17, -10, -6, -20, -1, -41, -2, -30, -21, -4, -74, -126, -43, -36, 0, -36, -178, -32, -2, -17, -72, -63, -40, -73, -64, -52, -1, -7, -87, -93, -84, -33, -198, -84, -25, -95, -18, -102, -36, -31, -6, -44, -33, -16, -12, -56, -31, -114, -210, -4, -66, -63, -2, -42, -1, -60, -66, -13, -18, -37, -114, -38, -80, -78, -62, -124, -46, -7, -25, -100, -26, -26, -113, -54, -16, -73, -2, -65, -8, -5, -33, -127, -33, -128, -81, -16, -46, -34, -21, -57, -75, -39, -15, -90, -20, -82, -154, -65, -97, -22, 0, -109, -85, -7, -60, -204, -14, -9, -78, -101, -40, -18, -2, -133, -51, -4, -25, -139, -58, -134, -150, -38, -92, -186, -13, -61, -4, -1, -71, -24, -94, -56, -44, -7, -21, -28, -5, -76, -134, -31, -44, -42, -1, -79, -47, -39, -2, -19, -140, -9, -12, -5, -3, -157, -6, -14, -2, -65, -2, -36, -3, -60, -37, -112, -71, -185, -2, -120, -25, -35, -106, -5, -30, -70, -8, -146, -25, -33, -1, -11, -53, -5, -17, -30, -70, -44, -62, -25, -26, -36, -16, -9, -122, -85, -19, -25, -4, -3, -107, -96, -15, -32, -6, -22, -11, -19, -46, -40, -12, -4, -4, -146, -24, -214, -18, -51, -54, -83, -17, -62, -43, -8, -3, -14, -52, -17, -25, -112, -20, -10, -88, -8, -1, -44, -53, -165, -55, -73, -70, -28, -14, -10, -206, -12, -25, -41, -59, -11, -72, -170, -114, -16, -23, -44, -13, -25, -34, -113, 0, -10, -19, -22, -128, -41, -106, -15, -21, 0, -91, -13, -1, -29, -266, -49, -21, -59, -66, -90, -47, -8, -230, -24, -3, -27, -11, 0, -3, -38, -6, -139, -33, -110, -64, -186, -19, -26, -26, -44, -134, -27, -71, -50, -38, -41, -44, -19, -9, -111, -17, -56, -104, -48, -22, -67, -9, -86, -66, -40, -1, -15, -101, -148, -112, -6, -156, -97, -15, -106, 0, -44, -8, -90, -44, -44, -45, -7, -3, -5, -4, -292, -128, -112, -14, -28, -98, -68, -6, -11, -73, -42, -1, -26, -39, -13, -23, -120, -56, -68, -9, -1, -51, -36, -2, -79, -28, -43, -74, -52, -26, -20, -8, -9, -12, -149, -60, -60, -67, -11, -8, -71, -62, -103, 0, -24, -59, -50, -10, 0, -228, -103, 0, -35, -17, -55, -35, -19, -60, -18, -97, -8, -33, -33, -14, -23, -50, -98, -7, -7, -129, -14, -87, -88, -18, -9, -74, -23, -17, -62, -125, -41, -147, -17, -52, -72, -19, -93, -44, -12, -9, -23, -104, -145, -50, -79, -16, -118, -84, -55, -229, -32, -106, -15, -66, -5, -89, -72, -174, -59, -73, -114, -348, -1, -64, -60, -38, -93, -3, -161, -4, -34, -60, -13, -3, -173, -77, -43, -12, -46, -42, -97, -3, -194, -6, -102, -87, -33, -50, -82, -65, -36, -5, -65, -2, -30, -2, -82, -23, -24, -34, -19, -129, -8, -43, -93, -8, -21, -21, -36, -26, -4, -110, -1, -9, -29, -13, -192, -3, -20, -29, -73, -3, -100, -2, -24, -10, -23, -2, -16, -2, -25, 0, -1, -47, -32, 0, -39, -31, -26, -1, -20, -33, -79, -4, -14, -5, -3, -73, -2, -2, -4, -3, -15, -38, -21, -58, -15, -70, -52, 0, -4, -8, -11, -3, -74, -27, -50, -61, -66, -75, -9, 0, -16, -134, -22, -1, -16, -58, -15, -137, -19, -47, -7, -5, -81, -12, -17, -64, -31, -101, -5, -31, -134, -63, -106, -1, -7, -137, -27, -1, -37, -3, -2, -5, -29, -13, 0, -19, -62, -32, -16, -5, -5, -2, -6, -14, -81, -62, -4, -1, -48, -19, -13, -39, -20, -44, -172, -3, -146, -155, -8, -3, -78, -15, -55, -9, -7, -11, -43, -87, -48, -33, -4, -203, -24, -6, -18, -5, -5, -23, -22, -72, -12, -117, -13, -20, -64, -41, -5, -153, 0, -6, -11, -6, -1, -1, -31, -25, -117, -16, -8, -4, -29, -62, -57, -11, -99, -4, -35, 0, -73, -65, -25, -147, -54, -14, -110, -76, -45, -50, -12, -24, -11, 0, -27, -20, -48, -22, -4, -28, -8, -70, -14, -7, -33, -28, -99, -37, -97, -12, -42, -4, -130, 0, -26, -39, 0, -18, -41, -23, -58, -26, -56, -24, -15, -11, -9, -15, -69, -76, -7, -4, -1, -5, -63, -8, -164, -1, -84, -6, -22, -1, -10, -14, -1, -53, -9, -1, 0, -70, -72, -30, -79, -1, 0, -6, -30, -27, -8, -20, -28, -17, -30, -105, -2, -21, -18, -2, -12, -71, -68, -42, -6, -95, -6, -12, -3, -99, -6, -55, -11, -38, -16, -7, -8, -7, -40, -122, -91, -72, -8, -76, -58, -9, -6, 0, -4, -33, -14, -22, -23, -1, -15, -269, -6, -86, -212, -125, -64, -121, -17, -3, -20, -51, -168, -51, 0, -15, -4, -54, -4, -21, -5, -29, -10, -12, -139, -77, -44, -37, -74, -17, -2, 0, -1, -86, -16, -148, -60, -3, -326, -11, -52, -76, -4, -1, -73, -40, -153, -29, -105, -26, -27, -7, -7, -4, -3, 0, -21, -20, 0, -23, -37, -18, -15, -1, -88, -55, -40, -28, -22, -5, -48, -79, -14, -7, -3, -20, -100, -4, -2, -8, -185, -69, -29, -40, -81, -8, -97, -93, -17, -123, -3, -116, -10, -9, -2, -4, -55, -142, -21, -83, -18, -14, -99, -4, -79, -101, -21, -42, -103, -20, -71, -6, -3, -10, -6, 0, -59, -26, -2, -16, 0, -35, 0, -133, -2, -69, -138, -18, -73, -124, -39, -27, -9, -94, -20, -192, -35, -13, -39, -6, -52, -39, -17, -4, -76, -8, 0, -24, -4, 0, -9, -217, -4, -85, -35, -12, -103, -13, -21, -45, -2, -106, -28, -7, -178, -15, -58, -14, -21, -42, -19, -18, -87, -30, -24, -16, -3, -23, -68, -18, -1, -2, 0, -116, -1, -275, -41, -58, -63, -57, -177, -153, -11, -59, -86, -3, -48, 0, -127, -225, -92, -17, -3, -2, -42, -1, -46, -18, -47, -11, -39, -104, -12, -37, -8, -29, -27, -57, -8, -18, -11, -57, -14, -12, -41, -88, -6, 0, 0, -3, -24, -3, -5, 0, -4, -15, 0, 0, -63, -43, -36, -69, -1, -78, -22, -1, -2, -10, -4, -49, -53, -13, -16, -33, -42, -9, -2, -64, -25, -16, -3, -70, -17, -11, -8, -38, -6, -94, -12, -67, -84, -3, -1, -13, -137, -26, -43, -95, -152, -152, -1, -5, -80, -7, -52, -64, -2, -114, -54, -70, 0, -4, 0, -18, -37, -12, -7, -27, -60, -52, -54, -52, -25, -59, -18, -116, -92, -137, -1, -13, -120, -43, -17, -42, -8, -3, -38, -22, -83, -38, -4, -31, 0, -1, -16, -29, -43, -109, -164, -62, -127, -97, -3, -15, -104, 0, -6, -15, -2, -2, -27, -1, -5, -26, -116, -1, -42, -124, -6, -78, -33, -30, -160, -20, -31, -33, -41, -2, -108, -7, -4, -65, -77, -18, -23, -90, -16, -19, -103, -5, -5, -18, -2, -1, -47, -33, -19, -14, -8, -20, -26, -160, -4, -3, -64, -67, -1, -14, -7, -6, -30, -24, -49, 0, -3, -12, -10, -6, -27, -13, -218, -91, -4, -6, -15, -22, -90, -117, -13, -21, -1, -17, -7, -141, -3, -2, -17, -27, -124, -34, -31, -25, -15, -2, -13, -43, -66, -46, -9, -77, -11, -18, -45, -17, -32, -110, -2, -12, -135, -2, -27, -13, -137, -216, -67, -4, -129, -2, -76, -47, -32, 0, -15, -71, -12, -49, -36, -6, -19, -105, -112, -351, -109, -6, -1, -31, -12, -2, -42, -87, -10, -98, 0, -58, -60, -8, -54, 0, -10, -46, 0, -26, -30, -18, -37, -1, -14, -2, -58, -103, -27, -14, -72, -46, -74, -13, -92, -16, -3, -72, -1, -67, -50, -96, -2, -7, -190, -5, -9, -54, -66, -5, -47, -119, -42, -11, -72, -72, -19, -2, -46, -65, -1, -5, -48, -63, -145, -50, -62, -48, -36, -5, -122, -166, -23, -38, -4, -78, -42, -23, -24, -77, -13, -11, -5, -20, 0, -10, -17, -160, -4, -23, -3, -5, -23, -149, -4, -45, -82, -55, -4, -1, -16, -8, -17, -81, -32, -55, -7, -1, -1, -4, -121, -109, -56, -55, -32, -134, -5, -79, -53, -20, -26, -12, -13, -3, -6, -19, -2, -70, -48, -40, -141, -3, -123, -87, -127, -5, -35, -34, -1, 0, 0, -16, -69, -18, -48, -48, -2, -29, -3, -11, -12, -2, -79, -13, -61, -5, -8, -113, -13, -52, -3, -27, -8, 0, -175, -63, -118, -30, -10, -4, -8, -49, -59, -1, -10, -9, -54, -11, -77, -33, -3, 0, -8, -28, -2, -28, -11, -45, -36, -42, -33, -15, -48, -2, -7, -1, -71, -1, -6, -1, -18, -82, -12, -4, -6, -178, -38, 0, -43, -51, -5, -4, -1, -2, -62, -17, -12, -1, -9, -24, -120, -20, -15, -25, -6, -1, -2, -1, -14, 0, -80, -31, -98, -1, -54, -4, -2, -3, -20, -6, -1, 0, -3, -2, 0, -5, -1, -1, -26, -4, 0, -136, -68, 0, -2, 0, -66, 0, 0, -29, -2, 0, -5, 0, -3, -6, 0, -119, -3, -108, -5, 0, 0, -4, -82, 0, 0, -54, -8, -29, -37, -78, -24, -19, -2, -9, -91, 0, -19, -33, -48, -2, -5, -5, -6, -1, 0, -104, -26, 0, 0, -9, -32, -2, -1, -4, -66, -68, 0, -4, -7, 0, -2, -3, -4, -92, 0, -2, -74, -130, -1, -29, -9, -158, 0, -179, -12, -2, -4, -34, 0, -49, -2, -4, -52, 0, 0, -2, -8, -1, -35, -6, -1, -2, -32, -3, -6, -26, -58, -10, -87, -4, -32, -3, -8, 0, -11, -1, -6, -185, -27, -91, -2, 0, -25, -86, -48, -49, 0, -1, -18, 0, -2, -1, -20, -3, -4, -206, -9, -1, -19, -3, -31, 0, 0, -23, -33, 0, -66, -48, -99, -2, -114, -102, -39, -130, -313, -3, -149, -1, -135, -1, -6, 0, -6, -120, -1, -17, 0, -6, -24, -74, -3, -4, -36, 0, 0, -68, -48, 0, -8, -39, -185, -3, -1, -3, -6, 0, -1, -3, -1, 0, 0, -45, -10, -93, -22, -5, -2, 0, -47, -21, -23, -36, -1, -2, -7, -1, -87, 0, -1, -76, -76, 0, -1, -1, -57, -14, -9, -58, 0, -5, -47, 0, -210, -1, -34, -34, 0, -10, 0, -12, -1, -1, -149, -6, 0, -57, -101, -23, -80, -9, -10, -117, -34, -211, -181, 0, -44, -9, -1, -1, -14, -3, -21, -6, -102, -3, -1, 0, 0, -13, -17, -46, -4, -2, -73, -4, 0, -1, -8, -27, -37, -7, -2, -14, -7, -2, 0, -10, 0, -23, -38, -64, -13, -6, -55, -17, -1, -18, -2, 0, -54, -26, -7, -100, -29, 0, -1, -144, 0, -9, -107, -20, -5, -5, -14, -20, -64, -16, -1, -208, -3, -3, -87, -1, -1, 0, -92, -1, 0, 0, -2, -1, -72, -34, -4, -112, -78, -75, -1, -89, -1, 0, -3, -41, -29, -6, -9, -2, -5, -1, -6, -116, -16, -3, -1, -3, -1, 0, -5, -15, -7, -1, -191, -90, -200, -11, -55, -20, -2, -131, -1, 0, -6, 0, -3, -1, -7, -13, -51, 0, -82, -73, -1, 0, -1, -124, -2, -1, -18, -110, -61, -5, -39, -24, 0, -67, -13, -54, 0, -83, -6, -25, -20, -30, -95, -1, 0, -27, -50, -3, -68, -13, -12, -91, -30, -258, -2, -1, -100, -55, -126, -4, -1, -5, -10, -61, -62, -13, -107, -26, 0, -1, -2, 0, -2, -3, -6, 0, -157, -1, -2, -89, -16, -3, -8, -1, -21, -69, -37, -5, 0, -13, -35, 0, -6, -1, -9, -31, -40, -1, -21, -8, -5, -6, -3, -3, -44, -39, -3, -9, 0, -54, -110, 0, -39, -16, -20, -3, 0, -1, -193, -81, -3, -3, -7, -1, 0, -1, -6, -5, 0, -1, -263, -21, -34, -81, -122, 0, 0, 0, -1, -3, -16, -3, -1, -25, -3, -58, -145, 0, -8, -1, -177, -3, -5, 0, -1, 0, -14, -25, -2, -132, 0, -12, -34, -4, -3, -90, 0, -7, 0, -4, -3, -37, -1, -1, -73, 0, 0, -137, -4, -2, 0, -3, -49, 0, -66, -14, -1, 0, -88, -52, -69, 0, -34, 0, -66, -1, -83, -2, -71, -24, -1, -3, -5, -7, -147, 0, -18, -6, -4, -17, 0, -2, -368, -13, -15, 0, -48, -6, 0, -6, 0, -117, -69, -5, 0, -32, -31, -129, -107, 0, -11, -3, -3, -1, -40, -102, -5, -21, -13, -2, -2, -152, 0, -6, -7, -3, -23, -3, -2, 0, -81, -3, -43, -1, -57, -83, 0, -22, -5, -76, -3, -9, -17, -1, -10, -4, 0, -39, -4, -6, -25, -1, -157, 0, -7, -5, -10, 0, -98, 0, -125, 0, -17, -22, -2, 0, -32, -5, -4, -8, -85, -92, 0, -15, 0, -58, 0, -24, -57, -2, -2, 0, -78, -29, -25, -9, -62, -3, -27, -8, -56, -10, -63, -5, 0, -16, -52, -1, -59, -56, 0, -1, -46, -4, -3, 0, -38, -8, -4, -54, -54, -1, -235, -3, 0, -127, 0, 0, 0, -68, -7, 0, -19, -4, -118, -170, -70, -88, -24, -1, -51, -2, -61, 0, 0, -6, -3, -45, -1, -3, -4, -5, -21, -97, 0, -68, -21, -3, -4, 0, 0, -2, -54, 0, -14, -72, 0, -28, -41, 0, -4, -2, 0, -2, -3, -19, -5, -2, -262, -6, -1, 0, -2, -2, 0, -53, -4, -7, -19, -11, -13, -10, -3, -9, -61, -2, 0, -9, -52, -41, -93, 0, 0, -132, -6, 0, -76, -38, -7, -35, -27, -35, -3, -2, -18, -4, -3, 0, -56, -5, -80, -11, 0, -3, -32, -2, -2, 0, 0, -82, -12, -2, 0, -4, -2, -86, -18, 0, 0, -3, -3, -5, -24, -79, -181, -44, -2, -25, -5, -2, -53, -10, -3, -2, -50, -73, -4, 0, 0, -45, -4, -103, -73, -3, -6, -46, -112, -8, -225, -6, -32, -2, -55, -8, -1, -70, -16, 0, -64, -38, -77, -4, -1, -91, -71, -4, -1, -132, -65, -1, -116, -29, 0, -2, 0, -43, -2, 0, -14, -4, -26, -4, 0, -35, -33, -59, -102, -3, -63, -4, 0, -19, -1, -19, -97, -55, -5, -37, 0, -30, -10, 0, 0, -96, -3, -10, -2, -23, -6, -29, 0, -5, -15, -3, -2, 0, -4, -30, -6, 0, -7, -98, -45, -8, -3, -32, -11, -57, -1, -16, -21, 0, -31, -1, -87, -14, -6, -4, -44, 0, -43, -82, 0, 0, 0, -107, -16, 0, -23, -38, -52, 0, -34, -114, -62, -8, -2, -6, -48, 0, 0, -13, -2, -2, -4, -4, -38, 0, -26, -2, 0, -132, 0, -9, -71, -62, -6, 0, 0, -98, 0, -34, -70, -1, 0, -4, -24, 0, -2, -4, -109, 0, -27, 0, -55, 0, -161, -41, 0, 0, -74, -1, -10, 0, -1, -16, -5, 0, 0, -20, -10, 0, 0, -14, -141, 0, -100, -2, 0, -19, -24, 0, -2, -6, -2, 0, -1, 0, 0, -10, -1, -131, 0, -5, -2, -42, 0, 0, -61, -2, 0, -37, -65, -3, 0, 0, 0, -66, 0, 0, -75, -39, 0, -76, -77, 0, 0, -8, -59, 0, 0, -2, -26, -84, 0, 0, -15, -28, 0, 0, -78, -2, 0, -1, 0, -66, 0, -143, 0, -2, 0, -2, 0, 0, -87, -4, -35, 0, -2, -1, -12, 0, -5, -29, 0, -21, -2, 0, -2, -2, -2, 0, 0, -96, -5, -45, -39, -55, -5, 0, -5, -2, -15, 0, 0, -95, -38, 0, -8, -2, -8, 0, -1, 0, -14, 0, -41, -4, -75, 0, -10, -7, -13, -1, -2, 0, -4, 0, 0, -1, -2, -1, 0, -2, -72, 0, -72, -2, 0, -3, -126, -2, 0, 0, -38, 0, -27, -43, -1, -7, 0, -2, 0, -36, 0, -32, 0, 0, -133, 0, -7, 0, -94, -3, -14, 0, -48, -47, 0, -2, -36, -28, 0, 0, -128, -2, 0, -2, -22, -67, -36, -9, 0, 0, 0, -32, -3, -42, 0, -14, -52, -2, 0, -7, -51, -9, 0, 0, -18, -3, 0, -8, -8, 0, 0, -21, 0, 0, -23, -120, -2, 0, -18, -68, -2, 0, -16, -67, 0, 0, -1, 0, 0, 0, -5, -45, 0, -122, -102, 0, -2, 0, -2, 0, -28, -121, -1, 0, -3, -4, -41, 0, 0, 0, -6, 0, -85, -16, -2, 0, -1, -82, -11, 0, -5, -16, 0, 0, -72, -46, 0, -79, 0, -2, 0, -2, 0, -2, 0, -7, -19, -98, 0, 0, 0, 0, -6, 0, 0, 0, -1, -2, -2, 0, 0, -2, 0, -49, -3, 0, 0, -1, 0, -48, 0, 0, 0, -34, 0, -2, -64, -57, 0, -2, -15, -3, 0, -1, -2, 0, -17, -18, -5, 0, -51, -53, -122, 0, -59, -52, -7, 0, -4, -4, -13, 0, -2, -4, 0, 0, -1, -1, 0, -4, -12, 0, 0, -3, -2, 0, 0, -2, -1, 0, -3, -61, -3, 0, -187, -37, -2, 0, -1, -7, 0, 0, -9, 0, 0, -4, -28, -32, 0, -37, -25, -2, 0, -15, -29, 0, 0, -3, -55, 0, 0, -51, -53, -1, 0, -3, -10, -28, 0, -26, -5, -16, 0, -36, -21, 0, -1, -8, 0, -41, -20, -12, 0, -60, -2, -44, 0, 0, -14, 0, -60, -2, -1, -8, -5, -1, 0, 0, -2, 0, 0, 0, -7, -4, 0, 0, -16, -2, 0, 0, 0, 0, 0, 0, -1, -2, 0, 0, -7, -31, -17, 0, -7, -10, -20, 0, 0, 0, -11, 0, -81, 0, -1, -2, -20, 0, -13, -5, -14, 0, -58, -82, 0, -14, -87, 0, 0, 0, -2, 0, 0, -176, -9, 0, 0, -4, -8, -7, 0, -3, -1, -19, 0, -20, -2, -35, 0, -1, -32, -4, 0, -1, -3, 0, 0, -1, 0, -3, -38, -2, 0, -4, -91, -2, 0, 0, -1, 0, -14, -2, -213, 0, -5, -17, -1, 0, -49, -1, -2, 0, 0, -3, -1, -36, -1, -9, 0, 0, -2, -55, -25, 0, -2, -1, -65, 0, -125, -5, -7, 0, 0, 0, 0, -18, 0, -2, 0, -6, -41, -1, 0, -7, 0, -35, -81, -12, 0, -39, -7, -3, 0, -87, 0, -1, 0, -10, -25, -2, 0, -58, -44, -39, 0, 0, -63, -2, 0, 0, 0, 0, 0, -21, -1, 0, -2, -3, -3, 0, -2, 0, -5, 0, 0, -2, 0, -59, -181, -6, -1, 0, -1, 0, -1, -28, -4, 0, -76, 0, -2, 0, -58, -32, -33, 0, -5, -33, -8, 0, -25, -16, 0, 0, -3, -12, -2, 0, -46, -4, -3, 0, -3, 0, 0, -63, -3, -22, 0, -13, 0, 0, -6, -5, 0, -118, -3, 0, 0, 0, -25, 0, 0, -151, 0, 0, -6, -101, -3, -1, 0, -67, -39, 0, 0, -14, -6, 0, 0, 0, 0, -1, 0, -5, -3, -1, 0, -31, -2, 0, 0, -32, -105, -3, -1, -1, -37, -21, 0, 0, -122, 0, -2, -1, 0, -3, -1, -1, 0, -9, -97, 0, -1, -16, -10, 0, -120, -62, -1, 0, -7, -3, -1, 0, -67, -1, -129, 0, -17, -3, -81, 0, -1, -1, -36, 0, -13, -5, 0, -2, -1, 0, -4, -2, -88, 0, -22, -17, 0, -1, -3, 0, 0, -22, -2, -53, 0, -1, -13, -10, 0, 0, 0, -16, 0, -1, -54, -3, 0, -1, -23, 0, 0, -76, -49, 0, 0, -79, -1, 0, -53, 0, 0, -16, -4, -10, 0, -6, 0, 0, -89, -1, -16, 0, -10, -20, -3, 0, -17, -3, -21, 0], 100: [-107, -42, -8, -69, -29, -6, -34, -39, -16, -67, -5, -8, -61, -5, -5, -31, -18, -4, -83, -32, -108, -55, -66, -36, -11, -14, -25, -138, -75, -33, -5, -4, -24, -59, -15, -15, -40, -112, -74, -5, -47, -3, -27, -3, -9, -10, -5, -244, -15, -11, -181, -48, -83, -5, -46, -107, -4, -3, -26, -10, -18, -105, -52, -4, -143, -57, -6, -98, -4, -21, -89, -123, -59, -4, -4, -108, -17, -20, -16, -26, -62, -5, -160, -92, -4, -95, -5, -68, -5, -39, -44, -20, -5, -118, -4, -51, -17, -7, -58, -81, -4, -28, -10, -42, -27, -9, -6, -23, -8, -7, -4, -80, -2, -22, -140, -10, -61, -111, -14, -50, -71, -135, -102, -98, -7, -11, -23, -65, -46, -57, -42, -12, -116, -14, -6, -41, -10, -15, -88, -49, -119, -8, -11, -4, -187, -110, -4, -194, -17, -3, -60, -12, -44, -3, -5, -70, -108, -220, -60, -5, -12, -12, -10, -6, -44, -24, -87, -111, -70, -45, -144, -9, -82, -13, -18, -110, -3, -4, -46, -24, -114, -10, -3, -151, -49, -8, -61, -13, -11, -5, -109, -49, -22, -48, -13, -2, -117, -126, -7, -52, -65, -152, -47, -10, -9, -189, -108, -53, -2, -101, -74, -43, -18, -12, -4, -4, -148, -16, -78, -17, -102, -47, -4, -98, -55, -7, -10, -8, -63, -8, -25, -135, -30, -52, -65, -123, -18, -3, -13, -5, -54, -4, -51, -8, -12, -4, -53, -5, -27, -80, -40, -124, -26, -22, -9, -20, -261, -18, -64, -135, -134, -82, -12, -14, -7, -45, -65, -10, -182, -126, -24, -143, -9, -8, -157, -51, -31, -20, -3, -92, -39, -33, -31, -37, -352, -9, -30, -44, -3, -13, -24, -6, -3, -41, -62, -41, -29, -68, -14, -75, -28, -33, -32, -10, -134, -105, -9, -54, -62, -4, -18, -129, -21, -33, -39, -5, -150, -77, -59, -22, -26, -71, -10, -20, -138, -34, -79, -6, -49, -3, -270, -6, -5, -17, -98, -51, -4, -92, -43, -27, -13, -7, -4, -99, -113, -9, -25, -13, -199, -74, -3, -29, -28, -3, -39, -101, -31, -12, -72, -265, -157, -13, -132, -98, -21, -4, -36, -47, -143, -39, -12, -73, -5, -56, -7, -19, -117, -76, -4, -34, -8, -5, -20, -6, -41, -104, -95, -36, -21, -23, -24, -65, -96, -3, -99, -36, -34, -69, -30, -88, -53, -79, -32, -4, -84, -3, -130, -6, -8, -9, -43, -208, -6, -16, -39, -8, -81, -44, -5, -100, -46, -65, -73, -3, -32, -186, -20, -176, -4, -2, -122, -12, -79, -10, -11, -3, -48, -21, -132, -312, -80, -5, -3, -44, -7, -215, -74, -16, -76, -13, -74, -11, -3, -42, -104, -15, -12, -11, -11, -67, -40, -29, -10, -130, -108, -18, -122, -257, -8, -72, -70, -46, -132, -11, -33, -5, -5, -44, -45, -118, -55, -79, -110, -33, -11, -37, -12, -12, -151, -6, -62, -10, -19, -28, -4, -5, -10, -6, -28, -11, -5, -19, -3, -3, -6, -144, -53, -24, -8, -5, -55, -5, -141, -4, -7, -22, -43, -14, -8, -27, -45, -6, -6, -18, -98, -39, -80, -20, -38, -5, -23, -30, -4, -8, -81, -40, -6, -11, -73, -6, -8, -35, -88, -69, -142, -24, -8, -15, -98, -73, -30, -3, -46, -81, -75, -105, -5, -6, -71, -4, -136, -105, -22, -13, -152, -12, -15, -5, -12, -55, -11, -37, -7, -44, -28, -64, -19, -5, -25, -3, -4, -25, -19, -3, -33, -12, -34, -4, -5, -17, -31, -22, -4, -96, -19, -5, -10, -59, -47, -16, -7, -9, -9, -26, -12, -2, -37, -107, -42, -159, -31, -2, -79, -3, -135, -82, -7, -23, -96, -26, -4, -136, -63, -2, -14, -4, -127, -37, -97, -19, -2, -41, -41, -11, -168, -52, -5, -23, -55, -80, -38, -9, -134, -4, -76, -5, -50, -32, -12, -15, -32, -128, -4, -109, -18, -29, -27, -198, -6, -28, -47, -4, -6, -8, -46, -3, -95, -8, -5, -9, -23, -30, -59, -37, -125, -10, -25, -22, -28, -4, -33, -25, -4, -112, -5, -23, -73, -43, -4, -2, -53, -8, -34, -62, -123, -36, -3, -44, -4, -47, -3, -29, -4, -122, -66, -127, -45, -29, -109, -120, -3, -34, -28, -3, -61, -42, -75, -3, -53, -46, -12, -3, -98, -105, -28, -45, -151, -16, -4, -66, -101, -107, -73, -26, -4, -55, -34, -56, -171, -23, -5, -34, -8, -17, -8, -17, -20, -18, -28, -41, -21, -5, -7, -56, -13, -11, -53, -40, -50, -49, -70, -24, -13, -73, -4, -33, -68, -90, -14, -7, -62, -94, -19, -22, -4, -8, -3, -43, -19, -84, -12, -4, -20, -4, -32, -17, -4, -22, -35, -4, -46, -229, -27, -4, -7, -7, -10, -129, -15, -4, -53, -29, -4, -38, -6, -32, -27, -70, -97, -4, -30, -21, -4, -5, -19, -4, -77, -5, -45, -42, -5, -10, -56, -7, -69, -62, -43, -16, -147, -2, -14, -100, -58, -8, -14, -118, -6, -57, -2, -3, -3, -146, -9, -145, -25, -58, -34, -7, -19, -95, -40, -77, -16, -109, -11, -12, -7, -83, -103, -35, -88, -32, -55, -8, -44, -3, -40, -49, -9, -256, -41, -125, -93, -23, -3, -8, -12, -16, -6, -13, -78, -5, -10, -11, -6, -32, -120, -119, -17, -3, -64, -7, -41, -37, -13, -5, -5, -5, -20, -7, -30, -78, -94, -196, -27, -49, -56, -201, -15, -3, -59, -12, -14, -21, -2, -110, -79, -2, -90, -47, -46, -43, -80, -21, -44, -10, -60, -15, -4, -11, -52, -6, -5, -203, -22, -40, -9, -2, -81, -84, -2, -33, -17, -55, -5, -7, -16, -5, -24, -35, -4, -32, -42, -182, -73, -10, -3, -158, -3, -10, -144, -5, -123, -5, -4, -46, -52, -107, -6, -86, -70, -5, -47, -5, -2, -23, -40, -3, -3, -57, -100, -8, -35, -21, -125, -22, -36, -39, -129, -4, -208, -116, -4, -46, -77, -24, -5, -5, -9, -3, -4, -5, -15, -12, -22, -40, -79, -22, -5, -15, -10, -23, -5, -5, -8, -5, -18, -62, -4, -63, -9, -27, -28, -12, -9, -14, -13, -30, -8, -35, -11, -171, -74, -11, -10, -4, -25, -20, -17, -90, -81, -2, -45, -22, -24, -3, -89, -67, -40, -48, -6, -6, -6, -55, -15, -9, -43, -140, -16, -135, -182, -58, -182, -5, -10, -99, -15, -5, -62, -4, -35, -7, -18, -56, -8, -133, -3, -24, -75, -76, -50, -54, -47, -84, -76, -21, -7, -15, -48, -3, -5, -18, -8, -11, -160, -81, -40, -62, -189, -65, -206, -45, -11, -19, -5, -45, -3, -6, -4, -48, -23, -48, -5, -4, -53, -2, -6, -3, -129, -3, -9, -122, -7, -7, -165, -134, -77, -97, -25, -11, -8, -49, -10, -15, -64, -101, -16, -24, -313, -7, -19, -24, -300, -26, -17, -178, -39, -21, -46, -3, -17, -13, -14, -104, -7, -3, -41, -12, -6, -225, -48, -31, -20, -3, -4, -56, -110, -5, -5, -38, -87, -161, -91, -3, -48, -10, -4, -2, -22, -9, -12, -9, -126, -23, -11, -15, -12, -9, -7, -3, -20, -124, -50, -17, -20, -3, -12, -22, -36, -3, -6, -46, -5, -19, -43, -4, -2, -5, -47, -32, -5, -11, -13, -23, -4, -59, -99, -26, -89, -90, -7, -137, -14, -4, -61, -35, -8, -115, -6, -5, -6, -77, -4, -18, -5, -32, -4, -147, -101, -107, -225, -7, -21, -81, -172, -26, -96, -14, -17, -96, -13, -2, -6, -35, -13, -97, -3, -69, -31, -3, -150, -21, -76, -10, -106, -95, -6, -42, -63, -66, -85, -10, -6, -71, -65, -11, -296, -22, -60, -6, -5, -24, -143, -23, -119, -23, -20, -35, -4, -18, -92, -152, -40, -14, -21, -10, -4, -196, -28, -20, -45, -38, -19, -44, -5, -6, -5, -6, -15, -137, -62, -79, -29, -11, -3, -4, -18, -4, -73, -79, -59, -6, -18, -30, -3, -12, -16, -168, -53, -155, -113, -18, -172, -163, -22, -167, -53, -11, -7, -110, -13, -10, -136, -26, -6, -12, -45, -48, -4, -69, -68, -11, -63, -25, -4, -5, -10, -51, -74, -138, -11, -117, -3, -20, -62, -120, -31, -8, -34, -36, -48, -130, -29, -8, -13, -171, -58, -65, -4, -8, -200, -6, -5, -56, -6, -33, -36, -21, -85, -92, -32, -23, -7, -25, -10, -42, -52, -42, -11, -18, -122, -29, -10, -46, -42, -2, -144, -3, -53, -8, -16, -12, -37, -33, -55, -40, -95, -109, -5, -111, -8, -52, -70, -123, -5, -9, -13, -34, -15, -137, -95, -17, -5, -23, -87, -6, -7, -32, -70, -61, -114, -14, -90, -4, -20, -36, -44, -57, -85, -5, -9, -48, -15, -15, -18, -23, -66, -38, -12, -9, -89, -103, -26, -16, -27, -73, -161, -68, -26, -21, -94, -107, -9, -135, -12, -82, -107, -18, -10, -8, -42, -43, -5, -7, -3, -199, -19, -16, -7, -7, -25, -89, -167, -21, -75, -170, -34, -22, -3, -8, -52, -3, -80, -62, -21, -79, -60, -86, -21, -131, -61, -3, -9, -96, -33, -4, -6, -9, -17, -50, -22, -8, -15, -13, -39, -79, -53, -27, -100, -36, -45, -3, -4, -78, -95, -16, -144, -10, -7, -20, -116, -5, -36, -53, -20, -59, -7, -10, -92, -51, -24, -5, -42, -3, -32, -36, -4, -134, -14, -108, -5, -90, -32, -6, -27, -42, -50, -5, -9, -29, -82, -38, -254, -4, -6, -35, -25, -9, -103, -17, -62, -34, -19, -138, -44, -63, -134, -3, -20, -40, -15, -52, -80, -4, -48, -17, -17, -27, -8, -132, -19, -91, -40, -8, -28, -129, -113, -17, -45, -5, -4, -2, -59, -18, -24, -46, -10, -11, -154, -20, -5, -69, -5, -26, -13, -11, -26, -19, -15, -27, -80, -28, -120, -11, -10, -10, -2, -48, -8, -57, -81, -5, -9, -69, -9, -7, -119, -12, -35, -35, -27, -8, -42, -16, -4, -24, -17, -128, -65, -7, -59, -30, -5, -4, -152, -66, -16, -2, -111, -35, -75, -33, -156, -59, -76, -20, -5, -14, -13, -43, -133, -10, -74, -36, -176, -46, -80, -18, -37, -215, -58, -4, -59, -10, -9, -56, -48, -169, -7, -12, -5, -294, -5, -54, -95, -9, -97, -92, -13, -16, -67, -84, -161, -6, -3, -233, -65, -99, -17, -13, -62, -11, -117, -11, -13, -71, -3, -31, -16, -76, -10, -74, -11, -15, -90, -131, -30, -25, -43, -15, -6, -6, -8, -12, -40, -33, -7, -14, -120, -57, -89, -18, -137, -7, -87, -8, -62, -107, -9, -40, -4, -4, -89, -7, -7, -27, -41, -163, -7, -87, -20, -57, -4, -19, -8, -36, -61, -29, -6, -44, -126, -79, -27, -26, -93, -4, -44, -14, -11, -3, -72, -26, -9, -3, -34, -120, -4, -32, -138, -95, -14, -43, -71, -3, -45, -8, -8, -233, -97, -16, -40, -36, -141, -13, -9, -6, -10, -96, -75, -120, -37, -5, -4, -23, -48, -29, -77, -11, -27, -100, -29, -43, -70, -65, -20, -46, -18, -28, -14, -11, -43, -11, -21, -10, -36, -61, -4, -55, -13, -8, -24, -72, -82, -141, -11, -148, -7, -25, -97, -35, -8, -51, -103, -95, -91, -28, -104, -6, -8, -41, -4, -16, -33, -35, -76, -7, -38, -45, -37, -42, -28, -30, -7, -8, -154, -23, -9, -69, -2, -19, -148, -113, -10, -24, -4, -5, -84, -6, -17, -13, -127, -14, -31, -103, -54, -32, -152, -9, -13, -44, -153, -208, -69, -97, -11, -77, -39, -7, -3, -5, -240, -34, -17, -93, -47, -17, -120, -25, -132, -15, -45, -74, -44, -6, -62, -39, -14, -138, -45, -31, -82, -32, -33, -4, -30, -45, -73, -53, -5, -16, -62, -7, -32, -188, -44, -11, -49, -80, -124, -27, -109, -166, -37, -6, -69, -3, -27, -23, -12, -19, -86, -26, -8, -102, -121, -16, -150, -41, -50, -77, -134, -64, -27, -17, -6, -15, -64, -90, -37, -30, -5, -32, -54, -295, -22, -42, -104, -75, -58, -9, -44, -47, -6, -214, -56, -26, -31, -64, -45, -44, -26, -25, -28, -40, -41, -16, -69, -40, -68, -17, -11, -79, -15, -12, -9, -85, -78, -4, -5, -10, -74, -5, -70, -33, -6, -107, -57, -271, -5, -57, -71, -110, -18, -101, -74, -13, -57, -3, -5, -18, -16, -46, -7, -19, -10, -49, -71, -95, -44, -22, -11, -3, -9, -42, -18, -21, -10, -15, -3, -6, -42, -33, -1, -8, -13, -14, -36, -13, -72, -33, -11, -21, -27, -84, -41, -126, -33, -5, -25, -89, -23, -5, -79, -21, -58, -100, -64, -37, -75, -32, -4, -5, -75, -8, -107, -11, -6, -23, -4, -48, -15, -14, -7, -19, -148, -48, -4, -12, -23, -87, -46, -15, -15, -83, -75, -134, -24, -13, -44, -17, -12, -46, -31, -15, -11, -71, -8, -7, -28, -92, -11, -124, -15, -121, -10, -89, -44, -76, -152, -7, -57, -3, -2, -44, -10, -27, -17, -5, -7, -106, -48, -8, -204, -13, -76, -5, -3, -28, -24, -91, -4, -25, -51, -67, -20, -44, -5, -62, -134, -4, -75, -13, -40, -28, -182, -16, -13, -21, -42, -43, -181, -3, -7, -283, -90, -21, -50, -250, -92, -32, -17, -136, -46, -35, -12, -40, -4, -7, -100, -4, -18, -25, -7, -185, -9, -41, -159, -123, -165, -37, -2, -48, -50, -46, -118, -8, -151, -20, -41, -49, -25, -8, -10, -44, -15, -7, -17, -7, -69, -39, -21, -55, -95, -33, -10, -15, -17, -4, -4, -15, -8, -25, -24, -43, -12, -77, -213, -33, -90, -112, -37, -26, -151, -24, -55, -132, -55, -106, -9, -17, -52, -44, -123, -5, -2, -8, -11, -50, -33, -46, -3, -75, -46, -6, -3, -3, -51, -46, -9, -32, -20, -63, -60, -13, -23, -7, -41, -13, -11, -84, -83, -55, -139, -45, -117, -76, -13, -4, -45, -6, -4, -11, -99, -77, -28, -26, -4, -1, -137, -25, -3, -269, -3, -76, -13, -9, -5, -5, -15, -3, -7, -9, -1, -109, -6, -9, -6, -32, -102, -20, -5, -4, -43, -55, -7, -6, -46, -83, -11, -10, -35, -37, -23, -138, -31, -6, -6, -276, -91, -102, -166, -25, -31, -21, -78, -8, -7, -7, -3, -210, -7, -12, -12, -163, -13, -14, -149, -196, -39, -15, -122, -5, -29, -151, -53, -30, -45, -7, -5, -121, -6, -18, -5, -47, -17, -25, -3, -83, -334, -11, -8, -22, -20, -67, -5, -6, -92, -4, -9, -55, -10, -105, -48, -39, -42, -34, -6, -91, -19, -71, -9, -31, -6, -19, -38, -4, -30, -15, -3, -26, -29, -141, -6, -11, -6, -147, -9, -31, -17, -7, -35, -36, -21, -9, -47, -76, -53, -56, -21, -17, -59, -12, -12, -6, -33, -167, -35, -5, -22, -8, -8, -6, -81, -13, -26, -4, -4, -9, -5, -6, -8, -129, -4, -10, -19, -59, -48, -50, -81, -10, -3, -95, -29, -10, -21, -52, -43, -10, -37, -1, -122, -12, -6, -4, -36, -22, -8, -7, -220, -11, -20, -7, -12, -133, -9, -115, -13, -18, -27, -16, -55, -53, -51, -29, -118, -176, -154, -49, -57, -6, -65, -8, -64, -27, -3, -8, -23, -157, -7, -81, -21, -34, -54, -45, -62, -10, -8, -52, -63, -74, -24, -56, -24, -5, -7, -15, -31, -34, -8, -104, -5, -37, -30, -216, -9, -6, -84, -80, -8, -4, -31, -144, -56, -104, -190, -67, -6, -13, -13, -66, -10, -4, -7, -29, -3, -6, -63, -38, -152, -86, -86, -14, -139, -15, -162, -7, -9, -75, -7, -26, -79, -9, -6, -64, -63, -10, -14, -2, -11, -30, -69, -53, -15, -10, -104, -26, -7, -27, -4, -127, -11, -5, -92, -45, -37, -11, -6, -10, -11, -11, -47, -29, -3, -13, -9, -77, -8, -5, -43, -34, -17, -85, -5, -7, -46, -7, -59, -2, -7, -17, -40, -7, -94, -6, -29, -20, -105, -57, -61, -21, -167, -83, -42, -60, -6, -134, -12, -3, -10, -36, -26, -65, -35, -7, -6, -29, -58, -176, -9, -83, -7, -4, -25, -46, -46, -66, -52, -47, -75, -46, -7, -24, -4, -11, -4, -56, -16, -4, -87, -37, -12, -5, -15, -14, -278, -7, -72, -13, -17, -4, -8, -35, -26, -6, -100, -5, -57, -35, -11, -49, -22, -19, -6, -95, -10, -9, -10, -19, -20, -88, -15, -27, -4, -5, -134, -35, -13, -88, -49, -132, -48, -19, -68, -98, -7, -9, -64, -2, -3, -40, -206, -10, -89, -14, -51, -69, -11, -17, -82, -100, -149, -17, -3, -4, -11, -5, -23, -76, -40, -117, -47, -9, -37, -7, -38, -70, -32, -23, -5, -5, -67, -47, -86, -44, -7, -30, -21, -4, -108, -59, -15, -165, -17, -48, -2, -6, -23, -25, -187, -14, -26, -18, -9, -25, -9, -37, -28, -11, -4, -89, -7, -110, -41, -8, -4, -10, -39, -164, -195, -57, -4, -68, -47, -57, -65, -92, -44, -61, -68, -132, -74, -57, -11, -12, -27, -128, -3, -19, -23, -57, -16, -16, -35, -8, -15, -14, -5, -57, -117, -12, -26, -9, -73, -76, -35, -175, -2, -10, -16, -40, -47, -11, -33, -61, -61, -26, -101, -93, -2, -24, -34, -12, -72, -45, -54, -15, -88, -5, -11, -90, -37, -34, -35, -109, -16, -34, -68, -96, -21, -50, -55, -37, -4, -18, -8, -6, -12, -7, -7, -91, -63, -15, -3, -46, -14, -100, -13, -32, -4, -120, -6, -24, -10, -41, -7, -29, -86, -139, -19, -4, -105, -17, -97, -23, -43, -7, -14, -35, -97, -6, -56, -30, -4, -4, -4, -237, -16, -154, -4, -58, 0, -163, -6, -3, -12, -12, -17, -46, -35, -6, -103, -79, -73, -121, -42, -77, -66, -43, -74, -37, -73, -185, -24, -63, -68, -144, -9, -42, -118, -8, -12, -5, -263, -26, -86, -33, -12, -86, -23, -2, -48, -13, -186, -112, -147, -3, -34, -104, -44, -12, -16, -20, -25, -11, -4, -4, -54, -2, -163, -172, -38, -23, -50, -155, -34, -2, -67, -7, -50, -36, -55, -6, -6, -15, -7, -12, -211, -112, -23, -26, -64, -2, -150, -11, -34, -178, -101, -5, -37, -50, -43, -33, -100, -111, -93, -36, -168, -141, -13, -7, -5, -3, -49, -5, -230, -125, -16, -8, -22, -47, -127, -98, -25, -5, -52, -6, -29, -9, -211, -128, -22, -14, -36, -35, -25, -14, -71, -8, -78, -27, -13, -20, -72, -12, -83, -13, -4, -5, -226, -35, -45, -41, -7, -48, -9, -18, -103, -36, -56, -110, -8, -119, -46, -3, 0, -248, -24, -60, -14, -92, -2, -58, -5, -7, -131, -16, -9, -14, -126, -35, -7, -153, -152, -79, -9, -20, -93, -61, -10, -186, -117, -10, -126, -6, -18, -7, -13, -7, -55, -13, -25, -77, -40, -2, -2, -142, -5, -12, -24, -3, -155, -4, -69, -18, -19, -13, 0, -6, -42, -35, -85, -9, -22, -50, -67, -200, -12, -11, -20, -6, -52, -4, -11, -16, -5, -27, -165, -14, -77, -43, -4, -26, -5, -8, -79, -70, -4, -68, -24, -24, -45, -2, -60, -19, -21, -74, -38, -18, -58, -6, -8, -10, -175, -81, -3, -54, -4, -39, -2, -71, -3, -9, -195, -7, -3, -51, -40, -98, -4, -98, -90, -95, -43, -11, -8, -133, -3, -5, -69, -37, -4, -64, -26, -121, -41, -59, -8, -24, -3, -82, -15, -118, -63, -45, -4, -59, -21, -31, -30, -25, -116, -55, -9, -21, -4, -84, -41, -65, -74, -17, -2, -13, -40, -255, -45, -1, -15, -29, -98, -45, -64, -4, -6, -9, -37, -41, -158, -21, -12, -39, -15, -27, -8, -3, -66, -4, -75, -61, -119, -7, 0, -60, -6, 0, -52, -27, -61, -48, -11, -107, -134, -4, -7, -3, -42, -3, -54, -71, -17, -10, -27, -27, -41, -14, -116, -37, -54, -225, -19, -67, -78, -22, -92, -113, -3, -1, -4, -87, -43, -4, -43, -189, -266, -39, -11, -109, -16, -7, -76, -27, -6, -15, -87, -26, -29, -7, -13, -17, -13, -4, -102, -41, -87, -36, -18, -106, -1, -20, -55, -155, -129, -37, -90, -47, -7, -1, -7, -45, -16, -1, -1, -115, -12, -36, -3, -11, -17, -32, -4, -43, -7, -32, -7, -20, -44, -78, -174, -11, -16, -29, -3, -2, -13, -81, -49, -73, -47, -16, -93, -192, -29, -57, -164, -70, -46, -31, -40, -28, -5, -41, -34, -27, -24, -33, -25, -48, -2, -49, -85, -60, -26, -25, -5, -3, -199, -62, -5, -6, -1, -9, -6, -9, -124, -6, -24, -62, -24, -89, -54, -166, -29, -162, -6, -99, -50, -4, -25, -8, -18, -1, -17, -17, -65, -127, -44, -18, -12, -36, -57, -23, -3, -12, -100, -30, -7, -16, -22, -146, -40, -14, -63, -10, -7, -6, -85, -2, -39, -14, -26, -110, -52, -47, -10, -52, -191, -4, -92, -145, -7, -2, -8, -36, -9, -49, -91, -9, -16, -162, -84, -62, -51, -19, -76, -14, -4, -3, -3, -8, -109, -19, -203, -73, -11, -21, -16, -11, -62, -109, -1, -9, -43, -15, -36, -46, -29, -102, -4, -9, -19, -4, -55, -2, -66, -37, -61, -9, -7, -13, -25, -6, -21, -56, -117, -79, -80, -4, -163, -13, -8, -5, -19, -12, -85, -4, -28, -48, -2, -18, -49, -73, -51, -40, -4, -38, -6, -8, -32, -11, -24, -32, -49, -49, -50, -53, -86, -22, -55, -27, -2, -7, -17, -17, -12, -4, -18, -171, -90, -22, -16, -5, -28, -4, -55, -6, -168, -183, -47, -81, -18, -164, -38, -51, -6, -3, -2, -45, -31, -8, -3, -5, -68, -2, -47, -101, -101, -8, -124, -33, -6, -184, -93, -3, -38, -6, -95, -92, -11, -14, -339, -63, -33, -102, -96, -80, -4, -15, -48, -30, -2, -11, -86, -24, -10, -57, -26, -49, -4, -11, -17, -16, -10, -47, -218, -10, -119, -19, -14, -109, -91, -5, -44, -6, -175, -12, -34, -71, -12, -4, -3, -13, -199, -20, -6, -29, -6, -205, -299, -29, -29, -4, -37, -6, -14, -146, -14, -82, -6, -42, -6, -37, -9, -98, -45, -170, -23, -31, -282, -4, -47, -196, -15, -29, -37, -71, -27, -12, -39, -86, -76, -10, -52, -35, -109, -113, -15, -50, 0, -3, -130, -3, -24, -72, -5, -35, -10, 0, -5, -1, -6, -7, -10, -46, -18, -57, -42, -5, -55, -5, -39, -2, -58, -40, -53, -18, -24, -180, -119, -1, -12, -39, -114, -19, -147, -79, -50, -8, -5, -89, -108, -45, -8, -22, -158, -56, -19, -8, -6, -5, -48, -66, -17, -3, -26, -34, -63, -3, -51, -10, -60, -24, -33, -67, -7, -6, -83, -13, -25, -6, -33, -7, -67, -31, -23, -7, -15, -24, -3, -2, -4, -21, -112, -29, -51, -186, -36, -59, -13, -102, -62, -1, -5, -88, -7, -37, -2, -6, -47, -53, -46, -122, -4, -65, -6, -10, -6, -3, -60, -6, -78, -3, -54, -40, -21, -10, -14, -34, -100, -3, -5, -13, -51, -36, -53, -5, -52, -83, -1, -16, -4, -5, -7, -91, -96, -5, -11, -74, -26, -107, -3, -95, -43, -77, -49, -110, -27, -55, -2, -229, -33, -19, -77, -18, -225, -108, -3, -51, -18, -55, -25, -3, -62, -81, -116, -48, -11, -39, -153, -15, -16, -22, -54, -4, -85, -124, -26, -124, -48, -5, -88, -5, -42, -3, -2, -28, -27, -81, -93, -36, -9, -106, -7, -37, -47, -111, -62, -42, -19, -30, -7, -5, -20, -36, -37, -4, -55, -91, -17, -89, -79, -23, -2, -35, -8, -59, -5, -9, -52, 0, -80, -45, -24, -195, -211, -40, -17, -25, -46, -15, -11, -8, -104, -34, -21, -26, -46, -37, -169, -34, -25, -5, -8, -5, -39, -42, -76, -40, -49, -11, -15, -15, -34, -10, -60, -125, -82, -14, -20, -66, -10, -5, -11, -122, -17, -54, -9, -5, -93, -27, -83, -71, -68, -48, -31, -3, -133, -38, -154, -4, -14, -62, -171, -55, -252, -34, -7, -33, -12, -41, -10, -27, -17, -43, -10, -49, -16, -64, -21, -65, -64, -65, -91, -103, -97, -42, -92, -13, -58, -79, -71, -102, -57, -91, -31, -16, -16, -17, -11, -267, -20, -13, -17, -3, -120, -140, -27, -20, -202, -26, -13, -72, -73, -111, -126, -37, -11, -204, 0, -23, -49, -76, -28, -7, -16, -4, -36, -31, -48, -33, -45, -2, -6, -7, -83, -102, -28, -37, -66, -1, -19, -14, -6, -4, -46, -22, -67, -22, -78, -60, -2, -4, -29, -26, -89, -43, -30, -62, -100, -15, -51, -286, -1, -9, -47, -83, -76, -56, -4, -14, -3, -2, -97, -36, -3, -20, -90, -30, -35, -67, -91, -3, -115, -26, -5, -5, -32, -21, -172, -41, -93, -19, -22, -130, -135, -26, -50, -73, -11, -60, -81, -104, -14, -109, -70, -51, -76, -106, -56, -194, -33, -26, -21, -17, -12, -19, -42, -22, -30, -83, -17, -53, -19, -47, -34, -83, -47, -122, -41, -10, -169, -3, -198, -29, -27, -13, -21, -76, -3, -3, -54, -22, -15, -19, -73, -48, -40, -10, -54, -174, -104, -74, -5, -56, -4, -12, -6, -19, -10, -14, -10, -40, -51, -12, -1, -27, -61, -10, -36, -104, -118, -18, -49, -26, -29, -9, -25, -3, -15, -15, -26, -62, -8, -39, -28, -106, -89, -56, -31, -187, -51, -17, -59, -31, -139, -66, -70, -52, -28, -20, -41, -14, -50, -77, -11, -88, -26, -51, -23, -100, -3, -42, -36, -44, -113, -42, -4, -402, -32, 0, -29, -49, -4, -1, -8, -4, -98, -7, -128, -103, -4, -123, -91, -16, -45, -4, -63, -57, -62, -11, -16, -97, -70, -142, -148, -95, -37, -6, -15, -42, -40, -110, -177, -140, -24, -19, -36, -31, -70, -97, -5, -31, -3, -25, -36, -14, -68, -31, -25, -9, -48, -10, -54, -71, -13, -13, -22, -209, -74, -5, -5, -39, -171, -42, -79, -41, -93, -97, -70, -29, -39, -4, -76, -141, -36, -111, -75, -2, -70, -101, -19, -73, -32, -1, -112, -120, -21, -142, -42, -7, -56, -99, -105, -84, -18, -38, -2, -93, -21, -13, -3, -181, -54, -83, -79, -6, -2, -49, -92, -9, -12, -4, -50, -6, -27, -13, -18, -12, -31, -65, -65, -26, -77, -10, -32, -26, -12, -19, -26, -41, -9, -103, -74, -78, -225, -145, -68, -66, -14, -65, -5, -37, -3, -32, -48, -17, -95, -4, -6, -21, -122, -8, -21, -20, -51, -30, -42, -54, -3, -35, -26, -31, -24, -48, -8, -7, -64, -138, -2, -20, -5, -118, -2, -3, -113, -98, -3, -150, -32, -47, -80, -26, -20, -85, -75, -21, -9, -34, -58, -37, -52, -12, -6, -57, -21, -42, -86, -31, -169, -21, -43, -49, -20, -5, -15, -69, -10, -93, -11, -30, -176, -29, -13, -22, -7, -3, -153, -4, -5, -3, -9, -5, -4, -77, -43, -75, -57, -60, -196, -49, -53, -36, -23, -123, -253, -14, -101, -28, -45, -12, -13, -73, -51, -28, -11, -19, -11, -63, -105, -47, -116, -73, -48, -46, -85, -30, -11, -175, -31, -45, -2, -64, -8, -22, -3, -121, -2, -6, -32, -106, -102, -77, -96, -25, -16, -234, -31, -30, -19, -113, -54, -62, -27, -11, -138, -5, -66, -56, -35, -147, -6, -46, -27, -101, -137, -53, -4, -30, -194, -11, -7, -172, -1, -73, -37, -17, -61, -30, -26, -44, -8, -75, -77, -21, -4, -22, -15, -81, -2, -66, -61, -28, -20, -46, -179, -30, -97, -18, -82, -41, -51, -35, -13, -54, -61, -19, -2, -34, -28, -18, -23, -17, -12, -59, -85, -11, -142, -12, -5, -61, -33, -63, -40, -118, -3, -124, -56, -127, -18, -43, -3, -26, -4, -10, -56, -78, -99, -134, -19, -23, -83, -75, -4, -99, -28, -98, -365, -96, -40, -66, -118, -32, -16, -39, -48, -33, -17, -158, -66, -3, -4, -53, -50, -28, -41, -5, -97, -36, -44, -13, -23, -23, -203, -182, -66, -211, -11, -16, -40, -61, -13, -3, -1, -72, -19, -88, -36, -20, -24, -3, -130, -16, -48, -54, -71, -76, -98, -8, -58, -51, -19, -33, -48, -128, -4, -46, -14, -45, -80, -46, -5, -13, -24, -191, -7, -98, -82, -38, -51, -2, -22, -13, -10, -79, -133, -199, -206, -4, -75, -21, -17, -10, -122, -15, -28, -5, -1, -13, -28, -3, -15, -100, -88, -73, -52, -27, -17, -27, -87, -107, -169, -36, -25, -78, -4, -138, -23, -28, -44, -27, -430, -51, -37, -4, -42, -21, -11, -3, -72, -57, -10, -67, -42, -51, -104, -6, -61, -59, -71, -17, -104, -8, -81, -3, -167, -51, -3, -157, -40, -26, -293, -125, -94, -4, -15, -132, -5, -17, -12, -2, -17, -65, -57, -27, -18, -41, -96, -5, -63, -16, -14, -104, -117, -6, -20, -61, -38, -2, -76, -25, -27, -50, -79, -81, -97, -7, -65, -4, -7, -39, -2, -35, -18, -19, -49, -5, -42, -42, -70, -2, -4, -21, -67, -12, -34, -13, -74, -49, -11, -49, -22, -30, -106, -57, -14, -55, -21, -12, -21, -28, -25, -159, -57, -4, -12, -123, -48, -171, -39, -84, -12, -32, -74, -4, -27, -69, -53, -19, -47, -25, -18, -5, -55, -116, -82, -52, -18, -32, -18, -69, -55, -20, -90, -21, -14, -67, -27, -69, -5, -4, -21, -5, -14, -25, -1, 0, -7, -73, -59, -90, -155, -46, -39, -8, -67, -42, -27, -70, -27, -187, -36, -60, -6, -25, -127, -137, -17, -20, -380, -1, -30, -26, -22, -8, -289, -38, -37, -176, -49, -14, -93, -155, -3, -47, -10, -58, -57, -1, -5, -3, -53, -82, -47, -124, -47, -151, -3, -71, -39, -59, -213, -62, -16, -34, -3, -24, -84, -77, -11, -78, -51, -149, -52, -60, -52, -8, -50, -131, -10, -2, -36, -105, -4, -132, -35, -37, -51, -90, -180, -6, -32, -46, -4, -1, -4, -35, -3, -21, -120, -51, -33, -5, -13, -32, -12, -62, -31, -23, -88, -7, -5, -20, 0, -56, -123, -59, -48, -23, -81, -105, -38, -36, -26, -98, -56, -4, -27, -15, -47, -2, -39, -53, -11, -14, -3, -183, -68, -10, -7, -21, -60, -107, -71, -9, -12, -73, -50, -195, -68, -3, -123, -119, -32, -13, -2, -25, -1, -20, -47, -2, -19, -53, -44, -17, -37, -13, -20, -23, -48, -32, -62, -136, -28, -5, -3, -30, -42, -18, -30, -5, -114, -47, -18, -30, -1, -43, -14, -29, -64, -68, -85, -69, -104, -83, -128, -3, -131, -103, -172, -56, -36, -1, -172, -29, -75, -3, -3, -104, -9, -37, -32, -56, -29, -8, -71, -36, -69, -12, -85, -16, -131, -7, -63, -28, -159, -7, -30, -6, -69, -194, -87, -68, -58, -3, -56, -23, -17, -46, -16, -5, -19, -77, -2, -18, -17, -37, -13, -43, -6, -78, -158, -8, 0, -4, -115, -38, -13, -10, -52, -44, -64, -115, -151, -2, -51, -4, -7, -11, -5, -8, -70, -104, -2, -44, -159, -83, -65, -2, -94, -2, -19, -34, -127, -68, -90, -3, -12, -9, -13, -53, -29, -9, -34, -39, -61, -31, -37, -28, -55, -69, -83, -62, -114, -3, -175, -1, -34, -15, -58, -35, -43, -86, -45, -133, -76, -20, -26, -6, -196, -2, -118, -25, -178, -117, -1, -43, -59, -81, -156, -115, -41, 0, -28, -38, -37, -46, -194, 0, -188, -51, 0, -18, -60, -136, -30, -2, -188, -183, -46, -3, -111, -76, -4, -87, -29, -50, -8, -65, -31, -6, -72, -61, -52, -25, -15, -6, -31, -12, -91, -388, -33, -7, -12, 0, -10, -35, -14, -15, -235, -91, -11, -222, -31, -2, -37, -102, -72, -46, -13, -119, -35, -55, -31, -11, -3, -44, -233, -109, -73, -169, -18, -10, -3, -47, -31, -1, -16, -3, -26, -146, -4, -86, -144, -63, -45, -18, -29, -61, -75, -8, -52, -29, -178, -181, -7, -28, -22, -20, -8, -18, -48, -160, -16, -46, -17, -142, -41, -4, -20, -62, -100, -26, -61, -51, -83, -4, -202, -27, -124, -4, -14, -2, -9, -44, -49, -32, -25, -2, -6, -49, -48, -18, -197, -35, -4, -26, -178, -180, -94, -18, -94, -116, 0, -40, -49, -18, -80, -3, -19, -77, -110, -10, -34, -20, -33, -62, -42, -40, -53, -29, -69, -86, -34, -132, -3, -236, -167, -66, -122, -44, -3, -1, -182, -126, -49, -3, -36, -2, -114, -60, -10, -72, -141, -13, -94, -59, -53, -158, -26, -103, -62, -123, -18, -111, -56, -50, -33, -58, -65, -61, -57, -52, -10, -14, -3, -94, -138, -142, -141, -123, -94, -22, -64, -12, -25, -2, -175, -235, -7, -10, -21, -49, -31, -47, -20, -15, -47, -239, -18, -54, -25, -2, -26, -157, -20, -1, -134, -32, -179, -14, -50, -37, -3, -144, -72, -99, -102, -73, -70, -46, -78, -4, -19, -70, -4, -78, -123, -59, -226, -156, -66, -4, -56, -95, -79, -37, -70, -29, -2, -26, -76, 0, -101, -32, -58, -69, 0, -25, -158, -103, -29, -64, -30, -54, -58, -71, -54, 0, -87, -23, -2, -48, -7, -34, -147, -46, -10, -35, -2, -198, -23, -3, -23, -60, -113, -30, -11, -19, -27, -64, -269, -58, -53, -23, -32, -10, -209, -64, -30, -42, -37, -16, -6, -15, -79, -21, -21, -36, -53, -84, -64, 0, -28, -19, -114, -51, -27, -12, -24, -14, -56, -91, -79, -32, -27, -28, -100, -95, -12, -61, -21, -11, 0, -71, -3, -47, -50, -88, -14, -19, -224, -21, -4, -19, -166, -6, -30, -204, -59, -12, -63, -11, -4, -20, -13, -37, -141, -94, -26, -35, -19, -111, -34, -43, -40, -10, -15, -69, -49, -11, -36, -17, -11, -67, -52, -62, 0, -60, -41, -111, -62, -48, -18, 0, -95, -97, -67, -50, -53, -49, -14, -133, -61, -15, -8, -2, -63, -25, -32, -89, -44, -30, -26, -3, -68, -133, -70, -11, -75, -103, -4, -3, -5, -83, -21, -44, -11, -8, -29, -2, -105, -108, -184, -79, -142, -3, -39, -27, -26, -4, -68, -84, -1, -51, -27, -121, -15, -57, -50, -8, -96, -7, -91, -88, -34, -75, -11, -12, -2, -19, -36, -11, -15, -86, -81, -4, -6, -86, -29, -150, -133, -57, -16, -64, -64, -266, -2, -182, -53, -67, -68, -108, -45, -4, -149, -97, -19, -95, -170, -15, -48, -51, -41, -13, -26, -38, -2, -41, -24, -73, -49, -9, -42, -17, -5, -12, -1, -41, -97, -44, -75, -22, -16, -27, -167, -150, -177, -3, -17, -9, -7, -11, -73, -9, -151, -46, -6, -106, -9, -6, -74, -123, -23, -26, -38, -38, -6, -6, -69, -105, -26, -42, -118, -71, -3, -31, -33, -4, -49, -73, -70, -148, -4, -69, -110, -41, -10, -17, -46, -34, -21, -17, -24, -127, -6, -64, -8, -29, -8, -72, -88, -97, -43, -54, -137, -70, -5, -33, -12, -12, -83, -27, -77, -114, -15, -198, -18, -34, -16, -11, -64, -96, -6, -35, -84, -3, -130, -102, -41, -75, -71, -45, -21, -5, -42, -133, -4, -10, -61, -3, -133, -54, -65, -17, -19, -59, -17, -53, -51, -10, -37, -135, -5, -139, -44, -73, -24, -139, -49, -29, -15, -186, -37, -85, -17, -42, -49, -50, -24, -163, -18, -80, -108, -35, -58, -48, -4, -3, -119, -35, -60, -198, -56, -135, -155, -62, -29, -4, -33, -47, -11, -4, -6, -47, -30, -27, -62, -108, -82, -106, -57, -9, -14, -1, -12, -8, -146, -52, -25, -7, -87, -7, -74, -177, -6, -152, -7, -12, -10, -64, -256, -38, -74, -103, -6, -33, -18, -37, -5, -49, -17, -16, -15, -60, -11, -127, -10, -16, -50, -111, -25, -21, -58, -56, -8, -29, -15, -91, -32, -75, -6, -8, -21, -8, -36, -7, -11, -12, -39, -43, -214, -49, -10, -19, -131, -35, -17, -57, -159, -17, -35, -17, -23, -25, -6, -3, -14, -63, -8, -23, -56, -35, -52, -42, -46, -16, -10, -16, -116, -127, -43, -72, -12, -110, -8, -34, -18, -76, -6, -8, -352, -10, -76, -48, -8, -77, -33, -44, -120, -40, -104, -17, -32, -14, -24, -82, -10, -57, -6, -126, -5, -81, -132, -47, -14, -103, -19, -8, 0, -87, -108, -35, -6, -148, -43, -5, -12, -21, -4, -27, -11, -14, -21, -37, -52, -57, -103, -112, -65, -14, -12, -66, -150, -117, -35, -9, -7, -5, -90, -5, -40, -2, -136, -115, -116, -25, -120, -187, -253, -135, -128, -14, -20, -5, -46, -51, -15, -101, -113, -9, -75, -46, -10, -21, -70, -55, -44, -1, -42, -13, -13, -5, -92, -32, -141, -21, -46, -122, -43, -156, -72, -72, -180, -69, -30, -14, -81, -87, -83, -8, -27, -145, -130, -19, -50, -38, -10, -19, -57, -113, -19, -5, -42, -15, -50, -161, -42, -11, -29, -30, -17, -27, -141, -34, -4, -39, -24, -3, -95, -7, -7, -66, -3, -86, -6, -107, -12, -10, -68, -165, -158, -53, -32, -248, -34, -79, -70, -7, -13, -20, -91, -54, -43, -11, -25, -16, -39, -11, -73, -16, -47, -45, -9, -57, -22, -6, -51, -8, -5, -4, -20, -44, -4, -65, -82, -19, -120, -39, -40, -2, -24, -41, -79, -1, -23, -45, -6, -71, -26, -4, -103, -59, -14, -8, -13, -93, -134, -15, -3, -12, -97, -23, -20, -18, -34, -45, -144, -22, -64, -11, -6, -63, -67, -9, -34, -33, -89, -13, -11, -37, -11, -67, -43, -136, -100, -7, -130, -8, -67, -3, -25, -159, -74, -5, -24, -91, -10, -3, -169, -56, -59, -30, -32, -35, -7, -25, -32, -39, -34, -48, -39, -22, -120, -9, -10, -35, -25, -37, -49, -4, -53, -77, -67, -70, -14, -35, -43, -116, -15, -13, -27, -64, -61, -11, -27, -9, -79, -14, -158, -44, -73, -182, -23, -7, -91, -5, -98, -4, -38, -8, -7, -41, -232, -4, -40, -49, -197, -147, -25, -35, -26, -83, -24, -151, -9, -49, -17, -99, -17, -91, -9, -46, -22, -33, -4, -63, -7, -41, -7, -83, -4, -46, -19, -62, -6, -7, -154, -2, -14, -78, -23, -96, -14, -98, -14, -75, -110, -1, -77, -6, -125, -40, -16, -88, -57, -38, -103, -3, -37, -89, -125, -25, -16, -14, -45, -26, -29, -47, -4, -15, -5, -4, -13, -28, -117, -142, -4, -2, -10, -123, -183, -17, -55, -98, -19, -12, -36, -19, -131, -28, -8, -24, -5, -4, -44, -21, -29, -75, -6, -6, -183, -22, -4, -39, -2, -16, -140, -195, -5, -118, -3, -83, -55, -21, -2, -37, -4, -2, -29, -3, -4, -3, -76, -136, -13, -7, -10, -63, -17, -73, -74, -163, -34, -27, -35, -48, -9, -25, -5, -49, -27, -6, -38, -16, -17, -19, -19, -65, -59, -34, -40, -41, -3, -190, -169, -30, -246, -63, -20, -9, -127, -74, -38, -27, -15, -45, -5, -102, -3, -6, -46, -29, -23, -99, -51, -127, -133, -167, -28, -41, -105, -54, -6, -56, -12, -18, -43, -44, -23, -21, -82, -36, -78, -3, -25, -63, -155, -67, -8, -112, -5, -49, -21, -43, -3, -72, -83, -94, -93, -12, -7, -55, -17, -40, -8, -75, -84, -9, -11, -59, -22, -57, -113, -15, -11, -5, -5, -74, -4, -40, -87, -3, -7, -104, -26, -27, -85, -39, -70, -22, -23, -25, -81, -9, -11, -76, -10, -135, -10, -5, -57, -83, -51, -150, -53, -62, -40, -3, -144, -61, -88, -89, -120, -31, -99, -8, -21, -66, -82, -25, -49, -3, -19, -16, -5, -64, -127, -96, -28, -132, -88, -31, -21, -66, -24, -56, -61, -14, -30, -241, -76, -11, -19, -319, -44, -57, -11, -15, -121, -3, -57, -68, -72, -47, -144, -9, -42, -63, -3, -57, -37, -54, -28, -90, -397, -17, -114, -56, -24, -204, -170, -133, -52, -14, -36, -135, -57, -39, -24, -100, -40, -118, -14, -26, -52, -4, -121, -49, -63, -65, -114, -112, -239, -25, -41, -11, -38, -77, -38, -228, -261, -73, -25, -99, -3, -11, -8, -147, -78, -11, -117, -210, -34, -27, -9, -14, -16, -23, -49, -56, -13, -68, -149, -98, -119, -53, -28, -220, -7, -159, -1, -94, -113, -73, -39, -37, -41, -159, -22, -51, -48, -14, -10, -11, -93, -49, -109, -47, -29, -10, -13, -31, -148, -12, -3, -147, -41, -30, -49, -11, -14, -15, -74, -76, -81, -12, -107, -41, -15, -52, -76, -84, -18, -81, -27, -17, -82, -43, -178, -59, -92, -79, -2, -60, -2, -29, -76, -47, -116, -51, -16, -25, -31, -85, -11, -86, -3, -7, -43, -122, -42, -115, -15, -86, -74, -56, -8, -41, -5, -205, -56, -148, -23, -69, -93, -15, -37, -12, -71, -33, -39, -134, -86, -68, -56, -19, -131, -54, -78, -15, -21, -17, -32, -72, -57, -16, -50, -89, -72, -31, -91, -106, -17, -100, -13, -6, -47, -54, -10, -80, -78, -38, -27, -7, -54, -15, -58, -21, -146, -178, -3, -64, -30, -28, -11, -68, -84, -138, -60, -96, -21, -33, -53, -44, -70, -3, -59, -37, -28, -122, -41, -16, -34, -153, -86, -34, -7, -3, -5, -23, -4, -1, -36, -100, -26, -45, -63, -199, -18, -4, -74, -45, -111, -147, -21, -35, -18, -71, -61, -41, -45, -69, -40, -85, -2, -92, -17, -26, -132, -24, -29, -11, -35, -68, -135, -15, -240, -65, -38, -10, -34, -32, -58, -51, -78, -19, -12, -52, -48, -53, -3, -44, -37, -20, -30, -62, -12, -104, -23, -6, -192, -39, -67, -72, -102, -35, -62, -107, -31, -138, -21, -126, -40, -95, -9, -122, -51, -31, -159, -51, -17, -59, -20, -26, -28, -37, -2, -71, -137, -17, -64, -66, -30, -6, -32, -9, -36, -17, -179, -43, -40, -64, -91, -91, -22, -10, -26, -49, -44, -87, -146, -82, -18, -44, -73, -11, -43, -13, -61, -2, -126, -36, -15, -8, -103, -222, -62, -138, -92, -40, -57, -44, -22, -75, -139, -149, -87, -41, -20, -22, -44, -23, -45, -32, -84, -99, -176, -121, -14, -30, -7, -20, -119, -49, -5, -110, -42, -101, -92, -85, -58, -62, -5, -142, -12, -91, -72, -43, -110, -128, -55, -51, -54, -60, -23, -14, -6, -2, -14, -21, -52, -101, -13, -9, -90, -57, -52, -75, -42, -26, -2, -73, -88, -65, -98, -45, -40, -22, -10, -89, -18, -63, -30, -18, -32, -42, -14, -54, -77, -34, -66, -10, -50, -62, -24, -37, -17, -64, -26, -94, -79, -173, -59, -9, -51, -76, -117, -76, -2, -18, -26, -76, -97, -74, -48, -3, -13, -36, -11, -17, -107, -174, -32, -81, -91, -204, -93, -32, -16, -260, -74, -77, -64, -31, -33, -32, -9, -53, -50, -133, -87, -37, -36, -30, -19, -217, -11, -73, -117, -16, -3, -97, -120, -18, -135, -182, -4, -46, -343, -50, -71, -112, -41, -8, -81, -43, -121, -15, -208, -20, -32, -18, -46, -122, -172, -40, -9, -28, -83, -19, -6, -21, -22, -25, -19, -80, -66, -65, -14, -108, -64, -4, -71, -148, -125, -11, -24, -146, -141, -45, -12, -62, -24, -33, -83, -232, -58, -20, -29, -23, -91, -147, -84, -37, -50, -62, -18, -10, -112, -10, -57, -25, -34, -89, -111, -11, -19, -19, -135, -3, -43, -39, -135, -18, -90, -152, -92, -26, -28, -46, -18, -56, -54, -64, -14, -82, -24, -76, -89, -77, -54, -19, -25, -33, -10, -34, -128, -3, -56, -77, -21, -26, -28, -33, -221, -27, -73, -37, -37, -25, -74, -4, -17, -58, -18, -51, -28, -6, -23, -11, -12, -38, -72, -38, -128, -104, -20, -77, -42, -40, -53, -9, -55, -2, -111, -22, -10, -44, -4, -18, -97, -98, -8, -66, -49, -18, -33, -62, -19, -191, -72, -100, -23, -9, -11, -70, -7, -5, -69, -103, -84, -4, -32, -19, -60, -56, -98, -18, -54, -134, -61, -12, -30, -10, -71, -44, -30, -29, -5, -33, -84, -212, -71, -12, -111, -11, -24, -15, -25, -17, -19, -143, -58, -42, -101, -38, -42, -19, -135, -58, -64, 0, -64, -64, -127, -77, -70, -65, -46, -58, -17, -74, -31, -32, -18, -7, -13, -5, -24, -22, -72, -2, -6, -79, -35, 0, -59, -31, -78, -102, -109, -102, -34, -127, -186, -52, -5, -26, -17, -60, -36, -48, -175, -67, -27, -66, -48, -56, -98, -86, -62, -14, -115, -60, -69, -53, -35, -83, -20, -21, -15, -22, -67, -53, -111, -31, -106, -10, -52, -14, -40, -29, -56, -52, -35, -43, -62, -22, -145, -170, -35, -16, -18, -58, -107, -249, -11, -26, -25, -73, -16, -148, -31, -71, -95, -102, -3, -103, -6, -10, -108, -57, -77, -94, -44, -4, -42, -107, -31, -28, -86, -56, -14, -55, -21, -53, -8, -3, -83, -2, -9, -80, -57, -69, -39, -12, -95, -14, -91, -124, -52, -34, -15, -29, -141, -23, -23, -42, -88, -62, -46, -27, -40, -104, -215, -178, -6, -22, -15, -29, -17, -23, -75, -26, -11, -45, -32, -25, -36, -97, -72, -16, -19, -11, -7, -116, -62, -57, -5, -18, -93, -108, -106, -19, -231, -17, -92, -36, -72, -245, -14, -68, -103, -9, -13, -37, -52, -8, -38, -105, -137, -13, -48, -124, -4, -137, -98, -14, -95, -46, -15, -45, -34, -92, -31, -61, -38, -129, -21, -6, -26, -21, -68, -46, -74, -27, -77, -4, -75, -37, -2, -19, -32, -33, -2, -90, -60, -137, -3, -41, -27, -37, -50, -51, -38, -45, -84, -52, -29, -6, -113, -58, -18, -13, -96, -83, -23, -25, -30, -20, -110, -37, -34, -38, -26, -4, -275, -114, -29, -53, -150, -20, -40, -122, -33, -12, -16, -40, -68, -64, -40, -19, -9, -51, -27, -64, -83, -76, -9, -156, -102, -17, -25, -47, -162, -148, -26, -45, -106, -36, -55, -19, -145, -53, -23, -41, -23, -15, -34, -22, -3, -152, -129, -39, -36, -74, -54, -3, -66, -99, -159, -35, -18, -109, -37, -5, -10, -151, -42, -9, -12, -3, -25, -92, -44, -171, -13, -122, -14, -175, -11, -11, -18, -9, -65, -31, -69, -105, -41, -65, -34, -31, -103, -55, -31, -7, -13, -14, -30, -41, -17, -10, -15, -22, -50, -46, -66, -9, -63, -57, -163, -73, -54, -176, -37, -30, -15, -162, -252, -30, -95, -179, -47, -10, -152, -128, -17, -50, -98, -20, -75, -43, -7, -147, -20, -26, -149, -189, -24, -10, -16, -3, -6, -112, -47, -35, -149, -148, -17, -100, -30, -39, -12, -35, -53, -42, -24, -12, -164, -34, -71, -6, -146, -137, -51, -29, -16, -125, -91, -15, -66, -8, -113, -84, -49, -6, -114, -57, -33, -23, -26, -5, -85, -95, -130, -286, -90, -103, -41, -70, -35, -7, -21, -10, -72, -188, -162, -54, -11, -50, -27, -45, -70, -66, -12, -20, -30, -90, -32, -9, -69, -80, -15, -74, -69, -139, -23, -51, -87, -29, -95, -57, -20, -16, -27, -144, -63, -121, -16, -102, -9, -25, -64, -20, -15, -24, -118, -50, -183, -3, -99, -36, -116, -62, -56, -92, -15, -102, -185, -83, -43, -34, -116, -18, -32, -62, -37, -170, -16, -14, -59, -149, -90, -120, -79, -38, -82, -20, -10, -110, -32, -14, -57, -3, -17, -28, -38, -18, -15, -172, -140, -8, -62, -15, -25, -35, -48, -24, -85, -184, -3, -86, -196, -100, -53, -24, -9, -2, -81, -60, -59, -8, -24, 0, -18, -119, -18, -11, -18, -29, -10, -26, -63, -5, -46, -130, -46, -47, -62, -27, -95, -33, -168, -83, -21, -229, -80, -29, -45, -20, -15, -30, -15, -101, -106, -101, -31, -72, -6, -23, -35, -94, -35, -21, -41, -24, -26, -83, -8, -51, -5, -77, -8, -2, -25, -262, -12, -9, -8, -10, -204, -22, -35, -6, -12, -17, -4, -234, -182, -5, -153, -7, -44, -1, -76, -51, -70, -175, -121, -47, -94, -28, -53, -123, -32, -24, -35, -62, -33, -49, -50, -75, -158, 0, -37, -19, -34, -57, -14, -69, -76, -163, -160, -68, -66, -85, -41, -45, -71, -76, -46, -77, -17, -44, -7, -48, -58, -46, -22, -59, -81, -16, -223, -13, -6, -10, -16, -32, -36, -102, -162, -178, -61, -20, -34, -22, -7, -85, -35, -113, -15, -24, -24, -13, -3, -31, -25, -25, -25, -47, -60, -59, -19, -93, -18, -106, -63, -3, -16, -1, -105, -4, -20, -6, -40, -32, -127, -9, -102, -1, -112, -105, -52, -96, -30, -34, -41, -8, -102, -94, -41, -416, -83, -64, -22, -27, -35, -26, -62, -45, -267, -99, -127, -19, -47, -5, -110, -46, -13, -82, -39, -115, -88, -48, -69, -82, -13, -61, -42, -29, -16, -30, -145, -50, -74, -294, -4, -65, -91, -34, -4, -61, -35, -25, -31, -15, -37, -25, -21, -60, -154, -96, -1, -89, -22, -12, -148, -150, -27, -6, -83, -1, -20, -26, -36, -62, -259, -110, -109, -57, -23, -73, -60, -65, -31, -40, -69, -57, -14, -15, -39, -14, -71, -42, -38, -57, -10, -104, -8, -16, -39, -80, -70, -59, -85, -129, -15, -4, -93, -7, -11, -60, -27, -20, -198, -72, -63, -95, -10, -35, -164, -108, -45, -13, -22, -90, -86, -31, -28, -27, -18, -42, -5, -38, -57, -24, -30, -26, -42, -12, -82, -95, -29, -15, -73, -7, -115, -55, -6, -19, -164, -34, -19, -65, -55, -124, -20, -30, -7, -94, -36, -36, -12, -38, -25, -39, -102, -30, -44, -59, -20, -122, -11, -90, -78, -31, -57, -56, -17, -16, -230, -93, -46, -19, -118, -23, -25, -39, -9, -196, -156, -25, -1, -36, -32, -75, -42, -37, -101, -175, -68, -93, -104, -46, -28, -102, -32, -9, -8, -46, -2, -10, -55, -50, -88, -29, -100, -50, -117, -14, -100, -52, -133, -16, -138, -115, -51, -133, -30, -153, -56, -49, -40, -14, -7, -17, -12, -34, -19, -68, -4, -75, -8, -75, -103, -81, -1, -34, -97, -6, -36, -163, -47, -135, -62, -48, -61, -18, -36, -4, -10, -84, -38, -22, -6, -31, -146, -56, -54, -28, -29, -2, -8, -164, -39, -24, -43, -74, -19, -61, -94, -126, -13, -52, -4, -62, -51, -68, -33, -44, -40, -142, -45, -187, -34, -158, -16, -105, -78, -10, -141, -18, -4, -63, -77, -358, -86, -94, -107, -5, -84, -87, -54, -59, -41, -42, -30, -60, -26, -63, -56, -57, -19, -102, -59, -72, -23, -195, -8, -11, -30, -34, -19, -17, -7, -18, -80, -186, -132, -5, -52, -107, -74, -46, -37, -104, -101, -52, -70, -86, -35, -190, -55, -7, -8, -42, -69, -144, -110, -9, -104, -134, -44, -56, -12, -84, -18, -58, -6, -4, -5, -82, -68, -62, -15, -43, -33, -39, -16, -98, -28, -36, -162, -123, -5, -35, -11, -131, -51, -15, -71, -144, -39, -63, -49, -27, -6, -85, -9, -21, -12, -50, -48, -66, -69, -15, -56, -34, -78, -168, -40, -116, -30, -1, -64, -16, -63, -31, -140, -48, -13, -81, -51, -6, -62, -106, -24, -20, -6, -25, -56, -24, -84, -39, -31, -15, -47, -45, -81, -61, -94, -11, -120, -160, -43, -5, -14, -30, -141, -171, -10, -38, -20, -27, -12, -80, -24, -183, -57, -14, -93, -44, -12, -10, -16, -23, -17, -62, -79, -154, -45, -174, -9, -30, -165, -26, -133, -90, -60, -8, -59, -94, -69, -49, -5, -158, -149, -16, -13, -26, -10, -23, -97, -19, -18, -49, -27, -41, -61, -163, -15, -19, -76, -132, -17, -17, -101, -36, -6, -5, -124, -37, -18, -55, -31, -95, -92, -95, -19, -39, -125, -44, -27, -98, -12, -10, -48, -31, -237, -25, -15, -179, -37, -16, -47, -8, -62, -33, -57, -19, -38, -7, -73, -78, -53, -113, -67, -161, -76, -54, -95, -160, -50, -70, -58, -31, -148, -17, -34, -66, -20, -89, -21, -61, -133, -62, -63, -23, -15, -12, -24, -48, -25, -70, -59, -25, -44, -44, -33, -132, -11, -28, -40, -12, -53, -21, -21, -19, -53, -19, -194, -11, -246, -26, -58, -48, -109, -32, -12, -78, -140, -46, -20, -78, -100, -143, -42, -13, -20, -16, -90, -95, -79, -12, -60, -8, -55, -69, -33, -51, -22, -67, -33, -172, -12, -71, -75, -42, -60, -106, -29, -26, -53, -44, -11, -13, -19, -92, -131, -79, -6, -146, -20, -181, -152, -19, -11, -88, -92, -13, -31, -52, -109, -10, -100, -80, -8, -98, -174, -93, -13, -150, -66, -63, -53, -72, -16, -24, -23, -81, -155, -32, -63, -4, -115, -9, -153, -12, -97, -20, -40, 0, -28, -22, -78, -4, -69, -4, -15, -108, -16, -80, -22, -10, -71, -4, -155, -16, -27, -44, -23, -187, -33, -12, -16, -109, -81, -79, -9, -80, -120, -225, -122, -23, -154, -26, -89, -77, -235, -41, -15, -72, -4, -8, -9, -55, -16, -23, -38, -28, -67, -101, -54, -38, -188, -13, -17, -234, -28, -14, -26, -51, -90, -47, -40, -26, -37, -71, -16, -114, -152, -8, -116, -48, -73, -46, -21, -19, -180, -49, -24, -8, -22, -79, -12, -65, -3, -16, -8, -45, -32, -16, -26, -95, -45, -9, -18, -128, -21, -62, -8, -42, -59, -289, -50, -14, -203, -36, -26, -40, -6, -11, -140, -64, -41, -7, -23, -3, -22, -31, -42, -11, -51, -46, -35, -166, -60, -14, -20, -31, -25, -78, -41, -19, -23, -51, -97, -16, -45, -71, -42, -4, -67, -76, -21, -152, -11, -33, -160, -30, -66, -27, -51, -38, -30, -82, -26, -149, -37, -194, -36, -7, -12, -43, -14, -17, -26, -69, -23, -135, -125, -6, -37, -82, -174, -45, -89, -37, -46, -35, -261, -36, -46, -20, -42, -174, -33, -29, -34, -15, -34, -256, -21, -76, -63, -34, -11, -50, -93, -96, -22, -133, -84, -18, -34, -15, -109, -80, -162, -53, -18, -169, -26, -36, -131, -32, -43, -10, -13, -174, -23, -22, -36, -15, -85, -111, -231, -166, -40, -8, -145, -106, -31, -31, -254, -11, -39, -45, -11, -222, -64, -39, -21, -7, -79, -104, -26, -127, -51, -156, -133, -59, -193, -126, -75, -97, -24, -7, -9, -63, -114, -36, -44, -91, -24, -32, -18, -19, -52, -113, -11, -82, -131, -8, -31, -34, -32, -56, -72, -58, -66, -155, -75, -74, -28, -25, -223, -80, -101, -93, -11, -61, -56, -17, -59, -52, -69, -96, -105, -75, -47, -123, -50, -316, -18, -73, -57, -4, -7, -37, -20, -60, -12, -98, -24, -42, -21, -91, -156, -82, -77, -22, -163, -43, -88, -112, -59, -139, -98, -194, -96, -71, -85, -26, -24, -104, -212, -41, -16, -75, 0, -50, -21, -25, -28, -54, -54, -42, -282, -32, -65, -44, -58, -227, -63, -4, -13, -4, -16, -173, -5, -26, -18, -28, -10, -65, -14, -42, -12, -101, -76, -14, -34, -171, -7, -15, -16, -46, -8, -49, -2, -39, -32, -311, -149, -17, -32, -19, -90, -42, -23, -99, -37, -24, -33, -47, -28, -5, -40, -23, -24, -27, -33, -50, -72, -15, -242, -30, -153, -21, -27, -166, -47, -82, -10, -14, -28, -33, -59, -14, -51, -46, -80, -87, 0, -91, -19, -4, -12, -94, -34, -11, -16, -130, -90, -3, -92, -183, -62, -53, -3, -168, -79, -160, -186, -46, -17, -71, -14, -47, -106, -45, -123, -24, -64, -42, -39, -40, -10, -2, -136, -36, -10, -179, -116, -31, -53, -54, -7, -33, -36, -13, -45, -13, -139, -73, -17, -32, -100, -13, -71, -156, -68, -128, -12, -50, -25, -28, -153, -151, -46, -12, -78, -107, -75, -19, -204, -88, -1, -226, -227, -99, -66, -69, -112, -9, -117, -38, -114, -83, -7, -164, -72, -17, -53, -17, -21, -60, -62, -265, -83, -102, -44, -43, -96, -39, -7, -19, -58, -37, -94, -149, -40, -33, -15, -56, -52, -66, -46, -10, -112, -53, -66, -44, -9, -54, -35, -16, -57, -77, -73, -79, -54, -138, -134, -4, 0, -78, -94, -119, -73, -2, -2, -16, -119, -131, -79, -137, -35, -40, -8, -132, -39, -15, -69, -45, -47, -4, -72, -40, -13, -25, -89, -11, -132, -27, -157, -42, -13, -5, -21, -42, -53, -101, -5, -46, -156, -87, -8, -57, -24, -8, -94, -55, -159, -133, -20, -143, -11, -60, -7, -18, -65, -101, -80, -27, -47, -74, -25, -10, -160, -63, -43, -36, -34, -26, -6, -6, -58, -54, -6, -27, -19, -30, -236, -27, -183, -66, -88, -42, -88, -44, -217, -13, -68, -64, -7, -47, -137, -57, -90, -31, -9, -66, -118, -13, -26, -10, -27, -13, -31, -30, -18, -53, -109, -133, -29, -31, -53, -33, -31, -25, -99, -63, -59, -70, -24, -56, -108, -53, -110, -108, -77, -21, -37, -39, -27, -22, -71, -29, -30, -24, -102, -212, -19, -11, -6, -35, -49, -95, -176, -26, -93, -23, -31, -18, -5, -39, -35, -38, -2, -16, -26, -61, -108, -147, -73, -49, -166, -65, -63, -326, -48, -30, -47, -43, -54, -25, -8, -20, -85, -15, -83, -21, -148, -70, -64, -36, -42, -36, -67, -58, -67, -35, -25, -55, -30, -26, -40, -74, -57, -4, -45, -9, -33, -47, -43, -36, -8, -11, -67, -64, -59, -97, -106, -150, -88, -20, -132, -21, -26, -156, -3, -13, -147, -162, -13, -6, -24, -147, -28, -16, -19, -14, -1, -159, -119, -14, -73, -151, -19, -20, -15, -104, -18, -43, -29, -33, -73, -14, -38, -3, -66, -8, -88, -178, -71, -77, -11, -182, -25, -27, -9, -61, -66, -11, -119, 0, -37, -123, -15, -31, -55, -4, -52, -87, -48, -18, -9, -155, -76, -36, -57, -70, -21, -107, -2, -58, -75, -22, -69, -7, -87, -34, -16, -18, -122, -6, -52, -16, -25, -81, -10, -19, -86, -96, -130, -7, -80, -39, -92, -48, -83, -99, -25, -96, -45, -135, -119, -2, -66, -20, -4, -94, -33, -37, -42, -241, -38, -34, -83, -81, -39, -57, -38, -15, -57, -143, -54, -1, -68, -2, -20, -3, -33, -131, -17, -48, -29, -46, -34, -13, -48, -113, -5, -18, -34, -95, -17, -23, -29, -108, -71, -45, -45, -116, -16, -42, -4, -17, -58, -88, -56, -23, -221, -3, -60, -11, -25, -40, -5, -33, -64, -9, -3, -22, -47, -12, -37, -5, -47, -70, -199, -138, -25, -22, -188, -149, -127, -47, -112, -21, -47, -14, -31, -90, -61, -47, -2, -27, -75, -10, -63, -39, -21, -201, -72, -6, -13, -12, -33, -57, -79, -24, -32, -27, -91, -61, -2, -69, -191, -16, -76, -126, -50, -41, -69, -468, -29, -38, -54, -23, -46, -53, -85, -53, -18, -26, -150, -123, -56, -189, -51, -33, -100, -83, -35, -1, -63, -197, -69, -75, -7, -81, -60, -46, -13, -77, -120, -7, -77, -89, -97, -20, -104, -20, -3, -33, -39, -31, -120, -100, -26, -35, -47, -10, -24, -6, -113, -108, -71, -89, -129, -40, -20, -17, -16, -3, -55, -33, -74, -44, -186, -143, -211, -55, -95, -38, -34, -117, -38, -23, -37, -30, -18, -33, -31, -16, -84, -16, -118, -49, -44, -5, -1, -60, -7, -110, -49, -72, -61, -64, -131, -37, -56, -141, -14, -153, -71, -77, -36, -26, -55, -62, -73, -13, -60, -67, -76, -44, -33, -151, -21, -14, -101, -71, -30, -191, -66, -33, -6, -44, -128, -77, -96, -186, -28, -41, -22, -19, -126, -17, -39, -41, -23, -142, -24, -117, -53, -2, -54, -30, -16, -76, -14, -7, -150, -11, -17, -43, -14, -5, -9, -42, -155, -48, -178, -118, -128, -36, -20, -116, -81, -9, -8, -41, -47, -80, -17, -12, -144, -119, -65, -148, -80, -164, -13, -30, -170, -34, -30, -40, -11, -32, -13, -59, -16, -81, -80, -90, -1, -20, -11, -67, -22, -153, -30, -16, -12, -16, -81, -5, -2, -52, -9, -60, -51, -138, -40, -48, -5, -107, -4, -18, -37, -11, -70, -10, -59, -38, -11, -46, -32, -16, -68, -29, -33, -379, -71, -7, -25, -38, -14, -3, -106, -1, -15, -32, -20, -59, -68, -20, -10, -80, -72, -64, -46, -57, -94, -5, -60, -20, -60, -98, -19, -77, -19, -37, -4, -52, -80, -22, -117, -106, -29, -41, -18, -15, -150, -38, -14, -124, -156, -27, -17, -8, -43, -26, -157, -145, -22, -57, -2, -45, -4, -12, -8, -48, -16, -3, -73, -70, -121, -104, -16, -10, -179, -31, -11, -38, -55, -176, -4, -34, -9, -59, -71, -118, -18, -64, -17, -132, -108, -108, -234, -28, -8, -34, -93, -371, -14, -123, -43, -25, -20, -51, -58, -38, -7, -71, -9, -143, -8, -101, -93, -50, -85, -237, -6, -146, -7, -17, -21, -103, -149, -53, -144, -102, -2, -93, -19, -27, -87, -55, -37, -35, -16, -8, -24, -13, -23, -69, -68, -29, -104, -13, -71, -106, -32, -163, -54, -25, -74, -12, -38, -52, -38, -53, -13, -26, -104, -157, -18, -197, -74, -115, -129, -48, -14, -223, -139, -257, -21, -90, -93, -73, -139, -85, -10, -66, -24, -41, -27, -81, -55, -69, -66, -82, -197, -11, -148, -52, -139, -24, -62, -25, -147, -64, -41, -4, -19, -90, -23, -3, -6, -8, -26, -3, -91, -287, -221, -70, -29, -10, -111, -37, -16, -103, -109, -46, -63, -3, -13, -31, -51, -61, -25, -101, -54, -44, -73, -63, -153, -12, -27, -55, -48, -3, -26, -63, -45, -77, -65, -60, -32, -202, -22, -4, -12, -65, -30, -50, -51, -73, -46, -38, -59, -141, -129, -35, -40, -3, -150, -9, -40, -44, -113, -44, -19, -141, -35, -85, -51, -36, -35, -118, -18, -36, -92, -123, -16, 0, -99, -55, -26, -83, -16, -30, -28, -13, -28, -84, -32, -40, -25, -20, -142, -6, -76, -23, -9, -47, -15, -32, -54, -3, -68, -56, -131, -148, -25, -27, -55, -115, -66, -8, -32, -159, -19, -79, -3, -43, -45, -141, -29, -2, -43, -27, -25, -60, -28, -5, -121, -51, -51, -9, -32, -22, -12, -3, -45, -86, -78, -32, -14, -49, -7, -56, -14, -43, -79, -43, -64, -70, -52, -34, -218, -100, -88, -56, -49, -60, -10, -47, -60, -63, -24, -6, -101, -109, -31, -46, -112, -37, -8, -8, -13, -36, -21, -14, -125, -290, -4, -35, -74, -69, -20, -88, -82, -65, -123, -2, -21, -25, -66, -77, -126, -19, -28, -43, -11, -13, -13, -15, -15, -19, -108, -51, -33, -45, -26, -131, -3, -135, -74, -9, -7, -6, -36, -95, -25, -115, -31, -78, -117, -71, -17, -30, -4, -27, -47, -28, -29, -78, -205, -109, -80, -235, -40, -85, -9, -86, -9, -19, -56, -54, -104, -62, -54, -115, -1, -84, -11, -21, -89, -2, -135, -56, -19, -177, -109, -21, -19, -78, -101, -25, -23, -14, -79, -86, -125, -50, -12, -102, -48, -80, -23, -38, -8, -14, -33, -10, -14, -22, -186, -37, -101, -25, -131, -46, -12, -14, -2, -44, -10, -13, -21, -37, -37, -23, -70, -93, -21, -45, -75, -69, -180, -64, -1, -79, -47, -70, -108, -22, -17, -256, -98, -63, -55, -24, -150, -27, -12, -280, -21, -8, -19, -127, -17, -155, -23, -72, -10, -56, -11, -135, -89, -10, -163, -45, -48, -18, -40, -113, -10, -6, -23, -128, -4, -284, -1, -61, -104, -119, -29, -249, -185, -25, -8, -61, -41, -13, -68, -41, -45, -113, -44, -14, -17, -12, -78, -25, -39, -38, -4, -103, -62, -108, -46, -70, -70, -141, -38, -124, -77, -27, -31, -40, -47, -63, -1, -80, -55, -26, -15, -215, -35, -47, -38, -116, -24, -13, -89, -59, -19, -294, -17, -16, -21, -13, -33, -117, -131, -16, -53, -31, -20, -103, -23, -34, 0, -67, -42, -20, -69, -42, 0, -1, -215, -42, 0, -28, -78, -3, -23, -62, -4, -63, -43, -21, -188, -12, -48, -45, -108, -132, -42, -27, -108, -71, -11, -4, -32, -105, -15, -25, -12, -76, -5, -105, -19, -74, -37, -47, -170, -10, -10, -233, -59, -75, -49, -26, 0, -99, -56, -83, -21, -58, -163, -138, -177, -56, -4, -31, -13, -15, -53, -98, -8, -74, -3, -56, -72, -95, -39, -253, -23, -20, -91, -87, -2, -22, -15, -63, -9, -23, -38, -71, -68, -22, -89, -38, -35, -45, -6, -18, -14, -31, -32, 0, -66, -26, -140, -69, -204, -15, -95, -54, -1, -165, -13, -29, -67, -87, -56, -26, -21, -218, -187, -34, -76, -39, -4, -141, -148, -28, -17, -86, -47, -207, -29, -68, -19, -12, -119, -18, -14, -126, -65, -90, -44, -34, -45, -51, -75, -8, -61, -132, -93, -16, -34, -43, 0, -148, -25, -6, -67, -132, -126, -107, -13, -22, -24, -73, -13, -115, -55, -244, -195, -23, -41, -108, -25, -20, -106, -17, -135, -111, -3, -13, -43, -15, -6, -31, -2, -26, -38, -50, -70, -170, -24, -2, -52, -52, -47, -40, -15, -9, -9, -118, -60, -5, -16, -56, -197, -21, -34, -48, -91, -80, -28, -36, -6, -67, -27, -116, -33, -90, -35, -41, -107, -5, -55, -9, -90, -146, -13, -100, -17, -88, -8, -39, -9, -61, -14, -125, -13, -74, -33, -57, -46, -49, -46, -36, 0, -33, -65, -15, -15, -30, -22, -17, -40, -27, -38, -79, -17, -22, -26, -38, -26, -116, -156, -84, -24, -58, -49, -8, -11, -5, -75, -52, 0, -14, -9, -163, -35, -158, -92, -57, -16, -11, -88, -27, -25, -49, -63, -39, -56, -7, -198, -9, -158, -17, -39, -56, -5, -56, -129, -75, -52, -56, -14, -9, -8, -52, -42, -124, -7, -29, -26, -15, -16, -37, -27, -2, -12, -88, -47, -105, -4, -15, -24, -107, -54, -51, -42, -76, -129, -66, -46, -63, -75, -14, -161, -16, -227, -47, -4, -15, -118, -98, -34, -69, -31, -55, -136, -129, -104, -60, -87, -17, -43, -66, -27, -136, -38, -12, -22, -59, -89, -21, -21, -39, -4, -1, -11, -122, -84, -40, -32, -131, -45, -10, -68, -12, -33, -130, -3, -14, -83, -99, -19, -17, -268, -49, -64, -65, -47, -40, -135, 0, -23, -72, -92, -40, -10, -102, -18, -75, -37, -71, -11, -2, -18, -20, -124, -37, -114, -78, -25, -76, -44, -30, -36, -72, -96, -49, -79, -41, -114, 0, -278, -23, -24, -55, -16, -51, -28, -98, -57, -9, -45, -13, -120, -45, -48, -10, -141, -45, -64, -26, -8, -246, -81, -38, -29, -88, -19, -202, -22, -11, -60, -72, -88, -18, -17, -161, -206, -52, -19, -16, -84, -20, -25, 0, -2, -44, -1, -47, -32, -45, -28, -43, -13, -42, -77, -34, -76, -17, -46, -75, -281, -83, -27, -40, -5, -2, -14, -2, -58, -15, -24, -64, -103, -17, -41, -3, -29, -7, -27, -103, -43, -51, -49, -96, -48, -4, -11, -62, -7, -144, -18, -24, -13, -37, -19, -96, -27, -53, -15, -52, -43, -107, -25, -189, -25, -25, -135, -17, -23, -117, -20, -115, -196, -87, -23, -22, -10, -127, -84, -6, -21, -27, -78, -35, -158, -28, -114, -33, -46, -42, -31, -50, -238, -133, -79, -52, -23, -19, -5, -53, -9, -30, -60, -19, -90, -14, -76, -46, -146, -111, -64, -46, -94, -104, -64, -90, -36, -5, -55, -79, -59, -98, -78, -2, -38, -53, -43, -2, -12, -14, -29, -47, -3, -24, -5, -116, -10, -118, -70, -31, -77, -17, -30, -129, -46, -10, -35, -8, -89, -96, -21, -28, -6, -93, -24, -39, -84, -38, -91, -41, -9, -29, -163, -14, -37, -23, -81, -41, -25, -82, -24, -86, -36, -8, 0, -166, -58, -50, 0, -9, -133, -48, -233, -3, -90, -5, -11, -35, -119, -135, -185, -32, -8, -159, -6, -80, -167, -42, -52, -56, -10, -190, -42, -111, -8, -44, -15, -27, -7, -5, -88, -11, -36, -180, -4, -21, -54, -7, -2, -4, -32, -116, -20, -57, -10, -18, -80, -33, -112, -145, -27, -18, -19, -51, -38, -13, -110, -23, -3, -53, -230, -88, -34, -28, -45, -22, -38, -6, -6, -96, -20, -1, -50, -8, -85, -12, -44, -49, -64, -30, -74, -10, -22, -67, -36, -100, -117, -55, -5, -63, -148, -2, -65, -4, -102, -81, -28, -112, -57, -112, -84, -25, -58, -24, 0, -63, -85, -83, -91, -63, -63, -32, -21, -191, -21, -48, -126, -37, -164, 0, -112, -12, -68, -1, -38, -1, -82, -26, -31, -17, -66, -34, -34, -15, -4, -134, -48, -16, -37, -16, -128, -45, -178, -80, -42, -2, -55, -33, -66, -122, -72, -70, -107, -78, -54, 0, -44, -60, -82, -62, -1, -58, -35, -19, -168, -82, -190, -40, -14, -3, -59, -12, -40, -37, -14, -77, -33, -4, -16, -116, -73, -10, -50, -49, -34, -69, -2, -118, -5, -2, -17, -11, -209, -136, -59, -6, -142, -18, -26, -16, -183, -84, -35, -230, -5, -134, -57, -14, -13, -1, -25, -3, -57, -65, -33, -26, -58, -84, -139, -51, -62, -67, -243, -28, -15, -11, -58, -60, -30, -166, -62, -114, -39, -48, -43, -72, -14, -79, -50, -182, -60, -37, -65, -20, -6, -6, -19, -9, -149, -35, -19, -55, -47, -30, -9, -21, -123, -56, -7, -2, -25, -38, -70, -45, -1, -62, -67, -11, -22, -152, -21, -67, -9, -84, -12, -8, -30, -10, -62, -12, -109, -16, -54, -98, -93, -47, -5, -140, -66, -36, -80, -37, -17, -119, -58, -90, -16, -36, -28, -11, -37, -9, -9, -11, -297, -141, -101, -120, -40, -52, -12, -227, -26, -25, -40, -38, -46, -18, -7, -67, -12, -63, -23, -17, -103, 0, -70, -60, -67, -17, -21, -82, -128, -59, -197, -135, -107, -78, -51, -59, -36, -31, -116, -59, -57, -143, -45, -15, -88, -5, -103, -91, -26, -14, -19, -42, -28, -7, -60, -46, -180, -30, -122, -41, -12, -50, -138, -63, -13, -16, -16, -68, -37, -52, -15, -53, -3, -13, -35, -50, -173, -171, -226, -194, -76, -84, -21, -63, -5, -50, -9, -1, -43, -81, -24, -24, -80, -14, -82, -3, -63, -18, -160, -1, -104, -24, -119, -70, -11, -54, -72, -45, -51, -10, -110, -33, -230, -27, -96, -183, -8, -71, -30, -73, -79, -25, -120, -26, -32, -6, -22, -45, -23, -61, -12, -103, -2, -48, -200, -2, -2, -4, -26, -21, -20, -10, -15, -30, -41, -72, -8, -48, -53, -8, -20, -126, -51, -50, -68, -173, -118, -61, -15, -10, -42, -16, -51, -68, -98, -142, -84, -19, -71, -58, -140, -50, -38, -23, -19, -10, -19, -17, -70, -62, -21, -33, -9, -43, -54, -183, -128, -1, -82, -197, -118, -2, -13, -16, -29, -19, -1, -16, -35, -76, -19, -9, -92, -47, -21, -5, -59, -71, -10, -8, -53, -32, -49, -12, -34, -4, -92, -21, -59, -33, -14, -36, -156, -126, -144, -34, -24, -43, -72, -67, -5, -32, -36, -28, -8, -110, -4, -27, -138, -7, -35, -37, -42, -33, -110, -3, -45, -152, -40, -25, -111, -35, -3, -27, -119, -7, -18, -40, -126, -17, -112, -27, -39, -27, -79, -23, -24, -55, -143, -12, -43, -34, -16, -120, -51, -75, -20, -13, -99, -28, -75, -43, -30, -74, -12, -65, -25, -39, -35, -80, -39, -12, -80, -28, -7, -1, -18, -37, -43, -77, -199, -127, -85, -44, -64, -53, -6, -19, -23, -8, -1, -120, -61, -57, -24, -6, -22, -82, -6, -64, -29, -14, -66, -8, -49, -82, -51, -93, -29, -11, -94, -52, -110, -353, -41, -86, -154, -87, -5, -26, -6, -16, -37, -4, -56, -22, -12, -31, -7, -115, -82, -1, -44, -12, -45, -28, -95, -35, -24, -2, -16, -33, -42, -176, -2, -56, -61, -219, -33, -11, -29, -4, -30, -27, -136, -45, -8, -158, -44, -61, -123, -12, -35, -19, -77, -15, -7, -62, -3, -33, -21, -121, -188, -16, -1, -20, -164, -40, -2, -30, -11, -51, -134, -18, -2, -108, -4, -27, -131, -26, -89, -41, -16, -156, -11, -1, -100, -10, -22, -142, -6, -99, -13, -203, -96, -21, -29, -67, -24, -45, -15, -47, -12, -7, -4, -33, -61, -37, -68, -66, -173, -37, -64, -68, -47, -448, -33, -38, -12, -87, -75, -133, -26, -33, -101, -11, -23, -43, -6, -25, -2, -10, -18, -119, -23, -91, -34, -8, -61, -58, -17, -46, -14, -62, -57, -39, -59, -81, -33, -1, -165, -46, -64, -4, -102, -27, -9, -24, -18, -190, 0, -105, -129, -47, -66, -144, -62, -91, -75, -91, -29, -15, -57, -112, -21, -36, -198, -64, -85, -22, -11, -327, -25, -13, -19, -30, -13, -39, -38, -50, -46, -8, -15, -65, -64, -119, -46, -113, -53, -68, -5, -37, -5, -3, -124, -38, -198, -126, -80, -12, -77, -47, -66, -42, -2, -43, -20, -40, -65, -65, -82, -39, -70, -18, -280, -77, -49, -71, -11, -81, -24, -33, -27, -35, -35, -148, -17, -17, -8, -221, -62, -292, -89, -7, -18, -110, -12, -6, -63, -24, -28, -7, -2, -22, -45, -114, -94, -92, -29, -7, -20, -36, -101, -120, -76, -22, -63, -86, -5, -134, -56, -16, -55, -50, -120, -193, -41, -33, -43, -177, -132, -93, -20, -3, -17, -12, -24, -21, -44, -236, -95, -7, -36, -14, -39, -58, -13, -74, -59, -62, -45, -19, -60, -19, -67, -3, -105, -58, -57, -96, -1, -22, -175, -206, -46, -108, -76, -81, -12, -33, -53, -74, -182, -34, -60, -36, -77, -30, -5, -56, -62, -45, -13, -77, -37, -34, -31, -1, -75, -28, -92, -108, -16, -32, -29, -111, -15, -54, -124, -12, -27, -68, -27, -40, -42, -13, -4, -36, -132, -24, -53, -19, -53, -4, -17, -109, -37, -29, -47, -154, -32, -96, -17, -104, -75, -77, -9, -88, -48, -94, -30, -100, -43, -8, -60, -115, -76, -6, -87, -22, -69, -4, -42, -81, -64, -155, -9, -42, -93, -38, -38, -111, -24, -58, -5, -181, -7, -21, -4, 0, -9, -83, -53, -129, -97, -113, -141, -64, -22, -61, -50, -68, -31, -43, -86, -72, -89, -180, -82, -21, -46, -37, -12, -63, -88, -68, -64, -61, -116, -202, -14, -128, -19, -38, -68, -69, -4, -33, -21, -44, -70, -30, -53, -21, -35, -23, -16, -9, -72, -138, -67, -75, -1, -29, -6, -24, -146, -11, -83, -60, -12, -160, -124, -49, -47, -5, -167, -18, -19, -47, -73, -152, -53, -4, -134, -67, -14, -68, -16, -52, -29, -114, -110, -23, -36, -204, -23, -72, -126, -35, -47, -43, -286, -40, -3, -6, -19, -25, -93, -13, -31, -37, -60, -104, -152, -3, -53, -33, -18, -123, -1, -85, -108, -63, -23, -12, -95, -66, -11, -57, -58, -4, -74, -22, -107, -166, -20, -20, -36, -22, -87, -100, -45, -29, -18, -46, -57, -108, -20, -88, -23, -26, -20, -164, -47, -47, -99, -28, -39, -223, -33, -23, -33, -41, -48, -45, -165, -25, -35, -36, -41, -47, -51, 0, -21, -27, -4, -5, -16, -12, -66, -12, -3, -75, -17, -88, -75, -40, -1, -2, -11, -39, -53, -72, -18, -116, -12, -53, -64, -110, -177, -71, -29, -38, -67, -31, -24, -17, -4, -36, -102, -15, -16, -119, -9, -57, -2, -15, -88, -17, -25, -14, -40, -115, -14, -48, -146, -36, -36, -34, -1, -62, -41, -12, -46, -141, -6, -23, -26, -34, -82, -70, -13, -68, -32, -46, -65, -79, -69, -171, -48, -31, -45, -45, -47, -10, -39, -34, -96, -89, -11, -70, -23, -8, -49, -48, -85, -90, -34, -96, -24, -45, -32, -30, -13, -50, -12, -102, -80, -114, -23, -26, -36, -12, -79, -4, -13, -36, -87, -32, -64, -6, -40, -41, -30, -16, -70, -142, -126, -7, -79, -28, -12, -11, -7, -56, -48, -84, -42, -7, -58, -29, -66, -95, -38, -74, -5, -82, -51, -35, -118, -60, -50, -111, -33, -37, -18, -26, -48, -35, -84, -41, -86, -32, -4, -27, -25, -64, -27, -93, -76, -30, -11, -165, -104, -99, -63, -9, -89, -89, -108, -1, -62, -33, -10, -56, -43, -94, -22, -61, -93, -155, -11, -14, -26, -16, -104, -148, -10, -11, -37, -101, -32, -35, -65, -26, -28, -23, -19, -5, -19, -4, -49, -29, -21, -65, -20, -49, -69, -17, -41, -2, -132, -32, -70, -39, -13, -9, -22, -66, -103, -40, -30, -15, -130, -225, -39, -15, 0, -104, -68, -19, -68, -12, -37, -71, -116, -56, -51, -74, -31, -13, -5, -210, -17, -25, -65, -33, -62, -26, -18, -50, -103, -15, -69, -74, -124, -25, -3, -4, -20, -5, -30, -42, -63, -114, -101, -5, -11, -20, -71, -88, -63, -31, -77, -16, -101, -84, -27, -28, -86, -43, -18, -57, -13, -24, -58, -116, -26, -71, -207, -66, -65, -163, -64, -66, -61, -18, -137, -20, -64, -54, -42, -47, -80, -68, -32, -22, -10, -140, -25, -43, -3, -15, -56, -92, -66, -162, -4, -16, -62, -29, -23, -50, -145, -32, -38, -68, -13, -32, -20, -69, -75, -167, -22, -100, -65, -61, -23, -65, -118, -149, -100, -218, -30, -28, -101, -45, -82, -3, -160, -15, -52, -1, -62, -203, -38, -117, -29, -211, -47, -108, -203, -170, -11, -38, -9, -138, -106, -51, -80, -69, -48, -12, -24, -205, -40, -33, -11, -50, -90, -14, -23, -30, -50, -34, -23, -20, -60, -141, -57, -31, -181, -50, -64, -97, -59, -13, -33, -58, -50, -24, -102, -103, -16, -78, -39, -124, -89, 0, -41, -64, -91, -11, -85, -18, -3, -13, -15, -3, -141, -34, -160, -14, -1, -17, -4, -6, -66, -29, -55, -24, -11, -36, -34, -84, -89, -122, -54, -293, -30, -11, -4, -46, -17, -50, -80, -84, -13, -119, -49, -15, -33, -49, -85, -120, -340, -48, -96, -13, -56, -154, -69, -102, -12, -12, -45, -27, -23, -43, -165, -26, -71, -51, -108, -71, -33, -32, -11, -3, -172, -53, -70, -30, -2, -95, -40, -41, -117, -31, -42, -134, -35, -47, -30, -38, -35, -56, -32, -111, -13, -5, -147, -21, -113, -16, -33, -31, -18, -33, -39, -68, -30, -69, -109, -27, -89, -102, -91, -191, -9, -26, -234, -2, -20, -28, -46, -65, -71, -121, -38, -53, -14, -80, -28, -57, -76, -39, -47, -156, -108, -25, -2, -20, -139, -36, -71, -106, -118, -36, -58, -44, -73, -9, -24, -67, -29, -95, -10, -8, -124, -142, -60, -55, -67, -335, -105, -23, -41, -16, -57, -83, -30, -70, -83, -144, -10, -45, -14, -20, -8, -29, -19, -110, -56, -24, -75, -53, -84, -6, -95, -80, -24, -12, -67, -44, -19, -48, -8, -22, -20, -15, -29, -11, -146, -14, -24, -97, -46, -62, -146, -10, -123, -47, -74, -7, -59, -9, -56, -19, -152, -10, -4, -45, -99, -119, -38, -37, -75, -68, -24, -50, -26, -40, -115, -68, -23, -12, -5, -78, -36, -14, -10, -64, -136, -18, -17, -43, -47, -131, -57, -25, -24, -3, -31, -46, -124, -34, -66, -285, -6, -63, -79, -18, -177, -93, -124, -22, -61, -55, -64, -104, -61, -50, -46, -11, -44, -63, -25, -56, -23, -32, -4, -41, -5, -47, -52, -43, -18, -63, -22, -19, -116, -46, -57, -49, -51, -27, -9, -45, -88, -29, -18, -91, -40, -20, -100, -12, -75, -21, -44, -62, -16, -7, -17, -21, -54, -321, -139, -137, -66, -19, -116, -86, -39, -28, -79, -42, -45, -111, -38, -12, -159, -70, -13, -13, -26, -59, -41, -88, -73, -24, -47, -19, -122, -52, -30, -19, -105, -178, -15, -134, -40, -17, -145, -113, -53, -26, -15, -60, -27, -4, -5, -6, -66, -42, -98, -135, -71, -68, -21, -61, -33, -72, -80, -64, -60, -13, -34, -37, -34, -60, -81, -119, -26, -9, -91, -63, -51, -168, -20, -12, -14, -32, -32, -110, -17, -152, -101, -85, -61, -37, -55, -141, -23, -25, -38, -16, -66, -50, -28, -22, -51, -3, -100, -113, -23, -24, -35, -199, -134, -50, -96, -48, -37, -112, -52, -119, -155, -18, -145, -60, -219, -87, -43, -77, -55, -55, -9, -41, -30, -8, -38, -32, -6, -7, -19, -41, -38, -52, -76, -37, -10, -480, -49, -70, -147, -42, -52, -74, -58, -30, -29, -67, -75, -50, -4, -46, -72, -14, -45, -6, -89, -4, -3, -79, -80, -47, -16, -121, -27, -48, -14, -40, -35, -41, -20, -119, -14, -31, -70, -30, -19, -15, -34, -66, -20, -19, -51, -8, -68, -73, -45, -14, -82, -10, -5, -39, -51, -31, -51, -61, -25, -211, -59, -46, -2, -32, -75, -59, -113, -28, -81, -45, -59, -13, -75, -129, -222, -177, -19, -66, -67, -11, -64, -97, -68, -5, -1, -30, -50, -32, -35, -46, -4, -16, -34, -93, -79, -141, -12, -93, -60, -43, -94, -92, -10, -189, -10, -54, -11, -37, -173, -5, -54, -36, -13, -27, -162, -17, -19, -12, -41, -10, -27, -34, -14, -167, -16, -6, -71, -110, -15, -92, -30, -27, -105, -27, -43, -102, -2, -58, -81, -133, -21, -14, -56, -131, -10, -24, -45, -26, -11, -44, -69, -108, -108, -18, -24, -11, -57, -32, -14, -77, -30, -20, -8, -71, -30, -16, -140, -35, -9, -52, -114, -97, -34, -87, -21, -16, -90, -111, -15, -33, -17, -34, -59, -78, -20, -7, -91, -3, -54, -121, -28, -58, -52, -36, -25, -114, -14, -23, -79, -39, -117, -21, -75, -62, -15, -3, -21, -19, -48, -51, -71, -37, -56, -46, -8, -37, -22, -182, -38, -22, -109, -156, -116, -93, -60, -23, -39, -26, -6, -24, -16, -94, -30, -3, -59, -42, -51, -30, -68, -16, -92, -29, -8, -122, -4, -47, -130, -16, -42, -37, -49, -115, -24, -36, -126, -11, -10, -33, -18, -233, -39, -102, -61, -14, -130, -11, -157, -54, -44, -12, -17, -43, -4, -44, -98, -26, -43, -20, -120, -143, -75, -113, -188, -30, -14, -1, -36, -47, -10, -46, -5, -174, -32, -27, -35, -78, -66, -108, -73, -35, -64, -29, -18, -2, -29, -110, -27, -10, -113, -3, -117, -42, -29, -185, -8, -148, -107, -12, -15, -35, -25, -62, -121, -108, -29, -51, -52, -93, -10, -73, -25, -8, -17, -25, -51, -145, -47, -41, -97, -13, -7, -80, -49, -27, -72, -29, -31, -67, -41, -7, -12, -50, -2, -199, -47, -17, -66, -36, -70, -27, -13, -10, -75, -6, -67, -52, -26, -49, -25, -10, -61, -86, -22, -87, -102, -80, -32, -6, -11, -19, -13, -28, -137, -4, -12, -237, -81, -34, -33, -42, -60, -32, -61, -255, -98, -49, -37, -20, -22, -23, -84, -25, -212, -29, -106, -146, -28, -79, -82, -13, -106, -81, -33, -8, -36, -29, -44, -105, -60, -23, -136, -52, -48, -23, -185, -8, -23, -8, -64, -109, -24, -30, -21, -272, -16, -68, -13, -52, -58, -17, -5, -6, -27, -224, -36, -14, -19, -41, -3, -129, -29, -6, -35, -29, -3, -117, -141, -9, -57, -15, -143, -10, -17, -167, -36, -13, -68, -118, -45, -3, -36, -34, -323, -174, -58, -47, -87, -132, -32, -3, -26, -22, -22, -66, -176, -36, -63, -6, -38, -7, -65, -6, -20, -34, -209, -150, -21, -14, -61, -26, -78, -19, -107, -11, -168, -64, -29, -3, -21, -61, -9, -50, -2, -5, -37, -74, -111, -18, -27, -145, -71, -13, -4, -240, -62, -14, -15, -2, -85, -18, -25, -72, -113, -16, -22, -53, -24, -10, -22, -21, -78, -50, -32, -144, -80, -26, -20, -52, -65, -19, -5, -6, -6, -9, -96, -79, -237, -26, -151, -46, -146, -9, -52, -51, -6, -7, -161, -75, -162, -35, -111, -41, -43, -40, -4, -87, -101, -9, -197, -13, -232, -29, -38, -79, -54, -68, -67, -2, -10, -33, -29, -67, -22, -181, -108, -56, -180, -1, -62, -121, -6, -15, -48, -27, -23, -46, -236, -74, -42, -57, -155, -40, -119, -162, -31, -66, -16, -110, -23, -23, -31, -5, -6, -81, -34, -160, -163, -138, -84, -24, -16, -125, -98, -126, -13, -81, -78, -165, -4, -33, -11, -106, -54, -242, -47, -8, -95, -114, -16, -41, -31, -22, -27, -86, -126, -54, -45, -111, -95, -55, -30, -57, -8, -11, -18, -62, -38, -37, -35, -21, -48, -27, -27, -41, -27, -132, -72, -46, -20, -24, -72, -74, -33, -1, -7, -10, -12, -38, -34, -4, -20, -21, -48, -70, -39, -26, -14, -61, -58, -98, -16, -7, -45, -101, -4, -27, -170, -62, -20, -16, -114, -41, -44, -18, -20, -278, -3, -29, -10, -134, -101, -38, -40, -58, -79, -7, -79, -58, -10, -17, -33, -104, -34, -101, -57, -88, -27, -14, -44, -39, -14, -28, -19, -145, -15, -120, -3, -33, -35, -10, -83, -206, -7, -11, -66, -1, -5, -3, -19, -4, -29, -38, -39, -47, -32, -60, -39, -134, -19, -162, -51, -15, -67, -12, -54, -96, -37, -53, -75, -5, -27, -29, -24, -48, -29, -10, -28, -61, -36, -163, -16, -270, -12, -27, -47, -66, -72, -149, -114, -7, -45, -49, -4, -16, -61, -37, -12, -50, -4, -139, -46, -98, -40, -59, -85, -18, -97, -5, -57, -32, -58, -75, -73, -4, -19, -28, -53, -30, -16, -11, -109, -47, -38, -49, -12, -150, -8, -65, -4, -31, -70, -66, -188, -107, -41, -14, -2, -213, -105, -12, -29, -167, -176, -34, -33, -60, -128, -57, -7, -173, -149, -39, -13, -29, -37, -11, -93, -60, -4, -9, -32, -159, -16, -9, -62, -23, -96, -20, -61, -4, -14, -93, -34, -28, -10, -22, -177, -100, -13, -26, -5, -33, -41, -78, -3, -98, -22, -37, -93, -8, -44, -25, -34, -24, -21, -110, -40, -59, -68, -44, -18, -24, -3, -2, -23, -59, -97, -138, -85, -43, -5, -26, -4, -24, -3, -16, -10, -51, -179, -155, -22, -17, -46, -4, -3, -157, -1, -77, -84, -59, -24, -46, -25, -23, -18, -16, -10, -68, -62, -16, -5, -90, -79, -35, -20, -11, -41, -244, -19, -27, -20, -18, -75, -35, -153, -36, -14, -114, -142, -31, -62, -83, -35, -38, -28, -32, -56, -73, -33, -25, -16, -9, -2, -31, -59, -268, -149, -6, -133, -107, -67, -35, -24, -31, -98, -6, -92, -22, -91, -37, -69, -11, -32, -17, -119, -17, -11, -28, -108, -18, -68, -135, -14, -35, -90, -107, -30, -1, -86, -59, -11, -161, -9, -26, -22, -11, -91, -4, -33, -45, -65, -43, -49, -80, -6, -8, -32, -185, -50, -88, -128, -14, -132, -54, -7, -13, -5, -3, -32, -38, -12, -104, -41, -62, -83, -82, -15, -6, -23, -69, -58, -11, -11, -21, -116, -54, -10, -45, -34, -60, -16, -128, -24, -31, -24, -11, -60, -84, -10, -13, -68, -38, -14, -29, -17, -42, -7, -36, -33, -89, -39, -204, -22, -80, -15, -144, -23, -59, -5, -123, -35, -17, -53, -23, -62, -19, -38, -20, -23, -4, -110, -16, -23, -121, -44, -35, -12, -14, -8, -29, -27, -14, -47, -67, -12, -106, -24, -100, -41, -146, -13, -12, -53, -13, -53, -5, -13, -16, -29, -14, -51, -15, -107, -109, -2, -11, -163, -15, -29, -18, -6, -4, -97, -65, -124, -52, -5, -85, -11, -4, -7, -3, -4, -13, -59, -125, -17, -8, -28, -75, -90, -65, -33, -105, -58, -4, -204, -99, -27, -6, -14, -32, -51, -7, -86, -160, -36, -100, -5, -110, -9, -44, -32, -22, -21, -5, -16, -9, -143, -24, -37, -10, -66, -63, -28, -24, -61, -42, -116, -3, -45, -98, -79, -56, -49, -50, -59, -47, -20, -50, -11, -90, -5, -49, -10, -65, -107, -33, -50, -56, -195, -120, -23, -9, -54, -46, -91, -69, -53, -14, -40, -130, -65, -30, -7, -7, -54, -20, -9, -53, -12, -20, -160, -34, -30, -161, -19, -22, -115, -75, -13, -48, -11, -12, -78, -11, -5, -179, -132, -114, -58, -101, -9, -76, -56, -91, -23, -50, -30, -85, -31, -216, -49, -55, -46, -48, -44, -2, -38, -29, -9, -2, -7, -99, -20, -21, -11, -200, -12, -3, -3, -40, -17, -58, -9, -38, -5, -8, -4, -8, -30, -9, -135, -19, -56, -23, -2, -29, -55, -51, -8, -10, -10, -115, -10, -36, -102, -82, -17, -50, -77, -10, -7, -11, -95, -214, -31, -159, -68, -67, -16, -14, -17, -95, -107, -71, -15, -4, -2, -89, -161, -103, -6, -43, -27, -12, -5, -16, -74, -57, -10, -24, -29, -17, -53, -61, -124, -31, -2, -89, -87, -3, -20, -68, -113, -23, -88, -28, -71, -35, -24, -50, -80, -32, -25, -146, -25, -10, -60, -101, -82, -45, -10, -46, -100, -7, -4, -123, -99, -92, -9, -4, -2, -23, -14, -4, -3, -13, -20, -4, -74, -115, -153, -29, -56, -14, -12, -28, -6, -45, -8, -15, -29, -57, -8, -7, -24, -16, -26, -12, -99, -43, -71, -50, -5, -1, -30, -27, -90, -33, -13, -29, -153, -95, -56, -33, -8, -33, -24, -42, -463, -13, -8, -118, -29, -6, -47, -46, -23, -63, -113, -152, -82, -152, -60, -18, -25, -7, -9, -7, -11, -2, -28, -13, -94, -153, -11, -4, -23, -3, -33, -4, -6, -139, -26, -20, -35, -57, -25, -53, -25, -39, -4, -21, -20, -4, -47, -132, -69, -30, -3, -28, -107, -110, -5, -5, -36, -35, -44, -39, -91, -10, -11, -113, -36, -3, -5, -110, -48, -80, -62, -6, -242, -27, -22, -49, -24, -132, -10, -141, -31, -12, -9, -67, -68, -45, -6, -123, -193, -42, -8, -16, -74, -53, -57, -247, -20, -22, -6, -33, -3, -35, -17, -42, -20, -28, -28, -28, -18, -223, -8, -54, -54, -40, -20, -33, -44, -46, -53, -49, -8, -22, -14, -36, -182, -101, -35, -49, -17, -7, -42, -64, -82, -15, -8, -190, -3, -130, -22, -90, -196, -43, -8, -19, -6, -134, -3, -80, -17, -24, -35, -79, -91, -67, -109, -70, -73, -138, -4, -5, -55, -4, -56, -58, -26, -21, -201, -4, -98, -65, -27, -25, -4, -58, -9, -4, -18, -12, -116, -55, -50, -10, -30, -11, -14, -127, -166, -47, -112, -31, -203, -2, -31, -16, -58, -37, -8, -111, -5, -18, -35, -139, -13, -12, -17, -116, -78, -9, -52, -60, -132, -85, -110, -140, -6, -22, -43, -10, -163, -19, -31, -96, -3, -105, -4, -85, -8, -26, -18, -105, -127, -63, -52, -65, -17, -3, -74, -49, -68, -14, -44, -95, -8, -65, -28, -61, -7, -20, -10, -58, -17, -77, -56, -27, -31, -7, -93, -13, -58, -30, -4, -54, -9, -206, -48, -60, -127, -5, -179, -171, -10, -109, -4, -55, -11, -28, -42, -6, -4, -7, -20, -20, -6, -7, -7, -31, -63, -21, -64, -26, -77, -86, -96, -108, -11, -90, -39, -7, -20, -93, -4, -95, -41, -32, -5, -25, -6, -101, -85, -10, -16, -48, -116, -17, -83, -18, -14, -23, -7, -30, -12, -19, -7, -11, -34, -49, -77, -22, -31, -57, -6, -104, -151, -147, -20, -108, -11, -7, -5, -111, -43, -50, -1, -12, -6, -50, -11, -153, -34, -38, -161, -98, -60, -6, -123, -100, -7, -8, -30, -147, -36, -39, -46, -9, -17, -106, -5, -156, -47, -4, -15, -46, -85, -20, -14, -70, -123, -170, -2, -103, -248, -72, -8, -5, -55, -4, -25, -6, -15, -23, -4, -99, -199, -93, -28, -37, -19, -41, -65, -28, -27, -177, -33, -12, -99, -35, -5, -147, -53, -109, -122, -28, -117, -121, -6, -44, -56, -2, -84, -12, -70, -15, -39, -60, -54, -14, -7, -25, -148, -62, -21, -68, -98, -57, -38, -48, -45, -37, -26, -183, -18, -74, -2, -119, -21, -148, -16, -45, -29, -49, -33, -38, -63, -15, -20, -76, -44, -30, -1, -13, -9, -41, -2, -8, -41, -31, -8, -24, -61, -113, -4, -64, -17, -26, -109, -69, -17, -132, -40, -10, -5, -2, -185, -41, -20, -5, -21, -19, -8, -118, -36, -63, -81, -3, -132, -60, -206, -59, -4, -8, -13, -6, -120, -14, -35, -21, -121, -34, -24, -30, -61, -47, -85, -70, -42, -14, -18, -7, -37, -154, -88, -6, -63, -81, -9, -29, -6, -36, -15, -45, -64, -66, -76, -4, -52, -121, -14, -151, -99, -33, -12, -70, -35, -21, -91, -26, -11, -77, -120, -125, -26, -15, -57, -108, -30, -11, -174, -62, -50, -39, -2, -53, -102, -21, -46, -154, -59, -100, -13, -13, -156, -18, -87, -18, -65, -3, -5, -71, -19, -7, -7, -8, -5, -87, -95, -17, -77, -10, -8, -3, -55, -7, -15, -61, -47, -11, -79, -5, -197, -42, -67, -3, -12, -41, -9, -6, -40, -60, -5, -44, -82, -19, -78, -8, -17, -11, -30, -7, -2, -7, -15, -16, -5, -22, -19, -65, -101, -7, -135, -53, -12, -59, -26, -5, -42, -120, -27, -31, -32, -26, -36, -31, -12, -5, -35, -14, -154, -14, -11, -11, -66, -74, -39, -5, -156, -26, -15, -25, -63, -46, -85, -6, -34, -24, -88, -159, -13, -32, -53, -2, -4, -8, -54, -4, -77, -17, -13, -16, -124, -5, -69, -13, -29, -252, -16, -64, -54, -39, -32, -26, -74, -51, -73, -6, -18, -73, -10, -73, -32, -42, -103, -51, -94, -159, -18, -25, -27, -10, -13, -15, -47, -137, -8, -21, -17, -82, -27, -68, -33, -71, -2, -267, -54, -169, -116, -31, -11, -18, -16, -50, -31, -69, -10, -7, -120, -84, -8, -206, -28, -45, -140, -19, -72, -60, -36, -107, -48, -3, -49, -148, -160, -59, -8, -6, -142, -47, -74, -235, -47, -29, -19, -14, -45, -14, -37, -29, -70, -5, -45, -15, -45, -154, -18, -37, -179, -84, -28, -10, -46, -36, -7, -44, -10, -19, -57, -10, -22, -121, -12, -102, -67, -11, -34, -31, -28, -135, -69, -27, -65, -16, -122, -9, -87, -50, -113, -36, -40, -1, -18, -23, -20, -41, -100, -81, -22, -209, -92, -94, -60, -64, -34, -14, -7, -75, -18, -30, -149, -93, -52, -76, -99, -6, -21, -93, -195, -87, -24, -39, -72, -12, -11, -42, -7, -22, -58, -55, -42, -17, -33, -73, -22, -61, -7, -52, -85, -6, -62, -24, -22, -62, -11, -42, -14, -117, -235, -28, -61, -93, -11, -78, -11, -6, -7, -101, -29, -23, -23, -48, -36, -97, -50, -94, -55, -14, -113, -35, -48, -166, -16, -7, -6, -173, -82, -59, -16, -128, -33, -18, -102, -26, -7, -20, -20, -60, -79, -76, -25, -54, -50, -112, -172, -19, -88, -44, -220, -113, -72, -21, -32, -57, -48, -24, -29, -8, -38, -97, -27, -59, -51, -20, -78, -2, -27, -233, -38, -9, -89, -11, -6, -55, -31, -68, -7, -62, -31, -6, -107, -40, -40, -40, -67, -170, -53, -6, -11, -83, -120, -90, -5, -92, -81, -16, -65, -14, -57, -131, -23, -32, -71, -155, -30, -115, -71, -134, -10, -25, -25, -92, -11, -108, -9, -18, -70, -48, -91, -93, -6, -31, -96, -17, -20, -43, -38, -37, -37, -176, -14, -195, -31, -97, -48, -60, -223, -27, -8, -9, -137, -21, -42, -82, -157, -41, -13, -80, -15, -32, -59, -8, -53, -57, -33, -32, -8, -40, -21, -6, -113, -14, -12, -22, -35, -64, -28, -11, -12, -83, -31, -38, -96, -81, -4, -4, -91, -23, -46, -17, -14, -119, -71, -111, -64, -7, -38, -48, -68, -99, -263, -162, -26, -23, -21, -6, -150, -102, -97, -53, -85, -34, -59, -77, -24, -22, -7, -96, -25, -135, -111, -18, -70, -52, -30, -6, -13, -179, -18, -2, -131, -19, -41, -16, -25, -8, -5, -129, -34, -10, -39, -48, -161, -48, -121, -9, -63, -16, -17, -29, -10, -15, -66, -186, -142, -4, -67, -21, -37, -189, -25, -139, -176, -35, -181, -14, -62, -40, -89, -83, -52, -80, -21, -24, -58, -17, -80, -13, -51, -6, -212, -32, -9, -6, -32, -13, -34, -10, -23, -25, -30, -54, -68, -73, -16, -36, -15, -5, -34, -164, -73, -116, -54, -6, -55, -4, -52, -116, -9, -5, -50, -15, -107, -145, -137, -64, -49, -3, -64, -81, -79, -10, -59, -10, -22, -23, -11, -60, -19, -5, -22, -13, -37, -8, -18, -19, -84, -25, -24, -85, -34, -36, -51, -8, -10, -8, -39, -37, -33, -145, -59, -32, -9, -31, -28, -28, -126, -4, -16, -8, -36, -39, -109, -5, -19, -68, -24, -110, -41, -37, -38, -40, -105, -7, -51, -36, -54, -77, -50, -12, -17, -3, -63, -29, -35, -78, -20, -28, -94, -88, -32, -53, -145, -18, -32, -39, -72, -16, -67, -71, -17, -2, -11, -61, -39, -189, -53, -22, -23, -13, -40, -18, -144, -33, -72, -24, -104, -23, -31, -97, -13, -41, -26, -30, -6, -64, -83, -54, -195, -110, -51, -31, -47, -32, -66, -22, -84, -10, -5, -101, -198, -13, -26, -61, -65, -10, -28, -68, -30, -24, -120, -62, -37, -10, -48, -72, -175, -43, -33, -30, -94, -42, -66, -60, -42, -37, -186, -116, -48, -5, -191, -96, -13, -54, -91, -48, -55, -94, -15, -196, -19, -21, -26, -29, -82, -8, -33, -94, -72, -5, -129, -62, -35, -14, -147, -14, -66, -39, -101, -24, -45, -5, -69, -171, -56, -32, -34, -25, -25, -110, -138, -54, -36, -9, -26, -28, -19, -29, -150, -73, -50, -8, -34, -12, -43, -11, -89, -207, -21, -35, -52, -161, -22, -39, -19, -10, -79, -22, -122, -21, -52, -53, -39, -40, -34, -23, -29, -38, -67, -69, -7, -65, -35, -56, -20, -14, -35, -10, -37, -29, -39, -46, -33, -54, -96, -23, -37, -73, -20, -12, -113, -71, -34, -41, -44, -8, -94, -180, -32, -27, -43, -30, -35, -69, -86, -27, -39, -158, -42, -25, -57, -11, -54, -54, -45, -22, -86, -106, -13, -27, -58, -8, -7, -23, -152, -61, -38, -17, -53, -133, -14, -42, -56, -74, -105, -26, -43, -122, -13, -51, -82, -14, -112, -113, -34, -28, -9, -42, -92, -5, -27, -21, -27, -28, -4, -38, -16, -38, -47, -59, -70, -37, -50, -66, -9, -13, -176, -51, -81, -8, -37, -20, -58, -63, -65, -165, -12, -44, -178, -86, -88, -7, -135, -43, -61, -17, -27, -27, -35, -55, -66, -54, -27, -37, -6, -44, -22, -2, -89, -86, -163, -75, -101, -131, -78, -11, -103, -9, -92, -66, -108, -12, -31, -123, -27, -4, -29, -42, -28, -30, -83, -56, -43, -13, -81, -7, -35, -214, -13, -22, -21, -43, -179, -13, -43, -75, -40, -28, -6, -33, -41, -65, -230, -70, -34, -56, -78, -30, -50, -87, -62, -75, -37, -43, -36, -14, -16, -116, -25, -124, -194, -12, -94, -8, -39, -25, -50, -55, -88, -97, -68, -80, -54, -33, -95, -7, -22, -11, -72, -16, -81, -15, -19, -71, -37, -6, -12, -21, -91, -5, -31, -65, -55, -24, -36, -9, -64, -83, -218, -48, -43, -110, -79, -11, -40, -44, -19, -20, -214, -63, -25, -20, -1, -47, -38, -92, -23, -74, -50, -129, -113, -59, -35, -13, -15, -13, -162, -45, -38, -36, -74, -24, -216, -127, -76, -32, -21, -33, -7, -42, -55, -4, -68, -15, -11, -53, -23, -18, -50, -54, -88, -56, -8, -13, -274, -19, -57, -116, -24, -4, -11, -60, -24, -79, -40, -88, -7, -45, -73, -103, -49, -87, -96, -93, -127, -193, -40, -134, -69, -36, -11, -35, -149, -5, -14, -65, -183, -20, -10, -22, -67, -97, -60, -252, -97, -32, -17, -25, -120, -66, -56, -39, -10, -4, -61, -53, -25, -108, -73, -48, -4, -102, -98, -50, -12, -80, -245, -8, -133, -6, -8, -71, -96, -53, -201, -63, -57, -22, -69, -5, -57, -239, -123, -33, -109, -58, -14, -64, -10, -135, -99, -16, -6, -9, -33, -47, -11, -79, -76, -131, -14, -31, -101, -20, -17, -172, -100, -55, -7, -13, -37, -15, -128, -26, -33, -42, -5, -75, -6, -68, -71, -49, -82, -88, -98, -26, -162, -28, -51, -33, -53, -22, -37, -14, -38, -7, -99, -10, -96, -282, -123, -54, -80, -65, -20, -33, -41, -126, -42, -10, -11, -34, -43, -5, -72, -64, -78, -37, -12, -30, -40, -56, -126, -11, -25, -22, -102, -19, -36, -92, -18, -33, -28, -67, -90, -38, -193, -48, -16, -95, -9, -47, -63, -40, -3, -12, -51, -98, -107, -12, -7, -23, -15, -7, -37, -58, -55, -48, -44, -85, -13, -42, -77, -8, -22, -41, -13, -11, -45, -47, -4, -58, -27, -55, -41, -72, -44, -68, -19, -12, -48, -7, -10, -67, -77, -37, -11, -42, -51, -46, -18, -49, -83, -11, -62, -50, -95, -61, -31, -51, -57, -16, -14, -12, -64, -94, -34, -248, -157, -9, -56, -13, -61, -15, -89, -15, -35, -103, -16, -14, -18, -268, -59, -48, -23, -203, -98, -54, -14, -21, -93, -9, -56, -55, -75, -72, -76, -5, -37, -68, -74, -65, -138, -16, -67, -27, -78, -86, -29, -127, -44, -39, -41, -51, -10, -50, -9, -72, -10, -55, -33, -50, -13, -158, -55, -67, -7, -21, -24, -10, -56, -6, -34, -4, -26, -22, -40, -82, -24, -65, -50, -118, -31, -181, -31, -207, -85, -300, -22, -8, -108, -221, -54, -13, -8, -66, -15, -130, -68, -9, -172, -17, -164, -27, -100, -80, -33, -9, -53, -4, -50, -195, -32, -21, -60, -13, -46, -13, -40, -47, -44, -13, -37, -50, -60, -73, -29, -136, -22, -21, -36, -8, -135, -76, -15, -28, -13, -207, -6, -39, -20, -220, -55, -48, -140, -113, -21, -136, -83, -47, -60, -11, -208, -5, -4, -71, -26, -57, -180, -152, -108, -9, -9, -50, -43, -8, -41, -27, -9, -243, -29, -12, -87, -24, -3, -66, -154, -21, -18, -79, -29, -42, -71, -22, -9, -139, -149, -18, -12, -63, -20, -18, -14, -11, -5, -95, -16, -33, -71, -17, -29, -8, -90, -30, -74, -38, -14, -28, -49, -45, -19, -19, -28, -12, -13, -39, -38, -64, -16, -17, -138, -18, -43, -94, -74, -85, -13, -26, -71, -76, -56, -28, -29, -15, -38, -50, -36, -24, -9, -22, -37, -40, -32, -73, -61, -5, -6, -34, -40, -24, -27, -77, -49, -124, -7, -22, -39, -17, -227, -25, -63, -8, -14, -42, -16, -52, -15, -27, -61, -56, -12, -57, -27, -7, -10, -95, -28, -153, -9, -101, -10, -123, -73, -53, -64, -11, -199, -5, -34, -5, -96, -193, -98, -10, -9, -77, -11, -48, -55, -54, -8, -16, -23, -8, -10, -57, -17, -19, -36, -172, -159, -37, -3, -30, -39, -126, -35, -36, -49, -38, -212, -5, -38, -130, -33, -105, -52, -380, -28, -4, -24, -30, -56, -23, -57, -84, -20, -14, -35, -64, -44, -29, -30, -290, -30, -70, -65, -50, -111, -21, -146, -37, -43, -2, -14, -34, -7, -9, -9, -150, -5, -30, -33, -27, -66, -87, -22, -55, -18, -27, -14, -109, -136, -35, -20, -74, -13, -9, -105, -9, -20, -12, -40, -65, -117, -19, -6, -47, -88, -66, -30, -63, -85, -38, -84, -34, -91, -3, -18, -97, -40, -60, -99, -42, -12, -34, -86, -75, -9, -33, -16, -4, -145, -126, -59, -104, -13, -14, -182, -12, -13, -13, -54, -77, -80, -20, -37, -39, -239, -56, -11, -241, -49, -140, -12, -60, -40, -71, -110, -6, -42, -22, -38, -96, -39, -5, -4, -27, -4, -77, -27, -104, -30, -41, -8, -10, -55, -49, -117, -11, -55, -20, -211, -39, -74, -89, -9, -63, -147, -9, -20, -1, -53, -30, -24, -28, -55, -11, -18, -25, -27, -131, -5, -62, -154, -154, -71, -7, -167, -5, -13, -22, -55, -6, -2, -4, -36, -176, -3, -40, -13, -5, -134, -116, -22, -55, -16, -112, -29, -11, -65, -250, -2, -7, -38, -51, -10, -49, -64, -201, -33, -77, -82, -4, -35, -46, -14, -23, -12, -22, -54, -14, -40, -7, -101, -10, -120, -26, -68, -66, -40, -36, -15, -15, -72, -7, -66, -67, -4, -7, -61, -96, -12, -76, -85, -25, -25, -119, -23, -110, -20, -35, -65, -27, -5, -3, -119, -70, -14, -42, -71, -25, -4, -107, -62, -28, -80, -129, -327, -30, -113, -12, -58, -19, -37, -17, -141, -20, -46, -90, -23, -71, -11, -5, -6, -71, -10, -47, -114, -5, -6, -42, -43, -44, -249, -9, -55, -54, -69, -26, -32, -146, -193, -18, -5, -14, -79, -38, -27, -37, -14, -21, -16, -87, -59, -4, -7, -36, -13, -87, -26, -29, -29, -14, -17, -11, -29, -14, -70, -71, -191, -44, -57, -115, -29, -15, -27, -32, -99, -137, -4, -14, -113, -73, -11, -102, -46, -93, -118, -4, -22, -27, -110, -90, -104, -59, -34, -109, -14, -24, -32, -8, -4, -105, -6, -6, -48, -74, -101, -125, -75, -86, -3, -26, -16, -81, -4, -59, -6, -72, -155, -45, -21, -11, -7, -51, -36, -16, -129, -95, -51, -84, -61, -11, -32, -28, -111, -57, -82, -47, -4, -141, -8, -58, -18, -107, -26, -9, -160, -51, -34, -113, -90, -57, -10, -81, -102, -47, -63, -72, -3, -47, -42, -37, -20, -80, -29, -62, -101, -26, -23, -80, -130, -14, -253, -15, -17, -74, -15, -104, -9, -10, -94, -13, -54, -104, -9, -46, -35, -45, -23, -29, -44, -10, -131, -10, -53, -35, -3, -19, -16, -176, -104, -5, -1, -45, -40, -5, -2, -62, -51, -21, -56, -5, -183, -41, -60, -93, -82, -9, -19, -92, -28, -14, -34, -12, -34, -30, -80, -87, -158, -9, -52, -40, -34, -10, -38, -102, -13, -26, -45, -78, -89, -117, -9, -11, -23, -32, -22, -9, -117, -68, -6, -17, -21, -18, -68, -37, -63, -136, -256, -88, -23, -111, -94, -46, -21, -30, -5, -31, -21, -75, -54, -87, -96, -8, -55, -106, -4, -12, -9, -2, -6, -26, -109, -48, -62, -154, -12, -9, -85, -65, -6, -64, -102, -195, -57, -75, -39, -64, -7, -7, -13, -94, -4, -41, -15, -143, -23, -6, -35, -72, -28, -77, -35, -40, -61, -121, -187, -223, -3, -46, -17, -8, -51, -23, -5, -13, -8, -161, -17, -78, -157, -113, -34, -8, -12, -42, -64, -38, -65, -79, -5, -36, -48, -73, -55, -117, -213, -20, -104, -56, -27, -355, -162, -30, -164, -227, -3, -145, -125, -13, -87, -44, -27, -128, -7, -6, -33, -65, -155, -59, -87, -3, -98, -23, -21, -25, -56, -90, -20, -25, -30, -223, -13, -72, -68, -11, -31, -134, -47, -22, -108, -26, -7, -46, -21, -41, -11, -41, -64, -77, -34, -26, -79, -8, -12, -19, -59, -5, -109, -7, -57, -44, -10, -167, -68, -50, -19, -57, -270, -39, -58, -12, -32, -141, -11, -74, -14, -91, -79, -42, -20, -48, -15, -68, -24, -7, -121, -90, -16, -75, -98, -62, -6, -143, -46, -93, -49, -9, -253, -55, -9, -25, -51, -40, -23, -49, -21, -89, -114, 0, -137, -72, -123, -7, -8, -54, -104, -102, -45, -35, -10, -21, -53, -36, -77, -18, -103, -14, -118, -81, -27, -149, -11, -187, -6, -11, -65, -58, -40, -62, -8, -3, -12, -68, -165, -92, -82, -14, -55, -27, -170, -20, -6, -60, -54, -24, -24, -52, -93, -125, -19, -89, -69, -23, -14, -53, -28, -142, -4, -51, -118, -58, -50, -26, -25, -18, -206, -4, -38, -35, -18, -28, -4, -336, -171, -67, -13, -28, -103, -70, -47, -27, -47, -9, -40, -15, -19, -7, -50, -19, -134, -8, -212, -43, -61, -107, -11, -46, -68, -83, -64, -20, -35, -67, -21, -79, -81, -63, -51, -10, -46, -33, -249, -65, -77, -17, -20, -30, -14, -15, -5, -12, -15, -19, -14, -68, -26, -136, -103, -132, -12, -35, -74, -8, -37, -10, -1, -7, -59, -31, -2, -15, -9, -58, -10, -12, -28, -3, -17, -64, -7, -94, -46, -110, -6, -10, -4, -109, -26, -80, -23, -63, -14, -70, -27, -77, -9, -21, -14, -17, -25, -37, -39, -35, -15, -15, -238, -65, -39, -11, -117, -58, -22, -30, -115, -40, -7, -71, -5, -13, -23, -151, -178, -26, -5, -21, -5, -36, -21, -17, -168, -18, -55, -181, -51, -80, -191, -28, -88, -23, -14, -10, -89, -7, -43, -72, -12, -77, -6, -56, -6, -75, -129, -216, -57, -9, -48, -11, -27, -9, -12, -52, -107, -88, -71, -22, -22, -13, -143, -4, -79, -11, -80, -127, -40, -59, -122, -20, -78, -170, -53, -221, -127, -15, -22, -95, -67, -20, -109, -87, -47, -47, -14, -42, -22, -123, -25, -38, -88, -1, -22, -15, -77, -6, -94, -20, -32, -201, -52, -4, -69, -48, -4, -15, -60, -53, -119, -79, -154, -88, -6, -85, -107, -49, -15, -61, -75, -127, -41, -16, -4, -71, -135, -31, -434, -36, -67, -47, -23, -23, -13, -7, -17, -63, -5, -50, -138, -31, -11, -127, -81, -11, -19, -54, -14, -17, -24, -13, -52, -95, -79, -26, -17, -29, -4, -82, -11, -101, -36, -9, -64, -79, -17, -13, -27, -54, -27, -70, -49, -70, -17, -15, -97, -103, -26, -32, -255, -49, -50, -43, -104, -10, -71, -79, -28, -220, -66, -49, -22, -8, -41, -7, -50, -34, -7, -12, -28, -37, -16, -26, -22, -25, -77, -132, -9, -12, -27, -62, -5, -23, -5, -174, -14, -30, -4, -4, -404, -45, -88, -32, -18, -92, -10, -35, -25, -86, -75, -5, -22, -95, -12, -14, -52, -66, -342, -31, -42, -42, -31, -26, -28, -66, -66, -32, -67, -48, -57, -6, -33, -17, -84, -54, -104, -193, -23, -50, -172, -82, -8, -13, -147, -23, -38, -30, -127, -48, -17, -24, -22, -52, -66, -10, -217, -71, -133, -51, -21, -68, -75, -35, -21, -27, -161, -5, -52, -140, -34, -22, -18, -72, -32, -82, -11, -13, -8, -66, -144, -149, -14, -63, -8, -2, -5, -35, -17, -8, -3, -13, -69, -288, -113, -82, -87, -231, -5, -8, -25, -116, -295, -55, -72, -11, -6, -54, -65, -131, -77, -213, -37, -56, -4, -34, -1, -47, -44, -87, -22, -66, -101, -17, -48, -41, -9, -31, -82, -77, -137, -54, -15, -62, -38, -44, -29, -8, -17, -27, -175, -8, -12, -56, -90, -52, -15, -101, -129, -36, -20, -98, -51, -29, -26, -108, -42, -15, -28, -26, -227, -5, -72, -12, -51, -13, -52, -241, -69, -9, -36, -11, -50, -78, -32, -26, -42, -71, -25, -10, -13, -34, -7, -47, -48, -30, -43, -34, -65, -50, -37, -99, -65, -15, -64, -116, -8, -10, -56, -219, -51, -3, -44, -14, -31, -7, -46, -6, -70, -94, -51, -7, -33, -18, -43, -34, -32, -26, -19, -51, -54, -166, -83, -62, -62, -5, -29, -8, -15, -3, -21, -30, -87, -136, -16, -44, -24, -121, -88, -37, -30, -54, -8, -72, -10, -129, -26, -18, -135, -7, -93, -178, -51, -10, -59, -66, -105, -99, -70, -95, -54, -277, -124, -116, -73, -20, -16, -35, -14, -43, -18, -66, -42, -10, -119, -36, -10, -137, -14, -59, -9, -18, -90, -34, -4, -15, -94, -33, -7, -9, -129, -47, -21, -23, -10, -97, -99, -56, -55, -19, -13, -122, -49, -8, -154, -63, -66, -104, -53, -24, -135, -13, -131, -138, -34, -80, -24, -50, -251, -55, -147, -56, -13, -21, -56, -27, -20, -367, -16, -93, -3, -33, -88, -28, -219, -20, -5, -20, -25, -14, -24, -31, -19, -8, -83, -29, -6, -16, -63, -90, -4, -5, -176, -232, -72, -35, -63, -70, -101, -85, -32, -32, -23, -21, -7, -42, -94, -110, -25, -52, -137, -67, -120, -95, -31, -223, -21, -110, -3, -42, -7, -16, -235, -55, -41, -69, -16, -9, -106, -63, -23, -76, -27, -9, -51, -183, -134, -36, -17, -19, -1, -26, -131, -3, -58, -34, -31, -53, -18, -45, -70, -5, -76, -18, -77, -155, -2, -50, -20, -69, -9, -36, -57, -67, 0, -131, -41, -35, -40, -66, -60, -37, -21, -48, -39, -24, -34, -51, -53, -12, -62, -17, -53, -60, -5, -71, -16, -236, -67, -87, -42, -78, -89, -133, -6, -61, -159, -22, -19, -103, -22, -7, -64, -57, -9, -7, -85, -42, -43, -21, -32, -27, -28, -10, -67, -11, -47, -158, -73, -7, -45, -65, -3, -12, -49, -39, -50, -71, -33, -86, -110, -8, -63, -41, -61, -71, -3, -6, -32, -41, -41, -18, -104, -65, -191, -78, -46, -29, -6, -183, -83, -13, -50, -17, -32, -97, -20, -192, -55, -13, -20, -102, -5, -10, -3, -28, -177, -5, -19, -51, -157, -140, -18, -137, -22, -40, -19, -27, -59, -5, -24, -16, -79, -27, -18, -138, -12, -17, -160, -153, -47, -30, -18, -13, -95, -14, -19, -36, -143, -100, -90, -46, -57, -97, -68, -4, -88, -27, -21, -119, -188, -5, -39, -166, -12, -36, -72, -102, -55, -11, -29, -4, -330, -53, -17, -66, -90, -29, -13, -67, -5, -105, -238, -3, -38, -3, -190, -29, -16, -42, -61, -139, -23, -59, -43, -33, -217, -75, -121, -139, -25, -70, -11, -69, -56, -55, -17, -25, -29, -72, -253, -71, -9, -7, -29, -115, -18, -20, -172, -12, -8, -80, -52, -53, -56, -160, -47, -138, -21, -25, -41, -31, -106, -11, -180, -47, -14, -21, -127, -75, -24, -94, -45, -90, -43, -16, -31, -60, -64, -28, -31, -37, -65, -105, -53, -22, -18, -43, -103, -5, -9, -159, -25, -35, -30, -7, -31, -158, -13, -11, -27, -38, -6, -18, -11, -66, -73, -53, -27, -161, -73, -50, -45, -34, -87, -7, -167, -5, -65, -12, -145, -67, -12, -9, -26, -17, -44, -29, -16, -80, -45, -9, -11, -32, -52, -74, -61, -23, -28, -92, -14, -20, -5, -41, -65, -4, -38, -122, -7, -15, -138, -55, -17, -56, -54, -30, -22, -13, -31, -114, -30, -16, -29, -19, -25, -89, -29, -8, -30, -24, -17, -23, -90, -135, -77, -58, -34, -45, -144, -19, -63, -20, -101, -138, -2, -9, -88, -47, -26, -17, -17, -136, -56, -22, -55, -22, -31, -26, -57, -6, -144, -106, -16, -113, -67, -18, -171, -7, -155, -4, -51, -27, -35, -29, -25, -21, -5, -23, -132, -55, -145, -38, -19, -81, -4, -7, -61, -73, -24, -190, -15, -71, -36, -8, -30, -9, -190, -45, -94, -40, -10, -5, -52, -54, -10, -110, -83, -139, -49, -15, -77, -14, -38, -75, -11, -18, -10, -130, -75, -64, -23, -106, -40, -64, -114, -3, -51, -15, -154, -42, -65, -105, -14, -43, -16, -67, -11, -21, -19, -10, -39, -113, -101, -22, -74, -8, -88, -135, -67, -15, -95, -5, -64, -36, -21, -85, -23, -59, -48, -138, -142, -97, -53, -6, -59, -63, -16, -114, -145, -71, -103, -142, -23, -28, -5, -4, -61, -37, -26, -107, -154, -44, -19, -32, -5, -80, -92, -10, -21, -60, -127, -8, -243, -40, -79, -57, -61, -8, -59, -39, -18, -76, -53, -10, -94, -14, -7, -81, -79, -18, -37, -25, -40, -19, -23, -51, -16, -33, -48, -6, -8, -61, -135, -7, -36, -136, -29, -22, -56, -12, -43, -22, -13, -13, -92, -80, -70, -289, -107, -5, -45, -16, -7, -9, -53, -10, -31, -40, -7, -110, -45, -38, -94, -162, -78, -6, -78, -24, -42, -26, -5, -74, -28, -15, -8, -9, -65, -63, -121, -109, -11, -81, -11, -10, -313, -108, -13, -270, -54, -22, -30, -43, -10, -65, -11, -8, -90, -106, -52, -6, -112, -28, -7, -12, -35, -308, -11, -186, -4, -60, -71, -65, -138, -11, -10, -11, -19, -103, -55, -45, -23, -40, -39, -24, -14, -23, -5, -62, -103, -105, -31, -8, -70, -49, -72, -7, -1, -55, -164, -73, -61, -278, -33, -16, -5, -23, -20, -33, -95, -14, -52, -19, -21, -16, -73, -7, -20, -7, -71, -74, -26, -19, -71, -177, -6, -48, -56, -11, -29, -14, -44, -11, -21, -30, -63, -52, -18, -10, -25, -250, -52, -38, -167, -133, -48, -15, -3, -177, -51, -126, -133, -40, -37, -57, -202, -106, -5, -11, -31, -180, -157, -26, -18, -225, -62, -66, -237, -38, -54, -113, -52, -74, -40, -103, -43, -125, -135, -19, -74, -103, -5, -8, -123, -57, -172, -82, -119, -17, -7, -46, -49, -12, -38, -8, -55, -161, -27, -24, -100, -18, -7, -78, -49, -11, -136, -32, -17, -108, -62, -33, -15, -3, -49, -18, -74, -27, -12, -177, -6, -1, -102, -26, -11, -12, -8, -85, -46, -5, -175, -44, -58, -84, -72, -109, -43, -138, -220, -133, -12, -33, -8, -92, -35, -6, -172, -8, -25, -33, -21, -22, -23, -49, -250, -11, -63, -40, -17, -81, -17, -53, -44, -10, -59, -24, -12, -24, -171, -69, -185, -4, -18, -51, -43, -114, -26, -59, -12, -129, -39, -72, -154, -24, -176, -31, -9, -48, -9, -54, -11, -30, -64, -49, -23, -28, -107, -9, -19, -30, -76, -46, -29, -33, -9, -176, -159, -149, -17, -44, -40, -50, -59, -4, -56, -55, -76, -19, -50, -31, -52, -106, -8, -186, -4, -81, -19, -78, -59, -75, -64, -131, -20, -95, -9, -50, -12, -27, -9, -37, -35, -29, -102, -28, -79, -10, -98, -55, -238, -45, -85, -68, -47, -73, -187, -107, -13, -9, -54, -148, -18, -96, -17, -17, -25, -80, -100, -16, -183, -6, -63, -2, -176, -119, -11, -35, -16, -25, -31, -22, -23, -12, -81, -43, -131, -50, -28, -114, -5, -28, -30, -7, -24, 0, -82, -52, -53, -25, -104, -36, -48, -273, -34, -9, -46, -31, -58, -190, -25, -58, -69, -8, -48, -71, -19, -41, -9, -125, -1, -17, -129, -52, -18, -14, -80, -31, -88, -59, -44, -5, -45, -56, -13, -88, -55, -71, -297, -1, -40, -26, -40, -41, -7, -17, -4, -6, -32, -3, -30, -13, -17, -22, -124, -8, -46, -15, -40, -30, -12, -32, -59, -11, -20, -3, -78, -39, -151, -19, -55, -40, -15, -16, -25, -63, -42, -26, -233, -117, -100, -90, -21, -7, -45, -73, -50, -142, -112, -22, -77, -43, -42, -48, -46, -62, -10, -11, -17, -38, -29, -123, -99, -2, -23, -134, -7, -43, -39, -72, -14, -101, -56, -26, -97, -17, -29, -140, -32, -42, -23, -9, -32, -15, -30, -56, -20, -22, -105, -85, -15, -17, -87, -9, -178, -166, -17, -4, -51, -60, -159, -16, -40, -114, -53, -23, -47, -37, -2, -9, -92, -106, -26, -23, -66, -85, -66, -33, -17, -39, -19, -49, -86, -159, -148, -112, -50, -40, -119, -55, -10, -20, -75, -15, -114, -108, -33, -13, -81, -117, -26, -8, -25, -394, -70, -21, -65, -15, -33, -11, -29, -95, -180, -3, -31, -11, -17, -7, -14, -38, -41, -87, -50, -18, -138, -62, -55, -6, -34, -10, -155, -15, -161, -9, -73, -79, -49, -8, -23, -116, -7, -36, -10, -10, -52, -47, -27, -26, -121, -3, -79, -11, -43, -51, -5, -100, -93, -8, -44, -7, -10, -86, -28, -13, -32, -8, -17, -65, -98, -7, -191, -136, -37, -74, -57, -95, -152, -62, -23, -3, -67, -44, -36, -38, -3, -20, -10, -73, -16, -33, -30, -33, -95, -55, -116, -51, -12, -8, -64, -44, -19, -3, -51, -8, -116, -45, -41, -48, -52, -9, -125, -4, -21, -61, -83, -7, -143, -38, -137, -24, -25, -48, -27, -19, -6, -12, -27, -5, -1, -8, -54, -90, -9, -85, -9, -47, -113, -34, -106, -34, -38, -33, -28, -15, -31, -46, -12, -71, -161, -6, -243, -45, -16, -93, -6, -14, -141, -81, -28, -3, -87, -148, -100, -32, -204, -113, -57, -19, -112, -33, -14, -34, -167, -9, -16, -11, -49, -16, -142, -56, -5, -89, -105, -13, -20, -56, -17, -77, -43, -31, -149, -17, -12, -39, -81, -73, -3, -63, -27, -68, -99, -172, -4, -68, -33, -8, -158, -158, -31, -60, -37, -96, -137, -7, -22, -23, -13, -35, -161, -4, -62, -26, -45, -4, -89, -10, -14, -36, -67, -7, -31, -16, -5, -2, -154, -52, -22, -24, -23, -48, -50, -4, -6, -57, -22, -21, -9, -45, -16, -53, -51, -22, -33, -32, -93, -43, -9, -12, -3, -101, -122, -25, -17, -85, -32, -34, -37, -23, -30, -196, -28, -85, -169, -20, -73, -2, -16, -16, -43, -49, -39, -9, -149, -7, -23, -14, -62, -58, -71, -16, -41, -22, -13, -11, -21, -49, -224, -28, -41, -52, -42, -36, -209, -34, -3, -6, -7, -102, -19, -37, -13, -15, -18, -8, -9, -67, -43, -37, -68, -4, -39, -16, -44, -38, -267, -16, -47, -43, -121, -23, -21, -16, -4, -40, -84, -25, -43, -120, -191, -32, -6, -174, -4, -49, -7, -19, -24, -13, -52, -9, -71, -142, -11, -15, -12, -41, -109, -18, -48, -95, -21, -2, -79, -31, -78, -204, -22, -17, -24, -7, -88, -2, -11, -15, -66, -88, -171, -73, -106, -85, -43, -56, -74, -47, -35, -22, -69, -216, -10, -5, -213, -87, -69, -4, -136, -71, -50, -42, -98, -5, -2, -10, -63, -66, -84, -27, -67, -46, -78, -21, -217, -99, -56, -33, -1, -71, -5, -27, -22, -152, -19, -13, -141, -32, -47, -111, -45, -17, -15, -22, -44, -21, -6, -93, -241, -123, -21, -31, -80, -36, -14, -26, -11, -36, -56, -13, -99, -74, -67, -43, -4, -51, -39, -22, -59, -147, -3, -38, -61, -36, -34, -18, -35, -3, -36, -35, -28, -29, -109, -89, -74, -20, -16, -28, -45, -30, -5, -11, -134, -16, -149, -96, -81, -208, -17, -10, -49, -44, -37, -23, -87, -44, -24, -145, -37, -17, -21, -13, -8, -8, -104, -42, -38, -105, -8, -6, -40, -22, -44, -23, -76, -73, -4, -3, -23, -44, -52, -17, -132, -55, -19, -6, -45, -15, -29, -68, -25, -8, -138, -34, -92, -55, -103, -23, -155, -4, -9, -18, -46, -108, -7, -53, -16, -2, -2, -5, -33, -77, -26, -23, -15, -124, -52, -2, -10, -159, -149, -60, -74, -28, -1, -43, -20, -29, -61, -8, -148, -45, -175, -148, -76, -4, -96, -17, -14, -9, -88, -44, -111, -53, -43, -48, -211, -43, -25, -44, -210, -42, -24, -18, -89, -74, -124, -20, -11, -55, -116, -10, -56, -135, -125, -96, -132, -371, -35, -11, -11, -78, -34, -78, -55, -23, -96, -15, -123, -21, -227, -10, -20, -10, -223, -9, -71, -48, -70, -67, -66, -37, -13, -112, -25, -15, -113, -37, -192, -130, -32, -10, -12, -89, -98, -89, -11, -9, -35, -43, -39, -268, -106, -19, -95, -17, -28, -245, -5, -45, -65, -32, -63, -13, -105, -26, -141, -27, -9, -16, -79, -71, -23, -51, -41, -36, -40, -34, -15, -11, -58, -18, -465, -127, -37, -72, -145, -5, -28, -58, -23, -103, -27, -11, -16, -23, -138, -6, -115, -47, -33, -18, -43, -91, -26, -9, -39, -50, -79, -178, -7, -191, -49, -173, -7, -146, -53, -130, -126, -51, -47, -47, -33, -44, -171, -24, -29, -111, -21, -22, -33, -76, -26, -78, -29, -50, -12, -34, -5, -32, -226, -10, -27, -110, -29, -23, -31, -28, -18, -19, -2, -31, -19, -11, -18, -165, -157, -66, -36, -88, -35, -11, -124, -154, -181, -51, -54, -63, -178, -212, -162, -28, -11, -6, -9, -37, -81, -56, -45, -139, -39, -43, -93, -157, -20, -37, -111, -50, -53, -36, -64, -68, -93, -115, -11, -2, -97, -36, -117, -60, -31, -71, -16, -10, -17, -55, -17, -46, -25, -46, -20, -272, -84, -11, -24, -11, -10, -75, -37, -14, -137, -44, -14, -28, -5, -8, -46, -51, -127, -62, -15, -78, -69, -2, -11, -28, -39, -72, -99, -29, -77, -50, -72, -45, -32, -6, -8, -26, -75, -17, -18, -13, -33, -24, -36, -9, -50, -74, -12, -38, -128, -8, -296, -56, -126, -16, -15, -77, -26, -28, -24, -64, -131, -141, -36, -25, -125, -22, -18, -35, -31, -6, -83, -31, -95, -57, -19, -119, -235, -38, -91, -23, -45, -69, -97, -116, -55, -4, -113, -48, -20, -10, -26, -26, -4, -56, -213, -26, -22, -4, -15, -31, -85, -18, -6, -21, -67, -22, -4, -16, -126, -9, -3, -12, -133, -228, -139, -351, -7, -48, -46, -220, -52, -24, -35, -26, -3, -45, -29, -150, -7, -28, -27, -45, -68, -127, -5, -87, -39, -49, -87, -11, -10, -29, -27, -38, -110, -20, -49, -20, -117, -59, -25, -146, -15, -64, -35, -90, -114, -13, -35, -86, -32, -90, -22, -60, -95, -27, -7, -18, -31, -18, -114, -52, -16, -8, -24, -38, -212, -47, -84, -71, -4, -125, -69, -18, -48, -62, -76, -23, -54, -102, -65, -111, -15, -20, -58, -131, -16, -74, -151, -70, -35, -24, -17, -21, -9, -117, -20, -48, -147, -34, -34, -21, -62, -67, -33, -62, -71, -12, -55, -19, -70, -170, -37, -46, -16, -50, -37, -42, -13, -68, -18, -25, -89, -246, -14, -14, -102, -101, -2, -44, -13, -4, -94, -22, -73, -14, -45, -194, -27, -41, -15, -28, -95, -25, -4, -178, -16, -9, -47, -43, -55, -8, -14, -12, -139, -33, -5, -31, -14, -54, -14, -7, -86, -7, -48, -157, -8, -8, -140, -27, -138, -9, -82, -17, -92, -39, -19, -70, -15, -109, -12, -51, -21, -18, -120, -78, -36, -64, -44, -21, -67, -9, -21, -6, -75, -9, -24, -62, -49, -12, -12, -61, -163, -303, -26, -38, -49, -7, -92, -7, -54, -27, -67, -61, -31, -7, -36, -9, -14, -27, -205, -26, -90, -26, -76, -12, -24, -8, -79, -109, -41, -21, -9, -93, -143, -32, -18, -81, -22, -72, -16, -28, -63, -51, -4, -13, -23, -14, -139, -12, -69, -131, -7, -109, -69, -5, -29, -61, -71, -26, -193, -38, -13, -6, -207, -53, -97, -34, -15, -19, -126, -11, -93, -11, -157, -25, -9, -57, -21, -12, -10, -140, -60, -81, -53, -29, -73, -9, -132, -27, -11, -56, -21, -32, -50, -48, -48, -16, -66, -55, -7, -69, -26, -20, -24, -93, -28, -14, -49, -129, -16, -6, -127, -46, -24, -87, -30, -72, -87, -6, -28, -33, -61, -93, -99, -5, -16, -4, -13, -16, -77, -70, -31, -3, -170, -97, -66, -19, -93, -72, -13, -8, -326, -15, -25, -37, -249, -66, -98, -65, -42, -7, -8, -43, -20, -24, -6, -52, -31, -22, -47, -188, -16, -55, -51, -32, -72, -16, -110, -89, -4, -52, -92, -54, -33, -21, -28, -64, -203, -9, -62, -49, -186, -70, -105, -10, -84, -33, -115, -6, -15, -51, -14, -29, -42, -149, -23, -11, -11, -6, -177, -23, -10, -32, -47, -20, -28, -28, -21, -22, -30, -23, -88, -22, -16, -45, -13, -40, -9, -10, -78, -76, -144, -24, -22, -41, -26, -38, -4, -55, -9, -18, -54, -11, -21, -38, -24, -9, -6, -69, -13, -17, -19, -24, -58, -30, -140, -47, -138, -34, -9, -9, -3, -28, -46, -36, -55, -64, -13, -2, -38, -50, -30, -54, -11, -163, -91, -81, -26, -15, -51, -18, -9, -33, -65, -76, -44, -100, -83, -25, -26, -123, -22, -67, -41, -30, -202, -16, -35, -13, -10, -21, -71, -7, -62, -74, -21, -21, -90, -59, -7, -21, -14, -13, -44, -55, -20, -22, -9, -58, -16, -18, -17, -31, -95, -4, -139, -38, -173, -64, -108, -91, -52, -169, -58, -92, -34, -100, -1, -32, -72, -12, -159, -22, -17, -49, -116, -29, -35, -11, -66, -27, -21, -65, -144, -121, -53, -10, -84, -29, -9, -16, -11, -12, -29, -517, -12, -49, -12, -10, -103, -101, -30, -81, -4, -46, -72, -16, -3, -160, -30, -64, -2, -105, -93, -26, -27, -33, -82, -37, -11, -32, -185, -39, -129, -58, -116, -8, -90, -45, -36, -61, -2, -20, -41, -106, -14, -154, -86, -186, -93, -85, -130, -85, -63, -32, -84, -90, -44, -33, -49, -67, -40, -16, -17, -6, -98, -116, -26, -108, -102, -27, -47, -13, -18, -16, -11, -15, -15, -172, -30, -17, -109, -8, -8, -160, -37, -7, -48, -17, -45, -45, -78, -36, -118, -26, -50, -406, -164, -45, -10, -95, -272, -15, -14, -9, -21, -86, -87, -67, -10, -4, -45, -169, -98, -53, -128, -26, -4, -4, -6, -145, -42, -15, -5, -36, -30, -249, -26, -99, -6, -71, -26, -23, -14, -200, -45, -18, -57, -38, -27, -151, -31, -64, -218, -15, -15, -90, -95, -98, -10, -11, -58, -14, -87, -24, -47, -58, -60, -17, -11, -18, -52, -36, -18, -134, -128, -172, -31, -60, -7, -7, -3, -33, -7, -22, -269, -96, -14, -37, -24, -19, -67, -48, -6, -100, -9, -82, -14, -46, -81, -18, -11, -29, -32, -80, -78, -63, -30, -42, -5, -160, -21, -64, -84, -27, -32, -4, -60, -13, -55, -106, -8, -15, -59, -32, -136, -49, -35, -6, -33, -129, -128, -106, -5, -63, -81, -4, -9, -15, -34, -79, -45, -25, -26, -68, -21, -99, -103, -74, -105, -41, -66, -29, -231, -6, -24, -116, -13, -178, -152, -49, -80, -70, -57, -6, -44, -26, -60, -13, -12, -86, -139, -7, -46, -37, -41, -226, -4, -31, -72, -4, -55, -37, -176, -143, -34, -68, -33, -14, -178, -57, -47, -55, -81, -128, -49, -39, -11, -8, -90, -71, -167, -41, -25, -105, -93, -57, -36, -24, -211, -26, -35, -30, -9, -46, -69, -21, -80, -8, -33, -57, -45, -28, -99, -54, -53, -26, -42, -5, -17, -43, -67, -24, -51, -22, -48, -30, -108, -8, -12, -6, -152, -21, -61, -16, -82, -66, -72, -128, -96, -56, -20, -43, -39, -28, -86, -19, -180, -74, -65, -22, -14, -130, -28, -56, -39, -23, -5, -25, -125, -76, -5, -78, -24, -45, -134, -3, -74, -70, -27, -73, -11, -52, -8, -5, -15, -10, -54, -106, -3, -18, -26, -55, -4, -39, -14, -15, -106, -14, -25, -40, -75, -27, -134, -71, -10, -201, -23, -6, -134, -54, -39, -45, -40, -49, -42, -58, -18, -37, -26, -41, -82, -22, -62, -54, -29, -10, -150, -77, -5, -19, -29, -32, -8, -14, -10, -62, -35, -8, -17, -133, -33, -106, -16, -16, -203, -33, -11, -60, -37, -205, -58, -97, -18, -41, -74, -4, -45, -57, -43, -70, -20, -10, -63, -31, -9, -36, -38, -7, -4, -20, -11, -106, -29, -99, -19, -116, -25, -35, -44, -36, -5, -34, -75, -13, -71, -54, -10, -75, -35, -87, -4, -69, -43, -4, -71, -176, -20, -128, -103, -32, -26, -91, -47, -9, -25, -34, -58, -5, -20, -71, -5, -58, -58, -38, -46, -59, -4, -84, -259, -31, -97, -38, -52, -50, -92, -4, -6, -54, -205, -53, -2, -117, -3, -40, -16, -18, -10, -21, -42, -46, -173, -68, -6, -68, -39, -33, -9, -22, -26, -104, -137, -9, -45, -32, -18, -112, -25, -7, -31, -28, -29, -41, -28, -59, -50, -75, -11, -7, -92, -102, -86, -14, -74, -2, -13, -79, -101, -59, -121, -2, -33, -18, -28, -21, -30, -14, -33, -71, -9, -64, -69, -9, -42, -153, -124, -6, -90, -135, -51, -12, -2, -31, -3, -30, -74, -32, -13, -8, -123, -6, -22, -10, -29, -43, -8, -21, -6, -30, -94, -10, -21, -78, -54, -85, -79, -25, -22, -13, -82, -88, -4, -63, -26, -44, -19, -125, -62, -172, -5, -79, -51, -33, -54, -5, -38, -19, -17, -56, -77, -102, -27, -19, -30, -19, -18, -16, -300, -65, -46, -16, -42, -36, -21, -30, -80, -26, -7, -56, -265, -64, -13, -14, -72, -65, -138, -42, -118, -22, -44, -14, -131, -110, -23, -7, -87, -100, -10, -42, -13, -16, -252, -16, -54, -56, -41, -31, -40, -13, -116, -82, -39, -73, -5, -101, -32, -101, -15, -8, -12, -13, -30, -25, -86, -76, -17, -146, -33, -4, -63, -26, -42, -93, -81, -15, -17, -60, -189, -65, -7, -73, -73, -131, -16, -119, -10, -50, -12, -182, -65, -54, -97, -6, -107, -58, -54, -4, -20, -26, -67, -25, -53, -11, -61, -11, -143, -64, -33, -153, -25, -13, -161, -61, -18, -32, -160, -46, -224, -73, -37, -117, -21, -11, -48, -5, -43, -29, -34, -7, -54, -86, -143, -48, -19, -46, -10, -34, -33, -141, -46, -40, -6, -104, -35, -33, -91, -10, -5, -7, -55, -28, -31, -81, -13, -18, -75, -43, -25, -40, -7, -85, -48, -33, -163, -24, -23, -42, -14, -55, -22, -206, -31, -49, -93, -163, -53, -194, -94, -6, -29, -119, -11, -72, -17, -49, -55, -6, -5, -17, -52, -70, -19, -5, -166, -118, -48, -33, -7, -29, -27, -118, -4, -34, -113, -12, -23, -93, -27, -6, -126, -17, -91, -64, -63, -33, -5, -30, -3, -28, -20, -48, -31, -59, -22, -21, -33, -30, -47, -194, -74, -108, -35, -96, -35, -28, -67, -85, -154, -16, -25, -53, -37, -118, -23, -5, -28, -17, -67, -29, -21, -101, -23, -5, -3, -80, -80, -60, -20, -58, -112, -55, -41, -133, -34, -31, -42, -105, -198, -47, -15, -29, -23, -33, -181, -19, -66, -153, -35, -185, -62, -120, -90, -50, -40, -83, -50, -10, -17, -38, -32, -69, -111, -11, -9, -60, -31, -73, -38, -15, -62, -14, -17, -11, -95, -46, -81, -98, -73, -66, -20, -29, -15, -90, -17, -159, -28, -44, -34, -77, -64, -20, -49, -173, -105, -39, -37, -21, -26, -48, -146, -72, -16, -29, -219, -3, -100, -200, -14, -1, -84, -18, -5, -49, -24, -32, -18, -35, -27, -45, -90, -6, -5, -48, -12, -63, -73, -53, -11, -77, -23, -15, -15, -13, -21, -142, -40, -38, -21, -32, -49, -91, -42, -22, -90, -12, -208, -44, -215, -109, -185, -112, -24, -94, -50, -139, -18, -24, -60, -26, -36, -43, -74, -118, -81, -234, -50, -9, -11, -14, -11, -71, -49, -41, -115, -12, -17, -6, -112, -8, -1, -10, -12, -59, -17, -33, -82, -38, -29, -15, -82, -20, -76, -59, -115, -6, -53, -6, -108, -142, -60, -53, -18, -103, -73, -46, -63, -160, -11, -68, -86, -6, -69, -10, -26, -32, -8, -55, -9, -7, -27, -14, -35, -10, -56, -3, -45, -25, -23, -51, -16, -13, -10, -54, -8, -21, -73, -28, -56, -38, -111, -17, -23, -41, -11, -34, -66, -115, -55, -25, -26, -59, -96, -12, -60, -8, -15, -57, -33, -22, -24, -36, -4, -24, -78, -52, -65, -28, -88, -15, -6, -19, -5, -4, -6, -59, -22, -25, -4, -90, -25, -37, -18, -7, -2, -65, -40, -5, -16, -71, -96, -88, -32, -20, -24, -5, -10, -17, -7, -9, -52, -49, -61, -114, -7, -49, -37, -6, -5, -96, -73, -121, -16, -9, -20, -9, -30, -10, -17, -80, -96, -32, -6, -65, -43, -46, -100, -34, -7, -37, -135, -48, -91, -70, -4, -11, -14, -16, -146, -13, -59, -4, -50, -3, -16, -35, -90, -200, -70, -438, -8, -39, -9, -13, -20, -21, -36, -10, -9, -8, -33, -194, -6, -3, -22, -52, -142, -67, -17, -56, -116, -23, -57, -75, -102, -6, -127, -114, -4, -18, -146, -209, -10, -139, -101, -22, -178, -26, -20, -26, -161, -25, -32, -34, -33, -108, -8, -68, -54, -98, -7, -7, -13, -66, -30, -21, -109, -25, -76, -7, -32, -70, -6, -33, -77, -11, -77, -7, -236, -75, -29, -48, -19, -37, -9, -66, -78, -37, -46, -5, -29, -16, -32, -12, -12, -25, -10, -10, -56, -38, -32, -80, -57, -66, -6, -22, -143, -122, -131, -4, -20, -89, -54, -162, -4, -50, -27, -25, -98, -44, -52, -5, -18, -49, -11, -6, -39, -28, -8, -25, -74, -96, -13, -9, -6, -34, -32, -18, -39, -42, -53, -23, -29, -72, -153, -5, -18, -34, -339, -50, -6, -8, -23, -5, -28, -45, -65, -26, -131, -48, -8, -174, -9, -15, -15, -16, -133, -112, -9, -11, -58, -77, -108, -6, -70, -199, -40, -35, -21, -8, -81, -31, -15, -55, -67, -8, -40, -61, -9, -14, -13, -11, -20, -9, -28, -22, -13, -51, -93, -95, -81, -33, -63, -86, -58, -3, -50, -38, -58, -78, -37, -10, -122, -13, -6, -14, -11, -59, -33, -37, -16, -35, -10, -29, -5, -17, -6, -72, -128, -6, -55, -30, -22, -8, -5, -7, -67, -10, -72, -5, -17, -186, -8, -16, -54, -9, -6, -42, -8, -3, -5, -58, -11, -4, -14, -81, -9, -5, -16, -14, -30, -30, -33, -10, -26, -6, -62, -74, -18, -10, -94, -11, -14, -36, -61, -7, -5, -87, -228, -134, -8, -153, -6, -11, -14, -9, -87, -28, -13, -17, -23, -8, -20, -7, -7, -14, -5, -53, -85, -68, -29, -75, -36, -179, -29, -269, -44, -21, -14, -137, -35, -3, -75, -112, -45, -69, -2, -3, -19, -122, -60, -6, -130, -49, -26, -13, -103, -70, -28, -2, -20, -25, -14, -55, -83, -13, -45, -28, -99, -83, -140, -11, -4, -77, -21, -44, -104, -36, -21, -25, -132, -20, -13, -8, -28, -86, -81, -4, -18, -51, -12, -188, -60, -140, -18, -19, -14, -9, -24, -9, -43, -159, -9, -6, -66, -11, -17, -38, -44, -57, -13, -196, -35, -138, -8, -73, -4, -50, -11, -70, -39, -156, -60, -79, -9, -68, -79, -52, -37, -29, -29, -37, -12, -76, -22, -3, -48, -22, -6, -7, -121, -8, -46, -90, -42, -45, -74, -10, -24, -62, -101, -89, -48, -216, -15, -133, -13, -80, -17, -12, -51, -56, -119, -41, -36, -36, -127, -9, -21, -8, -36, -102, -315, -20, -237, -51, -37, -6, -32, -51, -13, -41, -24, -129, -54, -68, -147, -114, -25, -41, -17, -70, -36, -100, -50, -31, -33, -33, -42, -7, -16, -69, -45, -68, -17, -8, -224, -44, -26, -89, -41, -3, -64, -16, -28, -5, -16, -72, -57, -7, -20, -49, -149, -10, -10, -60, -5, -31, -15, -42, -30, -5, -62, -55, -14, -4, -13, -10, -50, -75, -11, -57, -10, -17, -14, -11, -78, -4, -11, -13, -64, -13, -47, -3, -18, -7, -40, -78, -14, -33, -10, -5, -52, -60, -8, -64, -330, -47, -13, -67, -62, -3, -16, -9, -172, -68, -56, -4, -51, -320, -6, -197, -22, -5, -18, -12, -46, -46, -16, -84, -50, -22, -20, -8, -86, -47, -14, -49, -15, -85, -49, -9, -5, -61, -105, -50, -8, -169, -36, -109, -30, -19, -187, -100, -141, -7, -154, -83, -52, -38, -11, -8, -11, -88, -7, -9, -67, -29, -7, -26, -69, -10, -14, -41, -56, -88, -8, -70, -45, -10, -7, -15, -12, -121, -13, -19, -21, -151, -34, -23, -6, -10, -14, -2, -6, -49, -91, -46, -114, -12, -14, -14, -65, -45, -42, -15, -5, -88, -34, -26, -44, -38, -8, -65, -64, -12, -46, -56, -16, -13, -23, -9, -5, -43, -45, -42, -11, -43, -32, -19, -46, -37, -23, -7, -41, -52, -80, -43, -8, -27, -22, -53, -21, -28, -25, -91, -12, -72, -7, -9, -11, -73, -8, -25, -51, -8, -8, -54, -208, -45, -7, -44, -12, -75, -17, -16, -29, -23, -64, -4, -15, -10, -9, -209, -48, -17, -13, -18, -65, -14, -11, -15, -6, -299, -34, -53, -235, -30, -14, -148, -6, -42, -9, -17, -13, -4, -41, -21, -39, -80, -39, -60, -3, -80, -138, -50, -7, -33, -63, -41, -7, -45, -79, -53, -6, -52, -98, -67, -8, -89, -33, -7, -33, -97, -56, -134, -14, -23, -139, -4, -92, -84, -16, -58, -74, -11, -83, -32, -41, -83, -40, -36, -30, -72, -88, -98, -14, -27, -25, -25, -34, -68, -17, -48, -26, -34, -73, -29, -119, -106, -3, -10, -24, -111, -56, -108, -11, -35, -44, -8, -122, -48, -58, -67, -5, -21, -97, -13, -19, -13, -56, -10, -13, -18, -9, -9, -5, -61, -184, -17, -27, -18, -3, -13, -13, -151, -21, -108, -26, -60, -12, -26, -13, -15, -30, -6, -4, -103, -27, -35, -10, -87, -48, -19, -13, -36, -14, -20, -87, -9, -16, -42, -47, -31, -15, -17, -17, -112, -4, -52, -19, -187, -56, -76, -210, -37, -108, -47, -7, -9, -7, -10, -5, -50, -10, -62, -43, -117, -7, -31, -39, -23, -29, -42, -51, -94, -5, -38, -6, -23, -10, -11, -14, -36, -20, -3, -3, -14, -44, -65, -117, -142, -64, -8, -125, -81, -6, -151, -82, -26, -25, -11, -18, -11, -4, -4, -16, -80, -58, -43, -79, -9, -38, -20, -41, -20, -7, -19, -20, -18, -19, -21, -84, -9, -15, -33, -9, -45, -15, -85, -45, -107, -14, -66, -225, -62, -8, -7, -51, -15, -11, -73, -67, -19, -71, -27, -5, -8, -127, -3, -20, -15, -13, -27, -23, -54, -32, -194, -40, -2, -12, -11, -5, -26, -11, -71, -39, -11, -216, -9, -5, -14, -61, -101, -10, -40, -4, -22, -60, -39, -12, -19, -39, -127, -2, -7, -30, -13, -11, -3, -9, -35, -98, -12, -12, -257, -99, -59, -19, -8, -6, -5, -50, -64, -6, -53, -131, -41, -79, -8, -49, -42, -18, -7, -10, -21, -25, -69, -17, -104, -10, -44, -24, -87, -107, -128, -66, -47, -99, -5, -19, -26, -12, -69, -41, -5, -8, -79, -64, -46, -4, -3, -90, -144, -200, -43, -81, -6, -4, -67, -66, -173, -20, -6, -37, -16, -6, -27, -26, -4, -20, -160, -44, -70, -3, -6, -76, -65, -34, -174, -107, -48, -79, -8, -65, -6, -55, -25, -34, -12, -15, -20, -12, -21, -12, -28, -43, -154, -7, -9, -23, -66, -34, -55, -14, -97, -110, -190, -84, -40, -14, -4, -28, -3, -11, -10, -101, -70, -154, -49, -44, -25, -2, -14, -15, -55, -51, -23, -24, -54, -3, -74, -10, -3, -23, -39, -45, -93, -170, -6, -12, -20, -167, -73, -27, -9, -14, -100, -8, -38, -11, -15, -14, -18, -59, -31, -10, -13, -23, -8, -5, -66, -4, -12, -11, -43, -69, -139, -40, -59, -64, -27, -64, -61, -136, -33, -13, -45, -53, -14, -8, -7, -32, -8, -6, -72, -8, -127, -100, -8, -13, -150, -23, -129, -40, -8, -91, -19, -4, -4, -6, -73, -11, -4, -59, -22, -51, -16, -44, -101, -207, -2, -93, -111, -15, -43, -166, -37, -6, -44, -14, -134, -12, -24, -126, -38, -116, -23, -40, -92, -28, -11, -22, -45, -95, -101, -9, -12, -17, -19, -29, -35, -54, -110, -4, -46, -3, -20, -24, -30, -35, -5, -56, -124, -21, -7, -9, -8, -7, -63, -61, -37, -41, -28, -83, -6, -179, -5, -31, -96, -74, -158, -92, -7, -11, -164, -9, -89, -7, -14, -27, -36, -166, -48, -231, -65, -14, -36, -43, -133, -12, -17, -5, -12, -93, -9, -35, -55, -4, -5, -34, -13, -12, -77, -10, -61, -82, -30, -87, -4, -63, -7, -95, -82, -78, -16, -38, -100, -65, -12, -13, -104, -16, -21, -10, -51, -6, -28, -173, -81, -7, -6, -28, -56, -142, -35, -39, -25, -33, -16, -37, -8, -38, -17, -10, -21, -18, -28, -60, -13, -13, -50, -12, -40, -21, -40, -123, -12, -17, -15, -55, -100, -3, -12, -29, -15, -4, -124, -8, -33, -4, -84, -60, -7, -15, -40, -5, -10, -40, -10, -20, -17, -42, -37, -8, -20, -4, -55, -70, -1, -13, -8, -185, -42, -46, -23, -100, -10, -8, -7, -6, -17, -21, -4, -114, -73, -63, -8, -20, -6, -7, -17, -4, -13, -15, -72, -18, -6, -142, -100, -6, -27, -14, -34, -171, -78, -2, -30, -30, -39, -5, -4, -26, -121, -10, -60, -20, -6, -22, -100, -48, -8, -24, -25, -58, -9, -68, -11, -119, -9, -66, -17, -27, -44, -117, -73, -57, -37, -8, -10, -21, -22, -8, -4, -1, -50, -4, -16, -16, -61, -51, -20, -5, -30, -10, -27, -18, -58, -93, -10, -23, -15, -8, -81, -52, -84, -142, -6, -5, -12, -37, -5, -91, -36, -41, -62, -85, -5, -82, -19, -6, -74, -25, -12, -278, -43, -52, -93, -30, -10, -27, -59, -3, -28, -3, -10, -7, -24, -13, -8, -302, -10, -24, -118, -98, -15, -5, -8, -14, -9, -54, -11, -52, -25, -44, -76, -14, -125, -117, -9, -24, -73, -65, -10, -37, -18, -24, -45, -8, -13, -56, -30, -6, -9, -13, -70, -4, -12, -44, -2, -120, -14, -121, -89, -20, -5, -5, -216, -49, -67, -100, -80, -72, -176, -12, -165, -4, -17, -6, -55, -150, -13, -49, -10, -87, -63, -18, -7, -171, -26, -104, -9, -121, -21, -73, -6, -65, -31, -29, -6, -17, -63, -6, -31, -60, -10, -46, -7, -14, -101, -4, -39, -46, -34, -53, -75, -80, -10, -49, -11, -11, -40, -38, -100, -8, -46, -24, -108, -14, -44, -81, -9, -11, -3, -61, -52, -3, -8, -29, -84, -18, -77, -8, -28, -162, -99, -87, -8, -30, -54, -92, -104, -6, -9, -44, -105, -7, -31, -17, -102, -7, -8, -6, -19, -52, -44, -75, -17, -26, -6, -25, -100, -7, -123, -71, -110, -64, -9, -17, -13, -7, -63, -168, -12, -31, -115, -62, -23, -33, -60, -87, -3, -9, -7, -90, -13, -10, -3, -12, -7, -95, -6, -17, -59, -184, -11, -57, -12, -13, -35, -99, -77, -149, -14, -151, -20, -23, -11, -13, -27, -37, -13, -11, -90, -44, -35, -36, -90, -27, -93, -51, -41, -49, -32, -12, -83, -17, -65, -91, -43, -20, -34, -41, -10, -10, -6, -68, -31, -45, -123, -19, -16, -45, -32, -11, -39, -113, -3, -12, -172, -4, -12, -59, -148, -23, -47, -30, -122, -199, -8, -27, -17, -51, -38, -18, -187, -8, -144, -4, -57, -50, -25, -2, -35, -32, -16, -4, -46, -8, -4, -8, -6, -3, -123, -19, -9, -17, -6, -10, -51, -57, -10, -76, -7, -4, -4, -3, -27, -15, -5, -17, -6, -5, -3, -3, -54, -7, -13, -155, -22, -3, -2, -26, -46, -76, -90, -52, -12, -64, -4, -3, -157, -16, -39, -167, -6, -3, -5, -24, -162, -60, -132, -7, -10, -3, -16, -24, -7, -22, -50, -57, -6, -186, -26, -94, -33, -14, -5, -7, -3, -8, -2, -11, -43, -6, -6, -17, -4, -66, -3, -6, -17, -63, -17, -3, -60, -17, -20, -3, -10, -2, -7, -39, -3, -23, -3, -14, -93, -14, -1, -46, -10, -94, -70, -19, -28, -45, -3, -245, -35, -78, -43, -72, -12, -9, -5, -184, -11, -28, -14, -1, -47, -15, -19, -49, -7, -108, -77, -3, -2, -46, -38, -103, -7, -15, -6, -23, -13, -6, -67, -205, -188, -4, -4, -54, -16, -120, -1, -22, -16, -29, -29, -164, -7, -9, -10, -3, -43, -5, -62, -25, -24, -51, -62, -8, -6, -19, -3, -1, -6, -3, -5, -56, -8, -40, -40, -94, -23, -71, -4, -61, -73, -27, -126, -22, -15, -3, -22, -2, -6, -9, -58, -99, -79, -54, -13, -12, -18, -9, -11, -79, -17, -64, -35, -3, -21, -10, -73, -35, -102, -53, -4, -81, -5, -4, -5, -8, -89, -12, -161, -54, -8, -11, -48, -62, -3, -3, -8, -26, -10, -7, -63, -95, -7, -43, -10, -18, -1, -9, -5, -4, -8, -31, -38, -35, -9, -62, -69, -7, -7, -11, -46, -9, -19, -53, -8, -94, -52, -20, -10, -36, -37, -7, -20, -85, -3, -3, -14, -3, -7, -4, -18, -9, -78, -19, -30, 0, -3, -18, -46, -183, -11, -78, -57, -8, -112, -4, -15, -189, -4, -37, -6, -13, -167, -12, -9, -2, -8, -9, -14, -42, -2, -116, -65, -4, -5, -29, -6, -114, -78, -8, -6, -97, -4, -3, -7, -89, -7, -32, -1, -82, -9, -44, -21, -10, -81, -132, -35, -85, -5, -111, -8, -5, -3, -4, -74, -6, -13, -211, -12, -22, -6, -3, -11, -4, -63, -49, -69, -145, -9, -3, -27, -5, -104, -5, -4, -115, -7, -16, -36, -14, -3, -272, -10, -6, -108, -1, -37, -15, -83, -70, -38, -6, -30, -106, -27, -22, -11, -14, -160, -15, -5, -31, -10, -11, -24, -18, -9, -52, -97, -35, -56, -7, -17, -14, -37, -8, -43, -8, -5, -4, -90, -13, -40, -20, -7, -74, -35, -21, -4, -102, -28, -11, -163, -353, -129, -8, -65, -71, -14, -9, -78, -14, -6, -1, -16, -9, -75, -5, -80, -5, -62, -30, -67, -40, -21, -70, -59, -12, -50, -110, -79, -115, -12, -7, -8, -59, -46, -18, -8, -23, -9, -13, -11, -17, -34, -5, -4, -65, -16, -2, -13, -39, -53, -61, -4, -79, -13, -1, -4, -4, -10, -5, -4, -4, -5, -62, -26, -6, -48, -28, -46, -9, -171, -9, -30, -123, -27, -27, -7, -60, -6, -3, -75, -4, -32, -64, -91, -29, -1, -29, -30, -25, -13, -3, -147, -124, -99, -5, -3, -7, -24, -35, -23, -72, -33, -4, -1, -58, -143, -2, -136, -59, -108, -2, -88, -8, -187, -10, -2, -9, -11, -4, -2, -18, -7, -8, -72, -13, -52, -9, -15, -414, -37, -6, -14, -150, -84, -2, -20, -9, -155, -2, -4, -7, -4, -1, -6, -23, -13, -50, -86, -38, -120, -31, -47, -2, -87, -6, -16, -58, -20, -7, -74, -32, -7, -2, -11, -26, -20, -58, -67, -4, -52, -144, -14, -32, -36, -125, -27, -2, -42, -8, -43, -8, 0, -91, -54, -9, -23, -3, -2, -29, -68, -2, -4, -22, -11, -5, -8, -63, -8, -42, -68, -130, -14, -9, -26, -99, -9, -1, -11, -55, -54, -4, -57, -10, -18, -10, -5, -9, -4, -51, -42, -162, -32, -36, -25, -47, -3, -111, -149, -41, -11, -8, -22, -12, -6, -106, -5, -41, -31, -74, -361, -186, -93, -77, -14, -52, -60, -123, -33, -28, -30, -19, -58, -8, -89, -59, -7, -59, -25, -20, -17, -19, -35, -59, -112, -133, -55, -17, -69, -47, -8, -57, -61, -9, -50, -73, -156, -8, -5, -7, -56, -48, -104, -3, -8, -6, -13, -4, -104, -23, -14, -11, -7, -64, -28, -9, -129, -53, -62, -159, -2, -10, -18, -7, -8, -3, -17, -24, -2, -23, -11, -46, -122, -4, -12, -7, -5, -32, -58, -18, -5, -12, -4, -6, -67, -27, -20, -55, -17, -13, -14, -3, -16, -149, -76, -51, -4, -4, -17, -8, -2, -100, -33, -18, -10, -20, -78, -6, -26, -10, -7, -67, -4, -12, -42, -16, -5, -4, -51, -11, -40, -16, -8, -9, -30, -108, -6, -52, -12, -9, -21, -105, -4, -129, -5, -4, -62, -1, -19, -72, -9, -2, -263, -79, -12, -6, -42, -41, -20, -41, -47, -4, -53, -10, -4, -7, -68, -14, -16, -6, -55, -95, -27, -63, -18, -54, -97, -5, -81, -4, -50, -200, -5, -6, -8, -10, -11, -50, -7, -45, -12, -161, -73, -184, -5, -5, -27, -45, -3, -9, -28, -19, -22, -6, -10, -9, -46, -53, -24, -2, -8, -9, -37, -8, -18, -26, -9, -39, -6, -85, -4, -1, -86, -14, -123, -21, -3, -27, -11, -5, -16, -2, -9, -69, -57, -93, -3, -2, -8, -69, -11, -8, -107, -46, -67, -45, -7, -76, -151, -26, -29, -7, -214, -7, -30, -25, -36, -48, -4, -149, -51, -12, -7, -21, -9, -62, -9, -159, -35, -3, -9, -28, -61, -4, -10, -57, -23, -4, -30, -5, -8, -25, -14, -3, -188, -8, -170, -14, -33, -3, -74, -26, -26, -36, -2, -13, -49, -8, -10, -5, -55, -129, -17, -10, -9, -36, -9, -18, -13, -86, -2, -120, -25, -50, -12, -4, -15, -18, -6, -10, -27, -21, -19, -42, -58, -2, -13, -12, -6, -21, -257, -62, -219, -7, -95, -16, -16, -4, -24, -98, -14, -10, -9, -8, -39, -7, -19, -12, -19, -9, -10, -3, -40, -49, -7, -93, -24, -40, -19, -40, -21, -6, -43, -26, -14, -5, -13, -12, -21, -352, -54, -16, -152, -62, -22, -6, -22, -67, -14, -37, -9, -51, -115, -8, -3, -46, -16, -3, -8, -4, -7, -14, -96, -13, -56, -42, -36, -45, -23, -101, -73, -48, -9, -44, -8, -2, -3, -252, -180, -10, -267, -6, -27, -20, -3, -9, -68, -7, -7, -33, -14, -63, -27, -31, -37, -21, -18, -15, -94, -26, -9, -27, -46, -15, -10, -53, -77, -9, -15, -6, -10, -28, -5, -46, -23, -9, -25, -4, -29, -45, -12, -66, -44, -7, -15, -10, -38, -20, -33, -18, -22, -7, -52, -7, -50, -40, -21, -69, -173, -12, -9, -9, -10, -12, -13, -4, -23, -14, -122, -41, -11, -15, -7, -79, -9, -10, -11, -21, -24, -12, -13, -19, -18, -9, -56, -14, -110, -68, -23, -14, -4, -4, -10, -80, -44, -45, -10, -11, -61, -6, -29, -10, -9, -6, -25, -63, -12, -43, -176, -15, -70, -126, -41, -5, -6, -14, -138, -14, -8, -7, -41, -92, -25, -19, -4, -5, -4, -25, -5, -103, -89, -9, -14, -27, -31, -110, -6, -9, -51, -14, -77, -23, -44, -37, -216, -66, -83, -85, -24, -104, -58, -138, -8, -16, -11, -144, -8, -79, -31, -8, -18, -36, -14, -32, -22, -201, -68, -64, -10, -16, -84, -9, -46, -4, -8, -11, -5, -50, -22, -17, -112, -15, -60, -99, -93, -69, -81, -117, -56, -45, -46, -23, -45, -8, -12, -11, -8, -63, -83, -84, -59, -229, -3, -9, -190, -128, -40, -5, -9, -27, -37, -2, -27, -23, -234, -62, -26, -3, -19, -94, -5, -22, -17, -19, -179, -16, -37, -4, -55, -43, -9, -15, -6, -11, -51, -51, -149, -18, -40, -21, -9, -16, -118, -143, -213, -4, -30, -6, -35, -10, -55, -14, -60, -47, -16, -29, -4, -88, -9, -35, -20, -9, -4, -5, -16, -77, -23, -6, -54, -95, -92, -65, -84, -67, -10, -117, -7, -6, -8, -5, -21, -70, -81, -41, -23, -119, -12, -8, -41, -44, -39, -3, -14, -12, -11, -33, -100, -26, -221, -65, -146, -57, -171, -47, -18, -4, -127, -11, -98, -28, -9, -42, -20, -149, -213, -83, -7, -44, -54, -34, -21, -10, -2, -47, -86, -30, -11, -106, -2, -72, -107, -69, -7, -13, -6, -86, -48, -9, -103, -16, -29, -203, -13, -111, -14, -23, -24, -13, -7, -117, -27, -50, -22, -98, -12, -64, -7, -28, -160, -80, -16, -29, -8, -15, -25, -265, -185, -50, -49, -16, -50, -29, -79, -35, -129, -78, -25, -8, -9, -55, -9, -105, -54, -99, -33, -10, -66, -6, -25, -7, -8, -93, -5, -83, -55, -110, -6, -11, -11, -7, -151, -88, -8, -74, -38, -34, -17, -29, -8, -52, -98, -24, -33, -121, -44, -25, -29, -54, -37, -44, -7, -24, -8, -3, -13, -69, -188, -47, -22, -7, -91, -11, -6, -53, -121, -16, -6, -97, -85, -16, -3, -46, -5, -59, -9, -113, -40, -24, -12, -9, -11, -221, -4, -25, -8, -193, -51, -117, -95, -43, -19, -21, -48, -84, -23, -33, -5, -13, -13, -26, -269, -9, -47, -41, -8, -10, -4, -105, -172, -21, -5, -59, -23, -34, -5, -41, -35, -8, -66, -23, -43, -17, -54, -6, -45, -20, -24, -8, -15, -60, -150, -8, -93, -9, -301, -305, -206, -38, -208, -53, -89, -12, -21, -9, -40, -37, -86, -45, -24, -70, -3, -60, -75, -87, -30, -55, -258, -6, -82, -59, -73, -93, -81, -5, -51, -37, -142, -55, -39, -17, -7, -12, -62, -36, -14, -9, -64, -189, -32, -140, -19, -9, -8, -72, -10, -3, -6, -17, -66, -105, -147, -49, -152, -5, -40, -12, -29, -10, -35, -143, -170, -10, -17, -45, -5, -10, -17, -91, -110, -22, -192, -76, -190, -130, -39, -127, -61, -141, -34, -19, -59, -17, -7, -3, -51, -110, -42, -29, -99, -46, -82, -17, -43, -35, -28, -19, -7, -15, -10, -69, -65, -6, -35, -16, -22, -4, -3, -112, -3, -6, -41, -10, -4, -167, -4, -7, -78, -33, -40, -8, -98, -11, -43, -22, -34, -30, -13, -55, -11, -51, -76, -86, -5, -16, -30, -26, -11, -11, -76, -32, -17, -30, -23, -64, -26, -17, -25, -5, -23, -3, -25, -3, -56, -34, -67, -20, -117, -203, -14, -86, -71, -55, -213, -6, -35, -15, -45, -6, -53, -97, -11, -11, -5, -11, -136, -141, -5, -48, -38, -111, -22, -9, -68, -37, -5, -100, -25, -95, -85, -3, -10, -31, -51, -94, -22, -134, -43, -21, -121, -75, -91, -11, -19, -29, -125, -26, -36, -100, -64, -68, -108, -31, -64, -5, -70, -52, -14, -34, -17, -83, -16, -42, -16, -84, -28, -6, -45, -7, -40, -36, -5, -8, -40, -62, -73, -2, -10, -119, -24, -36, -85, -50, -43, -5, -116, -54, -46, -25, -32, -11, -39, -18, -34, -7, -11, -32, -9, -483, -43, -3, -10, -89, -37, -6, -15, -162, -201, -7, -79, -214, -80, -13, -97, -5, -39, -17, -43, -92, -11, -17, -40, -11, -18, -61, -95, -7, -7, -89, -4, -121, -71, -104, -3, -77, -96, -13, -77, -4, -52, -4, -67, -14, -67, -15, -7, -26, -27, -137, -117, -72, -8, -130, -94, -9, -58, -2, -8, -208, -122, -5, -46, -123, -21, -112, -171, -42, -50, -25, -121, -32, -7, -5, -83, -8, -210, -37, -40, -61, -99, -9, -7, -30, -11, -52, -7, -5, -18, -72, -113, -314, -7, -26, -86, -7, -3, -13, -15, -34, -47, -36, -27, -14, -117, -13, -67, -18, -119, -101, -103, -6, -11, -119, -11, -3, -13, -12, -4, -8, -13, -13, -36, -10, -18, -11, -97, -43, -7, -4, -24, -6, -3, -80, -59, -8, -22, -5, -144, -21, -59, -14, -3, -8, -3, -33, -5, -33, -7, -4, -22, -9, -17, -16, -28, -54, -14, -51, -72, -11, -3, -14, -58, -34, -12, -3, -3, -24, -13, -30, -31, -15, -47, -8, -5, -132, -130, -7, -72, -68, -89, -12, -12, -28, -4, -12, -41, -87, -120, -42, -64, -50, -42, -52, -21, -238, -3, -11, -22, -19, -57, -12, -16, -19, -20, -54, -72, -23, -7, -9, -181, -85, -5, -11, -26, -64, -100, -10, -8, -33, -42, -5, -9, -30, -174, -42, -14, -48, -45, -12, -15, -13, -23, -5, -15, -27, -85, -8, -8, -148, -57, -91, -59, -16, -41, -34, -65, -72, -131, -13, -7, -13, -49, -40, -21, -18, -19, -3, -7, -141, -135, -20, -17, -15, -69, -6, -19, -5, -91, -84, -7, -13, -19, -128, -61, -37, -9, -4, -9, -139, -4, -133, -114, -22, -131, -2, -86, -36, -65, -40, -13, -66, -233, -12, -20, -63, -9, -18, -12, -97, -24, -85, -57, -11, -48, -7, -7, -8, -155, -156, -46, -67, -16, -4, -38, -7, -11, -4, -31, -20, -29, -56, -2, -3, -114, -13, -82, -100, -62, -105, -64, -103, -56, -74, -9, -91, -26, -21, -10, -102, -23, -22, -8, -4, -50, -9, -27, -10, -31, -45, -44, -93, -106, -26, -26, -36, -27, -13, -12, -45, -6, -6, -275, -29, -89, -11, -3, -16, -40, -108, -5, -25, -19, -44, -7, -24, -120, -9, -55, -7, -22, -97, -7, -8, -35, -19, -16, -24, -11, -93, -15, -41, -33, -37, -15, -7, -83, -4, -38, -49, -15, -65, -5, -21, -5, -67, -5, -41, -33, -15, -7, -53, -210, -218, -7, -3, -80, -31, -32, -139, -51, -20, -62, -10, -49, -94, -8, -8, -25, -29, -60, -179, -153, -12, -123, -202, -2, -10, -43, -9, -55, -34, -65, -54, -5, -7, -32, -3, -143, -55, -14, -16, -3, -10, -85, -39, -42, -6, -13, -4, -228, -31, -103, -3, -6, -103, -8, -69, -132, -44, -51, -27, -6, -48, -15, -12, -27, -104, -89, -73, -10, -39, -15, -8, -194, -83, -103, -54, -44, -51, -13, -84, -67, -60, -19, -87, -6, -56, -20, -29, -72, -181, -9, -6, -4, -14, -16, -37, -25, -6, -4, -79, -40, -17, -6, -53, -36, -15, -50, -44, -228, -146, -83, -11, -363, -10, -10, -14, -3, -15, -21, -23, -119, -4, -29, -152, -34, -188, -100, -10, -10, -40, -14, -70, -2, -40, -2, -55, -112, -37, -25, -65, -55, -43, -12, -150, -17, -9, -66, -84, -7, -9, -20, -14, -56, -25, -45, -88, -161, -145, -17, -36, -22, -63, -8, -1, -163, -22, -11, -13, -37, -31, -37, -9, -36, -417, -51, -37, -47, -8, -65, -6, -34, -185, -29, -3, -121, -7, -12, -132, -43, -19, -133, -47, -120, -135, -20, -36, -42, -9, -4, -7, -18, -7, -33, -11, -30, -10, -13, -43, -17, -9, -5, -26, -5, -109, -15, -157, -92, -6, -96, -4, -6, -66, -3, -7, -41, -9, -92, -35, -10, -18, -4, -136, -25, -15, -96, -8, -179, -11, -58, -184, -17, -25, -5, -7, -22, -88, -158, -44, -72, -52, -40, -198, -11, -44, -56, -5, -16, -3, -7, -68, -26, -45, -4, -31, -51, -52, -27, -16, -136, -12, -49, -157, -9, -18, -100, -15, -22, -14, -96, -7, -9, -3, -49, -19, -6, -34, -30, -7, -21, -96, -27, -10, -30, -86, -3, -41, -18, -46, -6, -25, -84, -20, -117, -6, -62, -34, -75, -8, -58, -127, -82, -3, -44, -7, -120, -150, -7, -13, -7, -25, -24, -38, -12, -6, -3, -22, -100, -27, -19, -12, -59, -6, -145, -8, -3, -22, -80, -74, -127, -19, -14, -120, -15, -12, -8, -2, -15, -4, -3, -114, -10, -8, -138, -12, -50, -8, -134, -11, -2, -9, -30, -8, -187, -6, -27, -178, -10, -36, -4, -37, -10, -7, -174, -64, -146, -6, -73, -16, -33, -15, -8, -18, -39, -46, -26, -108, -2, -75, -22, -57, -17, -80, -6, -5, -17, -17, -54, -46, -228, -49, -3, -5, -34, -14, -156, -49, -47, -5, -11, -8, -58, -34, -22, -75, -23, -9, -37, -34, -5, -7, -2, -37, -8, -79, -6, -162, -57, -13, -13, -29, -79, -33, -15, -60, -9, -10, -56, -68, -98, -156, -112, -116, -14, -6, -76, -11, -5, -28, -2, -17, -32, -80, -18, -31, -2, -8, -31, -128, -5, -16, -27, -90, -10, -6, -11, -189, -11, -40, -40, -95, -47, -14, -32, -11, -4, -7, -15, -100, -53, -24, -27, -59, -106, -26, -52, -9, -26, -3, -89, -19, -162, -21, -21, -6, -100, -19, -12, -80, -35, -17, -231, -138, -108, -26, -9, -5, -5, -17, -41, -15, -4, -49, -44, -79, -12, -11, -49, -46, -15, -7, -9, -15, -14, -34, -23, -34, -30, -18, -21, -138, -33, -50, -38, -25, -13, -5, -21, -3, -7, -22, -8, -50, -14, -51, -16, -79, -4, -21, -12, -13, -52, -16, -84, -2, -65, -11, -15, -18, -51, -156, -44, -12, -5, -9, -80, -79, -100, -52, -70, -81, -134, -81, -94, -26, -20, -268, -14, -22, -11, -14, -11, -31, -22, -51, -31, -78, -74, -136, -94, -13, -139, -90, -25, -30, -87, -187, -46, -1, -8, -39, -49, -11, -240, -90, -49, -76, -28, -27, -19, -15, -183, -3, -4, -15, -74, -3, -110, -109, -56, -120, -26, -57, -19, -36, -29, -5, -27, -91, -21, -11, -33, -154, -3, -5, -39, -151, -74, -19, -77, -4, -74, -4, -118, -101, -7, -7, -49, -8, -30, -18, -25, -16, -87, -7, -201, -37, -9, -7, -55, -42, -3, -7, -5, -12, -87, -53, -7, -54, -11, -92, -106, -8, -61, -46, -7, -7, -18, -6, -16, -108, -8, -7, -18, -77, -1, -93, -171, -17, -10, -147, -6, -9, -27, -4, -76, -68, -82, -9, -31, -77, -37, -41, -67, -6, -228, -53, -18, -41, -25, -12, -5, -72, -39, -144, -12, -95, -20, -77, -89, -6, -19, -138, -29, -29, -13, -80, -260, -20, -45, -88, -82, -31, -15, -37, -151, -4, -11, -26, -28, -12, -69, -5, -8, -5, -55, -5, -9, -24, -32, -76, -32, -64, -168, -27, -2, -12, -43, -25, -134, -68, -90, -123, -4, -63, -27, -30, -8, -7, -8, -27, -51, -42, -91, -5, -41, -41, -19, -45, -20, -136, -26, -103, -132, -11, -17, -10, -38, -7, -10, -9, -9, -58, -38, -4, -110, -63, -24, -45, -22, -24, -8, -11, -5, -18, -41, -23, -17, -8, -17, -26, -13, -97, -33, -57, -9, -12, -74, -22, -7, -7, -166, -2, -11, -78, -12, -206, -5, -55, -52, -22, -45, -156, -55, -19, -225, -29, -60, -58, -68, -128, -41, -37, -103, -9, -52, -47, -21, -6, -43, -35, -102, -93, -9, -2, -22, -323, -25, -20, -54, -40, -83, -103, -69, -16, -5, -174, -6, -4, -7, -18, -9, -76, -111, -37, -13, -11, -10, -37, -6, -10, -11, -50, -7, -202, -55, -61, -20, -4, -16, -82, -101, -29, -53, -37, -19, -5, -5, -58, -6, -6, -39, -241, -30, -4, -16, -16, -64, -54, -6, -33, -85, -9, -9, -159, -11, -100, -44, -35, -20, -16, -101, -35, -21, -6, -113, -85, -26, -3, -10, -41, -106, -3, -35, -38, -6, -95, -146, -9, -13, -4, -42, -7, -7, -137, -127, -39, -15, -23, -4, -98, -52, -17, -26, -53, -51, -106, -6, -14, -45, -23, -10, -19, -130, -9, -8, -54, -15, -103, -11, -99, -119, -82, -40, -94, -51, -9, -177, -101, -12, -86, -68, -6, -11, -75, -27, -9, -18, -9, -28, -21, -18, -32, -25, -9, -5, -41, -33, -50, -36, -50, -40, -164, -24, -207, -10, -63, -51, -13, -90, -62, -4, -10, -25, -3, -61, -7, -144, -6, -68, -9, -32, -8, -3, -80, -5, -145, -4, -18, -98, -21, -102, -22, -19, -25, -76, -37, -10, -10, -8, -24, -34, -18, -29, -69, -16, -153, -47, -144, -117, -82, -116, -56, -8, -3, -23, -11, -18, -132, -22, -3, -9, -71, -63, -157, -36, -11, -61, -59, -21, -21, -10, -41, -4, -12, -17, -44, -49, -4, -25, -40, -183, -8, -32, -32, -91, -94, -42, -82, -34, -16, -18, -104, -101, -74, -34, -39, -78, -33, -4, -56, -54, -9, -42, -39, -154, -16, -76, -85, -3, -62, -99, -200, -96, -14, -15, -16, -17, -101, -93, -30, -75, -5, -15, -7, -15, -40, -52, -60, -66, -5, -28, -55, -64, -3, -68, -115, -7, -52, -147, -10, -68, -23, -23, -14, -98, -62, -7, -9, -2, -10, -75, -56, -7, -71, -5, -108, -14, -9, -13, -58, -53, -50, -76, -81, -76, -107, -7, -37, -4, -4, -32, -8, -10, -38, -7, -11, -39, -20, -44, -106, -185, -19, -65, -75, -21, -32, -34, -80, -138, -34, -57, -5, -6, -28, -30, -13, -11, -24, -8, -18, -74, -53, -21, -25, -158, -41, -5, -141, -28, -33, -69, -104, -30, -121, -31, -17, -172, -255, -38, -31, -47, -85, -7, -87, -15, -65, -8, -112, -146, -10, -4, -3, -8, -30, -144, -5, -33, -15, -39, -5, -95, -15, -6, -35, -109, -30, -39, -16, -9, -40, -22, -33, -11, -24, -43, -68, -14, -30, -40, -148, -4, -88, -107, -10, -20, -126, -13, -38, -20, -5, -28, -14, -133, -8, -20, -65, -4, -100, -20, -58, -16, -10, -95, -45, -16, -43, -9, -35, -13, -9, -52, -78, -18, -87, -6, -32, -179, -10, -22, -17, -191, -165, -53, -18, -54, -21, -160, -80, -42, -35, -113, -24, -15, -87, -10, -4, -75, -66, -76, -17, -13, -19, -51, -73, -16, -230, -243, -7, -58, -8, -76, -173, -7, -17, -14, -9, -111, -87, -23, -8, -4, -67, -12, -17, -13, -95, -7, -26, -128, -9, -59, -3, -19, -21, -14, -4, -7, -21, -53, -71, -29, -13, -57, -5, -30, -95, -76, -22, -16, -54, -197, -10, -4, -14, -7, -31, -8, -23, -20, -189, -11, -37, -17, -21, -14, -26, -147, -232, -8, -52, -7, -17, -23, -28, -80, -95, -53, -7, -24, -70, -24, -39, -9, -3, -139, -11, -33, -15, -60, -13, -7, -153, -124, -14, -81, -46, -10, -24, -13, -113, -124, -7, -11, -29, -7, -11, -37, -37, -7, -26, -7, -187, -24, -5, -57, -59, -3, -15, -52, -70, -6, -35, -18, -6, -66, -33, -7, -10, -7, -38, -121, -128, -16, -133, -8, -82, -17, -156, -52, -4, -77, -38, -21, -169, -5, -20, -9, -124, -7, -59, -6, -19, -3, -6, -4, -160, -7, -230, -33, -57, -9, -8, -23, -46, -9, -15, -5, -65, -4, -12, -7, -103, -21, -27, -55, -37, -15, -113, -21, -28, -71, -18, -154, -81, -14, -17, -7, -22, -6, -27, -276, -57, -11, -58, -23, -6, -37, -9, -5, -9, -19, -51, -71, -84, -45, -147, -9, -119, -169, -50, -5, -12, -47, -10, -184, -57, -67, -119, -21, -9, -44, -39, -64, -62, -93, -63, -137, -39, -9, -97, -15, -44, -7, -73, -172, -126, -5, -14, -93, -26, -17, -128, -7, -6, -17, -69, -12, -93, -49, -62, -38, -25, -6, -9, -7, -136, -11, -88, -10, -14, -4, -9, -73, -72, -22, -13, -4, -12, -7, -4, -15, -45, -8, -8, -21, -6, -8, -124, -17, -120, -12, -53, -10, -6, -85, -56, -15, -36, -5, -73, -71, -19, -9, -4, -151, -3, -88, -23, -176, -219, -35, -6, -69, -7, -7, -22, -73, -4, -87, -15, -107, -123, -8, -2, -124, -8, -23, -17, -11, -6, -210, -62, -74, -14, -29, -3, -56, -15, -9, -80, -27, -67, -12, -7, -8, -75, -7, -6, -86, -4, -104, -11, -78, -10, -3, -113, -14, -6, -49, -76, -71, -7, -4, -12, -18, -7, -20, -95, -88, -11, -19, -12, -94, -26, -92, -8, -24, -10, -13, -11, -6, -26, -22, -73, -11, -21, -80, -4, -24, -47, -28, -2, -115, -16, -100, -15, -24, -49, -6, -122, -75, -232, -46, -86, -6, -17, -47, -4, -8, -13, -63, -24, -82, -111, -8, -55, -86, -5, -42, -3, -10, -63, -34, -6, -131, -50, -15, -31, -30, -7, -12, -10, -6, -11, -11, -22, -22, -8, -12, -40, -27, -16, -100, -6, -24, -27, -100, -3, -48, -4, -4, -17, -150, -32, -309, -3, -7, -96, -64, -12, -3, -7, -51, -227, -24, -16, -4, -12, -5, -6, -5, -5, -4, -55, -29, -153, -42, -4, -9, -56, -3, -9, -51, -5, -29, -16, -99, -8, -80, -2, -4, -28, -15, -1, -13, -115, -101, -5, -18, -22, -5, -142, -7, -6, -124, -36, -11, -4, -99, -15, -55, -84, -30, -14, -9, -95, -80, -15, -6, -157, -45, -38, -38, -3, -4, -3, -61, -87, -7, -54, -9, -5, -90, -5, -8, -5, -3, -3, -3, -2, -45, -4, -124, -5, -26, -37, -89, -7, -5, -52, -25, -4, -6, -73, -7, -18, -5, -24, -42, -7, -23, -7, -173, -55, -39, -6, -7, -36, -5, -12, -3, -42, -29, -6, -46, -101, -20, -109, -8, -4, -6, -29, -7, -4, -27, -35, -46, -4, -159, -13, -179, -10, -38, -26, -15, -13, -107, -12, -5, -3, -20, -75, -55, -317, -20, -8, -20, -69, -92, -7, -60, -7, -8, -41, -4, -46, -5, -14, -66, -33, -29, -37, -79, -4, -155, -50, -22, -23, -5, -7, -4, -68, -6, -4, -75, -30, -17, -94, -22, -37, -32, -7, -9, -3, -35, -21, -11, -116, -30, -4, -9, -9, -10, -36, -21, -195, -9, -28, -67, -5, -9, -138, -4, -49, -25, -5, -4, -22, -22, -21, -156, -7, -143, -7, -4, -125, -9, -7, -11, -25, -7, -23, -4, -23, -5, -4, -18, -33, -7, -122, -17, -8, -89, -6, -4, -9, -9, -22, -17, -2, -113, -71, -30, -102, -12, -7, -4, -2, -8, -295, -43, -7, -8, -8, -33, -27, -38, -2, -62, -6, -7, -5, -7, -41, -18, -17, -3, -8, -12, -4, -32, -29, -5, -21, -7, -71, -64, -3, -42, -5, -41, -8, -63, -4, -22, -23, -51, -5, -4, -5, -98, -5, -6, -40, -98, -244, -5, -39, -4, -6, -52, -17, -2, -3, -5, -32, -4, -4, -6, -92, -4, -225, -33, -101, -5, -4, -10, -42, -5, -20, -11, -20, -110, -16, -6, -24, -55, -9, -86, -21, -10, -12, -6, -3, -2, -26, -33, -6, -82, -67, -15, -5, -6, -42, -11, -34, -163, -9, -6, -39, -9, -15, -6, -6, -25, -4, -6, -6, -13, -25, -79, -19, -24, -58, -53, -24, -35, -75, -32, -3, -164, -4, -5, -4, -24, -16, -12, -4, -141, -101, -20, -53, -19, -95, -11, -4, -51, -4, -11, -9, -5, -185, -4, -18, -16, -6, -87, -36, -152, -4, -6, -37, -20, -6, -45, -4, -6, -15, -147, -5, -7, -43, -76, -37, -10, -2, -8, -7, -46, -7, -19, -90, -4, -19, -7, -54, -16, -53, -6, -6, -2, -23, -98, -18, -8, -13, -29, -204, -9, -18, -4, -8, -7, -5, -48, -12, -19, -6, -5, -5, -26, -6, -48, -172, -9, -4, -7, -11, -21, -6, -8, -11, -75, -12, -6, -97, -17, -4, -16, -15, -2, -14, -25, -20, -124, -50, -115, -107, -4, -5, -7, -36, -8, -7, -45, -6, -10, -15, -27, -24, -3, -8, -38, -3, -66, -6, -27, -5, -24, -4, -17, -4, -3, -66, -11, -4, -137, -6, -58, -23, -4, -5, -6, -99, -4, -103, -7, -102, 0, -3, -10, -9, -100, -89, -69, -12, -20, -3, -6, -8, -70, -52, -7, -6, -11, -96, -10, -9, -104, -287, -13, -12, -13, -8, -35, -8, -36, -6, -8, -68, -7, -9, -161, -9, -2, -25, -74, -43, -18, -20, -6, -4, -33, -84, -5, -7, -40, -37, -24, -110, -74, -18, -6, -65, -12, -6, -59, -6, -28, -95, -13, -20, -6, -4, -10, -6, -43, -5, -12, -14, -10, -101, -3, -33, -9, -34, -6, -6, -6, -42, -40, -10, -2, -12, -43, -6, -4, -5, -6, -34, -7, -6, -6, -95, -104, -3, -10, -43, -14, -9, -2, -8, -31, -25, -37, -4, -23, -3, -130, -42, -36, -42, -12, -87, -30, -13, -7, -18, -91, -14, -6, -16, -54, -45, -7, -4, -8, -45, -8, -4, -54, -105, -22, -33, -7, -125, -44, -33, -7, -4, -44, -8, -5, -7, -27, -42, -13, -2, -8, -21, -18, -14, -57, -14, -3, -4, -10, -14, -2, -7, -13, -17, -84, -150, -122, -19, -3, -1, -35, -50, -53, -22, -4, -13, -3, -2, -2, -28, -38, -8, -9, -38, -67, -4, -10, -63, -22, -2, -8, -44, -8, -6, -80, -63, -2, -4, -22, -5, -6, -149, -20, -6, -50, -3, -10, -10, -115, -2, -53, -5, -8, -10, -3, -6, -5, -27, -10, -22, -109, -28, -50, -8, -5, -155, -3, -25, -84, -2, -27, -7, -13, -6, -46, -7, -4, -87, -6, -5, -113, -42, -18, -12, -14, -159, -29, -7, -41, -11, -116, -16, -116, -11, -28, -24, -105, -7, -11, -6, -7, -6, -74, -4, -17, -3, -13, -3, -45, -49, -172, -18, -19, -25, -56, -3, -5, -4, -5, -2, -19, -93, -44, -19, -62, -14, -16, -5, -6, -8, -99, -98, -26, -48, -117, -8, -7, -7, -41, -23, -10, -3, -8, -13, -32, -5, -34, -8, -7, -8, -19, -70, -15, -6, -5, -39, -59, -53, -2, -19, -98, -21, -9, -36, -16, -3, -89, -158, -5, -6, -41, -4, -10, -18, -3, -25, -13, -37, -40, -29, -69, -109, -194, -27, -72, -30, -8, -8, -5, -80, -3, -5, -31, -52, -65, -3, -8, -4, -225, -32, -26, -7, -4, -123, -133, -96, -80, -24, -22, -38, -66, -68, -5, -65, -40, -6, -67, -8, -2, -76, -52, -63, -2, -9, -15, -11, -4, -3, -143, -15, -83, -3, -35, -17, -46, -28, -112, -34, -2, -47, -60, -122, -11, -47, -6, -8, -146, -10, -5, -52, -2, -3, -36, -8, -3, -73, -66, -175, -3, -13, -2, -28, -95, -74, -130, -3, -36, -59, -53, -19, -2, -36, -57, -1, -1, -11, -8, -105, -17, -250, -5, -51, -29, -111, -6, -5, -7, -33, -5, -119, -1, -9, -14, -68, -5, -64, -4, -5, -3, -40, -126, -27, -4, -63, -5, -79, -3, -61, -75, -2, -4, -37, -59, -6, -4, -37, -3, -5, -25, -4, -4, -55, -77, -5, -6, -19, -14, -4, -24, -54, -49, -136, -4, -3, -9, 0, -8, -8, -11, -21, -4, -5, -85, -4, -15, -11, -6, -145, -15, -5, -8, -14, -2, -77, -11, -27, -6, -13, -8, -29, -58, -36, -36, -5, -38, -8, -6, 0, -36, -105, -3, -2, -6, -48, -3, -4, -40, -63, -3, -143, -95, -6, -93, -27, -131, -3, -282, -29, -68, -17, -7, -97, -4, -27, -5, -2, -6, -37, -3, -156, -3, -44, -2, -3, -8, -10, -7, -117, -5, -6, -20, -20, -25, -7, -7, -5, -4, -5, -3, -14, -3, -7, -2, -19, -5, -6, -46, -5, -10, -5, -3, -11, -27, -44, -4, -90, -2, -106, -5, -3, -72, -21, -3, -13, -6, -2, -183, -3, -13, -44, -47, -4, -61, -238, -65, -39, -93, -5, -17, -18, -8, -1, -15, -1, -4, -11, -3, -45, -103, -5, -3, -5, -94, -35, -149, -6, -34, -17, -5, -6, -100, -83, -21, -15, -1, -28, -51, -5, -3, -12, -12, -54, -6, -87, -2, -68, -78, -103, -3, -70, -4, -126, -40, -4, -12, -8, -34, -3, -23, -17, -2, -33, -5, -7, 0, -6, -33, -6, -104, -33, -7, -5, -4, -4, -17, -5, -6, -176, -2, -8, -13, -4, -19, -43, -49, -52, -33, -14, -4, -17, -99, -12, -1, -7, -3, -194, -1, -27, -115, -21, -5, -49, -87, -82, -4, -1, -54, -23, -2, -8, -5, -6, -74, -6, -5, -1, -8, -8, -213, -44, -5, -81, -6, -3, -55, -1, -33, -119, -6, -41, -4, -24, -8, -18, -4, -28, -10, -7, -34, -3, -3, -17, -3, -31, -3, -105, -9, -2, -57, -38, -25, -25, -56, -119, -11, -19, -5, -158, -46, -50, -162, -22, -4, -70, -2, -2, -93, -6, -5, -3, -10, -48, -9, -48, -15, -3, -132, -12, -7, -69, -23, -25, -20, -4, -92, -11, -3, -56, -87, -1, -5, -44, -2, -26, -7, -48, -225, -18, -45, -3, -51, -3, -7, -15, -1, -11, -76, -10, -24, -4, -5, -1, -171, -3, -11, -3, -137, -39, -3, -18, -6, -3, -10, -118, -4, -11, -11, -8, -2, -3, -144, -80, -2, -43, -75, -4, -5, -37, -10, -43, -17, -57, -43, -5, -27, -71, -6, -25, -22, -41, -283, -13, -15, -5, -55, -15, -11, -3, -5, -9, -10, -4, -34, -3, 0, -33, -42, -52, -11, -3, -24, -7, -7, -3, -5, -28, -149, -4, -46, -5, -17, -7, -97, -3, -12, -8, -19, -35, -6, -8, -11, -4, -2, -3, -181, -13, -3, -19, -5, -70, -4, -5, -152, -6, -80, -49, -29, -10, -50, -64, -17, -3, -153, -69, -32, -5, -68, -62, -67, -50, -3, -5, -107, -10, -109, -87, -89, -5, -14, -107, -3, -47, -227, -27, -2, -41, -7, -5, -7, -7, -1, -6, -19, -11, -3, -8, -59, -80, -1, -119, -150, -25, -9, -56, -7, -23, -91, -12, -7, -24, -294, -20, -19, -17, -27, -5, -8, -7, -7, -3, -9, -5, -22, -41, -10, -50, -3, -6, -13, -70, -2, -29, -4, -33, -4, -3, -11, -7, -35, -12, -16, -18, -30, -14, -8, -27, -15, -10, -25, -68, -47, -13, -3, -6, -50, -6, -7, -5, -95, -26, -5, -12, -64, -4, -30, -8, -20, -3, -69, -87, -92, -7, -49, -80, -120, -5, -11, -39, -39, -28, -76, -32, -3, -3, -3, -19, -102, -8, -206, -9, -5, -17, -20, -37, -41, -8, -38, -18, -13, -34, -4, -6, -4, -8, -104, -66, -58, -153, -2, -26, -9, -3, -57, -3, -6, -23, -23, -37, -3, -9, -14, -37, -14, -163, -32, -13, -23, -5, -6, -3, -26, -9, -21, -56, -42, -44, -30, -16, -3, -120, -7, -28, -133, -36, -64, -50, -6, -10, -4, -47, -21, -58, -7, -4, -1, -5, -63, -30, -2, -21, -46, -9, -35, -6, -6, -27, -49, -5, -7, -62, -3, -13, -4, -17, -3, -6, -3, -3, -5, -30, -78, -12, -19, -126, -83, -1, -74, -61, -6, -31, -29, -10, -33, -3, -5, -50, -61, -10, -60, -22, -12, -235, -21, -9, -25, -3, -19, -23, -10, -158, -6, -25, -37, -22, -14, -26, -6, -4, -52, -3, -2, -5, -9, -6, -3, -3, -22, -22, -25, -84, -80, -75, -18, -10, -4, -98, -21, -6, -3, -3, -52, -45, -225, -9, -117, -29, -12, -17, -10, -3, -5, -78, -21, -13, -50, -52, -11, -2, -3, -6, -87, -22, -2, -16, -17, -19, -101, -48, -3, -9, -49, -78, -3, -26, -3, -6, -4, -4, -110, -12, -1, -6, -6, -7, -24, -9, -93, -16, -2, -3, -3, -107, -3, -53, -5, -3, -48, -80, -10, -42, -2, -3, -44, -35, -4, -70, -34, -8, -88, -31, -22, -11, -2, -3, -59, -41, -26, -6, -27, -34, -50, -15, -45, -85, -8, -171, -120, -84, -5, -5, -34, -5, -9, -37, -98, -11, -42, -82, -63, -62, -26, -3, -321, -8, -5, -20, -62, -25, -28, -12, -10, -28, -7, -46, -67, -14, -82, -36, -18, -4, -30, -4, -50, -43, -1, -15, -4, -46, -2, -24, -152, -54, -123, -12, -24, -41, -57, -9, -70, -17, -96, -29, -4, -48, -87, -98, -124, -8, -202, -8, -6, -4, -165, -44, -7, -55, -5, -48, -5, -54, -113, -3, -79, -4, -149, -4, -53, -10, -5, -13, -203, -23, -4, -4, -50, -42, -22, -17, -51, -7, -42, -89, -2, -61, -20, -17, -4, -2, -6, -9, -31, -10, -2, -6, -5, -10, -27, -10, -4, -18, -59, -33, -6, -24, -55, -4, -10, -32, -5, -74, -65, -98, -4, -3, -19, -126, -9, -32, -64, -14, -2, -30, -34, -14, -7, -3, -5, -10, -1, -84, -57, -7, -2, -57, -1, -42, -2, -49, -31, -79, -5, -112, -28, -50, -195, -7, -3, -6, -6, -69, -108, -15, -3, -7, -5, -29, -40, -4, -8, -203, -6, -5, -2, -10, -23, -16, -50, -10, -26, -30, -10, -22, -79, -4, -256, -38, -11, -7, -65, -9, -106, -166, -47, -8, -34, -55, -3, -174, -4, -2, -7, -25, -53, -24, -7, -64, -5, -26, -132, -2, -86, -27, -151, -110, -73, -29, -60, -4, -3, -21, -12, -40, -69, -46, -111, -39, -4, -99, -8, -107, -22, -2, -14, -5, -49, -20, -9, -44, -40, -50, -30, -9, -5, -3, -4, -49, -5, -111, -3, -3, -32, -70, -11, -27, -10, -5, -23, -3, 0, -73, -3, -37, -13, -28, -30, -2, -10, -10, -4, -3, -42, -81, -8, -28, -47, -45, -6, -27, -6, -6, -5, -31, -4, -88, -4, -46, -4, -1, -71, -7, -5, -31, -16, -192, -70, -16, -4, -64, -38, -71, -130, -26, -5, -68, -4, -33, -32, -1, -4, -38, -177, -112, -7, -182, -11, -3, -10, -4, -17, -13, -39, -34, -107, -60, -106, -21, -16, -5, -57, -2, -19, -4, -48, -15, -10, -120, -4, -5, -12, -6, -19, -89, -4, -8, -5, -8, -71, -4, -17, -5, -5, -20, -98, -57, -124, -5, -3, -35, -35, -16, -11, -64, -151, -84, -4, -8, -42, -157, -2, -6, -39, -20, -9, -49, -33, -7, -19, -65, -2, -3, -44, -106, -111, -4, -13, -57, -6, -11, -122, -32, -65, -6, -116, -9, -75, -3, -2, -51, -19, -101, -1, -278, -125, -4, -6, -4, -7, -37, -6, -76, -15, -26, -51, -10, -10, -61, -212, -23, -9, -5, -6, -45, -9, -6, -74, -12, -156, -2, -60, -20, -26, -20, -18, -13, -10, -109, -21, -87, -7, -2, -4, -2, -36, -124, -66, -2, -43, -5, -48, -10, -23, -84, -61, -43, -107, -8, -12, -28, -117, -16, -41, -5, -5, -104, -80, -6, -53, -29, -19, -17, -21, -9, -19, -51, -50, -71, -1, -6, -9, -7, -16, -15, -8, -2, -2, -71, -80, -13, -5, -13, -20, -6, -11, -32, -3, -37, -15, -4, -2, -2, -4, -64, -6, -7, -4, -266, -73, -5, -3, -71, -8, -26, -42, -4, -52, -50, -26, -2, -96, -4, -2, -10, -3, -4, -36, -9, -114, -4, -61, -4, -4, -6, -2, -6, -14, -23, -28, -14, -51, -18, -37, -6, -24, -19, -5, -58, -130, -21, -91, -100, -13, -4, -12, -50, -1, -40, -3, -45, -9, -9, -6, -124, -174, -14, -11, -143, -19, -30, -25, -32, -53, -109, -6, -8, -4, -7, -71, -7, -122, -2, -6, -26, -27, -3, 0, -9, -105, -4, -60, -135, -59, -140, -20, -13, -68, -103, -135, -9, -7, -2, -7, -25, -76, -5, -9, -20, -1, -93, -2, -3, -36, -5, -108, -5, -2, -6, -39, -5, -73, -1, -3, -23, -59, -8, -2, -10, -125, -2, -115, -7, -3, -54, -2, -12, -48, -9, -13, -5, -17, -10, -96, -13, -44, -6, -4, -5, -10, -28, -108, -25, -12, -27, -111, -4, -12, -1, -6, -17, -21, -1, -24, -8, -5, -69, -13, -264, -11, -30, -2, -9, -4, -37, -7, -2, -25, -2, -4, -161, -2, -48, -6, -22, -10, -13, -25, -3, -49, -222, -90, -8, -3, -6, -13, -72, -52, -28, -139, -5, -51, -14, -14, -131, -82, -37, -3, -30, -38, -114, -4, -61, 0, -4, -73, -63, -6, -46, -4, -3, -9, -60, -84, -17, -133, -2, -1, -19, -35, -12, -23, -25, -19, -99, -13, -6, -33, -10, -3, -7, -55, -48, -3, -44, 0, -7, -66, -227, -3, -37, -157, -4, -3, -7, -5, -17, -15, -119, -9, -3, -141, -3, -1, -10, -5, -46, -42, -60, -26, -3, -2, -22, -12, -2, -5, -4, -6, -18, -48, -62, -8, -7, -48, -12, -74, -27, -49, -21, -53, -41, -13, -23, -26, -123, -4, -38, -47, -3, -3, -19, -11, -4, -56, -14, -55, -1, -16, -5, -26, -66, -18, -5, -33, -2, -6, -55, -14, -5, -2, -1, -7, -12, -78, -5, -2, -82, -142, -57, -68, -20, -123, -30, -9, -5, -59, -9, -28, -115, -9, -4, -49, -37, -125, -170, -24, -5, -21, -6, -160, -11, -9, -5, -9, -42, -4, -2, -28, -20, -1, -63, -44, -3, -74, -262, -16, -34, -55, -4, -73, -8, -7, -5, -4, -15, -50, -25, -7, -73, -154, -17, -18, -27, -6, -8, -12, -214, -6, -68, -260, -69, -181, -38, -13, -3, -9, -51, -8, -100, -54, -13, -7, -58, -7, -50, -21, -6, -6, -30, -26, -129, -69, -99, -4, -18, -32, -5, -39, -56, -13, -19, -103, -11, -64, -5, -19, -53, -161, -37, -67, -83, -6, -2, -44, -11, -7, -8, -197, -99, -45, -9, -87, -33, -23, -6, -12, -90, -2, -18, -23, -10, -83, -102, -15, -5, -4, -4, -89, -7, -4, -15, -1, -3, -36, -3, -28, -27, -118, -8, -8, -17, -58, -47, -4, -79, -8, -5, -4, -135, -36, -119, -74, -56, -9, -104, -7, -5, -2, -40, -67, -9, -32, -15, -9, -8, -81, -3, -2, -11, -54, -6, -29, -3, -69, -70, -22, -5, -63, -11, -6, -36, -5, -24, -111, -17, -16, -27, -19, -160, -9, -63, -24, -23, -7, -7, -10, -89, -41, -10, -5, -108, -23, -10, -82, -26, -36, -57, -22, 0, -6, -7, -59, -105, -27, -11, -30, -159, -5, -86, -90, -60, -30, -28, -1, -40, -4, -2, -28, -6, -159, -6, -98, -4, -6, -43, -7, -108, -6, -7, -13, -21, -9, -14, -121, -16, -48, -26, -214, -14, -6, -82, -75, -121, -27, -331, -36, -281, -16, -27, -90, -10, -62, -76, -145, -23, -23, -33, -45, -3, -129, -4, -103, -5, -162, -96, -38, -82, -22, -21, -14, 0, -36, -8, -37, -31, -3, -71, -7, -35, -13, -73, -68, -53, -164, -10, -5, -15, -9, -24, -49, -7, -43, 0, -94, -297, -21, -73, -15, 0, -6, -149, -5, -28, -5, -73, -35, -6, -17, -3, -34, -70, -52, -120, -17, -91, -116, -57, -92, -3, -41, -230, -27, -124, -6, -4, -8, -2, -110, 0, -121, -58, -29, -17, -23, -15, -7, -168, -5, -3, -117, -78, -182, -2, -21, -39, -8, -25, -32, -97, -11, -2, -168, -7, -6, -84, -2, -115, -137, -50, -38, -4, -67, -5, -53, -14, -71, -87, -80, -63, -5, -14, -113, -16, -29, -36, -4, -85, -9, -6, -3, -6, -17, -37, -27, -10, -108, -5, -5, -21, -48, -2, -52, -373, -3, -2, 0, -10, -52, -5, -117, -124, -27, -25, -65, -5, -13, -74, -18, -1, -64, -81, -27, -1, -48, -12, -27, -140, -42, -68, -8, -58, -34, -13, -16, -10, -8, -8, -53, -99, -37, -3, -8, -16, -90, -23, -5, -92, -3, -7, -6, -15, -59, -13, -57, -14, -45, -4, -84, -64, -116, -5, -6, -3, -3, -19, -40, -82, -72, -12, -32, -7, -132, -15, -9, -27, -124, -47, -69, -205, -51, -10, -110, -4, -84, -26, -17, -4, -30, -46, -4, -1, -12, -12, -3, -15, -5, -22, -16, -2, -10, -38, -4, -8, -69, -5, -118, 0, -53, -15, -22, -6, -4, -60, -5, -165, -6, -1, -8, -4, -95, -6, -105, -3, -27, -124, -58, -4, -59, -44, -55, -78, -28, -31, -5, -127, -4, -95, -5, -3, -71, -20, -70, -75, -5, -78, -2, -63, -39, -88, -2, 0, -65, -53, -31, 0, -27, -7, -69, -3, -99, -8, -71, -2, -117, -23, -10, -94, -9, -48, -7, -79, -24, -9, -5, -225, -4, -3, -68, -32, -3, -24, -102, -10, -50, -11, -17, -4, -18, -4, -5, -6, -28, -14, -7, -49, -152, -5, -38, -19, -21, -49, -10, -24, -70, -46, -5, -3, -14, -189, -2, -1, -37, -111, -5, -1, -43, -17, -16, -17, -39, -3, -16, -12, -40, -67, -20, -3, -4, -163, -43, -45, -13, -128, -56, -165, -3, -2, -18, -108, -9, -4, -6, -7, -43, -7, -39, -1, -16, -108, -59, -125, -150, -7, -8, -109, -97, -46, -52, -76, -8, -198, -6, -17, -12, -58, -3, -48, -3, -53, -5, -21, -15, -14, -100, -1, -136, -3, -7, -57, -39, -14, -94, -82, -7, -5, -22, -51, -7, -3, -45, -35, -102, -22, -5, -60, -105, -3, -6, -9, -23, -63, -115, -69, -160, -9, -6, -2, -257, -88, -19, -59, -59, -228, -31, -105, -70, -71, -16, -1, -25, -47, -4, -69, -112, -36, -6, -51, -20, -31, -8, -7, -5, -8, -47, -3, -6, -4, -7, -13, -107, -52, -4, -33, -44, -106, -30, -7, -52, -87, -4, -10, -36, -3, -14, -2, -10, -10, -7, -1, -31, -73, -12, -5, -30, -25, -32, -13, -8, -84, -93, -153, -61, -28, -6, -5, -10, -3, -3, -6, -28, -58, -40, -3, -54, -114, -9, -42, -5, -213, -4, -84, -8, -42, -50, -45, -3, -194, -79, -70, -5, -6, -104, -101, -14, -12, -64, -7, -28, -129, -100, -23, -9, -1, -39, -8, -13, -153, -12, -94, -10, -23, -109, -3, -104, -15, -27, -10, -16, -10, -57, -34, -126, -2, -3, -2, -96, -3, -15, -10, -4, -13, -16, -23, -90, -4, -87, -26, -40, -5, -3, -47, -9, -5, -2, -52, -6, -138, -60, -39, -211, -68, -89, -3, -26, -44, -101, -6, -133, -35, -5, -6, -37, -100, -25, -20, -29, -100, -75, -13, -104, -23, -7, -92, -105, -10, -46, -151, -37, -27, -64, -24, -40, -3, -93, -50, -5, -215, -3, -143, -6, -167, -130, -10, -5, -13, -25, -44, -19, -13, -9, -280, -134, -75, -86, 0, -56, -22, -5, -102, -32, -42, -94, -3, -48, -109, -4, -51, -43, -139, -15, -6, -66, -95, -14, -9, -8, -42, -34, -1, -28, -7, -4, -52, -51, -64, -27, -78, -7, -8, -107, -32, -141, -92, -25, -19, -7, -7, -31, -77, -58, -24, -26, -47, -12, -8, -60, -12, -20, -5, -4, -6, -36, -15, -53, -25, -6, -29, -99, -23, -141, -14, -4, -2, -27, -4, -3, -7, -71, -3, -48, -57, -39, -7, -3, -142, -25, -12, -88, -17, -60, -91, -10, -14, -5, -5, -9, -67, -5, -38, -23, -44, -17, -16, -14, -22, -39, -6, -5, -34, -11, -10, -1, -80, -32, -8, -6, -152, -4, -13, -1, -57, -4, -7, -21, -40, -15, -12, -43, -44, -8, -4, -45, -3, -5, -36, -5, -4, -6, -77, -8, -132, -9, -2, -53, -83, -8, -167, -38, -3, -37, -167, -4, -45, -43, -46, -11, -18, -11, -83, -95, -1, -7, -117, -90, -15, -2, -3, -59, -158, -37, -12, -18, -49, -73, -2, -1, -5, -42, -8, -17, -21, -71, -2, -60, -17, -39, -49, -134, -108, -5, -14, -75, -92, -23, -4, -10, -23, -5, -58, -13, -107, -17, -30, -7, -30, -59, -106, -53, 0, -20, -28, -29, -13, -14, -161, -36, -30, -110, -4, -7, -213, -27, -10, -9, -34, -119, -7, -14, -43, -59, -26, -8, -77, -24, -28, -34, -100, -9, -3, -40, -171, -3, -41, -102, -2, -27, -5, -3, -17, -1, -5, -32, -50, -43, -31, 0, -3, -221, -4, -4, -1, 0, -1, -17, -14, -2, -9, -27, -3, -19, -4, -2, -15, -44, -159, -101, -1, 0, -146, -5, 0, -7, -36, -32, -27, -119, -44, -63, -15, -3, -4, -3, -49, -62, -3, -58, 0, 0, -195, -10, -43, -51, -193, -6, -13, -25, -34, -280, -2, -23, 0, -26, -7, -7, -70, -6, -21, -29, -155, -37, -43, -9, -14, -44, -17, -1, -9, -21, -21, -3, -39, -72, -3, -7, -36, -168, -3, -21, 0, -6, -9, -8, -1, -2, -103, -6, -45, -1, -4, -2, -2, -11, -12, -16, -2, -20, -6, -52, -2, -9, -112, -27, -11, -2, -11, -31, -2, -15, -53, -114, -44, -15, -113, -50, -30, -94, -4, -3, -56, -236, -144, -32, -153, -4, -53, -5, -27, -47, -8, -67, -63, -78, -2, -119, -2, -3, -38, -9, -85, -1, -57, -15, -38, -69, -7, -13, -42, -9, -215, -297, -4, -36, -2, 0, -143, -2, -56, -196, 0, -172, -30, -3, -6, -8, -66, 0, 0, -2, -8, -156, -30, -21, -13, -93, -1, -54, -2, -9, -7, -122, -29, -16, -18, -2, -229, -106, -31, 0, -17, -4, -5, -5, -15, -4, -103, -10, -6, -2, -6, -129, -18, -129, -46, -2, -9, -63, -19, -1, -2, -2, -95, -30, -234, -84, -6, -124, -21, 0, -204, -78, -18, -37, -48, -2, -4, -36, -6, -225, -46, -5, -15, -45, -34, -59, -2, -5, -7, -82, -8, -6, -33, -144, -22, -5, -4, -133, -3, -118, -65, -9, -7, 0, -2, -12, -2, -19, -13, -48, -14, -6, -7, -27, -6, -81, -167, -84, -9, -92, -33, -2, -7, -38, -216, -21, -31, 0, -4, -12, 0, -2, -6, -156, -50, -7, -48, -170, -45, -74, -15, -19, -20, -22, -24, -30, -9, -109, -48, -18, -4, -34, -114, -200, -17, -28, -1, -34, -18, -14, -77, -2, -6, -1, -9, -35, -6, -156, -137, -29, -19, -36, -2, -54, -139, -1, -5, -23, -57, -112, -4, -38, -3, -51, -45, -1, -11, -1, -18, -17, -1, -253, -8, -70, -2, -104, -17, -56, -2, -95, -4, -9, -71, -91, -93, -45, -214, -122, -29, -27, -16, -33, -7, -12, -40, -53, -88, -4, -4, -5, -86, -35, -4, 0, -8, -23, -80, -9, -4, -15, -15, -4, -47, -68, -2, -21, -2, -77, -101, 0, -21, -31, -4, 0, -26, -44, -23, -2, -2, -96, -2, -2, -12, -27, -21, -2, -50, -47, -163, -21, -7, -9, -7, -2, -72, -52, -7, -27, -2, -25, -3, -39, -171, -5, -161, -140, -42, -75, -1, -37, -3, -173, -7, -7, -109, -213, -6, 0, -3, -242, -8, -4, -18, -90, -55, -194, -28, -74, -130, -6, -57, 0, -7, -9, -62, -5, -108, -38, -2, -37, 0, -42, -51, -86, -21, -182, -9, -46, -36, -7, -6, 0, -22, -4, -15, -2, -2, 0, -58, -46, -5, -129, -2, -6, -60, 0, -9, -6, -2, -82, -3, -25, -54, -74, -4, -35, -18, -7, -43, -36, -29, -93, -9, -4, -190, 0, -2, -115, 0, -124, -164, -53, -84, -4, -2, -38, -22, -4, -28, -165, -7, -7, -28, -5, -37, -39, -48, -63, -181, -3, -58, -7, -80, -1, -40, -6, -56, -8, -7, -6, -5, -18, -4, -5, -4, -68, -3, -207, -54, -4, -4, -14, 0, -4, -16, -35, -39, -4, -3, -36, -4, -31, -55, -37, -2, -11, -2, -2, -47, -26, -4, -136, -136, -2, -153, -24, -104, -6, -37, -9, -1, -49, -3, -100, -1, -16, -3, -2, -75, -25, -4, -19, -11, -4, -1, -2, -1, -222, -47, -37, -32, -5, -54, -2, -2, -35, -3, -108, -3, -113, -31, -40, -13, -5, -100, -35, -5, -45, -6, -62, -166, -13, -68, -114, -21, -33, -15, -6, -5, -3, -6, -56, -31, -20, -37, -18, -79, -118, -13, -60, -28, -50, -96, -12, -26, -2, -37, -4, -2, -27, -49, -91, -2, -5, -9, -11, 0, 0, -47, -3, -74, -54, -13, -2, -5, -4, -19, -2, -23, -7, -73, -8, -128, -2, -3, -2, 0, -34, -35, -4, -16, -52, -109, -112, 0, -80, -13, -10, -11, -4, -2, -33, 0, -46, -31, -6, -5, -17, -85, -74, -37, 0, 0, -5, -29, -113, 0, -9, -47, -50, -136, -10, -3, -9, -69, -7, -4, -15, -120, -13, -13, -67, -3, -5, -44, -4, -11, -61, -91, -8, -148, -45, -27, -63, -103, -92, -61, -4, -1, -2, -2, -7, -28, -2, -53, -46, 0, -1, -208, -2, -9, -11, -18, -2, 0, -2, -8, -9, -12, -20, -7, -4, -4, -3, -103, -12, -107, 0, -6, -2, -66, -2, -23, -6, -23, -2, -15, -4, -21, -114, -51, -22, -5, -1, -35, -90, -55, -19, -6, -9, -32, -112, -4, -24, -37, -5, -42, -91, -36, -47, -7, -62, -18, -27, -15, -70, -39, -26, -53, -4, 0, -27, -4, -12, -207, -38, 0, -17, -24, -16, -64, 0, -62, -20, -31, -65, -57, -12, -5, -39, -72, -2, -47, -33, 0, 0, 0, -2, -41, -5, -33, -13, -29, 0, -9, -2, -31, -8, -33, -71, -18, -1, 0, -23, -5, -5, 0, -118, -3, 0, -39, -26, -14, -6, -1, -3, -23, -13, -46, -33, -3, -19, -1, -106, -21, 0, -24, -13, -137, -3, -38, -160, -96, -35, -37, 0, -128, -46, 0, -63, -73, -4, -6, -37, -59, -18, -1, 0, -57, -160, -7, -94, -97, -7, 0, -55, -47, -28, 0, -59, -40, 0, -7, -1, -1, -19, -275, -89, -120, -13, 0, 0, -15, -1, 0, -32, 0, 0, 0, -92, -30, -3, -1, -53, -1, 0, -91, -45, -20, -7, -85, -3, -26, -11, -88, -6, -68, -49, -219, -1, -151, -37, -10, 0, -75, -1, -21, -95, -3, -60, -30, -6, -22, -68, 0, 0, -14, -135, -38, -31, -1, 0, -9, -14, -5, -1, -6, 0, 0, -32, -27, -81, -14, -109, -20, 0, -164, -36, -175, -58, -47, -96, -1, -34, -34, -6, 0, -135, -1, -1, -1, -7, -1, -1, -3, -109, -6, -1, -96, -6, -3, -27, -11, -5, 0, -64, -35, -8, 0, 0, -16, -3, -90, -7, -2, -19, -87, -57, -1, 0, -72, 0, -46, 0, -124, -56, -41, -41, -23, -5, -1, -1, -41, -65, -103, -45, -5, 0, -203, 0, -12, 0, -31, -1, -55, -162, -58, 0, -26, -2, -21, -14, -48, 0, -11, -19, -132, 0, -80, -59, -20, 0, -63, -86, -17, -6, -7, -137, 0, -52, -3, -71, -48, -12, -30, 0, -2, -33, -17, -3, -34, -7, -2, -73, -30, -20, -104, -13, -72, -85, -5, -19, -106, -83, -15, -29, -56, -14, -137, -3, -17, -2, -15, -11, -163, 0, -32, -4, -39, -17, -47, -36, -7, 0, -9, -38, -20, 0, -25, -62, 0, -7, -3, -5, -145, -15, -227, -118, -1, -113, -27, -5, -6, -21, -59, -4, -4, -55, -38, -8, -11, -50, -10, -44, -71, -40, -3, -14, -71, -26, -49, -110, -29, -33, -68, -4, -30, -60, -1, 0, -82, -358, -163, -3, -12, -1, 0, -8, -4, -2, -41, -112, -7, -15, -5, -1, -55, -5, -28, -1, -4, 0, -2, -2, -103, -70, -29, -108, 0, -39, -44, -6, -1, 0, -101, -3, -4, 0, -2, -7, -74, -7, -63, -52, -120, -2, -27, -21, -49, 0, -18, -105, -17, -32, -106, -139, -109, 0, -1, 0, -9, -55, -1, 0, -155, -130, -32, 0, -8, -5, -145, -1, -104, 0, -75, -15, -14, -11, -67, -6, -9, -58, -50, -152, -3, -88, -1, -55, -12, -64, -40, -5, 0, -97, -7, -67, -25, -107, -225, -8, -53, -72, -148, -7, -251, -47, -1, -37, -3, 0, 0, -53, -41, -15, -2, -83, -57, 0, -6, -68, -67, -15, -21, -14, 0, -3, -1, -4, -95, -62, -13, 0, 0, -20, -15, -6, -20, -20, 0, -12, 0, -6, -27, -35, -16, -7, -208, -13, -26, -4, -67, 0, -1, -5, -17, -78, -25, -4, -87, -15, -47, -53, -241, -167, 0, -109, -39, -19, -10, -38, 0, -59, -8, -61, -14, -20, -98, -22, -80, -6, -139, -10, -64, -11, -7, 0, -115, 0, -38, -2, -2, -3, 0, -77, -1, -2, -10, -91, -53, 0, -28, -20, -103, -67, -1, -4, -53, 0, -42, -109, -1, -63, -94, -85, -30, -3, -15, -23, -26, -56, -23, -10, 0, -37, -22, -28, -88, 0, -4, 0, -4, 0, -2, -4, -16, 0, 0, -6, -48, -3, -19, -21, -23, -29, -5, -27, -23, -35, 0, -1, -26, -3, 0, -52, -1, -4, -5, -19, -34, -9, -12, -131, -117, 0, 0, -28, -3, -21, -46, -5, -31, -36, -2, -53, -62, -4, -58, -7, -5, -1, -3, -20, -130, -138, -2, -15, 0, -1, -40, -4, -84, -32, -9, -3, -2, -15, 0, -4, 0, -42, -13, -60, -61, -36, -36, -2, -57, -28, -33, -3, -41, -189, -35, -50, -22, -1, -3, -77, -141, -18, -4, -61, -31, -26, -1, -149, -152, -6, -28, -2, -36, -44, -10, -93, -2, -92, 0, -12, -29, -24, -1, -4, -23, -41, -28, -84, 0, -17, -7, -27, -10, -3, 0, -1, -22, 0, -1, -31, -13, 0, 0, -11, -34, -1, -58, -2, 0, -7, 0, -16, -46, -82, -11, -14, -40, -19, -21, -3, -52, -8, -4, -36, -46, -2, -86, -82, -154, 0, -47, -2, -43, -7, 0, -47, -113, -53, -51, 0, -26, -19, -10, 0, -2, -70, -110, -19, -2, -39, -15, -2, -39, -4, -54, -6, 0, -42, -9, -33, -1, -54, -8, -9, -7, -11, -77, 0, -79, -5, -8, -34, -2, -1, -61, -2, -2, -157, -144, -19, -2, -9, -26, -2, -42, -23, -4, -7, 0, 0, -31, -61, -38, -54, -128, -15, -70, -1, -106, -3, -3, -1, -45, -2, 0, -7, 0, -29, 0, -1, -7, -45, -3, -2, 0, -47, 0, -25, -9, -2, -62, -3, 0, -52, -6, 0, -41, -38, -74, -3, -166, -36, -50, -27, -26, -79, -47, -1, 0, -75, -6, 0, 0, -7, -2, -7, -9, -280, -6, -20, 0, -5, -11, -15, -129, -8, -2, -4, -1, -43, -11, -5, -3, -35, -4, -24, -123, -11, -38, -5, -1, -9, -79, -45, -8, -15, -62, -164, -4, -2, -39, -1, -16, 0, -1, -126, -84, -29, -27, -11, -3, -12, -84, -3, -17, -38, -8, -17, 0, -37, 0, -25, -33, -4, -54, -13, -1, -11, 0, -46, -2, -19, 0, -3, 0, -53, -4, -2, -37, 0, -11, -107, -5, 0, -27, -22, -8, -42, -2, -92, -1, -44, -6, 0, -37, -20, -29, -3, 0, -16, -1, -31, -54, -20, -8, -50, -64, -156, -1, 0, -29, -47, -110, -2, -9, -22, 0, -39, -2, -82, -2, -4, 0, -7, -2, 0, -46, -26, -56, -118, -1, -9, 0, 0, -18, -59, -2, -40, -26, -3, -12, -53, -36, -17, -28, -14, 0, -24, -63, 0, -5, -56, -128, -107, -29, -68, -98, -9, -59, -3, 0, -17, -39, -3, 0, -118, -49, -20, -15, -16, -5, -35, -27, -229, -3, -60, -1, -14, -8, -6, -5, 0, -1, -7, -1, -2, -2, -34, -2, -23, -110, 0, -17, -2, -1, -144, -3, -42, -4, -32, -5, -10, -130, -23, -40, -2, -11, -81, -36, -1, -201, 0, -23, -9, -57, -54, -41, -3, 0, 0, -46, -4, -80, -84, -73, -39, -1, -24, -47, -38, -12, -9, -33, -5, -23, -37, -11, -9, -27, -17, -15, -34, -7, 0, 0, -17, -1, 0, -11, -16, -49, -46, -19, -114, -43, -117, -1, -1, -143, -11, -5, -7, -75, -164, -7, 0, -30, 0, -2, -115, -22, 0, -1, -19, -53, -9, -79, -236, -14, -18, -41, -33, -97, -10, -206, -33, -39, -3, -21, -1, -26, -71, -62, -4, -35, -23, -11, -79, -16, -13, -10, -46, -20, -1, -108, -8, -33, -100, -60, -2, -14, -6, -1, -1, -102, -33, -91, -10, 0, -2, -38, -1, 0, -27, -11, -14, -7, -2, -43, -6, -25, -1, -4, -5, -29, -3, 0, -10, -23, -207, -102, -187, -16, -10, -2, -6, -13, -5, -27, -37, -167, -5, -15, -2, -3, -15, -132, -1, -36, -138, -111, -65, -70, -20, -33, -5, -23, -6, -35, -37, -3, -5, -5, -101, -3, -12, -22, -67, -14, -30, -3, -6, -116, -84, -205, -179, -15, -36, -55, -33, -38, -30, -48, -79, -2, -20, -9, -81, -60, 0, -133, -10, -6, -19, -103, -72, -27, -49, -9, -1, -96, -21, -62, -65, -118, -1, -12, -1, -93, -5, -197, -38, -3, -59, -2, 0, -15, -1, -74, -43, -72, -33, -4, -3, -11, 0, -12, -5, -29, -1, -83, -18, -105, -7, 0, -45, -3, -3, -30, -19, -109, -44, 0, 0, -7, -40, -6, -2, -1, -5, -36, -21, -69, -101, -7, -18, -68, -6, -65, -24, -18, -66, -84, -53, -16, -77, -9, -17, -236, -26, -12, -87, -24, -2, -95, -14, 0, -110, -115, -28, -65, -219, -87, -1, -8, -15, -9, -32, -32, -122, -4, -23, -1, -127, -21, -1, -2, -4, -37, -5, -10, -1, -9, -96, -84, 0, -58, -2, -42, -20, -72, -45, -1, -1, -35, -43, -62, -26, 0, -4, -10, -9, -188, -7, -6, -8, -4, -32, -6, -79, -23, -72, -19, -7, -7, -144, -2, -1, -42, -68, 0, 0, -1, -3, -35, -1, -19, -14, 0, -1, 0, -1, -6, -39, -8, -3, -31, -21, -32, -11, -1, -80, -73, -24, -29, -7, 0, -25, -44, -6, -70, -314, -6, 0, -67, -2, -18, -58, -32, -1, -2, -167, -10, -54, -175, -1, -121, -17, -19, -1, -48, -22, -55, -1, -254, -95, -30, -1, -113, -170, -84, -36, -68, -2, -1, -79, -10, -42, -88, -2, -1, -53, -3, -2, -48, -2, -17, -97, -65, -3, 0, -42, -32, -3, -7, -18, -88, -7, -6, -9, -33, -46, -58, -21, -58, -8, -3, -60, 0, -81, -73, -45, -147, -27, -1, -1, -3, -1, -41, -1, -12, -84, -68, -92, -118, -1, -34, -7, -14, -98, -9, -4, -64, -56, -132, -42, 0, -2, -91, 0, -120, -1, -122, -10, -21, -97, -6, -21, -35, -4, -150, -3, -17, -6, -29, -239, -36, -11, -61, -1, -41, -20, -29, -69, -40, -17, -77, -15, -1, -39, -5, -39, -36, -38, -18, -14, -118, -17, -44, -8, -53, -11, 0, -7, -18, -73, -79, -19, -54, -63, -84, -38, -25, -93, -5, -16, -48, 0, -4, -293, -34, -110, -3, -102, -24, 0, -30, -4, -38, -173, -56, -28, -11, -19, -48, -35, -1, -93, -23, -145, -34, -30, 0, -2, -16, -33, -75, -48, -10, -8, -226, -30, -48, -172, -128, -25, -8, -1, -8, -1, -88, -181, -55, -6, -8, -21, -4, -2, -95, -18, -38, -70, -84, -156, -20, -1, -1, -19, -82, 0, -125, -86, -5, 0, -37, -5, -2, -6, -16, -13, -29, -61, 0, -124, -8, -52, -121, -5, -24, -14, 0, -33, -12, -121, -13, -2, -2, 0, 0, -3, -7, -3, -2, -7, -62, -70, -6, -39, -34, -22, -92, -12, -5, -2, -125, -23, -67, -9, -32, -62, 0, -2, -2, -4, 0, -33, -4, -2, -73, -43, -2, -9, -2, -335, -6, -5, -13, -5, -35, -17, -1, -17, -5, -54, -41, -9, -2, -10, -143, -1, -14, -3, -31, 0, 0, -60, -59, -6, -34, -12, -31, -47, -75, 0, -117, 0, 0, -2, -122, -8, 0, -56, -2, -38, -32, -49, -9, -57, 0, -19, -57, -8, -52, -68, -15, -9, -184, -1, -165, -122, -22, -121, -2, -1, -3, -31, -5, 0, -53, -4, 0, -12, -150, -1, -106, -19, -97, -63, -5, -2, -87, -88, -2, -25, -70, -117, -2, -146, -25, -11, -16, -86, -41, -19, -7, -104, -2, -40, -97, -41, 0, -72, -39, -53, -78, -16, -12, -64, -4, -153, -205, -101, -2, -178, 0, -81, -2, -10, -14, -36, -5, -105, -2, -47, -3, -24, -2, -21, -33, -112, -23, -24, -4, -11, 0, -7, -3, -1, -4, -71, -33, -5, -57, -13, -2, -58, -8, -44, -11, -58, -14, -14, -4, -51, -99, 0, -2, -31, -1, -34, -146, -4, -71, -71, -76, -43, -28, -2, -6, -30, -2, -25, -143, -57, -36, -10, -2, -21, -85, -25, -164, -5, -54, -117, 0, -47, -12, -139, -61, -32, -12, 0, -3, -8, -66, -19, -4, -133, -2, -105, -32, -5, -5, -21, -2, -23, -1, -10, -26, -22, -22, -7, -30, 0, -2, 0, -14, -58, -94, -10, -120, -2, -141, -17, -96, -36, -57, -32, -102, -118, -43, -39, 0, -6, -119, -48, -3, -6, -50, -104, -9, -82, -3, -11, -22, -3, -87, -6, -2, -4, -59, -3, -50, -32, -7, -2, -16, -61, -16, -73, -66, -16, -2, -1, -78, -36, -7, -92, -12, -1, -2, -24, -76, -35, -1, -20, -6, -11, -260, -2, -66, -15, -29, -127, -2, -64, -120, -1, -97, -28, -1, -27, 0, -1, -1, -58, -19, -2, -21, -47, -1, -115, -3, -1, -139, -55, -1, -164, -9, -33, -4, -52, -169, -1, -10, -23, -21, -13, -32, -1, -14, 0, -62, -33, -58, -1, -2, -167, -158, -9, -67, -38, -1, -18, -2, -19, -85, -21, -103, -44, -10, -22, -102, 0, -17, -23, -4, -1, -3, -39, -62, -107, -53, -2, -1, 0, -31, -8, -29, -34, -38, -39, 0, -4, -16, -12, -9, -11, -58, -2, -46, -2, -107, -113, -8, 0, -151, -25, -7, -165, -23, -28, -2, -156, -2, -2, -22, -80, -100, -38, -37, -12, -3, -61, -97, -71, -6, -26, -6, -73, -7, -17, -83, -35, -40, -1, -1, -22, -2, -46, -150, -47, -1, -1, -1, -1, -52, -1, -6, -82, -63, 0, -3, 0, -20, -43, -9, -49, -3, -10, -35, -3, -80, -4, -55, -25, -6, -62, -16, -14, -165, -63, -7, -5, -14, -77, -40, -93, -31, -35, -2, -32, -1, -93, 0, -12, -64, -90, -2, -2, -3, -5, -4, -1, -3, -49, 0, -4, -84, 0, -6, -2, -66, -2, -5, -127, 0, -21, 0, -33, -42, -17, -170, -12, -25, -5, -88, 0, -1, -4, -6, -21, -3, -15, -89, -9, -5, -3, 0, -7, -43, -1, 0, -3, -5, -2, -12, -106, -1, -20, -16, -3, -1, -174, 0, -32, -2, -1, -35, -156, -41, -2, -18, -1, -94, -2, -12, -11, -27, -50, -200, -2, -5, -3, -22, -24, -17, -5, 0, -113, -1, -1, -28, -78, -34, -2, -4, -2, -125, -24, -8, -13, -5, -130, -2, -200, -85, -1, -23, -66, -2, -45, -7, -60, -28, -20, -47, -135, -156, -73, -4, -10, -3, -73, -1, -73, -2, -3, -75, -110, -11, -79, 0, -1, -81, -17, -51, -54, -1, -35, -29, -113, -25, -5, -22, -50, -58, -8, -24, -1, -67, -58, -36, -48, -10, -2, -104, -42, -5, -63, -32, -157, -38, -7, -5, -28, -1, -79, -24, -40, -10, -33, -137, -5, -2, -19, -34, -33, -90, -49, -48, -110, 0, -71, -22, -85, -22, -13, -1, -2, -1, -31, -74, -10, -60, -45, -36, -6, -11, -3, 0, -86, -133, -10, -13, -45, -30, -4, -6, -52, -20, -168, -57, -13, -3, -29, -5, -5, -165, -1, 0, -9, -35, -49, -54, -10, -15, -2, -156, -22, -1, -40, -6, -252, -46, -40, -13, -4, -254, -28, -12, -6, -6, -81, -28, -56, -3, -6, -8, -112, -273, -6, -21, -20, -2, -2, -3, -29, -61, -49, -3, 0, -133, -96, -84, -12, -11, -3, 0, -2, -3, -3, 0, -65, -42, -124, 0, -110, -4, -22, -86, -109, -1, -139, -73, -5, -6, 0, -3, -2, -178, -2, -11, -20, -33, -74, 0, -4, -134, -2, -7, -6, -3, -13, -25, -2, -70, -6, -40, -6, 0, -13, -112, -50, -19, -30, 0, -1, -119, -26, -19, -34, -12, -56, -127, -63, -71, -2, -12, -3, -11, -81, 0, -12, -2, -25, -1, -29, -76, -45, -15, -13, -2, -43, -1, -2, -128, -9, -35, -155, -129, -49, -10, -2, -2, -26, -153, -3, -27, -11, -11, -12, -2, -70, -49, -2, 0, -59, -2, -152, -1, -2, -2, -25, 0, -12, -33, -4, -73, -13, -8, -4, -86, -19, -35, -4, -29, -1, -87, 0, -3, -3, -28, -42, 0, -23, -40, -25, -17, -187, -1, -4, -52, -9, -6, -3, -5, -69, -119, -27, 0, -169, -25, -9, -1, -31, -14, -88, -2, -5, -18, 0, -68, -3, -2, -29, -3, -11, -34, 0, -20, -2, -104, -15, -16, -32, 0, -12, -2, -2, -37, -5, -41, -48, -2, -40, 0, -17, -6, -45, -11, -2, -13, -61, -121, -14, -33, -18, -5, -40, 0, -4, -16, -59, -69, -189, -4, -11, -4, -18, -98, -4, -129, -14, -51, -68, -58, -76, -15, -39, -15, -2, -14, -17, -7, -146, -5, -4, -85, -21, -13, -63, -8, -18, -49, -48, -4, -15, -9, -3, -193, -2, -48, -14, -7, -109, -13, -6, -62, -103, -14, -2, -2, -39, -5, -41, -8, -35, -77, 0, -7, 0, -3, 0, -18, -151, -8, -58, -54, -50, -28, 0, -7, -15, -1, -110, -11, -63, -11, -5, -16, -6, 0, -2, -93, -2, -14, -82, -2, 0, -17, -7, 0, -34, -36, -7, -105, -66, -92, -5, -13, -72, -1, -54, -50, -5, -24, -202, -14, -2, 0, -13, -49, 0, -30, -43, -48, -10, -41, -67, -20, -5, -105, -24, -9, -9, -10, -99, -7, -2, -1, 0, -3, -3, -7, 0, -55, -32, -6, -6, -1, -22, -2, -4, -18, -74, -103, -17, -13, -28, -3, -36, -126, -10, -37, -81, -58, -2, -40, -14, -261, -49, -5, -88, -65, -21, -17, -27, -28, -2, -45, -1, -62, -5, -111, -4, -15, -46, -4, -40, -33, -15, -61, -24, -1, -1, -85, -2, -70, -79, -77, -4, -14, -42, -13, -11, -93, -2, -2, -1, -5, -46, -28, -1, -44, -9, -14, -1, 0, 0, -125, -30, -3, 0, -17, -12, 0, -28, -79, -7, -14, -17, 0, -21, -56, 0, -7, -11, -31, -1, -30, -169, -90, -9, -60, -16, -28, -8, -20, -22, -41, -13, -86, -32, -132, -61, -28, -11, -18, -187, -22, -35, 0, -60, -31, -124, -11, -20, -45, -21, -2, -37, -22, -13, -15, -23, -230, -2, -49, -38, -214, 0, -6, -39, -88, -4, -115, -33, -6, -102, -2, -72, -19, 0, -23, -14, -4, -1, -2, -14, 0, -169, -124, -89, -22, -2, -96, -2, -17, -9, -7, -4, -8, -7, 0, -33, -5, -195, -12, -96, -228, -5, -5, -3, -8, -45, -61, 0, -25, -3, -86, -28, -32, -1, -39, -6, -2, -234, -12, -64, -2, -6, -33, 0, -28, 0, -51, -6, 0, -3, -44, -54, -160, -25, -40, -1, 0, -57, -14, 0, -55, -10, -10, -162, 0, -74, 0, -6, -42, -81, -34, 0, -9, -67, -39, -37, -1, -1, -1, -96, -1, -26, -34, -22, -1, -11, 0, -5, -14, -87, -7, -11, -1, -37, -36, -2, -15, 0, -10, -7, -33, -2, -31, -1, -2, -46, -56, -61, -1, -1, 0, -85, -268, -6, -23, -47, -7, -5, -48, -49, -33, -5, -153, 0, -40, 0, -26, 0, -80, -70, -1, -13, -331, -6, -86, -2, 0, -15, -26, -36, -47, -3, -115, 0, -108, -32, -53, -87, -55, -28, -42, -20, -17, -107, -148, -5, -15, -1, -86, 0, -98, -32, -58, -10, -18, -84, -116, 0, -10, -53, -53, -1, -55, -3, -1, -27, 0, 0, -1, 0, -1, -2, -16, 0, -6, -1, -13, -6, -1, 0, -22, -148, -17, 0, -1, -3, -3, -202, -42, -8, -1, -5, -11, -67, -2, -8, -14, -2, -90, 0, -51, 0, -83, 0, 0, -93, -1, -6, -16, -125, 0, 0, -32, 0, -1, 0, -18, 0, -87, -57, -10, -68, -115, -8, -44, -20, -7, -26, -36, -34, -2, -14, 0, -163, -140, -39, -135, -61, -24, -99, -17, 0, -67, -1, -40, -17, -50, -2, -3, -91, -28, -20, -13, -1, 0, -21, -210, -62, -36, -56, -26, 0, -160, -18, -28, -28, -4, -4, -6, -65, -19, -39, -10, -295, -21, -16, -98, 0, -11, -57, -7, -11, -1, -27, -1, -37, -16, -20, -2, -43, -44, -11, -48, -35, -14, 0, 0, -31, -1, -10, -2, -60, -22, 0, -140, -1, -8, -8, -1, -7, -44, -13, -38, -3, -5, -49, -4, -136, -10, -3, -203, 0, 0, -17, -28, -19, 0, 0, 0, -23, -9, -2, -88, -6, -3, -14, -45, -161, -52, -7, -24, -51, -85, -1, -2, -73, -9, -64, -3, -58, -1, -1, -4, -1, -32, 0, 0, -3, -40, -11, -254, -1, -75, -57, -10, -117, -66, -46, 0, -69, -1, -82, -30, -1, -5, -59, 0, -36, -5, -13, 0, -102, -28, -2, -20, -3, -29, -90, -66, -240, -10, 0, -79, -2, -1, 0, -23, -2, -14, -2, -10, -118, -22, -23, -2, 0, -18, -54, 0, -34, -1, -34, -6, -47, -4, -58, -1, -37, -1, -32, -92, -96, 0, -5, -8, -1, -24, -4, -5, -44, 0, -45, -75, -3, -124, -15, -16, 0, -39, -31, -75, -45, -44, -7, -4, -6, -2, -64, -1, -37, -7, -77, -24, -3, -1, -2, -10, -83, -11, -155, -10, -43, -77, -80, 0, -164, -15, -15, 0, -14, -12, 0, -10, 0, 0, 0, -12, -33, -5, 0, -56, -15, -70, 0, -90, 0, -22, 0, -62, -54, -2, -33, -1, -68, -90, 0, -50, -69, -3, 0, 0, -36, -12, -69, -28, -7, -24, -109, -3, -50, -84, -33, 0, -24, 0, -17, -39, -120, -80, 0, -79, -275, -18, -2, -126, -26, 0, 0, -15, -8, -1, -2, 0, -22, -61, -1, -20, -121, 0, 0, -45, 0, -15, -25, -39, -1, -3, 0, -1, -17, -96, -283, 0, -38, -11, 0, -147, 0, -143, -30, -1, -12, -79, -77, -6, 0, 0, -70, -14, -63, -60, -35, -12, -2, -26, -1, -10, -37, 0, -1, 0, -47, -4, 0, -96, -11, -6, -2, -2, -60, 0, -44, -38, -11, -25, -3, -38, -62, 0, -1, 0, -1, -51, 0, -92, -67, -54, -1, -26, -10, -97, 0, -68, 0, -9, -62, -45, -66, 0, -2, -1, -5, -93, -1, -18, -8, -66, -108, -1, -21, 0, -60, -1, -67, -10, -144, -41, -5, -66, 0, -22, -146, -11, -45, -1, -90, -8, 0, -25, -201, -24, -2, 0, -46, 0, -148, 0, -6, -1, -1, -37, -9, -46, -9, -1, -17, -1, -20, -26, -42, -127, 0, -35, -40, -95, -5, -16, -117, 0, -132, 0, -2, -41, -1, -35, -23, -23, -17, -10, -7, 0, -1, -11, -51, -60, -16, -19, -40, -1, -70, -98, -1, -64, 0, 0, -139, -1, -2, 0, -3, -25, -3, -5, 0, -58, 0, 0, -17, -56, -115, -24, -12, -1, -3, -4, -50, 0, -129, -3, -137, -58, -35, -11, 0, -21, -30, -44, -3, -43, 0, -46, -19, -55, -117, -10, -1, -4, -12, -1, -57, -191, -5, -10, -63, -20, 0, -57, -194, -55, -9, -86, -69, -51, 0, -33, -97, -69, -1, -2, -34, -30, -1, -14, 0, -58, -4, -26, 0, 0, -17, -227, -16, -192, -18, 0, 0, -27, -63, 0, -19, -8, -32, -9, -3, -7, -8, -27, 0, -51, -3, -32, -1, 0, -30, -102, -23, -82, 0, -103, -12, -13, 0, -38, -79, -4, -6, -57, -100, -44, -63, -12, -20, 0, -8, -4, -48, -285, -120, -63, -245, -33, -4, -61, -63, -29, -57, 0, -276, -10, -14, -22, 0, -1, -1, -25, -11, -120, -2, -7, -1, -36, 0, -32, -61, 0, -74, -21, -3, -28, -43, -25, -30, -30, -74, -114, -25, -10, -38, -3, -18, -176, -1, 0, -23, -5, -16, -72, 0, -9, -96, 0, -23, -3, 0, -3, 0, 0, 0, -9, -28, -4, -52, -131, -14, -1, -46, -92, -270, 0, -78, -3, -1, 0, -103, 0, 0, 0, -23, -2, -10, -134, -94, -56, -1, -5, -54, -49, -1, -27, 0, -1, -108, 0, -81, -64, 0, 0, -1, -313, -7, -2, -61, -100, -1, -35, 0, -10, -16, -65, -32, -6, -4, 0, -36, -7, -2, 0, -10, -237, 0, -43, -1, -148, -4, -39, -172, -15, -29, 0, -5, -11, -12, -2, 0, -10, -53, -86, 0, 0, -60, -92, -1, -217, 0, 0, -299, 0, 0, -81, -37, 0, -2, 0, 0, -1, -8, -79, -2, 0, -8, -20, -30, -160, -1, -1, -32, -17, 0, -32, -12, -32, -2, 0, -8, -8, -73, -57, 0, -13, -248, -12, -16, -2, 0, -1, 0, 0, -10, -3, -1, 0, -3, 0, -13, -65, -1, -101, -47, -14, -1, -7, 0, -30, -222, -51, -50, 0, 0, 0, 0, -3, -87, -2, -33, 0, -40, -15, -199, -41, -1, 0, -27, -191, 0, 0, -2, 0, -7, -28, -87, 0, -46, -19, -8, -146, -52, -3, -3, 0, 0, 0, 0, -22, -14, -18, -9, -85, -7, 0, -44, -32, -4, -46, -125, -11, -1, -2, -32, -3, 0, 0, -30, -20, -28, -1, -12, -13, -3, 0, -9, -11, 0, -5, 0, -65, 0, 0, -5, 0, -37, -24, -34, -112, -42, -22, -3, -26, -10, -87, -80, -25, -62, -2, -42, -1, -67, -9, -44, -63, -126, 0, -54, -28, 0, -37, -98, -1, -36, -30, -79, -3, -53, -7, -21, -6, -165, 0, -13, 0, -4, -4, 0, -3, -1, -1, -2, -20, -20, 0, -1, -134, -11, 0, -2, -21, -41, 0, -9, -6, -1, -2, -23, -50, 0, -10, 0, 0, 0, 0, -3, 0, -39, -23, -45, -10, -30, -67, -1, -24, -98, 0, -27, -61, -124, -26, -105, 0, 0, 0, -8, 0, -10, -7, -53, -11, -77, -2, -13, 0, -180, -86, 0, -23, 0, 0, -66, -39, -4, -46, -25, 0, 0, -22, -167, -72, 0, -2, -44, 0, -4, -28, -1, -45, -171, 0, -8, -179, -77, 0, -39, -27, -1, -11, -4, -1, -121, 0, -5, -80, -1, 0, -3, -38, -12, -16, -72, 0, 0, 0, 0, -116, -77, -130, -2, -66, -28, -4, -15, -4, -27, -3, 0, -17, -117, 0, -20, -3, 0, 0, -1, 0, -1, -137, 0, -5, -68, 0, 0, 0, -13, -41, 0, -1, -77, -85, -3, -20, -50, -82, -3, -51, -53, -3, 0, 0, -21, -1, -7, 0, -17, 0, -63, -80, 0, 0, -1, -1, -106, -60, 0, -49, -14, -2, 0, -31, -1, -1, -13, -16, -1, -3, -48, -11, -11, -45, 0, -63, -19, -51, -1, -10, -40, -7, -216, -50, 0, -51, -18, -115, -1, 0, -263, -2, -3, -140, -92, -28, 0, -22, -8, 0, -28, -28, -30, -16, -15, -3, 0, -21, -59, -11, -72, -28, 0, 0, 0, -5, -9, -1, 0, 0, 0, -164, -60, -25, 0, -15, 0, -10, -2, 0, 0, 0, -7, -3, -15, -13, 0, -2, -11, -1, -13, -18, 0, -5, -4, 0, -3, -96, 0, 0, -2, 0, -69, -56, -33, 0, 0, -15, -59, 0, -39, 0, 0, -17, 0, -144, 0, -2, 0, -162, 0, 0, -1, 0, -32, -4, -55, -27, -45, 0, -1, 0, -42, -49, -17, -1, -75, -4, -72, -52, 0, 0, -16, -3, -7, -21, 0, -57, 0, -51, -29, 0, -8, -15, -1, -17, -9, -3, 0, -111, 0, -55, 0, -1, 0, 0, -17, 0, -1, -1, -23, -11, -6, -5, 0, -31, -30, -14, -2, -1, 0, -2, -21, 0, 0, 0, 0, -7, -9, -14, 0, 0, -77, -22, -2, -2, -61, 0, -2, -76, -45, 0, -6, -3, -11, -10, -18, -19, 0, -3, 0, -3, 0, -173, -5, -10, -2, 0, -6, -24, -26, -1, 0, 0, -24, -60, -14, -54, 0, -62, -6, -10, -13, -6, -42, 0, -3, -1, 0, -132, -1, -1, -260, -4, 0, -67, -59, 0, -43, 0, -9, 0, -22, 0, -18, -37, -141, -17, -73, -31, -3, -29, 0, -18, -1, -1, 0, 0, -47, -132, 0, -109, -17, -18, 0, 0, 0, 0, -50, -74, 0, -219, -32, 0, -60, -46, -1, -3, -64, 0, -40, -14, -4, -9, -20, -1, -32, -40, 0, 0, -92, -2, -1, -24, 0, 0, 0, 0, -31, -121, 0, -38, -111, -73, -4, -2, -16, 0, -46, -36, -25, 0, -13, -2, -130, -10, 0, 0, 0, -128, -3, -5, -150, -15, -23, -83, -28, -11, -11, -43, 0, -57, -44, -4, -18, 0, 0, -23, -92, -77, 0, 0, 0, 0, 0, 0, 0, -1, -29, -29, -8, -1, -4, -67, 0, 0, -29, 0, -4, -6, 0, -7, -27, -4, -16, -16, -10, 0, -53, -148, 0, -1, -46, -5, -12, 0, -147, -125, -2, -4, 0, -48, -3, -34, 0, -19, -1, -76, 0, -1, -4, -5, 0, 0, 0, -81, 0, -8, 0, 0, 0, -17, -1, -16, 0, -9, -4, -3, -8, -6, -3, 0, 0, -79, -3, -8, -96, -37, -15, -114, 0, 0, -8, 0, 0, 0, -1, -7, 0, -1, -7, -16, 0, -33, -37, -24, 0, -105, 0, 0, -6, -15, -36, -18, 0, 0, -1, -29, 0, -50, -22, -11, -2, -1, -1, 0, -60, -15, -90, -14, 0, -30, 0, -25, -2, 0, 0, -1, -3, 0, -84, -121, -3, 0, -29, -141, 0, 0, -2, 0, 0, 0, 0, -107, -1, 0, -2, -1, 0, 0, -1, -2, 0, 0, -96, -61, -89, 0, -69, -61, -12, 0, -38, -80, -59, 0, -8, -2, 0, 0, -6, -6, -3, 0, -3, 0, 0, 0, 0, -63, -1, 0, -15, 0, -37, 0, -59, -37, -8, 0, 0, 0, -1, -291, -60, -156, -60, 0, -33, 0, -98, 0, -1, -3, 0, 0, 0, -29, -4, -79, -1, 0, 0, -113, 0, 0, -7, -1, -41, 0, -23, 0, 0, -1, -3, -1, 0, 0, -6, -3, 0, -1, -6, -3, 0, -38, -1, -6, 0, -2, -16, 0, 0, -16, -8, 0, 0, -2, -48, -10, 0, 0, 0, -27, 0, -18, -20, -11, 0, -61, 0, -41, -15, -34, -20, -13, 0, -1, 0, -1, 0, -24, 0, -7, 0, 0, -95, 0, 0, -54, -78, -84, 0, 0, -117, 0, -22, -34, 0, 0, -66, -31, 0, 0, 0, -117, -2, 0, 0, 0, 0, -4, -36, -17, 0, -142, -43, 0, -51, 0, -13, 0, -3, 0, -73, -30, 0, 0, 0, -59, -8, -136, 0, 0, 0, -8, -4, 0, -8, -4, -3, -26, 0, 0, 0, 0, 0, -50, 0, 0, -32, -83, -4, 0, -1, -14, -1, -74, 0, -79, 0, 0, -86, 0, -35, 0, -1, -2, -71, 0, -139, -103, -3, 0, -1, -50, 0, 0, -35, 0, -11, 0, 0, -46, 0, -98, -10, 0, -3, 0, -22, 0, -112, -3, -23, 0, 0, -1, -84, 0, -4, 0, 0, -1, -25, -23, 0, 0, -23, -101, 0, -84, -175, 0, 0, -62, -58, 0, -1, 0, -35, 0, 0, 0, 0, 0, 0, -28, -93, 0, 0, 0, 0, 0, 0, -124, -2, 0, 0, -39, -5, -144, 0, 0, -18, -26, 0, -210, 0, -1, 0, -85, -1, 0, 0, -1, 0, 0, -1, -49, -41, -38, 0, 0, 0, 0, 0, -10, 0, -28, -92, -14, -180, 0, -21, 0, -10, 0, -26, 0, -1, -2, -28, -41, -5, -87, -75, 0, 0, -35, -2, 0, -67, 0, -225, 0, -1, -99, 0, 0, -4, 0, -18, 0, -60, 0, -2, 0, 0, 0, 0, 0, -78, 0, 0, 0, 0, -1, -195, 0, 0, -5, -67, 0, 0, 0, -4, -42, -1, -1, -41, -5, -66, 0, 0, 0, -3, -2, 0, 0, 0, 0, 0, -25, 0, -12, 0, 0, -193, -2, 0, 0, -1, -14, 0, 0, -3, -4, 0, -3, -22, 0, -1, -22, 0, 0, -61, -30, -3, 0, -77, -10, 0, -16, 0, 0, 0, 0, 0, 0, 0, 0, 0, -9, 0, -24, -25, -20, 0, 0, -3, -27, 0, -11, -93, -72, 0, 0, -40, -83, 0, -68, -8, 0, -11, 0, -30, -42, 0, 0, 0, 0, -9, 0, -1, -23, -142, -1, -3, 0, -40, -16, 0, 0, -56, 0, 0, 0, -20, 0, 0, 0, -28, -156, 0, -57, 0, -18, 0, 0, -1, 0, 0, 0, 0, 0, 0, -21, -16, -52, 0, -51, 0, -7, -1, -28, 0, -60, -18, -102, -299, 0, 0, 0, -91, 0, -16, -5, -96, 0, -14, 0, -41, -5, -7, -2, 0, -72, 0, 0, 0, 0, -43, -25, 0, 0, 0, -133, 0, -67, -19, -39, 0, 0, -55, 0, 0, -7, 0, 0, -6, -51, -24, 0, -8, -3, -2, 0, -9, -1, 0, 0, -28, 0, 0, 0, 0, -97, -30, 0, 0, -3, 0, 0, -91, -78, 0, 0, -111, -3, -10, 0, -102, -49, 0, 0, 0, -2, 0, -13, 0, 0, -2, 0, -43, 0, 0, -15, -10, 0, -130, -14, -35, 0, 0, -184, 0, 0, -10, 0, -3, 0, -56, -40, 0, -37, -1, -57, 0, -67, -32, 0, 0, 0, -28, -1, 0, -1, -4, -2, 0, -3, -2, -4, 0, 0, 0, 0, 0, -1, -7, -91, 0, -2, -26, 0, -4, 0, 0, -2, -30, 0, 0, -5, 0, -159, 0, 0, -17, 0, 0, -34, -7, 0, 0, -81, -49, -3, 0, -16, -4, 0, 0, 0, -67, -5, 0, -7, -99, -113, 0, 0, 0, 0, -17, 0, 0, 0, 0, -93, -35, 0, -211, 0], 1000: [-67, -42, -123, -129, -15, -9, -6, -50, -6, -105, -124, -52, -14, -9, -3, -35, -61, -48, -65, -4, -53, -97, -122, -71, -20, -21, -50, -3, -75, -6, -54, -13, -3, -22, -8, -109, -6, -77, -41, -4, -100, -10, -119, -51, -5, -52, -26, -94, -119, -42, -14, -49, -11, -36, -57, -31, -110, -94, -36, -5, -59, -4, -37, -16, -39, -58, -20, -5, -36, -7, -166, -20, -10, -4, -34, -73, -80, -10, -42, -36, -7, -21, -7, -8, -4, -33, -51, -15, -6, -20, -68, -234, -124, -20, -103, -7, -41, -6, -73, -28, -102, -40, -61, -62, -93, -42, -18, -24, -4, -25, -10, -7, -25, -3, -15, -22, -11, -83, -84, -68, -11, -123, -5, -7, -45, -61, -55, -9, -7, -9, -3, -120, -10, -8, -24, -13, -13, -5, -71, -57, -4, -14, -12, -62, -5, -19, -45, -262, -14, -4, -103, -65, -118, -59, -97, -135, -16, -22, -100, -47, -103, -3, -28, -22, -3, -18, -22, -25, -10, -22, -27, -94, -65, -10, -4, -29, -10, -3, -44, -3, -7, -418, -12, -39, -15, -81, -69, -3, -3, -32, -4, -69, -6, -13, -4, -19, -29, -38, -10, -74, -122, -56, -39, -130, -173, -5, -3, -24, -62, -19, -257, -33, -33, -98, -3, -7, -6, -53, -33, -3, -161, -57, -86, -30, -68, -46, -43, -16, -34, -29, -65, -198, -109, -70, -4, -50, -8, -50, -158, -4, -162, -118, -27, -112, -3, -3, -2, -58, -119, -6, -102, -32, -3, -13, -3, -4, -18, -47, -6, -102, -7, -7, -10, -4, -29, -24, -16, -17, -3, -7, -5, -21, -39, -61, -117, -39, -59, -14, -12, -113, -9, -3, -92, -70, -34, -15, -5, -4, -24, -18, -42, -6, -53, -33, -34, -2, -35, -14, -14, -36, -45, -33, -125, -69, -28, -47, -8, -29, -101, -40, -27, -9, -102, -30, -7, -4, -52, -86, -8, -21, -90, -14, -5, -8, -20, -36, -6, -14, -20, -133, -27, -52, -125, -61, -20, -130, -62, -33, -47, -4, -28, -8, -44, -73, -11, -11, -57, -15, -2, -4, -6, -55, -3, -10, -120, -114, -4, -36, -13, -47, -14, -9, -18, -3, -60, -59, -30, -21, -44, -27, -117, -150, -13, -34, -145, -22, -37, -107, -171, -80, -72, -60, -51, -33, -59, -15, -8, -149, -151, -97, -74, -5, -7, -94, -76, -157, -21, -6, -130, -4, -34, -4, -32, -22, -34, -33, -20, -182, -17, -51, -6, -37, -5, -93, -5, -40, -44, -6, -34, -3, -34, -4, -14, -70, -98, -64, -297, -19, -50, -23, -98, -45, -116, -12, -45, -47, -4, -145, -72, -26, -7, -118, -52, -8, -168, -185, -16, -3, -26, -25, -32, -3, -8, -19, -31, -123, -177, -4, -34, -94, -63, -3, -3, -78, -38, -16, -112, -44, -152, -21, -65, -107, -52, -346, -33, -42, -6, -2, -77, -34, -86, -90, -52, -49, -44, -87, -79, -4, -15, -184, -39, -30, -146, -19, -54, -5, -35, -4, -76, -5, -5, -8, -2, -161, -3, -83, -1, -29, -10, -34, -41, -108, -4, -9, -2, -106, -30, -83, -39, -4, -22, -3, -222, -12, -75, -85, -46, -26, -8, -37, -65, -70, -4, -29, -48, -4, -4, -5, -55, -10, -40, -12, -38, -64, -19, -58, -11, -8, -81, -20, -2, -4, -4, -152, -5, -18, -29, -98, -58, -37, -30, -19, -79, -3, -146, -46, -3, -5, -6, -48, -6, -20, -35, -3, -64, -36, -2, -23, -59, -17, -64, -8, -73, -202, -9, -72, -71, -122, -22, -33, -15, -32, -49, -117, -3, -27, -180, -17, -31, -119, -4, -92, -37, -3, -29, -93, -111, -72, -4, -3, -83, -6, -27, -353, -87, -61, -5, -108, -86, -26, -44, -111, -97, -111, -4, -3, -51, -74, -93, -6, -5, -13, -59, -27, -3, -8, -16, -49, -19, -4, -78, -59, -90, -123, -54, -9, -24, -80, -56, -26, -103, -7, -88, -33, -70, -11, -59, -18, -37, -18, -48, -55, -49, -10, -8, -1, -78, -57, -39, -20, -32, -42, -24, -92, -20, -6, -4, -4, -72, -4, -4, -83, -31, -3, -46, -26, -59, -94, -4, -5, -4, -6, -18, -14, -94, -82, -52, -3, -42, -38, -8, -49, -45, -10, -250, -143, -119, -102, -3, -65, -46, -144, -8, -26, -77, -8, -3, -26, -23, -22, -3, -3, -19, -83, -29, -8, -36, -5, -81, -37, -164, -22, -52, -69, -67, -31, -11, -255, -23, -24, -4, -41, -9, -2, -106, -4, -61, -23, -81, -58, -3, -5, -33, -28, -12, -5, -193, -18, -3, -18, -85, -11, -150, -6, -99, -9, -4, -13, -49, -148, -5, -11, -64, -9, -21, -78, -76, -94, -303, -31, -4, -6, -35, -11, -51, -15, -29, -168, -4, -90, -108, -54, -94, -8, -3, -12, -6, -61, -117, -122, -6, -4, -17, -36, -164, -10, -43, -4, -48, -23, -86, -12, -9, -8, -21, -43, -9, -14, -89, -3, -52, -26, -6, -6, -213, -77, -43, -75, -4, -61, -78, -105, -4, -59, -48, -67, -5, -4, -120, -24, -31, -5, -3, -7, -11, -7, -5, -3, -7, -3, -14, -80, -77, -66, -4, -33, -4, -15, -92, -81, -16, -40, -41, -74, -5, -27, -62, -47, -93, -69, -26, -21, -32, -37, -69, -66, -4, -9, -24, -9, -128, -65, -28, -1, -115, -57, -35, -3, -8, -5, -50, -31, -4, -5, -84, -6, -13, -17, -5, -19, -76, -129, -4, -3, -3, -27, -105, -81, -32, -39, -49, -53, -5, -31, -4, -4, -26, -52, -3, -6, -20, -85, -26, -127, -114, -2, -149, -8, -65, -7, -86, -41, -9, -49, -40, -5, -18, -4, -107, -6, -4, -11, -65, -6, -10, -14, -15, -4, -18, -15, -128, -52, -6, -117, -69, -7, -367, -50, -4, -114, -58, -4, -3, -69, -6, -170, -23, -51, -29, -15, -71, -47, -120, -13, -4, -109, -53, -10, -39, -45, -25, -4, -3, -10, -40, -26, -22, -66, -7, -47, -152, -2, -18, -70, -4, -3, -204, -169, -193, -79, -34, -211, -54, -26, -4, -83, -58, -5, -11, -16, -34, -10, -16, -171, -235, -38, -9, -32, -84, -146, -6, -12, -83, -108, -11, -16, -4, -77, -10, -26, -42, -17, -53, -137, -68, -78, -21, -5, -16, -22, -56, -5, -64, -56, -15, -75, -9, -70, -121, -51, -4, -32, -6, -45, -15, -165, -85, -14, -20, -11, -15, -5, -42, -2, -22, -22, -103, -30, -5, -5, -78, -48, -4, -15, -216, -16, -50, -6, -6, -3, -34, -105, -6, -3, -36, -28, -169, -12, -21, -112, -2, -8, -50, -72, -13, -75, -33, -5, -8, -69, -66, -75, -102, -46, -17, -19, -16, -27, -37, -70, -4, -133, -36, -9, -129, -4, -4, -33, -51, -32, -19, -113, -49, -53, -18, -51, -188, -51, -144, -258, -21, -25, -102, -126, -35, -29, -26, -11, -82, -6, -176, -47, -7, -48, -14, -4, -4, -67, -104, -549, -18, -53, -16, -6, -39, -80, -38, -39, -80, -39, -4, -22, -221, -64, -16, -123, -33, -69, -88, -23, -52, -19, -26, -73, -16, -113, -4, -29, -27, -48, -28, -53, -153, -48, -24, -28, -55, -41, -34, -31, -74, -40, -3, -75, -31, -57, -71, -4, -32, -15, -53, -6, -4, -5, -65, -72, -19, -155, -6, -40, -90, -82, -28, -61, -94, -7, -12, -65, -65, -99, -30, -94, -143, -8, -78, -52, -20, -9, -42, -4, -27, -78, -20, -5, -15, -138, -3, -66, -112, -76, -57, -144, -131, -187, -89, -10, -26, -52, -85, -347, -19, -3, -4, -34, -31, -54, -11, -46, -43, -27, -91, -22, -4, -90, -24, -5, -17, -8, -83, -4, -27, -79, -76, -7, -93, -18, -38, -8, -4, -72, -46, -24, -98, -11, -42, -20, -213, -3, -92, -31, -67, -5, -31, -34, -61, -74, -59, -30, -68, -79, -42, -61, -80, -29, -45, -4, -134, -89, -66, -120, -28, -4, -205, -197, -53, -4, -18, -38, -30, -68, -7, -76, -52, -14, -4, -9, -14, -71, -90, -93, -36, -4, -135, -31, -85, -104, -102, -39, -32, -14, -18, -3, -43, -71, -8, -53, -5, -90, -31, -89, -65, -40, -7, -32, -31, -36, -46, -18, -35, -12, -120, -7, -180, -30, -4, -72, -31, -218, -12, -30, -7, -14, -24, -15, -56, -40, -7, -18, -70, -32, -37, -135, -75, -4, -33, -35, -76, -7, -25, -28, -7, -3, -85, -30, -82, -28, -14, -165, -3, -63, -220, -29, -88, -93, -17, -64, -25, -18, -127, -36, -12, -3, -21, -121, -3, -89, -43, -104, -42, -7, -28, -3, -63, -4, -56, -13, -39, -29, -5, -114, -3, -13, -60, -21, -6, -5, -8, -45, -72, -5, -16, -30, -37, -3, -2, -186, -27, -67, -39, -29, -26, -98, -73, -34, -127, -29, -8, -12, -132, -6, -10, -114, -3, -71, -3, -26, -157, -56, -64, -53, -93, -64, -64, -173, -15, -3, -127, -29, -41, -42, -51, -86, -22, -82, -24, -20, -64, -38, -6, -59, -32, -22, -48, -6, -25, -44, -4, -17, -77, -18, -228, -77, -68, -5, -42, -102, -116, -5, -12, -78, -55, -4, -6, -47, -68, -4, -47, -166, -2, -9, -36, -52, -264, -102, -92, -223, -134, -142, -4, -30, -51, -14, -42, -91, -80, -61, -126, -88, -3, -33, -76, -45, -92, -46, -141, -35, -61, -106, -41, -30, -131, -55, -3, -43, -16, -84, -34, -45, -11, -26, -41, -116, -67, -29, -31, -126, -3, -156, -48, -39, -13, -140, -55, -50, -90, -57, -179, -18, -3, -69, -67, -15, -113, -88, -4, -37, -118, -2, -22, -31, -45, -158, -2, -108, -89, -9, -2, -32, -39, -132, -10, -59, -70, -4, -17, -32, -161, -22, -81, -2, -38, -41, -39, -77, -91, -5, -95, -63, -41, -69, -45, -3, -64, -25, -43, -82, -15, -79, -30, -8, -25, -4, -91, -73, -41, -6, -17, -82, -50, -10, -34, -14, -8, -59, -15, -201, -179, -40, -228, -24, -229, -29, -29, -99, -267, -20, -41, -19, -64, -3, -4, -151, -20, -41, -162, -3, -15, -122, -44, -91, -37, -3, -73, -3, -4, -35, -94, -3, -16, -4, -4, -76, -103, -11, -107, -15, -4, -5, -9, -30, -27, -4, -13, -263, -42, -4, -57, -13, -4, -43, -40, -75, -72, -22, -5, -85, -49, -11, -41, -67, -19, -4, -118, -87, -92, -5, -9, -119, -107, -87, -21, -50, -14, -65, -21, -123, -133, -99, -170, -65, -81, -3, -24, -127, -145, -23, -7, -17, -5, -17, -28, -24, -7, -2, -51, -14, -17, -135, -27, -10, -80, -19, -306, -45, -12, -66, -177, -39, -40, -6, -3, -34, -37, -13, -5, -8, -46, -16, -23, -79, -107, -74, -67, -3, -109, -4, -55, -142, -51, -5, -4, -26, -23, -84, -21, -38, -6, -13, -3, -9, -56, -101, -13, -51, -11, -10, -37, -45, -47, -115, -45, -3, -50, -28, -6, -128, -95, -59, -137, -88, -111, -10, -7, -43, -49, -37, -35, -95, -34, -4, -112, -24, -68, -3, -26, -5, -50, -12, -5, -20, -71, -4, -22, -19, -16, -5, -25, -59, -65, -76, -17, -3, -3, -51, -42, -9, -30, -14, -31, -47, -22, -26, -9, -52, -39, -127, -114, -11, -51, -9, -6, -54, -26, -32, -71, -2, -109, -120, -20, -26, -60, -11, -124, -9, -205, -19, -48, -104, -71, -13, -24, -18, -35, -63, -175, -141, -225, -5, -25, -4, -117, -128, -68, -83, -110, -8, -118, -6, -68, -5, -2, -19, -10, -74, -39, -65, -10, -64, -2, -78, -81, -7, -73, -6, -92, -18, -103, -98, -51, -91, -86, -2, -54, -169, -74, -63, -17, -35, -7, -86, -140, -44, -25, -27, -22, -5, -9, -11, -39, -24, -46, -62, -189, -3, -18, -4, -50, -8, -10, -34, -6, -9, -143, -20, -15, -10, -13, -22, -23, -12, -28, -27, -79, -19, -62, -39, -14, -132, -48, -119, -69, -16, -103, -46, -125, -41, -31, -111, -107, -58, -5, -4, -11, -40, -35, -99, -3, -9, -3, -3, -69, -20, -13, -17, -4, -3, -3, -20, -8, -4, -77, -28, -59, -2, -9, -11, -124, -4, -75, -48, -6, -68, -12, -17, -36, -75, -22, -33, -10, -3, -4, -19, -29, -177, -88, -79, -3, -41, -3, -7, -18, -19, -44, -70, -84, -36, -2, -53, -58, -3, -5, -41, -29, -19, -63, -12, -88, -27, -112, -41, -150, -3, -53, -74, -5, -20, -66, -3, -4, -33, -3, -9, -1, -3, -134, -3, -44, -100, -60, -23, -36, -391, -12, -62, -69, -3, -39, -3, -3, -3, -2, -9, -3, -4, -2, -3, -23, -19, -24, -144, -25, -47, -30, -1, -14, -3, -50, -22, -2, -17, -7, -3, -3, -56, -8, -99, -73, -158, -69, -3, -2, -22, -47, -67, -141, -4, -81, -7, -46, -52, -150, -17, -3, -7, -7, -113, -3, -24, -26, -41, -66, -28, -93, -69, -2, -27, -6, -51, -88, -21, -3, -82, -3, -2, -41, -117, -3, -38, -120, -4, -2, -14, -3, -3, -10, -179, -21, -3, -25, -12, -5, -2, -121, -1, -46, -5, -18, -4, -6, -105, -15, -3, -1, -34, -62, -6, -27, -39, -19, -149, -101, -9, -6, -89, -10, -125, -85, -35, -50, -2, -24, -13, -10, -4, -13, -23, -17, -42, -20, -26, -52, -75, -64, -19, -8, -118, -115, -111, -3, -33, -37, -37, -19, -3, -12, -91, -4, -80, -137, -26, -2, -225, -3, -78, -3, -36, -12, -32, -290, -2, -2, -8, -182, -88, -3, -143, -2, -121, -15, -1, -2, -11, -27, -5, -3, -73, -6, -2, -20, -3, -11, -2, -40, -59, -47, -8, -30, -38, -38, -173, -18, -2, -3, -21, -26, -36, -3, -91, -24, -32, -8, -2, -3, -39, -2, -5, -71, -2, -104, -26, -29, -13, -2, -4, -38, -9, -8, -37, -3, -106, -4, -3, -3, -4, -12, -1, -223, -29, -52, -28, -102, -1, -54, -3, -178, -13, -2, -104, -117, -120, -5, -10, -3, -84, -20, -33, -17, -4, -3, -16, -10, -58, -33, -3, -4, -13, -55, -2, -1, -145, -13, -2, -27, -51, -57, -153, -177, -24, -128, -29, -69, -1, -99, -3, -4, -14, -37, -2, -21, -81, -43, -2, -24, -51, -141, -38, -37, -2, -1, -3, -22, -2, -19, -36, -2, -30, -14, -16, -34, -8, -7, -5, -27, -52, -61, -42, -47, -99, -25, -58, -2, -2, -114, -20, -37, -63, -3, -3, -43, -129, -3, -5, -3, -134, -38, -2, -3, -20, -96, -69, -46, -154, -16, -41, -20, -2, -14, -10, -3, -1, -4, -114, -25, -65, -1, -2, -80, -40, -3, -4, -3, -51, -22, -79, -148, -2, -58, -3, -58, -3, -1, -56, -45, -54, -19, -9, -3, -1, -19, -7, -24, -57, -51, -4, -3, -6, -17, -1, -30, -52, -19, -4, -26, -291, -6, -11, -5, -2, -20, -2, -2, -8, -136, -30, -3, -22, -15, -3, -46, -116, -9, -83, -3, -3, -34, -12, -3, -233, -6, -3, -6, -72, -29, -91, -3, -31, -3, -7, -3, -12, -4, -25, -29, -48, -1, -3, -3, -1, -3, -18, -1, -54, -3, -33, -120, -3, -51, -98, -33, -29, -363, -58, -28, -68, -39, -10, -35, -76, -30, -22, -80, -93, -30, -91, -48, -3, -70, -5, -444, -1, -2, -59, -21, -3, -8, -83, -96, -44, -18, -59, -8, -12, -142, -3, -17, -70, -2, -24, -32, -65, -14, -5, -3, -87, -282, -18, -55, -12, -42, -49, -81, -32, -234, -14, -2, -287, -1, -2, -48, -39, -13, -112, -19, -141, -3, -2, -40, -16, -22, -2, -77, -24, -3, -7, -93, -38, -2, -31, -18, -178, -33, -45, -71, -82, -35, -16, -2, -14, -12, -3, -2, -25, -3, -68, -3, -28, -182, -3, -61, -54, -34, -31, -133, -2, -59, -28, -36, -92, -2, -156, -1, -69, -30, -13, -122, -27, -108, -2, -57, -2, -2, -177, -66, -58, -7, -6, -3, -4, -94, -7, -158, -35, -50, -10, -21, -2, -18, -3, -30, -44, -9, -2, -118, -55, -13, -10, -52, -23, -62, -35, -4, -3, -40, -51, -3, -3, -41, -2, -119, -6, -41, -6, -7, -116, -103, -65, -66, -9, -12, -21, -189, -28, -32, -3, -2, -1, -17, -35, -21, -89, -101, -30, -63, -9, -39, -20, -73, -18, -5, -67, -87, -9, -11, -96, -1, -29, -43, -2, -22, -137, -25, -72, -59, -25, -2, -76, -70, -1, -10, -2, -73, -43, -40, -97, -1, -71, -3, -3, -2, -25, -2, -9, -3, -14, -4, -43, -2, -3, -20, -75, -98, -4, -175, -48, -2, -99, -11, -84, -2, -11, -16, -96, -83, -143, -3, -27, -58, -22, -9, -4, -63, -93, -2, -2, -60, -6, -7, -66, -62, -54, -19, -9, -22, -2, -12, -41, -1, -17, -65, -31, -42, -3, -9, -2, -3, -18, -3, -57, -11, -5, -37, -102, -18, -3, -2, -34, -43, -29, -57, -15, -16, -1, -6, -11, -31, -73, -54, -49, -22, -27, -37, -22, -111, -13, -35, -57, -88, -28, -2, -41, -66, -8, -2, -2, -70, -63, -9, -2, -21, -39, -71, -9, -86, -11, -163, -2, -65, -16, -53, -33, -27, -4, -3, -1, -5, -2, -67, -19, -17, -76, -117, -1, -98, -110, -4, -2, -10, -124, -7, -14, -19, -5, -55, -47, -41, -16, -2, -2, -41, -70, -77, -96, -6, -53, -62, -8, -113, -114, -19, -102, -123, -6, -96, -28, -3, -43, -167, -5, -2, -18, -14, -3, -2, -81, -17, -68, -80, -9, -3, -68, -3, -36, -2, -2, -73, -2, -8, -106, -14, -1, -86, -61, -24, -11, -34, -150, -16, -7, -9, -6, -2, -2, -3, -30, -21, -2, -5, -54, -17, -9, -61, -8, -34, -39, -3, -11, -11, -2, -50, -28, -11, -17, -3, -7, -60, -18, -2, -66, -24, -4, -32, -1, -3, -121, -2, -11, -42, -29, -10, -10, -3, -20, -2, -36, -25, -55, -72, -37, -79, -26, -6, -9, -57, -184, -43, -70, -96, -16, -33, -29, -8, -92, -1, -4, -17, -38, -3, -92, -60, -11, -12, -3, -10, -106, -141, -25, -12, -37, -34, -73, -25, -153, -5, -138, -10, -5, -43, -11, -52, -3, -60, -38, -10, -2, -193, -59, -31, -60, -9, -24, -59, -182, -2, -46, -2, -45, -24, -144, -55, -2, -2, -81, -3, -1, -113, -60, -113, -96, -21, -91, -28, -1, -63, -105, -3, -4, -103, -95, -17, -18, -94, -8, -21, -43, -38, -3, -1, -63, -125, -2, -3, -52, -124, -71, -110, -9, -11, -34, -15, -16, -48, -1, -3, -62, -36, -48, -109, -61, -22, -48, -85, -23, -19, -50, -2, -14, -53, -71, -20, -15, -39, -94, -7, -2, -3, -216, -110, -242, -13, -16, -3, -98, -2, -7, -91, -8, -2, -3, -35, -19, -12, -1, -23, -3, -14, -69, -3, -2, -2, -97, -2, -143, -118, -22, -8, -32, -1, -104, -83, -1, -79, -53, -43, -36, -30, -2, -3, -1, -1, -2, -2, -2, -108, -12, -14, -57, -96, -76, -156, -39, -3, -39, -3, -11, 0, -113, -48, -77, -21, -32, -17, -1, -2, -136, -8, -3, -11, -27, -56, -87, -90, 0, -2, -58, -1, -99, -92, -2, -18, -3, -115, -106, -2, -28, -1, -1, -2, -6, -3, -73, -2, -2, -12, -158, -2, -146, -26, -109, -46, -100, -1, -82, -18, -50, -6, -106, -116, -45, -13, -17, -82, -17, -43, -60, -8, -1, -2, -40, -40, -22, -32, -3, -29, -4, -65, -1, -32, -125, -52, -81, -16, -60, -57, -3, -152, -4, -2, -1, -39, -148, -6, -24, -49, -111, -2, -79, -21, -12, -1, -61, -86, -77, -100, -15, -2, -6, -1, -92, -17, -21, -262, -6, -123, -79, -6, -2, -6, -82, -28, -160, -3, -73, -5, -25, -80, -48, -1, -66, -17, -20, -25, -21, -20, -11, -28, -250, -39, -133, -106, -1, -47, -48, -330, -73, -132, -37, -113, -88, -2, -18, -13, -22, -77, -13, -129, -31, -3, -82, -17, -1, -2, -19, -119, -175, -42, -177, -69, -1, -1, -33, -29, -26, -1, -25, -42, -69, -6, -67, -31, -123, -45, -71, -41, -32, -2, -102, -84, -29, -25, -103, -33, -42, -3, -128, -20, -9, -61, -83, -14, -1, -56, -8, -19, -27, -241, -12, -136, -75, -25, -51, -1, -219, -8, -55, -64, -14, -18, -75, 0, -62, -17, -101, -2, -1, -28, -101, -11, -28, -2, -19, -11, -7, -120, -59, -82, -2, -3, -40, -99, -2, -58, -33, -20, -3, -134, -54, -49, -27, -30, -160, -117, -2, -196, -32, -118, -153, -65, -8, -47, -7, -1, -12, -23, -115, -1, -64, -103, -6, -38, -79, -2, -1, -1, -3, -2, -8, -2, -62, -24, -2, -241, -12, -12, -7, -28, -40, -216, -8, -1, -42, -20, -37, -1, -3, -25, -2, -12, -35, -108, -35, -8, -1, -80, -57, -37, -104, -175, -17, -2, -104, -36, -127, -146, -6, -111, -3, -13, -80, -67, -244, -1, -44, -2, -62, -3, -56, -2, -16, -47, -81, -28, -2, -16, -34, -1, -24, -68, -19, -2, -92, -219, -83, -59, -4, -69, -194, -67, -8, -2, -183, -267, -23, -72, -25, -1, -87, -3, -3, -17, -1, -1, -14, -36, -3, -46, -85, -207, -29, -63, -129, -14, -118, -184, -71, -19, -11, -27, -94, -28, -35, -37, -11, -2, -14, -3, -1, -2, -2, -2, -90, -3, -115, -43, -47, -41, -151, -60, -64, -96, -95, -266, -84, -80, -38, -46, -76, -25, -12, -60, -47, -2, -177, -81, -18, -6, -30, -19, -15, -84, -115, -17, -76, -25, -45, -36, -2, -47, -3, -9, -61, -1, -9, -19, -9, -1, -5, -43, -1, -198, -49, -54, -88, -1, -30, -151, -48, -8, -98, -34, -66, -32, -191, -33, -75, -19, -49, -2, -108, -2, -24, -188, -86, -24, -122, -60, -1, -49, 0, -2, -121, -3, -3, -2, -100, -21, -2, 0, -60, -2, -20, -62, -76, -32, -30, -6, -27, -44, -61, -16, -1, -3, -37, -150, -29, -99, -16, -10, -20, 0, -70, -1, -54, -40, -19, -73, -98, -65, -155, -2, -4, -11, -3, -2, -24, -3, -7, -5, -23, -12, -60, -93, -22, -1, -84, -137, -34, -6, -57, -17, -98, -14, -4, -2, -2, -61, -30, -116, -25, -60, -1, -11, -1, -69, -14, -6, -85, -31, -4, -32, -4, -65, -7, -2, -119, -17, -2, -1, -124, -17, -56, -32, -79, -65, -19, -20, -124, -31, -88, -47, -78, -11, -3, -13, -22, -4, -26, -33, -142, -16, -23, -57, -89, -42, -82, -47, -142, -11, -95, -9, -7, -72, -25, 0, -47, -1, -141, -51, -22, -36, -27, -36, -27, -12, -7, -42, -2, -45, -6, -34, -21, -4, -34, -176, -220, -47, -33, -9, -28, -132, -56, -83, -15, -86, -97, -70, -92, -109, -26, -7, -21, -26, -6, -47, -105, -30, -2, -16, -101, 0, -52, -33, -11, -5, -46, -46, -69, -7, -109, -93, -37, -155, -2, -113, -15, -102, -2, -48, -45, -37, -64, -252, -49, -1, -1, -3, -2, -72, -1, -181, -68, -26, -38, -36, -53, -3, -1, -13, -13, -1, -14, -45, -17, -34, -29, -9, -58, -15, -1, -15, -31, -38, -3, -20, -1, -13, -1, -3, -26, -91, -4, -74, -7, -23, 0, -3, -45, -31, -131, -7, 0, -26, -27, -30, -58, -106, -70, -136, -16, -40, -1, -2, -75, -1, -5, -3, -44, -37, -2, -156, -36, -108, -10, -2, -1, -97, -67, -1, -91, -53, -42, -1, -171, -2, -56, -9, -1, -91, -23, -1, -3, -239, -3, -105, -81, -29, -2, -11, -137, -194, -49, -76, -2, -32, 0, -162, -77, -14, -1, -110, -1, -2, -1, -29, -41, -25, -14, -35, -3, -14, -1, -1, -136, -27, -1, 0, -13, -28, -7, 0, -2, -113, -2, -1, -152, -45, -54, -1, -21, -9, -17, -67, -6, -2, 0, 0, -3, -12, -8, -176, -69, -2, -11, -1, 0, -86, -3, -54, -13, -99, -54, -2, -33, 0, -1, -25, -4, -2, 0, -24, -12, -49, -23, -101, -13, -2, -59, -84, -28, -93, -1, -23, -2, 0, -79, -13, -35, -38, -45, -23, -80, -28, 0, -38, -340, -56, -3, -1, -33, -235, -160, 0, -13, -25, -58, -3, -6, -59, -78, -12, -109, -1, -2, -47, -24, -85, -136, -10, -40, -11, -7, 0, -14, -1, -4, -6, -57, -35, -1, 0, -12, -28, -56, -2, -3, -59, -3, -20, -2, -51, -8, -149, -136, -119, -28, 0, -240, -8, -19, -1, -18, -6, -74, -31, -3, -39, -1, -42, -2, -146, -69, 0, -2, -8, -37, -102, -74, -109, -8, -132, -1, -117, -1, -8, -134, -4, -84, -3, -12, -61, -26, -124, -2, -33, -24, -25, -11, -28, -3, -2, 0, -105, -1, -72, -150, 0, -14, -2, -29, -38, -2, 0, -1, -44, -61, 0, -2, -2, -99, -21, -19, -49, -10, -89, -7, -50, -6, 0, -7, -1, -163, 0, -5, 0, -4, -1, -83, -80, -3, -2, -3, -5, -1, -123, -46, -12, -20, -10, -4, -45, 0, -53, -44, -88, -18, -2, -13, -3, -46, -3, -12, -1, -87, -100, -10, 0, -2, -183, -4, -22, -6, -41, -1, -34, -114, -88, -87, -27, -75, -21, 0, -40, -7, -363, -61, -85, 0, -57, -2, 0, -86, -13, -3, -115, -1, -2, -1, -25, -33, -1, -11, -2, -6, -12, -1, -154, -50, -6, -73, -68, -11, -76, -67, 0, -65, -47, -2, -5, -82, -24, -13, -3, 0, -56, -1, -20, -29, -6, -1, -8, 0, -3, -82, -5, -19, -29, -18, -17, -2, -8, -6, -1, 0, -20, -2, -2, -6, -45, -16, 0, -12, -8, -75, -3, -204, -2, -1, -41, -8, -1, -5, -25, -8, -20, -30, -9, -17, -107, -5, -33, -2, -57, -15, -83, -49, -17, -27, 0, 0, -31, -100, -54, 0, -43, -24, -54, -126, -97, -24, -20, -80, -3, -1, -12, -25, -2, -1, -7, -191, -12, -3, -3, -154, -1, -11, -3, -108, -4, -7, -62, -59, -40, -1, -1, -14, -59, -74, -114, -83, -13, -7, -185, -99, 0, -16, -13, -65, -225, -3, 0, -49, -42, -86, -76, -18, -6, -108, -13, -92, -31, -3, -45, -474, -5, -3, -28, -5, -83, -70, -72, -84, -1, -2, -46, -30, -14, -1, -135, -36, -108, -14, -125, -1, -10, -116, -15, 0, -3, -3, -2, -123, -91, -177, -1, -79, -2, -16, -20, -2, -1, -49, -1, 0, -49, -57, -86, -44, -121, -53, -1, 0, -145, -64, 0, -56, -38, -86, -49, -1, -2, -2, -8, -54, -4, -25, -2, -130, -41, 0, 0, 0, -114, -31, -95, -17, -10, -23, 0, -7, -115, -1, -42, -15, -133, -9, -3, -24, -44, -78, 0, 0, -3, -26, -30, -27, -139, -44, -43, -180, -69, -41, -99, -26, -10, -59, -74, -3, -65, -24, -1, -37, -5, -19, -76, -162, -1, -16, -70, -159, -99, -41, -24, -25, -9, -6, -230, -2, -44, -31, -13, -1, -52, -75, -65, -2, -2, -44, -23, -1, -8, -62, -23, -177, -1, -26, 0, -96, -1, -18, -18, -53, -2, -32, -42, -1, -12, -157, 0, -13, -58, -3, 0, -55, -18, -55, -1, -16, -50, -86, -14, -242, -40, -30, -59, -22, -52, -27, -52, -10, -23, -63, 0, -23, -1, -10, 0, -156, -18, -31, 0, -9, -105, -31, -26, -69, 0, -12, -10, -20, -28, -21, -6, -60, -89, -65, -21, -30, -69, 0, -34, -17, -13, -13, -1, 0, 0, -122, -134, -14, -7, -82, -54, -5, -5, -24, -44, -93, 0, -27, -8, -4, 0, -14, -100, -43, -17, -24, -11, -193, -103, -57, -2, -38, 0, 0, -127, -17, -2, -5, -37, -2, -4, 0, -40, -4, -24, 0, -6, -6, -1, -111, -5, -67, -3, -47, -19, -21, -40, -41, -19, -39, -27, -11, -103, -1, -40, -113, -12, -1, -188, -31, -4, -152, -113, -6, -38, -21, -29, -48, -37, -70, 0, -6, -54, -11, -31, -40, -72, -38, -69, -13, -12, -189, -27, -11, -40, -2, -37, -157, -14, -21, -146, -29, -1, -80, -73, -7, -37, -24, -72, -104, -1, -5, 0, -34, -160, -56, -24, 0, -14, -45, -143, -16, -39, -18, 0, -11, -212, -208, -103, -88, -2, -46, -259, -1, -129, -114, -122, -1, -116, -1, -145, -2, -17, -127, -72, -98, -234, -27, -18, -40, -2, -258, -66, -19, -9, -60, -227, -40, -1, 0, -1, -63, -250, -1, -39, -47, -45, -8, -2, -3, -100, -37, -64, -8, -2, -13, -45, -4, -1, -36, -10, -28, -40, -54, -23, -9, -5, -173, -3, -12, -69, -80, -166, -2, 0, -87, -3, -11, 0, -1, -27, -1, -52, -24, -25, -59, -28, -2, -56, 0, -147, -21, -7, -88, -6, -3, -41, -4, -47, -22, -6, -33, -12, -11, -7, -69, -35, -1, -102, -1, -5, -2, -172, -1, -41, -2, -37, -12, -18, -1, -58, -1, 0, 0, -20, -4, -1, -9, -93, -186, 0, -14, 0, -47, -5, 0, -92, 0, -9, -112, -214, -123, -60, -1, -86, 0, -106, -82, -181, -7, -1, 0, -48, -2, -2, 0, -94, -1, -30, -26, -2, -221, -68, 0, 0, -39, -42, -2, -33, -2, -3, 0, -82, -49, -190, -45, -6, -72, -3, -36, 0, 0, -165, -54, -6, -62, -9, 0, -9, -3, -22, -15, -44, -6, 0, -1, -17, 0, -2, -60, -7, -19, -7, -166, -15, -122, -44, -49, -55, 0, 0, -112, -1, -5, -2, -2, -41, -55, -42, -172, -211, -60, -1, -15, -13, -28, -26, -14, -100, -28, -13, -33, 0, 0, -3, -41, -53, -27, -1, -8, -27, -93, -44, 0, -58, -7, 0, -47, -13, 0, -59, -51, -47, -27, -1, -1, -38, -59, -19, -117, -69, -6, -30, -3, -76, -226, -6, -44, -53, -3, -2, -34, -81, -76, -1, -56, -53, -2, -4, -3, -11, -123, -6, -75, -1, -40, -13, -18, 0, -1, -50, -155, 0, -17, -4, -22, -43, -80, -2, 0, -25, -22, 0, -111, 0, -40, -34, 0, -69, -71, -4, 0, -134, -41, -41, -52, -29, -226, -6, -7, -1, -87, -9, -53, 0, -1, 0, -24, 0, -37, -34, -1, -28, -84, -2, -17, -230, -74, -25, -17, -9, -3, -116, 0, -74, -11, 0, -153, -71, -4, -49, 0, 0, -10, -1, -23, -74, -3, 0, -58, -1, -1, -125, -58, -1, -3, -11, -185, -218, -26, -2, -71, -136, -6, -4, -24, -91, -23, -89, -5, -23, -1, -14, -1, -14, -7, -52, -201, -9, -127, -39, 0, 0, -45, -5, 0, -1, -14, -3, -71, -79, -14, -128, -29, -60, -49, 0, -9, -46, -88, -31, -6, -193, -59, -92, -14, -91, -10, -29, -114, -212, -115, -9, -25, -2, -26, -42, -9, -17, -155, -55, -65, -61, -71, 0, -2, -29, -36, -14, -1, -97, -15, -41, -7, -40, -35, -8, -6, -105, -2, -112, 0, -19, -11, -4, -94, -9, 0, 0, 0, -34, -9, -36, -23, -45, -58, -15, -1, -108, -78, 0, 0, -13, -62, -167, -56, -47, -1, -44, -2, -1, -1, -28, -46, -59, -32, -1, -8, -208, -56, -32, -24, -46, 0, -6, 0, 0, -55, -1, -5, -75, -22, 0, 0, -13, -30, -40, -97, -9, -1, -199, -37, -32, -3, -6, -6, 0, -71, -27, -15, -7, -10, -4, -75, -40, -120, -3, -125, -35, -27, -3, -52, -14, -131, 0, -13, -17, -48, -72, -6, -17, -56, -9, 0, -2, -109, -1, -59, -110, -2, -4, -17, -86, 0, -74, -37, -60, -47, -101, -15, 0, 0, -194, -2, 0, -152, -93, -275, -1, -7, 0, -64, -1, -5, -4, -1, -1, 0, -3, -244, -14, 0, -41, -1, -26, -34, -1, -41, 0, -64, -31, -59, -1, -37, -68, -156, -65, -55, -21, 0, -2, -7, -151, -28, 0, -13, -1, -9, -61, -10, -79, 0, -36, -116, 0, 0, -113, -28, -26, 0, -118, -82, -6, 0, 0, -27, -1, 0, -1, -369, -3, -48, -50, -3, -65, -107, -92, -24, -1, -21, -14, -8, 0, -32, -7, -15, -59, -2, -96, -13, -1, -134, -141, -1, -47, -6, -4, -39, -1, 0, -8, -12, -53, -7, -98, -33, -70, -48, -62, -14, -25, -26, -77, -4, -116, -5, -1, -14, 0, -17, -7, -42, -27, 0, -2, -27, -67, -80, -11, -105, -1, 0, -43, -59, -111, -84, -120, -115, -189, -4, -4, -9, -6, -19, -112, -14, -80, 0, 0, -1, -56, -61, -21, -1, -6, -104, -20, -108, -104, 0, 0, -6, -1, -73, -4, 0, -153, -2, -3, -78, -58, -36, -31, -15, -3, 0, -72, -12, -49, 0, -16, -30, -68, -7, -3, -38, -43, -10, -3, -3, -7, -2, -64, 0, -1, 0, -24, -2, -2, -2, -29, -16, -1, -4, 0, -26, -21, -116, -143, -2, -1, -1, -26, -62, -59, -26, -2, -4, -1, -58, -3, -32, -52, -22, -13, -156, -7, -124, -61, 0, -32, -10, -51, 0, -6, -42, 0, -81, -6, -1, 0, -1, -30, -13, -39, -40, -2, -2, -14, -7, -9, -83, -2, -45, -18, -68, -2, -86, -8, -16, -20, -40, -1, 0, -31, -7, -42, -4, -32, -40, -10, -19, -179, -15, -6, -2, -20, -112, -156, -28, -94, -27, -10, -114, -19, -255, 0, -59, -59, 0, -22, -2, -1, -9, 0, -28, -1, -90, -21, 0, -15, -27, -7, -16, -130, 0, -31, 0, 0, -6, -4, -77, -157, -18, -1, -2, -7, -5, -31, 0, 0, -189, -1, -69, -37, -22, -38, -72, -3, -2, -161, -60, -97, -85, 0, 0, -9, -10, -8, 0, -68, -91, -1, -19, -56, -54, 0, 0, -2, 0, 0, -8, -14, -3, -3, -1, -3, -62, -7, -73, -27, -4, -1, -6, -67, -1, -2, -211, 0, 0, -23, -141, -55, -3, -25, -11, -9, -3, 0, -21, 0, -22, 0, 0, -3, 0, 0, -7, -93, -171, -35, 0, -81, -29, -102, -106, -66, -36, 0, -74, -8, -119, -2, -18, 0, -6, -34, -22, 0, -54, 0, -47, 0, -19, -98, -107, -2, -1, -38, -16, -2, -9, -43, -40, -62, -5, 0, -90, -81, -1, 0, -61, -30, -24, 0, -17, 0, -5, -6, -3, -19, -36, -11, -26, -106, -18, -2, 0, -3, -1, -13, -17, -70, 0, -8, -2, -65, -26, 0, -38, -1, -88, -11, -1, -6, -16, 0, -110, -3, -18, -1, -32, -25, 0, -56, -31, -3, 0, -7, -4, -54, -2, 0, -4, -198, -35, -28, -28, -13, -43, 0, -3, -5, -12, -19, -102, -8, 0, -37, -115, -41, 0, -26, -46, 0, -2, 0, -2, -44, -4, -21, 0, 0, -17, -5, -248, -1, -73, -1, -1, 0, -97, -89, -5, -1, -46, -3, -102, -224, -1, 0, -125, -151, -24, -18, -8, -19, -6, -23, -33, 0, 0, -11, 0, -21, -62, 0, -45, -108, -2, -35, -76, -10, -75, -2, -34, -1, -11, -2, -41, -122, -10, -27, -2, 0, -16, -18, -52, -14, -26, 0, -56, -70, -11, 0, -145, -7, -10, -84, -4, -29, -12, 0, -5, -9, -6, -38, -1, -1, -60, -20, -13, -2, -28, -20, -3, -1, -23, -6, -43, -43, -20, -11, -1, -144, -33, -1, -10, -23, -2, -1, -29, 0, -5, -112, -68, -24, -1, -76, 0, -17, -1, -10, -6, -89, -19, 0, 0, -1, 0, -4, -72, -1, -1, -24, 0, -29, -1, -1, -28, -11, -12, -1, 0, -15, -1, -79, -123, -6, -17, -40, -9, -10, -19, 0, -4, -5, -17, -232, -178, -1, -36, -27, -1, -127, -42, -26, -129, -9, -9, -1, -35, -26, -1, -4, 0, -10, -6, -52, -2, -1, 0, -1, -157, -87, -1, 0, -74, -60, -34, -5, -26, -9, -145, -74, -1, -17, -3, 0, -1, 0, -23, -8, -1, -47, -44, -27, -52, -24, 0, 0, 0, -1, -119, 0, -53, -4, -53, -63, -64, -35, -13, -5, -68, -4, 0, -1, -12, -27, -13, -73, -19, -111, -6, 0, 0, -6, -5, -1, -27, -1, -9, 0, -3, -20, 0, -82, -19, -6, 0, 0, -58, -80, -65, 0, -3, -74, -1, -15, -44, -64, -1, -63, -6, -120, -15, -67, 0, 0, -6, 0, -33, 0, -13, -4, -22, -27, -57, 0, -25, -4, 0, -1, 0, -20, 0, -39, -23, -10, -10, -6, -1, -118, -2, -30, -1, -42, -99, -58, -3, -126, 0, 0, -29, -18, -2, -64, -47, 0, 0, -15, -44, -23, 0, -8, -7, -1, 0, -1, -68, -15, -197, -142, 0, -3, -4, -15, -52, 0, -13, 0, -44, -128, -32, -5, -105, 0, -26, 0, -15, -50, -21, -7, -5, -18, -55, -35, -99, 0, -18, -5, -9, -93, -37, -15, -69, 0, -88, -9, -1, -16, -44, -64, -1, 0, -95, -11, -67, -2, -43, 0, 0, -28, -10, -1, -36, -60, -82, -7, -15, -21, -2, -20, -80, 0, -65, -1, -83, -5, -178, -69, 0, 0, -1, -1, -28, -5, -26, -56, 0, 0, -6, -2, -15, -29, -66, -23, -3, -4, -1, -4, -1, 0, -70, -21, -21, -62, 0, -1, -5, -2, -1, -3, -27, -17, -75, -7, -25, -25, -1, -54, 0, -37, -56, -14, 0, -30, -1, -83, 0, -63, -1, -88, -69, -30, -157, -3, -15, 0, -3, 0, 0, -31, -28, 0, -113, -116, -120, -25, -39, -1, -54, -3, -164, -33, -117, -66, -45, -85, -23, -47, -83, -51, -20, -43, -49, -7, 0, 0, -5, -4, -13, -6, -6, -1, -7, -1, -30, 0, -193, -2, 0, 0, -69, -12, -7, -36, -112, 0, -24, -130, -22, -8, -13, 0, 0, -12, -12, -168, -6, -18, -155, -41, -27, -21, -112, 0, -1, -1, -57, -2, -41, -5, -4, -6, -16, -84, 0, -61, -455, -169, 0, -16, -18, -27, -115, -42, 0, -32, 0, -48, -45, -6, -18, -32, -124, 0, -46, 0, -51, -11, -6, 0, -1, -21, -51, -1, -29, -17, -4, -1, -14, -1, -54, -38, 0, -14, -64, 0, -23, -16, 0, -87, 0, -2, -1, -157, -35, -16, -32, -28, 0, -51, -65, -8, -55, -6, -2, -27, -4, -13, -2, -40, -34, -6, -58, -1, -38, -38, 0, -1, -17, -44, -21, -116, -293, 0, 0, -5, -171, -135, 0, 0, -28, -20, 0, -7, -20, -59, -36, -11, -28, -26, -2, -124, 0, -180, 0, -7, -3, -5, 0, -1, -14, -1, -15, -68, -2, -24, -14, 0, -58, -10, -102, -1, -1, -4, -19, -48, -9, -95, 0, -10, -122, 0, -6, -50, 0, 0, -70, -12, 0, 0, -46, -53, -52, -19, -3, -102, -22, -3, -32, -55, -95, -23, -14, -64, -17, -25, -52, -8, -15, -174, -36, -19, 0, -41, -10, -21, -124, -11, -267, -101, -44, -143, 0, -121, 0, -48, -116, 0, -2, -12, -44, -24, -11, -190, -1, -36, -13, -7, 0, 0, -8, 0, -36, -29, -5, -159, -97, -60, -25, -50, -104, -25, -128, -54, 0, -3, -6, -105, -28, -15, -3, -80, -7, -25, -1, 0, -1, -2, -50, -50, -69, -26, -21, -31, -1, -21, -1, -33, -49, -7, -43, -6, -53, -35, -67, 0, -190, -14, -55, -35, 0, -3, -227, -1, -1, -4, -9, -130, 0, -7, -33, 0, -2, 0, -36, -115, 0, -164, -2, -55, -1, -34, 0, -81, -5, 0, -32, -115, -70, 0, -104, -19, -1, -1, -10, -67, -20, -6, -1, -9, -14, -106, -8, -79, -25, -21, -85, -24, -1, -43, -21, -14, -30, -57, -1, -72, -20, -7, -1, -89, -58, -28, -42, -24, 0, -189, -31, -1, 0, -14, -4, -81, 0, -40, -7, -4, -71, -136, -43, -73, 0, -113, -13, -57, -16, -1, -13, -27, -35, -3, -10, -19, -7, -48, -57, -114, -108, -67, -31, -26, -67, -104, -6, 0, -66, -29, -99, 0, -52, -18, -3, -17, 0, 0, -50, -18, -30, -9, -1, -157, -67, -30, -1, -2, 0, -40, -32, -18, -5, -9, -11, 0, -1, -108, -10, -2, -61, -19, -142, -83, -17, 0, -52, -82, -4, -40, -4, -15, 0, -53, -10, -242, -52, -7, -105, -5, -9, -31, -30, -27, -39, -9, -6, 0, -86, -54, -9, -102, -7, -1, -79, -62, -43, -214, -11, -42, -2, -1, -42, -26, -6, -1, -36, -64, 0, -12, -71, -39, -2, -28, -15, 0, -38, -9, -14, -1, 0, -9, -25, -24, 0, -74, -143, -12, 0, -60, -15, 0, -15, -86, -70, -22, -29, -1, -259, -98, -76, 0, -42, -53, 0, -79, -2, -40, -7, -2, -108, -12, -126, -62, -54, 0, -268, -21, -111, -221, 0, -204, -78, -96, -48, -4, -45, -14, -77, 0, -2, -20, -6, -11, -2, -3, -46, -46, -62, -10, -169, -6, -74, -19, -9, -4, 0, -71, -64, 0, -1, -17, -39, -2, -75, -37, 0, -53, -3, -75, 0, -136, -92, -205, -100, -15, -137, 0, -55, -14, -7, -9, -24, -1, -20, -2, -18, -6, -24, -80, -157, -53, -18, -2, -73, -35, -33, -58, -193, -97, -4, -81, 0, -134, -22, -30, -20, -70, -68, -70, -35, -6, -2, -51, -28, -10, -65, 0, -5, -43, -40, -85, -32, -56, -439, -1, -2, -2, -60, -16, -8, -1, -1, -29, 0, -34, -17, -50, -3, -85, -7, -18, -2, -95, -19, -62, -150, 0, -173, 0, 0, -15, -102, 0, -19, -88, -11, -4, -2, -162, -36, -7, -251, -69, -11, 0, -34, -15, -110, -5, -1, -4, -16, -15, -57, -6, -61, -57, -115, -10, 0, -35, -98, -72, -13, -31, -137, -5, -47, -85, -10, -11, -2, -5, -31, -63, -26, -17, -2, -86, -5, -3, -67, 0, -151, -24, -46, -15, -68, -118, -57, -21, -23, -19, -17, -33, -18, -35, -2, -13, 0, -32, -68, -4, -30, -2, 0, -123, -7, -23, -245, -5, 0, -31, -12, -20, -92, -150, -6, -7, -1, -57, -185, -50, -162, -51, -74, 0, -206, -41, -75, -74, -16, -27, -36, -22, -15, -17, -61, -149, -9, -46, 0, -69, -14, -13, -4, -2, 0, -45, -307, 0, 0, -103, -3, -86, -185, -85, -4, -74, -5, 0, -11, -2, -105, -66, -19, -101, -8, -1, 0, 0, -47, -154, -57, -11, -77, -10, -4, -38, -40, -39, -53, -72, -62, -101, -125, -2, -26, -16, -334, -42, -12, -15, -66, -71, -8, -37, -36, -8, -21, -58, -5, 0, -2, 0, -4, -293, 0, -58, -8, -7, -29, -54, -7, -19, -82, 0, -4, -51, -159, -6, -103, -7, -1, 0, -4, -105, -45, -12, -4, -9, -16, -39, -50, 0, -150, -25, -84, -32, -6, -99, -1, -24, -35, -1, -1, -94, 0, -49, -21, -104, -35, -155, -8, -12, -38, -59, -95, -2, -2, -22, -13, -150, -109, -35, -73, -93, -5, -38, -31, -84, -64, 0, -32, -73, -68, -30, -91, -9, -22, -6, -4, -2, -17, -21, -4, -3, 0, -2, -24, -9, -4, -81, -82, -151, -17, -62, -7, -5, -9, -53, -1, 0, -10, -13, -54, -44, -23, -79, -204, -74, -49, -11, -48, -1, -18, -49, -7, -49, -167, -131, -37, -28, -9, -48, -1, -7, -3, 0, 0, 0, -7, -18, -115, -83, -4, -54, -175, -98, -96, 0, -42, -7, -1, -90, -24, -41, -7, -20, -62, -2, -85, -22, -253, -30, -20, 0, -99, -69, 0, -41, -7, -72, -41, -4, -93, 0, -1, -208, -51, -18, -43, -7, -47, -200, -36, -62, -58, -9, -73, -14, -74, -9, -49, -38, -46, -29, -13, 0, 0, -60, -99, -90, -49, -2, -236, 0, -34, -18, -32, -49, -18, -112, -61, -62, -29, -139, -6, -33, -177, -76, 0, -50, -14, -95, -8, -135, -34, -72, -16, -59, -5, -7, -4, 0, -8, -23, -42, -67, -84, -10, -28, -12, -28, -6, -55, -50, -3, -97, -6, -1, -10, -7, -22, -35, -2, -13, -199, -59, 0, 0, -53, -5, -60, -1, -10, -48, -63, -11, -20, -9, -2, -13, -21, -150, -9, -10, -1, -137, -8, -118, -17, -14, -18, -29, 0, -36, -5, -97, -40, -12, 0, -1, 0, -60, -81, -16, -2, -56, -12, -11, -146, -15, 0, -1, -2, -79, 0, -58, -52, -21, -10, -2, -109, -89, -1, -11, -13, -46, -12, -16, 0, -34, -189, -7, -53, -4, -171, -7, -130, -31, -23, -13, -15, -2, -12, -26, -27, -157, -100, -24, 0, -218, -48, -21, -45, -12, -61, -109, -21, -2, -41, 0, -4, -10, -90, -16, -4, -39, -14, -2, 0, -17, -44, -38, -274, -227, -79, -83, -58, -2, -26, -33, -41, 0, -24, -9, -7, -53, 0, -25, -23, -61, -21, -4, -110, -78, -1, -60, -171, -48, -115, -41, -46, -37, -34, -16, -28, -7, -3, -233, -49, -42, -46, -5, -52, -19, -42, -88, -41, -22, 0, -180, 0, -1, -26, -47, -12, -15, -42, -111, -105, -38, -46, -65, -40, -77, -1, 0, -44, -4, -82, 0, -1, -53, -49, -24, -207, -23, -34, -8, -16, 0, -28, -129, -17, -54, -10, -44, -93, -122, 0, -80, -28, -85, -26, -4, -20, -17, 0, -22, -124, -33, -28, -1, -2, -71, -25, -87, -83, -178, -33, -14, -19, -93, -15, -41, -65, -43, -62, -58, -2, -2, -7, -10, -49, -50, -80, -3, -55, -12, -26, -14, -90, -125, -6, -36, -98, -27, -124, -45, -1, -44, -68, -31, -44, -5, -126, 0, -6, 0, -75, -91, -26, -36, -126, -24, 0, -181, -80, -89, -60, -51, -58, -5, -59, -154, -4, -78, -3, -50, -72, -2, -59, -27, -30, -2, -28, -55, -22, -121, -253, -17, -19, -165, -2, -12, -44, -53, -42, -79, -110, -2, -2, -15, -193, -188, -39, -8, -24, -4, -36, -10, -18, -64, -111, -9, -29, -4, -15, -22, -10, -76, -14, -184, -14, -10, -46, -11, -76, -21, -36, -140, -96, -11, -64, -143, -5, -4, -66, -31, -254, -88, 0, -108, -11, -2, -6, -28, -12, -44, -4, 0, -8, -109, -1, -63, -3, -7, -12, 0, -31, -21, -173, -38, -23, -48, -22, -6, -71, -64, -5, -22, -21, -88, -9, -11, -237, -22, -22, -74, -16, -4, 0, -34, 0, -10, -21, -46, -26, -16, -50, -212, -63, -110, -80, -1, -28, -120, -16, -21, -141, -22, 0, -16, -102, -56, -88, -56, -68, -13, -31, -9, -15, -27, -24, 0, -32, -194, -62, -92, -19, -112, -73, -130, -84, -2, -87, -130, -5, -6, -59, -63, -22, -18, -100, -97, -97, -1, -58, -46, -183, 0, -71, -59, -113, 0, -41, -146, -65, 0, -37, -221, -9, -45, -77, -1, -32, -12, -12, 0, -15, -71, -19, 0, -34, -1, -4, -48, -110, -35, -19, -93, 0, -46, -208, -11, -123, -80, -2, -88, -144, -4, 0, -37, -16, -1, -26, -3, -1, -28, -50, -92, -27, -55, -32, -2, -54, -10, -61, -41, -30, -56, -10, -9, -6, -11, -53, -1, -55, -17, -17, -4, -125, 0, -2, 0, -134, -87, -63, -11, -88, -20, -2, -15, -31, -65, -89, -70, -259, -174, -5, -24, -77, -2, -46, -56, -133, -263, -40, -13, -68, 0, -11, -19, -44, -5, -55, -95, -88, -4, -74, -24, -18, -19, -5, -101, -71, -82, -27, -19, -120, -4, -28, -59, -35, -66, -24, -46, -1, -71, -33, -15, -17, -43, -10, -78, -141, -17, -2, -124, -31, -1, -25, -1, -58, 0, -1, -80, 0, -1, -81, -42, -54, -137, -1, -21, -79, -1, -56, -28, -11, 0, -79, -43, -52, 0, -85, -1, -4, -108, -126, -29, -3, -135, -98, -107, -159, -23, -19, -33, -7, -152, -20, -19, -84, -30, -21, -76, -5, -10, -68, 0, -14, -31, -24, 0, -67, -50, -73, -51, -16, -15, -10, -85, -9, -32, -45, -93, -9, -88, -140, -61, -163, -89, -49, -2, -60, -62, -59, -131, -90, -42, -27, -119, -8, -101, -35, -6, -1, -80, -38, -4, -28, -31, -72, -120, -32, -30, -150, 0, -7, -45, -3, -97, -51, -18, 0, -93, -25, -222, -5, -22, -74, -1, 0, -68, -172, 0, -12, -72, -102, -75, -10, -10, -30, -7, -2, -3, -4, -4, 0, -69, -42, -102, -63, -48, -5, -25, -3, 0, -39, -11, -13, -34, -3, -136, -121, -36, -5, -17, -2, -1, -3, -4, -67, -72, -23, -76, -29, -103, -39, -3, 0, -37, -48, -20, -15, -3, -14, -26, -29, -1, -1, -20, -85, -19, -1, -26, -24, -30, -91, 0, -9, -3, -40, -14, -28, -110, -97, -17, 0, -27, -100, -96, -71, -1, -52, -26, -16, -150, -31, -51, -141, -8, -45, -5, 0, -152, 0, -122, -30, -1, -17, -5, -18, 0, -102, -40, -59, -35, -6, -39, -3, -27, -3, -33, -1, -131, -4, -9, -3, -3, -71, -50, -66, -28, -36, -10, -38, -8, -6, -13, -47, -34, 0, -81, -22, -44, -102, -4, -145, -160, -11, -50, -56, -27, -25, -7, -43, -149, -26, -67, -117, -1, -2, -46, -3, -21, -1, -22, 0, -49, -21, -1, -28, -175, -23, -7, -45, -202, -94, -28, -44, -35, -12, -18, -28, -91, -28, 0, -43, -50, -64, -2, -72, -20, -49, 0, -71, -125, -243, -66, -10, -26, -63, -35, -109, -33, -72, -95, -3, -142, -229, -36, -82, -73, -53, -32, -22, -31, -3, -17, -204, -15, -59, -135, -115, -40, -44, -28, -107, -14, -24, 0, -6, -53, -1, -4, -37, -57, -1, -46, -44, -1, -55, -15, -52, -14, -16, -18, -18, -30, -11, -16, -2, -64, -6, -25, -7, -8, -190, -58, -117, -13, -1, -127, -108, -7, -180, -24, -9, -48, -41, -26, -50, -14, -94, -67, -29, -21, -46, 0, -11, -27, -1, -55, -35, -91, -293, -88, -10, -1, -5, -11, 0, -16, 0, -64, -8, -48, -1, -15, -51, -20, -22, 0, -67, -1, -41, -9, -29, -5, -7, -15, -18, -37, -3, -74, -66, -60, -1, -2, -92, -26, -13, -9, -46, -37, -18, 0, -135, -45, -47, -93, -12, -35, -98, -42, -45, -63, -49, -79, -15, -5, 0, -18, 0, -103, -42, -84, -93, -47, -12, -45, -7, -84, -36, -10, -1, -19, -53, -4, -97, -31, -40, -11, -13, 0, -1, -48, -46, -68, -2, -171, -70, -21, -48, -2, -60, -1, -58, -29, -72, -9, -37, -55, -26, -33, -51, -14, -40, 0, -43, -12, -77, -86, -25, -54, -110, -22, -15, -40, -91, -26, -8, -27, -63, -8, -37, -55, -16, -2, -7, -24, -89, -187, -57, -24, -1, -74, -60, -9, -25, -24, -86, -58, -2, -16, -17, -10, -2, -53, -36, 0, -68, -35, -2, 0, 0, -65, -33, -4, -89, 0, -108, -120, -14, -16, -71, -46, -22, -3, -39, -24, -87, -52, -47, -347, -13, -91, -91, -22, -68, -35, -15, -25, -31, -120, -74, -64, -44, -12, -94, -25, -17, -7, -51, -37, -40, -96, -25, -75, -7, -49, -88, -104, -77, -11, -8, -182, -18, -86, -97, -28, -89, -49, -20, -34, -16, -100, -15, -6, -21, -9, -46, -47, -172, -40, -70, -100, -403, -35, -72, -38, -17, -47, -24, -423, -61, -7, -54, -9, -24, -93, -53, -125, -70, -112, -77, -152, -68, -34, -30, -33, -20, -60, -7, -10, -24, -43, -34, -60, -197, -148, -54, -104, -3, -72, -70, -15, -24, -48, -28, -65, -36, -90, -61, -46, -49, -21, -2, -2, -43, -56, -27, -43, -29, -50, -30, -29, -88, -5, -11, -77, -52, -187, -60, -19, -75, -81, -14, -10, -9, -32, -74, -42, -26, -43, -59, -96, -12, -38, -95, -6, -80, -64, -60, -133, -51, -33, -60, -40, -23, -45, -52, -122, -9, -51, -12, -5, -94, -11, -17, -55, -2, -96, -34, -15, -17, -211, -21, -37, -73, -23, -9, -52, -78, -72, -23, -127, -25, -4, -33, -17, -19, -58, -24, -34, -141, -54, -3, -15, -3, -59, -38, -139, -117, -13, -66, -64, -61, -34, -29, -144, -85, -30, 0, 0, -45, -32, -74, -7, -54, -45, -32, -83, -76, -130, -46, -16, -18, -12, -33, -36, -52, -22, -30, -72, -4, -84, -37, -31, -12, -49, -68, -29, -18, -47, -71, -29, -85, -38, -52, -124, -37, -22, -5, -6, -124, -33, -193, -14, -89, -4, -97, -209, -329, -18, -10, -40, -51, -69, -106, -17, -51, -23, -20, -79, -34, -50, -7, -12, -36, -70, -64, -75, -19, -32, -46, -74, -93, -33, -188, -107, -9, -67, -40, -100, -77, -23, -27, -23, -60, -36, -108, -23, -15, -24, -105, -9, -45, -14, -11, -57, -5, -69, -71, -23, -16, -9, -93, -13, -15, -130, -20, -4, -92, -138, -23, -45, -31, -30, -82, -56, -22, -35, -178, -68, -80, -61, -62, -15, -93, -23, -11, -9, -51, -20, -60, -151, -98, -104, -36, -168, -19, -231, -80, -17, -47, -163, -156, -82, -69, -28, -27, -26, -17, -7, -27, -1, -21, -26, -34, -6, 0, -107, -48, -85, -11, -40, -218, -78, -34, -11, -29, -13, -118, -100, -8, -4, -19, -106, -103, -16, -257, -24, -23, -106, -23, -20, -9, -61, -137, -14, -51, -40, -66, -48, -16, -24, -2, -27, -111, -125, -13, -5, -15, -22, -40, -66, -36, -99, -34, -13, -28, -53, -51, -10, -36, -24, -5, -136, -5, -40, -7, -57, -176, -71, -28, -10, -35, -19, -40, -35, -86, -60, -9, -146, -18, -23, -158, -124, -56, -25, -187, -70, -14, -39, -8, -13, -27, -50, -178, -50, -27, -8, -52, -74, -67, -51, -2, -10, -184, -198, -155, -308, -83, -8, -2, -52, -9, -100, -61, -4, -79, -38, -55, -13, -109, -61, -124, -309, -55, -131, -53, -242, -52, -24, -35, -23, -96, -19, -30, -7, -58, -13, -8, -34, -19, -79, -19, -86, -24, -88, -102, -52, -168, -4, -23, -42, -227, -28, -19, -48, -42, -27, -37, -27, -21, -33, -4, -4, -56, -90, -87, -85, -164, -87, -160, -13, -23, -23, -4, -25, -129, -32, -26, -80, -189, -29, -16, -28, -96, -23, -16, -165, -70, -10, -18, -23, -150, -160, -15, -88, -104, -74, -29, -88, -36, -70, -13, -16, -179, -22, -9, -128, -9, -103, -54, -172, -87, -20, -43, -15, -86, -4, -24, -112, -134, -144, -40, -7, -264, -25, -25, -21, -8, -137, -51, -34, -7, -48, -16, -109, -29, -47, -45, -9, -90, -55, -71, -70, -90, -118, -22, -77, -3, -46, -19, -49, -147, -204, -36, -69, -56, -7, -99, -61, -20, -158, -105, -18, -48, -24, -19, -215, -95, -18, -23, -14, -33, -32, -20, -21, -31, -42, -73, -5, -79, -48, -7, -23, -17, -54, -65, -150, -71, -143, -66, -209, -85, -60, -70, -9, -66, -42, -21, -60, -38, -21, -17, -15, -4, -76, -84, -40, -166, -6, -50, -64, -44, -22, -44, -48, -37, -30, -44, -32, -12, -12, -25, -8, -17, -6, -14, -124, -58, -91, -64, -29, -157, -213, -13, -223, -2, -40, -64, -55, -20, -54, -73, -107, -40, -32, -104, -33, -1, -16, -39, -24, -55, -97, -14, -138, -102, -46, -9, -63, -18, -59, -89, -25, -48, -74, -39, -18, -19, -46, -121, -62, -20, -175, -120, -8, -136, -21, -28, -69, -64, -53, -32, -30, -38, -4, -28, -74, -45, -409, -64, -49, -139, -180, -23, -108, -64, -5, -16, -173, -91, -37, -14, -18, -87, -27, -168, -21, -67, -13, -22, -57, -76, -211, -34, -79, -288, -28, -18, -107, -76, -23, -6, -18, -51, -48, -99, -65, -69, -60, -22, -120, -39, -28, -29, -7, -70, -55, -59, -13, -69, -159, -3, -71, -27, -93, -45, -59, -101, -14, -18, -65, -63, -185, -57, -9, -31, -16, -50, -38, -86, -70, -22, -35, -67, -261, -62, -17, -36, -221, -119, -72, -35, -340, -61, -76, -4, -25, -43, -21, -15, -47, -54, -112, -81, -44, -47, -48, -4, -23, -106, -22, -17, -78, -49, -89, -129, -68, -80, -17, -58, -60, -10, -14, -70, -114, -26, -45, -78, -225, -107, -176, -60, -76, -70, -35, -41, -49, -25, -12, -42, -19, -9, -13, -20, -101, -182, -21, -91, -33, -5, -101, -84, -134, 0, -71, -126, -6, -20, -188, -123, -75, -61, -50, -29, -85, -35, -24, -84, -40, -323, -70, -26, -29, -97, -42, -35, -124, -27, -17, -40, -31, -40, -4, -5, -88, -14, -71, -7, -66, -152, -26, -30, -238, -43, -17, -145, -21, 0, -20, -12, -108, -57, -23, -124, -9, -59, -7, -203, -72, -37, -18, -6, -41, -32, -180, -9, -159, -48, -14, -108, -33, -77, -61, -35, -9, -40, -15, -3, -32, -42, -32, -54, -16, -37, -9, -121, -79, -16, -141, -41, -42, -7, -70, -59, -11, -16, -2, -125, -45, -117, -93, -4, -15, -62, -24, -52, -6, -14, -1, -13, -65, -4, -163, -4, -3, -7, -7, -51, -1, -54, -6, -8, -30, -14, -4, -35, -20, -38, -41, -2, -2, -6, -2, -57, -192, -189, -11, -3, -22, -3, -3, -7, -96, -9, -1, -2, -4, -36, -8, -14, -8, -5, -79, -25, -245, -61, -5, -26, -7, -35, -49, -8, -8, -2, 0, -132, -18, -89, -29, -54, -2, -89, -23, -1, -56, -127, -21, -81, -49, -53, -32, -32, -3, -74, -39, -1, -5, -35, -17, -62, -22, -24, -19, -6, -52, -7, -8, -7, 0, -27, -9, -205, -11, -1, -202, -30, -34, -116, -13, -10, -81, -6, -59, -104, -13, -11, -13, -91, -73, -47, -138, -33, -51, -117, -133, 0, -25, -3, -46, -350, -107, -4, -2, -4, -1, -8, -50, -9, -9, -4, -23, -7, -19, -54, -30, -47, -7, -75, 0, -5, -3, 0, -137, -36, -54, -1, -4, -9, -6, -24, 0, -44, -36, -14, -22, -2, -16, -12, -33, -3, -4, -1, 0, -25, -8, -200, -166, -3, -26, -13, -31, -3, -178, -168, -10, -20, -22, -32, 0, -14, -6, -13, -44, -89, -1, -90, -14, -38, 0, -61, -8, -3, -3, -176, -41, -27, -4, -3, -22, -11, -39, -48, -10, -10, -13, -79, -22, -11, -7, -73, -17, -38, -47, -14, -44, -16, -83, -2, -6, -53, -6, -16, -75, -40, -52, -11, -74, -43, -4, -43, -60, -2, -6, -3, -1, -15, -17, -37, -132, -14, -13, -3, -34, -25, -9, -25, -5, -2, -2, -19, -31, -20, -2, -4, -2, -48, -1, -95, -26, 0, -10, -2, 0, -1, -10, -35, -153, -7, -39, -4, -31, -7, -38, -66, -7, -9, -31, -221, -7, -35, -5, -3, -42, -7, 0, -4, -2, -17, -16, -3, -69, -19, -5, -79, -70, -1, -55, -93, 0, -50, 0, -4, -9, -66, -15, -28, -35, -6, 0, -3, -3, -97, -7, -4, -9, -7, -5, -1, -103, -47, -24, -64, 0, -5, -25, -7, -1, -106, -58, -31, -4, -2, -17, -6, -50, -53, -61, -6, -6, -2, 0, -179, -41, -8, -8, -4, -46, -9, 0, -5, -9, -11, -68, -69, -5, -6, -64, -105, -56, -20, -9, -52, -81, -5, -22, -34, -11, -2, -18, -27, -14, -47, -5, -73, -9, -59, -6, -76, -9, -3, -53, -7, -9, -35, -17, -1, -166, -5, -81, 0, -8, -2, -92, -87, -18, -12, -2, -1, 0, -1, -6, -166, -13, -117, -33, -5, -4, -2, -27, -49, -3, -5, -14, -199, -1, -3, -2, -30, -32, -24, -9, -1, 0, -23, -107, -1, -8, -26, -96, -29, -10, -1, -5, -1, 0, 0, -4, -8, -7, -27, -7, -20, -16, -3, -190, -105, -7, -162, -137, -77, -1, 0, -2, -11, -31, -4, -105, -40, -33, -41, -9, -6, -67, -91, -24, -74, -21, -10, -122, -47, -2, -5, -3, -55, -3, -49, -11, -5, -1, -11, -81, -6, -3, -31, -120, -3, 0, 0, -73, -17, -43, -168, -25, -41, -3, -4, -5, -17, -14, -8, -23, -12, 0, -45, -10, -18, 0, -105, -20, -6, -20, -1, -5, -42, -118, -30, -3, -31, -2, -32, -3, -172, -10, 0, -1, -47, -9, -19, 0, -3, -55, -55, -14, -105, -41, -61, -70, -34, -24, -6, -226, -2, -6, -70, -48, -2, -19, -50, -6, -16, -84, -35, -9, -5, -1, -52, -33, -2, -71, 0, -110, -185, -97, -3, -8, -53, -60, -16, -108, -167, -35, -15, -4, -8, -52, -36, -7, -16, -18, -16, -9, -11, -11, -5, -3, -70, -14, -15, -1, -40, -105, -26, -55, -77, -14, -14, -105, -12, -24, -2, -3, -35, -18, -4, -111, -5, 0, -84, -1, -9, -1, -3, -28, -60, -294, -23, -98, -7, -18, -7, -11, -1, -83, -39, -114, -5, -2, -44, -8, -5, -41, -33, -26, -25, -1, 0, -10, -6, -41, -16, -5, -66, -92, -102, 0, -59, -5, -7, -18, -19, -2, -8, -39, -4, -4, -21, -22, -10, -7, -25, -48, -2, -23, -2, -20, -103, -28, -84, -137, -40, -8, -8, -6, -52, -24, -3, -2, -9, -11, -78, -81, -22, -1, -13, -6, -18, -5, 0, -5, -31, -23, -56, -4, -26, -4, -68, -98, -1, -16, -88, -94, -12, -39, -53, -9, -15, -56, -1, -15, -8, -7, -101, -16, -24, -8, -57, -1, -4, -33, -7, -2, -4, -19, 0, -33, -29, -4, -54, -9, -22, -35, -110, -3, -8, 0, -39, 0, -7, -95, -10, -63, -20, -95, -19, -73, -116, -9, -86, -11, -4, -28, -130, -56, -90, -96, -104, -8, -23, -4, -37, -6, -92, -15, -44, -2, -56, -62, -1, -16, -4, -30, -57, -6, -43, -4, -18, -6, -9, -3, -109, -91, 0, -3, 0, -13, 0, -33, -2, -60, -78, -53, -77, -35, -40, -1, 0, 0, -4, -142, -38, -32, -3, 0, -32, -2, -72, -1, -6, -5, -37, -4, -8, -127, -3, -49, -12, -44, -3, -33, -93, -53, -24, -80, -2, -11, -82, -71, -65, -64, -1, -282, -3, -97, -5, -92, -7, -5, -84, -6, -3, -1, -21, -9, -78, -68, -15, -28, -7, -18, -92, -2, -18, -4, 0, -81, -134, -138, -3, -17, 0, -5, -97, -7, -34, -4, -8, -23, -21, 0, -143, -238, -47, -14, -25, -83, -4, -24, -27, -32, -7, -93, -3, -1, -20, -55, -17, -2, -1, -49, -7, -38, -44, -3, -1, -3, -22, -81, -82, -16, -3, -44, 0, -47, -2, -124, 0, -62, -49, -17, -96, -15, -5, -7, -5, -8, -4, -4, 0, -6, -1, -4, -11, -74, -128, -5, -7, -55, -4, 0, -17, -173, -6, -71, 0, -15, -28, -21, -180, -2, -37, -18, -2, -51, -27, -20, -3, -44, -28, -104, -2, -2, -53, -60, -166, -77, -113, -83, -13, -4, -100, -4, -48, 0, -7, -80, -2, -77, -1, -20, -319, -72, -15, -26, -26, -38, -125, -12, 0, -153, -4, -2, -131, -6, -6, -150, -2, -6, -1, -57, -47, -2, -57, -2, 0, -18, -9, -7, -17, -18, -14, -8, -15, -9, -91, -71, -1, -10, -57, -5, -6, -1, -1, -57, -21, -2, -11, -1, -20, -6, -44, -49, -18, -20, -65, -7, -6, -12, -1, -14, -4, -46, -9, -2, -84, -11, -33, -1, -12, -1, -118, -141, -1, -6, -49, -29, -1, -1, -5, -37, -7, -19, -13, -91, -44, -62, -6, -5, -6, 0, -13, -36, -14, -59, -6, -6, -155, -16, -6, -2, -65, 0, -3, -8, -2, -105, -1, -77, 0, -21, 0, -13, -16, -4, -24, 0, -44, -1, -17, -29, -61, -41, -23, -3, -44, -3, -3, -1, -123, -9, -54, -27, -8, -29, -4, -1, -6, -89, -15, -15, -68, -66, -149, -46, -7, -57, -6, -7, -1, -19, -17, -88, 0, -7, -1, -6, -21, -52, -59, -56, -19, -56, -44, -86, -28, -36, -33, -6, -17, -4, -12, -2, -5, -34, -5, 0, 0, -23, -4, -3, -65, -21, -13, -26, -5, -20, -9, -1, -73, -44, -9, -2, -56, -14, -11, -82, -1, -43, -8, -2, -128, -3, -4, -12, -20, -6, -75, -16, -16, -11, -66, -3, -17, -6, -22, -157, -24, -51, -49, -61, -100, -19, -14, -2, -51, -8, -1, -70, -148, -8, -16, -164, 0, -1, -1, -1, -4, -2, -186, 0, -140, -81, -3, -42, -27, 0, -6, -6, -138, -225, -13, -24, -83, -95, -43, -2, -43, -26, 0, -7, -87, 0, -18, -122, -2, -40, -9, -1, -18, -4, -33, 0, -4, -11, -10, -1, -6, -9, -135, -8, -11, -125, -5, -19, 0, -43, -8, -5, -15, -5, -4, -1, -4, -29, -63, -4, -6, -26, -3, -9, -5, -28, -83, -27, -1, -16, -10, -2, 0, -51, 0, -136, -17, -23, -3, -156, -25, -62, -4, 0, -2, -49, -4, -21, -121, -20, -6, -4, -3, 0, -56, -24, -29, -108, -16, 0, -2, -1, -44, -98, -201, -1, -6, 0, -1, -1, -1, -2, -3, -8, -17, -4, -16, -9, -136, -88, -46, -41, -41, -130, -4, -136, -85, 0, -171, -10, -6, -8, -9, -21, -23, -37, -1, -26, -13, -6, -175, -13, -24, -33, -53, -2, -34, -75, -7, -31, -146, -13, -46, -2, -14, -32, -62, -1, -16, -1, -1, -56, -17, -84, -3, -162, 0, -116, -5, -4, -40, -20, -50, -2, -9, -27, -20, -8, -1, -11, -2, 0, -51, -171, -6, -16, -5, -5, -170, -14, -6, -1, -36, -2, -128, -19, -128, -47, -150, -1, -88, -25, -3, -41, -34, -11, -6, -1, -9, -1, -4, -3, -3, -103, -265, -103, -2, -7, -1, -12, 0, -55, -38, -1, -40, -60, -44, -2, 0, -52, -19, -5, -79, -2, -24, -91, -7, -13, -65, -16, -4, -15, -4, -10, -1, -65, 0, -30, -3, -84, -13, -3, -2, -23, -71, 0, -125, -2, -12, -65, 0, -1, -84, -20, -36, -1, -29, -6, -8, -2, -94, -14, -216, -158, -8, -95, -4, -2, -18, 0, -59, -59, -1, -84, -6, -2, 0, -6, -4, -24, -99, -1, -145, -60, -233, -83, 0, -11, -34, 0, -47, -91, -31, -7, -1, -39, -9, -45, 0, -252, -15, 0, -19, -10, -50, -19, -14, -41, -6, -18, 0, -79, -9, -56, -132, -11, -9, -11, -4, -13, -82, -1, -1, -7, -111, -5, -6, -79, -47, -24, -19, -70, -29, -12, -4, -26, -41, 0, -7, -48, -22, -20, -44, -74, -16, -30, -42, -6, -31, -71, -36, 0, -34, -8, -16, -5, -29, -2, -2, -6, -8, -97, -2, -26, 0, -9, -98, -7, -5, -1, 0, -1, -9, -7, -19, -14, -39, -6, -101, -44, -5, -67, 0, -104, -47, -20, -20, -9, -7, -99, -1, -70, -5, -22, -1, -10, -13, -37, -18, -4, -63, -158, -101, -3, -2, -39, -8, 0, -73, -6, -18, -63, -185, -28, -3, -6, -42, -135, -43, -8, -15, -57, -12, -112, -5, -3, -47, -2, -38, -64, -59, -17, 0, -31, -39, -15, -5, -5, -149, -21, -44, -162, -46, -5, 0, -11, -7, 0, -4, -127, -5, -5, -5, -103, -14, -18, -53, -10, -12, -68, 0, -53, -97, -9, -5, -24, -185, 0, -28, -64, -14, -83, -16, -16, -108, -3, -13, -168, -7, -6, -12, -1, -1, -5, -5, -1, -83, -8, 0, -7, 0, -5, -36, -5, -17, -7, -12, -19, -12, 0, -2, -34, 0, -3, 0, -17, -62, -7, -4, -41, -4, -96, -63, -1, -17, -7, -97, -53, -58, -88, -20, -12, -77, -14, -2, -12, -10, -67, -41, -2, -13, -1, -120, 0, -8, -37, -294, 0, -98, -7, -1, -3, -9, -26, -2, -11, -50, -3, -13, -31, -5, -7, -3, -45, 0, -55, -31, -6, -45, -1, -26, -18, -3, -33, -1, 0, -63, -106, -5, -44, 0, -3, -48, -15, -7, -9, -30, -106, 0, -23, -5, -5, -38, -85, -4, -3, -60, -58, -115, -1, -14, -26, -18, -62, -16, -20, -20, -15, -140, -4, -8, -2, 0, -7, -12, -301, -18, -13, 0, -2, -5, -38, -4, -9, -1, -21, -1, -107, -2, -3, -93, -4, -160, -15, -23, -5, -2, -49, -5, -2, -27, -6, -7, 0, -1, -11, -12, -68, 0, -53, -5, -30, -36, -16, -1, -123, -7, -25, -18, -37, -41, -87, -82, -47, -7, -70, -26, -6, -178, -1, -12, -4, -2, -40, 0, -126, -55, -47, -12, -27, -52, -5, -32, -26, -30, -45, -5, -2, -35, 0, -3, -3, -73, -141, -48, -9, -66, -81, -8, -109, -2, -59, -34, -31, -5, -5, -1, -105, -44, -75, -2, -43, -1, -35, -45, -11, -6, -23, -89, -19, -93, -5, -63, -20, -6, -49, -31, -55, -13, -7, -9, 0, -32, -1, -2, -5, -70, -73, -10, -11, -23, -12, -49, -25, -12, -24, -67, -6, -1, -42, -35, -8, -52, -41, -11, -104, -191, -60, -1, -5, -16, -6, -20, 0, -1, -244, -136, -4, -37, -190, -47, -23, -18, -3, -5, -32, -40, -15, -70, -68, -68, -5, -1, -21, -9, -157, -4, -29, -50, -111, -7, -66, -1, -82, -12, -82, -70, -17, -3, -53, -4, -68, -2, -36, -10, -69, -113, -108, -32, -3, -17, -2, -4, -19, -11, -64, -126, -7, -11, -1, -5, -19, -19, -212, -36, -23, -32, -31, -20, -25, 0, -43, -9, -59, 0, -50, -97, -3, -108, -1, -1, -68, -35, -13, -4, -7, -51, -54, -35, -28, -13, -96, -46, -4, -31, -234, -13, -23, 0, -9, -2, -2, -7, -115, 0, -4, -1, -29, -2, -65, -1, -88, -80, -25, -4, -34, -6, -30, -6, -11, -61, -5, -8, -9, -39, -153, -26, -19, -118, -9, -47, -8, -1, -146, -7, -8, -30, -5, -131, -15, -29, -58, -11, -12, -1, -8, -21, -114, -4, -9, -21, -178, -44, -49, -8, -34, -4, -9, -74, -4, -114, -109, -103, -43, -77, -1, -31, -94, -6, -41, -79, -7, -16, -48, -3, -41, -26, -41, -86, -39, -3, 0, -52, 0, -80, -2, -6, -12, -53, -36, -43, -12, 0, -165, -7, -18, -218, -50, -23, -90, -28, -64, -96, -32, -4, -28, -2, -84, -30, -64, -5, -76, -83, -6, -3, -55, -12, -55, -14, -6, -4, -42, -9, -13, -41, -12, -39, -55, -72, -52, -9, -240, -56, -32, -208, -39, -23, -11, -4, -77, -7, -1, 0, -15, -32, -18, -21, -19, -56, -6, -19, 0, -19, -13, -25, -49, -12, -3, -6, -26, -9, -19, 0, -398, -9, -44, -80, -37, -231, -144, -9, -8, -106, -12, -173, -237, -85, -2, -89, -72, 0, -28, -24, -180, -4, -27, -1, -25, -19, -12, -144, -300, -1, -34, -129, -148, -6, -39, -102, -120, -10, -42, -10, -33, -3, -3, -55, -6, -47, 0, -85, -23, -2, -85, 0, -75, -9, -23, -6, -4, -89, -63, -10, -20, -12, -10, -59, -21, -89, 0, -7, -56, -3, -3, -15, -28, -33, -9, -42, -8, -8, -84, -20, -20, -2, -7, -2, -9, -154, -4, -2, -125, -57, -42, -122, -22, -3, -4, -73, -14, -2, -2, -8, -17, -128, -18, -5, -20, -1, -1, -81, -179, -8, -110, 0, -8, -107, -14, -67, -6, -1, -11, -53, -72, -43, 0, -6, -71, -18, -104, -6, -5, -71, -24, -60, 0, -40, -4, -6, -3, -3, 0, -42, -21, -18, -23, -148, -18, -11, -3, -58, -10, -14, -20, -7, -41, -43, 0, -94, -3, -19, -12, -41, -86, -34, -1, -24, -25, -19, -32, -45, -6, 0, -39, -1, -65, -19, -11, -87, -60, -18, -2, -15, -15, -26, 0, -5, -3, -21, -30, 0, -38, 0, -196, -6, -18, -86, -23, -49, -103, -19, -51, -2, -46, -7, -3, -28, -83, -44, -38, -19, -58, -92, -1, -61, -5, -47, -24, -37, -54, 0, -5, -6, -9, -2, -5, -24, -6, -9, -1, -1, -35, -15, 0, -36, -104, -63, -34, -60, -5, -43, -6, -10, -122, -136, -28, -30, -39, -54, -1, -26, -8, -15, -1, -12, -8, -9, -8, -40, -11, -20, -37, -5, -17, -7, -98, -35, -54, -23, -13, -47, 0, -137, -23, -43, -47, -95, -9, -37, -14, -9, -133, -11, -53, -13, -62, -48, -3, -5, -11, -7, -64, -159, -5, -10, -5, -3, 0, -37, -3, -24, -25, -46, -69, -65, -11, -27, -5, -54, -1, -12, -21, -21, -9, -16, -12, -54, -1, -3, -24, -21, -2, 0, -28, -85, -7, -53, -1, -5, -8, 0, -4, -39, -34, -1, -4, -5, -36, -38, -45, -64, -10, -3, -26, -105, -15, -14, -23, -5, -74, -29, -48, -42, -30, -31, -6, -1, -7, -42, -1, -13, -3, -1, -7, -17, -14, -2, -114, -127, -74, -9, -15, -1, -147, -29, -33, -50, -56, -1, -11, 0, -79, -32, -53, -52, -13, -6, -25, -11, -4, -24, -10, -5, -9, -5, -5, -6, -1, 0, -52, -1, -8, -54, -6, -154, -31, 0, 0, -65, -47, -2, -23, -82, 0, -10, -1, -21, -4, -140, -7, -14, -1, -17, -21, -17, -15, -101, -5, -5, -181, -9, 0, -37, -20, -2, -17, -110, -50, -119, -39, -6, -27, -26, 0, -243, -11, 0, -1, -14, 0, -3, -39, -66, -6, -6, -234, -140, -90, -16, -48, -3, -44, -5, 0, -25, -100, -18, -2, -27, -29, -26, -13, -1, -53, -72, -57, 0, -24, -48, 0, -12, -41, -6, -107, -27, -3, -37, 0, -22, -25, -66, -10, -4, -13, -25, -57, -87, -38, -22, -37, -23, -5, -5, -8, -8, -33, -79, -79, -9, -6, -21, -5, -4, -16, -9, -16, -23, -4, -5, -4, -24, -32, -6, -22, -3, -87, -27, -13, -28, -86, -22, -93, 0, -35, -8, -49, -16, -10, -24, -30, -7, -64, -20, -12, -1, -37, -10, -22, -5, -43, -10, -18, -6, -17, -5, -15, -9, -16, -24, -11, -12, -42, -9, -67, -9, 0, 0, -10, -3, -7, -3, -68, -49, -108, -17, -195, -5, -10, 0, -36, -44, -171, 0, -8, -3, -15, -163, -20, -4, -5, -122, -67, -10, -78, -5, -10, -63, -1, -47, -1, -2, -100, -7, -15, -14, -29, -2, -2, -5, -59, -61, -83, -7, -14, -84, -2, -3, -3, -1, -10, -126, -32, -20, -1, -5, -9, -123, -4, -1, -2, -5, -41, -38, -12, -3, -19, -22, -40, -5, -26, -224, -80, -30, -48, -118, -197, -89, -48, -21, -6, 0, -4, -70, -191, 0, -4, -51, -60, 0, -46, -48, -64, -17, -3, -5, -52, -45, -12, -70, -32, -7, -18, -4, -229, -101, 0, -22, -34, -13, -163, -38, -2, -32, -35, -248, -25, -55, -6, 0, -52, -1, -18, -89, -3, -142, -10, 0, -46, -45, -3, 0, 0, -1, -9, -147, -17, -54, -46, -1, 0, -37, -1, -2, 0, 0, 0, -43, -22, -35, -6, -185, -25, 0, 0, -72, 0, -3, -58, -48, -8, 0, 0, -4, -1, -2, -4, -143, 0, 0, -2, -46, -36, 0, -57, -4, -1, -20, 0, -19, -1, 0, 0, -2, -53, -75, -80, -45, -39, -28, -5, -7, 0, -16, 0, -103, 0, 0, -1, -1, 0, -5, -5, -3, -23, -8, -89, 0, -39, -58, -1, -41, -91, 0, -38, 0, -7, -10, -1, -7, -45, -26, -43, -101, 0, -11, -37, -7, 0, -25, -23, -172, 0, -40, -85, -89, -12, -1, 0, -10, 0, 0, -61, 0, 0, 0, -34, -9, -1, -4, 0, -59, -8, -112, 0, -2, -31, -87, -17, -88, -9, -58, -42, -1, -65, -17, -1, -2, -4, -37, -10, -10, -133, -2, 0, -119, 0, -4, -57, 0, -49, -93, -64, -1, -85, -206, 0, -151, -19, 0, 0, -29, -29, 0, -65, -77, 0, -84, -57, -3, 0, -4, 0, -78, -21, -34, -2, -4, -69, 0, -109, -260, -62, -12, -5, -5, 0, -14, -72, 0, -3, -41, -28, -49, -46, 0, 0, -2, -44, -25, 0, -11, -12, -29, -38, 0, -17, 0, 0, -105, -214, -1, -52, -103, -1, -30, -67, -4, -32, 0, -31, -2, 0, -17, -262, -11, -2, -44, -1, -94, -10, -4, 0, -4, 0, 0, -81, -33, -26, -38, -39, -1, -43, 0, 0, -60, -2, 0, -25, -20, -3, -3, -3, 0, -10, 0, -1, 0, -15, -4, 0, -4, -52, -9, -112, -76, -50, -84, -11, -112, 0, -53, -38, -23, -2, -136, -7, -105, 0, -38, -1, -4, -92, -85, -10, 0, -15, -112, -123, -2, -2, -2, 0, -15, -2, -110, -62, -24, -94, 0, -29, -33, -41, -2, -35, 0, 0, -116, 0, -1, -131, 0, -8, -118, -37, -61, -5, -66, -65, -54, -84, -3, -37, -40, -42, -34, -137, -77, -37, -44, 0, -3, -33, -8, -5, -46, 0, -22, 0, -17, 0, -1, 0, -49, -153, -3, -42, 0, -21, 0, 0, -6, -27, -90, 0, -9, 0, -77, 0, -1, -6, -84, 0, -25, 0, -6, 0, -52, -112, -9, -232, -109, -62, 0, 0, -51, -24, 0, -144, -12, 0, -18, -2, -1, -76, 0, -179, -1, 0, -3, 0, -10, -71, 0, 0, -67, -24, -107, -145, -10, -35, -3, 0, -6, -2, -1, -46, -82, -44, -66, -22, -4, -47, -63, -18, -16, 0, -135, 0, 0, -103, 0, 0, -51, -6, 0, -40, -108, 0, 0, 0, -82, -72, -72, 0, 0, -1, -2, -7, -2, -9, -37, -17, -17, 0, 0, 0, -20, -29, 0, 0, -28, -5, -28, -156, -35, -2, -4, -45, -3, -61, -5, -26, -27, 0, -4, -57, 0, -115, -3, -14, -149, -21, -27, -6, -8, -2, -91, -64, -79, -27, -11, -67, -3, -4, -3, 0, 0, -77, -13, 0, -48, -31, -3, 0, -32, -4, 0, -2, -90, -53, -1, 0, -2, -37, 0, -75, -5, -49, -98, 0, -43, -57, -3, 0, -85, -19, -1, 0, -12, -27, 0, -31, -24, -1, -23, 0, -5, -10, -21, 0, -16, -75, -31, 0, -5, 0, 0, -279, -39, -8, -50, -165, -99, -1, 0, -25, 0, 0, -2, -186, -166, -20, -27, -95, -34, -16, -27, -16, -33, -45, -16, -26, -84, -8, -5, -11, -69, -4, -117, -1, -4, -5, -193, -55, -1, -48, -3, -4, -46, -5, -125, 0, -24, -25, -117, 0, -34, -6, -168, -20, -59, -6, -77, -6, -15, -40, -81, 0, -1, -24, -4, 0, -12, -109, -52, 0, -1, -49, -233, -131, -3, -16, -132, 0, -24, -75, 0, 0, 0, -72, -54, -16, -15, -24, -3, 0, -6, -39, -98, -23, -13, -88, 0, 0, -7, -113, -9, -2, -2, -9, -4, -15, -137, -1, 0, -4, -3, 0, -64, -1, -35, 0, -89, -11, -26, -61, -11, -80, -4, -65, -28, 0, -11, -5, -23, 0, -28, 0, 0, -15, -3, -18, -26, -19, -1, -14, -9, -15, -3, 0, -15, -53, -40, -2, -35, -131, -4, -135, -11, -8, -84, -38, -48, -24, -46, 0, -229, 0, -7, -3, -35, -66, -36, 0, 0, -6, -3, 0, -4, -22, -228, -1, -41, 0, -6, -51, 0, -79, -65, -25, -3, -30, -1, -73, -11, 0, -43, 0, 0, -17, -10, 0, -35, -8, -3, -74, -29, -49, -95, -5, -136, -21, 0, 0, -6, -16, -15, -14, -31, -52, -55, -9, -68, -23, -3, -14, -64, -2, -93, -14, 0, -46, -1, -58, -50, 0, -87, -61, 0, 0, -15, 0, -2, -6, -58, 0, -43, -26, -37, -3, -113, 0, -9, -6, -2, -10, -109, -1, -62, -171, 0, -85, 0, -108, -38, -2, 0, 0, -8, -1, 0, 0, -99, -28, -119, 0, -1, -12, -59, -30, -82, 0, -10, 0, -48, -2, -78, 0, -7, -2, -24, -168, -1, -1, -5, -60, -2, -87, 0, 0, -155, -15, -8, -18, -2, -1, -250, -3, 0, -27, -44, -98, 0, -223, -3, -1, 0, -4, -14, 0, 0, -95, 0, 0, 0, -229, 0, -16, 0, -7, 0, -2, -20, -26, -24, 0, -47, -3, -27, -33, -27, -31, -98, -95, 0, -1, -40, -21, -32, 0, -6, -7, -15, -7, -31, -252, 0, -6, -64, -18, 0, -2, 0, -73, -97, -40, 0, 0, -21, -19, -18, -73, -1, -68, -24, -16, -3, -78, -47, -59, 0, -37, 0, 0, -10, 0, -33, -2, -8, -29, -14, -10, 0, -1, 0, 0, 0, -34, 0, -19, -197, -21, -9, -70, -20, -2, -64, 0, -1, -44, -3, -77, 0, -42, -244, -10, 0, -13, -76, -1, 0, 0, -74, 0, -1, -91, -28, -18, 0, -5, -152, -30, -41, 0, -255, -5, 0, -113, -15, -4, 0, -57, -19, -21, -2, -3, 0, -141, -14, -7, 0, -22, 0, -32, -1, 0, 0, -144, 0, 0, -20, -94, -41, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, -2, 0, 0, 0, -20, -1, 0, 0, -56, -2, 0, 0, -102, -7, 0, -1, -65, 0, 0, -36, -4, -1, 0, 0, 0, 0, 0, -21, -1, -93, 0, 0, -5, 0, 0, 0, -30, -11, 0, 0, 0, -46, 0, 0, -61, -1, 0, -6, -96, 0, 0, 0, -6, -32, 0, 0, 0, -1, 0, 0, -117, -3, 0, 0, 0, 0, 0, -4, -8, -3, 0, -93, -3, -1, 0, 0, -62, 0, 0, -1, -3, 0, -8, -31, -67, 0, 0, 0, -9, -2, -96, 0, -1, -15, -94, 0, -3, -3, 0, 0, 0, 0, -26, -31, 0, 0, -21, -3, -5, 0, -5, -36, -5, -6, -31, -42, -3, 0, -209, 0, 0, 0, -1, -70, 0, 0, 0, -19, -4, 0, -3, 0, -3, 0, -92, -2, -59, 0, -25, -1, -10, 0, -7, 0, 0, 0, 0, -1, 0, 0, -60, 0, -28, 0, -152, -162, -1, 0, -22, 0, 0, 0, -7, 0, 0, 0, -3, 0, 0, -66, -1, -2, 0, -9, 0, 0, 0, -15, -60, 0, 0, -2, -24, 0, 0, -1, 0, -65, -35, -9, -3, 0, 0, 0, 0, 0, 0, -8, -1, -22, 0, -85, 0, 0, 0, -13, -44, -18, 0, 0, -69, 0, 0, -1, 0, -85, 0, -40, -72, -1, -14, -58, 0, 0, 0, -1, -8, 0, 0, 0, 0, -81, -157, -71, -66, -5, 0, -3, 0, 0, 0, -1, 0, 0, -21, -20, 0, 0, -10, 0, -25, 0, 0, 0, 0, 0, -1, -56, -2, 0, -50, -52, -16, 0, -45, 0, 0, -9, -163, 0, 0, 0, 0, 0, 0, 0, -1, -22, 0, 0, -3, 0, 0, 0, -1, 0, 0, -1, 0, -2, 0, -37, -1, -9, 0, -1, -116, -7, 0, 0, -9, -15, 0, -27, 0, -9, 0, 0, 0, 0, 0, 0, 0, -22, 0, 0, -1, 0, 0, 0, 0, -11, 0, -7, 0, 0, 0, 0, -1, -60, -9, 0, -20, -25, 0, 0, 0, -34, -83, -2, -23, -17, 0, -29, -3, 0, -14, 0, -1, -39, 0, 0, -6, -71, 0, -42, 0, 0, -28, 0, -61, 0, -1, 0, -1, 0, 0, 0, -169, 0, 0, 0, -11, 0, -35, 0, 0, 0, 0, -5, -1, 0, -27, 0, -1, 0, 0, -3, -84, 0, -34, 0, -65, 0, 0, -1, -105, 0, -107, 0, 0, -2, 0, -2, 0, -1, 0, 0, 0, -49, -22, -1, 0, -69, 0, 0, 0, 0, 0, -5, 0, -2, -24, -3, 0, -21, -98, -74, 0, -120, -69, 0, 0, -23, 0, 0, 0, 0, -44, -1, 0, -3, 0, -3, 0, -3, 0, -5, 0, -56, -2, -26, 0, -7, -32, -25, 0, 0, 0, 0, 0, -3, 0, -56, 0, -3, 0, -25, 0, -43, 0, 0, 0, 0, 0, -75, -78, -3, -35, 0, -118, 0, -1, 0, -57, -5, -1, 0, -33, -39, 0, 0, 0, 0, 0, 0, -2, 0, -22, 0, -3, 0, 0, 0, -2, -27, -1, 0, 0, -1, -5, 0, -78, -32, 0, 0, -26, 0, 0, -77, -5, 0, 0, -116, -1, -6, -3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -49, -3, 0, 0, -2, 0, 0, -1, 0, 0, 0, 0, -118, -3, 0, 0, 0, 0, 0, -3, 0, 0, 0, -5, 0, 0, 0, 0, -2, 0, -4, 0, 0, 0, 0, -2, -3, 0, -27, -21, -56, 0, -12, -62, -61, 0, 0, 0, 0, -1, -32, -113, -36, 0, -2, -4, -45, -77, -3, -5, -50, 0, 0, -81, 0, 0, -41, 0, -53, -14, -21, -12, 0, 0, -7, -8, 0, 0, 0, 0, 0, -33, -89, -24, 0, 0, -15, -150, 0, 0, -6, -7, 0, -26, 0, 0, 0, 0, -35, 0, 0, 0, -1, 0, 0, -82, -3, -3, 0, 0, 0, -98, 0, -2, -96, -6, 0, -1, -13, 0, 0, 0, -62, -5, 0, 0, 0, -2, 0, 0, -2, -85, 0, -91, -8, 0, 0, -4, -9, -49, 0, 0, -101, 0, -9, 0, -10, 0, 0, -61, -1, 0, -22, -4, -34, 0, 0, -142, 0, 0, -75, 0, -2, 0, -113, -95, -9, 0, -86, 0, -61, 0, 0, 0, -15, 0, -4, 0, 0, 0, -161, 0, -1, 0, 0, 0, 0, -13, -16, 0, 0, -1, -4, 0, 0, -218, -16, 0, 0, 0, 0, -19, 0, -11, -163, 0, 0, 0, 0, 0, 0, -184, -2, 0, -190, -1, -32, -7, 0, -9, 0, 0, 0, -1, 0, -6, 0, 0, 0, 0, 0, -4, 0, -154, -21, -2, -77, -32, 0, 0, 0, -7, 0, 0, 0, 0, 0, -84, 0, -4, 0, -5, -2, -1, 0, -87, -129, -98, 0, 0, 0, 0, 0, -29, 0, -1, 0, -57, 0, 0, -16, -10, -2, -4, 0, 0, -55, 0, 0, 0, 0, -145, 0, -55, -154, 0, -45, 0, -49, 0, -2, -1, -11, 0, 0, -43, -1, 0, -12, 0]}
for k in (10, 100, 1000):
# plt.axis([-100, 0, -100, 0])
plt.scatter(rewards[k], rollouts[k], s=.1)
plt.show()
plt.hist(rollouts[k])
plt.show() | 81,512.333333 | 391,307 | 0.426479 | 141,953 | 733,611 | 2.204039 | 0.007115 | 0.472682 | 0.574974 | 0.624336 | 0.443168 | 0.431994 | 0.421137 | 0.406885 | 0.392623 | 0.373791 | 0 | 0.528619 | 0.193511 | 733,611 | 9 | 391,308 | 81,512.333333 | 0.000191 | 0.000038 | 0 | 0.25 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.125 | 0 | 0.125 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
3040ec12cfc464e7d5e6de345a686b0f9cdd0cab | 19,585 | py | Python | Uncertainty-GNN/Load_npz.py | YuzhouLin/uncertainty-GNN | 14f68353ea7b66c17a86497760ef4ceca197304c | [
"MIT"
] | 22 | 2020-10-23T01:27:11.000Z | 2022-03-08T15:37:55.000Z | Uncertainty-GNN/Load_npz.py | YuzhouLin/uncertainty-GNN | 14f68353ea7b66c17a86497760ef4ceca197304c | [
"MIT"
] | 1 | 2021-02-08T16:40:57.000Z | 2021-05-01T16:01:21.000Z | Uncertainty-GNN/Load_npz.py | YuzhouLin/uncertainty-GNN | 14f68353ea7b66c17a86497760ef4ceca197304c | [
"MIT"
] | 7 | 2020-10-28T09:36:17.000Z | 2022-03-05T01:28:37.000Z | # import os
# import numpy as np
# import scipy.sparse as sp
# from sklearn.preprocessing import MultiLabelBinarizer, LabelBinarizer, normalize
import numpy as np
from npz_io import load_npz_to_sparse_graph
from npz_preprocess import to_binary_bag_of_words, remove_underrepresented_classes, \
eliminate_self_loops, binarize_labels
def get_dataset(data_path, standardize):
dataset_graph = load_npz_to_sparse_graph(data_path)
if standardize:
dataset_graph = dataset_graph.standardize()
else:
dataset_graph = dataset_graph.to_undirected()
dataset_graph = eliminate_self_loops(dataset_graph)
adj_matrix, attr_matrix, labels = dataset_graph.unpack()
labels = binarize_labels(labels)
# convert to binary bag-of-words feature representation if necessary
if not is_binary_bag_of_words(attr_matrix):
attr_matrix = to_binary_bag_of_words(attr_matrix)
# some assertions that need to hold for all datasets
# adj matrix needs to be symmetric
# assert (adj_matrix != adj_matrix.T).nnz == 0
# features need to be binary bag-of-word vectors
# assert is_binary_bag_of_words(attr_matrix), f"Non-binary node_features entry!"
return adj_matrix, attr_matrix, labels
def get_train_val_test_split(random_state,
labels,
train_examples_per_class=None, val_examples_per_class=None,
test_examples_per_class=None,
train_size=None, val_size=None, test_size=None):
num_samples, num_classes = labels.shape
remaining_indices = list(range(num_samples))
if train_examples_per_class is not None:
train_indices = sample_per_class(random_state, labels, train_examples_per_class)
else:
# select train examples with no respect to class distribution
train_indices = random_state.choice(remaining_indices, train_size, replace=False)
train_mask = sample_mask(train_indices, labels.shape[0])
if val_examples_per_class is not None:
val_indices = sample_per_class(random_state, labels, val_examples_per_class, forbidden_indices=train_indices)
else:
remaining_indices = np.setdiff1d(remaining_indices, train_indices)
val_indices = random_state.choice(remaining_indices, val_size, replace=False)
val_mask = sample_mask(val_indices, labels.shape[0])
forbidden_indices = np.concatenate((train_indices, val_indices))
if test_examples_per_class is not None:
test_indices = sample_per_class(random_state, labels, test_examples_per_class,
forbidden_indices=forbidden_indices)
elif test_size is not None:
remaining_indices = np.setdiff1d(remaining_indices, forbidden_indices)
test_indices = random_state.choice(remaining_indices, test_size, replace=False)
test_mask = sample_mask(test_indices, labels.shape[0])
else:
test_indices = np.setdiff1d(remaining_indices, forbidden_indices)
test_mask = sample_mask(test_indices, labels.shape[0])
# assert that there are no duplicates in sets
assert len(set(train_indices)) == len(train_indices)
assert len(set(val_indices)) == len(val_indices)
assert len(set(test_indices)) == len(test_indices)
# assert sets are mutually exclusive
assert len(set(train_indices) - set(val_indices)) == len(set(train_indices))
assert len(set(train_indices) - set(test_indices)) == len(set(train_indices))
assert len(set(val_indices) - set(test_indices)) == len(set(val_indices))
if test_size is None and test_examples_per_class is None:
# all indices must be part of the split
assert len(np.concatenate((train_indices, val_indices, test_indices))) == num_samples
if train_examples_per_class is not None:
train_labels = labels[train_indices, :]
train_sum = np.sum(train_labels, axis=0)
# assert all classes have equal cardinality
assert np.unique(train_sum).size == 1
if val_examples_per_class is not None:
val_labels = labels[val_indices, :]
val_sum = np.sum(val_labels, axis=0)
# assert all classes have equal cardinality
assert np.unique(val_sum).size == 1
if test_examples_per_class is not None:
test_labels = labels[test_indices, :]
test_sum = np.sum(test_labels, axis=0)
# assert all classes have equal cardinality
assert np.unique(test_sum).size == 1
y_train = np.zeros(labels.shape)
y_val = np.zeros(labels.shape)
y_test = np.zeros(labels.shape)
y_train[train_mask, :] = labels[train_mask, :]
y_val[val_mask, :] = labels[val_mask, :]
y_test[test_mask, :] = labels[test_mask, :]
return y_train, y_val, y_test, train_mask, val_mask, test_mask
def get_train_val_test_split2(random_state,
labels,
train_examples_per_class=None, val_examples_per_class=None,
test_examples_per_class=None,
train_size=None, val_size=None, test_size=None):
num_samples, num_classes = labels.shape
remaining_indices = list(range(num_samples))
if train_examples_per_class is not None:
train_indices = sample_per_class(random_state, labels, train_examples_per_class)
else:
# select train examples with no respect to class distribution
train_indices = random_state.choice(remaining_indices, train_size, replace=False)
train_mask = sample_mask(train_indices, labels.shape[0])
if val_examples_per_class is not None:
val_indices = sample_per_class(random_state, labels, val_examples_per_class, forbidden_indices=train_indices)
else:
remaining_indices = np.setdiff1d(remaining_indices, train_indices)
val_indices = random_state.choice(remaining_indices, val_size, replace=False)
val_mask = sample_mask(val_indices, labels.shape[0])
forbidden_indices = np.concatenate((train_indices, val_indices))
if test_examples_per_class is not None:
test_indices = sample_per_class(random_state, labels, test_examples_per_class,
forbidden_indices=forbidden_indices)
elif test_size is not None:
remaining_indices = np.setdiff1d(remaining_indices, forbidden_indices)
test_indices = random_state.choice(remaining_indices, test_size, replace=False)
test_mask = sample_mask(test_indices, labels.shape[0])
else:
test_indices = np.setdiff1d(remaining_indices, forbidden_indices)
test_mask = sample_mask(test_indices, labels.shape[0])
# assert that there are no duplicates in sets
assert len(set(train_indices)) == len(train_indices)
assert len(set(val_indices)) == len(val_indices)
assert len(set(test_indices)) == len(test_indices)
# assert sets are mutually exclusive
assert len(set(train_indices) - set(val_indices)) == len(set(train_indices))
assert len(set(train_indices) - set(test_indices)) == len(set(train_indices))
assert len(set(val_indices) - set(test_indices)) == len(set(val_indices))
if test_size is None and test_examples_per_class is None:
# all indices must be part of the split
assert len(np.concatenate((train_indices, val_indices, test_indices))) == num_samples
if train_examples_per_class is not None:
train_labels = labels[train_indices, :]
train_sum = np.sum(train_labels, axis=0)
# assert all classes have equal cardinality
assert np.unique(train_sum).size == 1
if val_examples_per_class is not None:
val_labels = labels[val_indices, :]
val_sum = np.sum(val_labels, axis=0)
# assert all classes have equal cardinality
assert np.unique(val_sum).size == 1
if test_examples_per_class is not None:
test_labels = labels[test_indices, :]
test_sum = np.sum(test_labels, axis=0)
# assert all classes have equal cardinality
assert np.unique(test_sum).size == 1
y_train = np.zeros(labels.shape)
y_val = np.zeros(labels.shape)
y_test = np.zeros(labels.shape)
y_train[train_mask, :] = labels[train_mask, :]
y_val[val_mask, :] = labels[val_mask, :]
y_test[test_mask, :] = labels[test_mask, :]
return y_train, y_val, y_test, train_mask, val_mask, test_mask, test_indices
def get_train_val_test_split_ood(random_state,
labels,
train_examples_per_class=None, val_examples_per_class=None,
test_examples_per_class=None,
train_size=None, val_size=None, test_size=None):
num_samples, num_classes = labels.shape
remaining_indices = list(range(num_samples))
if train_examples_per_class is not None:
train_indices = sample_per_class(random_state, labels, train_examples_per_class)
else:
# select train examples with no respect to class distribution
train_indices = random_state.choice(remaining_indices, train_size, replace=False)
train_mask = sample_mask(train_indices, labels.shape[0])
if val_examples_per_class is not None:
val_indices = sample_per_class(random_state, labels, val_examples_per_class, forbidden_indices=train_indices)
else:
remaining_indices = np.setdiff1d(remaining_indices, train_indices)
val_indices = random_state.choice(remaining_indices, val_size, replace=False)
val_mask = sample_mask(val_indices, labels.shape[0])
forbidden_indices = np.concatenate((train_indices, val_indices))
if test_examples_per_class is not None:
test_indices = sample_per_class(random_state, labels, test_examples_per_class,
forbidden_indices=forbidden_indices)
elif test_size is not None:
remaining_indices = np.setdiff1d(remaining_indices, forbidden_indices)
test_indices = random_state.choice(remaining_indices, test_size, replace=False)
test_mask = sample_mask(test_indices, labels.shape[0])
else:
test_indices = np.setdiff1d(remaining_indices, forbidden_indices)
test_mask = sample_mask(test_indices, labels.shape[0])
# assert that there are no duplicates in sets
assert len(set(train_indices)) == len(train_indices)
assert len(set(val_indices)) == len(val_indices)
assert len(set(test_indices)) == len(test_indices)
# assert sets are mutually exclusive
assert len(set(train_indices) - set(val_indices)) == len(set(train_indices))
assert len(set(train_indices) - set(test_indices)) == len(set(train_indices))
assert len(set(val_indices) - set(test_indices)) == len(set(val_indices))
if test_size is None and test_examples_per_class is None:
# all indices must be part of the split
assert len(np.concatenate((train_indices, val_indices, test_indices))) == num_samples
if train_examples_per_class is not None:
train_labels = labels[train_indices, :]
train_sum = np.sum(train_labels, axis=0)
# assert all classes have equal cardinality
assert np.unique(train_sum).size == 1
if val_examples_per_class is not None:
val_labels = labels[val_indices, :]
val_sum = np.sum(val_labels, axis=0)
# assert all classes have equal cardinality
assert np.unique(val_sum).size == 1
if test_examples_per_class is not None:
test_labels = labels[test_indices, :]
test_sum = np.sum(test_labels, axis=0)
# assert all classes have equal cardinality
assert np.unique(test_sum).size == 1
y_train = np.zeros(labels.shape)
y_val = np.zeros(labels.shape)
y_test = np.zeros(labels.shape)
y_train[train_mask, :] = labels[train_mask, :]
y_val[val_mask, :] = labels[val_mask, :]
y_test[test_mask, :] = labels[test_mask, :]
return y_train, y_val, y_test, train_mask, val_mask, test_mask, train_indices
def sample_per_class(random_state, labels, num_examples_per_class, forbidden_indices=None):
num_samples, num_classes = labels.shape
sample_indices_per_class = {index: [] for index in range(num_classes)}
# get indices sorted by class
for class_index in range(num_classes):
for sample_index in range(num_samples):
if labels[sample_index, class_index] > 0.0:
if forbidden_indices is None or sample_index not in forbidden_indices:
sample_indices_per_class[class_index].append(sample_index)
# get specified number of indices for each class
return np.concatenate(
[random_state.choice(sample_indices_per_class[class_index], num_examples_per_class, replace=False)
for class_index in range(len(sample_indices_per_class))
])
def is_binary_bag_of_words(features):
features_coo = features.tocoo()
return all(single_entry == 1.0 for _, _, single_entry in zip(features_coo.row, features_coo.col, features_coo.data))
def sample_mask(idx, l):
"""Create mask."""
mask = np.zeros(l)
mask[idx] = 1
return np.array(mask, dtype=np.bool)
def load_npz_data(dataset_str, seed): # load co-author, Amazon datasets.
adj, features, labels = get_dataset("data/{}.npz".format(dataset_str), True)
random_state = np.random.RandomState(seed)
y_train, y_val, y_test, train_mask, val_mask, test_mask = get_train_val_test_split(random_state, labels, train_size=20*labels.shape[1], val_size=30*labels.shape[1])
return adj, features, y_train, y_val, y_test, train_mask, val_mask, test_mask
def load_npz_data2(dataset_str, seed): # load co-author, Amazon datasets.
adj, features, labels = get_dataset("data/{}.npz".format(dataset_str), True)
random_state = np.random.RandomState(seed)
y_train, y_val, y_test, train_mask, val_mask, test_mask, test_idx = get_train_val_test_split2(random_state, labels, train_size=20*labels.shape[1], val_size=30*labels.shape[1])
return adj, features, y_train, y_val, y_test, train_mask, val_mask, test_mask, labels, test_idx
def load_npz_data_ood(dataset_str, seed): # load co-author, Amazon datasets.
adj, features, labels = get_dataset("data/{}.npz".format(dataset_str), True)
random_state = np.random.RandomState(seed)
y_train, y_val, y_test, train_mask, val_mask, test_mask, idx_train = get_train_val_test_split_ood(random_state, labels, train_size=20*labels.shape[1], val_size=30*labels.shape[1])
test_mask = np.array(1 - train_mask, dtype=bool)
category = np.argmax(labels, axis=1)
test_mask_all = np.array(test_mask)
idx_train = list(idx_train)
if dataset_str == 'amazon_electronics_photo':
for i in range(labels.shape[0]):
if category[i] > 3:
train_mask[i] = False
if i in idx_train:
idx_train.remove(i)
else:
test_mask[i] = False
labels = labels[:, 0:4]
if dataset_str == 'amazon_electronics_computers':
for i in range(labels.shape[0]):
if category[i] > 4:
train_mask[i] = False
if i in idx_train:
idx_train.remove(i)
else:
test_mask[i] = False
labels = labels[:, 0:5]
if dataset_str == 'ms_academic_phy':
for i in range(labels.shape[0]):
if category[i] > 2:
train_mask[i] = False
if i in idx_train:
idx_train.remove(i)
else:
test_mask[i] = False
labels = labels[:, 0:3]
y_train = np.zeros(labels.shape)
y_train[train_mask, :] = labels[train_mask, :]
return adj.A, idx_train, y_train, train_mask
def load_npz_data_ood_train(dataset_str, seed): # load co-author, Amazon datasets.
adj, features, labels = get_dataset("data/{}.npz".format(dataset_str), True)
random_state = np.random.RandomState(seed)
y_train, y_val, y_test, train_mask, val_mask, test_mask, idx_train = get_train_val_test_split_ood(random_state, labels, train_size=20*labels.shape[1], val_size=30*labels.shape[1])
test_mask = np.array(1 - train_mask, dtype=bool)
category = np.argmax(labels, axis=1)
test_mask_all = np.array(test_mask)
idx_train = list(idx_train)
if dataset_str == 'amazon_electronics_photo':
for i in range(labels.shape[0]):
if category[i] > 3:
train_mask[i] = False
test_mask_all[i] = False
if i in idx_train:
idx_train.remove(i)
else:
test_mask[i] = False
labels = labels[:, 0:4]
if dataset_str == 'amazon_electronics_computers':
for i in range(labels.shape[0]):
if category[i] > 4:
train_mask[i] = False
test_mask_all[i] = False
if i in idx_train:
idx_train.remove(i)
else:
test_mask[i] = False
labels = labels[:, 0:5]
if dataset_str == 'ms_academic_phy':
for i in range(labels.shape[0]):
if category[i] > 2:
train_mask[i] = False
test_mask_all[i] = False
if i in idx_train:
idx_train.remove(i)
else:
test_mask[i] = False
labels = labels[:, 0:3]
y_train = np.zeros(labels.shape)
y_train[train_mask, :] = labels[train_mask, :]
return adj, features, labels, labels, labels, train_mask, test_mask_all, test_mask_all
def load_npz_data_ood_train2(dataset_str, seed): # load co-author, Amazon datasets.
adj, features, labels = get_dataset("data/{}.npz".format(dataset_str), True)
random_state = np.random.RandomState(seed)
y_train, y_val, y_test, train_mask, val_mask, test_mask, idx_train = get_train_val_test_split_ood(random_state, labels, train_size=20*labels.shape[1], val_size=30*labels.shape[1])
test_mask = np.ones_like(train_mask, dtype=bool)
category = np.argmax(labels, axis=1)
idx_train = list(idx_train)
if dataset_str == 'amazon_electronics_photo':
for i in range(labels.shape[0]):
if category[i] > 3:
train_mask[i] = False
if i in idx_train:
idx_train.remove(i)
else:
test_mask[i] = False
labels = labels[:, 0:4]
if dataset_str == 'amazon_electronics_computers':
for i in range(labels.shape[0]):
if category[i] > 4:
train_mask[i] = False
if i in idx_train:
idx_train.remove(i)
else:
test_mask[i] = False
labels = labels[:, 0:5]
if dataset_str == 'ms_academic_phy':
for i in range(labels.shape[0]):
if category[i] > 2:
train_mask[i] = False
if i in idx_train:
idx_train.remove(i)
else:
test_mask[i] = False
labels = labels[:, 0:3]
return adj, features, labels, labels, labels, train_mask, test_mask, idx_train
| 46.854067 | 184 | 0.657544 | 2,676 | 19,585 | 4.509716 | 0.066517 | 0.03646 | 0.054359 | 0.031323 | 0.890454 | 0.864849 | 0.854491 | 0.846951 | 0.846951 | 0.840156 | 0 | 0.008203 | 0.253051 | 19,585 | 417 | 185 | 46.966427 | 0.816734 | 0.082716 | 0 | 0.840979 | 0 | 0 | 0.014625 | 0.008912 | 0 | 0 | 0 | 0 | 0.091743 | 1 | 0.036697 | false | 0 | 0.009174 | 0 | 0.082569 | 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 |
06275862930eca95398339a3998aa36538326113 | 6,761 | py | Python | API_SEARCH/API_CLEANER_031919.py | dbouquin/cite_astro_software_2019 | de09f29dcb58bc0a5847af6b2c839946fbadaa54 | [
"MIT"
] | 1 | 2020-02-05T06:06:01.000Z | 2020-02-05T06:06:01.000Z | API_SEARCH/API_CLEANER_031919.py | dbouquin/cite_astro_software_2019 | de09f29dcb58bc0a5847af6b2c839946fbadaa54 | [
"MIT"
] | null | null | null | API_SEARCH/API_CLEANER_031919.py | dbouquin/cite_astro_software_2019 | de09f29dcb58bc0a5847af6b2c839946fbadaa54 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
API_results = pd.read_csv(".csv")
list(API_results.columns.values)
API_results['Highlight'] = API_results['Highlight'].astype('|S')
#_____________________TARDIS____________________________________
# emails
API_results = API_results[~API_results.Highlight.str.contains("@<em>tardis</em>")]
API_results = API_results[~API_results.Highlight.str.contains("@tardis.byu.edu")]
API_results = API_results[~API_results.Highlight.str.contains("@tardis.ln.byu.edu")]
API_results = API_results[~API_results.Highlight.str.contains("@tardis.pha.jhu.edu")]
API_results = API_results[~API_results.Highlight.str.contains("tardis.ln.byu.edu")]
# detector
API_results = API_results[~(API_results.Highlight.str.contains("detector") & API_results.Software_Package.str.contains("TARDIS"))]
API_results = API_results[~(API_results.Highlight.str.contains("Detector") & API_results.Software_Package.str.contains("TARDIS"))]
API_results = API_results[~(API_results.Highlight.str.contains("bubble") & API_results.Software_Package.str.contains("TARDIS"))]
API_results = API_results[~(API_results.Highlight.str.contains("travel") & API_results.Software_Package.str.contains("TARDIS"))]
API_results = API_results[~(API_results.Highlight.str.contains("boundaries") & API_results.Software_Package.str.contains("TARDIS"))]
API_results = API_results[~(API_results.Highlight.str.contains("triangulations") & API_results.Software_Package.str.contains("TARDIS"))]
# detection
API_results = API_results[~(API_results.Highlight.str.contains("detection") & API_results.Software_Package.str.contains("TARDIS"))]
API_results = API_results[~(API_results.Highlight.str.contains("Detection") & API_results.Software_Package.str.contains("TARDIS"))]
# stardisk
API_results = API_results[~(API_results.Highlight.str.contains("stardisk") & API_results.Software_Package.str.contains("TARDIS"))]
API_results = API_results[~(API_results.Highlight.str.contains("STARDISK") & API_results.Software_Package.str.contains("TARDIS"))]
API_results = API_results[~(API_results.Highlight.str.contains("Stardisk") & API_results.Software_Package.str.contains("TARDIS"))]
#_____________________Stingray____________________________________
# stingray nebula
API_results = API_results[~(API_results.Highlight.str.contains("Nebula") & API_results.Software_Package.str.contains("Stingray"))]
API_results = API_results[~(API_results.Highlight.str.contains("nebula") & API_results.Software_Package.str.contains("Stingray"))]
API_results = API_results[~(API_results.Highlight.str.contains("CCD") & API_results.Software_Package.str.contains("Stingray"))]
API_results = API_results[~(API_results.Highlight.str.contains("ccd") & API_results.Software_Package.str.contains("Stingray"))]
API_results = API_results[~(API_results.Highlight.str.contains("camera") & API_results.Software_Package.str.contains("Stingray"))]
API_results = API_results[~(API_results.Highlight.str.contains("leather") & API_results.Software_Package.str.contains("Stingray"))]
API_results = API_results[~(API_results.Highlight.str.contains("detector") & API_results.Software_Package.str.contains("Stingray"))]
API_results = API_results[~(API_results.Highlight.str.contains("fish") & API_results.Software_Package.str.contains("Stingray"))]
API_results = API_results[~(API_results.Highlight.str.contains("shark") & API_results.Software_Package.str.contains("Stingray"))]
API_results = API_results[~(API_results.Highlight.str.contains("shaped") & API_results.Software_Package.str.contains("Stingray"))]
API_results = API_results[~(API_results.Highlight.str.contains("marine") & API_results.Software_Package.str.contains("Stingray"))]
API_results = API_results[~(API_results.Highlight.str.contains("lens") & API_results.Software_Package.str.contains("Stingray"))]
API_results = API_results[~(API_results.Highlight.str.contains("biology") & API_results.Software_Package.str.contains("Stingray"))]
API_results = API_results[~(API_results.Highlight.str.contains("optics") & API_results.Software_Package.str.contains("Stingray"))]
API_results = API_results[~(API_results.Highlight.str.contains("Optics") & API_results.Software_Package.str.contains("Stingray"))]
API_results = API_results[~(API_results.Highlight.str.contains("tuna") & API_results.Software_Package.str.contains("Stingray"))]
API_results = API_results[~(API_results.Highlight.str.contains("bay") & API_results.Software_Package.str.contains("Stingray"))]
API_results = API_results[~(API_results.Highlight.str.contains("Bay") & API_results.Software_Package.str.contains("Stingray"))]
API_results = API_results[~(API_results.Highlight.str.contains("reef") & API_results.Software_Package.str.contains("Stingray"))]
API_results = API_results[~(API_results.Highlight.str.contains("laser") & API_results.Software_Package.str.contains("Stingray"))]
API_results = API_results[~(API_results.Highlight.str.contains("robot") & API_results.Software_Package.str.contains("Stingray"))]
API_results = API_results[~(API_results.Highlight.str.contains("wing") & API_results.Software_Package.str.contains("Stingray"))]
API_results = API_results[~(API_results.Highlight.str.contains("wings") & API_results.Software_Package.str.contains("Stingray"))]
API_results = API_results[~(API_results.Highlight.str.contains("Corvette") & API_results.Software_Package.str.contains("Stingray"))]
API_results = API_results[~(API_results.Highlight.str.contains("water") & API_results.Software_Package.str.contains("Stingray"))]
API_results = API_results[~(API_results.Highlight.str.contains("swimming") & API_results.Software_Package.str.contains("Stingray"))]
# the stingray
API_results = API_results[~(API_results.Highlight.str.contains("The Stingray") & API_results.Software_Package.str.contains("Stingray"))]
API_results = API_results[~(API_results.Highlight.str.contains("The stingray") & API_results.Software_Package.str.contains("Stingray"))]
API_results = API_results[~(API_results.Highlight.str.contains("the stingray") & API_results.Software_Package.str.contains("Stingray"))]
# stingray light curve
API_results = API_results[~(API_results.Highlight.str.contains("Stingray Light Curve") & API_results.Software_Package.str.contains("Stingray"))]
API_results = API_results[~(API_results.Highlight.str.contains("Stingray light curve") & API_results.Software_Package.str.contains("Stingray"))]
API_results = API_results[~(API_results.Highlight.str.contains("stingray light curve") & API_results.Software_Package.str.contains("Stingray"))]
#_____________________citation_finder_________________________
citation_finder = API_results.Highlight.str.find('(') != -1
API_results['Citation'] = citation_finder
API_results.to_csv(".csv")
print('CSV saved')
| 79.541176 | 144 | 0.800621 | 871 | 6,761 | 5.753157 | 0.080367 | 0.387148 | 0.249052 | 0.383157 | 0.904809 | 0.901217 | 0.901217 | 0.884055 | 0.884055 | 0.874077 | 0 | 0.000155 | 0.04526 | 6,761 | 84 | 145 | 80.488095 | 0.776143 | 0.040527 | 0 | 0 | 0 | 0 | 0.120426 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.051724 | 0 | 0.051724 | 0.017241 | 0 | 0 | 0 | null | 1 | 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 | 9 |
06382c1b7a459f1fdc85d6ad6d4e0a817fc35294 | 7,307 | py | Python | test/test_functional/test_signin.py | CorySanin/stepmania-server | 0573436abcd5951533f049dc56d91878a40726ad | [
"MIT"
] | 17 | 2016-04-19T18:37:31.000Z | 2020-12-15T04:14:20.000Z | test/test_functional/test_signin.py | CorySanin/stepmania-server | 0573436abcd5951533f049dc56d91878a40726ad | [
"MIT"
] | 40 | 2017-02-05T17:17:13.000Z | 2018-04-08T10:31:39.000Z | test/test_functional/test_signin.py | CorySanin/stepmania-server | 0573436abcd5951533f049dc56d91878a40726ad | [
"MIT"
] | 3 | 2021-03-13T08:40:20.000Z | 2021-09-17T07:31:22.000Z | """ Module to test the login of client """
from smserver import models
from smserver.smutils.smpacket import smpacket
from test.test_functional.helper import ConnectedFunctionalTest
class SigninTest(ConnectedFunctionalTest):
""" Test the client login """
def test_client_bin_sign_in_one_user(self):
""" First time login for clientbin-user1, the user is created """
self.client_bin.on_data(smpacket.SMPacketClientNSSMONL(
packet=smpacket.SMOPacketClientLogin(
username="clientbin-user1",
password="testtest",
player_number=0
)
).binary)
user = self.session.query(models.User).filter_by(name="clientbin-user1").first()
self.assertIsNotNone(user)
self.assertTrue(user.online)
self.assertEqual(user.last_ip, self.client_bin.ip)
self.assertIsNone(user.room)
self.assertEqual(user.pos, 0)
self.assertIn(user, self.bin_connection.users)
def test_client_bin_sign_in_wrong_password(self):
""" Login with a wrong password """
self.test_client_bin_sign_in_one_user()
self.client_bin.on_data(smpacket.SMPacketClientNSSMONL(
packet=smpacket.SMOPacketClientLogin(
username="clientbin-user1",
password="wrong_password",
player_number=1
)
).binary)
user = self.session.query(models.User).filter_by(name="clientbin-user1").first()
self.assertIsNotNone(user)
self.assertTrue(user.online)
self.assertEqual(user.last_ip, self.client_bin.ip)
self.assertIsNone(user.room)
self.assertEqual(user.pos, 0)
self.assertIn(user, self.bin_connection.users)
def test_client_bin_sign_in_second_user(self):
""" First time login for clientbin-user2, the user is created """
self.test_client_bin_sign_in_one_user()
self.client_bin.on_data(smpacket.SMPacketClientNSSMONL(
packet=smpacket.SMOPacketClientLogin(
username="clientbin-user2",
password="testtest",
player_number=1
)
).binary)
user = self.session.query(models.User).filter_by(name="clientbin-user2").first()
self.assertTrue(user.online)
self.assertEqual(user.last_ip, self.client_bin.ip)
self.assertIsNone(user.room)
self.assertEqual(user.pos, 1)
self.assertIn(user, self.bin_connection.users)
def test_client_bin_logout_user(self):
""" Player select only one profile, we disconnect the player 1"""
self.test_client_bin_sign_in_one_user()
self.test_client_bin_sign_in_second_user()
self.client_bin.on_data(
smpacket.SMPacketClientNSCSU(
player_id=0,
nb_players=1,
player_name="name"
).binary
)
user2 = self.session.query(models.User).filter_by(name="clientbin-user2").first()
self.assertFalse(user2.online)
user1 = self.session.query(models.User).filter_by(name="clientbin-user1").first()
self.assertTrue(user1.online)
def test_client_bin_reconnect_user(self):
""" Player select only two profile, we reconnect the offline player """
self.test_client_bin_sign_in_one_user()
self.test_client_bin_sign_in_second_user()
self.test_client_bin_logout_user()
self.client_bin.on_data(
smpacket.SMPacketClientNSCSU(
player_id=0,
nb_players=2,
player_name="name"
).binary
)
user2 = self.session.query(models.User).filter_by(name="clientbin-user2").first()
self.assertTrue(user2.online)
user1 = self.session.query(models.User).filter_by(name="clientbin-user1").first()
self.assertTrue(user1.online)
def test_json_sign_in_one_user(self):
""" First time login for clientjson-user1, the user is created """
self.client_json.on_data(smpacket.SMPacketClientNSSMONL(
packet=smpacket.SMOPacketClientLogin(
username="clientjson-user1",
password="testtest",
player_number=0
)
).json)
user = self.session.query(models.User).filter_by(name="clientjson-user1").first()
self.assertIsNotNone(user)
self.assertTrue(user.online)
self.assertEqual(user.last_ip, self.client_json.ip)
self.assertIsNone(user.room)
self.assertEqual(user.pos, 0)
self.assertIn(user, self.json_connection.users)
def test_json_sign_in_with_same_user(self):
""" Player reconnect the same user already logued in (in another pos) """
self.test_json_sign_in_one_user()
self.client_json.on_data(smpacket.SMPacketClientNSSMONL(
packet=smpacket.SMOPacketClientLogin(
username="clientjson-user1",
password="testtest",
player_number=1
)
).json)
user = self.session.query(models.User).filter_by(name="clientjson-user1").first()
self.assertTrue(user.online)
self.assertEqual(user.last_ip, self.client_json.ip)
self.assertIsNone(user.room)
self.assertEqual(user.pos, 1)
self.assertIn(user, self.json_connection.users)
self.assertEqual(len(self.json_connection.users), 1)
def test_json_sign_in_second_user(self):
""" A second user sign in the free pos"""
self.test_json_sign_in_with_same_user()
self.client_json.on_data(smpacket.SMPacketClientNSSMONL(
packet=smpacket.SMOPacketClientLogin(
username="clientjson-user2",
password="testtest",
player_number=0
)
).json)
user = self.session.query(models.User).filter_by(name="clientjson-user2").first()
self.assertTrue(user.online)
self.assertEqual(user.last_ip, self.client_json.ip)
self.assertIsNone(user.room)
self.assertEqual(user.pos, 0)
self.assertIn(user, self.json_connection.users)
self.assertEqual(len(self.json_connection.users), 2)
def test_json_sign_in_third_user(self):
""" A third user connect in a pos already taken """
self.test_json_sign_in_with_same_user()
self.test_json_sign_in_second_user()
self.client_json.on_data(smpacket.SMPacketClientNSSMONL(
packet=smpacket.SMOPacketClientLogin(
username="clientjson-user3",
password="testtest",
player_number=1
)
).json)
user3 = self.session.query(models.User).filter_by(name="clientjson-user3").first()
user1 = self.session.query(models.User).filter_by(name="clientjson-user1").first()
self.assertTrue(user3.online)
self.assertEqual(user3.last_ip, self.client_json.ip)
self.assertIsNone(user3.room)
self.assertEqual(user3.pos, 1)
self.assertIn(user3, self.json_connection.users)
self.assertEqual(len(self.json_connection.users), 3)
self.assertEqual(len(self.json_connection.active_users), 2)
self.assertFalse(user1.online)
| 34.630332 | 90 | 0.643629 | 849 | 7,307 | 5.327444 | 0.113074 | 0.060137 | 0.03449 | 0.058368 | 0.858943 | 0.835729 | 0.805439 | 0.773159 | 0.752156 | 0.712138 | 0 | 0.011162 | 0.252087 | 7,307 | 210 | 91 | 34.795238 | 0.816468 | 0.073217 | 0 | 0.678082 | 0 | 0 | 0.054296 | 0 | 0 | 0 | 0 | 0 | 0.321918 | 1 | 0.061644 | false | 0.054795 | 0.020548 | 0 | 0.089041 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 7 |
0651b68e5335715e0c78f907043ad99db80413e7 | 3,119 | py | Python | src/python/pull_requests/config.py | trietsch/xbar | 9da5560c99d03a131b866761aa2081ef00255efd | [
"MIT"
] | 1 | 2022-02-08T09:19:40.000Z | 2022-02-08T09:19:40.000Z | src/python/pull_requests/config.py | trietsch/xbar | 9da5560c99d03a131b866761aa2081ef00255efd | [
"MIT"
] | 3 | 2021-12-24T11:34:24.000Z | 2022-01-18T09:17:32.000Z | src/python/pull_requests/config.py | trietsch/xbar | 9da5560c99d03a131b866761aa2081ef00255efd | [
"MIT"
] | null | null | null | from distutils.util import strtobool
from . import PullRequestSort
from ..common.config import AppConfigReader
from ..common.icons import Icon
class PullRequestsConstants(object):
MODULE = "pull_requests"
NO_PULL_REQUESTS = Icon(
"iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAKZlWElmTU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgExAAIAAAAiAAAAWodpAAQAAAABAAAAfAAAAAAAAABIAAAAAQAAAEgAAAABQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKFdpbmRvd3MpAAADoAEAAwAAAAEAAQAAoAIABAAAAAEAAAAQoAMABAAAAAEAAAAQAAAAAPdSCPcAAAAJcEhZcwAACxMAAAsTAQCanBgAAASIaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJYTVAgQ29yZSA1LjQuMCI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIgogICAgICAgICAgICB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIKICAgICAgICAgICAgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx4bXBNTTpJbnN0YW5jZUlEPnhtcC5paWQ6MEZCNjAyOUExMDE3MTFFQTlERkFFQ0QzQUU0QjA2OTk8L3htcE1NOkluc3RhbmNlSUQ+CiAgICAgICAgIDx4bXBNTTpEb2N1bWVudElEPnhtcC5kaWQ6MEZCNjAyOUIxMDE3MTFFQTlERkFFQ0QzQUU0QjA2OTk8L3htcE1NOkRvY3VtZW50SUQ+CiAgICAgICAgIDx4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ+eG1wLmRpZDo2MjBiYmMwNS0yZmYxLTc1NGMtOGE1NC1lMGYyNzJkZmQ2NGY8L3htcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD4KICAgICAgICAgPHhtcE1NOkRlcml2ZWRGcm9tIHJkZjpwYXJzZVR5cGU9IlJlc291cmNlIj4KICAgICAgICAgICAgPHN0UmVmOmluc3RhbmNlSUQ+eG1wLmlpZDphY2M1ODRmNC01ZDcxLWVlNDgtYjk3NC1iNjUzYmM2Mzc3MGI8L3N0UmVmOmluc3RhbmNlSUQ+CiAgICAgICAgICAgIDxzdFJlZjpkb2N1bWVudElEPnhtcC5kaWQ6NjIwYmJjMDUtMmZmMS03NTRjLThhNTQtZTBmMjcyZGZkNjRmPC9zdFJlZjpkb2N1bWVudElEPgogICAgICAgICA8L3htcE1NOkRlcml2ZWRGcm9tPgogICAgICAgICA8eG1wOkNyZWF0b3JUb29sPkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE0IChXaW5kb3dzKTwveG1wOkNyZWF0b3JUb29sPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4K6mPw8gAAAYlJREFUOBGF07srhXEcx/HnXJBrGNyVMmAxEEouKSRlUG6DwW1idcpsNNgM/gAyGGWREgNlEXVSDMLimgilc/D+PJ6vjsvhW6/ndzu/7+/yPMdx4keQoYQ4wwHr/6xYB6UmvqITaShDHs6RAo1FofD5P8ovzzevtUHZhjucYgGL0ORWTCLwfQdKqBVq8AIf9JsDpGIXVxjADCL6QWxo+xEogXZSiTNkYgXP6MUFNhGMPYKSaXIu7hHGCdbwCE3OQRW2oIj+doQ+BpSoEfu4xREG0YA5jOMG13DDEtXS2vb6VGhSs9cupmxBKZK9PveCVLdXN029C1r50Cu1E20/H0WogN3NE3XH7kHnC0OXN486WIxS0UfVg0JUYxh+bV2Xp0n1WMIYsrGDEhwjEVogAw/QDvegeW5k8dRHohiCBlbRgVlMQEewGKHSbQ2V6tCkKTUIHUHtEMqRBIX9N7RzcSOdZz/WYUnaqRcgNnTUH6FOvZ4m6DKVbBmXUGgVJdXn/WcoiSZbKJn8G+/llU9bPQGuJgAAAABJRU5ErkJggg==")
class PullRequestsConfig(object):
_config = AppConfigReader.read(PullRequestsConstants.MODULE)
SORT_ON = PullRequestSort[_config["preferences"]["sort_on"].upper()]
NOTIFICATIONS_ENABLED = strtobool(_config["preferences"].get("notifications_enabled", "False"))
ENABLED_PR_MODULES = set(_config["preferences"].get("enabled_pr_modules", "").split(","))
CACHE_FILE = _config["common"]["cache_path"]
| 148.52381 | 2,459 | 0.935236 | 97 | 3,119 | 29.886598 | 0.639175 | 0.017592 | 0.013798 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.08935 | 0.027573 | 3,119 | 20 | 2,460 | 155.95 | 0.866469 | 0 | 0 | 0 | 0 | 0.071429 | 0.821417 | 0.7916 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.285714 | 0 | 0.928571 | 0 | 0 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 7 |
066a9d79d658f94275352a1bdd6dad4b645c2e83 | 9,274 | py | Python | tests/charts-out/test_graphics_charts_barcharts_sampleH1.py | debragail/reportlab-mirror | 1e5814e1313ed50d5abb65487b207711cb4f7595 | [
"BSD-3-Clause"
] | 1 | 2020-05-21T23:34:55.000Z | 2020-05-21T23:34:55.000Z | tests/charts-out/test_graphics_charts_barcharts_sampleH1.py | debragail/reportlab-mirror | 1e5814e1313ed50d5abb65487b207711cb4f7595 | [
"BSD-3-Clause"
] | null | null | null | tests/charts-out/test_graphics_charts_barcharts_sampleH1.py | debragail/reportlab-mirror | 1e5814e1313ed50d5abb65487b207711cb4f7595 | [
"BSD-3-Clause"
] | null | null | null | #Autogenerated by ReportLab guiedit do not edit
from reportlab.graphics.shapes import _DrawingEditorMixin, Drawing, Group, Rect, Line, String
from reportlab.lib.colors import Color, CMYKColor, PCMYKColor
class ExplodedDrawing_Drawing(_DrawingEditorMixin,Drawing):
def __init__(self,width=400,height=200,*args,**kw):
Drawing.__init__(self,width,height,*args,**kw)
self.transform = (1,0,0,1,0,0)
self.add(Rect(50,50,300,125,rx=0,ry=0,fillColor=None,fillOpacity=None,strokeColor=Color(0,0,0,1),strokeWidth=1,strokeLineCap=0,strokeLineJoin=0,strokeMiterLimit=0,strokeDashArray=None,strokeOpacity=None))
self.add(Rect(50,51.5625,65,6.25,rx=0,ry=0,fillColor=Color(1,0,0,1),fillOpacity=None,strokeColor=Color(0,0,0,1),strokeWidth=1,strokeLineCap=0,strokeLineJoin=0,strokeMiterLimit=0,strokeDashArray=None,strokeOpacity=None))
self.add(Rect(50,67.1875,25,6.25,rx=0,ry=0,fillColor=Color(1,0,0,1),fillOpacity=None,strokeColor=Color(0,0,0,1),strokeWidth=1,strokeLineCap=0,strokeLineJoin=0,strokeMiterLimit=0,strokeDashArray=None,strokeOpacity=None))
self.add(Rect(50,82.8125,100,6.25,rx=0,ry=0,fillColor=Color(1,0,0,1),fillOpacity=None,strokeColor=Color(0,0,0,1),strokeWidth=1,strokeLineCap=0,strokeLineJoin=0,strokeMiterLimit=0,strokeDashArray=None,strokeOpacity=None))
self.add(Rect(50,98.4375,110,6.25,rx=0,ry=0,fillColor=Color(1,0,0,1),fillOpacity=None,strokeColor=Color(0,0,0,1),strokeWidth=1,strokeLineCap=0,strokeLineJoin=0,strokeMiterLimit=0,strokeDashArray=None,strokeOpacity=None))
self.add(Rect(50,114.0625,185,6.25,rx=0,ry=0,fillColor=Color(1,0,0,1),fillOpacity=None,strokeColor=Color(0,0,0,1),strokeWidth=1,strokeLineCap=0,strokeLineJoin=0,strokeMiterLimit=0,strokeDashArray=None,strokeOpacity=None))
self.add(Rect(50,129.6875,225,6.25,rx=0,ry=0,fillColor=Color(1,0,0,1),fillOpacity=None,strokeColor=Color(0,0,0,1),strokeWidth=1,strokeLineCap=0,strokeLineJoin=0,strokeMiterLimit=0,strokeDashArray=None,strokeOpacity=None))
self.add(Rect(50,145.3125,95,6.25,rx=0,ry=0,fillColor=Color(1,0,0,1),fillOpacity=None,strokeColor=Color(0,0,0,1),strokeWidth=1,strokeLineCap=0,strokeLineJoin=0,strokeMiterLimit=0,strokeDashArray=None,strokeOpacity=None))
self.add(Rect(50,160.9375,20,6.25,rx=0,ry=0,fillColor=Color(1,0,0,1),fillOpacity=None,strokeColor=Color(0,0,0,1),strokeWidth=1,strokeLineCap=0,strokeLineJoin=0,strokeMiterLimit=0,strokeDashArray=None,strokeOpacity=None))
self.add(Rect(50,57.8125,70,6.25,rx=0,ry=0,fillColor=Color(0,.501961,0,1),fillOpacity=None,strokeColor=Color(0,0,0,1),strokeWidth=1,strokeLineCap=0,strokeLineJoin=0,strokeMiterLimit=0,strokeDashArray=None,strokeOpacity=None))
self.add(Rect(50,73.4375,30,6.25,rx=0,ry=0,fillColor=Color(0,.501961,0,1),fillOpacity=None,strokeColor=Color(0,0,0,1),strokeWidth=1,strokeLineCap=0,strokeLineJoin=0,strokeMiterLimit=0,strokeDashArray=None,strokeOpacity=None))
self.add(Rect(50,89.0625,105,6.25,rx=0,ry=0,fillColor=Color(0,.501961,0,1),fillOpacity=None,strokeColor=Color(0,0,0,1),strokeWidth=1,strokeLineCap=0,strokeLineJoin=0,strokeMiterLimit=0,strokeDashArray=None,strokeOpacity=None))
self.add(Rect(50,104.6875,115,6.25,rx=0,ry=0,fillColor=Color(0,.501961,0,1),fillOpacity=None,strokeColor=Color(0,0,0,1),strokeWidth=1,strokeLineCap=0,strokeLineJoin=0,strokeMiterLimit=0,strokeDashArray=None,strokeOpacity=None))
self.add(Rect(50,120.3125,190,6.25,rx=0,ry=0,fillColor=Color(0,.501961,0,1),fillOpacity=None,strokeColor=Color(0,0,0,1),strokeWidth=1,strokeLineCap=0,strokeLineJoin=0,strokeMiterLimit=0,strokeDashArray=None,strokeOpacity=None))
self.add(Rect(50,135.9375,230,6.25,rx=0,ry=0,fillColor=Color(0,.501961,0,1),fillOpacity=None,strokeColor=Color(0,0,0,1),strokeWidth=1,strokeLineCap=0,strokeLineJoin=0,strokeMiterLimit=0,strokeDashArray=None,strokeOpacity=None))
self.add(Rect(50,151.5625,100,6.25,rx=0,ry=0,fillColor=Color(0,.501961,0,1),fillOpacity=None,strokeColor=Color(0,0,0,1),strokeWidth=1,strokeLineCap=0,strokeLineJoin=0,strokeMiterLimit=0,strokeDashArray=None,strokeOpacity=None))
self.add(Rect(50,167.1875,25,6.25,rx=0,ry=0,fillColor=Color(0,.501961,0,1),fillOpacity=None,strokeColor=Color(0,0,0,1),strokeWidth=1,strokeLineCap=0,strokeLineJoin=0,strokeMiterLimit=0,strokeDashArray=None,strokeOpacity=None))
self.add(Line(49,50,49,175,strokeColor=Color(0,0,0,1),strokeWidth=1,strokeLineCap=0,strokeLineJoin=0,strokeMiterLimit=0,strokeDashArray=None,strokeOpacity=None))
self.add(Line(49,50,44,50,strokeColor=Color(0,0,0,1),strokeWidth=1,strokeLineCap=0,strokeLineJoin=0,strokeMiterLimit=10,strokeDashArray=None,strokeOpacity=None))
self.add(Line(49,65.625,44,65.625,strokeColor=Color(0,0,0,1),strokeWidth=1,strokeLineCap=0,strokeLineJoin=0,strokeMiterLimit=10,strokeDashArray=None,strokeOpacity=None))
self.add(Line(49,81.25,44,81.25,strokeColor=Color(0,0,0,1),strokeWidth=1,strokeLineCap=0,strokeLineJoin=0,strokeMiterLimit=10,strokeDashArray=None,strokeOpacity=None))
self.add(Line(49,96.875,44,96.875,strokeColor=Color(0,0,0,1),strokeWidth=1,strokeLineCap=0,strokeLineJoin=0,strokeMiterLimit=10,strokeDashArray=None,strokeOpacity=None))
self.add(Line(49,112.5,44,112.5,strokeColor=Color(0,0,0,1),strokeWidth=1,strokeLineCap=0,strokeLineJoin=0,strokeMiterLimit=10,strokeDashArray=None,strokeOpacity=None))
self.add(Line(49,128.125,44,128.125,strokeColor=Color(0,0,0,1),strokeWidth=1,strokeLineCap=0,strokeLineJoin=0,strokeMiterLimit=10,strokeDashArray=None,strokeOpacity=None))
self.add(Line(49,143.75,44,143.75,strokeColor=Color(0,0,0,1),strokeWidth=1,strokeLineCap=0,strokeLineJoin=0,strokeMiterLimit=10,strokeDashArray=None,strokeOpacity=None))
self.add(Line(49,159.375,44,159.375,strokeColor=Color(0,0,0,1),strokeWidth=1,strokeLineCap=0,strokeLineJoin=0,strokeMiterLimit=10,strokeDashArray=None,strokeOpacity=None))
self.add(Line(49,175,44,175,strokeColor=Color(0,0,0,1),strokeWidth=1,strokeLineCap=0,strokeLineJoin=0,strokeMiterLimit=10,strokeDashArray=None,strokeOpacity=None))
v0=self._nn(Group())
v0.transform = (1,0,0,1,44,57.8125)
v0.add(String(-26.66,-4,'Jan-99',textAnchor='start',fontName='Times-Roman',fontSize=10,fillColor=Color(0,0,0,1)))
v0=self._nn(Group())
v0.transform = (1,0,0,1,44,73.4375)
v0.add(String(-28.33,-4,'Feb-99',textAnchor='start',fontName='Times-Roman',fontSize=10,fillColor=Color(0,0,0,1)))
v0=self._nn(Group())
v0.transform = (1,0,0,1,44,89.0625)
v0.add(String(-29.99,-4,'Mar-99',textAnchor='start',fontName='Times-Roman',fontSize=10,fillColor=Color(0,0,0,1)))
v0=self._nn(Group())
v0.transform = (1,0,0,1,44,104.6875)
v0.add(String(-28.88,-4,'Apr-99',textAnchor='start',fontName='Times-Roman',fontSize=10,fillColor=Color(0,0,0,1)))
v0=self._nn(Group())
v0.transform = (1,0,0,1,44,120.3125)
v0.add(String(-31.66,-4,'May-99',textAnchor='start',fontName='Times-Roman',fontSize=10,fillColor=Color(0,0,0,1)))
v0=self._nn(Group())
v0.transform = (1,0,0,1,44,135.9375)
v0.add(String(-27.22,-4,'Jun-99',textAnchor='start',fontName='Times-Roman',fontSize=10,fillColor=Color(0,0,0,1)))
v0=self._nn(Group())
v0.transform = (1,0,0,1,44,151.5625)
v0.add(String(-25,-4,'Jul-99',textAnchor='start',fontName='Times-Roman',fontSize=10,fillColor=Color(0,0,0,1)))
v0=self._nn(Group())
v0.transform = (1,0,0,1,44,167.1875)
v0.add(String(-30.55,-4,'Aug-99',textAnchor='start',fontName='Times-Roman',fontSize=10,fillColor=Color(0,0,0,1)))
self.add(Line(50,50,350,50,strokeColor=Color(0,0,0,1),strokeWidth=1,strokeLineCap=0,strokeLineJoin=0,strokeMiterLimit=0,strokeDashArray=None,strokeOpacity=None))
self.add(Line(50,50,50,45,strokeColor=Color(0,0,0,1),strokeWidth=1,strokeLineCap=0,strokeLineJoin=0,strokeMiterLimit=10,strokeDashArray=None,strokeOpacity=None))
self.add(Line(125,50,125,45,strokeColor=Color(0,0,0,1),strokeWidth=1,strokeLineCap=0,strokeLineJoin=0,strokeMiterLimit=10,strokeDashArray=None,strokeOpacity=None))
self.add(Line(200,50,200,45,strokeColor=Color(0,0,0,1),strokeWidth=1,strokeLineCap=0,strokeLineJoin=0,strokeMiterLimit=10,strokeDashArray=None,strokeOpacity=None))
self.add(Line(275,50,275,45,strokeColor=Color(0,0,0,1),strokeWidth=1,strokeLineCap=0,strokeLineJoin=0,strokeMiterLimit=10,strokeDashArray=None,strokeOpacity=None))
self.add(Line(350,50,350,45,strokeColor=Color(0,0,0,1),strokeWidth=1,strokeLineCap=0,strokeLineJoin=0,strokeMiterLimit=10,strokeDashArray=None,strokeOpacity=None))
v0=self._nn(Group())
v0.transform = (1,0,0,1,50,45)
v0.add(String(-2.5,-10,'0',textAnchor='start',fontName='Times-Roman',fontSize=10,fillColor=Color(0,0,0,1)))
v0=self._nn(Group())
v0.transform = (1,0,0,1,125,45)
v0.add(String(-5,-10,'15',textAnchor='start',fontName='Times-Roman',fontSize=10,fillColor=Color(0,0,0,1)))
v0=self._nn(Group())
v0.transform = (1,0,0,1,200,45)
v0.add(String(-5,-10,'30',textAnchor='start',fontName='Times-Roman',fontSize=10,fillColor=Color(0,0,0,1)))
v0=self._nn(Group())
v0.transform = (1,0,0,1,275,45)
v0.add(String(-5,-10,'45',textAnchor='start',fontName='Times-Roman',fontSize=10,fillColor=Color(0,0,0,1)))
v0=self._nn(Group())
v0.transform = (1,0,0,1,350,45)
v0.add(String(-5,-10,'60',textAnchor='start',fontName='Times-Roman',fontSize=10,fillColor=Color(0,0,0,1)))
if __name__=="__main__": #NORUNTESTS
ExplodedDrawing_Drawing().save(formats=['pdf'],outDir='.',fnRoot=None)
| 109.105882 | 229 | 0.772267 | 1,565 | 9,274 | 4.555272 | 0.095847 | 0.032263 | 0.028616 | 0.05162 | 0.875018 | 0.868425 | 0.859447 | 0.859447 | 0.859447 | 0.858606 | 0 | 0.13205 | 0.030731 | 9,274 | 84 | 230 | 110.404762 | 0.66103 | 0.006038 | 0 | 0.1625 | 1 | 0 | 0.030056 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.0125 | false | 0 | 0.025 | 0 | 0.05 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
06940b6fa21e63d8f4b827fb0e36bb1be6261d64 | 11,336 | py | Python | im2mesh/encoder/pointnet.py | tangjiapeng/LPDC-Net | ba69083cd5343348d377dfbb163d2c15dd6516ab | [
"MIT"
] | 21 | 2021-03-27T03:02:08.000Z | 2021-07-01T04:04:49.000Z | im2mesh/encoder/pointnet.py | Gorilla-Lab-SCUT/LPDC-Net | ba69083cd5343348d377dfbb163d2c15dd6516ab | [
"MIT"
] | 2 | 2021-08-19T08:07:49.000Z | 2021-08-19T08:18:56.000Z | im2mesh/encoder/pointnet.py | tangjiapeng/LPDC-Net | ba69083cd5343348d377dfbb163d2c15dd6516ab | [
"MIT"
] | 1 | 2022-01-05T03:53:40.000Z | 2022-01-05T03:53:40.000Z | import torch
import torch.nn as nn
from im2mesh.layers import ResnetBlockFC
def maxpool(x, dim=-1, keepdim=False):
''' Performs a maxpooling operation.
Args:
x (tensor): input
dim (int): dimension of pooling
keepdim (bool): whether to keep dimensions
'''
out, _ = x.max(dim=dim, keepdim=keepdim)
return out
class SimplePointnet(nn.Module):
''' PointNet-based encoder network.
Args:
c_dim (int): dimension of latent code c
dim (int): input points dimension
hidden_dim (int): hidden dimension of the network
'''
def __init__(self, c_dim=128, dim=3, hidden_dim=512):
super().__init__()
self.c_dim = c_dim
self.fc_pos = nn.Linear(dim, 2*hidden_dim)
self.fc_0 = nn.Linear(2*hidden_dim, hidden_dim)
self.fc_1 = nn.Linear(2*hidden_dim, hidden_dim)
self.fc_2 = nn.Linear(2*hidden_dim, hidden_dim)
self.fc_3 = nn.Linear(2*hidden_dim, hidden_dim)
self.fc_c = nn.Linear(hidden_dim, c_dim)
self.actvn = nn.ReLU()
self.pool = maxpool
def forward(self, p):
batch_size, T, D = p.size()
# output size: B x T X F
net = self.fc_pos(p)
net = self.fc_0(self.actvn(net))
pooled = self.pool(net, dim=1, keepdim=True).expand(net.size())
net = torch.cat([net, pooled], dim=2)
net = self.fc_1(self.actvn(net))
pooled = self.pool(net, dim=1, keepdim=True).expand(net.size())
net = torch.cat([net, pooled], dim=2)
net = self.fc_2(self.actvn(net))
pooled = self.pool(net, dim=1, keepdim=True).expand(net.size())
net = torch.cat([net, pooled], dim=2)
net = self.fc_3(self.actvn(net))
# Recude to B x F
net = self.pool(net, dim=1)
c = self.fc_c(self.actvn(net))
return c
class SpatioTemporalResnetPointnet(nn.Module):
def __init__(self, c_dim=128, dim=3, hidden_dim=512,
use_only_first_pcl=False, pool_once=False, **kwargs):
super().__init__()
self.c_dim = c_dim
self.use_only_first_pcl = use_only_first_pcl
self.pool_once = pool_once
self.spatial_fc_pos = nn.Linear(dim, 2*hidden_dim)
self.spatial_block_0 = ResnetBlockFC(2*hidden_dim, hidden_dim)
self.spatial_block_1 = ResnetBlockFC(2*hidden_dim, hidden_dim)
self.spatial_block_2 = ResnetBlockFC(2*hidden_dim, hidden_dim)
self.spatial_block_3 = ResnetBlockFC(2*hidden_dim, hidden_dim)
self.spatial_block_4 = ResnetBlockFC(2*hidden_dim, hidden_dim)
self.spatial_fc_c = nn.Linear(hidden_dim, c_dim)
if pool_once:
self.temporal_block_0 = ResnetBlockFC(2*hidden_dim, hidden_dim)
self.temporal_block_1 = ResnetBlockFC(2*hidden_dim, hidden_dim)
self.temporal_block_2 = ResnetBlockFC(2*hidden_dim, hidden_dim)
self.temporal_block_3 = ResnetBlockFC(2*hidden_dim, hidden_dim)
self.temporal_block_4 = ResnetBlockFC(2*hidden_dim, hidden_dim)
else:
self.temporal_fc_pos = nn.Linear(dim+1, 3*hidden_dim)
self.temporal_block_0 = ResnetBlockFC(3*hidden_dim, hidden_dim)
self.temporal_block_1 = ResnetBlockFC(3*hidden_dim, hidden_dim)
self.temporal_block_2 = ResnetBlockFC(3*hidden_dim, hidden_dim)
self.temporal_block_3 = ResnetBlockFC(3*hidden_dim, hidden_dim)
self.temporal_block_4 = ResnetBlockFC(3*hidden_dim, hidden_dim)
self.temporal_fc_c = nn.Linear(hidden_dim, c_dim)
self.fc_c = nn.Linear(2 * c_dim, c_dim)
self.actvn = nn.ReLU()
self.pool = maxpool
def forward(self, x):
batch_size, n_steps, n_pts, n_dim = x.shape
t = (torch.arange(
n_steps, dtype=torch.float32) / (n_steps - 1)
).to(x.device)
t = t[None, :, None, None].expand(batch_size, n_steps, n_pts, 1)
x_t = torch.cat([x, t], dim=3).reshape(batch_size, n_steps, n_pts, n_dim+1)
net = self.spatial_fc_pos(x)
net = self.spatial_block_0(net)
pooled = self.pool(net, dim=2, keepdim=True).expand(net.size())
net = torch.cat([net, pooled], dim=3)
net = self.spatial_block_1(net)
pooled = self.pool(net, dim=2, keepdim=True).expand(net.size())
net = torch.cat([net, pooled], dim=3)
net = self.spatial_block_2(net)
pooled = self.pool(net, dim=2, keepdim=True).expand(net.size())
net = torch.cat([net, pooled], dim=3)
net = self.spatial_block_3(net)
pooled = self.pool(net, dim=2, keepdim=True).expand(net.size())
net = torch.cat([net, pooled], dim=3)
net = self.spatial_block_4(net)
net = self.pool(net, dim=2)
spatial_c = self.spatial_fc_c(self.actvn(net)) #batch_size x n_steps x c_dim
net = self.temporal_fc_pos(x_t)
net = self.temporal_block_0(net)
if self.pool_once:
pooled = self.pool(net, dim=2, keepdim=True).expand(net.size())
net = torch.cat([net, pooled], dim=3)
else:
pooled = self.pool(net, dim=2, keepdim=True)
pooled_time = self.pool(pooled, dim=1, keepdim=True)
net = torch.cat([net, pooled.expand(net.size()), pooled_time.expand(net.size())], dim=3)
net = self.temporal_block_1(net)
if self.pool_once:
pooled = self.pool(net, dim=2, keepdim=True).expand(net.size())
net = torch.cat([net, pooled], dim=3)
else:
pooled = self.pool(net, dim=2, keepdim=True)
pooled_time = self.pool(pooled, dim=1, keepdim=True)
net = torch.cat([net, pooled.expand(net.size()), pooled_time.expand(net.size())], dim=3)
net = self.temporal_block_2(net)
if self.pool_once:
pooled = self.pool(net, dim=1, keepdim=True).expand(net.size())
net = torch.cat([net, pooled], dim=2)
else:
pooled = self.pool(net, dim=2, keepdim=True)
pooled_time = self.pool(pooled, dim=1, keepdim=True)
net = torch.cat([net, pooled.expand(net.size()), pooled_time.expand(net.size())], dim=3)
net = self.temporal_block_3(net)
if self.pool_once:
pooled = self.pool(net, dim=1, keepdim=True).expand(net.size())
net = torch.cat([net, pooled], dim=2)
else:
pooled = self.pool(net, dim=2, keepdim=True)
pooled_time = self.pool(pooled, dim=1, keepdim=True)
net = torch.cat([net, pooled.expand(net.size()), pooled_time.expand(net.size())], dim=3)
net = self.temporal_block_4(net)
net = self.pool(net, dim=2)
temporal_c = self.temporal_fc_c(self.actvn(net)) #batch_size x n_steps x c_dim
spatiotemporal_c = torch.cat([spatial_c, temporal_c], dim=2)
spatiotemporal_c = self.fc_c(spatiotemporal_c) #batch_size x n_steps x c_dim
return spatial_c, spatiotemporal_c
class SpatioTemporalResnetPointnet2(nn.Module):
def __init__(self, c_dim=128, dim=3, hidden_dim=512,
use_only_first_pcl=False, **kwargs):
super().__init__()
self.c_dim = c_dim
self.use_only_first_pcl = use_only_first_pcl
self.spatial_fc_pos = nn.Linear(dim, 2*hidden_dim)
self.spatial_block_0 = ResnetBlockFC(2*hidden_dim, hidden_dim)
self.spatial_block_1 = ResnetBlockFC(2*hidden_dim, hidden_dim)
self.spatial_block_2 = ResnetBlockFC(2*hidden_dim, hidden_dim)
self.spatial_block_3 = ResnetBlockFC(2*hidden_dim, hidden_dim)
self.spatial_block_4 = ResnetBlockFC(2*hidden_dim, hidden_dim)
self.spatial_fc_c = nn.Linear(hidden_dim, c_dim)
self.temporal_fc_pos = nn.Linear(dim+1, 3*hidden_dim)
self.temporal_block_0 = ResnetBlockFC(3*hidden_dim, hidden_dim)
self.temporal_block_1 = ResnetBlockFC(3*hidden_dim, hidden_dim)
self.temporal_block_2 = ResnetBlockFC(3*hidden_dim, hidden_dim)
self.temporal_block_3 = ResnetBlockFC(3*hidden_dim, hidden_dim)
self.temporal_block_4 = ResnetBlockFC(3*hidden_dim, hidden_dim)
self.temporal_fc_c = nn.Linear(2* hidden_dim, c_dim)
self.fc_c = nn.Linear(2 * c_dim, c_dim)
self.actvn = nn.ReLU()
self.pool = maxpool
def forward(self, x):
batch_size, n_steps, n_pts, n_dim = x.shape
t = (torch.arange(
n_steps, dtype=torch.float32) / (n_steps - 1)
).to(x.device)
t = t[None, :, None, None].expand(batch_size, n_steps, n_pts, 1)
x_t = torch.cat([x, t], dim=3).reshape(batch_size, n_steps, n_pts, n_dim+1)
net = self.spatial_fc_pos(x)
net = self.spatial_block_0(net)
pooled = self.pool(net, dim=2, keepdim=True).expand(net.size())
net = torch.cat([net, pooled], dim=3)
net = self.spatial_block_1(net)
pooled = self.pool(net, dim=2, keepdim=True).expand(net.size())
net = torch.cat([net, pooled], dim=3)
net = self.spatial_block_2(net)
pooled = self.pool(net, dim=2, keepdim=True).expand(net.size())
net = torch.cat([net, pooled], dim=3)
net = self.spatial_block_3(net)
pooled = self.pool(net, dim=2, keepdim=True).expand(net.size())
net = torch.cat([net, pooled], dim=3)
net = self.spatial_block_4(net)
net = self.pool(net, dim=2)
spatial_c = self.spatial_fc_c(self.actvn(net)) #batch_size x n_steps x c_dim
net = self.temporal_fc_pos(x_t)
net = self.temporal_block_0(net)
pooled = self.pool(net, dim=2, keepdim=True)
pooled_expand = pooled.expand(net.size())
pooled2 = self.pool(pooled, dim=1, keepdim=True)
pooled2_expand = pooled2.expand(net.size())
net = torch.cat([net, pooled_expand, pooled2_expand], dim=3)
net = self.temporal_block_1(net)
pooled = self.pool(net, dim=2, keepdim=True)
pooled_expand = pooled.expand(net.size())
pooled2 = self.pool(pooled, dim=1, keepdim=True)
pooled2_expand = pooled2.expand(net.size())
net = torch.cat([net, pooled_expand, pooled2_expand], dim=3)
net = self.temporal_block_2(net)
pooled = self.pool(net, dim=2, keepdim=True)
pooled_expand = pooled.expand(net.size())
pooled2 = self.pool(pooled, dim=1, keepdim=True)
pooled2_expand = pooled2.expand(net.size())
net = torch.cat([net, pooled_expand, pooled2_expand], dim=3)
net = self.temporal_block_3(net)
pooled = self.pool(net, dim=2, keepdim=True)
pooled_expand = pooled.expand(net.size())
pooled2 = self.pool(pooled, dim=1, keepdim=True)
pooled2_expand = pooled2.expand(net.size())
net = torch.cat([net, pooled_expand, pooled2_expand], dim=3)
net = self.temporal_block_4(net)
net = self.pool(net, dim=2)
pooled = self.pool(net, dim=1, keepdim=True).expand(net.size())
net = torch.cat([net, pooled], dim=2)
temporal_c = self.temporal_fc_c(self.actvn(net)) #batch_size x n_steps x c_dim
spatiotemporal_c = torch.cat([spatial_c, temporal_c], dim=2)
spatiotemporal_c = self.fc_c(self.actvn(spatiotemporal_c)) #batch_size x n_steps x c_dim
return spatiotemporal_c, spatiotemporal_c | 42.141264 | 100 | 0.628881 | 1,689 | 11,336 | 4.001184 | 0.060983 | 0.095886 | 0.06348 | 0.077242 | 0.906333 | 0.901302 | 0.897455 | 0.897455 | 0.8905 | 0.831903 | 0 | 0.024103 | 0.242414 | 11,336 | 269 | 101 | 42.141264 | 0.762809 | 0.046577 | 0 | 0.800971 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.033981 | false | 0 | 0.014563 | 0 | 0.082524 | 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 |
0006b3cc8b208a09a537ed2ed51e39aa9292823e | 7,551 | py | Python | graphtheory/flow/dinic.py | gitter-badger/graphs-dict | 2be1a5b140feb050eec799d6cadf6de5eef01745 | [
"BSD-3-Clause"
] | 36 | 2015-09-20T20:55:39.000Z | 2021-09-20T05:49:03.000Z | graphtheory/flow/dinic.py | gitter-badger/graphs-dict | 2be1a5b140feb050eec799d6cadf6de5eef01745 | [
"BSD-3-Clause"
] | 6 | 2016-03-25T21:41:46.000Z | 2020-02-12T03:18:59.000Z | graphtheory/flow/dinic.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 Queue
except ImportError: # Python 3
from queue import Queue
from graphtheory.structures.edges import Edge
class Dinic:
"""The Dinic's algorithm for computing the maximum flow.
Attributes
----------
graph : input directed graph (flow network)
residual : directed graph (residual network)
flow : dict-of-dict
source : node
sink : node
max_flow : number
level : dict with node levels
Notes
-----
Based on:
https://en.wikipedia.org/wiki/Dinic's_algorithm
http://www.geeksforgeeks.org/dinics-algorithm-maximum-flow/
"""
def __init__(self, graph):
"""The algorithm initialization."""
if not graph.is_directed():
raise ValueError("the graph is not directed")
self.graph = graph
self.residual = self.graph.__class__(self.graph.v(), directed=True)
for node in self.graph.iternodes():
self.residual.add_node(node)
# Initial capacities for the residual network.
for edge in self.graph.iteredges():
self.residual.add_edge(edge) # original capacity
self.residual.add_edge(Edge(edge.target, edge.source, 0))
# Legal flow.
self.flow = dict()
for source in self.graph.iternodes():
self.flow[source] = dict()
for target in self.graph.iternodes():
self.flow[source][target] = 0
# Initial flow is zero.
self.max_flow = 0
# Levels of nodes.
self.level = None
def run(self, source, sink):
"""Executable pseudocode."""
if source == sink:
raise ValueError("source and sink are the same")
self.source = source
self.sink = sink
while self._bfs():
while True:
min_capacity = self._dfs(self.source, float("inf"))
if min_capacity > 0:
self.max_flow += min_capacity
else:
break
def _bfs(self):
"""Find if more flow can be sent from source to sink.
Assign levels to nodes."""
# Wyzerowanie poziomow wierzcholkow.
self.level = dict((node, None) for node in self.residual.iternodes())
# BFS rozpoczynamy w self.source.
self.level[self.source] = 0
Q = Queue()
Q.put(self.source)
while not Q.empty(): # BFS loop
node = Q.get()
for edge in self.residual.iteroutedges(node):
# Rozpoznajemy wierzcholki nieodwiedzone po tym,
# ze nie maja ustawionego parametru level.
cap = edge.weight - self.flow[edge.source][edge.target]
if self.level[edge.target] is None and cap > 0:
self.level[edge.target] = self.level[edge.source] + 1
Q.put(edge.target)
return self.level[self.sink] is not None
def _dfs(self, node, start_capacity):
"""A DFS based function to send flow after BFS has figured out
that there is a possible flow. Levels were constructed during BFS."""
if node == self.sink:
return start_capacity
for edge in self.residual.iteroutedges(node):
cap = edge.weight - self.flow[edge.source][edge.target]
if (self.level[edge.target] == self.level[edge.source] + 1) and cap > 0:
min_capacity = min(start_capacity, cap)
min_capacity = self._dfs(edge.target, min_capacity)
if min_capacity > 0:
# Zapisujemy przeplyw przy wychodzeniu z rekurencji.
self.flow[edge.source][edge.target] += min_capacity
self.flow[edge.target][edge.source] -= min_capacity
return min_capacity
return 0
class DinicSparse:
"""The Dinic's algorithm for computing the maximum flow.
Attributes
----------
graph : input directed graph (flow network)
residual : directed graph (residual network)
flow : dict-of-dict
source : node
sink : node
max_flow : number
level : dict with node levels
Notes
-----
Based on:
https://en.wikipedia.org/wiki/Dinic's_algorithm
http://www.geeksforgeeks.org/dinics-algorithm-maximum-flow/
"""
def __init__(self, graph):
"""The algorithm initialization."""
if not graph.is_directed():
raise ValueError("the graph is not directed")
self.graph = graph
self.residual = self.graph.__class__(self.graph.v(), directed=True)
for node in self.graph.iternodes():
self.residual.add_node(node)
# Legal flow.
self.flow = dict()
for source in self.graph.iternodes():
self.flow[source] = dict()
# Initial capacities for the residual network.
for edge in self.graph.iteredges():
self.residual.add_edge(edge) # original capacity
self.residual.add_edge(Edge(edge.target, edge.source, 0))
self.flow[edge.source][edge.target] = 0
self.flow[edge.target][edge.source] = 0
# Initial flow is zero.
self.max_flow = 0
# Levels of nodes.
self.level = None
def run(self, source, sink):
"""Executable pseudocode."""
if source == sink:
raise ValueError("source and sink are the same")
self.source = source
self.sink = sink
while self._bfs():
while True:
min_capacity = self._dfs(self.source, float("inf"))
if min_capacity > 0:
self.max_flow += min_capacity
else:
break
def _bfs(self):
"""Find if more flow can be sent from source to sink.
Assign levels to nodes."""
# Wyzerowanie poziomow wierzcholkow.
self.level = dict((node, None) for node in self.residual.iternodes())
self.level[self.source] = 0
Q = Queue()
Q.put(self.source)
while not Q.empty(): # BFS loop
node = Q.get()
for edge in self.residual.iteroutedges(node):
# Rozpoznajemy wierzcholki nieodwiedzone po tym,
# ze nie maja ustawionego parametru level.
cap = edge.weight - self.flow[edge.source][edge.target]
if self.level[edge.target] is None and cap > 0:
self.level[edge.target] = self.level[edge.source] + 1
Q.put(edge.target)
return self.level[self.sink] is not None
def _dfs(self, node, start_capacity):
"""A DFS based function to send flow after BFS has figured out
that there is a possible flow. Levels were constructed during BFS."""
if node == self.sink:
return start_capacity
for edge in self.residual.iteroutedges(node):
cap = edge.weight - self.flow[edge.source][edge.target]
if (self.level[edge.target] == self.level[edge.source] + 1) and cap > 0:
min_capacity = min(start_capacity, cap)
min_capacity = self._dfs(edge.target, min_capacity)
if min_capacity > 0:
# Zapisujemy przeplyw przy wychodzeniu z rekurencji.
self.flow[edge.source][edge.target] += min_capacity
self.flow[edge.target][edge.source] -= min_capacity
return min_capacity
return 0
# EOF
| 37.014706 | 84 | 0.576083 | 907 | 7,551 | 4.721058 | 0.158765 | 0.051378 | 0.028024 | 0.029426 | 0.955628 | 0.955628 | 0.94255 | 0.93461 | 0.93461 | 0.93461 | 0 | 0.004703 | 0.324195 | 7,551 | 203 | 85 | 37.197044 | 0.834411 | 0.258376 | 0 | 0.905983 | 0 | 0 | 0.020974 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.068376 | false | 0 | 0.034188 | 0 | 0.188034 | 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 |
003d931fc7fbdcdd2e3f04c8fdc2ca26aee00ddd | 4,776 | py | Python | astk/cli/draw.py | huang-sh/astk | 8837a28b1dc80a43445d5fca8f0972ed4e23449d | [
"BSD-3-Clause"
] | null | null | null | astk/cli/draw.py | huang-sh/astk | 8837a28b1dc80a43445d5fca8f0972ed4e23449d | [
"BSD-3-Clause"
] | null | null | null | astk/cli/draw.py | huang-sh/astk | 8837a28b1dc80a43445d5fca8f0972ed4e23449d | [
"BSD-3-Clause"
] | null | null | null | from .config import *
from astk import draw
@click.command(help="Gene Set Enrichment Analysis ploting")
@click.option('-id', '--id', "termid", cls=MultiOption, type=tuple,
required=True, help="term id")
@click.option('-o', '--output', help="output figure path")
@click.option('-rd', '--RData', help="output figure path")
@click.option('-fmt', '--format', "fmt", type=click.Choice(['png', 'pdf', 'pptx']),
default="png", help="out figure format")
@click.option('-w', '--width', default=6, help="fig width, default=6 inches")
@click.option('-h', '--height', default=6, help="fig height, default=6 inches")
@click.option('-res', '--resolution', default=72, help="resolution, default=72 ppi")
def gseplot(*args, **kwargs):
draw.gseplot(*args, **kwargs)
@click.command(help="draw UpSet plots for AS events")
@click.argument('files', nargs=-1, type=click.Path(exists=True), required=True)
@click.option('-o', '--output', required=True, help="output figure path")
@click.option('-xl', '--xlabel', cls=MultiOption, type=tuple,
help="x xlabel")
@click.option('-dg', '--dg', is_flag=True, default = False,
help=("This flag is present then a dpsi file will divide "
"two part according to |dpsi| > 0 and |dpsi| < 0"))
@click.option('-fmt', '--format', "fmt", type=click.Choice(['png', 'pdf', 'pptx']),
default="png", help="out figure format")
@click.option('-w', '--width', default=6, help="fig width, default=6 inches")
@click.option('--height', default=6, help="fig height, default=6 inches")
@click.option('-res', '--resolution', default=72, help="resolution, default=72 ppi")
def upset(*args, **kwargs):
draw.upset(*args, **kwargs)
@click.command(help="Volcano plot analysis for dPSI")
@click.argument('file', type=click.Path(exists=True), required=True)
@click.option('-o', '--output', help="output path")
@click.option('-fmt', '--format', "fmt", type=click.Choice(['png', 'pdf', 'pptx']),
default="png", help="out figure format")
@click.option('-w', '--width', default=6, help="fig width, default=6 inches")
@click.option('-h', '--height', default=6, help="fig height, default=6 inches")
@click.option('-res', '--resolution', default=72, help="resolution, default=72 ppi")
def volcano(*args, **kwargs):
draw.volcano(*args, **kwargs)
@click.command(help="PCA analysis for PSI")
@click.argument('files', nargs=-1, type=click.Path(exists=True), required=True)
@click.option('-o', '--output', required=True, help="figure output path")
@click.option('-fmt', '--format', "fmt", type=click.Choice(['png', 'pdf', 'pptx']),
default="png", help="out figure format")
@click.option('-w', '--width', default=6, help="fig width, default=6 inches")
@click.option('-h', '--height', default=6, help="fig height, default=6 inches")
@click.option('-res', '--resolution', default=72, help="resolution, default=72 ppi")
def pca(*args, **kwargs):
draw.pca(*args, **kwargs)
@click.command(help="Heatmap plot for PSI")
@click.argument('files', nargs=-1, type=click.Path(exists=True), required=True)
@click.option('-o', '--output', required=True, help="figure output path")
@click.option('-cls', '--cluster', type=click.Path(exists=True),
help="cluster information file")
@click.option('-fmt', '--format', "fmt", type=click.Choice(['png', 'pdf', 'pptx']),
default="png", help="out figure format")
@click.option('-w', '--width', default=6, help="fig width, default=6 inches")
@click.option('-h', '--height', default=6, help="fig height, default=6 inches")
@click.option('-res', '--resolution', default=72, help="resolution, default=72 ppi")
def heatmap(*args, **kwargs):
draw.heatmap(*args, **kwargs)
@click.command(help="barplot ")
@click.argument('files', nargs=-1, type=click.Path(exists=True), required=True)
@click.option('-o', '--output', required=True, help="output path")
@click.option('-xl', '--xlabel', cls=MultiOption, type=tuple, default=(),
help="input dpsi names")
@click.option('-dg', '--dg', is_flag=True, default = False,
help=("This flag is present then a dpsi file will divide "
"two part according to |dpsi| > 0 and |dpsi| < 0"))
@click.option('-fmt', '--format', "fmt", type=click.Choice(['png', 'pdf', 'pptx']),
default="png", help="out figure format")
@click.option('-w', '--width', default=8, help="fig width, default=8 inches")
@click.option('-h', '--height', default=4, help="fig height, default=4 inches")
@click.option('-res', '--resolution', default=72, help="resolution, default=72 ppi")
def barplot(*args, **kwargs):
draw.barplot(*args, **kwargs)
| 54.272727 | 90 | 0.627931 | 638 | 4,776 | 4.697492 | 0.148903 | 0.135802 | 0.068068 | 0.05005 | 0.822155 | 0.771104 | 0.735736 | 0.735736 | 0.735736 | 0.705038 | 0 | 0.01378 | 0.149079 | 4,776 | 87 | 91 | 54.896552 | 0.723671 | 0 | 0 | 0.513158 | 0 | 0 | 0.340243 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.078947 | true | 0 | 0.026316 | 0 | 0.105263 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
004a91f6556f492a3129a2a072ca584774ba9dd1 | 136 | py | Python | anatmatch/tests/utils.py | snastase/anat-match | 39a27ab629eff737b55de29b23bc044ff2d58495 | [
"Apache-2.0"
] | 1 | 2018-06-14T06:35:54.000Z | 2018-06-14T06:35:54.000Z | anatmatch/tests/utils.py | snastase/anat-match | 39a27ab629eff737b55de29b23bc044ff2d58495 | [
"Apache-2.0"
] | 2 | 2018-06-14T06:37:25.000Z | 2018-06-18T08:43:03.000Z | anatmatch/tests/utils.py | snastase/anat-match | 39a27ab629eff737b55de29b23bc044ff2d58495 | [
"Apache-2.0"
] | 1 | 2018-06-14T06:35:35.000Z | 2018-06-14T06:35:35.000Z | """
Utilities for testing
"""
from os.path import join, dirname
def get_test_data_path():
return join(dirname(__file__), 'data')
| 13.6 | 42 | 0.705882 | 19 | 136 | 4.684211 | 0.789474 | 0.247191 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.161765 | 136 | 9 | 43 | 15.111111 | 0.780702 | 0.154412 | 0 | 0 | 0 | 0 | 0.037383 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | true | 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 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 8 |
cc59fc7ece834ee8c31c9eb32c68e71330816dda | 33 | py | Python | tsundoku/blueprints/ux/__init__.py | fossabot/Tsundoku | 45ed2492ca003130e1b32a64127ee5cb79404089 | [
"MIT"
] | null | null | null | tsundoku/blueprints/ux/__init__.py | fossabot/Tsundoku | 45ed2492ca003130e1b32a64127ee5cb79404089 | [
"MIT"
] | null | null | null | tsundoku/blueprints/ux/__init__.py | fossabot/Tsundoku | 45ed2492ca003130e1b32a64127ee5cb79404089 | [
"MIT"
] | null | null | null | from .routes import ux_blueprint
| 16.5 | 32 | 0.848485 | 5 | 33 | 5.4 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.121212 | 33 | 1 | 33 | 33 | 0.931034 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 1 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | 7 |
cc67f38367177137c93179b23c18ee9c83ff292d | 20,003 | py | Python | python/swagger_client/api/providers_api.py | alextselegidis/easyappointments-sdk | 8ba969dc1221ea614b70d4d52313f20fc85df1e1 | [
"CC-BY-3.0"
] | null | null | null | python/swagger_client/api/providers_api.py | alextselegidis/easyappointments-sdk | 8ba969dc1221ea614b70d4d52313f20fc85df1e1 | [
"CC-BY-3.0"
] | null | null | null | python/swagger_client/api/providers_api.py | alextselegidis/easyappointments-sdk | 8ba969dc1221ea614b70d4d52313f20fc85df1e1 | [
"CC-BY-3.0"
] | null | null | null | # coding: utf-8
"""
Easy!Appointments API
These are the OpenAPI specs that describe the REST API of Easy!Appointments. # noqa: E501
OpenAPI spec version: 1.0.0
Contact: info@easyappointments.org
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import re # noqa: F401
# python 2 and python 3 compatibility library
import six
from swagger_client.api_client import ApiClient
class ProvidersApi(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
Ref: https://github.com/swagger-api/swagger-codegen
"""
def __init__(self, api_client=None):
if api_client is None:
api_client = ApiClient()
self.api_client = api_client
def providers_get(self, **kwargs): # noqa: E501
"""Get all providers # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.providers_get(async_req=True)
>>> result = thread.get()
:param async_req bool
:param int page:
:param int length:
:param str sort:
:param str q:
:param str fields:
:param str _with:
:return: ProviderCollection
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.providers_get_with_http_info(**kwargs) # noqa: E501
else:
(data) = self.providers_get_with_http_info(**kwargs) # noqa: E501
return data
def providers_get_with_http_info(self, **kwargs): # noqa: E501
"""Get all providers # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.providers_get_with_http_info(async_req=True)
>>> result = thread.get()
:param async_req bool
:param int page:
:param int length:
:param str sort:
:param str q:
:param str fields:
:param str _with:
:return: ProviderCollection
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['page', 'length', 'sort', 'q', 'fields', '_with'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method providers_get" % key
)
params[key] = val
del params['kwargs']
collection_formats = {}
path_params = {}
query_params = []
if 'page' in params:
query_params.append(('page', params['page'])) # noqa: E501
if 'length' in params:
query_params.append(('length', params['length'])) # noqa: E501
if 'sort' in params:
query_params.append(('sort', params['sort'])) # noqa: E501
if 'q' in params:
query_params.append(('q', params['q'])) # noqa: E501
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
if '_with' in params:
query_params.append(('with', params['_with'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['BasicAuth', 'BearerToken'] # noqa: E501
return self.api_client.call_api(
'/providers', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='ProviderCollection', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def providers_post(self, body, **kwargs): # noqa: E501
"""Create a provider # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.providers_post(body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param ProviderPayload body: (required)
:return: ProviderRecord
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.providers_post_with_http_info(body, **kwargs) # noqa: E501
else:
(data) = self.providers_post_with_http_info(body, **kwargs) # noqa: E501
return data
def providers_post_with_http_info(self, body, **kwargs): # noqa: E501
"""Create a provider # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.providers_post_with_http_info(body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param ProviderPayload body: (required)
:return: ProviderRecord
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method providers_post" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling `providers_post`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['BasicAuth', 'BearerToken'] # noqa: E501
return self.api_client.call_api(
'/providers', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='ProviderRecord', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def providers_provider_id_delete(self, provider_id, **kwargs): # noqa: E501
"""Delete a provider # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.providers_provider_id_delete(provider_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param int provider_id: (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.providers_provider_id_delete_with_http_info(provider_id, **kwargs) # noqa: E501
else:
(data) = self.providers_provider_id_delete_with_http_info(provider_id, **kwargs) # noqa: E501
return data
def providers_provider_id_delete_with_http_info(self, provider_id, **kwargs): # noqa: E501
"""Delete a provider # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.providers_provider_id_delete_with_http_info(provider_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param int provider_id: (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['provider_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method providers_provider_id_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'provider_id' is set
if ('provider_id' not in params or
params['provider_id'] is None):
raise ValueError("Missing the required parameter `provider_id` when calling `providers_provider_id_delete`") # noqa: E501
collection_formats = {}
path_params = {}
if 'provider_id' in params:
path_params['providerId'] = params['provider_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['BasicAuth', 'BearerToken'] # noqa: E501
return self.api_client.call_api(
'/providers/{providerId}', 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def providers_provider_id_get(self, provider_id, **kwargs): # noqa: E501
"""Get a provider # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.providers_provider_id_get(provider_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param int provider_id: (required)
:return: ProviderRecord
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.providers_provider_id_get_with_http_info(provider_id, **kwargs) # noqa: E501
else:
(data) = self.providers_provider_id_get_with_http_info(provider_id, **kwargs) # noqa: E501
return data
def providers_provider_id_get_with_http_info(self, provider_id, **kwargs): # noqa: E501
"""Get a provider # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.providers_provider_id_get_with_http_info(provider_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param int provider_id: (required)
:return: ProviderRecord
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['provider_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method providers_provider_id_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'provider_id' is set
if ('provider_id' not in params or
params['provider_id'] is None):
raise ValueError("Missing the required parameter `provider_id` when calling `providers_provider_id_get`") # noqa: E501
collection_formats = {}
path_params = {}
if 'provider_id' in params:
path_params['providerId'] = params['provider_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['BasicAuth', 'BearerToken'] # noqa: E501
return self.api_client.call_api(
'/providers/{providerId}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='ProviderRecord', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def providers_provider_id_put(self, body, provider_id, **kwargs): # noqa: E501
"""Update a provider # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.providers_provider_id_put(body, provider_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param ProviderPayload body: (required)
:param int provider_id: (required)
:return: ProviderRecord
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.providers_provider_id_put_with_http_info(body, provider_id, **kwargs) # noqa: E501
else:
(data) = self.providers_provider_id_put_with_http_info(body, provider_id, **kwargs) # noqa: E501
return data
def providers_provider_id_put_with_http_info(self, body, provider_id, **kwargs): # noqa: E501
"""Update a provider # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.providers_provider_id_put_with_http_info(body, provider_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param ProviderPayload body: (required)
:param int provider_id: (required)
:return: ProviderRecord
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['body', 'provider_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method providers_provider_id_put" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling `providers_provider_id_put`") # noqa: E501
# verify the required parameter 'provider_id' is set
if ('provider_id' not in params or
params['provider_id'] is None):
raise ValueError("Missing the required parameter `provider_id` when calling `providers_provider_id_put`") # noqa: E501
collection_formats = {}
path_params = {}
if 'provider_id' in params:
path_params['providerId'] = params['provider_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['BasicAuth', 'BearerToken'] # noqa: E501
return self.api_client.call_api(
'/providers/{providerId}', 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='ProviderRecord', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
| 37.670433 | 134 | 0.605209 | 2,262 | 20,003 | 5.087975 | 0.074713 | 0.060822 | 0.041272 | 0.03128 | 0.933443 | 0.915631 | 0.908246 | 0.894344 | 0.88913 | 0.880876 | 0 | 0.015471 | 0.302005 | 20,003 | 530 | 135 | 37.741509 | 0.808838 | 0.302505 | 0 | 0.768421 | 0 | 0 | 0.184495 | 0.045677 | 0 | 0 | 0 | 0 | 0 | 1 | 0.038596 | false | 0 | 0.014035 | 0 | 0.108772 | 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 |
cc7c178d05bd0ab5c30623767581cfc5e0e0b3ef | 1,058 | py | Python | python/mocores/core/util/identity.py | jstzwj/Mocores | 20edb714b7cdd544a3687ec491434eb6be5ff681 | [
"MIT"
] | 1 | 2017-03-10T14:40:03.000Z | 2017-03-10T14:40:03.000Z | python/mocores/core/util/identity.py | toyteam/Mocores | 20edb714b7cdd544a3687ec491434eb6be5ff681 | [
"MIT"
] | null | null | null | python/mocores/core/util/identity.py | toyteam/Mocores | 20edb714b7cdd544a3687ec491434eb6be5ff681 | [
"MIT"
] | null | null | null |
class ClientID(object):
def __init__(self, ip, port, start_time):
self.ip = ip
self.port = port
self.start_time = start_time
def to_string(self):
return '{0}:{1}:{2}'.format(
str(self.ip),
str(self.port),
str(self.start_time))
def hash(self):
id = self.to_string()
hash = 0
for c in id:
hash = hash + ord(c)
hash = hash % (2^32)
return hash
class WorkerID(object):
def __init__(self, ip, port, start_time):
self.ip = ip
self.port = port
self.start_time = start_time
def to_string(self):
return '{0}:{1}:{2}'.format(
str(self.ip),
str(self.port),
str(self.start_time))
def hash(self):
id = self.to_string()
hash = 0
for c in id:
hash = hash + ord(c)
hash = hash % (2^32)
return hash
def parse_node_id(id):
info = id.split(':')
return NodeID(info[0], info[1], info[2]) | 23.511111 | 45 | 0.495274 | 142 | 1,058 | 3.535211 | 0.21831 | 0.143426 | 0.103586 | 0.067729 | 0.840637 | 0.840637 | 0.840637 | 0.840637 | 0.840637 | 0.840637 | 0 | 0.025602 | 0.372401 | 1,058 | 45 | 46 | 23.511111 | 0.730422 | 0 | 0 | 0.864865 | 0 | 0 | 0.021739 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.189189 | false | 0 | 0 | 0.054054 | 0.378378 | 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 |
cca08276fe9ee7f5b35114f57feb8620b18e8ad7 | 5,558 | py | Python | TextBoxSeg/segmentron/data/dataloader/seg_data_base.py | weijiawu/Unconstrained-Text-Detection-with-Box-Supervisionand-Dynamic-Self-Training | b4954e20a3ce0c5b97e8d992c4282b97c7a8c1f0 | [
"Apache-1.1"
] | 31 | 2020-11-26T02:10:11.000Z | 2022-03-14T06:21:46.000Z | TextBoxSeg/segmentron/data/dataloader/seg_data_base.py | weijiawu/Unconstrained-Text-Detection-with-Box-Supervisionand-Dynamic-Self-Training | b4954e20a3ce0c5b97e8d992c4282b97c7a8c1f0 | [
"Apache-1.1"
] | 4 | 2020-11-25T18:34:46.000Z | 2021-04-29T03:10:38.000Z | TextBoxSeg/segmentron/data/dataloader/seg_data_base.py | weijiawu/Unconstrained-Text-Detection-with-Box-Supervisionand-Dynamic-Self-Training | b4954e20a3ce0c5b97e8d992c4282b97c7a8c1f0 | [
"Apache-1.1"
] | 3 | 2020-11-30T16:25:16.000Z | 2022-01-14T12:39:37.000Z | """Base segmentation dataset"""
import os
import random
import numpy as np
import torchvision
import cv2
from PIL import Image, ImageOps, ImageFilter
from ...config import cfg
__all__ = ['SegmentationDataset']
class SegmentationDataset(object):
"""Segmentation Base Dataset"""
def __init__(self, root, split, mode, transform, base_size=(128,32)):
super(SegmentationDataset, self).__init__()
self.root = os.path.join(cfg.ROOT_PATH, root)
self.transform = transform
self.split = split
self.mode = mode if mode is not None else split
self.base_size = base_size
self.color_jitter = self._get_color_jitter()
def to_tuple(self, size):
if isinstance(size, (list, tuple)):
return tuple(size)
elif isinstance(size, (int, float)):
return tuple((size, size))
else:
raise ValueError('Unsupport datatype: {}'.format(type(size)))
def _get_color_jitter(self):
color_jitter = cfg.AUG.COLOR_JITTER
if color_jitter is None:
return None
if isinstance(color_jitter, (list, tuple)):
# color jitter should be a 3-tuple/list if spec brightness/contrast/saturation
# or 4 if also augmenting hue
assert len(color_jitter) in (3, 4)
else:
# if it's a scalar, duplicate for brightness, contrast, and saturation, no hue
color_jitter = (float(color_jitter),) * 3
return torchvision.transforms.ColorJitter(*color_jitter)
def _val_sync_transform(self, img, mask):
short_size = self.base_size
img = img.resize(short_size, Image.BILINEAR)
mask = mask.resize(short_size, Image.NEAREST)
# final transform
img, mask = self._img_transform(img), self._mask_transform(mask)
return img, mask
def _sync_transform(self, img, mask):
short_size = self.base_size
img = img.resize(short_size, Image.BILINEAR)
mask = mask.resize(short_size, Image.NEAREST)
# final transform
img, mask = self._img_transform(img), self._mask_transform(mask)
return img, mask
def _img_transform(self, img):
return np.array(img)
def _mask_transform(self, mask):
return np.array(mask).astype('int32')
@property
def num_class(self):
"""Number of categories."""
return self.NUM_CLASS
@property
def pred_offset(self):
return 0
def scale_image(img, scale=32):
resize_h, resize_w = img.height, img.width
short_line = min(resize_h,resize_w)
scale_1 = 64.0 / short_line
resize_h, resize_w = int(resize_h*scale_1), int(resize_w*scale_1)
resize_h = resize_h if resize_h % scale == 0 else int(resize_h / scale) * scale
resize_w = resize_w if resize_w % scale == 0 else int(resize_w / scale) * scale
resize_w = max(scale,resize_w)
resize_h = max(scale,resize_h)
img = img.resize((resize_w,resize_h))
return img
class SegmentationDataset_total(object):
"""Segmentation Base Dataset"""
def __init__(self, root, split, mode, transform, base_size=(128,128)):
super(SegmentationDataset_total, self).__init__()
self.root = os.path.join(cfg.ROOT_PATH, root)
self.transform = transform
self.split = split
self.mode = mode if mode is not None else split
self.base_size = base_size
self.color_jitter = self._get_color_jitter()
def to_tuple(self, size):
if isinstance(size, (list, tuple)):
return tuple(size)
elif isinstance(size, (int, float)):
return tuple((size, size))
else:
raise ValueError('Unsupport datatype: {}'.format(type(size)))
def _get_color_jitter(self):
color_jitter = cfg.AUG.COLOR_JITTER
if color_jitter is None:
return None
if isinstance(color_jitter, (list, tuple)):
# color jitter should be a 3-tuple/list if spec brightness/contrast/saturation
# or 4 if also augmenting hue
assert len(color_jitter) in (3, 4)
else:
# if it's a scalar, duplicate for brightness, contrast, and saturation, no hue
color_jitter = (float(color_jitter),) * 3
return torchvision.transforms.ColorJitter(*color_jitter)
def _val_sync_transform(self, img, mask, skeleton):
short_size = self.base_size
# img = scale_image(img)
# mask = scale_image(mask)
skeleton = cv2.resize(skeleton,short_size)
img = img.resize(short_size, Image.BILINEAR)
mask = mask.resize(short_size, Image.NEAREST)
# final transform
img, mask = self._img_transform(img), self._mask_transform(mask)
return img, mask, skeleton
def _sync_transform(self, img, mask, skeleton):
short_size = self.base_size
# img = scale_image(img)
# mask = scale_image(mask)
skeleton = cv2.resize(skeleton, short_size)
img = img.resize(short_size, Image.BILINEAR)
mask = mask.resize(short_size, Image.NEAREST)
# final transform
img, mask = self._img_transform(img), self._mask_transform(mask)
return img, mask, skeleton
def _img_transform(self, img):
return np.array(img)
def _mask_transform(self, mask):
return np.array(mask).astype('int32')
@property
def num_class(self):
"""Number of categories."""
return self.NUM_CLASS
@property
def pred_offset(self):
return 0 | 34.09816 | 90 | 0.640518 | 721 | 5,558 | 4.726768 | 0.159501 | 0.077465 | 0.035211 | 0.046948 | 0.834507 | 0.823357 | 0.823357 | 0.823357 | 0.823357 | 0.823357 | 0 | 0.009725 | 0.259986 | 5,558 | 163 | 91 | 34.09816 | 0.818867 | 0.116229 | 0 | 0.747826 | 0 | 0 | 0.014977 | 0 | 0 | 0 | 0 | 0 | 0.017391 | 1 | 0.165217 | false | 0 | 0.06087 | 0.052174 | 0.426087 | 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 |
aeaffc997834fd33fe6e40cda3d9da66bbe7801b | 20,682 | py | Python | test/utils/test_draw.py | saurabhya/kornia | f2b4fe9fb32d99795783f25b5a4c561001783ebf | [
"ECL-2.0",
"Apache-2.0"
] | 418 | 2018-10-02T22:31:36.000Z | 2019-01-16T14:15:45.000Z | test/utils/test_draw.py | saurabhya/kornia | f2b4fe9fb32d99795783f25b5a4c561001783ebf | [
"ECL-2.0",
"Apache-2.0"
] | 94 | 2019-01-17T22:10:45.000Z | 2019-05-22T23:47:58.000Z | test/utils/test_draw.py | saurabhya/kornia | f2b4fe9fb32d99795783f25b5a4c561001783ebf | [
"ECL-2.0",
"Apache-2.0"
] | 25 | 2018-10-02T22:50:04.000Z | 2019-01-13T18:14:11.000Z | import math
import pytest
import torch
from kornia.testing import assert_close
from kornia.utils import create_meshgrid, draw_convex_polygon, draw_rectangle
from kornia.utils.draw import draw_line
class TestDrawLine:
def test_draw_line_vertical(self, dtype, device):
"""Test drawing a vertical line."""
img = torch.zeros(1, 8, 8, dtype=dtype, device=device)
img = draw_line(img, torch.tensor([6, 2]), torch.tensor([6, 0]), torch.tensor([255]))
img_mask = torch.tensor(
[
[
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 255.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 255.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 255.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
]
],
device=device,
dtype=dtype,
)
assert_close(img, img_mask)
def test_draw_line_horizontal(self, dtype, device):
"""Test drawing a horizontal line."""
img = torch.zeros(1, 8, 8, dtype=dtype, device=device)
img = draw_line(img, torch.tensor([6, 4]), torch.tensor([0, 4]), torch.tensor([255]))
img_mask = torch.tensor(
[
[
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[255.0, 255.0, 255.0, 255.0, 255.0, 255.0, 255.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
]
],
device=device,
dtype=dtype,
)
assert_close(img, img_mask)
def test_draw_line_with_big_coordinates(self, dtype, device):
"""Test drawing a line with big coordinates."""
img = torch.zeros(1, 500, 500, dtype=dtype, device=device)
img = draw_line(img, torch.tensor([200, 200]), torch.tensor([400, 200]), torch.tensor([255]))
img_mask = torch.zeros(1, 500, 500, dtype=dtype, device=device)
img_mask[:, 200, 200:401] = 255
assert_close(img, img_mask)
def test_draw_line_m_lte_neg1(self, dtype, device):
"""Test drawing a line with m <= -1."""
img = torch.zeros(1, 8, 8, dtype=dtype, device=device)
img = draw_line(img, torch.tensor([0, 7]), torch.tensor([6, 0]), torch.tensor([255]))
img_mask = torch.tensor(
[
[
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 255.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 255.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 255.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 255.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 255.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 255.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 255.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[255.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
]
],
device=device,
dtype=dtype,
)
assert_close(img, img_mask)
def test_draw_line_m_lt_0_gte_neg1(self, dtype, device):
"""Test drawing a line with -1 < m < 0."""
img = torch.zeros(1, 8, 8, dtype=dtype, device=device)
img = draw_line(img, torch.tensor([1, 5]), torch.tensor([7, 0]), torch.tensor([255]))
img_mask = torch.tensor(
[
[
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 255.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 255.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 255.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 255.0, 255.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 255.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 255.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
]
],
device=device,
dtype=dtype,
)
assert_close(img, img_mask)
def test_draw_line_m_gt_0_lt_1(self, dtype, device):
"""Test drawing a line with 0 < m < 1."""
img = torch.zeros(1, 8, 8, dtype=dtype, device=device)
img = draw_line(img, torch.tensor([0, 0]), torch.tensor([6, 2]), torch.tensor([255]))
img_mask = torch.tensor(
[
[
[255.0, 255.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 255.0, 255.0, 255.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 255.0, 255.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
]
],
device=device,
dtype=dtype,
)
assert_close(img, img_mask)
def test_draw_line_m_gte_1(self, dtype, device):
"""Test drawing a line with m >= 1."""
img = torch.zeros(1, 8, 8, dtype=dtype, device=device)
img = draw_line(img, torch.tensor([3, 7]), torch.tensor([1, 4]), torch.tensor([255]))
img_mask = torch.tensor(
[
[
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 255.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 255.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 255.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 255.0, 0.0, 0.0, 0.0, 0.0],
]
],
device=device,
dtype=dtype,
)
assert_close(img, img_mask)
@pytest.mark.parametrize(
'p1', [torch.tensor([-1, 0]), torch.tensor([0, -1]), torch.tensor([8, 0]), torch.tensor([0, 8])]
)
def test_p1_out_of_bounds(self, p1, dtype, device):
"""Tests that an exception is raised if p1 is out of bounds."""
img = torch.zeros(1, 8, 8, dtype=dtype, device=device)
with pytest.raises(ValueError) as excinfo:
draw_line(img, p1, torch.tensor([0, 0]), torch.tensor([255]))
assert 'p1 is out of bounds.' == str(excinfo.value)
@pytest.mark.parametrize(
'p2', [torch.tensor([-1, 0]), torch.tensor([0, -1]), torch.tensor([8, 0]), torch.tensor([0, 8])]
)
def test_p2_out_of_bounds(self, p2, dtype, device):
"""Tests that an exception is raised if p2 is out of bounds."""
img = torch.zeros(1, 8, 8, dtype=dtype, device=device)
with pytest.raises(ValueError) as excinfo:
draw_line(img, torch.tensor([0, 0]), p2, torch.tensor([255]))
assert 'p2 is out of bounds.' == str(excinfo.value)
@pytest.mark.parametrize('img_size', [(200, 100), (32, 3, 20, 20)])
def test_image_size(self, img_size, dtype, device):
img = torch.zeros(*img_size, dtype=dtype, device=device)
with pytest.raises(ValueError) as excinfo:
draw_line(img, torch.tensor([0, 0]), torch.tensor([1, 1]), torch.tensor([255]))
assert 'image must have 3 dimensions (C,H,W).' == str(excinfo.value)
@pytest.mark.parametrize('img_size,color', [((1, 8, 8), torch.tensor([23, 53])), ((3, 8, 8), torch.tensor([255]))])
def test_color_image_channel_size(self, img_size, color, dtype, device):
img = torch.zeros(*img_size, dtype=dtype, device=device)
with pytest.raises(ValueError) as excinfo:
draw_line(img, torch.tensor([0, 0]), torch.tensor([1, 1]), color)
assert 'color must have the same number of channels as the image.' == str(excinfo.value)
@pytest.mark.parametrize(
'p1,p2',
[
((0, 1), (1, 5, 2)),
((0, 1, 2), (1, 5)),
(torch.tensor([0, 1]), torch.tensor([0, 2, 3])),
(torch.tensor([0, 1, 5]), torch.tensor([0, 2])),
],
)
def test_point_size(self, p1, p2, dtype, device):
img = torch.zeros(1, 8, 8, dtype=dtype, device=device)
with pytest.raises(ValueError) as excinfo:
draw_line(img, p1, p2, torch.tensor([255]))
assert 'p1 and p2 must have length 2.' == str(excinfo.value)
class TestDrawRectangle:
@pytest.mark.parametrize('batch', (4, 17))
@pytest.mark.parametrize('color', (torch.Tensor([1.0]), torch.Tensor([0.5])))
def test_smoke(self, device, batch, color):
black_image = torch.zeros(batch, 1, 3, 3, device=device) # 1 channel 3x3 black_image
points = torch.tensor([1.0, 1.0, 1.0, 1.0]).to(device).expand(batch, 1, 4) # single pixel rectangle
draw_rectangle(black_image, points, color=color)
target = torch.zeros(batch, 1, 3, 3, device=device)
target[:, :, 1, 1] = color
assert torch.all(black_image == target)
@pytest.mark.parametrize('batch', (8, 11))
@pytest.mark.parametrize('fill', (True, False))
@pytest.mark.parametrize('height', (12, 106, 298))
@pytest.mark.parametrize('width', (7, 123, 537))
def test_fill_and_edges(self, device, batch, fill, height, width):
black_image = torch.zeros(batch, 3, height, width, device=device)
# we should pass height - 1 and width - 1 but rectangle should clip correctly
points = torch.tensor([0, 0, width, height]).to(device).expand(batch, 1, 4)
image_w_rectangle = draw_rectangle(black_image, points, color=torch.tensor([1.0]), fill=fill)
assert image_w_rectangle is black_image
if fill:
assert image_w_rectangle.sum() == batch * 3 * height * width
else:
# corners are double counted
assert image_w_rectangle.sum() == batch * 3 * (2 * height + 2 * width - 4)
@pytest.mark.parametrize('batch', (4, 6))
@pytest.mark.parametrize('N', (5, 12))
@pytest.mark.parametrize('fill', (True, False))
def test_n_rectangles(self, device, batch, N, fill):
points_list = []
h, w = 20, 20
for b in range(batch):
points_list.append([])
for n in range(N):
points_list[b].append([])
points_list[b][n].append(int(torch.randint(0, w - 1, (1,))))
points_list[b][n].append(int(torch.randint(0, h - 1, (1,))))
points_list[b][n].append(int(torch.randint(points_list[b][n][-2] + 1, w, (1,))))
points_list[b][n].append(int(torch.randint(points_list[b][n][-2] + 1, h, (1,))))
points = torch.tensor(points_list, device=device)
random_background = torch.rand(batch, 3, h, w, device=device)
random_w_rectangle = random_background.clone()
draw_rectangle(random_w_rectangle, points, color=torch.tensor([1.0, 1.0, 1.0]), fill=fill)
for b in range(batch):
for n in range(N):
if fill:
assert (
random_w_rectangle[
b,
:,
points_list[b][n][1] : points_list[b][n][3] + 1,
points_list[b][n][0] : points_list[b][n][2] + 1,
].sum()
== (points_list[b][n][3] - points_list[b][n][1] + 1)
* (points_list[b][n][2] - points_list[b][n][0] + 1)
* 3
)
else:
assert (
random_w_rectangle[
b, :, points_list[b][n][1] : points_list[b][n][3] + 1, points_list[b][n][0]
].sum()
== (points_list[b][n][3] - points_list[b][n][1] + 1) * 3
)
assert (
random_w_rectangle[
b, :, points_list[b][n][1] : points_list[b][n][3] + 1, points_list[b][n][2]
].sum()
== (points_list[b][n][3] - points_list[b][n][1] + 1) * 3
)
assert (
random_w_rectangle[
b, :, points_list[b][n][1], points_list[b][n][0] : points_list[b][n][2] + 1
].sum()
== (points_list[b][n][2] - points_list[b][n][0] + 1) * 3
)
assert (
random_w_rectangle[
b, :, points_list[b][n][1], points_list[b][n][0] : points_list[b][n][2] + 1
].sum()
== (points_list[b][n][2] - points_list[b][n][0] + 1) * 3
)
@pytest.mark.parametrize('color', (torch.tensor([0.5, 0.3, 0.15]), torch.tensor([0.23, 0.33, 0.8])))
def test_color_background(self, device, color):
image = torch.zeros(1, 3, 40, 40, device=device)
image[:, 0, :, :] = color[0]
image[:, 1, :, :] = color[1]
image[:, 2, :, :] = color[2]
image_w_rectangle = image.clone()
p1 = (1, 5)
p2 = (30, 39)
points = torch.tensor([[[p1[1], p1[0], p2[1], p2[0]]]], device=device)
draw_rectangle(image_w_rectangle, points, color=torch.tensor([1.0]))
assert (
torch.abs(
(image_w_rectangle - image).sum()
- (1 - color[0]) * (2 * (p2[0] - p1[0] + 1) + 2 * (p2[1] - p1[1] + 1) - 4)
- (1 - color[1]) * (2 * (p2[0] - p1[0] + 1) + 2 * (p2[1] - p1[1] + 1) - 4)
- (1 - color[2]) * (2 * (p2[0] - p1[0] + 1) + 2 * (p2[1] - p1[1] + 1) - 4)
)
<= 0.0001
)
@pytest.mark.parametrize('color', (torch.tensor([0.34, 0.63, 0.16]), torch.tensor([0.29, 0.13, 0.48])))
def test_color_foreground(self, device, color):
image = torch.zeros(1, 3, 50, 40, device=device)
image_w_rectangle = image.clone()
p1 = (10, 4)
p2 = (11, 40)
points = torch.tensor([[[p1[1], p1[0], p2[1], p2[0]]]], device=device)
draw_rectangle(image_w_rectangle, points, color=color)
# corners are double counted, no plus 1 for y since p2[1] of 40 already lies outside of the image
assert (
torch.abs(
(image_w_rectangle - image).sum()
- (color[0]) * (2 * (p2[0] - p1[0] + 1) + 2 * (p2[1] - p1[1]) - 4)
- (color[1]) * (2 * (p2[0] - p1[0] + 1) + 2 * (p2[1] - p1[1]) - 4)
- (color[2]) * (2 * (p2[0] - p1[0] + 1) + 2 * (p2[1] - p1[1]) - 4)
)
<= 0.0001
)
class TestFillConvexPolygon:
def test_circle(self, device, dtype):
b, c, h, w = 1, 3, 500, 500
n = 5000
im = torch.zeros(b, c, h, w, device=device, dtype=dtype)
t = torch.linspace(0, 1, steps=n, device=device, dtype=dtype)[None].expand(b, n)
color = torch.tensor([1, 1, 1], device=device, dtype=dtype)[None].expand(b, c)
x = (2 * math.pi * t).cos()
y = (2 * math.pi * t).sin()
ctr = 200
radius = 200
pts = ctr + radius * torch.stack((x, y), dim=-1)
poly_im = draw_convex_polygon(im, pts, color)
XY = create_meshgrid(h, w, normalized_coordinates=False, device=device, dtype=dtype)
inside = (((XY[..., 1] - ctr) ** 2 + (XY[..., 0] - ctr) ** 2).sqrt() <= radius)[:, None].expand(b, c, h, w)
circ_im = inside * color[..., None, None]
assert (circ_im - poly_im).abs().mean() <= 1e-4
def test_ellipse(self, device, dtype):
b, c, h, w = 1, 3, 500, 500
n = 5000
im = torch.zeros(b, c, h, w, device=device, dtype=dtype)
t = torch.linspace(0, 1, steps=n, device=device, dtype=dtype)[None].expand(b, n)
color = torch.tensor([1, 1, 1], device=device, dtype=dtype)[None].expand(b, c)
lam = 2
x = lam * (2 * math.pi * t).cos()
y = (2 * math.pi * t).sin()
ctr = 200
radius = 100
pts = ctr + radius * torch.stack((x, y), dim=-1)
poly_im = draw_convex_polygon(im, pts, color)
XY = create_meshgrid(h, w, normalized_coordinates=False, device=device, dtype=dtype)
inside = (((XY[..., 1] - ctr) ** 2 + ((XY[..., 0] - ctr) / lam) ** 2).sqrt() <= radius)[:, None].expand(
b, c, h, w
)
ellipse_im = inside * color[..., None, None]
assert (ellipse_im - poly_im).abs().mean() <= 1e-4
def test_rectangle(self, device, dtype):
b, c, h, w = 1, 3, 500, 500
im = torch.zeros(b, c, h, w, device=device, dtype=dtype)
color = torch.tensor([1, 1, 1], device=device, dtype=dtype)[None].expand(b, c)
pts = torch.tensor([[[50, 50], [200, 50], [200, 250], [50, 250]]], device=device, dtype=dtype)
poly_im = draw_convex_polygon(im.clone(), pts, color)
rect = torch.cat((pts[..., 0, :], pts[..., 2, :]), dim=-1)[:, None]
rect_im = draw_rectangle(im.clone(), rect, color[:, None], fill=True)
assert_close(rect_im, poly_im)
def test_batch(self, device, dtype):
im = torch.rand(2, 3, 12, 16, dtype=dtype, device=device)
pts = torch.tensor(
[[[4, 4], [12, 4], [12, 8], [4, 8]], [[0, 0], [4, 0], [4, 4], [0, 4]]], dtype=dtype, device=device
)
color = torch.tensor([[0.5, 0.5, 0.5], [0.5, 0.5, 0.75]], dtype=dtype, device=device)
poly_im = draw_convex_polygon(im.clone(), pts, color)
rect = torch.tensor([[[4, 4, 12, 8]], [[0, 0, 4, 4]]], dtype=dtype, device=device)
rect_im = draw_rectangle(im.clone(), rect, color[:, None], fill=True)
assert_close(rect_im, poly_im)
def test_batch_variable_size(self, device, dtype):
im = torch.rand(2, 3, 12, 16, dtype=dtype, device=device)
pts = [
torch.tensor([[4, 4], [12, 4], [12, 8], [4, 8]], dtype=dtype, device=device),
torch.tensor([[0, 0], [2, 0], [4, 0], [4, 4], [0, 4]], dtype=dtype, device=device),
]
color = torch.tensor([[0.5, 0.5, 0.5], [0.5, 0.5, 0.75]], dtype=dtype, device=device)
poly_im = draw_convex_polygon(im.clone(), pts, color)
rect = torch.tensor([[[4, 4, 12, 8]], [[0, 0, 4, 4]]], dtype=dtype, device=device)
rect_im = draw_rectangle(im.clone(), rect, color[:, None], fill=True)
assert_close(rect_im, poly_im)
def test_batch_color_no_batch(self, device, dtype):
im = torch.rand(2, 3, 12, 16, dtype=dtype, device=device)
pts = [
torch.tensor([[4, 4], [12, 4], [12, 8], [4, 8]], dtype=dtype, device=device),
torch.tensor([[0, 0], [2, 0], [4, 0], [4, 4], [0, 4]], dtype=dtype, device=device),
]
color = torch.tensor([0.5, 0.5, 0.75], dtype=dtype, device=device)
poly_im = draw_convex_polygon(im.clone(), pts, color)
rect = torch.tensor([[[4, 4, 12, 8]], [[0, 0, 4, 4]]], dtype=dtype, device=device)
rect_im = draw_rectangle(im.clone(), rect, color, fill=True)
assert_close(rect_im, poly_im)
def test_out_of_bounds_rectangle(self, device, dtype):
b, c, h, w = 1, 3, 500, 500
im = torch.zeros(b, c, h, w, device=device, dtype=dtype)
color = torch.tensor([1, 1, 1], device=device, dtype=dtype)[None].expand(b, c)
pts = 350 + torch.tensor([[[50, 50], [200, 50], [200, 250], [50, 250]]], device=device, dtype=dtype)
poly_im = draw_convex_polygon(im.clone(), pts, color)
rect = torch.cat((pts[..., 0, :], pts[..., 2, :]), dim=-1)[:, None]
rect_im = draw_rectangle(im.clone(), rect, color[:, None], fill=True)
assert_close(rect_im, poly_im)
pts = -150 + torch.tensor([[[50, 50], [200, 50], [200, 250], [50, 250]]], device=device, dtype=dtype)
poly_im = draw_convex_polygon(im.clone(), pts, color)
rect = torch.cat((pts[..., 0, :], pts[..., 2, :]), dim=-1)[:, None]
rect_im = draw_rectangle(im.clone(), rect, color[:, None], fill=True)
assert_close(rect_im, poly_im)
| 46.791855 | 119 | 0.486897 | 3,219 | 20,682 | 3.043802 | 0.063684 | 0.143499 | 0.202388 | 0.257604 | 0.805675 | 0.77873 | 0.735456 | 0.706981 | 0.671157 | 0.63962 | 0 | 0.120274 | 0.322213 | 20,682 | 441 | 120 | 46.897959 | 0.578685 | 0.029398 | 0 | 0.506527 | 0 | 0 | 0.012185 | 0 | 0 | 0 | 0 | 0 | 0.083551 | 1 | 0.062663 | false | 0 | 0.015666 | 0 | 0.086162 | 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 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
d1aa38d2e78be6a7e853b2709e0710a139e6b692 | 16,807 | py | Python | pykitcommander/picpack/pic24fj128ga705/common/debuginterfaceprovider.py | microchip-pic-avr-tools/pykitcommander | 261fae518b751081d099a8ac8ff1ad64f8808683 | [
"MIT"
] | null | null | null | pykitcommander/picpack/pic24fj128ga705/common/debuginterfaceprovider.py | microchip-pic-avr-tools/pykitcommander | 261fae518b751081d099a8ac8ff1ad64f8808683 | [
"MIT"
] | null | null | null | pykitcommander/picpack/pic24fj128ga705/common/debuginterfaceprovider.py | microchip-pic-avr-tools/pykitcommander | 261fae518b751081d099a8ac8ff1ad64f8808683 | [
"MIT"
] | null | null | null | """
DebugInterfaceProvider
Provides services for interacting with a debug executive variant
"""
import logging
# Primitive definitions
from pyedbglib.primitive import primitives
# ICSP pin value defintions
ICSP_CLK_DIR_ID = 0
ICSP_DATA_DIR_ID = 1
ICSP_CLK_VALUE_ID = 2
ICSP_DATA_VALUE_ID = 3
class PicDebugInterface(object):
"""
Base class for PIC debug interface (interfacing with the debug executive)
"""
# pylint: disable=too-few-public-methods
def __init__(self):
self.logger = logging.getLogger("mplabdeviceprogrammingscript."+__name__)
self.debug_proxy = None
self.hw = None
self.board = None
def initialise(self, resourceprovider):
"""
Creates objects using the resourceprovider given
"""
self.debug_proxy = resourceprovider.debug_interface(self)
self.hw = resourceprovider.pin_driver()
self.board = resourceprovider.board_interface()
class DebugExecApiPic24Vx(PicDebugInterface):
"""
Interaction with this particular implementation of the debug executive
"""
# Useful Debug Executive commands
DE_COMMAND_READ_VERSION = 0x02
DE_COMMAND_READ_DATA = 0x03
DE_COMMAND_WRITE_DATA = 0x04
DE_COMMAND_READ_FLASH = 0x07
DE_COMMAND_WRITE_FLASH = 0x08
DE_COMMAND_READ_PC = 0x0D
DE_COMMAND_RUN = 0x19
DE_COMMAND_STEP = 0x1A
DE_COMMAND_READ_EMU = 0x1C
DE_COMMAND_WRITE_EMU = 0x1D
def __init__(self):
PicDebugInterface.__init__(self)
@staticmethod
def _de_command_3_2(param1, param2):
"""
Header generator for a two parameter command
"""
return bytearray([param1 & 0xFF, (param1 >> 8) & 0xFF, (param1 >> 16) & 0xFF, param2 & 0xFF, (param2 >> 8) & 0xFF])
@staticmethod
def _de_command_4_2(param1, param2):
"""
Header generator for a two parameter command
"""
return bytearray([param1 & 0xFF, (param1 >> 8) & 0xFF, (param1 >> 16) & 0xFF, (param1 >> 24) & 0xFF, param2 & 0xFF, (param2 >> 8) & 0xFF])
def de_command_memory24_write(self, address, length):
"""
Header generator for a memory write command
"""
return self._de_command_3_2(address, length)
def de_command_memory24_read(self, address, length):
"""
Header generator for a memory read command
"""
return self._de_command_3_2(address, length)
def de_command_memory32_write(self, address, length):
"""
Header generator for a memory write command
"""
return self._de_command_4_2(address, length)
def de_command_memory32_read(self, address, length):
"""
Header generator for a memory read command
"""
return self._de_command_4_2(address, length)
def de_command_read_flash(self, address, numbytes):
"""
Read flash: chunks of n bytes
"""
return self.de_command_memory32_read(address, int(numbytes // self.de_read_flash_pack_size()))
def de_read_flash_pack_size(self):
"""
Read package size for flash is 12 bytes
"""
return 12
def read_de_version(self):
"""
DE execute, no bytes in, 3 bytes back out
Version format: major, minor, revision
"""
self.debug_proxy.debug_command(self.DE_COMMAND_READ_VERSION, 0, 3)
def read_ram(self, numbytes):
"""
DE execute, 6 meta-data bytes sent, 0 bytes received)
Meta-data bytes: addrL0, addrL1, addrH0, addrH1, bytesL, bytesH
"""
self.debug_proxy.debug_command(self.DE_COMMAND_READ_DATA, 6, numbytes)
def write_ram(self, numbytes):
"""
DE execute, 6 meta-data bytes + n bytes sent, 0 bytes received)
Meta-data bytes: addrL0, addrL1, addrH0, addrH1, bytesL, bytesH
"""
self.debug_proxy.debug_command(self.DE_COMMAND_WRITE_DATA, numbytes + 6, 0)
def read_emulation(self, numbytes):
"""
DE execute, 5 meta-data bytes sent, 0 bytes received)
Meta-data bytes: addrL0, addrL1, addrH0, wordsL, wordsH
"""
self.debug_proxy.debug_command(self.DE_COMMAND_READ_EMU, 5, numbytes)
def write_emulation(self, numbytes):
"""
DE execute, 5 meta-data bytes + n bytes sent, 0 bytes received)
Meta-data bytes: addrL0, addrL1, addrH0, wordsL, wordsH
"""
self.debug_proxy.debug_command(self.DE_COMMAND_WRITE_EMU, numbytes + 5, 0)
def debug_read_flash(self, numbytes):
"""
DE execute, 6 meta-data bytes sent, n bytes received)
Meta-data bytes: addrL0, addrL1, addrH0, addrH1, wordsL, wordsH
"""
self.debug_proxy.debug_command(self.DE_COMMAND_READ_FLASH, 6, numbytes)
def debug_write_flash(self, numbytes, delay):
"""
DE execute, 4 meta-data bytes, 0 bytes received)
Meta-data bytes: addrL0, addrL1, addrH0, addrH1
"""
self.debug_proxy.debug_command(self.DE_COMMAND_WRITE_FLASH, 4, 0)
# Delay while the page is erased
self.board.delay_us(delay)
# Write more data without command
self.debug_proxy.debug_command(0, 576, 0)
# Commit delay
self.board.delay_us(delay)
def read_pc(self):
"""
DE execute, no data in, 3 bytes out
Data out: PCL0, PCL1, PCH
"""
self.debug_proxy.debug_command(self.DE_COMMAND_READ_PC, 0, 3)
def step(self):
"""
DE execute, no data
"""
self.debug_proxy.debug_command(self.DE_COMMAND_STEP, 0, 0)
def run(self):
"""
DE execute, no data
"""
self.debug_proxy.debug_command(self.DE_COMMAND_RUN, 0, 0)
def get_run_state(self):
"""
Get target run/stop state.
Indirect return.
"""
# First put pins to input
self.hw.set_clk_in_data_in()
# Read back pin values
self.hw.get_pins()
def halt(self):
"""
HALT the target
"""
# Drive low on clock and data
self.hw.set_all_pins_low()
# Bring clock high
self.hw.set_clk_high_data_low()
# Wait
self.board.delay_us(100)
# Drive low on clock and data
self.hw.set_all_pins_low()
# Both to input
self.hw.set_clk_in_data_in()
# Wait
self.board.delay_us(100)
class DebugExecApiPic18Vx(PicDebugInterface):
"""
Interaction with this particular implementation of the debug executive
"""
# Useful Debug Executive commands
DE_COMMAND_READ_VERSION = 0x01
DE_COMMAND_READ_MEM = 0x02
DE_COMMAND_WRITE_MEM = 0x03
DE_COMMAND_READ_PC = 0x04
DE_COMMAND_RUN = 0x05
DE_COMMAND_STEP = 0x06
DE_COMMAND_WRITE_EMU = 0x07
DE_COMMAND_READ_EMU = 0x08
# This Debug Executive version does not support the following commands:
# DE_COMMAND_READ_FLASH = 0x09
# DE_COMMAND_WRITE_FLASH = 0x0A
# DE_COMMAND_READ_EEPROM = 0x0C
# DE_COMMAND_WRITE_EEPROM = 0x0D
# DE_COMMAND_READ_TEST = 0x0F
# DE_COMMAND_WRITE_TEST = 0x10
# DE_COMMAND_SET_PC = 0x11
# DE_COMMAND_ERASE_PAGE = 0x0B
def __init__(self):
PicDebugInterface.__init__(self)
@staticmethod
def _de_command_1(param):
"""
Header generator for a single parameter command
"""
return bytearray([param & 0xFF, (param >> 8) & 0xFF])
@staticmethod
def _de_command_2(param1, param2):
"""
Header generator for a two parameter command
"""
return bytearray([param1 & 0xFF, (param1 >> 8) & 0xFF, param2 & 0xFF, (param2 >> 8) & 0xFF])
def de_command_erase(self, address):
"""
Header generator for an erase command
"""
return self._de_command_1(address)
def de_command_memory_write(self, address, length):
"""
Header generator for a memory write command
"""
return self._de_command_2(address, length)
def de_command_memory_read(self, address, length):
"""
Header generator for a memory read command
"""
return self._de_command_2(address, length)
def read_pc(self):
"""
DE execute, no data in, 3 bytes out
Data out: PCL, PCH
"""
self.debug_proxy.debug_command(self.DE_COMMAND_READ_PC, 0, 3)
def set_pc(self):
"""
DE execute, 3 bytes data, 0 bytes back out
Data bytes: PCL, PCH
"""
self.debug_proxy.debug_command(self.DE_COMMAND_SET_PC, 3, 0)
def read_mem(self, numbytes):
"""
DE execute, 4 meta-data bytes sent, 0 bytes received)
Meta-data bytes: addrL, addrH, bytesL, bytesH
"""
self.debug_proxy.debug_command(self.DE_COMMAND_READ_MEM, 4, numbytes)
def write_mem(self, numbytes):
"""
DE execute, 4 meta-data bytes + n bytes sent, 0 bytes received)
Meta-data bytes: addrL, addrH, bytesL, bytesH
"""
self.debug_proxy.debug_command(self.DE_COMMAND_WRITE_MEM, numbytes + 4, 0)
def read_de_version(self):
"""
DE execute, no bytes in, 4 bytes back out
Version format: FW_AP, major, minor, revision
"""
self.debug_proxy.debug_command(self.DE_COMMAND_READ_VERSION, 0, 4)
def read_emulation(self, numbytes):
"""
DE execute, 4 meta-data bytes sent, 0 bytes received)
Meta-data bytes: addrL, addrH, bytesL, bytesH
"""
self.debug_proxy.debug_command(self.DE_COMMAND_READ_EMU, 4, numbytes)
def write_emulation(self, numbytes):
"""
DE execute, 4 meta-data bytes + n bytes sent, 0 bytes received)
Meta-data bytes: addrL, addrH, bytesL, bytesH
"""
self.debug_proxy.debug_command(self.DE_COMMAND_WRITE_EMU, numbytes + 4, 0)
def step(self):
"""
DE execute, no data
"""
self.debug_proxy.debug_command(self.DE_COMMAND_STEP, 0, 0)
def run(self):
"""
DE execute, no data
"""
self.debug_proxy.debug_command(self.DE_COMMAND_RUN, 0, 0)
self.board.delay_ms(100)
def halt(self):
"""
HALT the target
"""
# Drive low on clock and data
self.hw.set_all_pins_low()
# Bring clock high
self.hw.set_clk_high_data_low()
# Wait
self.board.delay_us(100)
# Drive low on clock and data
self.hw.set_all_pins_low()
# Both to input
self.hw.set_clk_in_data_in()
# Wait
self.board.delay_us(100)
def get_run_state(self):
"""
Get target run/stop state.
Indirect return.
"""
# First put pins to input
self.hw.set_clk_in_data_in()
# Read back pin values
self.hw.get_pins()
def is_halted(self):
"""
Is the target halted.
Boolean return
"""
self.hw.set_clk_in_data_in()
# Check the pin status
status = self.hw.get_pins()
if status & (1 << ICSP_CLK_VALUE_ID):
return True
return False
class DebugExecApiVx(PicDebugInterface):
"""
Interaction with this particular implementation of the debug executive
"""
# Useful Debug Executive commands
DE_COMMAND_READ_VERSION = 0x01
DE_COMMAND_READ_MEM = 0x02
DE_COMMAND_WRITE_MEM = 0x03
DE_COMMAND_READ_PC = 0x04
DE_COMMAND_RUN = 0x05
DE_COMMAND_STEP = 0x06
DE_COMMAND_READ_FLASH = 0x09
DE_COMMAND_WRITE_FLASH = 0x0A
DE_COMMAND_READ_EEPROM = 0x0C
DE_COMMAND_WRITE_EEPROM = 0x0D
DE_COMMAND_READ_TEST = 0x0F
DE_COMMAND_WRITE_TEST = 0x10
DE_COMMAND_SET_PC = 0x11
DE_COMMAND_ERASE_PAGE = 0x0B
def __init__(self):
PicDebugInterface.__init__(self)
@staticmethod
def _de_command_1(param):
"""
Header generator for a single parameter command
"""
return bytearray([param & 0xFF, (param >> 8) & 0xFF])
@staticmethod
def _de_command_2(param1, param2):
"""
Header generator for a two parameter command
"""
return bytearray([param1 & 0xFF, (param1 >> 8) & 0xFF, param2 & 0xFF, (param2 >> 8) & 0xFF])
def de_command_set_pc(self, pc):
"""
Header generator for a set PC command
"""
return self._de_command_1(pc)
def de_command_erase(self, address):
"""
Header generator for an erase command
"""
return self._de_command_1(address)
def de_command_memory_write(self, address, length):
"""
Header generator for a memory write command
"""
return self._de_command_2(address, length)
def de_command_memory_read(self, address, length):
"""
Header generator for a memory read command
"""
return self._de_command_2(address, length)
def read_pc(self):
"""
DE execute, no data in, 2 bytes out
Data out: PCL, PCH
"""
self.debug_proxy.debug_command(self.DE_COMMAND_READ_PC, 0, 2)
def set_pc(self):
"""
DE execute, 2 bytes data, 0 bytes back out
Data bytes: PCL, PCH
"""
self.debug_proxy.debug_command(self.DE_COMMAND_SET_PC, 2, 0)
def read_mem(self, numbytes):
"""
DE execute, 4 meta-data bytes sent, 0 bytes received)
Meta-data bytes: addrL, addrH, bytesL, bytesH
"""
self.debug_proxy.debug_command(self.DE_COMMAND_READ_MEM, 4, numbytes)
def write_mem(self, numbytes):
"""
DE execute, 4 meta-data bytes + n bytes sent, 0 bytes received)
Meta-data bytes: addrL, addrH, bytesL, bytesH
"""
self.debug_proxy.debug_command(self.DE_COMMAND_WRITE_MEM, numbytes + 4, 0)
def read_de_version(self):
"""
DE execute, no bytes in, 4 bytes back out
Version format: FW_AP, major, minor, revision
"""
self.debug_proxy.debug_command(self.DE_COMMAND_READ_VERSION, 0, 4)
def debug_erase_page(self, delay):
"""
DE execute, 2 meta-data bytes sent, 0 bytes received
Meta-data bytes: addrL, addrH
"""
self.debug_proxy.debug_command(self.DE_COMMAND_ERASE_PAGE, 2, 0)
self.board.delay_us(delay)
def debug_read_flash(self, numbytes):
"""
DE execute, 4 meta-data bytes sent, n bytes received)
Meta-data bytes: addrL, addrH, bytesL, bytesH
"""
self.debug_proxy.debug_command(self.DE_COMMAND_READ_FLASH, 4, numbytes)
def debug_read_test(self, numbytes):
"""
DE execute, 4 meta-data bytes sent, n bytes received)
Meta-data bytes: addrL, addrH, bytesL, bytesH
"""
self.debug_proxy.debug_command(self.DE_COMMAND_READ_TEST, 4, numbytes)
def debug_read_eeprom(self, numbytes):
"""
DE execute, 4 meta-data bytes sent, n bytes received)
Meta-data bytes: addrL, addrH, bytesL, bytesH
"""
self.debug_proxy.debug_command(self.DE_COMMAND_READ_EEPROM, 4, numbytes)
def debug_write_flash(self, numbytes, delay):
"""
DE execute, 4 meta-data bytes + n bytes sent, 0 bytes received)
Meta-data bytes: addrL, addrH, bytesL, bytesH
"""
self.debug_proxy.debug_command(self.DE_COMMAND_WRITE_FLASH, numbytes + 4, 0)
# Delay while the page is written
self.board.delay_us(delay)
def step(self):
"""
DE execute, no data
"""
self.debug_proxy.debug_command(self.DE_COMMAND_STEP, 0, 0)
def run(self):
"""
DE execute, no data
"""
self.debug_proxy.debug_command(self.DE_COMMAND_RUN, 0, 0)
self.board.delay_ms(100)
def halt(self):
"""
HALT the target
"""
# Drive low on clock and data
self.hw.set_all_pins_low()
# Bring clock high
self.hw.set_clk_high_data_low()
# Wait
self.board.delay_us(100)
# Drive low on clock and data
self.hw.set_all_pins_low()
# Both to input
self.hw.set_clk_in_data_in()
# Wait
self.board.delay_us(100)
def get_run_state(self):
"""
Get target run/stop state.
Indirect return.
"""
# First put pins to input
self.hw.set_clk_in_data_in()
# Read back pin values
self.hw.get_pins()
def is_halted(self):
"""
Is the target halted.
Boolean return
"""
self.hw.set_clk_in_data_in()
# Check the pin status
status = self.hw.get_pins()
if status & (1 << ICSP_CLK_VALUE_ID):
return True
return False
| 30.447464 | 146 | 0.61754 | 2,187 | 16,807 | 4.496113 | 0.098308 | 0.092444 | 0.056849 | 0.061833 | 0.858639 | 0.841656 | 0.82396 | 0.816943 | 0.806265 | 0.784603 | 0 | 0.030623 | 0.290831 | 16,807 | 551 | 147 | 30.502722 | 0.794362 | 0.299756 | 0 | 0.646226 | 0 | 0 | 0.002883 | 0.002883 | 0 | 0 | 0.021869 | 0 | 0 | 1 | 0.29717 | false | 0 | 0.009434 | 0 | 0.584906 | 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 | 1 | 0 | 0 | 8 |
d1da1a1967f6dd6856ecc25c59b109f5616e4787 | 38,087 | py | Python | python/openlattice/api/principal_api.py | openlattice/api-clients | 1d5be9861785b295089b732f37464e31bf80c8ca | [
"Apache-2.0"
] | null | null | null | python/openlattice/api/principal_api.py | openlattice/api-clients | 1d5be9861785b295089b732f37464e31bf80c8ca | [
"Apache-2.0"
] | 1 | 2021-01-20T00:20:01.000Z | 2021-01-20T00:20:01.000Z | python/openlattice/api/principal_api.py | openlattice/api-clients | 1d5be9861785b295089b732f37464e31bf80c8ca | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
OpenLattice API
OpenLattice API # noqa: E501
The version of the OpenAPI document: 0.0.1
Contact: support@openlattice.com
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import re # noqa: F401
# python 2 and python 3 compatibility library
import six
from openlattice.api_client import ApiClient
from openlattice.exceptions import ( # noqa: F401
ApiTypeError,
ApiValueError
)
class PrincipalApi(object):
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
def __init__(self, api_client=None):
if api_client is None:
api_client = ApiClient()
self.api_client = api_client
def get_all_users(self, **kwargs): # noqa: E501
"""Get all users. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_all_users(async_req=True)
>>> result = thread.get()
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: dict(str, Auth0userBasic)
"""
kwargs['_return_http_data_only'] = True
return self.get_all_users_with_http_info(**kwargs) # noqa: E501
def get_all_users_with_http_info(self, **kwargs): # noqa: E501
"""Get all users. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_all_users_with_http_info(async_req=True)
>>> result = thread.get()
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
:type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
:type _request_auth: dict, optional
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: tuple(dict(str, Auth0userBasic), status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
all_params = [
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout',
'_request_auth'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method get_all_users" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['http_auth', 'openlattice_auth'] # noqa: E501
return self.api_client.call_api(
'/datastore/principals/users/', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='dict(str, Auth0userBasic)', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats,
_request_auth=local_var_params.get('_request_auth'))
def get_current_roles(self, **kwargs): # noqa: E501
"""Get current roles. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_current_roles(async_req=True)
>>> result = thread.get()
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: list[SecurablePrincipal]
"""
kwargs['_return_http_data_only'] = True
return self.get_current_roles_with_http_info(**kwargs) # noqa: E501
def get_current_roles_with_http_info(self, **kwargs): # noqa: E501
"""Get current roles. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_current_roles_with_http_info(async_req=True)
>>> result = thread.get()
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
:type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
:type _request_auth: dict, optional
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: tuple(list[SecurablePrincipal], status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
all_params = [
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout',
'_request_auth'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method get_current_roles" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['http_auth', 'openlattice_auth'] # noqa: E501
return self.api_client.call_api(
'/datastore/principals/roles/current/', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='list[SecurablePrincipal]', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats,
_request_auth=local_var_params.get('_request_auth'))
def get_materialized_view_account(self, **kwargs): # noqa: E501
"""Get the db access credentials. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_materialized_view_account(async_req=True)
>>> result = thread.get()
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: MaterializedViewAccount
"""
kwargs['_return_http_data_only'] = True
return self.get_materialized_view_account_with_http_info(**kwargs) # noqa: E501
def get_materialized_view_account_with_http_info(self, **kwargs): # noqa: E501
"""Get the db access credentials. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_materialized_view_account_with_http_info(async_req=True)
>>> result = thread.get()
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
:type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
:type _request_auth: dict, optional
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: tuple(MaterializedViewAccount, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
all_params = [
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout',
'_request_auth'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method get_materialized_view_account" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['http_auth', 'openlattice_auth'] # noqa: E501
return self.api_client.call_api(
'/datastore/principals/db', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='MaterializedViewAccount', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats,
_request_auth=local_var_params.get('_request_auth'))
def get_user(self, user_id, **kwargs): # noqa: E501
"""Get the user for the given id. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_user(user_id, async_req=True)
>>> result = thread.get()
:param user_id: (required)
:type user_id: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: Auth0userBasic
"""
kwargs['_return_http_data_only'] = True
return self.get_user_with_http_info(user_id, **kwargs) # noqa: E501
def get_user_with_http_info(self, user_id, **kwargs): # noqa: E501
"""Get the user for the given id. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_user_with_http_info(user_id, async_req=True)
>>> result = thread.get()
:param user_id: (required)
:type user_id: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
:type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
:type _request_auth: dict, optional
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: tuple(Auth0userBasic, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
all_params = [
'user_id'
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout',
'_request_auth'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method get_user" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'user_id' is set
if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501
local_var_params['user_id'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `user_id` when calling `get_user`") # noqa: E501
collection_formats = {}
path_params = {}
if 'user_id' in local_var_params:
path_params['userId'] = local_var_params['user_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['http_auth', 'openlattice_auth'] # noqa: E501
return self.api_client.call_api(
'/datastore/principals/users/{userId}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Auth0userBasic', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats,
_request_auth=local_var_params.get('_request_auth'))
def search_all_users(self, search_query, **kwargs): # noqa: E501
"""Get the user id for the given search. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.search_all_users(search_query, async_req=True)
>>> result = thread.get()
:param search_query: (required)
:type search_query: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: dict(str, Auth0userBasic)
"""
kwargs['_return_http_data_only'] = True
return self.search_all_users_with_http_info(search_query, **kwargs) # noqa: E501
def search_all_users_with_http_info(self, search_query, **kwargs): # noqa: E501
"""Get the user id for the given search. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.search_all_users_with_http_info(search_query, async_req=True)
>>> result = thread.get()
:param search_query: (required)
:type search_query: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
:type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
:type _request_auth: dict, optional
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: tuple(dict(str, Auth0userBasic), status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
all_params = [
'search_query'
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout',
'_request_auth'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method search_all_users" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'search_query' is set
if self.api_client.client_side_validation and ('search_query' not in local_var_params or # noqa: E501
local_var_params['search_query'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `search_query` when calling `search_all_users`") # noqa: E501
collection_formats = {}
path_params = {}
if 'search_query' in local_var_params:
path_params['searchQuery'] = local_var_params['search_query'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['http_auth', 'openlattice_auth'] # noqa: E501
return self.api_client.call_api(
'/datastore/principals/users/search/{searchQuery}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='dict(str, Auth0userBasic)', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats,
_request_auth=local_var_params.get('_request_auth'))
def search_all_users_by_email(self, email_address, **kwargs): # noqa: E501
"""Get the user id for the given email address. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.search_all_users_by_email(email_address, async_req=True)
>>> result = thread.get()
:param email_address: (required)
:type email_address: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: dict(str, Auth0userBasic)
"""
kwargs['_return_http_data_only'] = True
return self.search_all_users_by_email_with_http_info(email_address, **kwargs) # noqa: E501
def search_all_users_by_email_with_http_info(self, email_address, **kwargs): # noqa: E501
"""Get the user id for the given email address. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.search_all_users_by_email_with_http_info(email_address, async_req=True)
>>> result = thread.get()
:param email_address: (required)
:type email_address: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
:type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
:type _request_auth: dict, optional
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: tuple(dict(str, Auth0userBasic), status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
all_params = [
'email_address'
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout',
'_request_auth'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method search_all_users_by_email" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'email_address' is set
if self.api_client.client_side_validation and ('email_address' not in local_var_params or # noqa: E501
local_var_params['email_address'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `email_address` when calling `search_all_users_by_email`") # noqa: E501
collection_formats = {}
path_params = {}
if 'email_address' in local_var_params:
path_params['emailAddress'] = local_var_params['email_address'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['http_auth', 'openlattice_auth'] # noqa: E501
return self.api_client.call_api(
'/datastore/principals/users/search/email/"{emailAddress}"', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='dict(str, Auth0userBasic)', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats,
_request_auth=local_var_params.get('_request_auth'))
def sync_calling_user(self, **kwargs): # noqa: E501
"""Activates a user in the OpenLattice system. This call must be made once before a user will be available for use in authorization policies. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.sync_calling_user(async_req=True)
>>> result = thread.get()
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.sync_calling_user_with_http_info(**kwargs) # noqa: E501
def sync_calling_user_with_http_info(self, **kwargs): # noqa: E501
"""Activates a user in the OpenLattice system. This call must be made once before a user will be available for use in authorization policies. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.sync_calling_user_with_http_info(async_req=True)
>>> result = thread.get()
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
:type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
:type _request_auth: dict, optional
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: None
"""
local_var_params = locals()
all_params = [
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout',
'_request_auth'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method sync_calling_user" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# Authentication setting
auth_settings = ['http_auth', 'openlattice_auth'] # noqa: E501
return self.api_client.call_api(
'/datastore/principals/sync/', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats,
_request_auth=local_var_params.get('_request_auth'))
| 42.602908 | 163 | 0.589204 | 4,178 | 38,087 | 5.104596 | 0.050503 | 0.033385 | 0.049233 | 0.035448 | 0.955127 | 0.941952 | 0.934121 | 0.920992 | 0.909833 | 0.905988 | 0 | 0.010483 | 0.341271 | 38,087 | 893 | 164 | 42.650616 | 0.839571 | 0.498149 | 0 | 0.722955 | 1 | 0 | 0.178894 | 0.051937 | 0 | 0 | 0 | 0 | 0 | 1 | 0.039578 | false | 0 | 0.013193 | 0 | 0.092348 | 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 |
ae2d235885830d2d237b2856d5ea2e0a52e0dca1 | 166 | py | Python | skforecast/model_selection/__init__.py | JavierEscobarOrtiz/skforecast | a3af4a1dd4201c582f159d4e3a1734ed6d29b6c5 | [
"MIT"
] | 1 | 2021-12-01T09:21:21.000Z | 2021-12-01T09:21:21.000Z | skforecast/model_selection/__init__.py | JavierEscobarOrtiz/skforecast | a3af4a1dd4201c582f159d4e3a1734ed6d29b6c5 | [
"MIT"
] | null | null | null | skforecast/model_selection/__init__.py | JavierEscobarOrtiz/skforecast | a3af4a1dd4201c582f159d4e3a1734ed6d29b6c5 | [
"MIT"
] | null | null | null | from .model_selection import time_series_splitter, cv_forecaster, backtesting_forecaster, grid_search_forecaster, random_search_forecaster, bayesian_search_forecaster | 166 | 166 | 0.915663 | 20 | 166 | 7.05 | 0.7 | 0.340426 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.048193 | 166 | 1 | 166 | 166 | 0.892405 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 7 |
ae7669aa255812be8dcf4ae1d3663cbc396b8a27 | 1,594 | py | Python | systest/pages/test_network_ipredirect.py | Risca/znail | 01c94465a4bd5d48c1f0e7c4f339138b3a1d0a6f | [
"Apache-2.0"
] | 15 | 2019-10-23T07:02:35.000Z | 2022-03-07T08:33:18.000Z | systest/pages/test_network_ipredirect.py | Risca/znail | 01c94465a4bd5d48c1f0e7c4f339138b3a1d0a6f | [
"Apache-2.0"
] | 8 | 2019-12-11T12:02:03.000Z | 2021-10-15T20:38:18.000Z | systest/pages/test_network_ipredirect.py | Risca/znail | 01c94465a4bd5d48c1f0e7c4f339138b3a1d0a6f | [
"Apache-2.0"
] | 4 | 2019-11-19T21:32:52.000Z | 2021-08-22T17:19:27.000Z | from ..util import assert_has_title
def test_load_page(znail, ip_redirect_page):
assert_has_title(ip_redirect_page.page, "Network IP Redirect")
def test_add_to_network_ip_redirect(Znail, ip_redirect_page):
with Znail():
ip_redirect_page.add("1.2.3.4", 80, "4.3.2.1", 8080, "UDP")
def test_get_network_ip_redirect(znail, ip_redirect_page):
assert len(ip_redirect_page.get()) == 0
def test_set_and_get_network_ip_redirect(znail, ip_redirect_page):
ip_redirect_page.add("1.2.3.4", 80, "4.3.2.1", 8080, "UDP")
ip_redirect_page.add("4.3.2.1", 81, "1.2.3.4", 82, "TCP")
assert ip_redirect_page.get() == [
("1.2.3.4", 80, "4.3.2.1", 8080, "udp"),
("4.3.2.1", 81, "1.2.3.4", 82, "tcp"),
]
def test_remove_item_from_network_ip_redirect(znail, ip_redirect_page):
ip_redirect_page.add("1.2.3.4", 80, "4.3.2.1", 8080, "UDP")
ip_redirect_page.remove("1.2.3.4", 80, "4.3.2.1", 8080, "udp")
assert len(ip_redirect_page.get()) == 0
def test_remove_multiple_items_from_network_ip_redirect(znail, ip_redirect_page):
ip_redirect_page.add("1.2.3.4", 80, "4.3.2.1", 8080, "UDP")
ip_redirect_page.add("1.2.3.4", 80, "4.3.2.1", 8080, "TCP")
ip_redirect_page.remove("1.2.3.4", 80, "4.3.2.1", 8080, "tcp")
assert ip_redirect_page.get() == [("1.2.3.4", 80, "4.3.2.1", 8080, "udp")]
ip_redirect_page.remove("1.2.3.4", 80, "4.3.2.1", 8080, "udp")
assert len(ip_redirect_page.get()) == 0
def test_invalid_input(znail, ip_redirect_page):
ip_redirect_page.add("a.b.c.d", -1, "a.b.c.d", -2, "tcp", expect_success=False)
| 37.069767 | 83 | 0.656838 | 309 | 1,594 | 3.119741 | 0.145631 | 0.30083 | 0.334025 | 0.049793 | 0.793568 | 0.767635 | 0.767635 | 0.73029 | 0.649378 | 0.614108 | 0 | 0.123268 | 0.1399 | 1,594 | 42 | 84 | 37.952381 | 0.579869 | 0 | 0 | 0.321429 | 0 | 0 | 0.150565 | 0 | 0 | 0 | 0 | 0 | 0.25 | 1 | 0.25 | false | 0 | 0.035714 | 0 | 0.285714 | 0 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
8846ac4583fa3d397e248fa40b65b59a163718b4 | 142 | py | Python | async_search_client/paths/__init__.py | qw-in/async-search-client | 457596b2f44f0ef9dda3c15d8d67587c1981ebd9 | [
"MIT"
] | null | null | null | async_search_client/paths/__init__.py | qw-in/async-search-client | 457596b2f44f0ef9dda3c15d8d67587c1981ebd9 | [
"MIT"
] | null | null | null | async_search_client/paths/__init__.py | qw-in/async-search-client | 457596b2f44f0ef9dda3c15d8d67587c1981ebd9 | [
"MIT"
] | null | null | null | from async_search_client.paths.build_url import build_url # noqa: F401
from async_search_client.paths.valid_paths import Paths # noqa: F401
| 47.333333 | 71 | 0.830986 | 23 | 142 | 4.826087 | 0.478261 | 0.162162 | 0.27027 | 0.378378 | 0.468468 | 0 | 0 | 0 | 0 | 0 | 0 | 0.047619 | 0.112676 | 142 | 2 | 72 | 71 | 0.833333 | 0.147887 | 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 |
887cfeeedb53dff153749887010f84a6416b91b8 | 11,327 | py | Python | code/examples/classifier_compression/sinreq_v2_svhn_runcode/caffe2tf.py | he-actlab/waveq.code | 024d55af6d989d4074d3e555d03b76a2f7eac209 | [
"CNRI-Python"
] | 1 | 2020-04-09T03:21:32.000Z | 2020-04-09T03:21:32.000Z | code/examples/classifier_compression/sinreq_v2_svhn_runcode/caffe2tf.py | he-actlab/waveq.code | 024d55af6d989d4074d3e555d03b76a2f7eac209 | [
"CNRI-Python"
] | 4 | 2020-09-26T00:53:47.000Z | 2022-02-10T01:23:34.000Z | code/examples/classifier_compression/sinreq_v2_svhn_runcode/caffe2tf.py | sinreq-learn/sinreq-learn.code | a205d3fa22a41d5f4fc1ef1e5698c4f1dbb11e6a | [
"BSD-4-Clause-UC"
] | null | null | null | import sys
def process_oper(oper):
name = oper[oper.rfind('=') + 2 : oper.rfind("'")]
name = name.replace('-', '_')
type = oper[1 : oper.find('(')]
segments = oper[oper.find('(') + 1 : oper.find('name') - 1].replace(',', '').split(' ')
params = []
if type == 'conv':
params = segments[3:]
elif type == 'max_pool' or type == 'avg_pool':
params = segments
elif type == 'lrn':
params = segments
elif type == 'fc':
params = segments[1:]
elif type == 'concat':
params = segments[0:]
elif type == 'batch_normalization':
params = segments
return name, type, params
def process_file(infile_addr):
oper_list = []
oper_dict = {}
with open(infile_addr, 'r') as infile:
lines = infile.readlines()
for i in range(0, len(lines)):
lines[i] = lines[i].strip()
i = 0
counter = 0
next_in = []
while i < len(lines):
line = lines[i]
if line.startswith('(self.feed'):
next_in = []
next_in.append(line[line.find("'") + 1 : line.rfind("'")])
while ')' not in line:
i = i + 1
line = lines[i]
next_in.append(line[line.find("'") + 1 : line.rfind("'")])
elif line.startswith('.'):
name, type, params = process_oper(line)
oper_dict[name] = counter
counter = counter + 1
oper_list.append([name, type, params, next_in])
next_in = name
i = i + 1
return oper_list, oper_dict
def caffe2tf_noise(infile_addr, outfile_addr):
oper_list, oper_dict = process_file(infile_addr)
outfile = open(outfile_addr, 'w')
for element in oper_list:
name, type, params, inputs = element
input_type = ''
if type == 'conv':
layer_def_1 = "namex = conv(input, weights_noisy['namex'], biases_noisy['namex'], params)\n".replace('namex', name)
layer_def_2 = "err_lyr[\'namex\'] = tf.get_variable(name='namex_lyr_err', shape=namex.shape[1:], initializer=tf.random_normal_initializer(mean=err_mean[3], stddev=err_stddev[3]), trainable=train_vars[3])\n".replace('namex', name)
layer_def_3 = "layers_err['namex'] = tf.add(namex, err_lyr['namex'])\n".replace('namex', name)
if isinstance(inputs, list):
inputs = inputs[0]
if inputs == 'data':
input_type == 'input'
else:
input_type = oper_list[oper_dict[inputs]][1]
if input_type == 'conv' or input_type == 'add':
layer_def_1 = layer_def_1.replace('input', "layers_err['" + inputs + "']")
else:
layer_def_1 = layer_def_1.replace('input', inputs)
for param in params:
layer_def_1 = layer_def_1.replace('params', param + ', params')
layer_def_1 = layer_def_1.replace(', params', '')
outfile.write(layer_def_1 + layer_def_2 + layer_def_3)
elif type == 'max_pool' or type == 'avg_pool':
layer_def_1 = "namex = max_pool(input, params)\n".replace('namex', name)
if type == 'avg_pool':
layer_def_1 = layer_def_1.replace('max_pool', 'avg_pool')
if isinstance(inputs, list):
inputs = inputs[0]
if inputs == 'data':
input_type == 'input'
else:
input_type = oper_list[oper_dict[inputs]][1]
if input_type == 'conv' or input_type == 'add':
layer_def_1 = layer_def_1.replace('input', "layers_err['" + inputs + "']")
else:
layer_def_1 = layer_def_1.replace('input', inputs)
for param in params:
layer_def_1 = layer_def_1.replace('params', param + ', params')
layer_def_1 = layer_def_1.replace(', params', '')
outfile.write(layer_def_1)
elif type == 'lrn':
layer_def_1 = "namex = lrn(input, params)\n".replace('namex', name)
if isinstance(inputs, list):
inputs = inputs[0]
input_type = oper_list[oper_dict[inputs]][1]
if input_type == 'conv' or input_type == 'add':
layer_def_1 = layer_def_1.replace('input', "layers_err['" + inputs + "']")
else:
layer_def_1 = layer_def_1.replace('input', inputs)
for param in params:
layer_def_1 = layer_def_1.replace('params', param + ', params')
layer_def_1 = layer_def_1.replace(', params', '')
outfile.write(layer_def_1)
elif type == 'fc':
layer_def_1 = "namex = fc(input, weights_noisy['namex'], biases_noisy['namex'], params)\n".replace('namex', name)
layer_def_2 = "err_lyr[\'namex\'] = tf.get_variable(name='namex_lyr_err', shape=namex.shape[1:], initializer=tf.random_normal_initializer(mean=err_mean[3], stddev=err_stddev[3]), trainable=train_vars[3])\n".replace('namex', name)
layer_def_3 = "layers_err['namex'] = tf.add(namex, err_lyr['namex'])\n".replace('namex', name)
if isinstance(inputs, list):
inputs = inputs[0]
input_type = oper_list[oper_dict[inputs]][1]
if input_type == 'conv' or input_type == 'add':
layer_def_1 = layer_def_1.replace('input', "layers_err['" + inputs + "']")
else:
layer_def_1 = layer_def_1.replace('input', inputs)
for param in params:
layer_def_1 = layer_def_1.replace('params', param + ', params')
layer_def_1 = layer_def_1.replace(', params', '')
outfile.write(layer_def_1 + layer_def_2 + layer_def_3)
elif type == 'concat':
layer_def_1 = "namex = concat([_xx_], params)\n".replace('namex', name)
for i in range(len(inputs)):
input_type = oper_list[oper_dict[inputs[i]]][1]
if input_type == 'conv' or input_type == 'add':
inputs[i] = "layers_err['" + inputs[i] + "']"
layer_def_1 = layer_def_1.replace('_xx_', inputs[i] + ', _xx_')
layer_def_1 = layer_def_1.replace(', _xx_', '')
for param in params:
layer_def_1 = layer_def_1.replace('params', param + ', params')
layer_def_1 = layer_def_1.replace(', params', '')
outfile.write(layer_def_1)
elif type == 'add':
layer_def_1 = "namex = add([_xx_])\n".replace('namex', name)
layer_def_2 = "err_lyr[\'namex\'] = tf.get_variable(name='namex_lyr_err', shape=namex.shape[1:], initializer=tf.random_normal_initializer(mean=err_mean[3], stddev=err_stddev[3]), trainable=train_vars[3])\n".replace('namex', name)
layer_def_3 = "layers_err['namex'] = tf.add(namex, err_lyr['namex'])\n".replace('namex', name)
for i in range(len(inputs)):
input_type = oper_list[oper_dict[inputs[i]]][1]
if input_type == 'conv' or input_type == 'add':
inputs[i] = "layers_err['" + inputs[i] + "']"
layer_def_1 = layer_def_1.replace('_xx_', inputs[i] + ', _xx_')
layer_def_1 = layer_def_1.replace(', _xx_', '')
outfile.write(layer_def_1 + layer_def_2 + layer_def_3)
elif type == 'relu':
layer_def_1 = "namex = relu(input)\n".replace('namex', name)
if isinstance(inputs, list):
inputs = inputs[0]
input_type = oper_list[oper_dict[inputs]][1]
if input_type == 'conv' or input_type == 'add':
layer_def_1 = layer_def_1.replace('input', "layers_err['" + inputs + "']")
else:
layer_def_1 = layer_def_1.replace('input', inputs)
outfile.write(layer_def_1)
elif type == 'batch_normalization':
layer_def_1 = "namex = batch_normalization(_input_, scale['namex'], offset['namex'], mean['namex'], variance['namex'], params)\n".replace('namex', name)
if isinstance(inputs, list):
inputs = inputs[0]
input_type = oper_list[oper_dict[inputs]][1]
if input_type == 'conv' or input_type == 'add':
layer_def_1 = layer_def_1.replace('_input_', "layers_err['" + inputs + "']")
else:
layer_def_1 = layer_def_1.replace('_input_', inputs)
for param in params:
layer_def_1 = layer_def_1.replace('params', param + ', params')
layer_def_1 = layer_def_1.replace(', params', '')
layer_def_1 = layer_def_1.replace(', )', ')')
outfile.write(layer_def_1)
outfile.close()
def caffe2tf_noise_w(infile_addr, outfile_addr):
oper_list, oper_dict = process_file(infile_addr)
outfile = open(outfile_addr, 'w')
for element in oper_list:
name, type, params, inputs = element
input_type = ''
if type == 'conv':
layer_def_1 = "namex = conv(input, weights_noisy['namex'], biases['namex'], params)\n".replace('namex', name)
if isinstance(inputs, list):
inputs = inputs[0]
if inputs == 'data':
input_type == 'input'
else:
input_type = oper_list[oper_dict[inputs]][1]
layer_def_1 = layer_def_1.replace('input', inputs)
for param in params:
layer_def_1 = layer_def_1.replace('params', param + ', params')
layer_def_1 = layer_def_1.replace(', params', '')
outfile.write(layer_def_1)
elif type == 'max_pool' or type == 'avg_pool':
layer_def_1 = "namex = max_pool(input, params)\n".replace('namex', name)
if type == 'avg_pool':
layer_def_1 = layer_def_1.replace('max_pool', 'avg_pool')
if isinstance(inputs, list):
inputs = inputs[0]
if inputs == 'data':
input_type == 'input'
else:
input_type = oper_list[oper_dict[inputs]][1]
layer_def_1 = layer_def_1.replace('input', inputs)
for param in params:
layer_def_1 = layer_def_1.replace('params', param + ', params')
layer_def_1 = layer_def_1.replace(', params', '')
outfile.write(layer_def_1)
elif type == 'lrn':
layer_def_1 = "namex = lrn(input, params)\n".replace('namex', name)
if isinstance(inputs, list):
inputs = inputs[0]
input_type = oper_list[oper_dict[inputs]][1]
layer_def_1 = layer_def_1.replace('input', inputs)
for param in params:
layer_def_1 = layer_def_1.replace('params', param + ', params')
layer_def_1 = layer_def_1.replace(', params', '')
outfile.write(layer_def_1)
elif type == 'fc':
layer_def_1 = "namex = fc(input, weights_noisy['namex'], biases['namex'], params)\n".replace('namex', name)
if isinstance(inputs, list):
inputs = inputs[0]
input_type = oper_list[oper_dict[inputs]][1]
layer_def_1 = layer_def_1.replace('input', inputs)
for param in params:
layer_def_1 = layer_def_1.replace('params', param + ', params')
layer_def_1 = layer_def_1.replace(', params', '')
outfile.write(layer_def_1)
elif type == 'concat':
layer_def_1 = "namex = concat([_xx_], params)\n".replace('namex', name)
for i in range(len(inputs)):
input_type = oper_list[oper_dict[inputs[i]]][1]
layer_def_1 = layer_def_1.replace('_xx_', inputs[i] + ', _xx_')
layer_def_1 = layer_def_1.replace(', _xx_', '')
for param in params:
layer_def_1 = layer_def_1.replace('params', param + ', params')
layer_def_1 = layer_def_1.replace(', params', '')
outfile.write(layer_def_1)
elif type == 'add':
layer_def_1 = "namex = add([_xx_])\n".replace('namex', name)
for i in range(len(inputs)):
input_type = oper_list[oper_dict[inputs[i]]][1]
layer_def_1 = layer_def_1.replace('_xx_', inputs[i] + ', _xx_')
layer_def_1 = layer_def_1.replace(', _xx_', '')
outfile.write(layer_def_1)
elif type == 'relu':
layer_def_1 = "namex = relu(input)\n".replace('namex', name)
if isinstance(inputs, list):
inputs = inputs[0]
input_type = oper_list[oper_dict[inputs]][1]
layer_def_1 = layer_def_1.replace('input', inputs)
outfile.write(layer_def_1)
elif type == 'batch_normalization':
layer_def_1 = "namex = batch_normalization(_input_, scale['namex'], offset['namex'], mean['namex'], variance['namex'], params)\n".replace('namex', name)
if isinstance(inputs, list):
inputs = inputs[0]
input_type = oper_list[oper_dict[inputs]][1]
layer_def_1 = layer_def_1.replace('_input_', inputs)
for param in params:
layer_def_1 = layer_def_1.replace('params', param + ', params')
layer_def_1 = layer_def_1.replace(', params', '')
outfile.write(layer_def_1)
outfile.close()
#caffe2tf_noise(sys.argv[1], sys.argv[2])
caffe2tf_noise_w(sys.argv[1], sys.argv[2]) | 43.398467 | 232 | 0.664518 | 1,711 | 11,327 | 4.096435 | 0.056692 | 0.171208 | 0.177201 | 0.087031 | 0.896419 | 0.893565 | 0.889 | 0.88258 | 0.879013 | 0.865173 | 0 | 0.022513 | 0.164739 | 11,327 | 261 | 233 | 43.398467 | 0.718317 | 0.003531 | 0 | 0.847059 | 0 | 0.019608 | 0.221848 | 0.060866 | 0 | 0 | 0 | 0 | 0 | 1 | 0.015686 | false | 0 | 0.003922 | 0 | 0.027451 | 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 |
8892c9841a6b03f716b2df17599e49f9a4174ae5 | 8,517 | py | Python | feature.py | aipassio/cv_subject | 32dec62f8e4107a52f8f1f3c18df3487ab53868b | [
"MIT"
] | 1 | 2021-01-12T08:52:26.000Z | 2021-01-12T08:52:26.000Z | feature.py | aipassio/cv_subject | 32dec62f8e4107a52f8f1f3c18df3487ab53868b | [
"MIT"
] | null | null | null | feature.py | aipassio/cv_subject | 32dec62f8e4107a52f8f1f3c18df3487ab53868b | [
"MIT"
] | null | null | null | import os
from skimage.feature import local_binary_pattern
from scipy.stats import itemfreq
from sklearn.preprocessing import normalize
import cv2
import numpy as np
from tqdm import tqdm
def histogram_intersection(h1, h2):
# import ipdb; ipdb.set_trace()
sm = np.concatenate((np.expand_dims(h1, 1), np.expand_dims(h2, 1)), axis = 1)
sm = np.min(sm, axis = 1)
# import ipdb; ipdb.set_trace()
return sm
def l2_distance(h1, h2):
return np.linalg.norm(h1-h2)
def naive(img):
return img.flatten()
def lbp(img_gray, no_points = 16, radius = 4, bin = 512):
img_gray = cv2.cvtColor(img_gray, cv2.COLOR_BGR2GRAY)
radius = 4
no_points = 9
lpb_array = local_binary_pattern(img_gray, no_points, radius)
lpb_array = np.histogram(lpb_array, bins=bin)
# lpb_array = itemfreq(lpb_array.ravel())
# Normalize the histogram
# lpb_array = lpb_array[:, 1]/sum(lpb_array[:, 1])
# import ipdb; ipdb.set_trace()
# gt_array.append([int(gt_name.split("_")[0]), lpb_array[0]])
return lpb_array[0]
def BGR_hist(img):
B, G, R = img[:,:,0], img[:,:,1],img[:,:,2]
B_array = np.histogram(B, bins=256, range = (0,255))
G_array = np.histogram(G, bins=256, range = (0,255))
R_array = np.histogram(R, bins=256, range = (0,255))
# import ipdb; ipdb.set_trace()
return np.hstack((B_array[0],G_array[0],R_array[0]))
def HSV_hist(img):
img = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)
H, S, V = img[:,:,0], img[:,:,1],img[:,:,2]
H_array = np.histogram(H, bins=360, range = (0,360))
S_array = np.histogram(S, bins=256, range = (0,255))
V_array = np.histogram(V, bins=256, range = (0,255))
return np.hstack((H_array[0],S_array[0],V_array[0]))
def HS_hist(img):
img = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)
H, S, V = img[:,:,0], img[:,:,1],img[:,:,2]
H_array = np.histogram(H, bins=360, range = (0,360))
S_array = np.histogram(S, bins=256, range = (0,255))
return np.hstack((H_array[0],S_array[0]))
def HSV_hist_2_0(img):
img = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)
H, S, V = img[:,:,0], img[:,:,1],img[:,:,2]
H_1_array = np.histogram(H[0:64,:], bins=360, range = (0,360))
H_2_array = np.histogram(H[64:,:], bins=360, range = (0,360))
S_1_array = np.histogram(S[0:64,:], bins=256, range = (0,255))
S_2_array = np.histogram(S[64:,:], bins=256, range = (0,255))
V_1_array = np.histogram(V[0:64,:], bins=256, range = (0,255))
V_2_array = np.histogram(V[64:,:], bins=256, range = (0,255))
return np.hstack((H_1_array[0],H_2_array[0],S_1_array[0], S_2_array[0], V_1_array[0], V_2_array[0]))
def HSV_hist_2_0_nor(img):
img = np.asarray(cv2.cvtColor(img, cv2.COLOR_BGR2HSV), dtype = np.float)
# import ipdb; ipdb.set_trace()
H, S, V = img[:,:,0], img[:,:,1],img[:,:,2]
H = H/(H+S+V)
S = S/(H+S+V)
V = V/(H+S+V)
H_1_array = np.histogram(H[0:64,:], bins=360, range=(0,1))
H_2_array = np.histogram(H[64:,:], bins=360, range=(0,1))
S_1_array = np.histogram(S[0:64,:], bins=256, range=(0,1))
S_2_array = np.histogram(S[64:,:], bins=256, range=(0,1))
V_1_array = np.histogram(V[0:64,:], bins=256, range=(0,1))
V_2_array = np.histogram(V[64:,:], bins=256, range=(0,1))
return np.hstack((H_1_array[0],H_2_array[0],S_1_array[0], S_2_array[0], V_1_array[0], V_2_array[0]))
def BGR_hist_2_0(img):
B, G, R = img[:,:,0], img[:,:,1],img[:,:,2]
B_1_array = np.histogram(B[0:64,:], bins=256, range = (0,255))
B_2_array = np.histogram(B[64:,:], bins=256, range = (0,255))
G_1_array = np.histogram(G[0:64,:], bins=256, range = (0,255))
G_2_array = np.histogram(G[64:,:], bins=256, range = (0,255))
R_1_array = np.histogram(R[0:64,:], bins=256, range = (0,255))
R_2_array = np.histogram(R[64:,:], bins=256, range = (0,255))
return np.hstack((B_1_array[0], B_2_array[0], G_1_array[0], G_2_array[0], R_1_array[0], R_2_array[0]))
def BGR_hist_2_2(img):
B, G, R = img[:,:,0], img[:,:,1],img[:,:,2]
B_1_array = np.histogram(B[0:64,0:32], bins=256, range = (0,255))
B_2_array = np.histogram(B[64:,0:32], bins=256, range = (0,255))
G_1_array = np.histogram(G[0:64,0:32], bins=256, range = (0,255))
G_2_array = np.histogram(G[64:,0:32], bins=256, range = (0,255))
R_1_array = np.histogram(R[0:64,0:32], bins=256, range = (0,255))
R_2_array = np.histogram(R[64:,0:32], bins=256, range = (0,255))
B_3_array = np.histogram(B[0:64,32:], bins=256, range = (0,255))
B_4_array = np.histogram(B[64:,32:], bins=256, range = (0,255))
G_3_array = np.histogram(G[0:64,32:], bins=256, range = (0,255))
G_4_array = np.histogram(G[64:,32:], bins=256, range = (0,255))
R_3_array = np.histogram(R[0:64,32:], bins=256, range = (0,255))
R_4_array = np.histogram(R[64:,32:], bins=256, range = (0,255))
return np.hstack((B_1_array[0],B_2_array[0],B_3_array[0],B_4_array[0],G_1_array[0],G_2_array[0],G_3_array[0],G_4_array[0],R_1_array[0],R_2_array[0],R_3_array[0],R_4_array[0]))
def HSV_hist_2_2(img):
img = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)
H, S, V = img[:,:,0], img[:,:,1],img[:,:,2]
H_1_array = np.histogram(H[0:64,0:32], bins=360, range = (0,360))
H_2_array = np.histogram(H[64:,0:32], bins=360, range = (0,360))
S_1_array = np.histogram(S[0:64,0:32], bins=256, range = (0,255))
S_2_array = np.histogram(S[64:,0:32], bins=256, range = (0,255))
V_1_array = np.histogram(V[0:64,0:32], bins=256, range = (0,255))
V_2_array = np.histogram(V[64:,0:32], bins=256, range = (0,255))
H_3_array = np.histogram(H[0:64,32:], bins=360, range = (0,360))
H_4_array = np.histogram(H[64:,32:], bins=360, range = (0,360))
S_3_array = np.histogram(S[0:64,32:], bins=256, range = (0,255))
S_4_array = np.histogram(S[64:,32:], bins=256, range = (0,255))
V_3_array = np.histogram(V[0:64,32:], bins=256, range = (0,255))
V_4_array = np.histogram(V[64:,32:], bins=256, range = (0,255))
return np.hstack((H_1_array[0],H_2_array[0],H_3_array[0],H_4_array[0],S_1_array[0],S_2_array[0],S_3_array[0],S_4_array[0],V_1_array[0],V_2_array[0],V_3_array[0],V_4_array[0]))
def BGR_hist_4_0(img):
B, G, R = img[:,:,0], img[:,:,1],img[:,:,2]
B_1_array = np.histogram(B[0:32,:], bins=256, range = (0,255))
B_2_array = np.histogram(B[32:64,:], bins=256, range = (0,255))
B_3_array = np.histogram(B[64:96,:], bins=256, range = (0,255))
B_4_array = np.histogram(B[96:,:], bins=256, range = (0,255))
G_1_array = np.histogram(G[0:32,:], bins=256, range = (0,255))
G_2_array = np.histogram(G[32:64,:], bins=256, range = (0,255))
G_3_array = np.histogram(G[64:96,:], bins=256, range = (0,255))
G_4_array = np.histogram(G[96:,:], bins=256, range = (0,255))
R_1_array = np.histogram(R[0:32,:], bins=256, range = (0,255))
R_2_array = np.histogram(R[32:64,:], bins=256, range = (0,255))
R_3_array = np.histogram(R[64:96,:], bins=256, range = (0,255))
R_4_array = np.histogram(R[96:,:], bins=256, range = (0,255))
return np.hstack((B_1_array[0],
B_2_array[0],
B_3_array[0],
B_4_array[0],
G_1_array[0],
G_2_array[0],
G_3_array[0],
G_4_array[0],
R_1_array[0],
R_2_array[0],
R_3_array[0],
R_4_array[0]))
def HSV_hist_4_0(img):
img = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)
H, S, V = img[:,:,0], img[:,:,1],img[:,:,2]
H_1_array = np.histogram(H[0:32,:], bins=360, range = (0,360))
H_2_array = np.histogram(H[32:64,:], bins=360, range = (0,360))
H_3_array = np.histogram(H[64:96,:], bins=360, range = (0,360))
H_4_array = np.histogram(H[96:,:], bins=360, range = (0,360))
S_1_array = np.histogram(S[0:32,:], bins=256, range = (0,255))
S_2_array = np.histogram(S[32:64,:], bins=256, range = (0,255))
S_3_array = np.histogram(S[64:96,:], bins=256, range = (0,255))
S_4_array = np.histogram(S[96:,:], bins=256, range = (0,255))
V_1_array = np.histogram(V[0:32,:], bins=256, range = (0,255))
V_2_array = np.histogram(V[32:64,:], bins=256, range = (0,255))
V_3_array = np.histogram(V[64:96,:], bins=256, range = (0,255))
V_4_array = np.histogram(V[96:,:], bins=256, range = (0,255))
return np.hstack((H_1_array[0],
H_2_array[0],
H_3_array[0],
H_4_array[0],
S_1_array[0],
S_2_array[0],
S_3_array[0],
S_4_array[0],
V_1_array[0],
V_2_array[0],
V_3_array[0],
V_4_array[0])) | 44.359375 | 179 | 0.604203 | 1,647 | 8,517 | 2.914997 | 0.055859 | 0.09498 | 0.249948 | 0.162466 | 0.839825 | 0.818996 | 0.771923 | 0.740887 | 0.728598 | 0.725266 | 0 | 0.149337 | 0.176823 | 8,517 | 192 | 180 | 44.359375 | 0.535444 | 0.037807 | 0 | 0.133758 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.089172 | false | 0 | 0.044586 | 0.012739 | 0.22293 | 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 |
31fc8e6253b07b32c8b90bb195d09545b415d84a | 297 | py | Python | src/sage/combinat/cluster_algebra_quiver/all.py | bopopescu/sage-5 | 9d85b34956ca2edd55af307f99c5d3859acd30bf | [
"BSL-1.0"
] | 5 | 2015-01-04T07:15:06.000Z | 2022-03-04T15:15:18.000Z | src/sage/combinat/cluster_algebra_quiver/all.py | bopopescu/sage-5 | 9d85b34956ca2edd55af307f99c5d3859acd30bf | [
"BSL-1.0"
] | null | null | null | src/sage/combinat/cluster_algebra_quiver/all.py | bopopescu/sage-5 | 9d85b34956ca2edd55af307f99c5d3859acd30bf | [
"BSL-1.0"
] | 10 | 2016-09-28T13:12:40.000Z | 2022-02-12T09:28:34.000Z | from sage.misc.lazy_import import lazy_import
lazy_import("sage.combinat.cluster_algebra_quiver.quiver_mutation_type", "QuiverMutationType")
lazy_import("sage.combinat.cluster_algebra_quiver.quiver", "ClusterQuiver")
lazy_import("sage.combinat.cluster_algebra_quiver.cluster_seed", "ClusterSeed")
| 59.4 | 94 | 0.858586 | 38 | 297 | 6.342105 | 0.394737 | 0.207469 | 0.174274 | 0.273859 | 0.572614 | 0.572614 | 0.572614 | 0.39834 | 0 | 0 | 0 | 0 | 0.03367 | 297 | 4 | 95 | 74.25 | 0.839721 | 0 | 0 | 0 | 0 | 0 | 0.643098 | 0.501684 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | null | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 7 |
ee8edd46f8d3076cdd805d6a2391ef514efa917e | 2,085 | py | Python | coloredconsole.py | kunostaken77/coloredconsole | e340d32f4332d9864fa82e563b0c12bf952d175e | [
"MIT"
] | null | null | null | coloredconsole.py | kunostaken77/coloredconsole | e340d32f4332d9864fa82e563b0c12bf952d175e | [
"MIT"
] | null | null | null | coloredconsole.py | kunostaken77/coloredconsole | e340d32f4332d9864fa82e563b0c12bf952d175e | [
"MIT"
] | null | null | null | version = "0.0.2"
import random;
def color(string, color):
if type(string) is not str:
string_type = type(string);
print(f"\u001b[31mError: expected type \"str\", got \"{string_type}\".")
else:
selected_color = None;
color = color.lower();
if color == "red":
selected_color = "\u001b[31m";
elif color == "green" or color == "lime":
selected_color = "\u001b[32m"
elif color == "blue":
selected_color = "\u001b[34m";
elif color == "magenta" or color == "purple":
selected_color = "\u001b[35m";
elif color == "cyan":
selected_color = "\u001b[36m";
elif color == "yellow":
selected_color = "\u001b[33m";
elif color == "white" or color == "wht":
selected_color = "\u001b[37m";
elif color == "black" or color == "blk":
selected_color = "\u001b[30m";
elif color == "random":
color_list = ["\u001b[30m", "\u001b[37m", "\u001b[33m", "\u001b[36m", "\u001b[35m", "\u001b[34m", "\u001b[31m", "\u001b[32m"];
rng = random.randint(0, len(color_list) - 1);
selected_color = color_list[rng];
else:
return print(f"\u001b[31mError: invalid color type.")
return f"{selected_color}{string}";
def cprint(string, color):
if type(string) is not str:
string_type = type(string);
print(f"\u001b[31mError: expected type \"str\", got \"{string_type}\".")
else:
selected_color = None;
color = color.lower();
if color == "red":
selected_color = "\u001b[31m";
elif color == "blue":
selected_color = "\u001b[34m";
elif color == "magenta" or color == "purple":
selected_color = "\u001b[35m";
elif color == "cyan":
selected_color = "\u001b[36m";
elif color == "yellow":
selected_color = "\u001b[33m";
elif color == "white" or color == "wht":
selected_color = "\u001b[37m";
elif color == "black" or color == "blk":
selected_color = "\u001b[30m";
else:
return print(f"\u001b[31mError: invalid color type.")
return print(f"{selected_color}{string}");
cprint("Test", "red")
| 32.076923 | 132 | 0.591367 | 260 | 2,085 | 4.638462 | 0.207692 | 0.215589 | 0.223881 | 0.063018 | 0.770315 | 0.770315 | 0.770315 | 0.770315 | 0.770315 | 0.770315 | 0 | 0.087011 | 0.228297 | 2,085 | 64 | 133 | 32.578125 | 0.662523 | 0 | 0 | 0.77193 | 0 | 0 | 0.263309 | 0.023022 | 0 | 0 | 0 | 0 | 0 | 1 | 0.035088 | false | 0 | 0.017544 | 0 | 0.122807 | 0.122807 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
c9e9d967bbd7bf41bfc990eff5f470dcda413dac | 49 | py | Python | Ahao_hello.py | Kevin-777/hello-world | 566aff09faa8975eeb22f974003f56f659014d4e | [
"MIT"
] | null | null | null | Ahao_hello.py | Kevin-777/hello-world | 566aff09faa8975eeb22f974003f56f659014d4e | [
"MIT"
] | 1 | 2018-03-25T02:42:19.000Z | 2018-03-25T02:42:19.000Z | Ahao_hello.py | Kevin-777/hello-world | 566aff09faa8975eeb22f974003f56f659014d4e | [
"MIT"
] | null | null | null | def output():
print('Ahao test in 20210104') | 24.5 | 34 | 0.653061 | 7 | 49 | 4.571429 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.205128 | 0.204082 | 49 | 2 | 34 | 24.5 | 0.615385 | 0 | 0 | 0 | 0 | 0 | 0.428571 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.5 | true | 0 | 0 | 0 | 0.5 | 0.5 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 7 |
4ec769b99bda5fd1c6890989e55c8cbd5eb78282 | 39,899 | py | Python | sdk/python/pulumi_azure/kusto/eventhub_data_connection.py | roderik/pulumi-azure | f6d0c058d6f9111a709bc5f1515d1638f9d615f0 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/kusto/eventhub_data_connection.py | roderik/pulumi-azure | f6d0c058d6f9111a709bc5f1515d1638f9d615f0 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/kusto/eventhub_data_connection.py | roderik/pulumi-azure | f6d0c058d6f9111a709bc5f1515d1638f9d615f0 | [
"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__ = ['EventhubDataConnectionArgs', 'EventhubDataConnection']
@pulumi.input_type
class EventhubDataConnectionArgs:
def __init__(__self__, *,
cluster_name: pulumi.Input[str],
consumer_group: pulumi.Input[str],
database_name: pulumi.Input[str],
eventhub_id: pulumi.Input[str],
resource_group_name: pulumi.Input[str],
compression: Optional[pulumi.Input[str]] = None,
data_format: Optional[pulumi.Input[str]] = None,
event_system_properties: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
location: Optional[pulumi.Input[str]] = None,
mapping_rule_name: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
table_name: Optional[pulumi.Input[str]] = None):
"""
The set of arguments for constructing a EventhubDataConnection resource.
:param pulumi.Input[str] cluster_name: Specifies the name of the Kusto Cluster this data connection will be added to. Changing this forces a new resource to be created.
:param pulumi.Input[str] consumer_group: Specifies the EventHub consumer group this data connection will use for ingestion. Changing this forces a new resource to be created.
:param pulumi.Input[str] database_name: Specifies the name of the Kusto Database this data connection will be added to. Changing this forces a new resource to be created.
:param pulumi.Input[str] eventhub_id: Specifies the resource id of the EventHub this data connection will use for ingestion. Changing this forces a new resource to be created.
:param pulumi.Input[str] resource_group_name: Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.
:param pulumi.Input[str] compression: Specifies compression type for the connection. Allowed values: `GZip` and `None`. Defaults to `None`. Changing this forces a new resource to be created.
:param pulumi.Input[str] data_format: Specifies the data format of the EventHub messages. Allowed values: `APACHEAVRO`, `AVRO`, `CSV`, `JSON`, `MULTIJSON`, `ORC`, `PARQUET`, `PSV`, `RAW`, `SCSV`, `SINGLEJSON`, `SOHSV`, `TSVE`, `TSV`, `TXT`, and `W3CLOGFILE`.
:param pulumi.Input[Sequence[pulumi.Input[str]]] event_system_properties: Specifies a list of system properties for the Event Hub.
:param pulumi.Input[str] location: The location where the Kusto Database should be created. Changing this forces a new resource to be created.
:param pulumi.Input[str] mapping_rule_name: Specifies the mapping rule used for the message ingestion. Mapping rule must exist before resource is created.
:param pulumi.Input[str] name: The name of the Kusto EventHub Data Connection to create. Changing this forces a new resource to be created.
:param pulumi.Input[str] table_name: Specifies the target table name used for the message ingestion. Table must exist before resource is created.
"""
pulumi.set(__self__, "cluster_name", cluster_name)
pulumi.set(__self__, "consumer_group", consumer_group)
pulumi.set(__self__, "database_name", database_name)
pulumi.set(__self__, "eventhub_id", eventhub_id)
pulumi.set(__self__, "resource_group_name", resource_group_name)
if compression is not None:
pulumi.set(__self__, "compression", compression)
if data_format is not None:
pulumi.set(__self__, "data_format", data_format)
if event_system_properties is not None:
pulumi.set(__self__, "event_system_properties", event_system_properties)
if location is not None:
pulumi.set(__self__, "location", location)
if mapping_rule_name is not None:
pulumi.set(__self__, "mapping_rule_name", mapping_rule_name)
if name is not None:
pulumi.set(__self__, "name", name)
if table_name is not None:
pulumi.set(__self__, "table_name", table_name)
@property
@pulumi.getter(name="clusterName")
def cluster_name(self) -> pulumi.Input[str]:
"""
Specifies the name of the Kusto Cluster this data connection will be added to. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "cluster_name")
@cluster_name.setter
def cluster_name(self, value: pulumi.Input[str]):
pulumi.set(self, "cluster_name", value)
@property
@pulumi.getter(name="consumerGroup")
def consumer_group(self) -> pulumi.Input[str]:
"""
Specifies the EventHub consumer group this data connection will use for ingestion. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "consumer_group")
@consumer_group.setter
def consumer_group(self, value: pulumi.Input[str]):
pulumi.set(self, "consumer_group", value)
@property
@pulumi.getter(name="databaseName")
def database_name(self) -> pulumi.Input[str]:
"""
Specifies the name of the Kusto Database this data connection will be added to. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "database_name")
@database_name.setter
def database_name(self, value: pulumi.Input[str]):
pulumi.set(self, "database_name", value)
@property
@pulumi.getter(name="eventhubId")
def eventhub_id(self) -> pulumi.Input[str]:
"""
Specifies the resource id of the EventHub this data connection will use for ingestion. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "eventhub_id")
@eventhub_id.setter
def eventhub_id(self, value: pulumi.Input[str]):
pulumi.set(self, "eventhub_id", value)
@property
@pulumi.getter(name="resourceGroupName")
def resource_group_name(self) -> pulumi.Input[str]:
"""
Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "resource_group_name")
@resource_group_name.setter
def resource_group_name(self, value: pulumi.Input[str]):
pulumi.set(self, "resource_group_name", value)
@property
@pulumi.getter
def compression(self) -> Optional[pulumi.Input[str]]:
"""
Specifies compression type for the connection. Allowed values: `GZip` and `None`. Defaults to `None`. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "compression")
@compression.setter
def compression(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "compression", value)
@property
@pulumi.getter(name="dataFormat")
def data_format(self) -> Optional[pulumi.Input[str]]:
"""
Specifies the data format of the EventHub messages. Allowed values: `APACHEAVRO`, `AVRO`, `CSV`, `JSON`, `MULTIJSON`, `ORC`, `PARQUET`, `PSV`, `RAW`, `SCSV`, `SINGLEJSON`, `SOHSV`, `TSVE`, `TSV`, `TXT`, and `W3CLOGFILE`.
"""
return pulumi.get(self, "data_format")
@data_format.setter
def data_format(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "data_format", value)
@property
@pulumi.getter(name="eventSystemProperties")
def event_system_properties(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
"""
Specifies a list of system properties for the Event Hub.
"""
return pulumi.get(self, "event_system_properties")
@event_system_properties.setter
def event_system_properties(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "event_system_properties", value)
@property
@pulumi.getter
def location(self) -> Optional[pulumi.Input[str]]:
"""
The location where the Kusto Database should be created. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "location")
@location.setter
def location(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "location", value)
@property
@pulumi.getter(name="mappingRuleName")
def mapping_rule_name(self) -> Optional[pulumi.Input[str]]:
"""
Specifies the mapping rule used for the message ingestion. Mapping rule must exist before resource is created.
"""
return pulumi.get(self, "mapping_rule_name")
@mapping_rule_name.setter
def mapping_rule_name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "mapping_rule_name", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
The name of the Kusto EventHub Data Connection to create. Changing this forces a new resource 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="tableName")
def table_name(self) -> Optional[pulumi.Input[str]]:
"""
Specifies the target table name used for the message ingestion. Table must exist before resource is created.
"""
return pulumi.get(self, "table_name")
@table_name.setter
def table_name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "table_name", value)
@pulumi.input_type
class _EventhubDataConnectionState:
def __init__(__self__, *,
cluster_name: Optional[pulumi.Input[str]] = None,
compression: Optional[pulumi.Input[str]] = None,
consumer_group: Optional[pulumi.Input[str]] = None,
data_format: Optional[pulumi.Input[str]] = None,
database_name: Optional[pulumi.Input[str]] = None,
event_system_properties: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
eventhub_id: Optional[pulumi.Input[str]] = None,
location: Optional[pulumi.Input[str]] = None,
mapping_rule_name: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
table_name: Optional[pulumi.Input[str]] = None):
"""
Input properties used for looking up and filtering EventhubDataConnection resources.
:param pulumi.Input[str] cluster_name: Specifies the name of the Kusto Cluster this data connection will be added to. Changing this forces a new resource to be created.
:param pulumi.Input[str] compression: Specifies compression type for the connection. Allowed values: `GZip` and `None`. Defaults to `None`. Changing this forces a new resource to be created.
:param pulumi.Input[str] consumer_group: Specifies the EventHub consumer group this data connection will use for ingestion. Changing this forces a new resource to be created.
:param pulumi.Input[str] data_format: Specifies the data format of the EventHub messages. Allowed values: `APACHEAVRO`, `AVRO`, `CSV`, `JSON`, `MULTIJSON`, `ORC`, `PARQUET`, `PSV`, `RAW`, `SCSV`, `SINGLEJSON`, `SOHSV`, `TSVE`, `TSV`, `TXT`, and `W3CLOGFILE`.
:param pulumi.Input[str] database_name: Specifies the name of the Kusto Database this data connection will be added to. Changing this forces a new resource to be created.
:param pulumi.Input[Sequence[pulumi.Input[str]]] event_system_properties: Specifies a list of system properties for the Event Hub.
:param pulumi.Input[str] eventhub_id: Specifies the resource id of the EventHub this data connection will use for ingestion. Changing this forces a new resource to be created.
:param pulumi.Input[str] location: The location where the Kusto Database should be created. Changing this forces a new resource to be created.
:param pulumi.Input[str] mapping_rule_name: Specifies the mapping rule used for the message ingestion. Mapping rule must exist before resource is created.
:param pulumi.Input[str] name: The name of the Kusto EventHub Data Connection to create. Changing this forces a new resource to be created.
:param pulumi.Input[str] resource_group_name: Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.
:param pulumi.Input[str] table_name: Specifies the target table name used for the message ingestion. Table must exist before resource is created.
"""
if cluster_name is not None:
pulumi.set(__self__, "cluster_name", cluster_name)
if compression is not None:
pulumi.set(__self__, "compression", compression)
if consumer_group is not None:
pulumi.set(__self__, "consumer_group", consumer_group)
if data_format is not None:
pulumi.set(__self__, "data_format", data_format)
if database_name is not None:
pulumi.set(__self__, "database_name", database_name)
if event_system_properties is not None:
pulumi.set(__self__, "event_system_properties", event_system_properties)
if eventhub_id is not None:
pulumi.set(__self__, "eventhub_id", eventhub_id)
if location is not None:
pulumi.set(__self__, "location", location)
if mapping_rule_name is not None:
pulumi.set(__self__, "mapping_rule_name", mapping_rule_name)
if name is not None:
pulumi.set(__self__, "name", name)
if resource_group_name is not None:
pulumi.set(__self__, "resource_group_name", resource_group_name)
if table_name is not None:
pulumi.set(__self__, "table_name", table_name)
@property
@pulumi.getter(name="clusterName")
def cluster_name(self) -> Optional[pulumi.Input[str]]:
"""
Specifies the name of the Kusto Cluster this data connection will be added to. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "cluster_name")
@cluster_name.setter
def cluster_name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "cluster_name", value)
@property
@pulumi.getter
def compression(self) -> Optional[pulumi.Input[str]]:
"""
Specifies compression type for the connection. Allowed values: `GZip` and `None`. Defaults to `None`. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "compression")
@compression.setter
def compression(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "compression", value)
@property
@pulumi.getter(name="consumerGroup")
def consumer_group(self) -> Optional[pulumi.Input[str]]:
"""
Specifies the EventHub consumer group this data connection will use for ingestion. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "consumer_group")
@consumer_group.setter
def consumer_group(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "consumer_group", value)
@property
@pulumi.getter(name="dataFormat")
def data_format(self) -> Optional[pulumi.Input[str]]:
"""
Specifies the data format of the EventHub messages. Allowed values: `APACHEAVRO`, `AVRO`, `CSV`, `JSON`, `MULTIJSON`, `ORC`, `PARQUET`, `PSV`, `RAW`, `SCSV`, `SINGLEJSON`, `SOHSV`, `TSVE`, `TSV`, `TXT`, and `W3CLOGFILE`.
"""
return pulumi.get(self, "data_format")
@data_format.setter
def data_format(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "data_format", value)
@property
@pulumi.getter(name="databaseName")
def database_name(self) -> Optional[pulumi.Input[str]]:
"""
Specifies the name of the Kusto Database this data connection will be added to. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "database_name")
@database_name.setter
def database_name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "database_name", value)
@property
@pulumi.getter(name="eventSystemProperties")
def event_system_properties(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
"""
Specifies a list of system properties for the Event Hub.
"""
return pulumi.get(self, "event_system_properties")
@event_system_properties.setter
def event_system_properties(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "event_system_properties", value)
@property
@pulumi.getter(name="eventhubId")
def eventhub_id(self) -> Optional[pulumi.Input[str]]:
"""
Specifies the resource id of the EventHub this data connection will use for ingestion. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "eventhub_id")
@eventhub_id.setter
def eventhub_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "eventhub_id", value)
@property
@pulumi.getter
def location(self) -> Optional[pulumi.Input[str]]:
"""
The location where the Kusto Database should be created. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "location")
@location.setter
def location(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "location", value)
@property
@pulumi.getter(name="mappingRuleName")
def mapping_rule_name(self) -> Optional[pulumi.Input[str]]:
"""
Specifies the mapping rule used for the message ingestion. Mapping rule must exist before resource is created.
"""
return pulumi.get(self, "mapping_rule_name")
@mapping_rule_name.setter
def mapping_rule_name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "mapping_rule_name", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
The name of the Kusto EventHub Data Connection to create. Changing this forces a new resource 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="resourceGroupName")
def resource_group_name(self) -> Optional[pulumi.Input[str]]:
"""
Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "resource_group_name")
@resource_group_name.setter
def resource_group_name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "resource_group_name", value)
@property
@pulumi.getter(name="tableName")
def table_name(self) -> Optional[pulumi.Input[str]]:
"""
Specifies the target table name used for the message ingestion. Table must exist before resource is created.
"""
return pulumi.get(self, "table_name")
@table_name.setter
def table_name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "table_name", value)
class EventhubDataConnection(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
cluster_name: Optional[pulumi.Input[str]] = None,
compression: Optional[pulumi.Input[str]] = None,
consumer_group: Optional[pulumi.Input[str]] = None,
data_format: Optional[pulumi.Input[str]] = None,
database_name: Optional[pulumi.Input[str]] = None,
event_system_properties: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
eventhub_id: Optional[pulumi.Input[str]] = None,
location: Optional[pulumi.Input[str]] = None,
mapping_rule_name: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
table_name: Optional[pulumi.Input[str]] = None,
__props__=None):
"""
Manages a Kusto (also known as Azure Data Explorer) EventHub Data Connection
## Example Usage
```python
import pulumi
import pulumi_azure as azure
rg = azure.core.ResourceGroup("rg", location="West Europe")
cluster = azure.kusto.Cluster("cluster",
location=rg.location,
resource_group_name=rg.name,
sku=azure.kusto.ClusterSkuArgs(
name="Standard_D13_v2",
capacity=2,
))
database = azure.kusto.Database("database",
resource_group_name=rg.name,
location=rg.location,
cluster_name=cluster.name,
hot_cache_period="P7D",
soft_delete_period="P31D")
eventhub_ns = azure.eventhub.EventHubNamespace("eventhubNs",
location=rg.location,
resource_group_name=rg.name,
sku="Standard")
eventhub = azure.eventhub.EventHub("eventhub",
namespace_name=eventhub_ns.name,
resource_group_name=rg.name,
partition_count=1,
message_retention=1)
consumer_group = azure.eventhub.ConsumerGroup("consumerGroup",
namespace_name=eventhub_ns.name,
eventhub_name=eventhub.name,
resource_group_name=rg.name)
eventhub_connection = azure.kusto.EventhubDataConnection("eventhubConnection",
resource_group_name=rg.name,
location=rg.location,
cluster_name=cluster.name,
database_name=database.name,
eventhub_id=eventhub.id,
consumer_group=consumer_group.name,
table_name="my-table",
mapping_rule_name="my-table-mapping",
data_format="JSON")
#(Optional)
```
## Import
Kusto EventHub Data Connections can be imported using the `resource id`, e.g.
```sh
$ pulumi import azure:kusto/eventhubDataConnection:EventhubDataConnection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Kusto/Clusters/cluster1/Databases/database1/DataConnections/eventHubConnection1
```
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] cluster_name: Specifies the name of the Kusto Cluster this data connection will be added to. Changing this forces a new resource to be created.
:param pulumi.Input[str] compression: Specifies compression type for the connection. Allowed values: `GZip` and `None`. Defaults to `None`. Changing this forces a new resource to be created.
:param pulumi.Input[str] consumer_group: Specifies the EventHub consumer group this data connection will use for ingestion. Changing this forces a new resource to be created.
:param pulumi.Input[str] data_format: Specifies the data format of the EventHub messages. Allowed values: `APACHEAVRO`, `AVRO`, `CSV`, `JSON`, `MULTIJSON`, `ORC`, `PARQUET`, `PSV`, `RAW`, `SCSV`, `SINGLEJSON`, `SOHSV`, `TSVE`, `TSV`, `TXT`, and `W3CLOGFILE`.
:param pulumi.Input[str] database_name: Specifies the name of the Kusto Database this data connection will be added to. Changing this forces a new resource to be created.
:param pulumi.Input[Sequence[pulumi.Input[str]]] event_system_properties: Specifies a list of system properties for the Event Hub.
:param pulumi.Input[str] eventhub_id: Specifies the resource id of the EventHub this data connection will use for ingestion. Changing this forces a new resource to be created.
:param pulumi.Input[str] location: The location where the Kusto Database should be created. Changing this forces a new resource to be created.
:param pulumi.Input[str] mapping_rule_name: Specifies the mapping rule used for the message ingestion. Mapping rule must exist before resource is created.
:param pulumi.Input[str] name: The name of the Kusto EventHub Data Connection to create. Changing this forces a new resource to be created.
:param pulumi.Input[str] resource_group_name: Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.
:param pulumi.Input[str] table_name: Specifies the target table name used for the message ingestion. Table must exist before resource is created.
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: EventhubDataConnectionArgs,
opts: Optional[pulumi.ResourceOptions] = None):
"""
Manages a Kusto (also known as Azure Data Explorer) EventHub Data Connection
## Example Usage
```python
import pulumi
import pulumi_azure as azure
rg = azure.core.ResourceGroup("rg", location="West Europe")
cluster = azure.kusto.Cluster("cluster",
location=rg.location,
resource_group_name=rg.name,
sku=azure.kusto.ClusterSkuArgs(
name="Standard_D13_v2",
capacity=2,
))
database = azure.kusto.Database("database",
resource_group_name=rg.name,
location=rg.location,
cluster_name=cluster.name,
hot_cache_period="P7D",
soft_delete_period="P31D")
eventhub_ns = azure.eventhub.EventHubNamespace("eventhubNs",
location=rg.location,
resource_group_name=rg.name,
sku="Standard")
eventhub = azure.eventhub.EventHub("eventhub",
namespace_name=eventhub_ns.name,
resource_group_name=rg.name,
partition_count=1,
message_retention=1)
consumer_group = azure.eventhub.ConsumerGroup("consumerGroup",
namespace_name=eventhub_ns.name,
eventhub_name=eventhub.name,
resource_group_name=rg.name)
eventhub_connection = azure.kusto.EventhubDataConnection("eventhubConnection",
resource_group_name=rg.name,
location=rg.location,
cluster_name=cluster.name,
database_name=database.name,
eventhub_id=eventhub.id,
consumer_group=consumer_group.name,
table_name="my-table",
mapping_rule_name="my-table-mapping",
data_format="JSON")
#(Optional)
```
## Import
Kusto EventHub Data Connections can be imported using the `resource id`, e.g.
```sh
$ pulumi import azure:kusto/eventhubDataConnection:EventhubDataConnection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Kusto/Clusters/cluster1/Databases/database1/DataConnections/eventHubConnection1
```
:param str resource_name: The name of the resource.
:param EventhubDataConnectionArgs 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(EventhubDataConnectionArgs, 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,
cluster_name: Optional[pulumi.Input[str]] = None,
compression: Optional[pulumi.Input[str]] = None,
consumer_group: Optional[pulumi.Input[str]] = None,
data_format: Optional[pulumi.Input[str]] = None,
database_name: Optional[pulumi.Input[str]] = None,
event_system_properties: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
eventhub_id: Optional[pulumi.Input[str]] = None,
location: Optional[pulumi.Input[str]] = None,
mapping_rule_name: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
table_name: 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__ = EventhubDataConnectionArgs.__new__(EventhubDataConnectionArgs)
if cluster_name is None and not opts.urn:
raise TypeError("Missing required property 'cluster_name'")
__props__.__dict__["cluster_name"] = cluster_name
__props__.__dict__["compression"] = compression
if consumer_group is None and not opts.urn:
raise TypeError("Missing required property 'consumer_group'")
__props__.__dict__["consumer_group"] = consumer_group
__props__.__dict__["data_format"] = data_format
if database_name is None and not opts.urn:
raise TypeError("Missing required property 'database_name'")
__props__.__dict__["database_name"] = database_name
__props__.__dict__["event_system_properties"] = event_system_properties
if eventhub_id is None and not opts.urn:
raise TypeError("Missing required property 'eventhub_id'")
__props__.__dict__["eventhub_id"] = eventhub_id
__props__.__dict__["location"] = location
__props__.__dict__["mapping_rule_name"] = mapping_rule_name
__props__.__dict__["name"] = name
if resource_group_name is None and not opts.urn:
raise TypeError("Missing required property 'resource_group_name'")
__props__.__dict__["resource_group_name"] = resource_group_name
__props__.__dict__["table_name"] = table_name
super(EventhubDataConnection, __self__).__init__(
'azure:kusto/eventhubDataConnection:EventhubDataConnection',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None,
cluster_name: Optional[pulumi.Input[str]] = None,
compression: Optional[pulumi.Input[str]] = None,
consumer_group: Optional[pulumi.Input[str]] = None,
data_format: Optional[pulumi.Input[str]] = None,
database_name: Optional[pulumi.Input[str]] = None,
event_system_properties: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
eventhub_id: Optional[pulumi.Input[str]] = None,
location: Optional[pulumi.Input[str]] = None,
mapping_rule_name: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
table_name: Optional[pulumi.Input[str]] = None) -> 'EventhubDataConnection':
"""
Get an existing EventhubDataConnection 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] cluster_name: Specifies the name of the Kusto Cluster this data connection will be added to. Changing this forces a new resource to be created.
:param pulumi.Input[str] compression: Specifies compression type for the connection. Allowed values: `GZip` and `None`. Defaults to `None`. Changing this forces a new resource to be created.
:param pulumi.Input[str] consumer_group: Specifies the EventHub consumer group this data connection will use for ingestion. Changing this forces a new resource to be created.
:param pulumi.Input[str] data_format: Specifies the data format of the EventHub messages. Allowed values: `APACHEAVRO`, `AVRO`, `CSV`, `JSON`, `MULTIJSON`, `ORC`, `PARQUET`, `PSV`, `RAW`, `SCSV`, `SINGLEJSON`, `SOHSV`, `TSVE`, `TSV`, `TXT`, and `W3CLOGFILE`.
:param pulumi.Input[str] database_name: Specifies the name of the Kusto Database this data connection will be added to. Changing this forces a new resource to be created.
:param pulumi.Input[Sequence[pulumi.Input[str]]] event_system_properties: Specifies a list of system properties for the Event Hub.
:param pulumi.Input[str] eventhub_id: Specifies the resource id of the EventHub this data connection will use for ingestion. Changing this forces a new resource to be created.
:param pulumi.Input[str] location: The location where the Kusto Database should be created. Changing this forces a new resource to be created.
:param pulumi.Input[str] mapping_rule_name: Specifies the mapping rule used for the message ingestion. Mapping rule must exist before resource is created.
:param pulumi.Input[str] name: The name of the Kusto EventHub Data Connection to create. Changing this forces a new resource to be created.
:param pulumi.Input[str] resource_group_name: Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.
:param pulumi.Input[str] table_name: Specifies the target table name used for the message ingestion. Table must exist before resource is created.
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _EventhubDataConnectionState.__new__(_EventhubDataConnectionState)
__props__.__dict__["cluster_name"] = cluster_name
__props__.__dict__["compression"] = compression
__props__.__dict__["consumer_group"] = consumer_group
__props__.__dict__["data_format"] = data_format
__props__.__dict__["database_name"] = database_name
__props__.__dict__["event_system_properties"] = event_system_properties
__props__.__dict__["eventhub_id"] = eventhub_id
__props__.__dict__["location"] = location
__props__.__dict__["mapping_rule_name"] = mapping_rule_name
__props__.__dict__["name"] = name
__props__.__dict__["resource_group_name"] = resource_group_name
__props__.__dict__["table_name"] = table_name
return EventhubDataConnection(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter(name="clusterName")
def cluster_name(self) -> pulumi.Output[str]:
"""
Specifies the name of the Kusto Cluster this data connection will be added to. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "cluster_name")
@property
@pulumi.getter
def compression(self) -> pulumi.Output[Optional[str]]:
"""
Specifies compression type for the connection. Allowed values: `GZip` and `None`. Defaults to `None`. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "compression")
@property
@pulumi.getter(name="consumerGroup")
def consumer_group(self) -> pulumi.Output[str]:
"""
Specifies the EventHub consumer group this data connection will use for ingestion. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "consumer_group")
@property
@pulumi.getter(name="dataFormat")
def data_format(self) -> pulumi.Output[Optional[str]]:
"""
Specifies the data format of the EventHub messages. Allowed values: `APACHEAVRO`, `AVRO`, `CSV`, `JSON`, `MULTIJSON`, `ORC`, `PARQUET`, `PSV`, `RAW`, `SCSV`, `SINGLEJSON`, `SOHSV`, `TSVE`, `TSV`, `TXT`, and `W3CLOGFILE`.
"""
return pulumi.get(self, "data_format")
@property
@pulumi.getter(name="databaseName")
def database_name(self) -> pulumi.Output[str]:
"""
Specifies the name of the Kusto Database this data connection will be added to. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "database_name")
@property
@pulumi.getter(name="eventSystemProperties")
def event_system_properties(self) -> pulumi.Output[Sequence[str]]:
"""
Specifies a list of system properties for the Event Hub.
"""
return pulumi.get(self, "event_system_properties")
@property
@pulumi.getter(name="eventhubId")
def eventhub_id(self) -> pulumi.Output[str]:
"""
Specifies the resource id of the EventHub this data connection will use for ingestion. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "eventhub_id")
@property
@pulumi.getter
def location(self) -> pulumi.Output[str]:
"""
The location where the Kusto Database should be created. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "location")
@property
@pulumi.getter(name="mappingRuleName")
def mapping_rule_name(self) -> pulumi.Output[Optional[str]]:
"""
Specifies the mapping rule used for the message ingestion. Mapping rule must exist before resource is created.
"""
return pulumi.get(self, "mapping_rule_name")
@property
@pulumi.getter
def name(self) -> pulumi.Output[str]:
"""
The name of the Kusto EventHub Data Connection to create. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "name")
@property
@pulumi.getter(name="resourceGroupName")
def resource_group_name(self) -> pulumi.Output[str]:
"""
Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "resource_group_name")
@property
@pulumi.getter(name="tableName")
def table_name(self) -> pulumi.Output[Optional[str]]:
"""
Specifies the target table name used for the message ingestion. Table must exist before resource is created.
"""
return pulumi.get(self, "table_name")
| 51.284062 | 266 | 0.668864 | 4,837 | 39,899 | 5.333471 | 0.050238 | 0.073765 | 0.085743 | 0.071633 | 0.928056 | 0.91697 | 0.908598 | 0.890612 | 0.885534 | 0.881037 | 0 | 0.003209 | 0.234592 | 39,899 | 777 | 267 | 51.350064 | 0.841547 | 0.432968 | 0 | 0.77561 | 1 | 0 | 0.108737 | 0.020437 | 0 | 0 | 0 | 0 | 0 | 1 | 0.163415 | false | 0.002439 | 0.012195 | 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 | 1 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
14c3a7e07179942ca7f02e7757d29d0c5cee70ff | 5,975 | py | Python | naivenmt/layers/decoders_test.py | naivenmt/naivenmt-tf | dc267d980eebf79887d89ac42eff8804ad96bac8 | [
"Apache-2.0"
] | null | null | null | naivenmt/layers/decoders_test.py | naivenmt/naivenmt-tf | dc267d980eebf79887d89ac42eff8804ad96bac8 | [
"Apache-2.0"
] | 4 | 2020-11-13T18:35:42.000Z | 2022-02-10T00:38:08.000Z | naivenmt/layers/decoders_test.py | naivenmt/naivenmt-tf | dc267d980eebf79887d89ac42eff8804ad96bac8 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The naivenmt authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import tensorflow as tf
from naivenmt.layers.decoders import BiRNNDecoder, UniRNNDecoder
BATCH_SIZE = 2
SRC_SEQ_LEN = 3
TGT_SEQ_LEN = 1
UNITS = 16
TGT_VOCAB_SIZE = 50
EMBEDDING_SIZE = 32
class DecodersTest(tf.test.TestCase):
def testUniGRUDecoder(self):
x = tf.constant([1, 2], shape=(BATCH_SIZE, TGT_SEQ_LEN))
initial_state = tf.zeros((BATCH_SIZE, UNITS))
enc_output = tf.random.uniform((BATCH_SIZE, SRC_SEQ_LEN, UNITS))
for attention in ['bahdanau', 'luong']:
decoder = UniRNNDecoder(UNITS, TGT_VOCAB_SIZE, EMBEDDING_SIZE, unit_name='gru', attention=attention)
output, state, attn_weights = decoder(x, state=initial_state, enc_output=enc_output)
self.assertAllEqual([BATCH_SIZE, TGT_VOCAB_SIZE], output.shape)
self.assertAllEqual([BATCH_SIZE, UNITS], state.shape)
self.assertAllEqual([BATCH_SIZE, SRC_SEQ_LEN], attn_weights.shape)
def testUniLSTMDecoder(self):
x = tf.constant([1, 2], shape=(BATCH_SIZE, TGT_SEQ_LEN))
initial_state = tf.zeros((BATCH_SIZE, UNITS))
enc_output = tf.random.uniform((BATCH_SIZE, SRC_SEQ_LEN, UNITS))
for attention in ['bahdanau', 'luong']:
decoder = UniRNNDecoder(UNITS, TGT_VOCAB_SIZE, EMBEDDING_SIZE, unit_name='lstm', attention=attention)
output, (state_h, state_c), attn_weights = decoder(
x, state=(initial_state, initial_state), enc_output=enc_output)
self.assertAllEqual([BATCH_SIZE, TGT_VOCAB_SIZE], output.shape)
self.assertAllEqual([BATCH_SIZE, UNITS], state_h.shape)
self.assertAllEqual([BATCH_SIZE, UNITS], state_c.shape)
self.assertAllEqual([BATCH_SIZE, SRC_SEQ_LEN], attn_weights.shape)
def testBiGRUDecoder(self):
x = tf.constant([1, 2], shape=(BATCH_SIZE, TGT_SEQ_LEN))
initial_state = tf.zeros((BATCH_SIZE, UNITS))
enc_output = tf.random.uniform((BATCH_SIZE, SRC_SEQ_LEN, UNITS))
for attention in ['bahdanau', 'luong']:
decoder = BiRNNDecoder(UNITS, TGT_VOCAB_SIZE, EMBEDDING_SIZE, unit_name='gru',
attention=attention, merge_mode='concat')
output, (state_h, state_c), attn_weights = decoder(
x, state=(initial_state, initial_state),
enc_output=enc_output)
self.assertAllEqual([BATCH_SIZE, TGT_VOCAB_SIZE], output.shape)
self.assertAllEqual([BATCH_SIZE, UNITS], state_h.shape)
self.assertAllEqual([BATCH_SIZE, UNITS], state_c.shape)
self.assertAllEqual([BATCH_SIZE, SRC_SEQ_LEN], attn_weights.shape)
for mode in ['ave', 'sum', 'mul']:
decoder = BiRNNDecoder(UNITS, TGT_VOCAB_SIZE, EMBEDDING_SIZE, unit_name='gru',
attention=attention, merge_mode=mode)
output, (state_h, state_c), attn_weights = decoder(
x, state=(initial_state, initial_state),
enc_output=enc_output)
self.assertAllEqual([BATCH_SIZE, TGT_VOCAB_SIZE], output.shape)
self.assertAllEqual([BATCH_SIZE, UNITS], state_h.shape)
self.assertAllEqual([BATCH_SIZE, UNITS], state_c.shape)
self.assertAllEqual([BATCH_SIZE, SRC_SEQ_LEN], attn_weights.shape)
def testBiLSTMDecoder(self):
x = tf.constant([1, 2], shape=(BATCH_SIZE, TGT_SEQ_LEN))
initial_state = tf.zeros((BATCH_SIZE, UNITS))
enc_output = tf.random.uniform((BATCH_SIZE, SRC_SEQ_LEN, UNITS))
for attention in ['bahdanau', 'luong']:
decoder = BiRNNDecoder(UNITS, TGT_VOCAB_SIZE, EMBEDDING_SIZE, unit_name='lstm',
attention=attention, merge_mode='concat')
output, (state_fw_h, state_fw_c, state_bw_h, state_bw_c), attn_weights = decoder(
x, state=(initial_state, initial_state, initial_state, initial_state), enc_output=enc_output)
self.assertAllEqual([BATCH_SIZE, TGT_VOCAB_SIZE], output.shape)
self.assertAllEqual([BATCH_SIZE, UNITS], state_fw_h.shape)
self.assertAllEqual([BATCH_SIZE, UNITS], state_fw_c.shape)
self.assertAllEqual([BATCH_SIZE, UNITS], state_bw_h.shape)
self.assertAllEqual([BATCH_SIZE, UNITS], state_bw_c.shape)
self.assertAllEqual([BATCH_SIZE, SRC_SEQ_LEN], attn_weights.shape)
for mode in ['ave', 'sum', 'mul']:
decoder = BiRNNDecoder(UNITS, TGT_VOCAB_SIZE, EMBEDDING_SIZE, unit_name='lstm',
attention=attention, merge_mode=mode)
output, (state_fw_h, state_fw_c, state_bw_h, state_bw_c), attn_weights = decoder(
x, state=(initial_state, initial_state, initial_state, initial_state), enc_output=enc_output)
self.assertAllEqual([BATCH_SIZE, TGT_VOCAB_SIZE], output.shape)
self.assertAllEqual([BATCH_SIZE, UNITS], state_fw_h.shape)
self.assertAllEqual([BATCH_SIZE, UNITS], state_fw_c.shape)
self.assertAllEqual([BATCH_SIZE, UNITS], state_bw_h.shape)
self.assertAllEqual([BATCH_SIZE, UNITS], state_bw_c.shape)
self.assertAllEqual([BATCH_SIZE, SRC_SEQ_LEN], attn_weights.shape)
if __name__ == "__main__":
tf.test.main()
| 51.508621 | 113 | 0.658243 | 751 | 5,975 | 4.952064 | 0.170439 | 0.0968 | 0.16698 | 0.19602 | 0.805593 | 0.805593 | 0.805593 | 0.795106 | 0.795106 | 0.795106 | 0 | 0.005485 | 0.237155 | 5,975 | 115 | 114 | 51.956522 | 0.810443 | 0.093389 | 0 | 0.759036 | 0 | 0 | 0.020544 | 0 | 0 | 0 | 0 | 0 | 0.325301 | 1 | 0.048193 | false | 0 | 0.024096 | 0 | 0.084337 | 0 | 0 | 0 | 0 | null | 0 | 0 | 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 | 8 |
14cdf09564f0e08801ee09cf722531a3c10247b2 | 124 | wsgi | Python | adapter.wsgi | gustavwennerblom/calendar-alexa | a5f8bdb222861abd75d678c28647cf1131c3535d | [
"Apache-2.0"
] | null | null | null | adapter.wsgi | gustavwennerblom/calendar-alexa | a5f8bdb222861abd75d678c28647cf1131c3535d | [
"Apache-2.0"
] | null | null | null | adapter.wsgi | gustavwennerblom/calendar-alexa | a5f8bdb222861abd75d678c28647cf1131c3535d | [
"Apache-2.0"
] | null | null | null | import sys
sys.path.insert(0, "/home/ubuntu/speech_root/calendar-alexa/calendar-alexa")
from main import app as application
| 31 | 76 | 0.806452 | 20 | 124 | 4.95 | 0.8 | 0.262626 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.008772 | 0.080645 | 124 | 3 | 77 | 41.333333 | 0.859649 | 0 | 0 | 0 | 0 | 0 | 0.435484 | 0.435484 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.666667 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 7 |
14e07389221e6c1256b1683b0da881902d63d55b | 46,874 | py | Python | src/genie/libs/parser/iosxr/tests/test_show_rip.py | kacann/genieparser | 76e19003199c393c59a33546726de3ff5486da80 | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/iosxr/tests/test_show_rip.py | kacann/genieparser | 76e19003199c393c59a33546726de3ff5486da80 | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/iosxr/tests/test_show_rip.py | kacann/genieparser | 76e19003199c393c59a33546726de3ff5486da80 | [
"Apache-2.0"
] | 1 | 2021-07-07T18:07:56.000Z | 2021-07-07T18:07:56.000Z | # Python
import re
import unittest
from unittest.mock import Mock
# ATS
from ats.topology import Device
# Metaparser
from genie.metaparser.util.exceptions import SchemaEmptyParserError
# Parser
from genie.libs.parser.iosxr.show_rip import ShowRip, \
ShowRipStatistics, \
ShowRipDatabase, \
ShowRipInterface
# ===============================
# Unit tests for:
# 'show rip'
# 'show rip vrf all'
# ===============================
class test_show_rip(unittest.TestCase):
device = Device(name="aDevice")
empty_output = {'execute.return_value': ''}
golden_parsed_output = {
'vrf': {
'default': {
'address_family': {
'ipv4': {
'instance': {
'rip': {
'active': 'Yes',
'added_to_socket': 'Yes',
'out_of_memory_state': 'Normal',
'version': 2,
'default_metric': '3',
'maximum_paths': 4,
'auto_summarize': 'No',
'broadcast_for_v2': 'No',
'packet_source_validation': 'Yes',
'nsf': 'Disabled',
'timers': {
'until_next_update': 7,
'update_interval': 10,
'invalid_interval': 31,
'holddown_interval': 32,
'flush_interval': 33
}
}
}
}
}
}
}
}
golden_output = {'execute.return_value': '''\
RP/0/RP0/CPU0:R1#show rip
Wed Jan 30 18:47:49.312 UTC
RIP config:
Active: Yes
Added to socket: Yes
Out-of-memory state: Normal
Version: 2
Default metric: 3
Maximum paths: 4
Auto summarize: No
Broadcast for V2: No
Packet source validation: Yes
NSF: Disabled
Timers: Update: 10 seconds (7 seconds until next update)
Invalid: 31 seconds
Holddown: 32 seconds
Flush: 33 seconds
'''}
golden_parsed_output_2 = {
'vrf': {
'all': {
'address_family': {
'ipv4': {
'instance': {
'rip': {
'active': 'Yes',
'added_to_socket': 'Yes',
'out_of_memory_state': 'Normal',
'version': 2,
'default_metric': '1',
'maximum_paths': 4,
'auto_summarize': 'No',
'broadcast_for_v2': 'No',
'packet_source_validation': 'No',
'nsf': 'Disabled',
'timers': {
'until_next_update': 18,
'update_interval': 30,
'invalid_interval': 180,
'holddown_interval': 180,
'flush_interval': 240
}
}
}
}
}
}
}
}
golden_output_2 = {'execute.return_value': '''\
RP/0/RP0/CPU0:R1#show rip vrf all
Wed Jan 30 18:48:40.235 UTC
VRF: VRF1
=======================================
RIP config:
Active: Yes
Added to socket: Yes
Out-of-memory state: Normal
Version: 2
Default metric: 1
Maximum paths: 4
Auto summarize: No
Broadcast for V2: No
Packet source validation: No
NSF: Disabled
Timers: Update: 30 seconds (18 seconds until next update)
Invalid: 180 seconds
Holddown: 180 seconds
Flush: 240 seconds
'''}
def test_empty(self):
self.device = Mock(**self.empty_output)
obj = ShowRip(device=self.device)
with self.assertRaises(SchemaEmptyParserError):
parsed_output = obj.parse()
def test_golden(self):
self.device = Mock(**self.golden_output)
obj = ShowRip(device=self.device)
parsed_output = obj.parse()
self.assertEqual(parsed_output, self.golden_parsed_output)
def test_golden_vrf_all(self):
self.device = Mock(**self.golden_output_2)
obj = ShowRip(device=self.device)
parsed_output = obj.parse(vrf='all')
self.assertEqual(parsed_output, self.golden_parsed_output_2)
# ===============================
# Unit tests for:
# show rip statistics
# show rip vrf {vrf} statistics
# ===============================
class test_show_rip_statistics(unittest.TestCase):
device = Device(name='aDevice')
empty_output = {'execute.return_value': ''}
golden_parsed_output = {
'vrf': {
'default': {
'address_family': {
'ipv4': {
'instance': {
'rip': {
'statistics': {
'total_messages_sent': 5294,
'message_send_failures': 0,
'regular_updates_sent': 2944,
'queries_responsed_to': 0,
'rib_updates': 4365,
'total_packets_received': 4896,
'packets_discarded': 0,
'routes_discarded': 4760,
'packets_received_at_standby': 0,
'routes_allocated': 9,
'paths_allocated': 6,
'route_malloc_failures': 0,
'path_malloc_failures': 0
}
}
}
}
}
}
}
}
golden_output = {'execute.return_value': '''\
RP/0/RP0/CPU0:R1#show rip statistics
Wed Jan 30 18:50:57.778 UTC
RIP statistics:
Total messages sent: 5294
Message send failures: 0
Regular updates sent: 2944
Queries responsed to: 0
RIB updates: 4365
Total packets received: 4896
Discarded packets: 0
Discarded routes: 4760
Packet received at standby: 0
Number of routes allocated: 9
Number of paths allocated: 6
Route malloc failures: 0
Path malloc failures: 0
'''}
golden_parsed_output_2 = {
'vrf': {
'VRF1': {
'address_family': {
'ipv4': {
'instance': {
'rip': {
'statistics': {
'total_messages_sent': 995,
'message_send_failures': 0,
'regular_updates_sent': 988,
'queries_responsed_to': 0,
'rib_updates': 6,
'total_packets_received': 495,
'packets_discarded': 0,
'routes_discarded': 0,
'packets_received_at_standby': 0,
'routes_allocated': 11,
'paths_allocated': 7,
'route_malloc_failures': 0,
'path_malloc_failures': 0
}
}
}
}
}
}
}
}
golden_output_2 = {'execute.return_value': '''\
RP/0/RP0/CPU0:R1#show rip vrf VRF1 statistics
Wed Jan 30 18:51:24.635 UTC
RIP statistics:
Total messages sent: 995
Message send failures: 0
Regular updates sent: 988
Queries responsed to: 0
RIB updates: 6
Total packets received: 495
Discarded packets: 0
Discarded routes: 0
Packet received at standby: 0
Number of routes allocated: 11
Number of paths allocated: 7
Route malloc failures: 0
Path malloc failures: 0
'''}
def test_empty(self):
self.device = Mock(**self.empty_output)
obj = ShowRipStatistics(device=self.device)
with self.assertRaises(SchemaEmptyParserError):
parsed_output = obj.parse()
def test_golden_statistics(self):
self.device = Mock(**self.golden_output)
obj = ShowRipStatistics(device=self.device)
parsed_output = obj.parse()
self.assertEqual(parsed_output, self.golden_parsed_output)
def test_golden_vrf_statistics(self):
self.device = Mock(**self.golden_output_2)
obj = ShowRipStatistics(device=self.device)
parsed_output = obj.parse(vrf='VRF1')
self.assertEqual(parsed_output, self.golden_parsed_output_2)
# ===============================
# Unit tests for:
# show rip database
# show rip vrf {vrf} database
# ===============================
class test_show_rip_database(unittest.TestCase):
device = Device(name='aDevice')
empty_output = {'execute.return_value': ''}
golden_parsed_output = {
'vrf': {
'default': {
'address_family': {
'ipv4': {
'instance': {
'rip': {
'routes': {
'10.1.2.0/24': {
'index': {
1: {
'metric': 0,
'route_type': 'connected',
'interface': 'GigabitEthernet0/0/0/0.100'
}
}
},
'10.1.3.0/24': {
'index': {
1: {
'metric': 0,
'route_type': 'connected',
'interface': 'GigabitEthernet0/0/0/1.100'
}
}
},
'10.0.0.0/8': {
'index': {
1: {
'summary_type': 'auto-summary'
}
}
},
'172.16.1.0/24': {
'index': {
1: {
'metric': 3,
'distance': 0,
'redistributed': True
}
}
},
'172.16.11.0/24': {
'index': {
1: {
'metric': 3,
'distance': 1,
'redistributed': True
}
}
},
'172.16.22.0/24': {
'index': {
1: {
'metric': 11,
'next_hop': '10.1.2.2',
'up_time': '15s',
'interface': 'GigabitEthernet0/0/0/0.100'
}
}
},
'172.16.0.0/16': {
'index': {
1: {
'summary_type': 'auto-summary'
}
}
},
'192.168.1.1/32': {
'index': {
1: {
'metric': 3,
'distance': 0,
'redistributed': True
}
}
},
'192.168.1.0/24': {
'index': {
1: {
'summary_type': 'auto-summary'
}
}
}
}
}
}
}
}
}
}
}
golden_output = {'execute.return_value': '''\
RP/0/RP0/CPU0:R1#show rip database
Wed Jan 30 18:48:59.532 UTC
Routes held in RIP's topology database:
10.1.2.0/24
[0] directly connected, GigabitEthernet0/0/0/0.100
10.1.3.0/24
[0] directly connected, GigabitEthernet0/0/0/1.100
10.0.0.0/8 auto-summary
172.16.1.0/24
[3] distance: 0 redistributed
172.16.11.0/24
[3] distance: 1 redistributed
172.16.22.0/24
[11] via 10.1.2.2, next hop 10.1.2.2, Uptime: 15s, GigabitEthernet0/0/0/0.100
172.16.0.0/16 auto-summary
192.168.1.1/32
[3] distance: 0 redistributed
192.168.1.0/24 auto-summary
'''}
golden_parsed_output_2 = {
'vrf': {
'VRF1': {
'address_family': {
'ipv4': {
'instance': {
'rip': {
'routes': {
'10.1.2.0/24': {
'index': {
1: {
'metric': 0,
'route_type': 'connected',
'interface': 'GigabitEthernet0/0/0/0.200'
}
}
},
'10.1.3.0/24': {
'index': {
1: {
'metric': 0,
'route_type': 'connected',
'interface': 'GigabitEthernet0/0/0/1.200'
}
}
},
'10.2.3.0/24': {
'index': {
1: {
'metric': 1,
'next_hop': '10.1.2.2',
'up_time': '10s',
'interface': 'GigabitEthernet0/0/0/0.200'
}
}
},
'10.0.0.0/8': {
'index': {
1: {
'summary_type': 'auto-summary'
}
}
},
'172.16.11.0/24': {
'index': {
1: {
'metric': 15,
'distance': 1,
'redistributed': True
}
}
},
'172.16.22.0/24': {
'index': {
1: {
'metric': 1,
'next_hop': '10.1.2.2',
'up_time': '10s',
'interface': 'GigabitEthernet0/0/0/0.200'
}
}
},
'172.16.0.0/16': {
'index': {
1: {
'summary_type': 'auto-summary'
}
}
},
'192.168.1.1/32': {
'index': {
1: {
'metric': 1,
'distance': 0,
'redistributed': True
}
}
},
'192.168.1.0/24': {
'index': {
1: {
'summary_type': 'auto-summary'
}
}
},
'192.168.2.2/32': {
'index': {
1: {
'metric': 1,
'next_hop': '10.1.2.2',
'up_time': '10s',
'interface': 'GigabitEthernet0/0/0/0.200'
}
}
},
'192.168.2.0/24': {
'index': {
1: {
'summary_type': 'auto-summary'
}
}
}
}
}
}
}
}
}
}
}
golden_output_2 = {'execute.return_value': '''\
RP/0/RP0/CPU0:R1#show rip vrf VRF1 database
Wed Jan 30 18:49:22.086 UTC
Routes held in RIP's topology database:
10.1.2.0/24
[0] directly connected, GigabitEthernet0/0/0/0.200
10.1.3.0/24
[0] directly connected, GigabitEthernet0/0/0/1.200
10.2.3.0/24
[1] via 10.1.2.2, next hop 10.1.2.2, Uptime: 10s, GigabitEthernet0/0/0/0.200
10.0.0.0/8 auto-summary
172.16.11.0/24
[15] distance: 1 redistributed
172.16.22.0/24
[1] via 10.1.2.2, next hop 10.1.2.2, Uptime: 10s, GigabitEthernet0/0/0/0.200
172.16.0.0/16 auto-summary
192.168.1.1/32
[1] distance: 0 redistributed
192.168.1.0/24 auto-summary
192.168.2.2/32
[1] via 10.1.2.2, next hop 10.1.2.2, Uptime: 10s, GigabitEthernet0/0/0/0.200
192.168.2.0/24 auto-summary
'''}
def test_empty(self):
self.device = Mock(**self.empty_output)
obj = ShowRipDatabase(device=self.device)
with self.assertRaises(SchemaEmptyParserError):
parsed_output = obj.parse()
def test_golden_database(self):
self.device = Mock(**self.golden_output)
obj = ShowRipDatabase(device=self.device)
parsed_output = obj.parse()
self.assertEqual(parsed_output,self.golden_parsed_output)
def test_golden_vrf_database(self):
self.device = Mock(**self.golden_output_2)
obj = ShowRipDatabase(device=self.device)
parsed_output = obj.parse(vrf='VRF1')
self.assertEqual(parsed_output,self.golden_parsed_output_2)
# ===============================
# Unit tests for:
# show rip interface
# show rip vrf {vrf} interface
# ===============================
class test_show_rip_interface(unittest.TestCase):
device = Device(name='aDevice')
empty_output = {'execute.return_value': ''}
golden_parsed_output = {
'vrf': {
'default': {
'address_family': {
'ipv4': {
'instance': {
'rip': {
'interfaces': {
'GigabitEthernet0/0/0/0.100': {
'authentication': {
'auth_key_chain': {
'key_chain': 'Not set'
},
'auth_key': {
'crypto_algorithm': 'None'
}
},
'cost': 0,
'neighbors': {
'10.1.2.2': {
'address': '10.1.2.2',
'uptime': 2,
'version': 2,
'packets_discarded': 0,
'routes_discarded': 4733
}
},
'out_of_memory_state': 'Normal',
'broadcast_for_v2': False,
'accept_metric_0': False,
'send_versions': 2,
'receive_versions': 2,
'oper_status': 'Up',
'address': '10.1.2.1/24',
'passive': True,
'split_horizon': True,
'poison_reverse': False,
'socket_set': {
'multicast_group': True,
'lpts_filter': True
},
'statistics': {
'total_packets_received': 4877
}
},
'GigabitEthernet0/0/0/1.100': {
'authentication': {
'auth_key_chain': {
'key_chain': 'Not set'
},
'auth_key': {
'crypto_algorithm': 'None'
}
},
'cost': 0,
'out_of_memory_state': 'Normal',
'broadcast_for_v2': False,
'accept_metric_0': False,
'send_versions': 2,
'receive_versions': 2,
'oper_status': 'Up',
'address': '10.1.3.1/24',
'passive': False,
'split_horizon': True,
'poison_reverse': False,
'socket_set': {
'multicast_group': True,
'lpts_filter': True
},
'statistics': {
'total_packets_received': 0
}
}
}
}
}
}
}
}
}
}
golden_output = {'execute.return_value': '''\
RP/0/RP0/CPU0:R1#show rip interface
Wed Jan 30 18:49:59.943 UTC
GigabitEthernet0/0/0/0.100
Rip enabled?: Passive
Out-of-memory state: Normal
Broadcast for V2: No
Accept Metric 0: No
Send versions: 2
Receive versions: 2
Interface state: Up
IP address: 10.1.2.1/24
Metric Cost: 0
Split horizon: Enabled
Poison Reverse: Disabled
Socket set options:
Joined multicast group: Yes
LPTS filter set: Yes
Authentication mode: None
Authentication keychain: Not set
Total packets received: 4877
Authentication mode is not set
RIP peers attached to this interface:
10.1.2.2
uptime (sec): 2 version: 2
packets discarded: 0 routes discarded: 4733
GigabitEthernet0/0/0/1.100
Rip enabled?: Yes
Out-of-memory state: Normal
Broadcast for V2: No
Accept Metric 0: No
Send versions: 2
Receive versions: 2
Interface state: Up
IP address: 10.1.3.1/24
Metric Cost: 0
Split horizon: Enabled
Poison Reverse: Disabled
Socket set options:
Joined multicast group: Yes
LPTS filter set: Yes
Authentication mode: None
Authentication keychain: Not set
Total packets received: 0
Authentication mode is not set
'''}
golden_parsed_output_2 = {
'vrf': {
'VRF1': {
'address_family': {
'ipv4': {
'instance': {
'rip': {
'interfaces': {
'GigabitEthernet0/0/0/0.200': {
'authentication': {
'auth_key_chain': {
'key_chain': 'Not set'
},
'auth_key': {
'crypto_algorithm': 'None'
}
},
'cost': 0,
'neighbors': {
'10.1.2.2': {
'address': '10.1.2.2',
'uptime': 15,
'version': 2,
'packets_discarded': 0,
'routes_discarded': 0
}
},
'out_of_memory_state': 'Normal',
'broadcast_for_v2': False,
'accept_metric_0': False,
'send_versions': 2,
'receive_versions': 2,
'oper_status': 'Up',
'address': '10.1.2.1/24',
'passive': False,
'split_horizon': True,
'poison_reverse': False,
'socket_set': {
'multicast_group': True,
'lpts_filter': True
},
'statistics': {
'total_packets_received': 493
}
},
'GigabitEthernet0/0/0/1.200': {
'authentication': {
'auth_key_chain': {
'key_chain': 'Not set'
},
'auth_key': {
'crypto_algorithm': 'None'
}
},
'cost': 0,
'out_of_memory_state': 'Normal',
'broadcast_for_v2': False,
'accept_metric_0': False,
'send_versions': 2,
'receive_versions': 2,
'oper_status': 'Up',
'address': '10.1.3.1/24',
'passive': False,
'split_horizon': True,
'poison_reverse': False,
'socket_set': {
'multicast_group': True,
'lpts_filter': True
},
'statistics': {
'total_packets_received': 0
}
}
}
}
}
}
}
}
}
}
golden_output_2 = {'execute.return_value': '''\
RP/0/RP0/CPU0:R1#show rip vrf VRF1 interface
Wed Jan 30 18:50:24.640 UTC
GigabitEthernet0/0/0/0.200
Rip enabled?: Yes
Out-of-memory state: Normal
Broadcast for V2: No
Accept Metric 0: No
Send versions: 2
Receive versions: 2
Interface state: Up
IP address: 10.1.2.1/24
Metric Cost: 0
Split horizon: Enabled
Poison Reverse: Disabled
Socket set options:
Joined multicast group: Yes
LPTS filter set: Yes
Authentication mode: None
Authentication keychain: Not set
Total packets received: 493
Authentication mode is not set
RIP peers attached to this interface:
10.1.2.2
uptime (sec): 15 version: 2
packets discarded: 0 routes discarded: 0
GigabitEthernet0/0/0/1.200
Rip enabled?: Yes
Out-of-memory state: Normal
Broadcast for V2: No
Accept Metric 0: No
Send versions: 2
Receive versions: 2
Interface state: Up
IP address: 10.1.3.1/24
Metric Cost: 0
Split horizon: Enabled
Poison Reverse: Disabled
Socket set options:
Joined multicast group: Yes
LPTS filter set: Yes
Authentication mode: None
Authentication keychain: Not set
Total packets received: 0
Authentication mode is not set
'''}
def test_empty(self):
self.device = Mock(**self.empty_output)
obj = ShowRipInterface(device=self.device)
with self.assertRaises(SchemaEmptyParserError):
parsed_output = obj.parse()
def test_golden_interface(self):
self.device = Mock(**self.golden_output)
obj = ShowRipInterface(device=self.device)
parsed_output = obj.parse()
self.assertEqual(parsed_output,self.golden_parsed_output)
def test_golden_vrf_interface(self):
self.device = Mock(**self.golden_output_2)
obj = ShowRipInterface(device=self.device)
parsed_output = obj.parse(vrf='VRF1')
self.assertEqual(parsed_output,self.golden_parsed_output_2)
if __name__ == '__main__':
unittest.main()
| 54.568102 | 168 | 0.236848 | 2,374 | 46,874 | 4.53075 | 0.097725 | 0.009669 | 0.009669 | 0.008367 | 0.91428 | 0.87077 | 0.858405 | 0.848364 | 0.815173 | 0.758367 | 0 | 0.08004 | 0.69881 | 46,874 | 858 | 169 | 54.631702 | 0.681825 | 0.011606 | 0 | 0.623393 | 0 | 0.005141 | 0.487323 | 0.024814 | 0 | 0 | 0 | 0 | 0.015424 | 1 | 0.015424 | false | 0.006427 | 0.007712 | 0 | 0.059126 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 1 | 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 |
1179d87674ab056e96913ba9b8f9f69ac332fe2c | 92,585 | py | Python | src/ralph/discovery/migrations/0001_initial.py | quamilek/ralph | bf7231ea096924332b874718b33cd1f43f9c783b | [
"Apache-2.0"
] | 1 | 2018-09-01T14:14:08.000Z | 2018-09-01T14:14:08.000Z | src/ralph/discovery/migrations/0001_initial.py | quamilek/ralph | bf7231ea096924332b874718b33cd1f43f9c783b | [
"Apache-2.0"
] | 1 | 2019-08-14T10:03:45.000Z | 2019-08-14T10:03:45.000Z | src/ralph/discovery/migrations/0001_initial.py | quamilek/ralph | bf7231ea096924332b874718b33cd1f43f9c783b | [
"Apache-2.0"
] | 1 | 2019-08-14T09:59:42.000Z | 2019-08-14T09:59:42.000Z | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'ComponentModelGroup'
db.create_table('discovery_componentmodelgroup', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=75, db_index=True)),
('price', self.gf('django.db.models.fields.PositiveIntegerField')(null=True, blank=True)),
('type', self.gf('django.db.models.fields.PositiveIntegerField')(default=8)),
('per_size', self.gf('django.db.models.fields.BooleanField')(default=False)),
('size_unit', self.gf('django.db.models.fields.CharField')(default=u'', max_length=50, blank=True)),
('size_modifier', self.gf('django.db.models.fields.PositiveIntegerField')(default=1)),
))
db.send_create_signal('discovery', ['ComponentModelGroup'])
# Adding model 'ComponentModel'
db.create_table('discovery_componentmodel', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('name', self.gf('django.db.models.fields.CharField')(max_length=75)),
('created', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('modified', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('cache_version', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('save_priorities', self.gf('django.db.models.fields.TextField')(default=u'')),
('max_save_priority', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('speed', self.gf('django.db.models.fields.PositiveIntegerField')(default=0, blank=True)),
('cores', self.gf('django.db.models.fields.PositiveIntegerField')(default=0, blank=True)),
('size', self.gf('django.db.models.fields.PositiveIntegerField')(default=0, blank=True)),
('type', self.gf('django.db.models.fields.PositiveIntegerField')(default=8)),
('group', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['discovery.ComponentModelGroup'], null=True, on_delete=models.SET_NULL, blank=True)),
('extra', self.gf('django.db.models.fields.TextField')(default=None, null=True, blank=True)),
('extra_hash', self.gf('django.db.models.fields.CharField')(default=u'', max_length=32, blank=True)),
('family', self.gf('django.db.models.fields.CharField')(default=u'', max_length=128, blank=True)),
))
db.send_create_signal('discovery', ['ComponentModel'])
# Adding unique constraint on 'ComponentModel', fields ['speed', 'cores', 'size', 'type', 'family', 'extra_hash']
db.create_unique('discovery_componentmodel', ['speed', 'cores', 'size', 'type', 'family', 'extra_hash'])
# Adding model 'GenericComponent'
db.create_table('discovery_genericcomponent', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('modified', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('cache_version', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('save_priorities', self.gf('django.db.models.fields.TextField')(default=u'')),
('max_save_priority', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('device', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['discovery.Device'])),
('model', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['discovery.ComponentModel'], null=True, on_delete=models.SET_NULL, blank=True)),
('label', self.gf('django.db.models.fields.CharField')(default=None, max_length=255, null=True, blank=True)),
('sn', self.gf('django.db.models.fields.CharField')(default=None, max_length=255, unique=True, null=True, blank=True)),
('boot_firmware', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)),
('hard_firmware', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)),
('diag_firmware', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)),
('mgmt_firmware', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)),
))
db.send_create_signal('discovery', ['GenericComponent'])
# Adding model 'DiskShare'
db.create_table('discovery_diskshare', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('modified', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('cache_version', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('save_priorities', self.gf('django.db.models.fields.TextField')(default=u'')),
('max_save_priority', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('device', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['discovery.Device'])),
('model', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['discovery.ComponentModel'], null=True, on_delete=models.SET_NULL, blank=True)),
('share_id', self.gf('django.db.models.fields.PositiveIntegerField')(null=True, blank=True)),
('label', self.gf('django.db.models.fields.CharField')(default=None, max_length=255, null=True, blank=True)),
('size', self.gf('django.db.models.fields.PositiveIntegerField')(null=True, blank=True)),
('snapshot_size', self.gf('django.db.models.fields.PositiveIntegerField')(null=True, blank=True)),
('wwn', self.gf('django.db.models.fields.CharField')(unique=True, max_length=33)),
('full', self.gf('django.db.models.fields.BooleanField')(default=True)),
))
db.send_create_signal('discovery', ['DiskShare'])
# Adding model 'DiskShareMount'
db.create_table('discovery_disksharemount', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('modified', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('cache_version', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('share', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['discovery.DiskShare'])),
('device', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['discovery.Device'], null=True, on_delete=models.SET_NULL, blank=True)),
('volume', self.gf('django.db.models.fields.CharField')(default=None, max_length=255, null=True, blank=True)),
('server', self.gf('django.db.models.fields.related.ForeignKey')(default=None, related_name=u'servermount_set', null=True, blank=True, to=orm['discovery.Device'])),
('size', self.gf('django.db.models.fields.PositiveIntegerField')(null=True, blank=True)),
('address', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['discovery.IPAddress'], null=True, blank=True)),
('is_virtual', self.gf('django.db.models.fields.BooleanField')(default=False)),
))
db.send_create_signal('discovery', ['DiskShareMount'])
# Adding unique constraint on 'DiskShareMount', fields ['share', 'device']
db.create_unique('discovery_disksharemount', ['share_id', 'device_id'])
# Adding model 'Processor'
db.create_table('discovery_processor', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('modified', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('cache_version', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('save_priorities', self.gf('django.db.models.fields.TextField')(default=u'')),
('max_save_priority', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('device', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['discovery.Device'])),
('model', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['discovery.ComponentModel'], null=True, on_delete=models.SET_NULL, blank=True)),
('label', self.gf('django.db.models.fields.CharField')(max_length=255)),
('speed', self.gf('django.db.models.fields.PositiveIntegerField')(null=True, blank=True)),
('cores', self.gf('django.db.models.fields.PositiveIntegerField')(null=True, blank=True)),
('index', self.gf('django.db.models.fields.PositiveIntegerField')(null=True, blank=True)),
))
db.send_create_signal('discovery', ['Processor'])
# Adding unique constraint on 'Processor', fields ['device', 'index']
db.create_unique('discovery_processor', ['device_id', 'index'])
# Adding model 'Memory'
db.create_table('discovery_memory', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('modified', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('cache_version', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('save_priorities', self.gf('django.db.models.fields.TextField')(default=u'')),
('max_save_priority', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('device', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['discovery.Device'])),
('model', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['discovery.ComponentModel'], null=True, on_delete=models.SET_NULL, blank=True)),
('label', self.gf('django.db.models.fields.CharField')(max_length=255)),
('size', self.gf('django.db.models.fields.PositiveIntegerField')(null=True, blank=True)),
('speed', self.gf('django.db.models.fields.PositiveIntegerField')(null=True, blank=True)),
('index', self.gf('django.db.models.fields.PositiveIntegerField')(null=True, blank=True)),
))
db.send_create_signal('discovery', ['Memory'])
# Adding unique constraint on 'Memory', fields ['device', 'index']
db.create_unique('discovery_memory', ['device_id', 'index'])
# Adding model 'Storage'
db.create_table('discovery_storage', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('modified', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('cache_version', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('save_priorities', self.gf('django.db.models.fields.TextField')(default=u'')),
('max_save_priority', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('device', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['discovery.Device'])),
('model', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['discovery.ComponentModel'], null=True, on_delete=models.SET_NULL, blank=True)),
('sn', self.gf('django.db.models.fields.CharField')(default=None, max_length=255, unique=True, null=True, blank=True)),
('label', self.gf('django.db.models.fields.CharField')(max_length=255)),
('mount_point', self.gf('django.db.models.fields.CharField')(default=None, max_length=255, null=True, blank=True)),
))
db.send_create_signal('discovery', ['Storage'])
# Adding unique constraint on 'Storage', fields ['device', 'mount_point']
db.create_unique('discovery_storage', ['device_id', 'mount_point'])
# Adding model 'FibreChannel'
db.create_table('discovery_fibrechannel', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('modified', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('cache_version', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('save_priorities', self.gf('django.db.models.fields.TextField')(default=u'')),
('max_save_priority', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('device', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['discovery.Device'])),
('model', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['discovery.ComponentModel'], null=True, on_delete=models.SET_NULL, blank=True)),
('physical_id', self.gf('django.db.models.fields.CharField')(max_length=32)),
('label', self.gf('django.db.models.fields.CharField')(max_length=255)),
))
db.send_create_signal('discovery', ['FibreChannel'])
# Adding unique constraint on 'FibreChannel', fields ['device', 'physical_id']
db.create_unique('discovery_fibrechannel', ['device_id', 'physical_id'])
# Adding model 'Ethernet'
db.create_table('discovery_ethernet', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('modified', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('cache_version', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('save_priorities', self.gf('django.db.models.fields.TextField')(default=u'')),
('max_save_priority', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('device', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['discovery.Device'])),
('model', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['discovery.ComponentModel'], null=True, on_delete=models.SET_NULL, blank=True)),
('label', self.gf('django.db.models.fields.CharField')(max_length=255)),
('mac', self.gf(u'lck.django.common.models.MACAddressField')(unique=True, primary_key=False, db_column=None, blank=False, null=False, db_index=False)),
('speed', self.gf('django.db.models.fields.PositiveIntegerField')(default=11)),
))
db.send_create_signal('discovery', ['Ethernet'])
# Adding model 'Software'
db.create_table('discovery_software', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('modified', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('cache_version', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('save_priorities', self.gf('django.db.models.fields.TextField')(default=u'')),
('max_save_priority', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('device', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['discovery.Device'])),
('model', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['discovery.ComponentModel'], null=True, on_delete=models.SET_NULL, blank=True)),
('sn', self.gf('django.db.models.fields.CharField')(default=None, max_length=255, unique=True, null=True, blank=True)),
('label', self.gf('django.db.models.fields.CharField')(max_length=255)),
('path', self.gf('django.db.models.fields.CharField')(default=None, max_length=255, null=True, blank=True)),
))
db.send_create_signal('discovery', ['Software'])
# Adding unique constraint on 'Software', fields ['device', 'path']
db.create_unique('discovery_software', ['device_id', 'path'])
# Adding model 'SplunkUsage'
db.create_table('discovery_splunkusage', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('modified', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('cache_version', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('save_priorities', self.gf('django.db.models.fields.TextField')(default=u'')),
('max_save_priority', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('device', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['discovery.Device'])),
('model', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['discovery.ComponentModel'], null=True, on_delete=models.SET_NULL, blank=True)),
('day', self.gf('django.db.models.fields.DateField')(auto_now_add=True, blank=True)),
('size', self.gf('django.db.models.fields.PositiveIntegerField')(null=True, blank=True)),
))
db.send_create_signal('discovery', ['SplunkUsage'])
# Adding unique constraint on 'SplunkUsage', fields ['device', 'day']
db.create_unique('discovery_splunkusage', ['device_id', 'day'])
# Adding model 'DeprecationKind'
db.create_table('discovery_deprecationkind', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=75, db_index=True)),
('months', self.gf('django.db.models.fields.PositiveIntegerField')(null=True, blank=True)),
('remarks', self.gf('django.db.models.fields.TextField')(default=u'', blank=True)),
))
db.send_create_signal('discovery', ['DeprecationKind'])
# Adding model 'MarginKind'
db.create_table('discovery_marginkind', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=75, db_index=True)),
('margin', self.gf('django.db.models.fields.PositiveIntegerField')(null=True, blank=True)),
('remarks', self.gf('django.db.models.fields.TextField')(default=u'', blank=True)),
))
db.send_create_signal('discovery', ['MarginKind'])
# Adding model 'DeviceModelGroup'
db.create_table('discovery_devicemodelgroup', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=75, db_index=True)),
('price', self.gf('django.db.models.fields.PositiveIntegerField')(null=True, blank=True)),
('type', self.gf('django.db.models.fields.PositiveIntegerField')(default=401)),
('slots', self.gf('django.db.models.fields.FloatField')(default=0)),
))
db.send_create_signal('discovery', ['DeviceModelGroup'])
# Adding model 'DeviceModel'
db.create_table('discovery_devicemodel', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('modified', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('cache_version', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('save_priorities', self.gf('django.db.models.fields.TextField')(default=u'')),
('max_save_priority', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
('type', self.gf('django.db.models.fields.PositiveIntegerField')(default=401)),
('group', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['discovery.DeviceModelGroup'], null=True, on_delete=models.SET_NULL, blank=True)),
('chassis_size', self.gf('django.db.models.fields.PositiveIntegerField')(null=True, blank=True)),
))
db.send_create_signal('discovery', ['DeviceModel'])
# Adding model 'Device'
db.create_table('discovery_device', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('modified', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('cache_version', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('save_priorities', self.gf('django.db.models.fields.TextField')(default=u'')),
('max_save_priority', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('last_seen', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('uptime_seconds', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('uptime_timestamp', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)),
('name', self.gf('django.db.models.fields.CharField')(max_length=255)),
('name2', self.gf('django.db.models.fields.CharField')(default=None, max_length=255, null=True, blank=True)),
('parent', self.gf('django.db.models.fields.related.ForeignKey')(related_name=u'child_set', on_delete=models.SET_NULL, default=None, to=orm['discovery.Device'], blank=True, null=True)),
('model', self.gf('django.db.models.fields.related.ForeignKey')(related_name=u'device_set', on_delete=models.SET_NULL, default=None, to=orm['discovery.DeviceModel'], blank=True, null=True)),
('sn', self.gf('django.db.models.fields.CharField')(default=None, max_length=255, unique=True, null=True, blank=True)),
('barcode', self.gf('django.db.models.fields.CharField')(default=None, max_length=255, unique=True, null=True, blank=True)),
('remarks', self.gf('django.db.models.fields.TextField')(default=u'', blank=True)),
('raw', self.gf('django.db.models.fields.TextField')(default=None, null=True, blank=True)),
('boot_firmware', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)),
('hard_firmware', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)),
('diag_firmware', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)),
('mgmt_firmware', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)),
('price', self.gf('django.db.models.fields.PositiveIntegerField')(null=True, blank=True)),
('purchase_date', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)),
('cached_price', self.gf('django.db.models.fields.FloatField')(null=True, blank=True)),
('cached_cost', self.gf('django.db.models.fields.FloatField')(null=True, blank=True)),
('warranty_expiration_date', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)),
('support_expiration_date', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)),
('support_kind', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)),
('deprecation_kind', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['discovery.DeprecationKind'], null=True, on_delete=models.SET_NULL, blank=True)),
('margin_kind', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['discovery.MarginKind'], null=True, on_delete=models.SET_NULL, blank=True)),
('chassis_position', self.gf('django.db.models.fields.PositiveIntegerField')(null=True, blank=True)),
('position', self.gf('django.db.models.fields.CharField')(max_length=16, null=True, blank=True)),
('venture', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['business.Venture'], null=True, on_delete=models.SET_NULL, blank=True)),
('management', self.gf('django.db.models.fields.related.ForeignKey')(related_name=u'managed_set', on_delete=models.SET_NULL, default=None, to=orm['discovery.IPAddress'], blank=True, null=True)),
('role', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)),
('venture_role', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['business.VentureRole'], null=True, on_delete=models.SET_NULL, blank=True)),
('dc', self.gf('django.db.models.fields.CharField')(default=None, max_length=32, null=True, blank=True)),
('rack', self.gf('django.db.models.fields.CharField')(default=None, max_length=32, null=True, blank=True)),
('verified', self.gf('django.db.models.fields.BooleanField')(default=False)),
))
db.send_create_signal('discovery', ['Device'])
# Adding model 'LoadBalancerPool'
db.create_table('discovery_loadbalancerpool', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=75, db_index=True)),
))
db.send_create_signal('discovery', ['LoadBalancerPool'])
# Adding model 'LoadBalancerVirtualServer'
db.create_table('discovery_loadbalancervirtualserver', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('modified', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('cache_version', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('save_priorities', self.gf('django.db.models.fields.TextField')(default=u'')),
('max_save_priority', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('name', self.gf('django.db.models.fields.CharField')(max_length=255)),
('device', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['discovery.Device'])),
('default_pool', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['discovery.LoadBalancerPool'])),
('address', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['discovery.IPAddress'])),
('port', self.gf('django.db.models.fields.PositiveIntegerField')()),
))
db.send_create_signal('discovery', ['LoadBalancerVirtualServer'])
# Adding model 'LoadBalancerMember'
db.create_table('discovery_loadbalancermember', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('modified', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('cache_version', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('save_priorities', self.gf('django.db.models.fields.TextField')(default=u'')),
('max_save_priority', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('address', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['discovery.IPAddress'])),
('port', self.gf('django.db.models.fields.PositiveIntegerField')()),
('pool', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['discovery.LoadBalancerPool'])),
('device', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['discovery.Device'])),
('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)),
))
db.send_create_signal('discovery', ['LoadBalancerMember'])
# Adding unique constraint on 'LoadBalancerMember', fields ['pool', 'address', 'port', 'device']
db.create_unique('discovery_loadbalancermember', ['pool_id', 'address_id', 'port', 'device_id'])
# Adding model 'Warning'
db.create_table('discovery_warning', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('category', self.gf('django.db.models.fields.CharField')(max_length=128)),
('address', self.gf('django.db.models.fields.related.ForeignKey')(related_name=u'warning_set', null=True, to=orm['discovery.IPAddress'])),
('device', self.gf('django.db.models.fields.related.ForeignKey')(related_name=u'warning_set', null=True, to=orm['discovery.Device'])),
('remarks', self.gf('django.db.models.fields.TextField')(default=u'', blank=True)),
('aknowledged', self.gf('django.db.models.fields.CharField')(default=u'', max_length=128, blank=True)),
))
db.send_create_signal('discovery', ['Warning'])
# Adding unique constraint on 'Warning', fields ['category', 'address', 'device']
db.create_unique('discovery_warning', ['category', 'address_id', 'device_id'])
# Adding model 'NetworkKind'
db.create_table('discovery_networkkind', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=75, db_index=True)),
('icon', self.gf('django.db.models.fields.CharField')(default=None, max_length=32, null=True, blank=True)),
))
db.send_create_signal('discovery', ['NetworkKind'])
# Adding model 'Network'
db.create_table('discovery_network', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=75, db_index=True)),
('created', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('modified', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('cache_version', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('address', self.gf('django.db.models.fields.CharField')(unique=True, max_length=18)),
('gateway', self.gf('django.db.models.fields.IPAddressField')(default=None, max_length=15, null=True, blank=True)),
('remarks', self.gf('django.db.models.fields.TextField')(default=u'', blank=True)),
('vlan', self.gf('django.db.models.fields.PositiveIntegerField')(default=None, null=True, blank=True)),
('data_center', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['discovery.DataCenter'])),
('min_ip', self.gf('django.db.models.fields.PositiveIntegerField')(default=None, null=True, blank=True)),
('max_ip', self.gf('django.db.models.fields.PositiveIntegerField')(default=None, null=True, blank=True)),
('kind', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['discovery.NetworkKind'], null=True, on_delete=models.SET_NULL, blank=True)),
('queue', self.gf('django.db.models.fields.CharField')(default=None, max_length=16, null=True, blank=True)),
('rack', self.gf('django.db.models.fields.CharField')(default=None, max_length=16, null=True, blank=True)),
))
db.send_create_signal('discovery', ['Network'])
# Adding M2M table for field terminators on 'Network'
db.create_table('discovery_network_terminators', (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('network', models.ForeignKey(orm['discovery.network'], null=False)),
('networkterminator', models.ForeignKey(orm['discovery.networkterminator'], null=False))
))
db.create_unique('discovery_network_terminators', ['network_id', 'networkterminator_id'])
# Adding model 'NetworkTerminator'
db.create_table('discovery_networkterminator', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=75, db_index=True)),
))
db.send_create_signal('discovery', ['NetworkTerminator'])
# Adding model 'DataCenter'
db.create_table('discovery_datacenter', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=75, db_index=True)),
))
db.send_create_signal('discovery', ['DataCenter'])
# Adding model 'IPAddress'
db.create_table('discovery_ipaddress', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('modified', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('cache_version', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('last_seen', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('address', self.gf('django.db.models.fields.IPAddressField')(default=None, max_length=15, unique=True, null=True, blank=True)),
('number', self.gf('django.db.models.fields.BigIntegerField')(unique=True)),
('hostname', self.gf('django.db.models.fields.CharField')(default=None, max_length=255, null=True, blank=True)),
('snmp_name', self.gf('django.db.models.fields.TextField')(default=None, null=True, blank=True)),
('snmp_community', self.gf('django.db.models.fields.CharField')(default=None, max_length=64, null=True, blank=True)),
('device', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['discovery.Device'], null=True, on_delete=models.SET_NULL, blank=True)),
('http_family', self.gf('django.db.models.fields.TextField')(default=None, max_length=64, null=True, blank=True)),
('is_management', self.gf('django.db.models.fields.BooleanField')(default=False)),
('dns_info', self.gf('django.db.models.fields.TextField')(default=None, null=True, blank=True)),
('last_puppet', self.gf('django.db.models.fields.DateTimeField')(default=None, null=True, blank=True)),
('network', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['discovery.Network'], null=True, blank=True)),
))
db.send_create_signal('discovery', ['IPAddress'])
# Adding model 'IPAlias'
db.create_table('discovery_ipalias', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('modified', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('cache_version', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('save_priorities', self.gf('django.db.models.fields.TextField')(default=u'')),
('max_save_priority', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('address', self.gf('django.db.models.fields.related.ForeignKey')(related_name=u'+', to=orm['discovery.IPAddress'])),
('hostname', self.gf('django.db.models.fields.CharField')(max_length=255)),
))
db.send_create_signal('discovery', ['IPAlias'])
# Adding model 'HistoryChange'
db.create_table('discovery_historychange', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('date', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('device', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['discovery.Device'], null=True, on_delete=models.SET_NULL, blank=True)),
('user', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['auth.User'], null=True, on_delete=models.SET_NULL, blank=True)),
('field_name', self.gf('django.db.models.fields.CharField')(default=u'', max_length=64)),
('old_value', self.gf('django.db.models.fields.CharField')(default=u'', max_length=255)),
('new_value', self.gf('django.db.models.fields.CharField')(default=u'', max_length=255)),
('component', self.gf('django.db.models.fields.CharField')(default=u'', max_length=255)),
('component_id', self.gf('django.db.models.fields.IntegerField')(default=None, null=True, blank=True)),
('comment', self.gf('django.db.models.fields.TextField')(null=True)),
))
db.send_create_signal('discovery', ['HistoryChange'])
# Adding model 'HistoryCost'
db.create_table('discovery_historycost', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('start', self.gf('django.db.models.fields.DateField')(default=u'0001-1-1', null=True)),
('end', self.gf('django.db.models.fields.DateField')(default=u'2199-1-1')),
('daily_cost', self.gf('django.db.models.fields.FloatField')(default=0)),
('device', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['discovery.Device'], null=True, on_delete=models.SET_NULL, blank=True)),
('extra', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['business.VentureExtraCost'], null=True, on_delete=models.SET_NULL, blank=True)),
('venture', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['business.Venture'], null=True, on_delete=models.SET_NULL, blank=True)),
))
db.send_create_signal('discovery', ['HistoryCost'])
def backwards(self, orm):
# Removing unique constraint on 'Warning', fields ['category', 'address', 'device']
db.delete_unique('discovery_warning', ['category', 'address_id', 'device_id'])
# Removing unique constraint on 'LoadBalancerMember', fields ['pool', 'address', 'port', 'device']
db.delete_unique('discovery_loadbalancermember', ['pool_id', 'address_id', 'port', 'device_id'])
# Removing unique constraint on 'SplunkUsage', fields ['device', 'day']
db.delete_unique('discovery_splunkusage', ['device_id', 'day'])
# Removing unique constraint on 'Software', fields ['device', 'path']
db.delete_unique('discovery_software', ['device_id', 'path'])
# Removing unique constraint on 'FibreChannel', fields ['device', 'physical_id']
db.delete_unique('discovery_fibrechannel', ['device_id', 'physical_id'])
# Removing unique constraint on 'Storage', fields ['device', 'mount_point']
db.delete_unique('discovery_storage', ['device_id', 'mount_point'])
# Removing unique constraint on 'Memory', fields ['device', 'index']
db.delete_unique('discovery_memory', ['device_id', 'index'])
# Removing unique constraint on 'Processor', fields ['device', 'index']
db.delete_unique('discovery_processor', ['device_id', 'index'])
# Removing unique constraint on 'DiskShareMount', fields ['share', 'device']
db.delete_unique('discovery_disksharemount', ['share_id', 'device_id'])
# Removing unique constraint on 'ComponentModel', fields ['speed', 'cores', 'size', 'type', 'family', 'extra_hash']
db.delete_unique('discovery_componentmodel', ['speed', 'cores', 'size', 'type', 'family', 'extra_hash'])
# Deleting model 'ComponentModelGroup'
db.delete_table('discovery_componentmodelgroup')
# Deleting model 'ComponentModel'
db.delete_table('discovery_componentmodel')
# Deleting model 'GenericComponent'
db.delete_table('discovery_genericcomponent')
# Deleting model 'DiskShare'
db.delete_table('discovery_diskshare')
# Deleting model 'DiskShareMount'
db.delete_table('discovery_disksharemount')
# Deleting model 'Processor'
db.delete_table('discovery_processor')
# Deleting model 'Memory'
db.delete_table('discovery_memory')
# Deleting model 'Storage'
db.delete_table('discovery_storage')
# Deleting model 'FibreChannel'
db.delete_table('discovery_fibrechannel')
# Deleting model 'Ethernet'
db.delete_table('discovery_ethernet')
# Deleting model 'Software'
db.delete_table('discovery_software')
# Deleting model 'SplunkUsage'
db.delete_table('discovery_splunkusage')
# Deleting model 'DeprecationKind'
db.delete_table('discovery_deprecationkind')
# Deleting model 'MarginKind'
db.delete_table('discovery_marginkind')
# Deleting model 'DeviceModelGroup'
db.delete_table('discovery_devicemodelgroup')
# Deleting model 'DeviceModel'
db.delete_table('discovery_devicemodel')
# Deleting model 'Device'
db.delete_table('discovery_device')
# Deleting model 'LoadBalancerPool'
db.delete_table('discovery_loadbalancerpool')
# Deleting model 'LoadBalancerVirtualServer'
db.delete_table('discovery_loadbalancervirtualserver')
# Deleting model 'LoadBalancerMember'
db.delete_table('discovery_loadbalancermember')
# Deleting model 'Warning'
db.delete_table('discovery_warning')
# Deleting model 'NetworkKind'
db.delete_table('discovery_networkkind')
# Deleting model 'Network'
db.delete_table('discovery_network')
# Removing M2M table for field terminators on 'Network'
db.delete_table('discovery_network_terminators')
# Deleting model 'NetworkTerminator'
db.delete_table('discovery_networkterminator')
# Deleting model 'DataCenter'
db.delete_table('discovery_datacenter')
# Deleting model 'IPAddress'
db.delete_table('discovery_ipaddress')
# Deleting model 'IPAlias'
db.delete_table('discovery_ipalias')
# Deleting model 'HistoryChange'
db.delete_table('discovery_historychange')
# Deleting model 'HistoryCost'
db.delete_table('discovery_historycost')
models = {
'account.profile': {
'Meta': {'object_name': 'Profile'},
'activation_token': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '40', 'blank': 'True'}),
'birth_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
'city': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'country': ('django.db.models.fields.PositiveIntegerField', [], {'default': '153'}),
'gender': ('django.db.models.fields.PositiveIntegerField', [], {'default': '2'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'last_active': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
'nick': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '30', 'blank': 'True'}),
'time_zone': ('django.db.models.fields.FloatField', [], {'default': '1.0'}),
'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'})
},
'auth.group': {
'Meta': {'object_name': 'Group'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
'auth.permission': {
'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
'auth.user': {
'Meta': {'object_name': 'User'},
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
},
'business.department': {
'Meta': {'ordering': "(u'name',)", 'object_name': 'Department'},
'icon': (u'dj.choices.fields.ChoiceField', [], {'unique': 'False', 'primary_key': 'False', 'db_column': 'None', 'blank': 'True', u'default': 'None', 'null': 'True', '_in_south': 'True', 'db_index': 'False'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '75', 'db_index': 'True'})
},
'business.venture': {
'Meta': {'unique_together': "((u'parent', u'symbol'),)", 'object_name': 'Venture'},
'cache_version': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'data_center': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['discovery.DataCenter']", 'null': 'True', 'blank': 'True'}),
'department': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['business.Department']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_infrastructure': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'margin_kind': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['discovery.MarginKind']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '75', 'db_index': 'True'}),
'parent': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "u'child_set'", 'null': 'True', 'blank': 'True', 'to': "orm['business.Venture']"}),
'path': ('django.db.models.fields.TextField', [], {'default': "u''", 'blank': 'True'}),
'show_in_ralph': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'symbol': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '32', 'blank': 'True'})
},
'business.ventureextracost': {
'Meta': {'ordering': "(u'name',)", 'unique_together': "((u'name', u'venture'),)", 'object_name': 'VentureExtraCost'},
'cache_version': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'cost': ('django.db.models.fields.FloatField', [], {'default': '0'}),
'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'expire': ('django.db.models.fields.DateField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '75'}),
'venture': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['business.Venture']"})
},
'business.venturerole': {
'Meta': {'unique_together': "((u'name', u'venture'),)", 'object_name': 'VentureRole'},
'cache_version': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '75'}),
'parent': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "u'child_set'", 'null': 'True', 'blank': 'True', 'to': "orm['business.VentureRole']"}),
'venture': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['business.Venture']"})
},
'contenttypes.contenttype': {
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
},
'discovery.componentmodel': {
'Meta': {'unique_together': "((u'speed', u'cores', u'size', u'type', u'family', u'extra_hash'),)", 'object_name': 'ComponentModel'},
'cache_version': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'cores': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'blank': 'True'}),
'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'extra': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
'extra_hash': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '32', 'blank': 'True'}),
'family': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '128', 'blank': 'True'}),
'group': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['discovery.ComponentModelGroup']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'max_save_priority': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '75'}),
'save_priorities': ('django.db.models.fields.TextField', [], {'default': "u''"}),
'size': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'blank': 'True'}),
'speed': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'blank': 'True'}),
'type': ('django.db.models.fields.PositiveIntegerField', [], {'default': '8'})
},
'discovery.componentmodelgroup': {
'Meta': {'object_name': 'ComponentModelGroup'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '75', 'db_index': 'True'}),
'per_size': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'price': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'size_modifier': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}),
'size_unit': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '50', 'blank': 'True'}),
'type': ('django.db.models.fields.PositiveIntegerField', [], {'default': '8'})
},
'discovery.datacenter': {
'Meta': {'ordering': "(u'name',)", 'object_name': 'DataCenter'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '75', 'db_index': 'True'})
},
'discovery.deprecationkind': {
'Meta': {'object_name': 'DeprecationKind'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'months': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '75', 'db_index': 'True'}),
'remarks': ('django.db.models.fields.TextField', [], {'default': "u''", 'blank': 'True'})
},
'discovery.device': {
'Meta': {'object_name': 'Device'},
'barcode': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
'boot_firmware': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
'cache_version': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'cached_cost': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}),
'cached_price': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}),
'chassis_position': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'dc': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '32', 'null': 'True', 'blank': 'True'}),
'deprecation_kind': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['discovery.DeprecationKind']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'diag_firmware': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
'hard_firmware': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'management': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'managed_set'", 'on_delete': 'models.SET_NULL', 'default': 'None', 'to': "orm['discovery.IPAddress']", 'blank': 'True', 'null': 'True'}),
'margin_kind': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['discovery.MarginKind']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'max_save_priority': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'mgmt_firmware': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
'model': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'device_set'", 'on_delete': 'models.SET_NULL', 'default': 'None', 'to': "orm['discovery.DeviceModel']", 'blank': 'True', 'null': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'name2': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True', 'blank': 'True'}),
'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'child_set'", 'on_delete': 'models.SET_NULL', 'default': 'None', 'to': "orm['discovery.Device']", 'blank': 'True', 'null': 'True'}),
'position': ('django.db.models.fields.CharField', [], {'max_length': '16', 'null': 'True', 'blank': 'True'}),
'price': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'purchase_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'rack': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '32', 'null': 'True', 'blank': 'True'}),
'raw': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
'remarks': ('django.db.models.fields.TextField', [], {'default': "u''", 'blank': 'True'}),
'role': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
'save_priorities': ('django.db.models.fields.TextField', [], {'default': "u''"}),
'sn': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
'support_expiration_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'support_kind': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
'uptime_seconds': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'uptime_timestamp': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'venture': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['business.Venture']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'venture_role': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['business.VentureRole']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'verified': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'warranty_expiration_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'})
},
'discovery.devicemodel': {
'Meta': {'object_name': 'DeviceModel'},
'cache_version': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'chassis_size': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'group': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['discovery.DeviceModelGroup']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'max_save_priority': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
'save_priorities': ('django.db.models.fields.TextField', [], {'default': "u''"}),
'type': ('django.db.models.fields.PositiveIntegerField', [], {'default': '401'})
},
'discovery.devicemodelgroup': {
'Meta': {'object_name': 'DeviceModelGroup'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '75', 'db_index': 'True'}),
'price': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'slots': ('django.db.models.fields.FloatField', [], {'default': '0'}),
'type': ('django.db.models.fields.PositiveIntegerField', [], {'default': '401'})
},
'discovery.diskshare': {
'Meta': {'object_name': 'DiskShare'},
'cache_version': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'device': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['discovery.Device']"}),
'full': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'label': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True', 'blank': 'True'}),
'max_save_priority': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'model': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['discovery.ComponentModel']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'save_priorities': ('django.db.models.fields.TextField', [], {'default': "u''"}),
'share_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'size': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'snapshot_size': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'wwn': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '33'})
},
'discovery.disksharemount': {
'Meta': {'unique_together': "((u'share', u'device'),)", 'object_name': 'DiskShareMount'},
'address': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['discovery.IPAddress']", 'null': 'True', 'blank': 'True'}),
'cache_version': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'device': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['discovery.Device']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_virtual': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'server': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "u'servermount_set'", 'null': 'True', 'blank': 'True', 'to': "orm['discovery.Device']"}),
'share': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['discovery.DiskShare']"}),
'size': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'volume': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True', 'blank': 'True'})
},
'discovery.ethernet': {
'Meta': {'ordering': "(u'device', u'mac')", 'object_name': 'Ethernet'},
'cache_version': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'device': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['discovery.Device']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'label': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'mac': (u'lck.django.common.models.MACAddressField', [], {'unique': 'True', 'primary_key': 'False', 'db_column': 'None', 'blank': 'False', 'null': 'False', 'db_index': 'False'}),
'max_save_priority': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'model': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['discovery.ComponentModel']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'save_priorities': ('django.db.models.fields.TextField', [], {'default': "u''"}),
'speed': ('django.db.models.fields.PositiveIntegerField', [], {'default': '11'})
},
'discovery.fibrechannel': {
'Meta': {'ordering': "(u'device', u'physical_id')", 'unique_together': "((u'device', u'physical_id'),)", 'object_name': 'FibreChannel'},
'cache_version': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'device': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['discovery.Device']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'label': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'max_save_priority': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'model': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['discovery.ComponentModel']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'physical_id': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
'save_priorities': ('django.db.models.fields.TextField', [], {'default': "u''"})
},
'discovery.genericcomponent': {
'Meta': {'object_name': 'GenericComponent'},
'boot_firmware': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
'cache_version': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'device': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['discovery.Device']"}),
'diag_firmware': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
'hard_firmware': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'label': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True', 'blank': 'True'}),
'max_save_priority': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'mgmt_firmware': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
'model': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['discovery.ComponentModel']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'save_priorities': ('django.db.models.fields.TextField', [], {'default': "u''"}),
'sn': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'unique': 'True', 'null': 'True', 'blank': 'True'})
},
'discovery.historychange': {
'Meta': {'object_name': 'HistoryChange'},
'comment': ('django.db.models.fields.TextField', [], {'null': 'True'}),
'component': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '255'}),
'component_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
'date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'device': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['discovery.Device']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'field_name': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '64'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'new_value': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '255'}),
'old_value': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '255'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'})
},
'discovery.historycost': {
'Meta': {'object_name': 'HistoryCost'},
'daily_cost': ('django.db.models.fields.FloatField', [], {'default': '0'}),
'device': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['discovery.Device']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'end': ('django.db.models.fields.DateField', [], {'default': "u'9999-1-1'"}),
'extra': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['business.VentureExtraCost']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'start': ('django.db.models.fields.DateField', [], {'default': "u'0000-1-1'", 'null': 'True'}),
'venture': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['business.Venture']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'})
},
'discovery.ipaddress': {
'Meta': {'object_name': 'IPAddress'},
'address': ('django.db.models.fields.IPAddressField', [], {'default': 'None', 'max_length': '15', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
'cache_version': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'device': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['discovery.Device']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'dns_info': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
'hostname': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True', 'blank': 'True'}),
'http_family': ('django.db.models.fields.TextField', [], {'default': 'None', 'max_length': '64', 'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_management': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'last_puppet': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'network': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['discovery.Network']", 'null': 'True', 'blank': 'True'}),
'number': ('django.db.models.fields.BigIntegerField', [], {'unique': 'True'}),
'snmp_community': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '64', 'null': 'True', 'blank': 'True'}),
'snmp_name': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True', 'blank': 'True'})
},
'discovery.ipalias': {
'Meta': {'object_name': 'IPAlias'},
'address': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'to': "orm['discovery.IPAddress']"}),
'cache_version': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'hostname': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'max_save_priority': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'save_priorities': ('django.db.models.fields.TextField', [], {'default': "u''"})
},
'discovery.loadbalancermember': {
'Meta': {'unique_together': "((u'pool', u'address', u'port', u'device'),)", 'object_name': 'LoadBalancerMember'},
'address': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['discovery.IPAddress']"}),
'cache_version': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'device': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['discovery.Device']"}),
'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'max_save_priority': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'pool': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['discovery.LoadBalancerPool']"}),
'port': ('django.db.models.fields.PositiveIntegerField', [], {}),
'save_priorities': ('django.db.models.fields.TextField', [], {'default': "u''"})
},
'discovery.loadbalancerpool': {
'Meta': {'object_name': 'LoadBalancerPool'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '75', 'db_index': 'True'})
},
'discovery.loadbalancervirtualserver': {
'Meta': {'object_name': 'LoadBalancerVirtualServer'},
'address': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['discovery.IPAddress']"}),
'cache_version': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'default_pool': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['discovery.LoadBalancerPool']"}),
'device': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['discovery.Device']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'max_save_priority': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'port': ('django.db.models.fields.PositiveIntegerField', [], {}),
'save_priorities': ('django.db.models.fields.TextField', [], {'default': "u''"})
},
'discovery.marginkind': {
'Meta': {'object_name': 'MarginKind'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'margin': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '75', 'db_index': 'True'}),
'remarks': ('django.db.models.fields.TextField', [], {'default': "u''", 'blank': 'True'})
},
'discovery.memory': {
'Meta': {'ordering': "(u'device', u'index')", 'unique_together': "((u'device', u'index'),)", 'object_name': 'Memory'},
'cache_version': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'device': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['discovery.Device']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'index': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'label': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'max_save_priority': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'model': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['discovery.ComponentModel']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'save_priorities': ('django.db.models.fields.TextField', [], {'default': "u''"}),
'size': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'speed': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'})
},
'discovery.network': {
'Meta': {'ordering': "(u'vlan',)", 'object_name': 'Network'},
'address': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '18'}),
'cache_version': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'data_center': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['discovery.DataCenter']"}),
'gateway': ('django.db.models.fields.IPAddressField', [], {'default': 'None', 'max_length': '15', 'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'kind': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['discovery.NetworkKind']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'max_ip': ('django.db.models.fields.PositiveIntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
'min_ip': ('django.db.models.fields.PositiveIntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '75', 'db_index': 'True'}),
'queue': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '16', 'null': 'True', 'blank': 'True'}),
'rack': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '16', 'null': 'True', 'blank': 'True'}),
'remarks': ('django.db.models.fields.TextField', [], {'default': "u''", 'blank': 'True'}),
'terminators': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['discovery.NetworkTerminator']", 'symmetrical': 'False'}),
'vlan': ('django.db.models.fields.PositiveIntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'})
},
'discovery.networkkind': {
'Meta': {'ordering': "(u'name',)", 'object_name': 'NetworkKind'},
'icon': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '32', 'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '75', 'db_index': 'True'})
},
'discovery.networkterminator': {
'Meta': {'ordering': "(u'name',)", 'object_name': 'NetworkTerminator'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '75', 'db_index': 'True'})
},
'discovery.processor': {
'Meta': {'ordering': "(u'device', u'index')", 'unique_together': "((u'device', u'index'),)", 'object_name': 'Processor'},
'cache_version': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'cores': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'device': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['discovery.Device']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'index': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'label': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'max_save_priority': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'model': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['discovery.ComponentModel']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'save_priorities': ('django.db.models.fields.TextField', [], {'default': "u''"}),
'speed': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'})
},
'discovery.software': {
'Meta': {'ordering': "(u'device', u'sn', u'path')", 'unique_together': "((u'device', u'path'),)", 'object_name': 'Software'},
'cache_version': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'device': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['discovery.Device']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'label': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'max_save_priority': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'model': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['discovery.ComponentModel']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'path': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True', 'blank': 'True'}),
'save_priorities': ('django.db.models.fields.TextField', [], {'default': "u''"}),
'sn': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'unique': 'True', 'null': 'True', 'blank': 'True'})
},
'discovery.splunkusage': {
'Meta': {'ordering': "(u'device', u'day')", 'unique_together': "((u'device', u'day'),)", 'object_name': 'SplunkUsage'},
'cache_version': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'day': ('django.db.models.fields.DateField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'device': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['discovery.Device']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'max_save_priority': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'model': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['discovery.ComponentModel']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'save_priorities': ('django.db.models.fields.TextField', [], {'default': "u''"}),
'size': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'})
},
'discovery.storage': {
'Meta': {'ordering': "(u'device', u'sn', u'mount_point')", 'unique_together': "((u'device', u'mount_point'),)", 'object_name': 'Storage'},
'cache_version': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'device': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['discovery.Device']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'label': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'max_save_priority': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'model': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['discovery.ComponentModel']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'mount_point': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True', 'blank': 'True'}),
'save_priorities': ('django.db.models.fields.TextField', [], {'default': "u''"}),
'sn': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'unique': 'True', 'null': 'True', 'blank': 'True'})
},
'discovery.warning': {
'Meta': {'unique_together': "((u'category', u'address', u'device'),)", 'object_name': 'Warning'},
'address': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'warning_set'", 'null': 'True', 'to': "orm['discovery.IPAddress']"}),
'aknowledged': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '128', 'blank': 'True'}),
'category': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'device': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'warning_set'", 'null': 'True', 'to': "orm['discovery.Device']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'remarks': ('django.db.models.fields.TextField', [], {'default': "u''", 'blank': 'True'})
},
'tags.tag': {
'Meta': {'object_name': 'Tag'},
'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['account.Profile']"}),
'cache_version': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'tags_tag_tags'", 'to': "orm['contenttypes.ContentType']"}),
'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'language': ('django.db.models.fields.PositiveIntegerField', [], {'default': '39'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '75'}),
'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
'official': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'stem': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'related_tags'", 'null': 'True', 'to': "orm['tags.TagStem']"})
},
'tags.tagstem': {
'Meta': {'object_name': 'TagStem'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'language': ('django.db.models.fields.PositiveIntegerField', [], {'default': '39'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '75'}),
'tag_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'})
}
}
complete_apps = ['discovery']
| 83.560469 | 233 | 0.611514 | 10,019 | 92,585 | 5.55255 | 0.029244 | 0.09563 | 0.167101 | 0.238716 | 0.869749 | 0.859719 | 0.844385 | 0.818213 | 0.790926 | 0.753123 | 0 | 0.006818 | 0.168332 | 92,585 | 1,107 | 234 | 83.635953 | 0.715662 | 0.036388 | 0 | 0.482979 | 0 | 0.001064 | 0.530482 | 0.336549 | 0 | 0 | 0 | 0 | 0 | 1 | 0.002128 | false | 0.001064 | 0.004255 | 0 | 0.009574 | 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 |
11d42baf689017cc6121cf7ba835271d58e663fe | 252 | py | Python | translator/exceptions_eazyraspi.py | kb2623/raspi-trash-bin | 8b695a167eddbb9f189cd1663af8158ad61e421a | [
"MIT"
] | null | null | null | translator/exceptions_eazyraspi.py | kb2623/raspi-trash-bin | 8b695a167eddbb9f189cd1663af8158ad61e421a | [
"MIT"
] | null | null | null | translator/exceptions_eazyraspi.py | kb2623/raspi-trash-bin | 8b695a167eddbb9f189cd1663af8158ad61e421a | [
"MIT"
] | null | null | null | class SematicVariableError(Exception):
def __init__(self, msg, stm=None, *args, **kwargs):
self.msg = msg
self.stm = stm
class SematicRutineError(Exception):
def __init__(self, msg, stm=None, *args, **kwargs):
self.msg = msg
self.stm = stm
| 22.909091 | 52 | 0.698413 | 34 | 252 | 4.941176 | 0.352941 | 0.166667 | 0.190476 | 0.238095 | 0.714286 | 0.714286 | 0.714286 | 0.714286 | 0.714286 | 0.714286 | 0 | 0 | 0.15873 | 252 | 10 | 53 | 25.2 | 0.792453 | 0 | 0 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 |
eea8912a15b40ce4f89ab7b3e8e27953f20585ab | 111 | py | Python | credentials.py | bittuboss601/Voice-Assistant-Angularstone | 6717de790a39474bafcfbad63aaa45d6ba8a058f | [
"MIT"
] | 2 | 2021-01-14T16:54:42.000Z | 2021-08-01T19:07:36.000Z | credentials.py | bittuboss601/Voice-Assistant-Angularstone | 6717de790a39474bafcfbad63aaa45d6ba8a058f | [
"MIT"
] | null | null | null | credentials.py | bittuboss601/Voice-Assistant-Angularstone | 6717de790a39474bafcfbad63aaa45d6ba8a058f | [
"MIT"
] | null | null | null | def email():
return 'YOUR GMAIL ID BY WHICH YOU WANT TO SEND MAIL'
def password():
return 'PASSWORD' | 27.75 | 58 | 0.666667 | 17 | 111 | 4.352941 | 0.823529 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.243243 | 111 | 4 | 59 | 27.75 | 0.880952 | 0 | 0 | 0 | 0 | 0 | 0.477064 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.5 | true | 0.5 | 0 | 0.5 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 1 | 0 | 0 | 7 |
eeb54b9ff98067d7062f80c930c26780a66ec1a2 | 22,944 | py | Python | neural_splines/falkon_kernels.py | fwilliams/neural-splines | e94b4f0c9ba4c75585bd6bdbef43d65a25efac2b | [
"MIT"
] | 47 | 2021-06-18T20:46:00.000Z | 2022-03-30T02:50:16.000Z | neural_splines/falkon_kernels.py | fwilliams/Neural-Splines | e94b4f0c9ba4c75585bd6bdbef43d65a25efac2b | [
"MIT"
] | 4 | 2021-06-30T08:50:41.000Z | 2022-03-17T07:14:23.000Z | neural_splines/falkon_kernels.py | fwilliams/Neural-Splines | e94b4f0c9ba4c75585bd6bdbef43d65a25efac2b | [
"MIT"
] | 1 | 2021-07-26T12:05:02.000Z | 2021-07-26T12:05:02.000Z | import functools
from abc import ABC
from typing import Optional
import cupy as cp
import numpy as np
import torch
from falkon.kernels import Kernel, KeopsKernelMixin
from falkon.options import FalkonOptions
from falkon.sparse.sparse_tensor import SparseTensor
from torch.utils.dlpack import to_dlpack
def _extract_float(d):
if isinstance(d, torch.Tensor):
try:
# tensor.item() works if tensor is a scalar, otherwise it throws
# a value error.
return d.item()
except ValueError:
raise ValueError("Item is not a scalar")
else:
try:
return float(d)
except TypeError:
raise TypeError("Item must be a scalar or a tensor.")
class NeuralSplineKernel(Kernel, KeopsKernelMixin, ABC):
kernel_type = "angle"
def __init__(self, variance: float = 1.0, opt: Optional[FalkonOptions] = None):
super().__init__("NeuralSpline", self.kernel_type, opt)
self.debug = opt.debug if opt is not None else False
self.variance = _extract_float(variance)
def extra_mem(self):
return {
# We transpose X2 in _apply
'nd': 0,
'md': 1,
# Norm results in prepare
'm': 0,
'n': 0,
# We do a copy in _apply
'nm': 1,
}
def _keops_mmv_impl(self, X1, X2, v, kernel, out, opt):
if self.debug:
print(f"NeuralSpline._keops_mmv_impl(X1={X1.shape}, X2={X2.shape}, v, kernel, out, opt)")
theta = 'two * Atan2(Norm2(Norm2(Y) * X - Norm2(X) * Y), Norm2(Norm2(Y) * X + Norm2(X) * Y))'
norm_xy = '(Norm2(X) * Norm2(Y))'
j01 = f'({norm_xy} * (Sin({theta}) + (one + variance) * (pi - {theta}) * Cos({theta})))'
formula = f'({j01} / pi) * v'
aliases = [
'X = Vi(%d)' % (X1.shape[1]),
'Y = Vj(%d)' % (X2.shape[1]),
'v = Vj(%d)' % (v.shape[1]),
'pi = Pm(1)',
'variance = Pm(1)',
'one = Pm(1)',
'two = Pm(1)'
]
other_vars = [torch.tensor([np.pi]).to(dtype=X1.dtype, device=X1.device),
torch.tensor([self.variance]).to(dtype=X1.dtype, device=X1.device),
torch.tensor([1.0]).to(dtype=X1.dtype, device=X1.device),
torch.tensor([2.0]).to(dtype=X1.dtype, device=X1.device)]
return self.keops_mmv(X1, X2, v, out, formula, aliases, other_vars, opt)
def _decide_mmv_impl(self, X1, X2, v, opt):
if self.keops_can_handle_mmv(X1, X2, v, opt):
return self._keops_mmv_impl
else:
return super()._decide_mmv_impl(X1, X2, v, opt)
def _decide_dmmv_impl(self, X1, X2, v, w, opt):
if self.keops_can_handle_dmmv(X1, X2, v, w, opt):
return functools.partial(self.keops_dmmv_helper, mmv_fn=self._keops_mmv_impl)
else:
return super()._decide_dmmv_impl(X1, X2, v, w, opt)
def _prepare(self, X1, X2, **kwargs):
if self.debug:
print(f"NeuralSpline._prepare(X1={X1.shape}, X2={X2.shape}, *kwargs)")
return []
def _prepare_sparse(self, X1: SparseTensor, X2: SparseTensor):
raise NotImplementedError("NeuralSpline does not implement sparse prepare")
def _apply(self, X1: torch.Tensor, X2: torch.Tensor, out: torch.Tensor):
if self.debug:
print(f"NeuralSpline._apply(X1={X1.shape}, X2={X2.shape}, out={out.shape})")
kernel_code = r'''
#define PI (DTYPE) (3.1415926535897932384626433832795028841971693993751058209749445923078164062)
#define ONE (DTYPE) (1.0)
extern "C" __global__
void stable_kernel(const DTYPE* x1, const DTYPE* x2, DTYPE* out, const double variance,
const int N, int M, int D) {
const int I = (blockIdx.x * blockDim.x) + threadIdx.x;
const int J = (blockIdx.y * blockDim.y) + threadIdx.y;
if (I >= N || J >= M) {
return;
}
DTYPE norm_x = (DTYPE) 0.0; //normf(D, &x1[I*D]);
DTYPE norm_y = (DTYPE) 0.0; //normf(D, &x2[J*D]);
#pragma unroll
for (int k = 0; k < D; k += 1) {
norm_x = fma(x1[I * D + k], x1[I * D + k], norm_x);
norm_y = fma(x2[J * D + k], x2[J * D + k], norm_y);
}
norm_x = sqrt(norm_x);
norm_y = sqrt(norm_y);
DTYPE arg1 = (DTYPE) 0.0;
DTYPE arg2 = (DTYPE) 0.0;
#pragma unroll
for (int k = 0; k < D; k += 1) {
DTYPE x1_ik = x1[I * D + k];
DTYPE x2_jk = x2[J * D + k];
DTYPE a1 = norm_y * x1_ik - norm_x * x2_jk;
DTYPE a2 = norm_y * x1_ik + norm_x * x2_jk;
arg1 = fma(a1, a1, arg1);
arg2 = fma(a2, a2, arg2);
}
arg1 = sqrt(arg1);
arg2 = sqrt(arg2);
DTYPE angle = 2.0 * atan2(arg1, arg2);
DTYPE norm_xy = norm_x * norm_y;
DTYPE cos_angle = cos(angle);
DTYPE sin_angle = sin(angle);
DTYPE opv = ONE + (DTYPE)(variance);
DTYPE K = norm_xy * (sin_angle + opv * (PI - angle) * cos_angle) / PI;
out[I * M + J] = K;
}
'''
assert X1.dtype == X2.dtype == out.dtype, "X1, X2, and out don't have the same dtype"
assert X1.device == X2.device == out.device, "X1, X2, and out are not on the same device"
assert out.device.index is not None, "None device index"
if X1.dtype == torch.float32:
str_dtype = "float"
cupy_dtype = cp.float32
elif X1.dtype == torch.float64:
str_dtype = "double"
cupy_dtype = cp.float64
else:
raise ValueError("Invalid dtype must be float32 or float64")
kernel_code = kernel_code.replace("DTYPE", str_dtype)
kernel = cp.RawKernel(kernel_code, 'stable_kernel')
# The .contiguous should be a no-op in both these cases, but add them in for good measure
X1 = X1.contiguous()
X2 = X2.T.contiguous()
# Convert X1 and X2 to CuPy arrays.
x1cp = cp.fromDlpack(torch.utils.dlpack.to_dlpack(X1))
x2cp = cp.fromDlpack(torch.utils.dlpack.to_dlpack(X2))
with cp.cuda.Device(out.device.index):
outcp = cp.zeros((out.shape[0], out.shape[1]), dtype=cupy_dtype)
# Run the CUDA kernel to build the matrix K
pt_dim = int(X1.shape[1])
dims = int(X1.shape[0]), int(X2.shape[0])
threads_per_block = (16, 16) # TODO: Maybe hardcoding this is bad
blocks_per_grid = tuple((dims[i] + threads_per_block[i] - 1) // threads_per_block[i] for i in range(2))
kernel(blocks_per_grid, threads_per_block, (x1cp, x2cp, outcp, self.variance, dims[0], dims[1], pt_dim))
cp.cuda.stream.get_current_stream().synchronize() # Need to synchronize so we can copy to PyTorch
# print("COPYING CUPY OUT TO PYTORCH")
# print("OUT CUPY\n", outcp)
# Copy the kernel back into the output PyTorch tensor
outcp_dlpack = outcp.toDlpack()
out_dlpack = torch.utils.dlpack.from_dlpack(outcp_dlpack)
out.copy_(out_dlpack)
# print("OUT PYTORCH\n", out)
# rand_idx_i, rand_idx_j = np.random.randint(X1.shape[0]), np.random.randint(X2.shape[0])
# xi, xj = X1[rand_idx_i].detach().cpu().numpy(), X2[rand_idx_j].detach().cpu().numpy()
# nxi, nxj = np.linalg.norm(xi), np.linalg.norm(xj)
# angle1, angle2 = np.linalg.norm(nxj * xi - nxi * xj), np.linalg.norm(nxj * xi + nxi * xj)
# angle = 2.0 * np.arctan2(angle1, angle2)
# kij = nxi * nxj * (np.sin(angle) + (1.0 + self.variance) * (np.pi - angle) * np.cos(angle)) / np.pi
# print(np.abs(kij - out[rand_idx_i, rand_idx_j].item()))
def _apply_sparse(self, X1: SparseTensor, X2: SparseTensor, out: torch.Tensor):
raise NotImplementedError("NeuralSpline does not implement sparse apply")
def _finalize(self, A: torch.Tensor, d):
if self.debug:
print(f"NeuralSpline._finalize(A={A.shape}, d)")
return A
def __str__(self):
return f"NeuralSplineKernel()"
def __repr__(self):
return self.__str__()
class LaplaceKernelSphere(Kernel, KeopsKernelMixin, ABC):
kernel_type = "angle"
def __init__(self, alpha, gamma, opt: Optional[FalkonOptions] = None):
super().__init__("LaplaceKernelSphere", self.kernel_type, opt)
self.debug = opt.debug if opt is not None else False
self.alpha = _extract_float(alpha)
self.gamma = _extract_float(gamma)
def extra_mem(self):
return {
# We transpose X2 in _apply
'nd': 0,
'md': 1,
# Norm results in prepare
'm': 0,
'n': 0,
# We do a copy in _apply
'nm': 1,
}
def _keops_mmv_impl(self, X1, X2, v, kernel, out, opt):
if self.debug:
print("LaplaceKernelSphere._keops_mmv_impl(X1, X2, v, kernel, out, opt)")
theta = 'two * Atan2(Norm2(Norm2(Y) * X - Norm2(X) * Y), Norm2(Norm2(Y) * X + Norm2(X) * Y))'
norm_xy = '(Norm2(X) * Norm2(Y))'
j01 = f'({norm_xy} * (Exp(alpha * Powf(one - Cos({theta}), gamma))))'
formula = f'({j01}) * v'
aliases = [
'X = Vi(%d)' % (X1.shape[1]),
'Y = Vj(%d)' % (X2.shape[1]),
'v = Vj(%d)' % (v.shape[1]),
'alpha = Pm(1)',
'gamma = Pm(1)',
'one = Pm(1)',
'two = Pm(1)',
]
other_vars = [torch.tensor([self.alpha]).to(dtype=X1.dtype, device=X1.device),
torch.tensor([self.gamma]).to(dtype=X1.dtype, device=X1.device),
torch.tensor([1.0]).to(dtype=X1.dtype, device=X1.device),
torch.tensor([2.0]).to(dtype=X1.dtype, device=X1.device)]
return self.keops_mmv(X1, X2, v, out, formula, aliases, other_vars, opt)
def _decide_mmv_impl(self, X1, X2, v, opt):
if self.keops_can_handle_mmv(X1, X2, v, opt):
return self._keops_mmv_impl
else:
return super()._decide_mmv_impl(X1, X2, v, opt)
def _decide_dmmv_impl(self, X1, X2, v, w, opt):
if self.keops_can_handle_dmmv(X1, X2, v, w, opt):
return functools.partial(self.keops_dmmv_helper, mmv_fn=self._keops_mmv_impl)
else:
return super()._decide_dmmv_impl(X1, X2, v, w, opt)
def _prepare(self, X1, X2, **kwargs):
if self.debug:
print("LaplaceKernelSphere._prepare(X1, X2, *kwargs)")
return []
def _prepare_sparse(self, X1: SparseTensor, X2: SparseTensor):
raise NotImplementedError("LaplaceKernelSphere does not implement sparse prepare")
def _apply(self, X1: torch.Tensor, X2: torch.Tensor, out: torch.Tensor):
if self.debug:
print("LaplaceKernelSphere._apply(X1, X2, out)")
kernel_code = r'''
#define PI (DTYPE) (3.1415926535897932384626433832795028841971693993751058209749445923078164062)
#define ONE (DTYPE) (1.0)
extern "C" __global__
void stable_kernel(const DTYPE* x1, const DTYPE* x2, DTYPE* out, const double alpha, double gamma,
const int N, int M, int D) {
const int I = (blockIdx.x * blockDim.x) + threadIdx.x;
const int J = (blockIdx.y * blockDim.y) + threadIdx.y;
if (I >= N || J >= M) {
return;
}
DTYPE norm_x = (DTYPE) 0.0; //normf(D, &x1[I*D]);
DTYPE norm_y = (DTYPE) 0.0; //normf(D, &x2[J*D]);
#pragma unroll
for (int k = 0; k < D; k += 1) {
norm_x = fma(x1[I * D + k], x1[I * D + k], norm_x);
norm_y = fma(x2[J * D + k], x2[J * D + k], norm_y);
}
norm_x = sqrt(norm_x);
norm_y = sqrt(norm_y);
DTYPE arg1 = (DTYPE) 0.0;
DTYPE arg2 = (DTYPE) 0.0;
#pragma unroll
for (int k = 0; k < D; k += 1) {
DTYPE x1_ik = x1[I * D + k];
DTYPE x2_jk = x2[J * D + k];
DTYPE a1 = norm_y * x1_ik - norm_x * x2_jk;
DTYPE a2 = norm_y * x1_ik + norm_x * x2_jk;
arg1 = fma(a1, a1, arg1);
arg2 = fma(a2, a2, arg2);
}
arg1 = sqrt(arg1);
arg2 = sqrt(arg2);
DTYPE angle = 2.0 * atan2(arg1, arg2);
DTYPE norm_xy = norm_x * norm_y;
DTYPE cos_angle = cos(angle);
DTYPE K = norm_xy * exp((DTYPE) alpha * pow(ONE - cos_angle, (DTYPE) gamma));
out[I * M + J] = K;
}
'''
assert X1.dtype == X2.dtype == out.dtype, "X1, X2, and out don't have the same dtype"
assert X1.device == X2.device == out.device, "X1, X2, and out are not on the same device"
assert out.device.index is not None, "None device index"
if X1.dtype == torch.float32:
str_dtype = "float"
cupy_dtype = cp.float32
elif X1.dtype == torch.float64:
str_dtype = "double"
cupy_dtype = cp.float64
else:
raise ValueError("Invalid dtype must be float32 or float64")
kernel_code = kernel_code.replace("DTYPE", str_dtype)
kernel = cp.RawKernel(kernel_code, 'stable_kernel')
# The .contiguous should be a no-op in both these cases, but add them in for good measure
X1 = X1.contiguous()
X2 = X2.T.contiguous()
# Convert X1 and X2 to CuPy arrays.
x1cp = cp.fromDlpack(torch.utils.dlpack.to_dlpack(X1))
x2cp = cp.fromDlpack(torch.utils.dlpack.to_dlpack(X2))
with cp.cuda.Device(out.device.index):
outcp = cp.zeros((out.shape[0], out.shape[1]), dtype=cupy_dtype)
# Run the CUDA kernel to build the matrix K
pt_dim = int(X1.shape[1])
dims = int(X1.shape[0]), int(X2.shape[0])
threads_per_block = (16, 16) # TODO: Maybe hardcoding this is bad
blocks_per_grid = tuple((dims[i] + threads_per_block[i] - 1) // threads_per_block[i] for i in range(2))
kernel(blocks_per_grid, threads_per_block,
(x1cp, x2cp, outcp, self.alpha, self.gamma, dims[0], dims[1], pt_dim))
cp.cuda.stream.get_current_stream().synchronize() # Need to synchronize so we can copy to PyTorch
# Copy the kernel back into the output PyTorch tensor
outcp_dlpack = outcp.toDlpack()
out_dlpack = torch.utils.dlpack.from_dlpack(outcp_dlpack)
out.copy_(out_dlpack)
def _apply_sparse(self, X1: SparseTensor, X2: SparseTensor, out: torch.Tensor):
raise NotImplementedError("LaplaceKernelSphere does not implement sparse apply")
def _finalize(self, A, d):
if self.debug:
print("LaplaceKernelSphere._finalize(A, d)")
return A
def __str__(self):
return f"LaplaceKernelSphere(alpha={self.alpha})"
def __repr__(self):
return self.__str__()
class LinearAngleKernel(Kernel, KeopsKernelMixin, ABC):
kernel_type = "angle"
def __init__(self, multiply_norm=False, opt: Optional[FalkonOptions] = None):
super().__init__("LinearAngleKernel", self.kernel_type, opt)
self.debug = opt.debug if opt is not None else False
self.multiply_norm = multiply_norm
def extra_mem(self):
return {
# We transpose X2 in _apply
'nd': 0,
'md': 1,
# Norm results in prepare
'm': 0,
'n': 0,
# We do a copy in _apply
'nm': 1,
}
def _keops_mmv_impl(self, X1, X2, v, kernel, out, opt):
if self.debug:
print(f"LinearAngleKernel._keops_mmv_impl(X1={X1.shape}, X2={X2.shape}, v, kernel, out, opt)")
theta = 'two * Atan2(Norm2(Norm2(Y) * X - Norm2(X) * Y), Norm2(Norm2(Y) * X + Norm2(X) * Y))'
if self.multiply_norm:
norm_xy = '(Norm2(X) * Norm2(Y))'
j01 = f'({norm_xy} * (pi - {theta}))'
else:
j01 = f'(pi - {theta})'
formula = f'({j01} / pi) * v'
aliases = [
'X = Vi(%d)' % (X1.shape[1]),
'Y = Vj(%d)' % (X2.shape[1]),
'v = Vj(%d)' % (v.shape[1]),
'pi = Pm(1)',
'two = Pm(1)'
]
other_vars = [torch.tensor([np.pi]).to(dtype=X1.dtype, device=X1.device),
torch.tensor([2.0]).to(dtype=X1.dtype, device=X1.device)]
return self.keops_mmv(X1, X2, v, out, formula, aliases, other_vars, opt)
def _decide_mmv_impl(self, X1, X2, v, opt):
if self.keops_can_handle_mmv(X1, X2, v, opt):
return self._keops_mmv_impl
else:
return super()._decide_mmv_impl(X1, X2, v, opt)
def _decide_dmmv_impl(self, X1, X2, v, w, opt):
if self.keops_can_handle_dmmv(X1, X2, v, w, opt):
return functools.partial(self.keops_dmmv_helper, mmv_fn=self._keops_mmv_impl)
else:
return super()._decide_dmmv_impl(X1, X2, v, w, opt)
def _prepare(self, X1, X2, **kwargs):
if self.debug:
print(f"LinearAngleKernel._prepare(X1={X1.shape}, X2={X2.shape}, *kwargs)")
return []
def _prepare_sparse(self, X1: SparseTensor, X2: SparseTensor):
raise NotImplementedError("LinearAngleKernel does not implement sparse prepare")
def _apply(self, X1: torch.Tensor, X2: torch.Tensor, out: torch.Tensor):
if self.debug:
print(f"LinearAngleKernel._apply(X1={X1.shape}, X2={X2.shape}, out={out.shape})")
kernel_code = r'''
#define PI (DTYPE) (3.1415926535897932384626433832795028841971693993751058209749445923078164062)
#define ONE (DTYPE) (1.0)
__MUL_NORM_DEFINE__
extern "C" __global__
void stable_kernel(const DTYPE* x1, const DTYPE* x2, DTYPE* out,
const int N, int M, int D) {
const int I = (blockIdx.x * blockDim.x) + threadIdx.x;
const int J = (blockIdx.y * blockDim.y) + threadIdx.y;
if (I >= N || J >= M) {
return;
}
DTYPE norm_x = (DTYPE) 0.0; //normf(D, &x1[I*D]);
DTYPE norm_y = (DTYPE) 0.0; //normf(D, &x2[J*D]);
#pragma unroll
for (int k = 0; k < D; k += 1) {
norm_x = fma(x1[I * D + k], x1[I * D + k], norm_x);
norm_y = fma(x2[J * D + k], x2[J * D + k], norm_y);
}
norm_x = sqrt(norm_x);
norm_y = sqrt(norm_y);
DTYPE arg1 = (DTYPE) 0.0;
DTYPE arg2 = (DTYPE) 0.0;
#pragma unroll
for (int k = 0; k < D; k += 1) {
DTYPE x1_ik = x1[I * D + k];
DTYPE x2_jk = x2[J * D + k];
DTYPE a1 = norm_y * x1_ik - norm_x * x2_jk;
DTYPE a2 = norm_y * x1_ik + norm_x * x2_jk;
arg1 = fma(a1, a1, arg1);
arg2 = fma(a2, a2, arg2);
}
arg1 = sqrt(arg1);
arg2 = sqrt(arg2);
DTYPE angle = 2.0 * atan2(arg1, arg2);
#ifdef MULTIPLY_NORM
DTYPE norm_xy = norm_x * norm_y;
DTYPE K = norm_xy * (PI - angle) / PI;
#else
DTYPE K = (PI - angle) / PI;
#endif
out[I * M + J] = K;
}
'''
assert X1.dtype == X2.dtype == out.dtype, "X1, X2, and out don't have the same dtype"
assert X1.device == X2.device == out.device, "X1, X2, and out are not on the same device"
assert out.device.index is not None, "None device index"
if X1.dtype == torch.float32:
str_dtype = "float"
cupy_dtype = cp.float32
elif X1.dtype == torch.float64:
str_dtype = "double"
cupy_dtype = cp.float64
else:
raise ValueError("Invalid dtype must be float32 or float64")
kernel_code = kernel_code.replace("DTYPE", str_dtype)
if self.multiply_norm:
kernel_code = kernel_code.replace("__MUL_NORM_DEFINE__", "#define MULTIPLY_NORM\n")
else:
kernel_code = kernel_code.replace("__MUL_NORM_DEFINE__", "\n")
kernel = cp.RawKernel(kernel_code, 'stable_kernel')
# The .contiguous should be a no-op in both these cases, but add them in for good measure
X1 = X1.contiguous()
X2 = X2.T.contiguous()
# Convert X1 and X2 to CuPy arrays.
x1cp = cp.fromDlpack(torch.utils.dlpack.to_dlpack(X1))
x2cp = cp.fromDlpack(torch.utils.dlpack.to_dlpack(X2))
with cp.cuda.Device(out.device.index):
outcp = cp.zeros((out.shape[0], out.shape[1]), dtype=cupy_dtype)
# Run the CUDA kernel to build the matrix K
pt_dim = int(X1.shape[1])
dims = int(X1.shape[0]), int(X2.shape[0])
threads_per_block = (16, 16) # TODO: Maybe hardcoding this is bad
blocks_per_grid = tuple((dims[i] + threads_per_block[i] - 1) // threads_per_block[i] for i in range(2))
kernel(blocks_per_grid, threads_per_block, (x1cp, x2cp, outcp, dims[0], dims[1], pt_dim))
cp.cuda.stream.get_current_stream().synchronize() # Need to synchronize so we can copy to PyTorch
# print("COPYING CUPY OUT TO PYTORCH")
# print("OUT CUPY\n", outcp)
# Copy the kernel back into the output PyTorch tensor
outcp_dlpack = outcp.toDlpack()
out_dlpack = torch.utils.dlpack.from_dlpack(outcp_dlpack)
out.copy_(out_dlpack)
# print("OUT PYTORCH\n", out)
# rand_idx_i, rand_idx_j = np.random.randint(X1.shape[0]), np.random.randint(X2.shape[0])
# xi, xj = X1[rand_idx_i].detach().cpu().numpy(), X2[rand_idx_j].detach().cpu().numpy()
# nxi, nxj = np.linalg.norm(xi), np.linalg.norm(xj)
# angle1, angle2 = np.linalg.norm(nxj * xi - nxi * xj), np.linalg.norm(nxj * xi + nxi * xj)
# angle = 2.0 * np.arctan2(angle1, angle2)
# kij = nxi * nxj * (np.sin(angle) + (1.0 + self.variance) * (np.pi - angle) * np.cos(angle)) / np.pi
# print(np.abs(kij - out[rand_idx_i, rand_idx_j].item()))
def _apply_sparse(self, X1: SparseTensor, X2: SparseTensor, out: torch.Tensor):
raise NotImplementedError("LinearAngleKernel does not implement sparse apply")
def _finalize(self, A: torch.Tensor, d):
if self.debug:
print(f"LinearAngleKernel._finalize(A={A.shape}, d)")
return A
def __str__(self):
return f"NeuralSplineKernel()"
def __repr__(self):
return self.__str__()
| 40.182137 | 112 | 0.554524 | 3,136 | 22,944 | 3.904018 | 0.081633 | 0.011762 | 0.01021 | 0.015682 | 0.898881 | 0.890713 | 0.871845 | 0.861227 | 0.850527 | 0.834518 | 0 | 0.048992 | 0.312326 | 22,944 | 570 | 113 | 40.252632 | 0.726962 | 0.104297 | 0 | 0.766355 | 0 | 0.056075 | 0.388371 | 0.035071 | 0 | 0 | 0 | 0.001754 | 0.021028 | 1 | 0.086449 | false | 0 | 0.023364 | 0.021028 | 0.198598 | 0.028037 | 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 |
0147ce45bcbe4f1fb4583e1d8412fdcf7c68b22d | 72 | py | Python | SysPy_ver/funcs/test.py | evlog/SysPy | d1ee6e2ca60492d20339c0016a9c24d027170553 | [
"CNRI-Python"
] | 4 | 2017-12-28T14:00:16.000Z | 2021-01-21T08:53:14.000Z | SysPy_ver/funcs/test.py | evlog/SysPy | d1ee6e2ca60492d20339c0016a9c24d027170553 | [
"CNRI-Python"
] | 1 | 2018-07-31T16:27:00.000Z | 2018-07-31T16:27:37.000Z | SysPy_ver/funcs/test.py | evlog/SysPy | d1ee6e2ca60492d20339c0016a9c24d027170553 | [
"CNRI-Python"
] | 2 | 2015-10-12T09:13:13.000Z | 2020-01-06T12:22:55.000Z | import _fp_sign_to_bin3 as f
print f.fp_sign_to_bin3("0.0017", "1.17")
| 18 | 41 | 0.75 | 17 | 72 | 2.764706 | 0.705882 | 0.255319 | 0.340426 | 0.510638 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.15625 | 0.111111 | 72 | 3 | 42 | 24 | 0.578125 | 0 | 0 | 0 | 0 | 0 | 0.138889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.5 | null | null | 0.5 | 1 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 8 |
018e0702a0c0cbc5088323f23ff577773f74fb98 | 54,865 | py | Python | projects/src/main/python/CodeJam/Y13R5P1/MingShen/generated_py_52d26a1806724f7c86c96e5f2a0c454e.py | DynamicCodeSearch/CodeSeer | ee985ece7691691585952eb88565f0e08bdc9113 | [
"MIT"
] | 5 | 2020-04-05T18:04:13.000Z | 2021-04-13T20:34:19.000Z | projects/src/main/python/CodeJam/Y13R5P1/MingShen/generated_py_52d26a1806724f7c86c96e5f2a0c454e.py | DynamicCodeSearch/CodeSeer | ee985ece7691691585952eb88565f0e08bdc9113 | [
"MIT"
] | 1 | 2020-04-29T21:42:26.000Z | 2020-05-01T23:45:45.000Z | projects/src/main/python/CodeJam/Y13R5P1/MingShen/generated_py_52d26a1806724f7c86c96e5f2a0c454e.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.Y13R5P1.MingShen.a import *
def func_2d4c2d98226c40b8bf514de3955cad0d(m, c):
b = 0
for i in range(c):
b += m - Xs[i]
return b
def func_9a6bf2b1fe4d4c508ef02df43ff41cee(m, c):
b = 0
for i in range(c):
b += m - Xs[i]
return i
def func_fa8868e04c0e415a9903d18bbdc4dd51(m, c):
for i in range(c):
b += m - Xs[i]
gain = b
return b
def func_0e9d63ea10a74aa28130e6d3b4f92743(m, c):
for i in range(c):
b += m - Xs[i]
gain = b
return gain
def func_918fcbdf6d2f430085215e802f94d220(m, c):
for i in range(c):
b += m - Xs[i]
gain = b
return i
def func_e2baf6440a714db6bd2191a39a771cd0(m, c):
gain = b
for i in range(c, len(Xs)):
if Xs[i] <= m:
b += m + 1 - Xs[i]
return i
def func_6eca21bca12c476590975194c8e2b8b5(m, c):
gain = b
for i in range(c, len(Xs)):
if Xs[i] <= m:
b += m + 1 - Xs[i]
return b
def func_a614a6ad80c1467e92afb6e55e0736b6(m, c):
gain = b
for i in range(c, len(Xs)):
if Xs[i] <= m:
b += m + 1 - Xs[i]
return gain
def func_697bed7ecc904ba9abf318adb0234688(m, c):
for i in range(c, len(Xs)):
if Xs[i] <= m:
b += m + 1 - Xs[i]
if Xs[i] <= m:
b += m + 1 - Xs[i]
return i
def func_c04fc46789bb447ab62f55a59a19299e(m, c):
for i in range(c, len(Xs)):
if Xs[i] <= m:
b += m + 1 - Xs[i]
if Xs[i] <= m:
b += m + 1 - Xs[i]
return b
def func_4c2d2fabda2c4cb487efbea90acb1079(m, WRONG, i):
if Xs[i] <= m:
b += m + 1 - Xs[i]
if b > B:
return WRONG
return b
def func_8740971f6a784f4eafdf6e3422c9f4ec(b, gain, WRONG, c):
if b > B:
return WRONG
return 36 * gain / c - b
def func_91ad6b3ffbb84906bbdc090f84a2f037(m, c):
b = 0
for i in range(c):
b += m - Xs[i]
gain = b
return b
def func_2b09c7fe0f604104ac45dc9acf306ec6(m, c):
b = 0
for i in range(c):
b += m - Xs[i]
gain = b
return i
def func_1e4e89acef214fd98c3f67d32ef5df48(m, c):
b = 0
for i in range(c):
b += m - Xs[i]
gain = b
return gain
def func_8293c464bb1a4a97ac04bb508eb89e48(m, c):
for i in range(c):
b += m - Xs[i]
gain = b
for i in range(c, len(Xs)):
if Xs[i] <= m:
b += m + 1 - Xs[i]
return i
def func_189e33bd040b467b9948afd1e85090b4(m, c):
for i in range(c):
b += m - Xs[i]
gain = b
for i in range(c, len(Xs)):
if Xs[i] <= m:
b += m + 1 - Xs[i]
return b
def func_c7a91734ac294fc09f3a5954ea086ad1(m, c):
for i in range(c):
b += m - Xs[i]
gain = b
for i in range(c, len(Xs)):
if Xs[i] <= m:
b += m + 1 - Xs[i]
return gain
def func_bac4c440bf1748bebebaaeb12b9d15d6(m, c):
gain = b
for i in range(c, len(Xs)):
if Xs[i] <= m:
b += m + 1 - Xs[i]
if Xs[i] <= m:
b += m + 1 - Xs[i]
return gain
def func_b2bc338aacd94b01b54def479474085b(m, c):
gain = b
for i in range(c, len(Xs)):
if Xs[i] <= m:
b += m + 1 - Xs[i]
if Xs[i] <= m:
b += m + 1 - Xs[i]
return i
def func_aa610da1f2a04820bacae825c87b542d(m, c):
gain = b
for i in range(c, len(Xs)):
if Xs[i] <= m:
b += m + 1 - Xs[i]
if Xs[i] <= m:
b += m + 1 - Xs[i]
return b
def func_66c8b0ec13904732acf29c0ae7f9393a(m, WRONG, c):
for i in range(c, len(Xs)):
if Xs[i] <= m:
b += m + 1 - Xs[i]
if Xs[i] <= m:
b += m + 1 - Xs[i]
if b > B:
return WRONG
return i
def func_199807575a574b1690dfce358095f8ca(m, WRONG, c):
for i in range(c, len(Xs)):
if Xs[i] <= m:
b += m + 1 - Xs[i]
if Xs[i] <= m:
b += m + 1 - Xs[i]
if b > B:
return WRONG
return b
def func_588349d2bcf14065a3976a7a3e7d1191(m, gain, WRONG, i, c):
if Xs[i] <= m:
b += m + 1 - Xs[i]
if b > B:
return WRONG
return 36 * gain / c - b
def func_c9c5bf8b9bea4d8bbe81dbca39324676(m, c):
b = 0
for i in range(c):
b += m - Xs[i]
gain = b
for i in range(c, len(Xs)):
if Xs[i] <= m:
b += m + 1 - Xs[i]
return i
def func_a3f68d86e5c04234b3ed8ffaf89237ee(m, c):
b = 0
for i in range(c):
b += m - Xs[i]
gain = b
for i in range(c, len(Xs)):
if Xs[i] <= m:
b += m + 1 - Xs[i]
return b
def func_cf05345ffacd426f82f0e263d3aa5c07(m, c):
b = 0
for i in range(c):
b += m - Xs[i]
gain = b
for i in range(c, len(Xs)):
if Xs[i] <= m:
b += m + 1 - Xs[i]
return gain
def func_a6e00057819a402994c2d59eeb9df192(m, c):
for i in range(c):
b += m - Xs[i]
gain = b
for i in range(c, len(Xs)):
if Xs[i] <= m:
b += m + 1 - Xs[i]
if Xs[i] <= m:
b += m + 1 - Xs[i]
return b
def func_3209bfac782d404c9bd7339c653b5051(m, c):
for i in range(c):
b += m - Xs[i]
gain = b
for i in range(c, len(Xs)):
if Xs[i] <= m:
b += m + 1 - Xs[i]
if Xs[i] <= m:
b += m + 1 - Xs[i]
return gain
def func_c3849453f00c46e48fcef96d4424713c(m, c):
for i in range(c):
b += m - Xs[i]
gain = b
for i in range(c, len(Xs)):
if Xs[i] <= m:
b += m + 1 - Xs[i]
if Xs[i] <= m:
b += m + 1 - Xs[i]
return i
def func_369726c893ad4d28acc6becf0db778bb(m, WRONG, c):
gain = b
for i in range(c, len(Xs)):
if Xs[i] <= m:
b += m + 1 - Xs[i]
if Xs[i] <= m:
b += m + 1 - Xs[i]
if b > B:
return WRONG
return b
def func_a2d057a5dfec4a7f95e275b502b6ca6c(m, WRONG, c):
gain = b
for i in range(c, len(Xs)):
if Xs[i] <= m:
b += m + 1 - Xs[i]
if Xs[i] <= m:
b += m + 1 - Xs[i]
if b > B:
return WRONG
return gain
def func_4c35ce71a7eb4f5b8d4dc6b283497402(m, WRONG, c):
gain = b
for i in range(c, len(Xs)):
if Xs[i] <= m:
b += m + 1 - Xs[i]
if Xs[i] <= m:
b += m + 1 - Xs[i]
if b > B:
return WRONG
return i
def func_206d954f210c4e29a8c8bb53e9ebc961(m, gain, WRONG, c):
for i in range(c, len(Xs)):
if Xs[i] <= m:
b += m + 1 - Xs[i]
if Xs[i] <= m:
b += m + 1 - Xs[i]
if b > B:
return WRONG
return 36 * gain / c - b
def func_ec67f605e55848b0839273de2f4d1133(m, c):
b = 0
for i in range(c):
b += m - Xs[i]
gain = b
for i in range(c, len(Xs)):
if Xs[i] <= m:
b += m + 1 - Xs[i]
if Xs[i] <= m:
b += m + 1 - Xs[i]
return b
def func_679ea72e334647db94992464288e5ac7(m, c):
b = 0
for i in range(c):
b += m - Xs[i]
gain = b
for i in range(c, len(Xs)):
if Xs[i] <= m:
b += m + 1 - Xs[i]
if Xs[i] <= m:
b += m + 1 - Xs[i]
return i
def func_1a10af9c83d94bdab3c2421d828e0dfd(m, c):
b = 0
for i in range(c):
b += m - Xs[i]
gain = b
for i in range(c, len(Xs)):
if Xs[i] <= m:
b += m + 1 - Xs[i]
if Xs[i] <= m:
b += m + 1 - Xs[i]
return gain
def func_5ee0a6887e5a4f2f84540a2e656abab0(m, WRONG, c):
for i in range(c):
b += m - Xs[i]
gain = b
for i in range(c, len(Xs)):
if Xs[i] <= m:
b += m + 1 - Xs[i]
if Xs[i] <= m:
b += m + 1 - Xs[i]
if b > B:
return WRONG
return b
def func_898337a49b2745b08bae7af75046a3e1(m, WRONG, c):
for i in range(c):
b += m - Xs[i]
gain = b
for i in range(c, len(Xs)):
if Xs[i] <= m:
b += m + 1 - Xs[i]
if Xs[i] <= m:
b += m + 1 - Xs[i]
if b > B:
return WRONG
return gain
def func_cae81ab60fc641ffadaadc166e498087(m, WRONG, c):
for i in range(c):
b += m - Xs[i]
gain = b
for i in range(c, len(Xs)):
if Xs[i] <= m:
b += m + 1 - Xs[i]
if Xs[i] <= m:
b += m + 1 - Xs[i]
if b > B:
return WRONG
return i
def func_4610285c169b416fa1b559e4fae1b13f(m, WRONG, c):
gain = b
for i in range(c, len(Xs)):
if Xs[i] <= m:
b += m + 1 - Xs[i]
if Xs[i] <= m:
b += m + 1 - Xs[i]
if b > B:
return WRONG
return 36 * gain / c - b
def func_43383728ac0e4ff093bc57bc0e6002ed(m, WRONG, c):
b = 0
for i in range(c):
b += m - Xs[i]
gain = b
for i in range(c, len(Xs)):
if Xs[i] <= m:
b += m + 1 - Xs[i]
if Xs[i] <= m:
b += m + 1 - Xs[i]
if b > B:
return WRONG
return gain
def func_d6fef39d96ca4d83afab269827de2f34(m, WRONG, c):
b = 0
for i in range(c):
b += m - Xs[i]
gain = b
for i in range(c, len(Xs)):
if Xs[i] <= m:
b += m + 1 - Xs[i]
if Xs[i] <= m:
b += m + 1 - Xs[i]
if b > B:
return WRONG
return b
def func_9e91df7e8b554cc0956ba7dffb9ff2e4(m, WRONG, c):
b = 0
for i in range(c):
b += m - Xs[i]
gain = b
for i in range(c, len(Xs)):
if Xs[i] <= m:
b += m + 1 - Xs[i]
if Xs[i] <= m:
b += m + 1 - Xs[i]
if b > B:
return WRONG
return i
def func_25a6a9dbcfed4dc3bcc4aaf332b3f55b(m, WRONG, c):
for i in range(c):
b += m - Xs[i]
gain = b
for i in range(c, len(Xs)):
if Xs[i] <= m:
b += m + 1 - Xs[i]
if Xs[i] <= m:
b += m + 1 - Xs[i]
if b > B:
return WRONG
return 36 * gain / c - b
def func_a770aded047e451fa854461f0c757c2a(m, WRONG, c):
b = 0
for i in range(c):
b += m - Xs[i]
gain = b
for i in range(c, len(Xs)):
if Xs[i] <= m:
b += m + 1 - Xs[i]
if Xs[i] <= m:
b += m + 1 - Xs[i]
if b > B:
return WRONG
return 36 * gain / c - b
def func_6f53282591a945a49b2c89ab630a3ab8(l, m, ret, WRONG, i):
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return r
def func_09667d7c5f1448f096a3514710725cee(l, m, ret, WRONG, i):
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return ret2
def func_d70391a2502a4cebafeecf9911746d6b(r, l, i):
m = (l + r) // 2
ret = comp(i, m)
return m
def func_a07d5f6f5de941a993c96e6f305d0591(r, l, i):
m = (l + r) // 2
ret = comp(i, m)
return ret
def func_9aca902ceed54c93b6201770e472ffeb(B, Xs, i):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
return l
def func_cfee656373004312bc6cb291adf2a94c(B, Xs, i):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
return r
def func_74a06fa90cbb40e584dd1a694531fdd6(B, l, Xs, i):
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return ret
def func_51b6c956125f40418aee150f10023a8b(B, l, Xs, i):
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return m
def func_064cb5f84a924167ac92944eb518f040(B, l, Xs, i):
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return ret2
def func_659a3d7a3c294ae6b6aff7ab4a247ce4(B, l, Xs, i):
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return WRONG
def func_0328db00df06454db58ab0ad90523a92(B, l, Xs, i):
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return ans
def func_ca04827960464da5a0031d92e312e74c(B, l, Xs, i):
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return r
def func_445ec428f84048b6b7dc0c81953612b2(B, Xs, i):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return ret2
def func_3c1131e8da124e0e8b8709d2fc350e42(B, Xs, i):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return WRONG
def func_538780ebf9634a7ab563c45c994d376a(B, Xs, i):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return m
def func_1232c1ccca5549c3b89e73310436238c(B, Xs, i):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return l
def func_2f4650c1a3d549bc862617083ef13deb(B, Xs, i):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return ans
def func_ef0b98ba88a94ffe894c786db68e98de(B, Xs, i):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return r
def func_1d49afeee2cd4b6f9a51e6ac4fe5799f(B, Xs, i):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return ret
def func_cac1a5b4484e4708bc440b30eed5e3c6(infile):
global B, N, Xs
B, N = map(int, infile.readline().split())
return B
def func_53279d7c67804a3e9f57b101cc346070(infile):
global B, N, Xs
B, N = map(int, infile.readline().split())
return N
def func_15dacd09cad84a7a9274ecf61e7c4357(infile):
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
return Xs
def func_406501120d4d4799b2f130fdd71a5ca2(infile):
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
return N
def func_629efab817954eaaacef94f2fc6bffe5(infile):
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
return B
def func_d4852e5145b54dc287f6ec3d2d8c38c4(N, infile):
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
return Xs
def func_dd6d7e5530cf4f5a849e41718422082d(N, infile):
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
return ans
def func_25b4d376dec14b0383a096e10fe48da9(B, Xs):
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return WRONG
def func_2853ae9c132a4964ad8ce6359bbc2b5f(B, Xs):
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return ans
def func_a65969cf76824269a9fb6b595b35739d(B, Xs):
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return ret
def func_fe944a8caba84155b7a630378bf1b688(B, Xs):
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return l
def func_a7b02f324c834db69d4b4da6102f4ac1(B, Xs):
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return i
def func_e9d511b50e9c4749824694f707a77dce(B, Xs):
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return r
def func_e293af8168db41d1b91dbae1a030a3d9(B, Xs):
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return ret2
def func_3bb25d15b5074a6e9dad29cc6fa055d5(B, Xs):
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return m
def func_6b0054ca291c44beb5449ac3bf2e66aa(B, Xs):
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return ans
def func_6c6cdc3097b64bb98ac38ce86d47e62b(infile):
global B, N, Xs
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
return N
def func_f2f82012a51148ea838d2dfc88390015(infile):
global B, N, Xs
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
return B
def func_fbd3beaf5a4943f3a225977292143503(infile):
global B, N, Xs
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
return Xs
def func_8156f35bfaf3458c9d1c3ca9395d798d(infile):
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
return B
def func_d15b509749d843beaad39b8e43c67e71(infile):
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
return N
def func_741768af82c646fa913c7f2ab3da6fe3(infile):
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
return Xs
def func_b6542dcd11934ea58e4c79be33ac1f7d(infile):
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
return ans
def func_abe2de6fc5f348f884f0257c3b4bfdd5(B, N, infile):
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return m
def func_95036cddf487429cba08d07121a675f4(B, N, infile):
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return ret
def func_c75db0dcc39e4b9082ead8ead6e622fa(B, N, infile):
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return ret2
def func_d338591e0c464345bc5012958fad7feb(B, N, infile):
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return r
def func_3dcb7c6a008345159f8361cfb0a4bbb4(B, N, infile):
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return Xs
def func_c9edfe6843f0452787a73862122dc4fe(B, N, infile):
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return i
def func_81e65db61bde4d09b3b1550e42deef93(B, N, infile):
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return l
def func_c131a7ea51664bdeb0dc837508df5e7f(B, N, infile):
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return WRONG
def func_a0e025fe592e4a6eb1714d58e4cc39c8(B, N, infile):
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return ans
def func_37bbb8a56f044502bf36633e980b1f5f(B, Xs):
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return ans
def func_6e409dd2234f49eaaafa86a877bd59e7(infile):
global B, N, Xs
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
return Xs
def func_141eb8498b524cbc9e100d63c84891cc(infile):
global B, N, Xs
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
return ans
def func_13290adbaabf45ae9cfe723de1cf1bbe(infile):
global B, N, Xs
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
return N
def func_0b9ddd3d296a46b7b5dcd295a3ca6ac0(infile):
global B, N, Xs
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
return B
def func_7c97286ec26e46ecb7bd3de4ff59032c(infile):
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return m
def func_87320e0b6b2a40e8943f1cce5c6dca37(infile):
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return ret
def func_dc793ab0ecf74ec499e243064fc6d389(infile):
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return ans
def func_4f39bc495c56447599673d1ed119bba8(infile):
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return r
def func_8c1f335e5313400cacbb1c6934ac45cc(infile):
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return WRONG
def func_0deb7af1cc67416988b545d395180eff(infile):
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return N
def func_7c55a730e8b444078532e9f0658acfe4(infile):
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return Xs
def func_ff9a40ae62aa47a1a0e780ac42fe398b(infile):
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return i
def func_5e65e0fcf1a949f696cabdb04928ec09(infile):
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return l
def func_d2818a7c7f6e4a22a0bb4717c11c406e(infile):
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return ret2
def func_7cfad65e5b3f44c19a5bfba10495e43e(infile):
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return B
def func_7596e25169f84d98b4c425fdbe408191(B, N, infile):
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return ans
def func_4dc7a5dbd7384bafb57ff50d256492a5(infile):
global B, N, Xs
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return N
def func_0187abcf4aa34593a497fb4010fb4778(infile):
global B, N, Xs
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return B
def func_926869432c614e358b1cae46a292ef90(infile):
global B, N, Xs
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return ans
def func_1b3c0bcf16354842a52e73e05b53b523(infile):
global B, N, Xs
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return ret2
def func_b246c798aa7b40bca8c619f13fe9655e(infile):
global B, N, Xs
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return WRONG
def func_21d5534e9ccd45b0a0686d42e3dbb323(infile):
global B, N, Xs
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return m
def func_a03112ee41ca4b7f8b9448e54be39fd9(infile):
global B, N, Xs
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return Xs
def func_e90ad07046424fb7a8d97e7d760d4b67(infile):
global B, N, Xs
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return ret
def func_982e09a8721240dba55bdf7edb3d77fc(infile):
global B, N, Xs
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return i
def func_5c2d156ff6094bffb231c727a2976fd9(infile):
global B, N, Xs
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return r
def func_1c6eca0636414a54859b7f99a9387d41(infile):
global B, N, Xs
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return l
def func_3bc3c4b1986c4dd38c83b1b8a7f41ff8(infile):
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return ans
def func_38fde33c37a24d9fa8549f50873eef52(infile):
global B, N, Xs
B, N = map(int, infile.readline().split())
Xs = sorted([0] * (37 - N) + list(map(int, infile.readline().split())))
ans = 0
for i in range(1, 38):
l = max(1, Xs[i - 1]) - 1
r = B + Xs[36] + 1
while l + 1 < r:
m = (l + r) // 2
ret = comp(i, m)
if ret is WRONG:
r = m
else:
ans = max(ans, ret)
if m + 1 == r:
break
ret2 = comp(i, m + 1)
if ret2 is WRONG:
r = m
elif ret < ret2:
l = m
else:
r = m
return ans
def func_676bb681a231474b94a32be26a48ec78():
infile = open('codejam/test_files/Y13R5P1/A.in')
T = int(infile.readline())
return infile
def func_4d673981c6e54200b5af542705b53738():
infile = open('codejam/test_files/Y13R5P1/A.in')
T = int(infile.readline())
return T
def func_2e03886e95524816b1e73253162babd0(infile):
T = int(infile.readline())
for tn in range(T):
print 'Case #{0}: {1:.10f}'.format(tn + 1, solve(infile))
return T
def func_e59ffad14eac4683b691c9e67dbb897c(infile):
T = int(infile.readline())
for tn in range(T):
print 'Case #{0}: {1:.10f}'.format(tn + 1, solve(infile))
return tn
def func_7203cc6fd8b540aea1b026456870d909(T, infile):
for tn in range(T):
print 'Case #{0}: {1:.10f}'.format(tn + 1, solve(infile))
infile.close()
return tn
def func_daea928ec6f845d78894f1f72a35d2fb():
infile = open('codejam/test_files/Y13R5P1/A.in')
T = int(infile.readline())
for tn in range(T):
print 'Case #{0}: {1:.10f}'.format(tn + 1, solve(infile))
return infile
def func_96923b01f8db49a1a18fcfbf1a77b48a():
infile = open('codejam/test_files/Y13R5P1/A.in')
T = int(infile.readline())
for tn in range(T):
print 'Case #{0}: {1:.10f}'.format(tn + 1, solve(infile))
return tn
def func_97f45be8a742493a8dbfdb7472a45409():
infile = open('codejam/test_files/Y13R5P1/A.in')
T = int(infile.readline())
for tn in range(T):
print 'Case #{0}: {1:.10f}'.format(tn + 1, solve(infile))
return T
def func_b5e82dbf9c19427e94c3c1841f65e27d(infile):
T = int(infile.readline())
for tn in range(T):
print 'Case #{0}: {1:.10f}'.format(tn + 1, solve(infile))
infile.close()
return tn
def func_2a329c0b1090472ab56425ca6f40907a(infile):
T = int(infile.readline())
for tn in range(T):
print 'Case #{0}: {1:.10f}'.format(tn + 1, solve(infile))
infile.close()
return T
def func_b666723e2e644010b13a77ccd2effb71():
infile = open('codejam/test_files/Y13R5P1/A.in')
T = int(infile.readline())
for tn in range(T):
print 'Case #{0}: {1:.10f}'.format(tn + 1, solve(infile))
infile.close()
return infile
def func_4ae906360d63477ab18301ec271c4918():
infile = open('codejam/test_files/Y13R5P1/A.in')
T = int(infile.readline())
for tn in range(T):
print 'Case #{0}: {1:.10f}'.format(tn + 1, solve(infile))
infile.close()
return tn
def func_7a095c880dd04bbc88bb63e39070b0ce():
infile = open('codejam/test_files/Y13R5P1/A.in')
T = int(infile.readline())
for tn in range(T):
print 'Case #{0}: {1:.10f}'.format(tn + 1, solve(infile))
infile.close()
return T
| 25.341801 | 86 | 0.405322 | 7,247 | 54,865 | 3.048158 | 0.029116 | 0.021005 | 0.032051 | 0.047261 | 0.7866 | 0.785785 | 0.785061 | 0.785061 | 0.785061 | 0.784337 | 0 | 0.138579 | 0.471138 | 54,865 | 2,164 | 87 | 25.353512 | 0.622725 | 0 | 0 | 0.924138 | 0 | 0 | 0.009551 | 0.005741 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.001061 | null | null | 0.005836 | 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 |
01946e99f5c5d6fc3366e42bc7e1a4f8f9828b7b | 12,874 | py | Python | plotter.py | TUCMath/optimal-predictor | 75d211ca0c09c8a008dc938f69e969ed3e6926ad | [
"MIT"
] | 1 | 2021-09-04T17:40:40.000Z | 2021-09-04T17:40:40.000Z | plotter.py | TUCMath/optimal-predictor | 75d211ca0c09c8a008dc938f69e969ed3e6926ad | [
"MIT"
] | null | null | null | plotter.py | TUCMath/optimal-predictor | 75d211ca0c09c8a008dc938f69e969ed3e6926ad | [
"MIT"
] | 1 | 2021-05-16T23:03:01.000Z | 2021-05-16T23:03:01.000Z | from parameters import *
from animate_2D import *
from animate import *
from os import remove
import matplotlib
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.gridspec as gridspec
import matplotlib.pyplot as plt
from matplotlib import cm
import tikzplotlib
import matplotlib.pyplot as plt
from numpy import linalg
from nodes import *
from scipy import trapz
from matplotlib.offsetbox import AnchoredText
font = {'family' : 'serif',
'size' : 12}
matplotlib.rc('font', **font)
## To plot cost #################################################################################
u_real = load('./data/u_real_'+file_name+'.npy')
u_pred = load('./data/u_pred_'+file_name+'.npy')
omega_b = load('./data/omega_'+file_name+'.npy')
cost_values = load('./data/cost_values_'+file_name+'.npy')
if '2D' in equation:
plt.figure()
for i in range(0,4):
SenWei = [5,10,15,20][i]
file_name = equation + '_Time{}'.format(t_max) \
+'_N{}_spline_reconstruction_SenWei{}_IC{}_dx{}_omega_0random_itr{}'.format(N,SenWei,IC,dx,max_itr)
cost_values = load('./data/cost_values_'+file_name+'.npy')
plt.plot(cost_values,linewidth=2)
plt.legend([r'$\alpha = 5$',r'$\alpha = 10$',r'$\alpha = 15$',r'$\alpha = 20$'])
plt.xlabel('Iterations')
plt.ylabel(r'$J(\omega)$')
plt.xlim(1,max_itr)
plt.savefig('./figs/cost_'+file_name+'.png',bbox_inches='tight')
plt.savefig('./figs/cost_'+file_name+'.pdf',bbox_inches='tight')
figpath = './figs/cost_'+file_name+'.tex'
tikzplotlib.save(figure='gcf', filepath=figpath)
if 'IC1' in file_name and 'heat' in file_name:
plt.figure()
for i in ['IC1','IC2','IC3','ICstep']:
new_file_name = file_name.replace('IC1',i)
cost_values = load('./data/cost_values_'+new_file_name+'.npy')
plt.plot(cost_values,linewidth=2)
plt.legend([r'$u_0=x^2(x-1)^2(x-1/2)^2$',r'$u_0=x^2(x-1)^2(x+1/2)^2$',
r'$u_0=x^2(x-1)^2(x-1/4)^2$',r'$H(x-1/2)$'])
plt.xlabel('Iterations')
plt.ylabel(r'$J(\omega)$')
plt.xlim(1,max_itr)
new_file_name = file_name.replace('IC1','IC123step')
plt.savefig('./figs/cost_'+new_file_name+'.png')
plt.savefig('./figs/cost_'+new_file_name+'.pdf')
figpath = './figs/cost_'+new_file_name+'.tex'
tikzplotlib.save(figure='gcf', filepath=figpath)
if 'IC1' in file_name and 'wave' in file_name:
plt.figure()
for i in ['IC1','IC2','IC3']:
new_file_name = file_name.replace('IC1',i)
cost_values = load('./data/cost_values_'+new_file_name+'.npy')
plt.plot(cost_values,linewidth=2)
plt.legend([r'$u_0=x^2(x-1)^2(x-1/2)^2$',r'$u_0=x^2(x-1)^2(x+1/2)^2$',
r'$u_0=x^2(x-1)^2(x-1/4)^2$'])
plt.xlabel('Iterations')
plt.ylabel(r'$J(\omega)$')
plt.xlim(1,max_itr)
new_file_name = file_name.replace('IC1','IC123step')
plt.savefig('./figs/cost_'+new_file_name+'.png')
plt.savefig('./figs/cost_'+new_file_name+'.pdf')
figpath = './figs/cost_'+new_file_name+'.tex'
tikzplotlib.save(figure='gcf', filepath=figpath)
## To plot norm of error #########################################################################
u_real = load('./data/u_real_'+file_name+'.npy')
u_pred = load('./data/u_pred_'+file_name+'.npy')
omega_b = load('./data/omega_'+file_name+'.npy')
cost_values = load('./data/cost_values_'+file_name+'.npy')
if '2D' in equation:
fig = plt.figure()
ax = fig.add_subplot()
for i in range(0,4):
SenWei = [5,10,15,20][i]
file_name = equation + '_Time{}'.format(t_max) \
+'_N{}_spline_reconstruction_SenWei{}_IC{}_dx{}_omega_0random_itr{}'.format(N,SenWei,IC,dx,max_itr)
u_real = load('./data/u_real_'+file_name+'.npy')
u_pred = load('./data/u_pred_'+file_name+'.npy')
error = u_real - u_pred
error_1norm = dx*dy*linalg.norm(error, ord=1, axis=(1,2))
ax.plot(t, error_1norm, linewidth=2)
ax.legend([r'$\alpha = 5$',r'$\alpha = 10$',r'$\alpha = 15$',r'$\alpha = 20$'])
ax.set_xlabel(r'$t$')
ax.set_ylabel(r'$\|u_r-u_p\|_1$')
ax.set_xlim(0,t_max)
fig.savefig('./figs/error_l1norm_'+file_name+'.png',bbox_inches='tight')
fig.savefig('./figs/error_l1norm_'+file_name+'.pdf',bbox_inches='tight')
figpath = './figs/error_l1norm_'+file_name+'.tex'
tikzplotlib.save(figure='gcf', filepath=figpath)
if 'IC1' in file_name and 'heat' in file_name:
fig1 = plt.figure()
fig2 = plt.figure()
ax1 = fig1.add_subplot()
ax2 = fig2.add_subplot()
for i in ['IC1','IC2','IC3','ICstep']:
new_file_name = file_name.replace('IC1',i)
u_real = load('./data/u_real_'+new_file_name+'.npy')
u_pred = load('./data/u_pred_'+new_file_name+'.npy')
error = u_real - u_pred
error_1norm = dx*linalg.norm(error, ord=1, axis=1)
error_maxnorm = linalg.norm(error, ord=np.inf, axis=1)
ax1.plot(t,error_1norm,linewidth=2)
ax1 = fig1.add_subplot()
ax2.plot(t,error_maxnorm,linewidth=2)
ax2 = fig2.add_subplot()
ax1.set_xlabel(r'$t$')
ax1.set_ylabel(r'$\|u_r-u_p\|_1$')
ax1.set_xlim(0,t_max)
ax1.legend([r'$u_0=x^2(x-1)^2(x-1/2)^2$',r'$u_0=x^2(x-1)^2(x+1/2)^2$',
r'$u_0=x^2(x-1)^2(x-1/4)^2$',r'$H(x-1/2)$'])
fig1.savefig('./figs/error_l1norm_'+file_name+'.png')
fig1.savefig('./figs/error_l1norm_'+file_name+'.pdf')
ax2.set_xlabel(r'$t$')
ax2.set_ylabel(r'$\|u_r-u_p\|_\infty$')
ax2.set_xlim(0,t_max)
ax2.legend([r'$u_0=x^2(x-1)^2(x-1/2)^2$',r'$u_0=x^2(x-1)^2(x+1/2)^2$',
r'$u_0=x^2(x-1)^2(x-1/4)^2$',r'$H(x-1/2)$'])
fig2.savefig('./figs/error_linftynorm_'+file_name+'.png')
fig2.savefig('./figs/error_linftynorm_'+file_name+'.pdf')
if 'IC1' in file_name and 'wave' in file_name:
fig1 = plt.figure()
fig2 = plt.figure()
ax1 = fig1.add_subplot()
ax2 = fig2.add_subplot()
for i in ['IC1','IC2','IC3']:
new_file_name = file_name.replace('IC1',i)
u_real = load('./data/u_real_'+new_file_name+'.npy')
u_pred = load('./data/u_pred_'+new_file_name+'.npy')
error = u_real - u_pred
error_1norm = dx*linalg.norm(error, ord=1, axis=1)
error_maxnorm = linalg.norm(error, ord=np.inf, axis=1)
ax1.plot(t,error_1norm,linewidth=2)
ax1 = fig1.add_subplot()
ax2.plot(t,error_maxnorm,linewidth=2)
ax2 = fig2.add_subplot()
ax1.set_xlabel(r'$t$')
ax1.set_ylabel(r'$\|u_r-u_p\|_1$')
ax1.set_xlim(0,t_max)
ax1.legend([r'$u_0=x^2(x-1)^2(x-1/2)^2$',r'$u_0=x^2(x-1)^2(x+1/2)^2$',
r'$u_0=x^2(x-1)^2(x-1/4)^2$'], loc='upper right')
fig1.savefig('./figs/error_l1norm_'+file_name+'.png')
fig1.savefig('./figs/error_l1norm_'+file_name+'.pdf')
ax2.set_xlabel(r'$t$')
ax2.set_ylabel(r'$\|u_r-u_p\|_\infty$')
ax2.set_xlim(0,t_max)
ax2.legend([r'$u_0=x^2(x-1)^2(x-1/2)^2$',r'$u_0=x^2(x-1)^2(x+1/2)^2$',
r'$u_0=x^2(x-1)^2(x-1/4)^2$'], loc='upper right')
fig2.savefig('./figs/error_linftynorm_'+file_name+'.png')
fig2.savefig('./figs/error_linftynorm_'+file_name+'.pdf')
## To plot snapshots #############################################################################
u_real = load('./data/u_real_'+file_name+'.npy')
u_pred = load('./data/u_pred_'+file_name+'.npy')
omega_b = load('./data/omega_'+file_name+'.npy')
cost_values = load('./data/cost_values_'+file_name+'.npy')
error = u_real - u_pred
if '2D' in equation:
x_grid, y_grid = meshgrid(x, y)
x_sensor = nodes_2D(omega_b)[0]
y_sensor = nodes_2D(omega_b)[1]
#gs1 = gridspec.GridSpec(1, 1)
#gs1.update(wspace=0.1, hspace=0.2)
for i in range(0,4):
s = i * t_max / 3
fig = plt.figure()
ax = fig.gca(projection='3d')
ax.plot_surface(x_grid,y_grid,error[round(s/dt),:,:],rstride=1, cstride=1, cmap=cm.coolwarm,
linewidth=0, antialiased=False)
ax.set_xlim(0,1)
ax.set_xlabel(r'$x$')
ax.set_ylim(0,1)
ax.set_ylabel(r'$y$')
ax.set_zlim(-u_max,u_max)
ax.set_zlabel('Error')
at = AnchoredText(r'$t=$%d'%s,
prop=dict(size=10), frameon=False,
loc='upper right',
)
ax.add_artist(at)
plt.savefig('./figs/snapshots{}_'.format(i)+file_name+'.pdf')
fig, axs = plt.subplots(2,2, sharex=True, sharey=True)
fig.subplots_adjust(left=None, bottom=None, right=None, top=None, wspace=None, hspace=0.3)
for i in range(0,4):
SenWei = [5,10,15,20][i]
file_name = equation + '_Time{}'.format(t_max) \
+'_N{}_spline_reconstruction_SenWei{}_IC{}_dx{}_omega_0random_itr{}'.format(N,SenWei,IC,dx,max_itr)
omega_b = load('./data/omega_'+file_name+'.npy')
x_sensor = nodes_2D(omega_b)[0]
y_sensor = nodes_2D(omega_b)[1]
axsr = axs.reshape(4,)
axsr[i].plot(x[x_sensor],y[y_sensor],'gs')
axsr[i].set_xlim(0,1)
axsr[i].set_xlabel(r'$x$')
axsr[i].set_ylim(0,1)
axsr[i].set_ylabel(r'$y$')
axsr[i].set_title(r'$\alpha = {}$'.format(SenWei))
axsr[i].grid(True)
fig.savefig('./figs/sensor_shape_'.format(i)+file_name+'.pdf')
fig.savefig('./figs/sensor_shape_'.format(i)+file_name+'.png')
if 'heat' in equation and '2D' not in equation:
fig, axs = plt.subplots(4, sharex=True, sharey=True)
x_sensor = x[nodes(omega_b)]
y_sensor = array([0]*len(x_sensor))
for i in range(0,4):
s = i * t_max / 3
axs[i].plot(x,u_real[round(s/dt),:])
axs[i].plot(x,u_pred[round(s/dt),:],'--')
axs[i].set_xlim(0,1)
axs[i].set_ylim(0,u_max)
at = AnchoredText(r'$t=$%d'%s,
prop=dict(size=10), frameon=False,
loc='upper right',
)
axs[i].add_artist(at)
axs[i].plot(x_sensor,y_sensor,'s')
fig.text(0.5, 0.04, r'$x$', ha='center')
fig.text(0.04, 0.5, r'$u_r(x,t)$ and $u_p(x,t)$', va='center', rotation='vertical')
fig.savefig('./figs/snapshots_' + file_name + '.png')
plt.savefig('./figs/snapshots_'+file_name+'.pdf')
figpath = './figs/snapshots_'+file_name+'.tex'
#tikzplotlib.save(figure='gcf', filepath=figpath)
if 'wave' in equation:
fig, axs = plt.subplots(4, sharex=True, sharey=True)
x_sensor = x[nodes(omega_b)]
y_sensor = array([-u_max]*len(x_sensor))
for i in range(0,4):
s = i * t_max / 3
axs[i].plot(x,u_real[round(s/dt),:])
axs[i].plot(x,u_pred[round(s/dt),:],'--')
axs[i].set_xlim(0,1)
axs[i].set_ylim(-u_max,u_max)
at = AnchoredText(r'$t=$%d'%s,
prop=dict(size=10), frameon=False,
loc='upper right',
)
axs[i].add_artist(at)
axs[i].plot(x_sensor,y_sensor,'s')
fig.text(0.5, 0.04, r'$x$', ha='center')
fig.text(0.04, 0.5, r'$u_r(x,t)$ and $u_p(x,t)$', va='center', rotation='vertical')
fig.savefig('./figs/snapshots_' + file_name + '.png')
plt.savefig('./figs/snapshots_'+file_name+'.pdf')
figpath = './figs/snapshots_'+file_name+'.tex'
#tikzplotlib.save(figure='gcf', filepath=figpath)
## To create animation #########################################################################
u_real = load('./data/u_real_'+file_name+'.npy')
u_pred = load('./data/u_pred_'+file_name+'.npy')
omega_b = load('./data/omega_'+file_name+'.npy')
cost_values = load('./data/cost_values_'+file_name+'.npy')
try:
remove('./gifs/animate_'+file_name+'.gif')
except OSError:
pass
if '2D' in equation:
pass #animate_2D(u_real-u_pred,omega_b,'animate_'+file_name)
else:
pass #animate(u_real,u_pred,omega_b,'animate_'+file_name)
## To create 3D plots ##########################################################################
exit()
fig = plt.figure()
ax = fig.gca(projection='3d')
error = u_real - u_pred
x, t = np.meshgrid(x, t)
surf1 = ax.plot_surface(t, x, error, cmap=cm.coolwarm,
linewidth=0, antialiased=False)
ax.set_xlabel(r'$t$')
ax.set_ylabel(r'$x$')
ax.set_zlabel('Error')
fig.savefig('./figs/error_' + file_name + '.png')
plt.savefig('./figs/error_'+file_name+'.pdf')
figpath = './figs/error_'+file_name+'.tex'
tikzplotlib.save(figure='gcf', filepath=figpath)
fig = plt.figure()
ax = fig.gca(projection='3d')
surf1 = ax.plot_surface(t, x, u_real, cmap=cm.coolwarm,
linewidth=0, antialiased=False)
surf2 = ax.plot_surface(t, x, u_pred, cmap=cm.coolwarm,
linewidth=0, antialiased=False)
ax.set_xlabel(r'$t$')
ax.set_ylabel(r'$x$')
ax.set_zlabel(r'$u_p$ and $u_r$')
fig.savefig('./figs/up&ur_' + file_name + '.png')
#plt.savefig('./figs/up&ur_'+file_name+'.pdf')
figpath = './figs/up&ur_'+file_name+'.tex'
#tikzplotlib.save(figure='gcf', filepath=figpath)
| 41.13099 | 111 | 0.589017 | 2,092 | 12,874 | 3.411568 | 0.097036 | 0.09752 | 0.015132 | 0.016814 | 0.850357 | 0.827519 | 0.782402 | 0.764887 | 0.734062 | 0.686423 | 0 | 0.036799 | 0.178888 | 12,874 | 312 | 112 | 41.262821 | 0.63835 | 0.035187 | 0 | 0.731183 | 0 | 0.064516 | 0.217315 | 0.061627 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.010753 | 0.053763 | 0 | 0.053763 | 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 |
019b554f9a5c5d02abf29e9ea78932dd74875db2 | 263 | py | Python | metacat/webapi/__init__.py | ivmfnal/metacat | 9eeea5f5e7867395c7203b8a7789607d3bdbd903 | [
"BSD-3-Clause"
] | 1 | 2022-03-18T19:01:29.000Z | 2022-03-18T19:01:29.000Z | metacat/webapi/__init__.py | ivmfnal/metacat | 9eeea5f5e7867395c7203b8a7789607d3bdbd903 | [
"BSD-3-Clause"
] | null | null | null | metacat/webapi/__init__.py | ivmfnal/metacat | 9eeea5f5e7867395c7203b8a7789607d3bdbd903 | [
"BSD-3-Clause"
] | null | null | null | from .webapi import MetaCatClient
from .webapi import ServerError as MCServerError
from .webapi import AuthenticationError as MCAuthenticationError
from .webapi import WebAPIError as MCWebAPIError
from .webapi import InvalidMetadataError as MCInvalidMetadataError | 52.6 | 66 | 0.878327 | 28 | 263 | 8.25 | 0.464286 | 0.21645 | 0.34632 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.102662 | 263 | 5 | 66 | 52.6 | 0.978814 | 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 |
6dcacfd12c2b419056d21bd0e38d7f1b46e8537c | 8,641 | py | Python | gcloud_main.py | NeilDG/NeuralNets-Experiment3 | f0d2f788eeca49f803f65810c155491ce687cf9e | [
"MIT"
] | null | null | null | gcloud_main.py | NeilDG/NeuralNets-Experiment3 | f0d2f788eeca49f803f65810c155491ce687cf9e | [
"MIT"
] | null | null | null | gcloud_main.py | NeilDG/NeuralNets-Experiment3 | f0d2f788eeca49f803f65810c155491ce687cf9e | [
"MIT"
] | null | null | null | #BASE SCRIPT FOR RUNNING IN GLOUD
import os
def train_albedo():
#train albedo
os.system("python \"albedo_main.py\" --server_config=3 --num_workers=8 --img_to_load=-1 --load_previous=0 --test_mode=0 --patch_size=64 --batch_size=320 --net_config=4 --num_blocks=6 "
"--l1_weight=10.0 --lpip_weight=1.0 --ssim_weight=0.0 --adv_weight=1.0 --use_bce=0 --use_mask=0 --mode=azimuth --min_epochs=50 "
"--version_name=\"rgb2albedo_v7.17\" --iteration=5")
os.system("python \"albedo_main.py\" --server_config=3 --num_workers=8 --img_to_load=-1 --load_previous=0 --test_mode=0 --patch_size=64 --batch_size=320 --net_config=4 --num_blocks=6 "
"--l1_weight=10.0 --lpip_weight=1.0 --ssim_weight=0.0 --adv_weight=1.0 --use_bce=1 --use_mask=0 --mode=azimuth --min_epochs=50 "
"--version_name=\"rgb2albedo_v7.17\" --iteration=6")
os.system("python \"albedo_main.py\" --server_config=3 --num_workers=8 --img_to_load=-1 --load_previous=0 --test_mode=0 --patch_size=64 --batch_size=320 --net_config=4 --num_blocks=6 "
"--l1_weight=1.0 --lpip_weight=10.0 --ssim_weight=0.0 --adv_weight=1.0 --use_bce=0 --use_mask=0 --mode=azimuth --min_epochs=50 "
"--version_name=\"rgb2albedo_v7.17\" --iteration=7")
os.system("python \"albedo_main.py\" --server_config=3 --num_workers=8 --img_to_load=-1 --load_previous=0 --test_mode=0 --patch_size=64 --batch_size=320 --net_config=4 --num_blocks=6 "
"--l1_weight=1.0 --lpip_weight=10.0 --ssim_weight=0.0 --adv_weight=1.0 --use_bce=1 --use_mask=0 --mode=azimuth --min_epochs=50 "
"--version_name=\"rgb2albedo_v7.17\" --iteration=8")
os.system("python \"albedo_main.py\" --server_config=3 --num_workers=8 --img_to_load=-1 --load_previous=0 --test_mode=0 --patch_size=64 --batch_size=544 --net_config=5 --num_blocks=0 "
"--l1_weight=10.0 --lpip_weight=0.0 --ssim_weight=1.0 --adv_weight=1.0 --use_bce=0 --use_mask=0 --mode=azimuth --min_epochs=50 "
"--version_name=\"rgb2albedo_v7.18\" --iteration=1")
os.system("python \"albedo_main.py\" --server_config=3 --num_workers=8 --img_to_load=-1 --load_previous=0 --test_mode=0 --patch_size=64 --batch_size=544 --net_config=5 --num_blocks=0 "
"--l1_weight=10.0 --lpip_weight=0.0 --ssim_weight=1.0 --adv_weight=1.0 --use_bce=1 --use_mask=0 --mode=azimuth --min_epochs=50 "
"--version_name=\"rgb2albedo_v7.18\" --iteration=2")
os.system("python \"albedo_main.py\" --server_config=3 --num_workers=8 --img_to_load=-1 --load_previous=0 --test_mode=0 --patch_size=64 --batch_size=544 --net_config=5 --num_blocks=0 "
"--l1_weight=0.0 --lpip_weight=10.0 --ssim_weight=1.0 --adv_weight=1.0 --use_bce=0 --use_mask=0 --mode=azimuth --min_epochs=50 "
"--version_name=\"rgb2albedo_v7.18\" --iteration=3")
os.system("python \"albedo_main.py\" --server_config=3 --num_workers=8 --img_to_load=-1 --load_previous=0 --test_mode=0 --patch_size=64 --batch_size=544 --net_config=5 --num_blocks=0 "
"--l1_weight=0.0 --lpip_weight=10.0 --ssim_weight=1.0 --adv_weight=1.0 --use_bce=1 --use_mask=0 --mode=azimuth --min_epochs=50 "
"--version_name=\"rgb2albedo_v7.18\" --iteration=4")
def train_shadow_relight():
os.system("python \"shadow_relight_main.py\" --server_config=3 --num_workers=8 --img_to_load=-1 --load_previous=0 --test_mode=0 --patch_size=128 --batch_size=192 --net_config=2 --num_blocks=0 "
"--mode=azimuth --min_epochs=50 --version_name=\"shadow2relight_v1.02\" --iteration=7")
os.system("python \"shadow_relight_main.py\" --server_config=3 --num_workers=8 --img_to_load=-1 --load_previous=0 --test_mode=0 --patch_size=128 --batch_size=192 --net_config=2 --num_blocks=0 "
"--mode=azimuth --min_epochs=50 --version_name=\"shadow2relight_v1.02\" --iteration=8")
os.system("python \"shadow_relight_main.py\" --server_config=3 --num_workers=8 --img_to_load=-1 --load_previous=0 --test_mode=0 --patch_size=128 --batch_size=192 --net_config=2 --num_blocks=0 "
"--mode=azimuth --min_epochs=50 --version_name=\"shadow2relight_v1.02\" --iteration=5")
os.system("python \"shadow_relight_main.py\" --server_config=3 --num_workers=8 --img_to_load=-1 --load_previous=0 --test_mode=0 --patch_size=128 --batch_size=192 --net_config=2 --num_blocks=0 "
"--mode=azimuth --min_epochs=50 --version_name=\"shadow2relight_v1.02\" --iteration=6")
def train_relighting():
os.system("python \"iid_train.py\" --server_config=3 --num_workers=8 --img_to_load=-1 --load_previous=0 --test_mode=0 --patch_size=128 --batch_size=40 --net_config=2 --num_blocks=0 "
"--mode=azimuth --min_epochs=50 --version_name=\"maps2rgb_rgb2maps_v4.01\" --iteration=5")
os.system("python \"iid_train.py\" --server_config=3 --num_workers=8 --img_to_load=-1 --load_previous=0 --test_mode=0 --patch_size=128 --batch_size=40 --net_config=2 --num_blocks=0 "
"--mode=azimuth --min_epochs=50 --version_name=\"maps2rgb_rgb2maps_v4.01\" --iteration=6")
os.system("python \"iid_train.py\" --server_config=3 --num_workers=8 --img_to_load=-1 --load_previous=0 --test_mode=0 --patch_size=128 --batch_size=40 --net_config=2 --num_blocks=0 "
"--mode=azimuth --min_epochs=50 --version_name=\"maps2rgb_rgb2maps_v4.01\" --iteration=7")
os.system("python \"iid_train.py\" --server_config=3 --num_workers=8 --img_to_load=-1 --load_previous=0 --test_mode=0 --patch_size=128 --batch_size=40 --net_config=2 --num_blocks=0 "
"--mode=azimuth --min_epochs=50 --version_name=\"maps2rgb_rgb2maps_v4.01\" --iteration=8")
def train_domain_adaptation():
os.system("python \"cyclegan_main.py\" --server_config=3 --num_workers=8 --img_to_load=10000 --load_previous=0 --test_mode=0 --net_config=1 --num_blocks=6 --patch_size=32 --batch_size=32 "
"--min_epochs=15 --version_name=\"synth2rgb_v3.02\" --iteration=1")
os.system("python \"cyclegan_main.py\" --server_config=3 --num_workers=8 --img_to_load=10000 --load_previous=0 --test_mode=0 --net_config=1 --num_blocks=6 --patch_size=32 --batch_size=32 "
"--min_epochs=15 --version_name=\"synth2rgb_v3.02\" --iteration=2")
os.system("python \"cyclegan_main.py\" --server_config=3 --num_workers=8 --img_to_load=10000 --load_previous=0 --test_mode=0 --net_config=1 --num_blocks=6 --patch_size=32 --batch_size=32 "
"--min_epochs=15 --version_name=\"synth2rgb_v3.02\" --iteration=3")
os.system("python \"cyclegan_main.py\" --server_config=3 --num_workers=8 --img_to_load=10000 --load_previous=0 --test_mode=0 --net_config=1 --num_blocks=6 --patch_size=32 --batch_size=32 "
"--min_epochs=15 --version_name=\"synth2rgb_v3.02\" --iteration=4")
os.system("python \"cyclegan_main.py\" --server_config=3 --num_workers=8 --img_to_load=10000 --load_previous=0 --test_mode=0 --net_config=1 --num_blocks=6 --patch_size=32 --batch_size=32 "
"--min_epochs=15 --version_name=\"synth2rgb_v3.02\" --iteration=7")
os.system("python \"cyclegan_main.py\" --server_config=3 --num_workers=8 --img_to_load=10000 --load_previous=0 --test_mode=0 --net_config=1 --num_blocks=6 --patch_size=32 --batch_size=32 "
"--min_epochs=15 --version_name=\"synth2rgb_v3.02\" --iteration=8")
os.system("python \"cyclegan_main.py\" --server_config=3 --num_workers=8 --img_to_load=10000 --load_previous=0 --test_mode=0 --net_config=1 --num_blocks=6 --patch_size=32 --batch_size=32 "
"--min_epochs=15 --version_name=\"synth2rgb_v3.02\" --iteration=13")
os.system("python \"cyclegan_main.py\" --server_config=3 --num_workers=8 --img_to_load=10000 --load_previous=0 --test_mode=0 --net_config=1 --num_blocks=6 --patch_size=32 --batch_size=32 "
"--min_epochs=15 --version_name=\"synth2rgb_v3.02\" --iteration=14")
os.system("python \"cyclegan_main.py\" --server_config=3 --num_workers=8 --img_to_load=10000 --load_previous=0 --test_mode=0 --net_config=1 --num_blocks=6 --patch_size=32 --batch_size=32 "
"--min_epochs=15 --version_name=\"synth2rgb_v3.02\" --iteration=15")
os.system("python \"cyclegan_main.py\" --server_config=3 --num_workers=8 --img_to_load=10000 --load_previous=0 --test_mode=0 --net_config=1 --num_blocks=6 --patch_size=32 --batch_size=32 "
"--min_epochs=15 --version_name=\"synth2rgb_v3.02\" --iteration=16")
def main():
# train_shadow_relight()
# train_relighting()
train_domain_adaptation()
if __name__ == "__main__":
main() | 84.715686 | 197 | 0.677584 | 1,398 | 8,641 | 3.874106 | 0.062947 | 0.038405 | 0.067208 | 0.072009 | 0.961226 | 0.958641 | 0.957903 | 0.957903 | 0.957903 | 0.957903 | 0 | 0.084031 | 0.129615 | 8,641 | 102 | 198 | 84.715686 | 0.636086 | 0.009953 | 0 | 0.376812 | 0 | 0.492754 | 0.732226 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.072464 | true | 0 | 0.014493 | 0 | 0.086957 | 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 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 9 |
a3069904ca9258b2afb4d6570e1617dff2963feb | 127 | py | Python | CodeWars/8 Kyu/Fuel Calculator.py | anubhab-code/Competitive-Programming | de28cb7d44044b9e7d8bdb475da61e37c018ac35 | [
"MIT"
] | null | null | null | CodeWars/8 Kyu/Fuel Calculator.py | anubhab-code/Competitive-Programming | de28cb7d44044b9e7d8bdb475da61e37c018ac35 | [
"MIT"
] | null | null | null | CodeWars/8 Kyu/Fuel Calculator.py | anubhab-code/Competitive-Programming | de28cb7d44044b9e7d8bdb475da61e37c018ac35 | [
"MIT"
] | null | null | null | def fuel_price(litres, price_per_liter):
return round(litres * max(price_per_liter-.25, price_per_liter-.05*(litres//2)),2) | 63.5 | 86 | 0.755906 | 22 | 127 | 4.045455 | 0.545455 | 0.269663 | 0.438202 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.051724 | 0.086614 | 127 | 2 | 86 | 63.5 | 0.715517 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.5 | false | 0 | 0 | 0.5 | 1 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 7 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.