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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e03bca4f387d46c70f2a66bef73bd50e8eb4990d
| 3,999
|
py
|
Python
|
tests/st/optimizer/test_rprop_ascend.py
|
PowerOlive/mindspore
|
bda20724a94113cedd12c3ed9083141012da1f15
|
[
"Apache-2.0"
] | 1
|
2022-02-23T09:13:43.000Z
|
2022-02-23T09:13:43.000Z
|
tests/st/optimizer/test_rprop_ascend.py
|
zimo-geek/mindspore
|
665ec683d4af85c71b2a1f0d6829356f2bc0e1ff
|
[
"Apache-2.0"
] | null | null | null |
tests/st/optimizer/test_rprop_ascend.py
|
zimo-geek/mindspore
|
665ec683d4af85c71b2a1f0d6829356f2bc0e1ff
|
[
"Apache-2.0"
] | null | null | null |
# Copyright 2021 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.
# ============================================================================
import numpy as np
import mindspore.context as context
from .optimizer_utils import build_network, loss_default_rprop, loss_group_rprop, loss_not_default_rprop
def test_default_rprop_pynative():
"""
Feature: Test Rprop optimizer
Description: Test Rprop in Pynative mode with default parameter
Expectation: Loss values and parameters conform to preset values.
"""
context.set_context(mode=context.PYNATIVE_MODE, device_target='Ascend')
config = {'name': 'Rprop', 'lr': 0.01, 'etas': (0.5, 1.2), 'step_sizes': (1e-6, 50.), 'weight_decay': 0.0}
loss = build_network(config)
assert np.allclose(loss_default_rprop, loss, atol=1.e-5)
def test_default_rprop_graph():
"""
Feature: Test Rprop optimizer
Description: Test Rprop in Graph mode with default parameter
Expectation: Loss values and parameters conform to preset values.
"""
context.set_context(mode=context.GRAPH_MODE, device_target='Ascend')
config = {'name': 'Rprop', 'lr': 0.01, 'etas': (0.5, 1.2), 'step_sizes': (1e-6, 50.), 'weight_decay': 0.0}
loss = build_network(config)
assert np.allclose(loss_default_rprop, loss, atol=1.e-5)
def test_no_default_rprop_pynative():
"""
Feature: Test Rprop optimizer
Description: Test Rprop in Pynative mode with another set of parameter
Expectation: Loss values and parameters conform to preset values.
"""
context.set_context(mode=context.PYNATIVE_MODE, device_target='Ascend')
config = {'name': 'Rprop', 'lr': 0.001, 'etas': (0.6, 1.9), 'step_sizes': (1e-3, 20.), 'weight_decay': 0.0}
loss = build_network(config)
assert np.allclose(loss_not_default_rprop, loss, atol=1.e-5)
def test_no_default_rprop_graph():
"""
Feature: Test Rprop optimizer
Description: Test Rprop in Graph mode with another set of parameter
Expectation: Loss values and parameters conform to preset values.
"""
context.set_context(mode=context.GRAPH_MODE, device_target='Ascend')
config = {'name': 'Rprop', 'lr': 0.001, 'etas': (0.6, 1.9), 'step_sizes': (1e-3, 20.), 'weight_decay': 0.0}
loss = build_network(config)
assert np.allclose(loss_not_default_rprop, loss, atol=1.e-5)
def test_default_rprop_group_pynative():
"""
Feature: Test Rprop optimizer
Description: Test Rprop in Pynative mode with parameter grouping
Expectation: Loss values and parameters conform to preset values.
"""
context.set_context(mode=context.PYNATIVE_MODE, device_target='Ascend')
config = {'name': 'Rprop', 'lr': 0.001, 'etas': (0.6, 1.9), 'step_sizes': (1e-2, 10.), 'weight_decay': 0.0}
loss = build_network(config, is_group=True)
assert np.allclose(loss_group_rprop, loss, atol=1.e-5)
def test_default_rprop_group_graph():
"""
Feature: Test Rprop optimizer
Description: Test Rprop in Graph mode with parameter grouping
Expectation: Loss values and parameters conform to preset values.
"""
context.set_context(mode=context.GRAPH_MODE, device_target='Ascend')
config = {'name': 'Rprop', 'lr': 0.001, 'etas': (0.6, 1.9), 'step_sizes': (1e-2, 10.), 'weight_decay': 0.0}
loss = build_network(config, is_group=True)
assert np.allclose(loss_group_rprop, loss, atol=1.e-5)
| 43.945055
| 112
| 0.68192
| 565
| 3,999
| 4.679646
| 0.217699
| 0.054463
| 0.036309
| 0.056732
| 0.776853
| 0.776853
| 0.776853
| 0.776853
| 0.776853
| 0.776853
| 0
| 0.031231
| 0.183296
| 3,999
| 90
| 113
| 44.433333
| 0.778322
| 0.4016
| 0
| 0.727273
| 0
| 0
| 0.119944
| 0
| 0
| 0
| 0
| 0
| 0.181818
| 1
| 0.181818
| false
| 0
| 0.090909
| 0
| 0.272727
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
e060a0a93de3b94d114e641783f54a61654bac33
| 43
|
py
|
Python
|
pysiclib/__init__.py
|
ShameekConyers/sicnumerical
|
dc5035e5d922cb8e4341c5fbd88adba4f5d09bea
|
[
"MIT"
] | null | null | null |
pysiclib/__init__.py
|
ShameekConyers/sicnumerical
|
dc5035e5d922cb8e4341c5fbd88adba4f5d09bea
|
[
"MIT"
] | null | null | null |
pysiclib/__init__.py
|
ShameekConyers/sicnumerical
|
dc5035e5d922cb8e4341c5fbd88adba4f5d09bea
|
[
"MIT"
] | null | null | null |
from . import _pysiclib
from .api import *
| 14.333333
| 23
| 0.744186
| 6
| 43
| 5.166667
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.186047
| 43
| 2
| 24
| 21.5
| 0.885714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 6
|
0ee0d999cb9cbbb273ed9543254e2808b507927f
| 3,239
|
py
|
Python
|
tests/fields/test_render_as_checkbox.py
|
jpsca/pforms
|
77c9da93e5224e79bb147aa873f28951e972bb21
|
[
"MIT"
] | 2
|
2019-10-11T03:13:10.000Z
|
2019-11-12T10:31:54.000Z
|
tests/fields/test_render_as_checkbox.py
|
jpsca/hyperform
|
d5c450ad8684a853fed26f8c2606877151125a9e
|
[
"MIT"
] | 2
|
2021-11-18T18:01:28.000Z
|
2021-11-18T18:03:29.000Z
|
tests/fields/test_render_as_checkbox.py
|
jpsca/hyperform
|
d5c450ad8684a853fed26f8c2606877151125a9e
|
[
"MIT"
] | null | null | null |
import proper_forms.fields as f
def test_text_as_checkbox():
field = f.Text(name="name")
assert field.as_checkbox() == '<input name="name" type="checkbox">'
def test_text_as_checkbox_with_label():
field = f.Text(name="name")
assert (
field.as_checkbox(label="I have read the TOS")
== '<label class="checkbox"><input name="name" type="checkbox">'
" I have read the TOS</label>"
)
def test_text_as_checkbox_checked():
field = f.Text(name="name")
field.input_values = ["hello"]
assert field.as_checkbox() == '<input name="name" type="checkbox" checked>'
def test_boolean_as_checkbox():
field = f.Boolean(name="name")
assert field.as_checkbox() == '<input name="name" type="checkbox">'
def test_boolean_as_checkbox_checked():
field = f.Boolean(name="name")
field.object_value = True
assert field.as_checkbox() == '<input name="name" type="checkbox" checked>'
def test_boolean_as_checkbox_force_checked():
field = f.Boolean(name="name")
assert (
field.as_checkbox(checked=True) == '<input name="name" type="checkbox" checked>'
)
def test_boolean_as_checkbox_custom_value():
field = f.Boolean(name="name")
assert (
field.as_checkbox(value="newsletter")
== '<input name="name" type="checkbox" value="newsletter">'
)
def test_boolean_as_checkbox_custom_value_checked():
field = f.Boolean(name="name")
field.input_values = ["newsletter"]
assert (
field.as_checkbox(value="newsletter")
== '<input name="name" type="checkbox" value="newsletter" checked>'
)
def test_boolean_as_checkbox_custom_str_value_checked():
field = f.Boolean(name="name")
field.input_values = [5]
assert (
field.as_checkbox(value="5")
== '<input name="name" type="checkbox" value="5" checked>'
)
def test_boolean_as_checkbox_custom_str_reverse_value_checked():
field = f.Boolean(name="name")
field.input_values = ["5"]
assert (
field.as_checkbox(value=5)
== '<input name="name" type="checkbox" value="5" checked>'
)
def test_boolean_as_checkbox_custom_values_checked():
field = f.Boolean(name="name", multiple=True)
field.input_values = ["alerts", "newsletter", "replies"]
assert (
field.as_checkbox(value="newsletter")
== '<input name="name" type="checkbox" value="newsletter" checked>'
)
def test_boolean_as_checkbox_custom_value_unchecked():
field = f.Boolean(name="name")
field.input_values = ["newsletter"]
assert (
field.as_checkbox(value="direct")
== '<input name="name" type="checkbox" value="direct">'
)
def test_boolean_as_checkbox_custom_values_unchecked():
field = f.Boolean(name="name", multiple=True)
field.input_values = ["alerts", "newsletter", "replies"]
assert (
field.as_checkbox(value="direct")
== '<input name="name" type="checkbox" value="direct">'
)
def test_boolean_as_checkbox_custom_value_object_unchecked():
field = f.Boolean(name="name")
field.object_value = True
assert (
field.as_checkbox(value="newsletter")
== '<input name="name" type="checkbox" value="newsletter">'
)
| 29.18018
| 88
| 0.659154
| 405
| 3,239
| 5.02716
| 0.101235
| 0.137525
| 0.089391
| 0.144401
| 0.961198
| 0.905206
| 0.858055
| 0.822692
| 0.811886
| 0.750491
| 0
| 0.002285
| 0.189256
| 3,239
| 110
| 89
| 29.445455
| 0.773039
| 0
| 0
| 0.585366
| 0
| 0
| 0.285273
| 0.007101
| 0
| 0
| 0
| 0
| 0.170732
| 1
| 0.170732
| false
| 0
| 0.012195
| 0
| 0.182927
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
0ee48e90b0364f5e2564cd6a8348cda4b1973597
| 218
|
py
|
Python
|
PlanetSpice/Mars/__init__.py
|
mattkjames7/PlanetSpice
|
5a5c2cb75b9832af42cb746a1a6a886b9cc4da88
|
[
"MIT"
] | null | null | null |
PlanetSpice/Mars/__init__.py
|
mattkjames7/PlanetSpice
|
5a5c2cb75b9832af42cb746a1a6a886b9cc4da88
|
[
"MIT"
] | null | null | null |
PlanetSpice/Mars/__init__.py
|
mattkjames7/PlanetSpice
|
5a5c2cb75b9832af42cb746a1a6a886b9cc4da88
|
[
"MIT"
] | null | null | null |
from .Pos import PosHCI,PosHAE,ReadCarringtonRotations,SaveCarringtonRotations,CarringtonLongitude,PosIAU_SUN,SavePos,ReadPos,ReadPosDate,CombinePos,ReadCombinedPos,CombinePosSmall
from .Orbit import OrbitHAE,OrbitHCI
| 72.666667
| 180
| 0.899083
| 21
| 218
| 9.285714
| 0.904762
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.036697
| 218
| 2
| 181
| 109
| 0.928571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 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
| 6
|
162f384f24bbff1e6da817a0ac88bab802e89e98
| 3,957
|
py
|
Python
|
fffit/tests/test_pareto.py
|
helpscott/fffit
|
22f83c3e804304398822bfdc335704cacab5efc5
|
[
"MIT"
] | null | null | null |
fffit/tests/test_pareto.py
|
helpscott/fffit
|
22f83c3e804304398822bfdc335704cacab5efc5
|
[
"MIT"
] | null | null | null |
fffit/tests/test_pareto.py
|
helpscott/fffit
|
22f83c3e804304398822bfdc335704cacab5efc5
|
[
"MIT"
] | 4
|
2021-05-13T19:51:08.000Z
|
2021-12-08T01:22:20.000Z
|
import pytest
import numpy as np
import matplotlib.pyplot as plt
from fffit.pareto import (
is_pareto_efficient_simple,
is_pareto_efficient,
find_pareto_set,
plt_pareto_2D
)
from fffit.tests.base_test import BaseTest
class TestPareto(BaseTest):
def test_pareto_simple_known(self):
costs = np.asarray([[0.2, 0.2], [0.1, 0.1],])
result, pareto_points, dominated_points = find_pareto_set(
costs, is_pareto_efficient_simple
)
assert np.allclose(result, [False, True])
assert np.allclose(pareto_points, [[0.1, 0.1]])
assert np.allclose(dominated_points, [[0.2, 0.2]])
def test_paret_simple_max(self):
costs = np.asarray([[0.2, 0.2], [0.1, 0.1],])
result, pareto_points, dominated_points = find_pareto_set(
costs, is_pareto_efficient_simple, max_front=True
)
assert np.allclose(result, [True, False])
assert np.allclose(pareto_points, [[0.2, 0.2]])
assert np.allclose(dominated_points, [[0.1, 0.1]])
def test_pareto_efficient_known(self):
costs = np.asarray([[0.2, 0.2], [0.1, 0.1],])
result, pareto_points, dominated_points = find_pareto_set(
costs, is_pareto_efficient
)
assert np.allclose(result, [False, True])
assert np.allclose(pareto_points, [[0.1, 0.1]])
assert np.allclose(dominated_points, [[0.2, 0.2]])
def test_paret_efficient_max(self):
costs = np.asarray([[0.2, 0.2], [0.1, 0.1],])
result, pareto_points, dominated_points = find_pareto_set(
costs, is_pareto_efficient, max_front=True
)
assert np.allclose(result, [True, False])
assert np.allclose(pareto_points, [[0.2, 0.2]])
assert np.allclose(dominated_points, [[0.1, 0.1]])
def test_pareto_simple_3d(self):
costs = np.asarray(
[[0.2, 0.2, 0.1], [0.1, 0.1, 0.2], [0.1, 0.1, 0.1],]
)
result, pareto_points, dominated_points = find_pareto_set(
costs, is_pareto_efficient_simple
)
assert np.allclose(result, [False, False, True])
assert np.allclose(pareto_points, [[0.1, 0.1, 0.1]])
assert np.allclose(
dominated_points, [[0.2, 0.2, 0.1], [0.1, 0.1, 0.2]]
)
costs = np.asarray(
[
[0.2, 0.2, 0.1],
[0.1, 0.1, 0.2],
[0.05, 0.3, 0.4],
[0.1, 0.15, 0.3],
]
)
result, pareto_points, dominated_points = find_pareto_set(
costs, is_pareto_efficient_simple
)
assert np.allclose(result, [True, True, True, False])
assert np.allclose(
pareto_points, [[0.2, 0.2, 0.1], [0.1, 0.1, 0.2], [0.05, 0.3, 0.4]]
)
assert np.allclose(dominated_points, [[0.1, 0.15, 0.3]])
def test_compare_pareto(self):
np.random.seed(5)
costs = np.random.random(size=(1000, 10))
result1, pareto_points1, dominated_points1 = find_pareto_set(
costs, is_pareto_efficient_simple
)
result2, pareto_points2, dominated_points2 = find_pareto_set(
costs, is_pareto_efficient
)
assert np.allclose(result1, result2)
assert np.allclose(pareto_points1, pareto_points2)
assert np.allclose(dominated_points1, dominated_points2)
def test_compare_pareto_max(self):
np.random.seed(5)
costs = np.random.random(size=(1000, 10))
result1, pareto_points1, dominated_points1 = find_pareto_set(
costs, is_pareto_efficient_simple, max_front=True
)
result2, pareto_points2, dominated_points2 = find_pareto_set(
costs, is_pareto_efficient, max_front=True
)
assert np.allclose(result1, result2)
assert np.allclose(pareto_points1, pareto_points2)
assert np.allclose(dominated_points1, dominated_points2)
| 36.638889
| 79
| 0.605257
| 542
| 3,957
| 4.197417
| 0.105166
| 0.031648
| 0.034286
| 0.035165
| 0.86989
| 0.868132
| 0.863297
| 0.863297
| 0.847912
| 0.847912
| 0
| 0.066321
| 0.268385
| 3,957
| 107
| 80
| 36.981308
| 0.719516
| 0
| 0
| 0.526316
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.252632
| 1
| 0.073684
| false
| 0
| 0.052632
| 0
| 0.136842
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
166795bda36813ca0cc46cddf69055eb986b2d01
| 60
|
py
|
Python
|
simu_project/cp.py
|
wyfcyx/PipelinedMIPS16e
|
ae4aaa69b765fc5d01d1c99fe6e4cc71cd4c7fa8
|
[
"MIT"
] | 2
|
2018-12-10T11:17:31.000Z
|
2020-08-26T09:45:51.000Z
|
simu_project/cp.py
|
wyfcyx/PipelinedMIPS16e
|
ae4aaa69b765fc5d01d1c99fe6e4cc71cd4c7fa8
|
[
"MIT"
] | null | null | null |
simu_project/cp.py
|
wyfcyx/PipelinedMIPS16e
|
ae4aaa69b765fc5d01d1c99fe6e4cc71cd4c7fa8
|
[
"MIT"
] | null | null | null |
import os
os.system('copy ../cpu_project/main.vhd main.vhd')
| 30
| 50
| 0.75
| 11
| 60
| 4
| 0.727273
| 0.318182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.066667
| 60
| 2
| 50
| 30
| 0.785714
| 0
| 0
| 0
| 0
| 0
| 0.606557
| 0.377049
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 6
|
16926e66c2c4c348df0ec0c8d5de00a1e92c5ff9
| 90
|
py
|
Python
|
python/optalg/examples/functions.py
|
gerritjvv/optimization_algorithms
|
eab2e8fff39eeab8d9be45af3dae3be1a62be3ba
|
[
"MIT"
] | null | null | null |
python/optalg/examples/functions.py
|
gerritjvv/optimization_algorithms
|
eab2e8fff39eeab8d9be45af3dae3be1a62be3ba
|
[
"MIT"
] | null | null | null |
python/optalg/examples/functions.py
|
gerritjvv/optimization_algorithms
|
eab2e8fff39eeab8d9be45af3dae3be1a62be3ba
|
[
"MIT"
] | null | null | null |
def squared(x, gradient=1, y_intercept=0):
return (x * gradient) ** 2 + y_intercept
| 18
| 44
| 0.655556
| 14
| 90
| 4.071429
| 0.714286
| 0.315789
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.041667
| 0.2
| 90
| 4
| 45
| 22.5
| 0.75
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 6
|
16eab4bd4f4262915b5614fedb1e499fa65ae993
| 36
|
py
|
Python
|
scormxblock/__init__.py
|
urfu-online/edx_xblock_scorm
|
0958ab687a6fb70d90d611e5ac5df42696ac3bff
|
[
"Apache-2.0"
] | null | null | null |
scormxblock/__init__.py
|
urfu-online/edx_xblock_scorm
|
0958ab687a6fb70d90d611e5ac5df42696ac3bff
|
[
"Apache-2.0"
] | null | null | null |
scormxblock/__init__.py
|
urfu-online/edx_xblock_scorm
|
0958ab687a6fb70d90d611e5ac5df42696ac3bff
|
[
"Apache-2.0"
] | null | null | null |
from .scormxblock import ScormXBlock
| 36
| 36
| 0.888889
| 4
| 36
| 8
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.083333
| 36
| 1
| 36
| 36
| 0.969697
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 6
|
bc9f8ca21ffbfecf0a5227106b08d380586dddf8
| 8,408
|
py
|
Python
|
tests/test_pixellise.py
|
anicusan/KonigCell
|
6f55d06c9457dd0e601910f0cd4a7f95742ac009
|
[
"MIT"
] | 7
|
2021-12-16T10:15:57.000Z
|
2022-02-22T13:58:29.000Z
|
tests/test_pixellise.py
|
anicusan/KonigCell
|
6f55d06c9457dd0e601910f0cd4a7f95742ac009
|
[
"MIT"
] | null | null | null |
tests/test_pixellise.py
|
anicusan/KonigCell
|
6f55d06c9457dd0e601910f0cd4a7f95742ac009
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# File : test_pixellise.py
# License: GNU v3.0
# Author : Andrei Leonard Nicusan <[email protected]>
# Date : 31.08.2021
'''Integration tests to ensure the `konigcell` base classes behave correctly
and offer consistent interfaces.
'''
import pytest
from concurrent.futures import ProcessPoolExecutor
import numpy as np
import konigcell as kc
def generate(shape, vmin=0, vmax=1):
return vmin + np.random.random(shape) * (vmax - vmin)
def test_dynamic2d():
# Generate random 3D particles / trajectories
np.random.seed(0)
num_particles = 100
resolution = (20, 20)
positions = generate((num_particles, 2), -10, 10)
radii = generate(num_particles, 0.1, 2)
# Testing different modes of execution return the same results
pixels = kc.dynamic2d(positions, kc.INTERSECTION, radii = radii,
resolution = resolution, max_workers = 1)
pixels2 = kc.dynamic2d(positions, kc.INTERSECTION, radii = radii,
resolution = resolution, verbose = False)
pixels3 = kc.dynamic2d(positions, kc.INTERSECTION, radii = radii,
resolution = resolution,
max_workers = num_particles)
pixels4 = kc.dynamic2d(positions, kc.INTERSECTION, radii = radii,
resolution = resolution,
executor = ProcessPoolExecutor)
assert np.isclose(pixels.pixels, pixels2.pixels).all()
assert np.isclose(pixels.pixels, pixels3.pixels).all()
assert np.isclose(pixels.pixels, pixels4.pixels).all()
# Testing different settings work
kc.dynamic2d(positions, kc.RATIO, radii = radii, resolution = resolution)
kc.dynamic2d(positions, kc.ONE, pixels = pixels, max_workers = 1)
kc.dynamic2d(positions, kc.PARTICLE, xlim = [-10, 10], ylim = [-10, 10],
resolution = resolution)
kc.dynamic2d(positions, kc.INTERSECTION, values = 0,
resolution = resolution)
kc.dynamic2d(positions, kc.ONE, radii = 0,
resolution = resolution)
# Testing error cases
with pytest.raises(ValueError):
# Missing resolution
kc.dynamic2d(positions, kc.ONE)
with pytest.raises(AttributeError):
# `pixels` has wrong type
kc.dynamic2d(positions, kc.ONE, pixels = 0)
with pytest.raises(ValueError):
# `resolution` has wrong shape
kc.dynamic2d(positions, kc.ONE, resolution = (1,))
with pytest.raises(ValueError):
# `resolution` has wrong numbers
kc.dynamic2d(positions, kc.ONE, resolution = (1, 1))
with pytest.raises(ValueError):
# Wrong number of `values`
kc.dynamic2d(positions, kc.ONE, np.ones(len(positions)),
resolution = (2, 2))
def test_static2d():
# Generate random 3D particles / trajectories
np.random.seed(0)
num_particles = 100
resolution = (20, 20)
positions = generate((num_particles, 2), -10, 10)
radii = generate(num_particles, 0.1, 2)
# Testing different modes of execution return the same results
pixels = kc.static2d(positions, kc.INTERSECTION, radii = radii,
resolution = resolution, max_workers = 1)
pixels2 = kc.static2d(positions, kc.INTERSECTION, radii = radii,
resolution = resolution, verbose = False)
pixels3 = kc.static2d(positions, kc.INTERSECTION, radii = radii,
resolution = resolution,
max_workers = num_particles)
pixels4 = kc.static2d(positions, kc.INTERSECTION, radii = radii,
resolution = resolution,
executor = ProcessPoolExecutor)
assert np.isclose(pixels.pixels, pixels2.pixels).all()
assert np.isclose(pixels.pixels, pixels3.pixels).all()
assert np.isclose(pixels.pixels, pixels4.pixels).all()
# Testing different settings work
kc.static2d(positions, kc.RATIO, radii = radii, resolution = resolution)
kc.static2d(positions, kc.ONE, pixels = pixels, max_workers = 1)
kc.static2d(positions, kc.PARTICLE, xlim = [-10, 10], ylim = [-10, 10],
resolution = resolution)
kc.static2d(positions, kc.INTERSECTION, values = 0,
resolution = resolution)
kc.static2d(positions, kc.ONE, radii = 0,
resolution = resolution)
# Testing error cases
with pytest.raises(ValueError):
# Missing resolution
kc.static2d(positions, kc.ONE)
with pytest.raises(AttributeError):
# `pixels` has wrong type
kc.static2d(positions, kc.ONE, pixels = 0)
with pytest.raises(ValueError):
# `resolution` has wrong shape
kc.static2d(positions, kc.ONE, resolution = (1,))
with pytest.raises(ValueError):
# `resolution` has wrong numbers
kc.static2d(positions, kc.ONE, resolution = (1, 1))
with pytest.raises(ValueError):
# Wrong number of `values`
kc.static_prob2d(positions, np.ones(len(positions) - 1),
resolution = (2, 2))
def test_dynamic_prob2d():
# Generate random 3D particles / trajectories
np.random.seed(0)
num_particles = 100
resolution = (20, 20)
positions = generate((num_particles, 2), -10, 10)
values = generate(num_particles - 1, 1, 2)
radii = generate(num_particles, 0.1, 2)
pixels = kc.dynamic_prob2d(positions, values, radii = radii,
resolution = resolution)
# Testing different settings work
kc.dynamic_prob2d(positions, values, radii = radii,
resolution = resolution)
kc.dynamic_prob2d(positions, values, pixels = pixels, max_workers = 1)
kc.dynamic_prob2d(positions, values, xlim = [-10, 10], ylim = [-10, 10],
resolution = resolution)
kc.dynamic_prob2d(positions, values, resolution = resolution)
kc.dynamic_prob2d(positions, values, radii = 0, resolution = resolution)
# Testing error cases
with pytest.raises(ValueError):
# Missing resolution
kc.dynamic_prob2d(positions, values)
with pytest.raises(AttributeError):
# `pixels` has wrong type
kc.dynamic_prob2d(positions, values, pixels = 0)
with pytest.raises(ValueError):
# `resolution` has wrong shape
kc.dynamic_prob2d(positions, values, resolution = (1,))
with pytest.raises(ValueError):
# `resolution` has wrong numbers
kc.dynamic_prob2d(positions, values, resolution = (1, 1))
with pytest.raises(ValueError):
# Wrong number of `values`
kc.dynamic_prob2d(positions, np.ones(len(positions)),
resolution = (2, 2))
def test_static_prob2d():
# Generate random 3D particles / trajectories
np.random.seed(0)
num_particles = 100
resolution = (20, 20)
positions = generate((num_particles, 2), -10, 10)
values = generate(num_particles, 1, 2)
radii = generate(num_particles, 0.1, 2)
pixels = kc.static_prob2d(positions, values, radii = radii,
resolution = resolution)
# Testing different settings work
kc.static_prob2d(positions, values, radii = radii,
resolution = resolution)
kc.static_prob2d(positions, values, pixels = pixels, max_workers = 1)
kc.static_prob2d(positions, values, xlim = [-10, 10], ylim = [-10, 10],
resolution = resolution)
kc.static_prob2d(positions, values, resolution = resolution)
kc.static_prob2d(positions, values, radii = 0, resolution = resolution)
# Testing error cases
with pytest.raises(ValueError):
# Missing resolution
kc.static_prob2d(positions, values)
with pytest.raises(AttributeError):
# `pixels` has wrong type
kc.static_prob2d(positions, values, pixels = 0)
with pytest.raises(ValueError):
# `resolution` has wrong shape
kc.static_prob2d(positions, values, resolution = (1,))
with pytest.raises(ValueError):
# `resolution` has wrong numbers
kc.static_prob2d(positions, values, resolution = (1, 1))
with pytest.raises(ValueError):
# Wrong number of `values`
kc.static_prob2d(positions, np.ones(len(positions) - 1),
resolution = (2, 2))
| 35.931624
| 77
| 0.63285
| 935
| 8,408
| 5.633155
| 0.127273
| 0.056389
| 0.060756
| 0.078982
| 0.91722
| 0.909056
| 0.891589
| 0.850009
| 0.811278
| 0.734194
| 0
| 0.03595
| 0.26225
| 8,408
| 233
| 78
| 36.085837
| 0.813155
| 0.153425
| 0
| 0.558824
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.044118
| 1
| 0.036765
| false
| 0
| 0.029412
| 0.007353
| 0.073529
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
bcb263c1c773952b76cef5d6a22c2678ef04b91b
| 515,146
|
py
|
Python
|
USB/python/usb_1208HS_rbf.py
|
wjasper/Linix_Drivers
|
9c5443f3c9d249f341b6b8580929f8cdbdba4079
|
[
"JasPer-2.0"
] | 100
|
2016-11-08T15:41:43.000Z
|
2022-02-20T19:37:32.000Z
|
USB/python/usb_1208HS_rbf.py
|
wjasper/Linix_Drivers
|
9c5443f3c9d249f341b6b8580929f8cdbdba4079
|
[
"JasPer-2.0"
] | 37
|
2017-01-05T17:48:14.000Z
|
2022-01-06T17:43:27.000Z
|
USB/python/usb_1208HS_rbf.py
|
wjasper/Linix_Drivers
|
9c5443f3c9d249f341b6b8580929f8cdbdba4079
|
[
"JasPer-2.0"
] | 65
|
2016-12-20T07:03:44.000Z
|
2022-03-14T21:48:35.000Z
|
FPGA_data = (
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x6a, 0xd6, 0xff, 0x40, 0x00, 0x48, 0xd3, 0x08,
0x00, 0x6a, 0xd6, 0xff, 0x40, 0x00, 0x48, 0xd3,
0x08, 0x00, 0x6a, 0xd6, 0xff, 0x40, 0x00, 0x48,
0xd3, 0x08, 0x00, 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, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x44, 0x55, 0x54, 0x44,
0x55, 0x55, 0x74, 0x75, 0x57, 0x77, 0x75, 0x57,
0x77, 0x75, 0x57, 0x77, 0x75, 0x57, 0x77, 0x65,
0x56, 0x66, 0x65, 0x56, 0x36, 0x25, 0x52, 0x32,
0x35, 0xd2, 0xa3, 0x79, 0xd2, 0x51, 0x11, 0x15,
0x51, 0x11, 0x15, 0x51, 0x11, 0x15, 0x51, 0x11,
0x15, 0x51, 0x11, 0x15, 0x51, 0x11, 0x15, 0x51,
0x11, 0x15, 0x51, 0x11, 0x15, 0x51, 0x11, 0x15,
0x51, 0x11, 0x15, 0x51, 0x11, 0x15, 0x51, 0x11,
0x15, 0x51, 0x11, 0x15, 0x51, 0x11, 0x15, 0x51,
0x11, 0x15, 0x51, 0x11, 0x15, 0x51, 0x11, 0x15,
0x51, 0x11, 0x15, 0x51, 0x11, 0x15, 0x51, 0x11,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x25, 0x52, 0x22, 0x25, 0x52,
0x22, 0x25, 0x52, 0x22, 0x00, 0x25, 0x52, 0x22,
0x25, 0x52, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00,
0x1a, 0xa1, 0x11, 0x1a, 0xa1, 0x11, 0x00, 0x25,
0x52, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x25, 0x52, 0x22, 0x00,
0x1a, 0xa1, 0x11, 0x2f, 0x21, 0xf1, 0x12, 0x12,
0x25, 0x52, 0x22, 0x00, 0x00, 0x25, 0x52, 0x22,
0x00, 0x00, 0x00, 0x25, 0x52, 0x22, 0x00, 0x00,
0x25, 0x52, 0x22, 0x25, 0x52, 0x22, 0x25, 0x52,
0x22, 0x25, 0x52, 0x22, 0x25, 0x52, 0x22, 0x25,
0x52, 0x22, 0x25, 0x52, 0x22, 0x25, 0x52, 0x22,
0x00, 0x00, 0x00, 0x00, 0x2f, 0x21, 0xf1, 0x12,
0x12, 0x2f, 0x21, 0xf1, 0x12, 0x12, 0x25, 0x52,
0x22, 0x25, 0x52, 0x22, 0x25, 0x52, 0x22, 0x25,
0x52, 0x22, 0x2f, 0x21, 0xf1, 0x12, 0x12, 0x2f,
0x21, 0xf1, 0x12, 0x12, 0x25, 0x52, 0x22, 0x25,
0x52, 0x22, 0x00, 0x00, 0x00, 0x00, 0x2f, 0x21,
0xf1, 0x12, 0x12, 0x25, 0x52, 0x22, 0x25, 0x52,
0x22, 0x00, 0x1a, 0xa1, 0x11, 0x00, 0x00, 0x25,
0x52, 0x22, 0x25, 0x52, 0x22, 0x25, 0x52, 0x22,
0x00, 0x00, 0x00, 0x25, 0x52, 0x22, 0x25, 0x52,
0x22, 0x00, 0x00, 0x00, 0x25, 0x52, 0x22, 0x25,
0x52, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25,
0x52, 0x22, 0x00, 0x00, 0x2f, 0x21, 0xf1, 0x12,
0x12, 0xef, 0xed, 0xfd, 0xde, 0xde, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x25, 0x52, 0x22, 0x00, 0x00,
0x00, 0x00, 0x25, 0x52, 0x22, 0x25, 0x52, 0x22,
0x00, 0x00, 0x25, 0x52, 0x22, 0x25, 0x52, 0x22,
0x25, 0x52, 0x22, 0x25, 0x52, 0x22, 0x25, 0x52,
0x22, 0x25, 0x52, 0x22, 0x25, 0x52, 0x22, 0x25,
0x52, 0x22, 0x25, 0x52, 0x22, 0x00, 0x25, 0x52,
0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x44,
0xf4, 0x44, 0x44, 0x4f, 0x44, 0xf4, 0x44, 0x44,
0x00, 0x00, 0x00, 0x00, 0x45, 0x54, 0x44, 0x45,
0x54, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x4f, 0x44, 0xf4, 0x44, 0x44, 0x00, 0x00, 0x00,
0x25, 0x52, 0x22, 0x6f, 0x64, 0xf4, 0x46, 0x46,
0x00, 0x00, 0x00, 0x00, 0x4f, 0x48, 0xf8, 0x84,
0x84, 0x6f, 0x69, 0xf9, 0x96, 0x96, 0x2f, 0x21,
0xf1, 0x12, 0x12, 0x00, 0x00, 0x8a, 0xa8, 0x88,
0x4f, 0x44, 0xf4, 0x44, 0x44, 0x4f, 0x44, 0xf4,
0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x4a, 0xa4,
0x44, 0x4a, 0xa4, 0x44, 0x4f, 0x48, 0xf8, 0x84,
0x84, 0x25, 0x52, 0x22, 0x00, 0x4a, 0xa4, 0x44,
0x4a, 0xa4, 0x44, 0x6f, 0x6c, 0xfc, 0xc6, 0xc6,
0x00, 0x00, 0x00, 0x00, 0x8a, 0xa8, 0x88, 0x2f,
0x29, 0xf9, 0x92, 0x92, 0x2f, 0x21, 0xf1, 0x12,
0x12, 0x25, 0x52, 0x22, 0x00, 0x8a, 0xa8, 0x88,
0x4f, 0x44, 0xf4, 0x44, 0x44, 0x6f, 0x65, 0xf5,
0x56, 0x56, 0x2f, 0x21, 0xf1, 0x12, 0x12, 0x00,
0x00, 0x00, 0x4f, 0x44, 0xf4, 0x44, 0x44, 0x4f,
0x44, 0xf4, 0x44, 0x44, 0x8a, 0xa8, 0x88, 0x2f,
0x21, 0xf1, 0x12, 0x12, 0x00, 0x4f, 0x44, 0xf4,
0x44, 0x44, 0xcf, 0xcf, 0xff, 0xfc, 0xfc, 0xdf,
0xd8, 0xf8, 0x8d, 0x8d, 0x00, 0x4f, 0x44, 0xf4,
0x44, 0x44, 0x6f, 0x6d, 0xfd, 0xd6, 0xd6, 0x00,
0x00, 0x00, 0x00, 0x8f, 0x8c, 0xfc, 0xc8, 0xc8,
0xaf, 0xac, 0xfc, 0xca, 0xca, 0x25, 0x52, 0x22,
0x00, 0x00, 0x8a, 0xa8, 0x88, 0xc5, 0x5c, 0xcc,
0xc5, 0x5c, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x45,
0x54, 0x44, 0x45, 0x54, 0x44, 0x8f, 0x8c, 0xfc,
0xc8, 0xc8, 0x25, 0x52, 0x22, 0x00, 0x45, 0x54,
0x44, 0x45, 0x54, 0x44, 0xef, 0xec, 0xfc, 0xce,
0xce, 0x00, 0x00, 0x00, 0x00, 0xcf, 0xcc, 0xfc,
0xcc, 0xcc, 0xcf, 0xcc, 0xfc, 0xcc, 0xcc, 0x00,
0x00, 0x00, 0x00, 0xc5, 0x5c, 0xcc, 0xe5, 0x5e,
0xee, 0x25, 0x52, 0x22, 0x00, 0x00, 0x00, 0x00,
0x25, 0x52, 0x22, 0xef, 0xec, 0xfc, 0xce, 0xce,
0x00, 0x00, 0x25, 0x52, 0x22, 0x25, 0x52, 0x22,
0xef, 0xec, 0xfc, 0xce, 0xce, 0x00, 0x00, 0x00,
0x00, 0xcf, 0xc8, 0xf8, 0x8c, 0x8c, 0xcf, 0xc8,
0xf8, 0x8c, 0x8c, 0x00, 0x00, 0x00, 0x00, 0xcf,
0xc4, 0xf4, 0x4c, 0x4c, 0xef, 0xe4, 0xf4, 0x4e,
0x4e, 0x25, 0x52, 0x22, 0x00, 0x00, 0x00, 0x4a,
0xa4, 0x44, 0x2f, 0x24, 0xf4, 0x42, 0x42, 0xef,
0xe8, 0xf8, 0x8e, 0x8e, 0x00, 0x00, 0x2f, 0x24,
0xf4, 0x42, 0x42, 0x2f, 0x24, 0xf4, 0x42, 0x42,
0xef, 0xec, 0xfc, 0xce, 0xce, 0x00, 0x00, 0x00,
0x00, 0xcf, 0xc8, 0xf8, 0x8c, 0x8c, 0xcf, 0xc8,
0xf8, 0x8c, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x4a,
0xa4, 0x44, 0x2f, 0x24, 0xf4, 0x42, 0x42, 0x25,
0x52, 0x22, 0x00, 0x00, 0x00, 0x4a, 0xa4, 0x44,
0x2f, 0x24, 0xf4, 0x42, 0x42, 0x6f, 0x68, 0xf8,
0x86, 0x86, 0x00, 0x00, 0x2f, 0x24, 0xf4, 0x42,
0x42, 0x2f, 0x24, 0xf4, 0x42, 0x42, 0x6f, 0x6c,
0xfc, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 0xcf,
0xc8, 0xf8, 0x8c, 0x8c, 0xcf, 0xcb, 0xfb, 0xbc,
0xbc, 0x3a, 0xa3, 0x33, 0x00, 0x00, 0x00, 0x8f,
0x84, 0xf4, 0x48, 0x48, 0xaf, 0xa5, 0xf5, 0x5a,
0x5a, 0x2f, 0x21, 0xf1, 0x12, 0x12, 0x00, 0x00,
0x00, 0x4a, 0xa4, 0x44, 0x2f, 0x24, 0xf4, 0x42,
0x42, 0xef, 0xe8, 0xf8, 0x8e, 0x8e, 0x3a, 0xa3,
0x33, 0x00, 0x2f, 0x25, 0xf5, 0x52, 0x52, 0x9f,
0x9c, 0xfc, 0xc9, 0xc9, 0x00, 0x2f, 0x24, 0xf4,
0x42, 0x42, 0x2f, 0x24, 0xf4, 0x42, 0x42, 0xef,
0xef, 0xff, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00,
0x8a, 0xa8, 0x88, 0xba, 0xab, 0xbb, 0x3a, 0xa3,
0x33, 0x00, 0x00, 0x00, 0xcf, 0xc4, 0xf4, 0x4c,
0x4c, 0xef, 0xe5, 0xf5, 0x5e, 0x5e, 0x2f, 0x21,
0xf1, 0x12, 0x12, 0x00, 0x00, 0x00, 0xcf, 0xc4,
0xf4, 0x4c, 0x4c, 0xef, 0xe4, 0xf4, 0x4e, 0x4e,
0x2f, 0x28, 0xf8, 0x82, 0x82, 0x1a, 0xa1, 0x11,
0x00, 0xef, 0xe4, 0xf4, 0x4e, 0x4e, 0xef, 0xe4,
0xf4, 0x4e, 0x4e, 0xef, 0xed, 0xfd, 0xde, 0xde,
0x00, 0x00, 0x00, 0x00, 0x4a, 0xa4, 0x44, 0x1f,
0x14, 0xf4, 0x41, 0x41, 0x15, 0x51, 0x11, 0x00,
0x00, 0x00, 0xcf, 0xc8, 0xf8, 0x8c, 0x8c, 0xef,
0xeb, 0xfb, 0xbe, 0xbe, 0x2f, 0x23, 0xf3, 0x32,
0x32, 0x00, 0x00, 0x00, 0xcf, 0xc8, 0xf8, 0x8c,
0x8c, 0xef, 0xeb, 0xfb, 0xbe, 0xbe, 0x2f, 0x27,
0xf7, 0x72, 0x72, 0x00, 0x00, 0xef, 0xeb, 0xfb,
0xbe, 0xbe, 0xef, 0xeb, 0xfb, 0xbe, 0xbe, 0xef,
0xef, 0xff, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00,
0x8f, 0x84, 0xf4, 0x48, 0x48, 0x9f, 0x94, 0xf4,
0x49, 0x49, 0x15, 0x51, 0x11, 0x00, 0x00, 0x00,
0xcf, 0xc8, 0xf8, 0x8c, 0x8c, 0xff, 0xfa, 0xfa,
0xaf, 0xaf, 0x3f, 0x32, 0xf2, 0x23, 0x23, 0x00,
0x00, 0x00, 0x4f, 0x48, 0xf8, 0x84, 0x84, 0x6f,
0x6a, 0xfa, 0xa6, 0xa6, 0xaf, 0xa6, 0xf6, 0x6a,
0x6a, 0x15, 0x51, 0x11, 0x00, 0x6f, 0x6a, 0xfa,
0xa6, 0xa6, 0x6f, 0x6a, 0xfa, 0xa6, 0xa6, 0xff,
0xfe, 0xfe, 0xef, 0xef, 0x00, 0x00, 0x00, 0x00,
0xcf, 0xc4, 0xf4, 0x4c, 0x4c, 0xff, 0xf4, 0xf4,
0x4f, 0x4f, 0x35, 0x53, 0x33, 0x00, 0x00, 0x00,
0x8a, 0xa8, 0x88, 0x1f, 0x1b, 0xfb, 0xb1, 0xb1,
0x1f, 0x13, 0xf3, 0x31, 0x31, 0x00, 0x00, 0x00,
0x8a, 0xa8, 0x88, 0xba, 0xab, 0xbb, 0x4f, 0x47,
0xf7, 0x74, 0x74, 0x35, 0x53, 0x33, 0x00, 0xba,
0xab, 0xbb, 0xba, 0xab, 0xbb, 0x7f, 0x7f, 0xff,
0xf7, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x45, 0x54,
0x44, 0x4f, 0x42, 0xf2, 0x24, 0x24, 0x2a, 0xa2,
0x22, 0x00, 0x00, 0x00, 0x8f, 0x8c, 0xfc, 0xc8,
0xc8, 0xbf, 0xbd, 0xfd, 0xdb, 0xdb, 0x3f, 0x31,
0xf1, 0x13, 0x13, 0x00, 0x00, 0x00, 0x8f, 0x8c,
0xfc, 0xc8, 0xc8, 0xbf, 0xbd, 0xfd, 0xdb, 0xdb,
0x7f, 0x71, 0xf1, 0x17, 0x17, 0x00, 0x9a, 0xa9,
0x99, 0x3f, 0x3d, 0xfd, 0xd3, 0xd3, 0x00, 0x00,
0xbf, 0xbd, 0xfd, 0xdb, 0xdb, 0xbf, 0xbd, 0xfd,
0xdb, 0xdb, 0xff, 0xfd, 0xfd, 0xdf, 0xdf, 0x00,
0x00, 0x00, 0x00, 0x4a, 0xa4, 0x44, 0x6a, 0xa6,
0x66, 0x2a, 0xa2, 0x22, 0x00, 0x00, 0x00, 0xcf,
0xc8, 0xf8, 0x8c, 0x8c, 0xff, 0xf9, 0xf9, 0x9f,
0x9f, 0x3f, 0x31, 0xf1, 0x13, 0x13, 0x00, 0x00,
0x00, 0xcf, 0xc8, 0xf8, 0x8c, 0x8c, 0xff, 0xf9,
0xf9, 0x9f, 0x9f, 0x3f, 0x35, 0xf5, 0x53, 0x53,
0x00, 0x00, 0xff, 0xf9, 0xf9, 0x9f, 0x9f, 0xff,
0xf9, 0xf9, 0x9f, 0x9f, 0xff, 0xfd, 0xfd, 0xdf,
0xdf, 0x00, 0x00, 0x00, 0x00, 0xcf, 0xc4, 0xf4,
0x4c, 0x4c, 0xcf, 0xc6, 0xf6, 0x6c, 0x6c, 0x2a,
0xa2, 0x22, 0x00, 0x00, 0x00, 0x8f, 0x88, 0xf8,
0x88, 0x88, 0xbf, 0xb9, 0xf9, 0x9b, 0x9b, 0x3f,
0x31, 0xf1, 0x13, 0x13, 0x00, 0x00, 0x00, 0x8a,
0xa8, 0x88, 0x3f, 0x39, 0xf9, 0x93, 0x93, 0xff,
0xf5, 0xf5, 0x5f, 0x5f, 0x00, 0x00, 0x3f, 0x39,
0xf9, 0x93, 0x93, 0x3f, 0x39, 0xf9, 0x93, 0x93,
0xff, 0xfd, 0xfd, 0xdf, 0xdf, 0x00, 0x00, 0x00,
0x00, 0x4f, 0x48, 0xf8, 0x84, 0x84, 0x6f, 0x68,
0xf8, 0x86, 0x86, 0x25, 0x52, 0x22, 0x00, 0x00,
0x00, 0x8f, 0x84, 0xf4, 0x48, 0x48, 0x9f, 0x97,
0xf7, 0x79, 0x79, 0x1f, 0x13, 0xf3, 0x31, 0x31,
0x00, 0x00, 0x00, 0x8f, 0x84, 0xf4, 0x48, 0x48,
0x9f, 0x97, 0xf7, 0x79, 0x79, 0x5f, 0x5b, 0xfb,
0xb5, 0xb5, 0x25, 0x52, 0x22, 0x00, 0x9f, 0x97,
0xf7, 0x79, 0x79, 0x9f, 0x97, 0xf7, 0x79, 0x79,
0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00,
0x00, 0x4f, 0x48, 0xf8, 0x84, 0x84, 0x4f, 0x48,
0xf8, 0x84, 0x84, 0x00, 0x00, 0x00, 0x00, 0x8f,
0x84, 0xf4, 0x48, 0x48, 0x9f, 0x97, 0xf7, 0x79,
0x79, 0x1f, 0x13, 0xf3, 0x31, 0x31, 0x00, 0x00,
0x00, 0x8f, 0x84, 0xf4, 0x48, 0x48, 0x9f, 0x97,
0xf7, 0x79, 0x79, 0x5f, 0x5b, 0xfb, 0xb5, 0xb5,
0x00, 0x00, 0x9f, 0x97, 0xf7, 0x79, 0x79, 0x9f,
0x97, 0xf7, 0x79, 0x79, 0xdf, 0xdf, 0xff, 0xfd,
0xfd, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x48, 0xf8,
0x84, 0x84, 0x6f, 0x68, 0xf8, 0x86, 0x86, 0x25,
0x52, 0x22, 0x00, 0x00, 0x00, 0x8f, 0x84, 0xf4,
0x48, 0x48, 0x9f, 0x97, 0xf7, 0x79, 0x79, 0x1f,
0x13, 0xf3, 0x31, 0x31, 0x00, 0x00, 0x00, 0x8f,
0x84, 0xf4, 0x48, 0x48, 0x9f, 0x97, 0xf7, 0x79,
0x79, 0x5f, 0x5b, 0xfb, 0xb5, 0xb5, 0xef, 0xea,
0xfa, 0xae, 0xae, 0x9a, 0xa9, 0x99, 0x00, 0x00,
0x00, 0x9f, 0x97, 0xf7, 0x79, 0x79, 0x9f, 0x97,
0xf7, 0x79, 0x79, 0xdf, 0xdf, 0xff, 0xfd, 0xfd,
0x00, 0x00, 0x00, 0x00, 0x4f, 0x44, 0xf4, 0x44,
0x44, 0x5f, 0x55, 0xf5, 0x55, 0x55, 0x1f, 0x11,
0xf1, 0x11, 0x11, 0x00, 0x00, 0x00, 0x8f, 0x88,
0xf8, 0x88, 0x88, 0x9f, 0x9b, 0xfb, 0xb9, 0xb9,
0x1f, 0x13, 0xf3, 0x31, 0x31, 0x00, 0x00, 0x00,
0x8f, 0x88, 0xf8, 0x88, 0x88, 0x8f, 0x8a, 0xfa,
0xa8, 0xa8, 0x4f, 0x46, 0xf6, 0x64, 0x64, 0x1f,
0x11, 0xf1, 0x11, 0x11, 0x00, 0x8f, 0x8a, 0xfa,
0xa8, 0xa8, 0x8f, 0x8a, 0xfa, 0xa8, 0xa8, 0xdf,
0xdf, 0xff, 0xfd, 0xfd, 0x00, 0x00, 0x00, 0x00,
0x4f, 0x44, 0xf4, 0x44, 0x44, 0x5f, 0x55, 0xf5,
0x55, 0x55, 0x1f, 0x11, 0xf1, 0x11, 0x11, 0x00,
0x00, 0x00, 0x8f, 0x88, 0xf8, 0x88, 0x88, 0x9f,
0x9b, 0xfb, 0xb9, 0xb9, 0x1f, 0x13, 0xf3, 0x31,
0x31, 0x00, 0x00, 0x00, 0x8f, 0x88, 0xf8, 0x88,
0x88, 0x8f, 0x8a, 0xfa, 0xa8, 0xa8, 0x4f, 0x46,
0xf6, 0x64, 0x64, 0x1f, 0x11, 0xf1, 0x11, 0x11,
0x00, 0x8f, 0x8a, 0xfa, 0xa8, 0xa8, 0x8f, 0x8a,
0xfa, 0xa8, 0xa8, 0xdf, 0xdf, 0xff, 0xfd, 0xfd,
0x00, 0x00, 0x00, 0x00, 0x4f, 0x44, 0xf4, 0x44,
0x44, 0x5f, 0x57, 0xf7, 0x75, 0x75, 0x1f, 0x13,
0xf3, 0x31, 0x31, 0x00, 0x00, 0x00, 0x8f, 0x88,
0xf8, 0x88, 0x88, 0x9f, 0x99, 0xf9, 0x99, 0x99,
0x1f, 0x11, 0xf1, 0x11, 0x11, 0x00, 0x00, 0x00,
0x8f, 0x88, 0xf8, 0x88, 0x88, 0x8f, 0x88, 0xf8,
0x88, 0x88, 0x4f, 0x44, 0xf4, 0x44, 0x44, 0x1f,
0x11, 0xf1, 0x11, 0x11, 0x00, 0x8f, 0x88, 0xf8,
0x88, 0x88, 0x8f, 0x88, 0xf8, 0x88, 0x88, 0xdf,
0xdd, 0xfd, 0xdd, 0xdd, 0x00, 0x00, 0x00, 0x00,
0x4f, 0x44, 0xf4, 0x44, 0x44, 0x5f, 0x57, 0xf7,
0x75, 0x75, 0x1f, 0x13, 0xf3, 0x31, 0x31, 0x00,
0x00, 0x00, 0x8f, 0x88, 0xf8, 0x88, 0x88, 0x9f,
0x99, 0xf9, 0x99, 0x99, 0x1f, 0x11, 0xf1, 0x11,
0x11, 0x00, 0x00, 0x00, 0x8f, 0x88, 0xf8, 0x88,
0x88, 0x8f, 0x88, 0xf8, 0x88, 0x88, 0x4f, 0x44,
0xf4, 0x44, 0x44, 0x1f, 0x11, 0xf1, 0x11, 0x11,
0x00, 0x8f, 0x88, 0xf8, 0x88, 0x88, 0x8f, 0x88,
0xf8, 0x88, 0x88, 0xdf, 0xdd, 0xfd, 0xdd, 0xdd,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xff, 0xf9, 0xf9, 0x9f, 0x9f, 0xbf,
0xb6, 0xf6, 0x6b, 0x6b, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xff, 0xe4, 0x0f, 0x48, 0x00, 0x80,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x80, 0x02, 0x00, 0x00, 0x88, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xf0, 0xe3, 0xe6, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x28, 0x00, 0x00, 0xf0, 0xe4, 0x3e,
0x80, 0x04, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00,
0x80, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x3f, 0x6e, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xf0, 0x4f, 0xfe, 0x80, 0x02, 0x00, 0x40, 0x01,
0x00, 0x80, 0x04, 0x14, 0x80, 0x02, 0x80, 0x04,
0x14, 0x80, 0x02, 0x00, 0x00, 0x80, 0x02, 0x80,
0x04, 0x00, 0x00, 0x21, 0x48, 0x00, 0x00, 0x00,
0x48, 0x00, 0x00, 0x10, 0x82, 0x04, 0x00, 0x00,
0x21, 0xaf, 0xeb, 0x05, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xff, 0xe4, 0x0f, 0x48, 0x18, 0x00,
0x28, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00,
0x00, 0x21, 0x00, 0x14, 0x00, 0x14, 0x21, 0x00,
0x25, 0x01, 0x40, 0x01, 0x00, 0x14, 0x80, 0x42,
0x01, 0x00, 0x14, 0x88, 0x28, 0x14, 0x00, 0x00,
0x88, 0x28, 0x00, 0x00, 0xf0, 0x76, 0x8f, 0x00,
0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x20, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x28, 0x00,
0xaf, 0xfa, 0x06, 0x48, 0x18, 0x14, 0x80, 0x02,
0x80, 0x04, 0x14, 0x18, 0x1a, 0x02, 0x21, 0x48,
0x60, 0x11, 0x12, 0x28, 0x10, 0xa2, 0x11, 0x40,
0x01, 0x28, 0x10, 0xa2, 0x41, 0x40, 0x01, 0x00,
0x23, 0x81, 0x04, 0x14, 0x80, 0x02, 0x80, 0x04,
0x14, 0x88, 0x28, 0x10, 0x82, 0x04, 0x80, 0x88,
0x02, 0x21, 0x48, 0x00, 0xbf, 0x4a, 0x01, 0x48,
0x18, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x21,
0x00, 0x00, 0x00, 0x21, 0x00, 0x14, 0x00, 0x10,
0x02, 0x40, 0x01, 0x00, 0x00, 0x40, 0x01, 0x28,
0x00, 0x00, 0x14, 0x88, 0x28, 0x00, 0x00, 0x80,
0x88, 0x02, 0x00, 0x00, 0xcf, 0xe4, 0x0b, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x14, 0x00, 0x10, 0x02, 0x00,
0x88, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x40,
0x81, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x67, 0x9a, 0x20, 0x84, 0x04, 0x20, 0x82, 0x02,
0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x22, 0x28, 0x00, 0x00, 0x80, 0x08, 0x00,
0x00, 0x00, 0x00, 0x00, 0xf0, 0xe1, 0xe5, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00,
0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xe7,
0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x8b, 0xc2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xf0, 0xce, 0xeb, 0x80, 0x84, 0x04, 0x20, 0x22,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x40, 0x01, 0x88, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x7f, 0xe5, 0x06, 0x00,
0x00, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x59, 0x35,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x02, 0x00,
0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x91, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28,
0x00, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xf0, 0x32, 0x84, 0x00, 0x00, 0x00, 0x40,
0x02, 0x42, 0x80, 0x04, 0x00, 0x00, 0x18, 0x14,
0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x08,
0x00, 0x00, 0x00, 0x00, 0x20, 0x02, 0x3b, 0x44,
0x00, 0x00, 0x00, 0x40, 0x02, 0x20, 0x02, 0x00,
0x00, 0x80, 0x11, 0x21, 0x02, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01,
0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x00, 0x00,
0x80, 0x02, 0xff, 0xb2, 0x0c, 0x00, 0x00, 0x00,
0x00, 0x42, 0x80, 0x04, 0x00, 0x00, 0x80, 0x08,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x5f, 0xa6, 0x0b, 0x80,
0x02, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x20,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x08, 0x3f,
0x7b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xf0, 0x14, 0xa3, 0x00, 0x00, 0x00, 0x00, 0x80,
0x82, 0x08, 0x00, 0x00, 0x18, 0x80, 0x08, 0x80,
0x04, 0x40, 0x01, 0x00, 0x14, 0x20, 0x48, 0x01,
0x48, 0x00, 0x00, 0x8a, 0x01, 0x12, 0x42, 0x00,
0x10, 0x02, 0x42, 0x00, 0x80, 0x82, 0x08, 0x20,
0x08, 0x00, 0xf0, 0xb1, 0x31, 0x00, 0x00, 0x00,
0x42, 0x00, 0x00, 0x00, 0x80, 0x08, 0x88, 0x28,
0x00, 0x88, 0x00, 0x80, 0x08, 0x80, 0x21, 0x01,
0x14, 0x00, 0x00, 0x90, 0x11, 0x00, 0x10, 0x01,
0x1c, 0x02, 0x00, 0x14, 0x88, 0x00, 0x80, 0x08,
0x00, 0x00, 0x00, 0x88, 0x1f, 0x17, 0x0e, 0x00,
0x00, 0x20, 0x04, 0x00, 0x00, 0x00, 0x88, 0x80,
0x21, 0x02, 0x00, 0x00, 0x10, 0x01, 0x80, 0x01,
0x40, 0x41, 0x01, 0x00, 0x10, 0x01, 0x00, 0x18,
0x90, 0x21, 0x00, 0x21, 0x80, 0x08, 0x00, 0xa2,
0x00, 0x00, 0x00, 0x80, 0xd8, 0xea, 0x06, 0x00,
0x00, 0x00, 0x00, 0x22, 0x82, 0x00, 0x00, 0x20,
0x08, 0x82, 0x20, 0x28, 0x04, 0x20, 0x08, 0x00,
0x19, 0x01, 0x88, 0x00, 0x42, 0x00, 0x18, 0x80,
0x09, 0x14, 0x48, 0x00, 0x00, 0x14, 0x48, 0x00,
0x00, 0x88, 0x00, 0x82, 0x00, 0x00, 0x4d, 0xdf,
0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00,
0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x62, 0x5a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00,
0x00, 0x40, 0x01, 0x00, 0x12, 0x00, 0x00, 0x00,
0x10, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xcf, 0xf5, 0x0a, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xf0, 0xa3, 0x7d, 0x00, 0x00,
0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00,
0x00, 0x00, 0x00, 0x14, 0x10, 0x01, 0x00, 0x11,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x62,
0x69, 0x00, 0x00, 0x40, 0x21, 0x04, 0x00, 0x00,
0x00, 0x80, 0x41, 0x01, 0x00, 0x20, 0x04, 0x14,
0x00, 0x14, 0x12, 0x12, 0x24, 0x00, 0x11, 0x18,
0x40, 0x01, 0x00, 0x10, 0x22, 0x04, 0x10, 0x01,
0x28, 0x00, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00,
0x6f, 0xab, 0x0e, 0x00, 0x00, 0x00, 0x22, 0x00,
0x00, 0x21, 0x00, 0x11, 0x12, 0x28, 0x48, 0x20,
0x04, 0x00, 0x1b, 0x18, 0x00, 0x14, 0x40, 0x01,
0x88, 0x11, 0x48, 0x20, 0xa1, 0x12, 0x00, 0x82,
0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x8a, 0x84, 0x04, 0x00, 0xbd, 0xf9, 0x00, 0x11,
0x00, 0x10, 0x01, 0x00, 0x80, 0x09, 0x48, 0x00,
0x82, 0x40, 0x81, 0x08, 0x00, 0x80, 0x22, 0x04,
0x00, 0x00, 0x18, 0x80, 0x82, 0x22, 0x04, 0x00,
0x14, 0xc0, 0x21, 0x00, 0x88, 0x80, 0x24, 0x08,
0x00, 0x00, 0x20, 0x04, 0x22, 0x00, 0x28, 0x5f,
0x21, 0x0e, 0x40, 0x01, 0x00, 0x00, 0x00, 0x80,
0x09, 0x48, 0x60, 0x11, 0x88, 0x22, 0x48, 0x88,
0x48, 0x48, 0x40, 0xa1, 0x28, 0x42, 0x11, 0x12,
0x12, 0x14, 0x21, 0x12, 0x20, 0x26, 0x42, 0x81,
0x03, 0x60, 0x28, 0x90, 0x21, 0x88, 0x80, 0x08,
0x42, 0x82, 0x20, 0x08, 0x00, 0x20, 0x04, 0x62,
0x00, 0x28, 0x2f, 0x39, 0x0c, 0x00, 0x00, 0x14,
0x19, 0x24, 0x02, 0x00, 0x24, 0x00, 0x00, 0x13,
0x01, 0x11, 0x00, 0x00, 0x10, 0x01, 0x40, 0x01,
0x00, 0x82, 0x20, 0x01, 0x52, 0x00, 0x10, 0x01,
0x48, 0x00, 0x14, 0x20, 0x02, 0x00, 0x00, 0x00,
0xa0, 0x48, 0x00, 0x00, 0x9f, 0x19, 0x08, 0x00,
0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x14,
0x10, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6f, 0xfa,
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00,
0x12, 0x00, 0x00, 0x12, 0x20, 0x01, 0x14, 0x40,
0x21, 0x01, 0x80, 0x01, 0x80, 0x81, 0x11, 0x01,
0x18, 0x18, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x33, 0x0a,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x12, 0x11, 0x80, 0x01, 0x20, 0x01, 0x00, 0x00,
0x00, 0x11, 0x00, 0xc0, 0x11, 0x18, 0x00, 0x00,
0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x9f, 0x79, 0x0a, 0x00, 0x00, 0x00,
0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00,
0x00, 0x00, 0x00, 0x40, 0x11, 0x01, 0x12, 0x00,
0x14, 0x00, 0x20, 0x01, 0x20, 0x01, 0x00, 0x14,
0x14, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xdf, 0xb1, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x18,
0x00, 0x00, 0x00, 0x12, 0x12, 0x00, 0x00, 0x00,
0x00, 0x00, 0x18, 0x80, 0x11, 0x01, 0x00, 0x18,
0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xf0, 0x4e, 0xdb, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x40, 0x01, 0x11, 0x00, 0x00, 0x00,
0x00, 0x40, 0x01, 0x40, 0x01, 0x14, 0x00, 0x11,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xa7, 0x6a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x12, 0x20, 0x01, 0x14, 0x00, 0x11, 0x11, 0x10,
0x81, 0x01, 0x00, 0x19, 0x01, 0x11, 0x14, 0x20,
0x21, 0x01, 0x10, 0x01, 0x00, 0x18, 0x00, 0x40,
0x41, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xf0, 0x25, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01,
0x10, 0x01, 0x00, 0x80, 0x01, 0x00, 0x00, 0x40,
0x41, 0x41, 0x31, 0x11, 0x14, 0x00, 0x00, 0x00,
0x11, 0x10, 0x41, 0x01, 0x00, 0x00, 0x00, 0x14,
0x14, 0xde, 0xa4, 0x00, 0x80, 0x04, 0x00, 0x80,
0x01, 0x20, 0x21, 0x01, 0x28, 0x12, 0x10, 0x21,
0x01, 0x13, 0x11, 0x01, 0x21, 0x80, 0x01, 0x88,
0x18, 0x90, 0x11, 0x18, 0x40, 0x81, 0x01, 0x80,
0x81, 0x04, 0x18, 0x18, 0x19, 0x01, 0x00, 0x14,
0x00, 0x28, 0x00, 0x00, 0x10, 0x01, 0x10, 0x02,
0xff, 0xc8, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
0x20, 0x01, 0x18, 0x00, 0x18, 0x12, 0x12, 0x12,
0x1e, 0x11, 0xf0, 0x11, 0x11, 0x00, 0x18, 0x00,
0x18, 0x18, 0x14, 0x12, 0x12, 0x11, 0x1c, 0x21,
0x01, 0x00, 0x18, 0x13, 0x01, 0x15, 0x01, 0x40,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0xf0,
0x2d, 0x18, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
0x12, 0x18, 0x20, 0x21, 0xb1, 0x11, 0x21, 0x11,
0x01, 0x18, 0x00, 0x10, 0x11, 0x01, 0xc0, 0x11,
0x12, 0x80, 0x01, 0x40, 0x01, 0x14, 0x19, 0x21,
0x01, 0x16, 0x81, 0x01, 0x00, 0x00, 0x00, 0x40,
0x01, 0x00, 0x40, 0x01, 0x40, 0x01, 0xcf, 0x32,
0x0b, 0x00, 0x00, 0x00, 0xa0, 0x11, 0x12, 0x80,
0x01, 0x18, 0x80, 0x41, 0x41, 0x41, 0x41, 0x51,
0x11, 0x40, 0x01, 0x40, 0x01, 0x16, 0x21, 0x51,
0x11, 0x17, 0x11, 0x13, 0x81, 0x81, 0x81, 0x31,
0x11, 0x19, 0x21, 0x51, 0x11, 0x13, 0x11, 0x01,
0x1d, 0x11, 0x10, 0x51, 0x11, 0x11, 0x15, 0x01,
0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x8e,
0x07, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00, 0x20,
0x01, 0x00, 0x11, 0x10, 0x01, 0x11, 0x00, 0x00,
0x80, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0xc0,
0x11, 0x40, 0x01, 0x00, 0x14, 0x00, 0x40, 0x01,
0x00, 0x00, 0x14, 0x00, 0x00, 0x5f, 0x33, 0x0d,
0x82, 0x00, 0x00, 0x82, 0x00, 0xa0, 0x11, 0x1a,
0x01, 0x12, 0x1a, 0xa1, 0x11, 0x19, 0xb1, 0x11,
0xf1, 0x11, 0x11, 0x1f, 0x11, 0x51, 0x11, 0x18,
0x15, 0x51, 0x11, 0x15, 0x41, 0x51, 0x11, 0x12,
0x15, 0x51, 0x11, 0x15, 0x51, 0x11, 0x12, 0x18,
0xe0, 0x11, 0xf1, 0x11, 0x11, 0x1a, 0x01, 0x15,
0x81, 0x81, 0x01, 0x15, 0x51, 0x11, 0x11, 0x11,
0x50, 0x11, 0x15, 0x01, 0x00, 0x00, 0x00, 0x00,
0xf0, 0xf6, 0x8e, 0x00, 0x4a, 0x04, 0x48, 0x82,
0x82, 0x00, 0xa0, 0x11, 0x1a, 0xa1, 0x11, 0x3a,
0x23, 0xa1, 0x21, 0x1b, 0x11, 0x1b, 0x11, 0x1a,
0xa1, 0x11, 0x1d, 0x11, 0x2c, 0x51, 0x13, 0xf0,
0x13, 0x11, 0x14, 0x1f, 0x18, 0x09, 0x1d, 0x81,
0x1f, 0x11, 0x51, 0x11, 0x15, 0xe1, 0x11, 0x81,
0x41, 0xf1, 0x11, 0x11, 0x1f, 0x11, 0xe1, 0x14,
0xa4, 0x11, 0x1b, 0x51, 0x1b, 0x11, 0x19, 0x01,
0x15, 0x01, 0x11, 0x11, 0xf0, 0x21, 0x21, 0x15,
0x81, 0x02, 0x00, 0x10, 0x41, 0x12, 0x02, 0x21,
0x7b, 0x86, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00,
0x1a, 0x81, 0xa1, 0x31, 0x1a, 0xa1, 0x11, 0x1f,
0x11, 0xb1, 0x11, 0xd1, 0x11, 0xd1, 0x11, 0x51,
0x11, 0x1f, 0x11, 0x51, 0x13, 0x1f, 0x11, 0xd1,
0x11, 0x51, 0x11, 0x1d, 0x81, 0x12, 0x17, 0x11,
0x1d, 0x11, 0x1d, 0x11, 0x13, 0x61, 0x11, 0x18,
0x18, 0x1f, 0x11, 0xf1, 0x11, 0x11, 0x1a, 0x05,
0x17, 0x11, 0x1f, 0x11, 0xa1, 0x11, 0x12, 0x15,
0x51, 0x11, 0x11, 0x11, 0x15, 0xd1, 0x11, 0x12,
0x11, 0x01, 0x00, 0x00, 0x10, 0x02, 0xb0, 0xf5,
0x06, 0x82, 0x48, 0x20, 0x04, 0x00, 0x80, 0x01,
0x1a, 0xa1, 0x11, 0x1a, 0x23, 0xa1, 0x13, 0x1f,
0x11, 0xf1, 0x11, 0x11, 0x19, 0xd1, 0x11, 0xf1,
0x11, 0x11, 0x1b, 0x11, 0x21, 0x1e, 0x12, 0x1d,
0x11, 0x15, 0xf1, 0x11, 0x81, 0x12, 0x92, 0x1f,
0x11, 0xd1, 0x11, 0xa1, 0x11, 0x1a, 0x81, 0x91,
0x11, 0x15, 0xd1, 0x11, 0xc1, 0x41, 0xb0, 0x51,
0xb1, 0x11, 0xf1, 0x11, 0x11, 0x17, 0x11, 0x15,
0x51, 0x11, 0x11, 0x50, 0x11, 0x1d, 0x21, 0x11,
0x13, 0x02, 0x00, 0x00, 0x10, 0x42, 0x02, 0x5f,
0xaa, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00,
0x00, 0x00, 0x12, 0x20, 0x01, 0x12, 0x30, 0x11,
0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00,
0x14, 0x00, 0x00, 0x40, 0x01, 0x14, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x30, 0x6a, 0x00, 0x00,
0x00, 0x00, 0x12, 0x00, 0x18, 0x00, 0x12, 0x00,
0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x11, 0x00,
0x00, 0x80, 0x01, 0x18, 0x80, 0x01, 0x00, 0x18,
0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x1f, 0x3f, 0x04, 0x48, 0x1b, 0x21, 0xb0,
0x91, 0x22, 0xb4, 0x91, 0x32, 0x42, 0x19, 0xb2,
0x42, 0x91, 0x21, 0x2b, 0x94, 0x19, 0xb2, 0x42,
0x19, 0xb1, 0x42, 0x29, 0xf2, 0x42, 0x91, 0x22,
0x2f, 0x14, 0x29, 0xd2, 0x12, 0xa9, 0x42, 0x1c,
0xe9, 0x22, 0xc4, 0x81, 0x2e, 0x42, 0x16, 0xe1,
0x22, 0x64, 0x19, 0x2e, 0x42, 0x96, 0xc1, 0x42,
0x9a, 0xc2, 0x42, 0x1b, 0x29, 0x2c, 0xb5, 0x91,
0x42, 0xb2, 0x91, 0x22, 0xb4, 0x91, 0x32, 0x42,
0x1b, 0x28, 0x23, 0x94, 0x21, 0x2f, 0x14, 0x98,
0x21, 0x2b, 0x84, 0x11, 0x2b, 0x84, 0x22, 0x2b,
0x84, 0x22, 0x2b, 0x84, 0x22, 0x29, 0xa8, 0x42,
0x88, 0x2e, 0x42, 0x9f, 0xff, 0x05, 0x48, 0x1b,
0x61, 0x48, 0x1b, 0x21, 0x42, 0x1b, 0x21, 0x23,
0x94, 0x21, 0x2b, 0x14, 0x19, 0xb2, 0x42, 0x99,
0x21, 0x2b, 0xa4, 0x19, 0xb2, 0x42, 0x29, 0xb2,
0x42, 0x29, 0xb2, 0x42, 0x29, 0x92, 0x92, 0x2b,
0x42, 0x2d, 0x91, 0x2e, 0x52, 0x1c, 0xe8, 0x22,
0xcd, 0x81, 0x2e, 0x42, 0x86, 0xe1, 0x22, 0x24,
0xc8, 0x43, 0x9a, 0xc2, 0x43, 0x8a, 0xc2, 0x42,
0x1b, 0x69, 0x2c, 0xa4, 0x28, 0x42, 0x9a, 0x32,
0x42, 0x8a, 0x32, 0x42, 0x28, 0x2b, 0x84, 0x19,
0xb2, 0x42, 0x8a, 0xb2, 0x42, 0x28, 0xb2, 0x42,
0x28, 0xb2, 0x42, 0x28, 0x92, 0x82, 0x2b, 0x42,
0x29, 0xe8, 0x22, 0xf4, 0x48, 0x2d, 0x00, 0x82,
0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00,
0x00, 0x00, 0x00, 0x21, 0x00, 0x80, 0x08, 0x00,
0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00,
0x00, 0x80, 0x02, 0x80, 0x04, 0x00, 0x00, 0x25,
0x41, 0xf1, 0x85, 0xc5, 0x00, 0x00, 0x80, 0x02,
0x20, 0x01, 0x00, 0x00, 0x00, 0x20, 0x08, 0x80,
0x28, 0x11, 0x81, 0x01, 0x00, 0x13, 0x01, 0x13,
0x01, 0x00, 0x1a, 0x04, 0x00, 0x13, 0x01, 0x18,
0x00, 0x14, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00,
0x00, 0x00, 0x00, 0xcf, 0xfa, 0x09, 0x12, 0x82,
0x80, 0x08, 0x00, 0x88, 0x20, 0x08, 0x80, 0x21,
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04,
0x20, 0x88, 0x02, 0x00, 0x1a, 0x04, 0x00, 0x00,
0x80, 0x33, 0x41, 0x80, 0x04, 0x00, 0x00, 0x00,
0x14, 0x00, 0x00, 0x14, 0xf0, 0x9c, 0x9b, 0x20,
0x21, 0x0c, 0x00, 0x00, 0x98, 0x20, 0x08, 0x20,
0x22, 0x04, 0x20, 0x08, 0x20, 0x48, 0x02, 0x20,
0x01, 0x82, 0x12, 0x60, 0x11, 0x80, 0x12, 0x81,
0x05, 0x52, 0x30, 0x51, 0x80, 0x01, 0xa0, 0x21,
0x42, 0x80, 0x04, 0x30, 0x21, 0x00, 0x00, 0x00,
0x40, 0x02, 0x14, 0xf0, 0x9c, 0xc6, 0x00, 0x00,
0x88, 0x22, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00,
0x00, 0x00, 0x18, 0x11, 0x18, 0x00, 0x60, 0x14,
0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
0x11, 0x01, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00,
0x00, 0x00, 0x3f, 0xb2, 0x06, 0x00, 0x00, 0x80,
0x02, 0x00, 0x00, 0x20, 0x84, 0x04, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48,
0x00, 0x00, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x4a, 0x08, 0x20, 0x02, 0xf0, 0x6a,
0xd7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x20, 0x08, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00,
0x00, 0x80, 0x01, 0x00, 0x22, 0x12, 0x00, 0x00,
0x00, 0x14, 0x42, 0x00, 0x00, 0x80, 0x04, 0x00,
0x00, 0x00, 0x00, 0x1f, 0xec, 0x0c, 0x00, 0x00,
0x20, 0x02, 0x00, 0x00, 0x20, 0x04, 0x82, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x01,
0x20, 0x04, 0x18, 0x00, 0x82, 0x00, 0x10, 0x81,
0x04, 0x00, 0x00, 0x48, 0x00, 0x80, 0x04, 0x00,
0x00, 0xdf, 0xaf, 0x09, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x20, 0x04, 0x00, 0x00, 0x00, 0x00,
0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x82, 0x00, 0x28, 0x00, 0xdf, 0x2c, 0x0d, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x28, 0x11, 0x00, 0x20, 0x02, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0xd0, 0x1f,
0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x20,
0x81, 0x08, 0x00, 0x14, 0x82, 0x20, 0x04, 0x00,
0x00, 0x00, 0x00, 0x8a, 0x02, 0x18, 0xc8, 0x80,
0x08, 0x00, 0x20, 0x01, 0x00, 0x88, 0x00, 0x42,
0x20, 0x08, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe2,
0x0a, 0x00, 0x00, 0x20, 0x04, 0x00, 0x00, 0x00,
0x00, 0x82, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01,
0x20, 0x04, 0x42, 0x00, 0x22, 0x00, 0x00, 0x00,
0x48, 0x22, 0x80, 0x08, 0x20, 0x08, 0x00, 0x00,
0x11, 0x00, 0x00, 0x00, 0x43, 0x09, 0x00, 0x00,
0x80, 0x04, 0x00, 0x00, 0x00, 0x82, 0x80, 0x08,
0x80, 0x08, 0x4a, 0x02, 0x00, 0x60, 0x12, 0x00,
0x42, 0x20, 0x0c, 0x18, 0x42, 0x20, 0x08, 0x00,
0x20, 0x01, 0x80, 0x28, 0x08, 0x82, 0x42, 0x20,
0x08, 0x00, 0x00, 0x00, 0x00, 0xbf, 0xda, 0x09,
0x82, 0x00, 0x00, 0x00, 0x00, 0x80, 0x08, 0x18,
0x00, 0x00, 0x11, 0x00, 0x10, 0x01, 0x00, 0x00,
0x00, 0x80, 0x02, 0xa0, 0x82, 0x00, 0x00, 0x00,
0x48, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xe0, 0x66, 0x06, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f, 0x82, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xff, 0xfa, 0x07, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4,
0x0f, 0x20, 0x08, 0x20, 0x08, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x14,
0x14, 0x8f, 0x2a, 0x0e, 0x00, 0x48, 0x00, 0x82,
0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x00,
0x10, 0x02, 0x18, 0x80, 0x08, 0x00, 0x00, 0x14,
0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00,
0x28, 0x00, 0x00, 0x00, 0x00, 0x21, 0xf0, 0x9a,
0x8d, 0x00, 0x82, 0x00, 0x82, 0x82, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00,
0x14, 0xf0, 0xb1, 0x52, 0x00, 0x82, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x40, 0x01, 0x37, 0x36, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x20, 0x08,
0x00, 0x82, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x40, 0x41, 0x01, 0x00, 0xf0, 0x25,
0x87, 0x00, 0x4a, 0x04, 0x48, 0x88, 0x82, 0x00,
0x00, 0x00, 0x2a, 0x02, 0x28, 0x00, 0x00, 0x40,
0x12, 0x02, 0x2b, 0x11, 0xa0, 0x98, 0x80, 0x08,
0x00, 0x15, 0x01, 0x14, 0x00, 0x4a, 0x04, 0x48,
0x00, 0x00, 0x00, 0x00, 0x2a, 0x02, 0x28, 0x00,
0x00, 0x14, 0x24, 0x21, 0x10, 0xf2, 0x2c, 0xa2,
0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28,
0x00, 0x00, 0x00, 0x00, 0x21, 0x80, 0x01, 0x88,
0x00, 0x00, 0x40, 0x01, 0x00, 0x80, 0x04, 0x00,
0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x14,
0x00, 0x21, 0x00, 0xfd, 0x93, 0x20, 0x88, 0x04,
0x42, 0x00, 0x00, 0x00, 0x00, 0x28, 0x20, 0x02,
0x00, 0x00, 0x10, 0x42, 0x82, 0x01, 0x1a, 0x08,
0x82, 0x00, 0x40, 0x01, 0x11, 0x00, 0x48, 0x20,
0x04, 0x00, 0x00, 0x00, 0x80, 0x02, 0x22, 0x00,
0x00, 0x00, 0x21, 0x24, 0xf0, 0xee, 0x23, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe,
0x80, 0xb4, 0x11, 0x02, 0x1b, 0x21, 0x42, 0x1b,
0x21, 0x23, 0x94, 0x21, 0x2b, 0x14, 0x19, 0xb2,
0x42, 0x99, 0x21, 0x2b, 0x94, 0x11, 0x2b, 0x94,
0x22, 0x2f, 0x14, 0x29, 0xf2, 0x42, 0x91, 0x22,
0x2d, 0x91, 0x2a, 0xc4, 0x91, 0x2e, 0x42, 0x1c,
0xe8, 0x22, 0x64, 0x11, 0x2e, 0x42, 0x96, 0xe1,
0x22, 0x64, 0x19, 0x2c, 0xa4, 0x29, 0x2c, 0xb4,
0x91, 0xc2, 0x42, 0x1b, 0x29, 0x24, 0x1b, 0x29,
0x42, 0x1b, 0x29, 0x23, 0xb4, 0x81, 0x32, 0x42,
0x19, 0xb2, 0x42, 0x98, 0x21, 0x2b, 0x84, 0x11,
0x2b, 0x84, 0x22, 0x2b, 0x84, 0x22, 0x2b, 0x84,
0x22, 0x29, 0xa8, 0x42, 0x88, 0x2e, 0x42, 0xcb,
0x12, 0x80, 0xb4, 0x11, 0x86, 0xb4, 0x11, 0x22,
0xb4, 0x11, 0x32, 0x42, 0x19, 0xb2, 0x42, 0x91,
0x21, 0x2b, 0x94, 0x19, 0xb2, 0x42, 0x9b, 0x21,
0x2b, 0x94, 0x22, 0x2f, 0x14, 0x29, 0xf2, 0x42,
0x91, 0x22, 0x2d, 0x91, 0x2b, 0x42, 0x2d, 0x91,
0x2e, 0x52, 0x1c, 0xe9, 0x22, 0xec, 0x11, 0xe8,
0x22, 0x64, 0x19, 0x2e, 0x42, 0x96, 0xc1, 0x43,
0x9e, 0x21, 0x2c, 0xb4, 0x91, 0xc2, 0x42, 0x1b,
0x69, 0x2c, 0xb4, 0x91, 0x22, 0xb4, 0x91, 0x32,
0x42, 0x1b, 0x28, 0x23, 0x94, 0x21, 0x2b, 0x84,
0x19, 0xb2, 0x42, 0x9a, 0x21, 0x2b, 0x84, 0x22,
0x2b, 0x84, 0x22, 0x2b, 0x84, 0x22, 0x29, 0xb8,
0x22, 0x94, 0x82, 0x2e, 0x42, 0x5f, 0x26, 0x08,
0x20, 0x88, 0x04, 0x20, 0x08, 0x22, 0x00, 0x00,
0x90, 0x22, 0x00, 0x00, 0x00, 0x00, 0x21, 0x80,
0x01, 0x88, 0x00, 0x00, 0xc0, 0x81, 0x00, 0x00,
0x48, 0x00, 0x00, 0x00, 0x00, 0x22, 0x80, 0x02,
0x00, 0x00, 0x00, 0x50, 0x12, 0xf0, 0x6f, 0xf5,
0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x80, 0x08,
0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xbf, 0x8c, 0x09, 0x20, 0x08, 0x00, 0x82, 0x18,
0x82, 0x82, 0x00, 0x00, 0x00, 0x21, 0x22, 0x00,
0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x80,
0x04, 0x88, 0x88, 0x00, 0x00, 0x11, 0x14, 0xf0,
0x6b, 0x31, 0x00, 0xc2, 0x00, 0x00, 0x20, 0x08,
0x00, 0x20, 0x02, 0x24, 0x00, 0x00, 0x60, 0x24,
0x00, 0x12, 0x48, 0x82, 0x00, 0x00, 0x10, 0x01,
0x00, 0x20, 0x04, 0x00, 0x00, 0x00, 0x42, 0x20,
0x24, 0x22, 0x04, 0x82, 0x82, 0x00, 0x40, 0x12,
0x41, 0x01, 0xbf, 0x5c, 0x05, 0x00, 0x00, 0x80,
0x88, 0x21, 0x21, 0x08, 0x20, 0x08, 0x00, 0x80,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x93, 0xa5,
0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x20,
0x08, 0x20, 0x02, 0x00, 0x00, 0x20, 0x08, 0x20,
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42,
0x00, 0xf0, 0x93, 0x31, 0x00, 0x00, 0x00, 0x80,
0x01, 0x00, 0x28, 0x80, 0x01, 0x00, 0x00, 0x48,
0x20, 0x08, 0x00, 0x00, 0x28, 0x40, 0x01, 0x2a,
0x08, 0x88, 0x00, 0x20, 0x08, 0x18, 0x00, 0x20,
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,
0x04, 0x5f, 0xdf, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x20, 0x08,
0x00, 0x00, 0x00, 0x14, 0x80, 0x08, 0x00, 0x00,
0x82, 0xa0, 0x18, 0x00, 0x48, 0x82, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0xf0, 0x3a,
0xf5, 0x00, 0x00, 0x20, 0x01, 0x12, 0x00, 0x20,
0x02, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00,
0x42, 0x22, 0x80, 0x08, 0x22, 0x22, 0x88, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x48, 0xf0, 0x7b, 0x26, 0x00,
0x00, 0x00, 0x42, 0x80, 0x08, 0x28, 0x88, 0x00,
0x00, 0x22, 0x00, 0x10, 0x02, 0x00, 0x82, 0x00,
0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x18, 0x82,
0x00, 0x00, 0x00, 0x00, 0x28, 0x90, 0x81, 0x00,
0x00, 0x00, 0x80, 0x08, 0xdf, 0xf1, 0x0c, 0x00,
0x00, 0x00, 0x00, 0x00, 0x20, 0xa2, 0x21, 0x00,
0x00, 0x00, 0x00, 0x00, 0x20, 0x04, 0x00, 0x00,
0x4a, 0x08, 0x20, 0x04, 0x00, 0x00, 0x30, 0x41,
0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x80, 0x18,
0x42, 0x01, 0x48, 0xf0, 0xe7, 0x14, 0x00, 0x00,
0x00, 0x00, 0x82, 0x00, 0x00, 0x14, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x02,
0x00, 0x00, 0x00, 0x00, 0x46, 0x01, 0x00, 0x23,
0x08, 0x00, 0x00, 0x00, 0x00, 0x20, 0x22, 0x88,
0x32, 0x11, 0x00, 0x28, 0x00, 0x24, 0x00, 0x00,
0x88, 0x00, 0x80, 0x22, 0x02, 0x00, 0x80, 0x04,
0x00, 0x00, 0x90, 0x41, 0x00, 0x00, 0x28, 0x00,
0x10, 0x01, 0x00, 0x88, 0x00, 0x20, 0x04, 0xbf,
0xef, 0x02, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x04,
0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, 0x18, 0x82,
0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x40,
0x02, 0x42, 0x80, 0x08, 0x9f, 0xb8, 0x09, 0x00,
0x28, 0x1a, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x3e,
0xa4, 0x00, 0x00, 0x00, 0x00, 0x22, 0x80, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x28, 0x00, 0x20, 0x02, 0x00, 0x22, 0x00,
0x00, 0x00, 0x20, 0x02, 0x00, 0x28, 0x00, 0x28,
0x28, 0x00, 0x28, 0x00, 0x4f, 0x19, 0x09, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00,
0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xdf, 0xd5,
0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00, 0x00,
0x00, 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x22, 0x20, 0x02, 0x00,
0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x00, 0x00,
0xf0, 0xcf, 0xea, 0x80, 0x01, 0x20, 0x02, 0x00,
0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00,
0x00, 0x00, 0x22, 0x20, 0x02, 0x00, 0x00, 0x28,
0x00, 0x00, 0x00, 0x42, 0x00, 0xa7, 0x1e, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xdc, 0x3a,
0x00, 0x20, 0x22, 0x81, 0x21, 0xa3, 0x12, 0x00,
0x00, 0x00, 0x28, 0x00, 0x00, 0x80, 0x22, 0x02,
0x00, 0x00, 0x00, 0x80, 0x22, 0x02, 0x22, 0x22,
0x22, 0x20, 0x02, 0x22, 0x20, 0x02, 0x22, 0x20,
0x02, 0x22, 0x80, 0x02, 0x00, 0x28, 0x22, 0x20,
0x82, 0x22, 0x82, 0xf2, 0x4f, 0x51, 0x00, 0x00,
0x00, 0x80, 0x01, 0x80, 0x02, 0x00, 0x00, 0x00,
0x00, 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x14, 0x00, 0x14, 0xf0, 0x9d,
0x5c, 0x80, 0x01, 0x48, 0x80, 0x01, 0x00, 0x28,
0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x21,
0x80, 0x01, 0x88, 0x00, 0x00, 0x22, 0x14, 0x00,
0x00, 0x48, 0x00, 0x20, 0x02, 0x00, 0x00, 0x80,
0x02, 0x00, 0x10, 0x81, 0x22, 0x04, 0x21, 0xf0,
0xce, 0x8d, 0x00, 0x00, 0x20, 0x21, 0x81, 0x01,
0x00, 0x80, 0x02, 0x00, 0x00, 0x28, 0x20, 0x82,
0x02, 0x00, 0x00, 0x00, 0xa0, 0x22, 0x20, 0x02,
0x80, 0x02, 0x28, 0x80, 0x02, 0x28, 0x00, 0x80,
0x02, 0x28, 0x00, 0x28, 0x00, 0x10, 0x11, 0x01,
0x48, 0x14, 0x22, 0x1f, 0x4a, 0x0a, 0x18, 0xa0,
0x22, 0x00, 0x20, 0x01, 0x28, 0x00, 0x00, 0x20,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x28, 0x80, 0x22, 0x02, 0x00, 0x28, 0x80, 0x02,
0x22, 0x28, 0x00, 0x22, 0x00, 0x20, 0x02, 0x80,
0x22, 0x02, 0x80, 0x62, 0x12, 0xd0, 0x19, 0x0d,
0x12, 0x00, 0x3a, 0x83, 0x81, 0x82, 0x22, 0x22,
0xa2, 0x22, 0x00, 0x00, 0x00, 0x00, 0x80, 0x22,
0x02, 0x00, 0x00, 0x00, 0x00, 0x22, 0x28, 0x80,
0x02, 0x00, 0x22, 0x00, 0x80, 0x02, 0x28, 0x00,
0x00, 0x00, 0x00, 0x22, 0x28, 0x22, 0x62, 0x22,
0x00, 0x57, 0x5c, 0x00, 0x00, 0x20, 0x08, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x20, 0x02,
0x22, 0x20, 0x02, 0x22, 0x00, 0x20, 0x02, 0x00,
0x00, 0x00, 0x00, 0x00, 0x28, 0x7f, 0xf2, 0x05,
0x82, 0x00, 0x80, 0xa1, 0xb3, 0x2a, 0xa2, 0x22,
0x00, 0xa0, 0x22, 0x00, 0x00, 0xa0, 0x22, 0x2a,
0x02, 0x00, 0x00, 0x00, 0x00, 0x20, 0x22, 0x22,
0x22, 0x22, 0xa2, 0x22, 0x2a, 0xa2, 0x22, 0x22,
0x2a, 0xa2, 0x22, 0x2a, 0x22, 0x02, 0x00, 0x22,
0x2a, 0x02, 0x00, 0x00, 0x2a, 0xb2, 0x21, 0xb2,
0x21, 0x22, 0xa4, 0x66, 0x40, 0xf1, 0xbe, 0x25,
0x20, 0xa1, 0x44, 0x80, 0x84, 0xa8, 0x23, 0x3a,
0xa2, 0x22, 0x00, 0xa0, 0x22, 0x2a, 0x02, 0x28,
0x00, 0x2a, 0xa2, 0x22, 0x60, 0x22, 0x21, 0xb0,
0x12, 0x01, 0x8a, 0x09, 0x88, 0xa0, 0x22, 0x22,
0x17, 0x12, 0x2a, 0x42, 0xa1, 0x22, 0x2a, 0xa2,
0x66, 0xa0, 0x62, 0xa0, 0x22, 0x22, 0x22, 0xa0,
0x22, 0x22, 0x2a, 0x82, 0x02, 0x28, 0x00, 0x2a,
0x92, 0x21, 0x2e, 0x21, 0x6e, 0x22, 0x2b, 0x66,
0x2a, 0xb2, 0x22, 0xe2, 0x24, 0x09, 0x12, 0x48,
0x00, 0x18, 0x3a, 0x03, 0x00, 0x00, 0x2a, 0x82,
0x02, 0x00, 0x00, 0x80, 0x82, 0x12, 0x02, 0x18,
0x80, 0x08, 0x00, 0x2a, 0xa2, 0x22, 0x26, 0x21,
0x82, 0xa2, 0x22, 0xa0, 0x62, 0x28, 0x2a, 0x02,
0x2a, 0xa2, 0x22, 0x00, 0x80, 0xa2, 0x22, 0x28,
0x00, 0x00, 0x2a, 0xa2, 0x22, 0x2a, 0x22, 0xb4,
0x62, 0xa6, 0x22, 0x2a, 0xf2, 0x87, 0xce, 0x20,
0x89, 0x04, 0x5a, 0xa3, 0x11, 0x3a, 0xaa, 0x23,
0x2a, 0x02, 0x28, 0xa0, 0x22, 0x28, 0x20, 0x02,
0x00, 0x80, 0xa2, 0x22, 0x21, 0x24, 0x18, 0xa0,
0x81, 0x20, 0x08, 0x2a, 0x22, 0x62, 0x12, 0x2a,
0xb2, 0x21, 0xa2, 0x22, 0xa0, 0x62, 0x2a, 0xa2,
0x26, 0x2a, 0xa2, 0x22, 0x2a, 0xa2, 0x22, 0xa0,
0x22, 0x28, 0x2a, 0x02, 0x20, 0x02, 0xa0, 0x22,
0x2a, 0xa2, 0x22, 0x6a, 0xb2, 0x62, 0xe6, 0x22,
0xa2, 0x22, 0xdf, 0x28, 0x0a, 0x00, 0x22, 0x80,
0x01, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x80, 0x02, 0x28, 0x80, 0x02, 0x8f, 0xb9,
0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00,
0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x5a, 0x96, 0x80, 0xb4, 0x11, 0x02, 0x1b, 0x29,
0x42, 0x1b, 0x21, 0x23, 0x94, 0x21, 0x2b, 0x14,
0x19, 0xb2, 0x42, 0x99, 0x21, 0x2b, 0x94, 0x11,
0x2b, 0x94, 0x22, 0x2f, 0x14, 0x29, 0xf2, 0x42,
0x91, 0x22, 0x2d, 0x91, 0x2a, 0xc4, 0x91, 0x2e,
0x42, 0x1c, 0xe8, 0x22, 0x64, 0x11, 0x2e, 0x42,
0x96, 0xe1, 0x22, 0x64, 0x19, 0x2c, 0xa4, 0x29,
0x2c, 0xb4, 0x91, 0xc2, 0x42, 0x1b, 0x29, 0x24,
0x1b, 0x29, 0x42, 0x1b, 0x29, 0x23, 0xb4, 0x81,
0x32, 0x42, 0x19, 0xb2, 0x42, 0x98, 0x21, 0x2b,
0x84, 0x11, 0x2b, 0x84, 0x22, 0x2b, 0x84, 0x22,
0x2b, 0x84, 0x22, 0x29, 0xa8, 0x42, 0x88, 0x2e,
0x42, 0x7f, 0xb1, 0x06, 0x48, 0x1b, 0x61, 0x48,
0x1b, 0x21, 0x42, 0x11, 0x23, 0x14, 0xb1, 0x42,
0x91, 0x21, 0x2b, 0x94, 0x11, 0x2b, 0xb4, 0x11,
0x2b, 0xb4, 0x22, 0x2f, 0x14, 0x09, 0x2f, 0x14,
0x29, 0xd2, 0x12, 0xb9, 0x22, 0xd4, 0x12, 0xe9,
0x22, 0xc5, 0x91, 0x2e, 0xc2, 0x1e, 0x81, 0x2e,
0x42, 0x96, 0xe1, 0x22, 0x64, 0x19, 0x3c, 0xe4,
0x19, 0xc2, 0x42, 0x1b, 0x29, 0x2c, 0xb4, 0x91,
0xc6, 0x42, 0x1b, 0x29, 0x42, 0x1b, 0x29, 0x23,
0x34, 0x81, 0x23, 0x14, 0xb1, 0x42, 0x98, 0x21,
0x2b, 0xa4, 0x11, 0x2b, 0xa4, 0x22, 0x2b, 0x84,
0x22, 0x2b, 0x84, 0x22, 0x39, 0x38, 0x22, 0x29,
0xc8, 0x42, 0xdf, 0x11, 0x0d, 0x20, 0x88, 0x04,
0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00,
0x00, 0x10, 0x02, 0x18, 0x80, 0x08, 0x00, 0x00,
0x14, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00,
0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x25, 0x01,
0xe3, 0x06, 0x00, 0x00, 0x00, 0x00, 0x80, 0x08,
0x88, 0x00, 0x20, 0x22, 0x08, 0x00, 0x28, 0x14,
0x28, 0x22, 0x00, 0x22, 0x00, 0x88, 0x00, 0x00,
0x00, 0x00, 0x00, 0x48, 0x00, 0x11, 0x00, 0x28,
0x80, 0x08, 0x00, 0x00, 0x88, 0x00, 0x00, 0x8f,
0x1a, 0x04, 0x22, 0x82, 0x00, 0x00, 0x8a, 0x81,
0x02, 0x22, 0x20, 0x02, 0x00, 0x00, 0x80, 0x02,
0x00, 0x00, 0x42, 0x80, 0x24, 0x82, 0x02, 0x28,
0x12, 0x42, 0x28, 0x00, 0x00, 0x00, 0x00, 0x48,
0x80, 0x1c, 0x01, 0x20, 0x14, 0x81, 0x04, 0x00,
0x1c, 0x04, 0x11, 0x14, 0xf0, 0x61, 0x56, 0x00,
0xc2, 0x00, 0x00, 0x00, 0x80, 0x02, 0x20, 0x02,
0x80, 0x22, 0x08, 0x00, 0x24, 0x00, 0x32, 0x20,
0x08, 0x28, 0x80, 0x08, 0x19, 0x01, 0x00, 0x20,
0x04, 0x00, 0x48, 0x00, 0x80, 0x48, 0x01, 0x22,
0xc2, 0x11, 0x00, 0x00, 0x11, 0x24, 0x40, 0x01,
0x6f, 0x81, 0x0e, 0x22, 0x00, 0x00, 0x80, 0x89,
0x02, 0x82, 0xa0, 0x28, 0x00, 0x00, 0x00, 0x28,
0x80, 0x12, 0x81, 0x02, 0x42, 0xa0, 0x24, 0x80,
0x02, 0x28, 0x20, 0x24, 0x02, 0x00, 0x00, 0x00,
0x80, 0x44, 0x81, 0x04, 0x28, 0x00, 0x80, 0x04,
0x00, 0x8a, 0x04, 0x11, 0x00, 0x3f, 0x8e, 0x0a,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04,
0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
0x08, 0x88, 0x20, 0x04, 0x00, 0x00, 0x00, 0x00,
0xce, 0xf8, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00,
0x20, 0x22, 0x08, 0x88, 0x00, 0x40, 0x01, 0x88,
0x00, 0x00, 0x00, 0x42, 0x13, 0x08, 0x68, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00,
0x00, 0x80, 0x04, 0x20, 0x04, 0x00, 0xf0, 0xf1,
0x9d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,
0x08, 0x82, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
0x80, 0x34, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x22, 0x80, 0x08, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x8f, 0xb5, 0x06, 0x00, 0x00,
0x00, 0x28, 0x00, 0x00, 0x22, 0x20, 0x04, 0x00,
0x00, 0x80, 0x88, 0x04, 0x00, 0x00, 0x00, 0xa0,
0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x82, 0x20, 0x04, 0x42, 0x00, 0x42, 0x00,
0x00, 0xbe, 0x69, 0x00, 0x00, 0x00, 0x00, 0x82,
0x28, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00,
0x22, 0x48, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00,
0x80, 0x24, 0x06, 0x00, 0x42, 0x28, 0x00, 0x00,
0x88, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x37, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
0x08, 0x28, 0x82, 0x00, 0x00, 0x00, 0x12, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x42,
0x80, 0x82, 0x04, 0x00, 0x20, 0x02, 0x80, 0x02,
0x00, 0x00, 0x00, 0x14, 0x80, 0x04, 0x7f, 0xf1,
0x06, 0x20, 0x02, 0x00, 0x00, 0x88, 0x00, 0x00,
0x00, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 0x00,
0x48, 0x48, 0x80, 0x04, 0x00, 0x00, 0x00, 0x40,
0x21, 0x01, 0x00, 0x00, 0x00, 0x48, 0x80, 0x84,
0x04, 0x00, 0x19, 0x02, 0x00, 0xff, 0x58, 0x06,
0x20, 0x02, 0x00, 0x00, 0x00, 0x20, 0x08, 0x12,
0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x42, 0x00,
0x48, 0x42, 0x00, 0x00, 0x22, 0x20, 0x84, 0x02,
0x22, 0x42, 0x52, 0x28, 0x00, 0x28, 0x20, 0x08,
0x42, 0x11, 0x48, 0x48, 0x00, 0x20, 0x02, 0x42,
0xd0, 0x36, 0x08, 0x82, 0x00, 0x00, 0x00, 0x20,
0x02, 0x00, 0x20, 0x08, 0x00, 0x00, 0x80, 0x01,
0x28, 0x48, 0x80, 0x04, 0x00, 0x20, 0x04, 0x00,
0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x40, 0xf1, 0x3c, 0xb4,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04,
0x00, 0x00, 0x48, 0x80, 0x04, 0x20, 0x84, 0x04,
0x48, 0x00, 0x00, 0x00, 0x20, 0x04, 0x00, 0x00,
0x00, 0x00, 0x5f, 0x93, 0x06, 0x22, 0x00, 0x20,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x22, 0x00,
0x20, 0x02, 0x00, 0x22, 0x00, 0x00, 0x48, 0x00,
0x62, 0x48, 0x00, 0x42, 0x48, 0x11, 0x20, 0x04,
0x00, 0xbf, 0xf8, 0x06, 0x82, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x00,
0x20, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00,
0x00, 0x46, 0x01, 0x00, 0x00, 0xcf, 0x34, 0x09,
0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0x02, 0x00, 0x80, 0xa4, 0x24, 0x00, 0x80,
0x02, 0x00, 0x00, 0x00, 0x42, 0x20, 0x84, 0x04,
0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x80, 0x02,
0x00, 0x00, 0x28, 0xf0, 0x29, 0x7c, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x20, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xd0, 0x1e, 0x08, 0x00,
0x00, 0x00, 0x18, 0x00, 0x00, 0x20, 0x02, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4a,
0x02, 0x80, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x28, 0x28, 0x42, 0x00, 0x00, 0x00, 0x00,
0xf0, 0x72, 0x93, 0x00, 0x80, 0x02, 0x12, 0x88,
0x22, 0x20, 0x02, 0x20, 0x02, 0x28, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x42, 0x20, 0x02, 0x00,
0x48, 0x28, 0x00, 0x80, 0x06, 0x00, 0x22, 0x20,
0x02, 0x22, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,
0x48, 0x70, 0xc1, 0x07, 0x20, 0x08, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x48, 0x80, 0x04, 0x48, 0x00, 0x80, 0x04, 0x00,
0x48, 0x00, 0x20, 0x04, 0x00, 0x42, 0x00, 0x20,
0x04, 0x22, 0x20, 0x04, 0x11, 0x00, 0x40, 0x01,
0x1f, 0xef, 0x0b, 0x18, 0x80, 0x04, 0x88, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x28,
0x10, 0x02, 0x38, 0x80, 0x08, 0x00, 0x00, 0x1c,
0x04, 0x00, 0x80, 0x04, 0x80, 0x04, 0x00, 0x00,
0x00, 0x28, 0x20, 0x04, 0x80, 0x42, 0x81, 0x02,
0x21, 0xf0, 0x79, 0x6a, 0x80, 0x21, 0x28, 0x01,
0x12, 0x88, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x48, 0x28, 0x20, 0xa2, 0x44,
0x22, 0x00, 0x2a, 0x04, 0x42, 0x48, 0x48, 0x48,
0x00, 0x42, 0x80, 0x02, 0x42, 0x48, 0x00, 0x6a,
0x06, 0x00, 0x42, 0x40, 0x01, 0x42, 0x40, 0x01,
0xbf, 0x23, 0x06, 0x22, 0x82, 0x00, 0x82, 0x00,
0x80, 0x02, 0x00, 0x00, 0x22, 0x00, 0x00, 0x80,
0x22, 0xa4, 0x42, 0x42, 0x00, 0x48, 0x00, 0x00,
0x42, 0x80, 0x02, 0x22, 0x00, 0x4a, 0x04, 0x00,
0x80, 0x06, 0x48, 0x00, 0x48, 0x00, 0x00, 0x48,
0x14, 0x28, 0xe0, 0x12, 0x04, 0xff, 0x38, 0x0e,
0x00, 0x28, 0x20, 0x02, 0x12, 0x00, 0x00, 0x28,
0x2a, 0x02, 0x00, 0x22, 0x80, 0x02, 0x00, 0x00,
0x80, 0x04, 0x00, 0x42, 0x2a, 0x04, 0x4a, 0x84,
0x04, 0x42, 0x80, 0x02, 0x2a, 0x84, 0x84, 0x04,
0x00, 0x28, 0x00, 0xa0, 0x64, 0x4a, 0xa4, 0x42,
0x48, 0x28, 0x00, 0x00, 0xd0, 0x17, 0x08, 0x1a,
0x02, 0x1a, 0x02, 0x1a, 0x02, 0x28, 0x80, 0x02,
0x28, 0x00, 0x00, 0x20, 0x02, 0x22, 0x20, 0x02,
0x22, 0x42, 0x22, 0x20, 0x22, 0x24, 0x02, 0x22,
0x4a, 0x02, 0x4a, 0x02, 0x4a, 0x02, 0x28, 0x80,
0x06, 0x28, 0x80, 0x06, 0x28, 0x80, 0x04, 0x48,
0xa0, 0x42, 0x20, 0x02, 0x2a, 0x04, 0x2a, 0x04,
0x6f, 0x2d, 0x02, 0x8a, 0xa3, 0x33, 0x2a, 0xa2,
0x33, 0x1a, 0xab, 0xa2, 0x3a, 0xa3, 0x22, 0xa0,
0x22, 0x2a, 0x02, 0x00, 0xa0, 0x22, 0x2a, 0xa2,
0x22, 0x22, 0x28, 0x28, 0x2a, 0x02, 0x28, 0x28,
0x6a, 0x06, 0x2a, 0xa2, 0x22, 0x2a, 0x02, 0x28,
0x2a, 0xa2, 0x62, 0x2a, 0x82, 0xa2, 0x22, 0x2a,
0xa2, 0x22, 0x28, 0x6a, 0xa2, 0x22, 0x2a, 0x02,
0x6a, 0xa2, 0x22, 0x2a, 0x02, 0x42, 0x42, 0x2a,
0xa2, 0x22, 0x6a, 0x62, 0x12, 0x19, 0x82, 0xa6,
0x66, 0x4a, 0xe4, 0x14, 0xf6, 0xba, 0x54, 0x80,
0xa3, 0x77, 0x1a, 0x81, 0x84, 0xaa, 0x33, 0x00,
0x2a, 0xa2, 0x22, 0x2a, 0x02, 0x22, 0x20, 0x02,
0xa0, 0x22, 0x22, 0x28, 0x2c, 0xb2, 0x22, 0xa2,
0x66, 0x2b, 0x31, 0x28, 0xea, 0xaf, 0x66, 0x88,
0xa0, 0x22, 0x6a, 0xd6, 0x11, 0xa2, 0x26, 0x1c,
0xa4, 0x44, 0x28, 0x2a, 0x06, 0x80, 0xa2, 0x26,
0x00, 0x2a, 0xa2, 0x26, 0x00, 0x22, 0x42, 0x62,
0x48, 0xa0, 0x26, 0x22, 0x19, 0xc2, 0x62, 0x2b,
0x66, 0x2a, 0x92, 0x22, 0x9f, 0x42, 0x08, 0x32,
0x68, 0x1a, 0x01, 0x22, 0x28, 0x1a, 0x01, 0x2a,
0x02, 0xa0, 0x22, 0x28, 0x00, 0x00, 0x22, 0x28,
0x20, 0x12, 0xa2, 0x22, 0x4a, 0x25, 0xa2, 0xc4,
0x2a, 0xa2, 0x44, 0x00, 0x2a, 0xe2, 0x16, 0x84,
0x86, 0x04, 0x6a, 0x84, 0x06, 0xa0, 0x46, 0x4a,
0x02, 0xa0, 0x66, 0x42, 0x00, 0x4a, 0x26, 0x24,
0x24, 0xa4, 0x44, 0x62, 0x19, 0x02, 0x62, 0x29,
0xa4, 0x22, 0xd0, 0xd3, 0x0d, 0xb2, 0x1a, 0xa7,
0x22, 0x42, 0x3a, 0xa1, 0xb1, 0x2a, 0x02, 0xa0,
0x22, 0xa0, 0x22, 0x28, 0x00, 0xa0, 0x22, 0x22,
0x28, 0x20, 0xb2, 0x22, 0xe2, 0x24, 0xa4, 0x54,
0x22, 0x7a, 0xae, 0x44, 0xca, 0xa4, 0x22, 0x2a,
0xa2, 0x44, 0x6e, 0x41, 0x4a, 0xb6, 0x21, 0xa6,
0x44, 0x6a, 0x84, 0xa2, 0x22, 0xa0, 0x46, 0x4a,
0xa2, 0x22, 0xa0, 0x44, 0x6a, 0xa2, 0x22, 0xa0,
0x64, 0x42, 0x42, 0x4a, 0xa4, 0x66, 0x62, 0x28,
0x20, 0xb6, 0x22, 0xe6, 0x24, 0x04, 0x1f, 0x48,
0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f,
0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x80,
0x04, 0x00, 0x48, 0x80, 0x24, 0x04, 0x00, 0x20,
0x04, 0x00, 0x80, 0x04, 0x20, 0x04, 0x42, 0x20,
0x04, 0x00, 0x00, 0x00, 0xcf, 0xa8, 0x08, 0x2a,
0xb5, 0x11, 0xa2, 0x12, 0x1b, 0x21, 0x6a, 0xb1,
0x11, 0xb2, 0x62, 0x91, 0x21, 0x2b, 0x16, 0x19,
0xb2, 0x62, 0x99, 0x21, 0x2b, 0x94, 0x11, 0x2b,
0x94, 0x22, 0x2f, 0x14, 0x2b, 0xf2, 0x42, 0xb1,
0x22, 0x2f, 0x14, 0xab, 0x42, 0x4e, 0xb1, 0x2e,
0x42, 0x1c, 0xea, 0x22, 0xe4, 0x15, 0xe2, 0x22,
0xe4, 0x1d, 0xe2, 0x22, 0xe4, 0x1d, 0xe2, 0x22,
0xa4, 0x2d, 0x2e, 0x42, 0x1b, 0x2d, 0x2e, 0x42,
0x1b, 0x29, 0x26, 0xb2, 0x91, 0x22, 0xb6, 0x91,
0x36, 0x62, 0x1b, 0x68, 0x23, 0x96, 0x61, 0x2b,
0x86, 0x19, 0xb6, 0x42, 0x98, 0x41, 0x2b, 0x84,
0x2a, 0xb4, 0x42, 0xaa, 0x42, 0x2b, 0xa4, 0x2a,
0xb4, 0x43, 0xaa, 0x42, 0x4a, 0xea, 0x22, 0xf4,
0x99, 0x41, 0x80, 0x94, 0x41, 0x48, 0x11, 0x42,
0x19, 0x38, 0x42, 0x11, 0x2b, 0x14, 0x11, 0x2b,
0x94, 0x11, 0x2b, 0xb4, 0x11, 0x2b, 0xb4, 0xf0,
0x42, 0x91, 0xf0, 0x42, 0x91, 0xd0, 0x12, 0x19,
0xd2, 0x12, 0xc9, 0x52, 0x1c, 0xc9, 0x82, 0x1e,
0x81, 0x2c, 0x64, 0x19, 0x24, 0x96, 0xc1, 0x43,
0x96, 0x41, 0x32, 0x91, 0x2c, 0xb4, 0x91, 0x44,
0xb2, 0x91, 0x24, 0x34, 0x91, 0x21, 0x13, 0x38,
0x42, 0x11, 0x29, 0x18, 0xb1, 0x42, 0x1a, 0x91,
0xa2, 0xb0, 0x42, 0x08, 0x29, 0x08, 0x29, 0x18,
0x92, 0x82, 0x24, 0x4f, 0xb5, 0x0e, 0x20, 0x88,
0x04, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00,
0x00, 0x00, 0x10, 0x02, 0x18, 0x80, 0x08, 0x00,
0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x80, 0x02, 0x00, 0x00, 0x00, 0x50, 0x12,
0xb0, 0xd1, 0x03, 0x00, 0x00, 0x00, 0x22, 0x00,
0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x42, 0x90,
0x21, 0x20, 0x22, 0x04, 0x20, 0x04, 0x28, 0x22,
0x00, 0x20, 0x01, 0x20, 0x22, 0x08, 0x00, 0x00,
0x80, 0x04, 0x48, 0x00, 0x00, 0x80, 0x84, 0x04,
0x80, 0xf2, 0x88, 0x22, 0x80, 0x21, 0x28, 0x82,
0x02, 0x80, 0xa8, 0x48, 0x22, 0x1a, 0x04, 0x00,
0x88, 0x80, 0x82, 0x02, 0x80, 0x04, 0x48, 0x42,
0x88, 0x00, 0xc0, 0x41, 0x00, 0x20, 0x04, 0x22,
0x00, 0x20, 0x02, 0x62, 0x42, 0x20, 0x14, 0x11,
0x92, 0x41, 0x20, 0x84, 0x08, 0x42, 0x8e, 0x41,
0x48, 0x00, 0x11, 0xe0, 0x14, 0x02, 0x9f, 0x86,
0x06, 0x20, 0x0c, 0x28, 0x00, 0xa8, 0x00, 0x42,
0x00, 0x22, 0x00, 0x22, 0x00, 0x00, 0x2c, 0x84,
0xc4, 0x41, 0x92, 0xa0, 0x48, 0x80, 0x84, 0x04,
0x22, 0x11, 0x00, 0x20, 0x21, 0x04, 0x22, 0x28,
0x00, 0x42, 0x11, 0x20, 0x24, 0xa4, 0x42, 0x4a,
0x08, 0x42, 0x88, 0x00, 0x42, 0x17, 0x24, 0x40,
0x21, 0xd2, 0xb1, 0x01, 0x18, 0x20, 0x02, 0x00,
0xa0, 0x48, 0x22, 0x12, 0x00, 0x20, 0x08, 0x80,
0x02, 0x28, 0x48, 0x00, 0x28, 0x80, 0x02, 0x10,
0x01, 0x00, 0x2a, 0x04, 0x22, 0x00, 0x20, 0x02,
0x4a, 0x88, 0x04, 0x40, 0x02, 0x14, 0x00, 0x00,
0x30, 0x41, 0x48, 0x00, 0x00, 0x4a, 0x02, 0xeb,
0xbb, 0x20, 0x02, 0x00, 0x80, 0x02, 0x00, 0x00,
0x48, 0x00, 0x00, 0x20, 0x01, 0x48, 0x18, 0x20,
0x04, 0x42, 0x22, 0x42, 0x20, 0x85, 0x61, 0x14,
0x20, 0xa1, 0x42, 0x20, 0x02, 0x00, 0x80, 0x04,
0x20, 0x02, 0x42, 0x82, 0x20, 0x08, 0x48, 0x20,
0x88, 0x22, 0x28, 0x04, 0x4a, 0x02, 0xef, 0xd5,
0x07, 0x00, 0x32, 0x80, 0x03, 0x2a, 0xa1, 0x41,
0x12, 0x58, 0x80, 0x01, 0x00, 0x52, 0x12, 0x42,
0x22, 0x60, 0x12, 0x80, 0x22, 0x02, 0xa0, 0x12,
0x1a, 0x22, 0x02, 0xb8, 0x52, 0x30, 0x12, 0x20,
0x84, 0xa1, 0x12, 0x11, 0x18, 0x00, 0x48, 0xa0,
0x84, 0xa2, 0x42, 0x00, 0x00, 0x2a, 0x04, 0x80,
0x84, 0x82, 0x08, 0x82, 0x7f, 0x8c, 0x01, 0x28,
0x20, 0x01, 0x38, 0x80, 0x22, 0x21, 0x01, 0x20,
0x04, 0x00, 0x18, 0x12, 0x42, 0x22, 0x10, 0x01,
0x2a, 0x24, 0x02, 0x20, 0x82, 0xa3, 0x12, 0xe0,
0x12, 0x8d, 0x01, 0x00, 0x48, 0x00, 0x20, 0x21,
0x04, 0x80, 0x02, 0xe2, 0x82, 0x20, 0x08, 0x48,
0x62, 0x82, 0x22, 0x48, 0x80, 0x88, 0x02, 0x87,
0x68, 0x00, 0x20, 0x02, 0x20, 0x22, 0x21, 0x04,
0x58, 0x80, 0x01, 0x00, 0x48, 0x20, 0x01, 0x42,
0x1a, 0x02, 0x00, 0x48, 0x22, 0x1a, 0x04, 0x48,
0x12, 0x80, 0x84, 0xb1, 0x22, 0x05, 0x22, 0x12,
0x32, 0x11, 0x00, 0x80, 0x04, 0x8a, 0x04, 0x48,
0x00, 0x00, 0x00, 0x80, 0x88, 0x06, 0x42, 0x88,
0x2f, 0x59, 0x08, 0x42, 0x18, 0x80, 0x21, 0x04,
0x28, 0x22, 0x48, 0x42, 0x20, 0xa4, 0x21, 0x20,
0x81, 0x22, 0xa4, 0x24, 0x20, 0x02, 0x20, 0x81,
0x01, 0x42, 0x80, 0x84, 0x04, 0x48, 0x00, 0x22,
0x22, 0x20, 0x04, 0x00, 0x00, 0x42, 0x00, 0x00,
0x28, 0x00, 0x82, 0x00, 0x00, 0x82, 0x00, 0x88,
0x5f, 0x5b, 0x03, 0x20, 0x26, 0x01, 0x38, 0x20,
0x81, 0x81, 0x22, 0x21, 0x01, 0x28, 0x48, 0x00,
0x20, 0x01, 0x00, 0x00, 0x4a, 0x21, 0x02, 0x12,
0x00, 0x18, 0x12, 0x20, 0x86, 0x04, 0x12, 0x62,
0xa0, 0x12, 0x00, 0x28, 0x20, 0x26, 0x02, 0x22,
0xe8, 0x48, 0x20, 0x02, 0x00, 0x22, 0x20, 0x24,
0x22, 0xf4, 0x92, 0xed, 0x00, 0x00, 0x28, 0x80,
0x01, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x18,
0x40, 0x81, 0x24, 0x04, 0x42, 0x28, 0x48, 0x22,
0x28, 0x80, 0x88, 0x02, 0x00, 0x42, 0x30, 0x12,
0x80, 0x86, 0x02, 0x28, 0x00, 0x00, 0x80, 0x98,
0x42, 0xa0, 0x84, 0x80, 0x04, 0x22, 0x28, 0x20,
0xf2, 0xf6, 0x56, 0x00, 0x18, 0xa0, 0x12, 0x38,
0x18, 0x28, 0x28, 0x48, 0x42, 0x20, 0x24, 0x21,
0x84, 0x81, 0x01, 0x28, 0x80, 0x42, 0x81, 0xa4,
0x41, 0x48, 0x42, 0x4a, 0xa2, 0x14, 0x28, 0x2a,
0x84, 0xa1, 0x49, 0x22, 0x48, 0x62, 0xa0, 0x41,
0x10, 0xa2, 0x21, 0x42, 0x28, 0x22, 0x42, 0x2a,
0x24, 0x02, 0x22, 0x42, 0x8a, 0x04, 0xa2, 0x00,
0x42, 0x00, 0x68, 0x20, 0xf8, 0x57, 0xc7, 0x80,
0x84, 0x82, 0x01, 0x42, 0x80, 0x21, 0x21, 0x22,
0x81, 0x01, 0x00, 0x20, 0x22, 0xa4, 0x41, 0x18,
0x00, 0x00, 0x80, 0x02, 0x80, 0x04, 0x00, 0x80,
0x02, 0x28, 0x80, 0x82, 0x01, 0x22, 0x00, 0x28,
0x00, 0x00, 0x88, 0x30, 0x42, 0xa0, 0x84, 0x00,
0x22, 0xa8, 0x80, 0xa2, 0x42, 0xbf, 0x15, 0x08,
0x48, 0x1a, 0x02, 0x22, 0x00, 0x62, 0x68, 0x28,
0x28, 0x80, 0x02, 0x42, 0x00, 0x00, 0x20, 0x82,
0x24, 0x24, 0x03, 0x48, 0x18, 0x22, 0x42, 0x2a,
0x04, 0x80, 0x82, 0x01, 0x22, 0xa0, 0x21, 0xa0,
0x41, 0x20, 0x01, 0x62, 0x00, 0x00, 0x28, 0x82,
0x20, 0x24, 0x08, 0x88, 0x80, 0x84, 0x88, 0x24,
0xf4, 0x5f, 0xde, 0x00, 0x80, 0x01, 0x00, 0x20,
0x21, 0x24, 0xa4, 0x52, 0x48, 0x22, 0x00, 0x32,
0x42, 0x28, 0x28, 0x00, 0x00, 0x48, 0x00, 0x12,
0x12, 0x00, 0x28, 0x20, 0x84, 0x04, 0x00, 0x80,
0x22, 0x84, 0x84, 0x01, 0x42, 0x28, 0x00, 0x20,
0x24, 0x06, 0x00, 0x48, 0x42, 0x28, 0x00, 0xf0,
0xbe, 0x33, 0x20, 0x01, 0x28, 0x4a, 0x21, 0x21,
0x82, 0x02, 0x00, 0x00, 0x48, 0x20, 0x06, 0x12,
0x20, 0x01, 0x00, 0x80, 0x21, 0x24, 0x07, 0x80,
0x81, 0x22, 0x21, 0x84, 0x06, 0x00, 0x00, 0x00,
0x28, 0x32, 0x00, 0x20, 0x88, 0x22, 0x08, 0xa2,
0x28, 0x80, 0x02, 0x80, 0x22, 0x24, 0x22, 0xb2,
0x9a, 0x0d, 0x00, 0x00, 0x20, 0x81, 0x01, 0x38,
0x18, 0x00, 0x18, 0x80, 0x01, 0x00, 0x42, 0x42,
0x80, 0x02, 0x28, 0x00, 0x80, 0x22, 0x82, 0x24,
0x02, 0x00, 0x48, 0x48, 0x80, 0x04, 0x00, 0x42,
0x00, 0x00, 0x80, 0x04, 0x00, 0x62, 0x00, 0x28,
0x20, 0x82, 0x08, 0x2f, 0xa7, 0x0e, 0x42, 0x68,
0x80, 0x02, 0x20, 0xa4, 0x21, 0x1a, 0x04, 0x00,
0x00, 0x00, 0x68, 0x80, 0x04, 0x22, 0x2a, 0x01,
0x00, 0x20, 0x04, 0x00, 0x1a, 0x04, 0x00, 0x00,
0x22, 0x20, 0x06, 0x28, 0x00, 0x00, 0x28, 0x20,
0x28, 0x04, 0x20, 0x08, 0x88, 0x22, 0x82, 0x00,
0x14, 0x1d, 0xb3, 0x00, 0x80, 0x04, 0x80, 0x02,
0x00, 0x48, 0x28, 0x80, 0x81, 0x24, 0x24, 0x02,
0x00, 0x18, 0x00, 0x22, 0x80, 0x02, 0x28, 0x00,
0x18, 0x80, 0x04, 0x00, 0x80, 0x84, 0x04, 0x20,
0x01, 0x22, 0x22, 0x00, 0x00, 0x82, 0x00, 0xa0,
0x84, 0x20, 0x04, 0x2a, 0x08, 0x88, 0x7f, 0xba,
0x06, 0x00, 0x58, 0x00, 0x00, 0x48, 0x00, 0x20,
0x84, 0x04, 0xa0, 0x14, 0x12, 0x80, 0x02, 0x80,
0x24, 0x81, 0x02, 0x00, 0x1a, 0x02, 0x62, 0x20,
0x23, 0x22, 0x02, 0x22, 0x18, 0x1a, 0x06, 0x22,
0x48, 0x00, 0x20, 0x2c, 0x28, 0x08, 0x20, 0x8c,
0x08, 0x20, 0x02, 0x00, 0x00, 0x97, 0xa4, 0x00,
0x80, 0x02, 0x20, 0x01, 0x00, 0x12, 0x48, 0x00,
0x00, 0x80, 0x02, 0x80, 0x02, 0x00, 0x80, 0x02,
0x18, 0x80, 0x01, 0x00, 0x80, 0x82, 0x84, 0x02,
0x12, 0x80, 0x02, 0x48, 0x20, 0x22, 0x2a, 0x02,
0x00, 0x20, 0x22, 0xa2, 0x4a, 0x22, 0x00, 0x80,
0x08, 0xff, 0xb4, 0x03, 0x80, 0x81, 0x04, 0x12,
0x20, 0x01, 0x00, 0x18, 0x38, 0x80, 0x22, 0x22,
0x04, 0x62, 0x80, 0x81, 0x81, 0x11, 0x02, 0x18,
0x28, 0xc8, 0x48, 0x80, 0x81, 0x24, 0x41, 0x81,
0x24, 0x82, 0x04, 0x2a, 0x24, 0x21, 0x04, 0x28,
0x20, 0x84, 0x04, 0x20, 0x84, 0x02, 0x88, 0x42,
0x20, 0x24, 0x08, 0x10, 0x82, 0xf8, 0xbd, 0xb5,
0x00, 0x4a, 0xa2, 0x11, 0x6a, 0x81, 0xa1, 0x23,
0x22, 0x80, 0xa1, 0x52, 0x18, 0x1a, 0x82, 0x02,
0x22, 0x58, 0x12, 0x22, 0x3a, 0xa6, 0x12, 0x18,
0x5a, 0x01, 0x28, 0xa0, 0x11, 0x42, 0x4a, 0x21,
0x03, 0x4a, 0xa2, 0x43, 0x42, 0x42, 0x6a, 0x86,
0xa4, 0x11, 0x22, 0x3a, 0x83, 0xa4, 0x24, 0x18,
0x28, 0x48, 0x42, 0x2a, 0x02, 0x8a, 0xa4, 0xcc,
0x88, 0xaa, 0x2a, 0x26, 0x2a, 0xaa, 0x48, 0xa0,
0x82, 0x14, 0x8a, 0xe2, 0x3a, 0x0d, 0x12, 0x22,
0x80, 0x22, 0x01, 0x5a, 0xa2, 0x26, 0x2a, 0x04,
0x7a, 0x06, 0x5a, 0x05, 0x1a, 0xa4, 0x25, 0x42,
0x28, 0x42, 0x4a, 0x22, 0x02, 0x38, 0x80, 0xa2,
0x26, 0x3a, 0xa6, 0x43, 0x38, 0x6a, 0xa1, 0x13,
0x4a, 0xa1, 0x22, 0x28, 0xa0, 0x24, 0x6a, 0x82,
0x22, 0xa4, 0x22, 0x2a, 0xa5, 0x22, 0x80, 0xa2,
0xa2, 0xa0, 0x82, 0xa8, 0x20, 0x04, 0x82, 0xc8,
0x28, 0x62, 0x6a, 0x28, 0x2c, 0x06, 0x9f, 0x5f,
0x05, 0x4a, 0xa4, 0x11, 0x2a, 0x02, 0x80, 0x81,
0xa5, 0x51, 0x5a, 0x22, 0x05, 0x6a, 0x04, 0x4a,
0xa4, 0x24, 0x22, 0x2a, 0x87, 0x04, 0x12, 0x42,
0x2a, 0x26, 0xa3, 0x16, 0x6a, 0x04, 0x18, 0x28,
0x42, 0x1a, 0x86, 0x84, 0x82, 0xa5, 0x42, 0x20,
0x02, 0x1a, 0x81, 0x24, 0x24, 0xa1, 0x45, 0x2a,
0x24, 0xa6, 0x48, 0x8a, 0x08, 0x42, 0xa0, 0x6a,
0x48, 0xe8, 0x4a, 0xa2, 0xc4, 0x28, 0x28, 0x28,
0x8a, 0xa8, 0x84, 0x7f, 0xf3, 0x09, 0x00, 0x00,
0xa0, 0x12, 0x00, 0x12, 0x22, 0x12, 0xa0, 0x41,
0x00, 0x28, 0x1a, 0x04, 0x48, 0x00, 0x42, 0x12,
0x00, 0x42, 0x20, 0x04, 0x42, 0x20, 0x04, 0x20,
0x22, 0x84, 0x01, 0x18, 0x00, 0x48, 0x00, 0x22,
0x00, 0x00, 0x48, 0x80, 0x04, 0x00, 0xa0, 0x24,
0x82, 0x4a, 0xf2, 0x63, 0xe8, 0xa0, 0x77, 0x3a,
0x23, 0x23, 0xa1, 0x23, 0x3a, 0xa3, 0x33, 0x2a,
0xa6, 0x24, 0x1a, 0xa7, 0x65, 0x6a, 0x23, 0xa1,
0x11, 0x5a, 0xa5, 0x44, 0x48, 0x5a, 0xa1, 0x55,
0x2a, 0x23, 0xa1, 0x15, 0x12, 0x2a, 0x22, 0x82,
0xa2, 0x33, 0x1a, 0xa2, 0x22, 0x6a, 0x22, 0xa2,
0x32, 0x3a, 0xa7, 0x11, 0xa0, 0x42, 0x28, 0x22,
0xa0, 0x11, 0x4a, 0x81, 0x26, 0x02, 0x62, 0x22,
0x22, 0x8a, 0x88, 0xa8, 0xc8, 0x8a, 0xa8, 0xae,
0xaa, 0xaa, 0xaa, 0x8a, 0xa8, 0x84, 0x6a, 0xa2,
0x84, 0xea, 0xfa, 0x43, 0xdf, 0xa0, 0x66, 0x7a,
0xa7, 0x11, 0x2a, 0xa1, 0x32, 0x3a, 0xa2, 0x72,
0x2a, 0x22, 0x22, 0xa3, 0x77, 0x4a, 0xa7, 0x21,
0x1a, 0xa1, 0x11, 0x42, 0x48, 0x5a, 0xa1, 0x11,
0x6a, 0xc7, 0x12, 0x2b, 0x15, 0x18, 0x2b, 0x32,
0x6a, 0xa2, 0x8e, 0x3a, 0xa7, 0xd7, 0x2a, 0xa2,
0x26, 0x78, 0x1f, 0x16, 0xa4, 0x53, 0x5e, 0x51,
0x48, 0x48, 0x48, 0x20, 0xa2, 0x55, 0x42, 0x2a,
0xa7, 0x22, 0x4a, 0xa4, 0x26, 0x22, 0x22, 0x4a,
0xa6, 0x8c, 0xc8, 0x82, 0xea, 0xaa, 0x2c, 0xca,
0xa4, 0x8c, 0x4e, 0x82, 0x23, 0xac, 0xa6, 0x2b,
0x8c, 0xcf, 0x3a, 0x01, 0x5a, 0xa1, 0x73, 0x1a,
0x23, 0x21, 0xa1, 0x33, 0x1a, 0x21, 0x04, 0x1a,
0xa1, 0x57, 0x6a, 0xa6, 0x31, 0xa0, 0x44, 0x4a,
0x24, 0x24, 0x04, 0x18, 0x3a, 0xb6, 0x52, 0xa5,
0x11, 0x2a, 0xa3, 0x62, 0x2a, 0xae, 0x37, 0x7a,
0xa3, 0x62, 0x6a, 0xa4, 0x26, 0x7e, 0x21, 0x2a,
0x02, 0x42, 0x48, 0x48, 0x38, 0x1a, 0xa1, 0x11,
0x12, 0x6a, 0xa6, 0x26, 0x28, 0x22, 0x28, 0x8a,
0x8a, 0xa2, 0x48, 0xca, 0xac, 0x8c, 0xea, 0xaa,
0x6a, 0xaa, 0xaa, 0xc8, 0x4a, 0xbc, 0x62, 0xae,
0xc4, 0xea, 0xde, 0x67, 0x09, 0x5a, 0xa5, 0x73,
0x1a, 0xa1, 0x21, 0x12, 0x2a, 0xa3, 0x14, 0x28,
0x6a, 0xa3, 0x63, 0x7a, 0xa6, 0x46, 0x5a, 0x01,
0x4a, 0xa4, 0x42, 0x4a, 0x21, 0xa6, 0x44, 0x6a,
0x87, 0xb5, 0x52, 0x65, 0x22, 0x2a, 0xa2, 0x66,
0x4a, 0xac, 0x73, 0xda, 0xa5, 0x63, 0x4a, 0xa6,
0x63, 0x4e, 0x61, 0x6a, 0xb4, 0x41, 0xa4, 0x64,
0x2a, 0x84, 0x02, 0x1a, 0xa3, 0x57, 0x4a, 0xa4,
0x65, 0x62, 0x4a, 0xa6, 0xe6, 0x22, 0xaa, 0xa8,
0xcc, 0xca, 0xac, 0x4c, 0x6a, 0xa8, 0x26, 0xea,
0xac, 0x6e, 0xea, 0xac, 0xc4, 0x2b, 0xee, 0x4e,
0xc2, 0xea, 0xfe, 0xfb, 0xf6, 0x20, 0x02, 0x00,
0x18, 0x20, 0x02, 0x22, 0x12, 0x22, 0x00, 0x00,
0x12, 0x80, 0x04, 0x12, 0x28, 0x00, 0x00, 0x80,
0x02, 0x00, 0x4a, 0xa2, 0x12, 0x00, 0x00, 0x00,
0x20, 0x02, 0x2a, 0x01, 0x00, 0x22, 0x82, 0x20,
0x08, 0x82, 0x28, 0x8a, 0x84, 0x22, 0x28, 0x04,
0x4a, 0x22, 0xf8, 0xaa, 0x73, 0x80, 0x21, 0x01,
0x28, 0xa0, 0x21, 0x42, 0x80, 0x81, 0x24, 0x04,
0x4a, 0x01, 0x42, 0x80, 0x22, 0x22, 0x04, 0x42,
0x80, 0x23, 0x02, 0x48, 0x12, 0x2a, 0x04, 0x58,
0x00, 0x42, 0x22, 0xa0, 0x42, 0x12, 0xa0, 0x21,
0x80, 0x04, 0x48, 0x22, 0x48, 0x88, 0x00, 0x48,
0x80, 0x04, 0x00, 0xaa, 0x04, 0x82, 0x40, 0xf1,
0x23, 0x2f, 0x80, 0xb5, 0x11, 0x02, 0x1b, 0x21,
0x62, 0x1b, 0x21, 0x2b, 0x14, 0x1b, 0x21, 0x2b,
0x16, 0x1b, 0x21, 0x2b, 0x94, 0x1b, 0x21, 0x2b,
0x94, 0x19, 0xb4, 0x42, 0x29, 0xf3, 0x42, 0xb1,
0x2a, 0xf4, 0x42, 0x91, 0x2a, 0xf4, 0x42, 0x91,
0x3a, 0xe4, 0x14, 0xe9, 0x22, 0xe4, 0x14, 0xe8,
0x22, 0x64, 0x15, 0x2e, 0x42, 0xd6, 0xe1, 0x22,
0x64, 0x1d, 0x2c, 0xa4, 0x29, 0x2e, 0x42, 0x1b,
0x2d, 0x2c, 0xb4, 0x91, 0xc2, 0x12, 0x1b, 0x29,
0x4a, 0xb1, 0x91, 0x32, 0x42, 0x1b, 0x68, 0x23,
0x96, 0x21, 0x2b, 0x84, 0x19, 0xb2, 0x42, 0x18,
0xb1, 0x42, 0xa8, 0x42, 0x2b, 0x84, 0x2a, 0xb4,
0x42, 0x28, 0xb2, 0x42, 0xa8, 0x4a, 0x4a, 0xea,
0x22, 0xf4, 0x7e, 0xdc, 0x80, 0xb4, 0x11, 0x06,
0x1b, 0x61, 0x42, 0x1b, 0x21, 0x23, 0x94, 0x21,
0x23, 0x14, 0xb1, 0x42, 0x99, 0x21, 0x29, 0x1a,
0xb1, 0x42, 0x0b, 0x2d, 0x81, 0x22, 0x2d, 0x91,
0x22, 0x2d, 0x91, 0x2b, 0x42, 0x2d, 0x81, 0x2e,
0x12, 0x1c, 0xe8, 0x22, 0xed, 0x11, 0x68, 0x22,
0x96, 0xe1, 0x22, 0x64, 0x19, 0x34, 0x9e, 0x21,
0x2c, 0x34, 0x91, 0x24, 0x1b, 0x69, 0x24, 0x1b,
0x68, 0x42, 0x1b, 0x29, 0x23, 0xb4, 0x81, 0x32,
0x42, 0x11, 0x29, 0x98, 0x21, 0x2b, 0xa4, 0x11,
0x2b, 0xa4, 0x22, 0x29, 0x28, 0xb2, 0x42, 0x28,
0x92, 0x82, 0x21, 0x21, 0x24, 0x5f, 0xf3, 0x0d,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x21, 0x00, 0x80, 0x08, 0x00,
0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0xf0,
0x14, 0x81, 0x00, 0x2a, 0x21, 0x22, 0x81, 0x84,
0xa3, 0x24, 0x12, 0x18, 0x12, 0x38, 0x12, 0x48,
0x48, 0x00, 0x20, 0x03, 0x2a, 0x81, 0xa5, 0x21,
0x48, 0x00, 0x20, 0x01, 0x48, 0x80, 0x84, 0x23,
0x04, 0x78, 0x22, 0x22, 0x18, 0x80, 0x85, 0x01,
0x48, 0x13, 0x82, 0x24, 0x88, 0x04, 0x00, 0x2a,
0x04, 0x2a, 0x04, 0x82, 0x88, 0x68, 0x80, 0xf6,
0x5e, 0xe8, 0x80, 0x05, 0x18, 0x28, 0x18, 0x80,
0x81, 0x02, 0x80, 0x04, 0x12, 0x00, 0x62, 0x00,
0x5a, 0x82, 0x04, 0x80, 0x22, 0x06, 0x48, 0x20,
0x24, 0x21, 0x86, 0x01, 0x2a, 0x01, 0x20, 0x04,
0x00, 0x00, 0x12, 0x22, 0x42, 0x22, 0x11, 0x22,
0x00, 0x88, 0x80, 0x04, 0x82, 0x2a, 0x24, 0x04,
0x1c, 0x0a, 0xaf, 0xa3, 0x09, 0x20, 0x06, 0x18,
0x42, 0x20, 0x23, 0x82, 0x01, 0x52, 0x20, 0x26,
0x04, 0x22, 0x80, 0xa1, 0x41, 0x52, 0x2c, 0x81,
0x23, 0xa2, 0x25, 0x20, 0x2c, 0x81, 0x84, 0xa5,
0x24, 0x58, 0x11, 0x78, 0x80, 0xa4, 0x24, 0x42,
0x12, 0xa0, 0x41, 0x00, 0x22, 0x19, 0x22, 0x06,
0x62, 0x22, 0x80, 0x88, 0x82, 0x04, 0x20, 0xe4,
0x24, 0x08, 0xa2, 0x42, 0xef, 0x35, 0x0e, 0x58,
0x12, 0x2a, 0x81, 0x82, 0xa1, 0x21, 0x42, 0x12,
0x20, 0x21, 0x22, 0x81, 0x01, 0x80, 0x04, 0x22,
0x28, 0x22, 0x42, 0x20, 0x04, 0x00, 0x00, 0x00,
0xa0, 0x12, 0x00, 0x1a, 0x02, 0x28, 0x00, 0x20,
0x81, 0x81, 0x24, 0x04, 0x1c, 0x08, 0x00, 0x80,
0x04, 0x2a, 0x84, 0x28, 0x0a, 0x2a, 0x04, 0x22,
0xaf, 0xb8, 0x0b, 0x22, 0x20, 0x82, 0x02, 0x00,
0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x28, 0x80,
0x02, 0x42, 0x00, 0x80, 0x02, 0x12, 0x20, 0x01,
0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00,
0x88, 0x00, 0x20, 0x04, 0x00, 0x00, 0x20, 0xb2,
0x6b, 0x01, 0x00, 0x00, 0x2a, 0xa4, 0x12, 0x22,
0x28, 0x1a, 0x02, 0x28, 0x00, 0x48, 0xa0, 0x24,
0x2a, 0x01, 0x00, 0x80, 0xa2, 0x12, 0x28, 0x42,
0x2a, 0x24, 0x81, 0x84, 0x02, 0x2a, 0x04, 0x98,
0xa0, 0x42, 0x00, 0x00, 0x42, 0x62, 0x80, 0x04,
0x48, 0x42, 0x48, 0x00, 0x00, 0x20, 0x04, 0x68,
0x8a, 0x04, 0x00, 0x97, 0x95, 0x00, 0x80, 0x02,
0x68, 0x1a, 0x82, 0x02, 0x38, 0x42, 0x28, 0x00,
0x00, 0x22, 0x28, 0x00, 0x00, 0xa0, 0x42, 0x00,
0x48, 0x12, 0x48, 0x00, 0x38, 0x80, 0x01, 0x4a,
0x02, 0x22, 0x00, 0x00, 0x80, 0x04, 0x48, 0x00,
0x82, 0x00, 0x00, 0x00, 0x28, 0x88, 0x00, 0x28,
0x7f, 0x44, 0x06, 0x28, 0x00, 0x28, 0x00, 0x80,
0x02, 0x00, 0x00, 0x48, 0x80, 0x24, 0x01, 0x28,
0x80, 0x22, 0x82, 0x21, 0x22, 0x84, 0x82, 0x02,
0x38, 0x80, 0x04, 0x88, 0x00, 0x00, 0x00, 0x42,
0x68, 0x00, 0x00, 0x42, 0x48, 0x00, 0x00, 0x42,
0x42, 0x80, 0x84, 0x04, 0x00, 0xef, 0x52, 0x01,
0xa0, 0x12, 0x20, 0x22, 0x84, 0x08, 0x38, 0x42,
0x80, 0x22, 0x82, 0x82, 0x04, 0x28, 0x80, 0x02,
0x20, 0x02, 0x80, 0x0c, 0x20, 0x02, 0x28, 0x00,
0x00, 0x28, 0x80, 0x04, 0x00, 0x42, 0x00, 0x80,
0x24, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, 0x80,
0x02, 0x4a, 0xf2, 0x3e, 0x5d, 0x00, 0x20, 0x03,
0xa8, 0x22, 0x42, 0x80, 0x88, 0x01, 0xa0, 0x61,
0x00, 0x18, 0x42, 0x00, 0x62, 0x48, 0x20, 0x84,
0xa1, 0x24, 0x42, 0x20, 0x03, 0x00, 0x68, 0x4a,
0x01, 0x58, 0x20, 0x04, 0x20, 0x82, 0x21, 0x08,
0x20, 0x82, 0x0c, 0x8a, 0x02, 0x00, 0x20, 0x04,
0x80, 0x24, 0x04, 0xf0, 0x19, 0x3c, 0x80, 0x04,
0x00, 0x88, 0x98, 0x00, 0xa8, 0x00, 0x00, 0x00,
0x00, 0x4a, 0x01, 0x00, 0x48, 0x00, 0x80, 0x02,
0x48, 0x48, 0x12, 0x00, 0x00, 0x80, 0x22, 0x22,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x80,
0x02, 0x22, 0x20, 0x08, 0x00, 0x77, 0x32, 0x20,
0x24, 0x81, 0x82, 0x02, 0x32, 0x48, 0x80, 0x04,
0x28, 0x22, 0x48, 0x00, 0x20, 0xa4, 0x16, 0x20,
0x84, 0x04, 0x48, 0x48, 0x28, 0x4a, 0x22, 0xa2,
0x52, 0x68, 0x18, 0x20, 0x84, 0x01, 0x42, 0x2a,
0x24, 0x02, 0x20, 0x06, 0x82, 0x20, 0x84, 0x24,
0x08, 0x00, 0x00, 0x80, 0x24, 0x04, 0x48, 0x68,
0xa0, 0x24, 0x3f, 0xe4, 0x03, 0x82, 0x28, 0x18,
0x20, 0x06, 0xa0, 0x21, 0x22, 0x12, 0x00, 0x18,
0x48, 0x20, 0x03, 0x00, 0x22, 0x28, 0x48, 0x20,
0x28, 0x04, 0x00, 0x00, 0x20, 0x22, 0x24, 0x22,
0x01, 0x80, 0x01, 0x20, 0x01, 0x00, 0x28, 0x42,
0x80, 0x08, 0x42, 0x80, 0x02, 0x28, 0x80, 0x08,
0x00, 0xbf, 0x13, 0x07, 0x22, 0x80, 0x02, 0x00,
0x28, 0x00, 0x00, 0x00, 0x20, 0x02, 0x80, 0x02,
0x20, 0x82, 0x82, 0x04, 0x80, 0x22, 0x02, 0x00,
0x00, 0x00, 0x00, 0x00, 0x48, 0x42, 0x80, 0x04,
0x00, 0x00, 0x00, 0x48, 0x00, 0x42, 0x00, 0x82,
0x48, 0x80, 0xfc, 0x48, 0xd9, 0x00, 0x00, 0x00,
0x00, 0x1a, 0x02, 0x00, 0x12, 0x22, 0x00, 0x32,
0x00, 0x42, 0x80, 0x04, 0x80, 0x06, 0x00, 0x00,
0x00, 0x22, 0x00, 0x20, 0x02, 0x00, 0x22, 0x00,
0x00, 0x00, 0x00, 0x00, 0x20, 0x04, 0x00, 0x80,
0x08, 0xf0, 0x47, 0x7f, 0x20, 0x2c, 0x02, 0x28,
0x28, 0x8a, 0x02, 0x00, 0x00, 0x00, 0x80, 0x02,
0x00, 0x20, 0x22, 0x22, 0x04, 0x00, 0x00, 0x80,
0x82, 0x04, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x80, 0x08,
0x00, 0xf0, 0x44, 0x99, 0x00, 0x80, 0x03, 0x00,
0x00, 0x20, 0x02, 0x28, 0x80, 0x02, 0x00, 0x80,
0x02, 0x48, 0x80, 0x04, 0x28, 0x80, 0xa2, 0x12,
0x48, 0x22, 0x28, 0x00, 0x18, 0x48, 0x00, 0x18,
0x00, 0x42, 0x20, 0x04, 0x00, 0x00, 0x00, 0x42,
0x28, 0x42, 0x00, 0x80, 0x88, 0x8a, 0xe8, 0xfa,
0x02, 0x2a, 0x04, 0x00, 0x00, 0x00, 0x00, 0x42,
0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x28, 0x00,
0x12, 0x00, 0x20, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xa0, 0x84, 0x42, 0xc8, 0x14, 0x8f, 0xae, 0x0c,
0x80, 0x02, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x02, 0x00, 0x48, 0x80, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x20, 0x04,
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xf0, 0xa6, 0x79, 0x00, 0x00, 0x22, 0x12,
0x2a, 0x08, 0x28, 0x80, 0x01, 0x00, 0x38, 0x00,
0x20, 0x81, 0xa4, 0x41, 0x20, 0x01, 0x80, 0x01,
0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x28, 0x20,
0x01, 0x22, 0x20, 0x02, 0x20, 0x02, 0x28, 0x00,
0x00, 0x00, 0x00, 0x00, 0x9f, 0x85, 0x0c, 0x20,
0x08, 0x80, 0x08, 0x00, 0x22, 0x28, 0x00, 0x00,
0x00, 0x22, 0x22, 0x80, 0x04, 0x28, 0x22, 0x12,
0x28, 0x00, 0x28, 0x20, 0x04, 0x00, 0x00, 0x80,
0x04, 0x00, 0x00, 0x00, 0x00, 0x20, 0x02, 0x80,
0x04, 0x00, 0x88, 0x48, 0x00, 0x42, 0xff, 0x37,
0x0f, 0x18, 0x80, 0x04, 0x22, 0x00, 0x00, 0x00,
0x42, 0x80, 0x02, 0x22, 0x00, 0x22, 0x00, 0x48,
0x21, 0x28, 0x00, 0x88, 0x80, 0x84, 0x21, 0x82,
0x41, 0x01, 0x48, 0x58, 0x80, 0x04, 0x20, 0x04,
0x42, 0x00, 0x00, 0x00, 0x42, 0x20, 0x04, 0x28,
0x80, 0x02, 0x29, 0x04, 0xff, 0x8f, 0x08, 0x2a,
0x21, 0x2a, 0x03, 0x9a, 0x02, 0x22, 0x1a, 0x22,
0x02, 0x00, 0x28, 0x00, 0x00, 0x18, 0x00, 0x2a,
0x22, 0x84, 0xa2, 0x61, 0x22, 0x32, 0x28, 0x22,
0x80, 0x02, 0x22, 0x00, 0xa0, 0x14, 0x20, 0x81,
0x24, 0x81, 0x84, 0x02, 0x00, 0x00, 0x22, 0x00,
0x48, 0x48, 0x48, 0xa0, 0x88, 0x4a, 0x28, 0x64,
0x1c, 0xf0, 0x39, 0xbb, 0x80, 0xa2, 0x28, 0x80,
0x02, 0x2a, 0x08, 0x22, 0xa0, 0x32, 0x20, 0x03,
0xa0, 0x22, 0x22, 0x22, 0xa0, 0x66, 0x2a, 0x21,
0x84, 0x24, 0x22, 0x82, 0x82, 0x22, 0x82, 0x22,
0xa4, 0x46, 0x22, 0x18, 0xa0, 0x21, 0xa0, 0x42,
0x00, 0x80, 0x04, 0x4a, 0x84, 0x84, 0x02, 0x00,
0x00, 0x62, 0x20, 0x04, 0x00, 0x68, 0xa0, 0x82,
0x8a, 0xf8, 0xbd, 0x99, 0xa0, 0x44, 0x80, 0x22,
0x22, 0x82, 0xa2, 0x21, 0x00, 0x20, 0x84, 0x04,
0x18, 0xa0, 0x21, 0x28, 0x2a, 0x02, 0x4a, 0x86,
0xa4, 0x32, 0x4a, 0x24, 0x04, 0x00, 0x12, 0x2a,
0x84, 0x81, 0x02, 0x00, 0x4a, 0x04, 0x42, 0x28,
0x20, 0x26, 0x24, 0x21, 0x04, 0x00, 0x28, 0x00,
0x48, 0x42, 0x22, 0x42, 0x28, 0x20, 0xa8, 0xc8,
0x48, 0x4a, 0xd4, 0xd1, 0x0b, 0x12, 0x20, 0x01,
0x92, 0x88, 0x12, 0x18, 0x80, 0x01, 0x18, 0x80,
0x01, 0x18, 0x80, 0x03, 0x18, 0xa0, 0x34, 0x20,
0x04, 0x00, 0x1a, 0x02, 0x52, 0xa0, 0x21, 0xa0,
0x21, 0xa0, 0x25, 0xa0, 0x21, 0xa0, 0x61, 0x80,
0x06, 0x28, 0x80, 0x02, 0x00, 0x48, 0xa0, 0x42,
0x20, 0x02, 0x22, 0x20, 0x02, 0xef, 0xb1, 0x01,
0xaa, 0xa1, 0x11, 0x2a, 0xa2, 0x13, 0x1a, 0xa1,
0x11, 0x2a, 0x82, 0xa3, 0x31, 0x3a, 0xa1, 0x77,
0x2a, 0xa7, 0x11, 0x1a, 0xa1, 0x11, 0x2a, 0xa1,
0x13, 0x1a, 0xa3, 0x11, 0x28, 0x5a, 0xa7, 0x51,
0x1a, 0x85, 0x04, 0x28, 0x1a, 0xa3, 0x33, 0x5a,
0xa1, 0x47, 0x38, 0x38, 0x3a, 0xa3, 0x22, 0x6a,
0x87, 0xa7, 0x33, 0x2a, 0xa2, 0x33, 0x5a, 0xa7,
0x22, 0x7a, 0xa7, 0x62, 0xa0, 0x22, 0x2a, 0x02,
0x00, 0x42, 0x6a, 0xa6, 0x26, 0x6a, 0x26, 0x82,
0xaa, 0x64, 0xea, 0x26, 0x84, 0xf2, 0xeb, 0x13,
0x80, 0xa5, 0x57, 0x3a, 0x83, 0x06, 0x1a, 0xa1,
0x33, 0x18, 0x1a, 0x23, 0xa2, 0x66, 0x2a, 0xa7,
0x31, 0x00, 0x2a, 0xa3, 0x13, 0x28, 0x22, 0x1a,
0xe3, 0x21, 0x13, 0x02, 0x23, 0x05, 0x9a, 0x8b,
0x82, 0xa8, 0x33, 0x12, 0x18, 0x1d, 0x31, 0x3a,
0xe3, 0x11, 0x81, 0x81, 0xa3, 0x77, 0x1a, 0x01,
0x28, 0x7a, 0x03, 0xa0, 0x22, 0x2a, 0xa2, 0x22,
0x20, 0x02, 0x2a, 0x02, 0xa0, 0x22, 0x22, 0x28,
0x4e, 0xe2, 0x2b, 0x66, 0xaa, 0xb2, 0xc2, 0xf2,
0x2b, 0xa8, 0xa0, 0x61, 0x48, 0x3a, 0xa3, 0x22,
0x88, 0xa0, 0x33, 0x32, 0x18, 0x2a, 0xa2, 0x44,
0x1a, 0x84, 0x03, 0x20, 0xa1, 0x12, 0x2a, 0x02,
0x1a, 0xa3, 0x64, 0x29, 0x84, 0x84, 0x05, 0xa8,
0x28, 0x20, 0xa5, 0x54, 0x60, 0x13, 0x28, 0x1a,
0xa1, 0x44, 0x3a, 0x84, 0xa6, 0x11, 0xa0, 0x46,
0x28, 0x5a, 0x85, 0xa4, 0x22, 0x00, 0x2a, 0x82,
0x02, 0x42, 0x4a, 0x24, 0xa4, 0x46, 0x28, 0x82,
0x22, 0x29, 0xa8, 0x62, 0x82, 0xef, 0x84, 0x0c,
0x92, 0x1a, 0xa7, 0x22, 0x42, 0x1a, 0xa3, 0x91,
0x2a, 0xa2, 0x23, 0x18, 0x3a, 0xa3, 0x44, 0x1a,
0x84, 0xa1, 0x11, 0xa0, 0x21, 0x2a, 0xa1, 0x33,
0x62, 0x2a, 0xa2, 0x31, 0x2b, 0x57, 0x2c, 0xa4,
0x56, 0xa0, 0xa3, 0x28, 0xba, 0xa3, 0x63, 0x2a,
0x85, 0x62, 0x13, 0x1a, 0xb3, 0x21, 0x02, 0x7a,
0xa4, 0x71, 0x2a, 0x02, 0x7a, 0xa5, 0x35, 0x6a,
0x22, 0x04, 0x2a, 0x02, 0x2a, 0x82, 0x02, 0x6a,
0x04, 0x6a, 0x26, 0x82, 0x02, 0xa2, 0x2b, 0x62,
0x2c, 0x88, 0xf4, 0x72, 0xaa, 0x00, 0x00, 0x00,
0x00, 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
0x28, 0x00, 0x00, 0x80, 0x02, 0x28, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x42, 0x82, 0x20, 0xf8, 0x21,
0x32, 0x20, 0x02, 0x80, 0x02, 0x28, 0x80, 0x02,
0x00, 0x48, 0x00, 0x00, 0x28, 0x80, 0x82, 0x24,
0x24, 0x02, 0x2a, 0x04, 0x00, 0x00, 0x48, 0x28,
0x00, 0x00, 0x48, 0x00, 0x00, 0x48, 0x80, 0x04,
0x00, 0x00, 0x20, 0x04, 0x42, 0x00, 0x80, 0x08,
0x42, 0x14, 0xcf, 0x69, 0x0f, 0x58, 0x1b, 0x21,
0x18, 0x1b, 0x21, 0x4a, 0xb1, 0x11, 0xb2, 0x42,
0xb1, 0x11, 0xb2, 0x42, 0xb1, 0x11, 0xb2, 0x42,
0xb9, 0x11, 0xb2, 0x42, 0x39, 0x11, 0x2b, 0x94,
0x32, 0x2f, 0x14, 0x29, 0xf3, 0x42, 0xb1, 0x32,
0x2f, 0x14, 0xa9, 0x43, 0x4e, 0xb1, 0x2e, 0x42,
0x1c, 0xe8, 0x22, 0x64, 0x11, 0x2e, 0x52, 0xde,
0x21, 0x2e, 0x52, 0x96, 0xe1, 0x22, 0xa5, 0x29,
0x2e, 0x52, 0x1b, 0x2d, 0x2e, 0x52, 0x1b, 0x29,
0x2e, 0x12, 0x1b, 0x29, 0x6a, 0xb1, 0x91, 0xb6,
0x62, 0xb1, 0x81, 0x36, 0x62, 0x19, 0xb2, 0x62,
0x98, 0x21, 0x2b, 0x84, 0x11, 0x2b, 0x84, 0x2a,
0xb4, 0x42, 0xaa, 0x42, 0x2b, 0xa4, 0x22, 0x29,
0xaa, 0x42, 0xa8, 0x2e, 0x42, 0xcf, 0xe4, 0x0b,
0x48, 0x19, 0x86, 0x94, 0x21, 0x42, 0x19, 0x32,
0x42, 0x19, 0x32, 0x42, 0x19, 0xb2, 0x42, 0x98,
0x21, 0x2b, 0xa4, 0x11, 0x2b, 0xa4, 0x22, 0x2f,
0x14, 0x28, 0xf2, 0x42, 0x81, 0x22, 0x2d, 0x81,
0x21, 0x2d, 0x81, 0x2e, 0x12, 0x1c, 0xe8, 0x22,
0xcd, 0x81, 0x2c, 0x64, 0x18, 0x26, 0x62, 0x18,
0x3c, 0x64, 0x18, 0x2c, 0x34, 0x81, 0x24, 0x1b,
0x48, 0x24, 0x1b, 0x48, 0x30, 0x81, 0x21, 0x13,
0x38, 0x42, 0x11, 0x2b, 0x84, 0x11, 0x2b, 0xa4,
0x11, 0x29, 0x0a, 0x29, 0x08, 0x2b, 0x84, 0x90,
0x82, 0x29, 0x94, 0x82, 0x2c, 0xf4, 0xc5, 0xee,
0x00, 0x82, 0x48, 0x82, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x02, 0x18,
0x80, 0x08, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00,
0x00, 0x10, 0x02, 0xdf, 0x67, 0x03, 0x00, 0x12,
0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
0x28, 0x28, 0x00, 0x00, 0xa8, 0x20, 0x46, 0x22,
0x02, 0x28, 0x20, 0x01, 0x88, 0x00, 0x00, 0x18,
0x20, 0x84, 0x02, 0x00, 0x00, 0x00, 0x88, 0x20,
0x08, 0xc2, 0x20, 0x0c, 0x00, 0x9f, 0x8e, 0x0b,
0x28, 0x8a, 0x02, 0x89, 0x01, 0x81, 0x12, 0x1a,
0x02, 0x18, 0x38, 0x28, 0x00, 0x30, 0xa8, 0x42,
0x30, 0x48, 0x2a, 0xa4, 0x24, 0x2a, 0x24, 0x04,
0x42, 0x00, 0x42, 0x00, 0x80, 0x84, 0x04, 0x42,
0x00, 0x80, 0x02, 0x81, 0x48, 0x18, 0x22, 0x18,
0x48, 0x80, 0x88, 0x01, 0x8b, 0x24, 0x22, 0x81,
0x28, 0x00, 0x48, 0x1c, 0x02, 0x5f, 0xac, 0x0b,
0x28, 0xc2, 0x20, 0x01, 0x22, 0x20, 0x03, 0x18,
0x38, 0x28, 0x22, 0x00, 0x8b, 0x82, 0x90, 0x28,
0x42, 0x4a, 0x42, 0x22, 0x04, 0x9a, 0x02, 0xc2,
0x00, 0x20, 0x02, 0x1b, 0x14, 0x48, 0x88, 0x00,
0x42, 0x80, 0x02, 0x83, 0x04, 0x18, 0x00, 0x42,
0xa0, 0x82, 0x12, 0x82, 0x83, 0xa2, 0x82, 0x81,
0xc8, 0x60, 0x28, 0x48, 0x28, 0xf0, 0x9d, 0xce,
0x00, 0x28, 0x18, 0x84, 0x40, 0x88, 0x01, 0x00,
0x00, 0x00, 0x00, 0x42, 0x90, 0x28, 0xa0, 0x24,
0x22, 0x42, 0x20, 0x24, 0x02, 0x2b, 0x42, 0x00,
0x00, 0x00, 0x42, 0x00, 0x20, 0x01, 0x20, 0x06,
0x22, 0x12, 0x00, 0x00, 0x80, 0x04, 0x80, 0x02,
0x42, 0x00, 0x30, 0xc5, 0x80, 0x21, 0x21, 0x02,
0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x00,
0x48, 0x00, 0x10, 0x21, 0x84, 0x04, 0x11, 0x20,
0x02, 0x00, 0x00, 0x80, 0x02, 0x00, 0x48, 0x80,
0x04, 0x28, 0x00, 0x42, 0x40, 0x01, 0x00, 0x00,
0x00, 0x00, 0x6f, 0x83, 0x08, 0x28, 0x22, 0x00,
0x22, 0x12, 0x28, 0x46, 0xa8, 0x12, 0x20, 0x02,
0x18, 0x00, 0xa0, 0x21, 0x84, 0x28, 0x90, 0x42,
0x00, 0x10, 0x88, 0xa2, 0x24, 0xa0, 0x42, 0x20,
0x82, 0x84, 0x08, 0x82, 0x48, 0x00, 0x00, 0x00,
0x12, 0x20, 0x88, 0xac, 0x41, 0x11, 0x00, 0xaa,
0x04, 0x4a, 0x02, 0x80, 0x84, 0xa2, 0x84, 0x82,
0xf3, 0x08, 0xa0, 0x21, 0x00, 0x80, 0x01, 0x46,
0x88, 0x01, 0x00, 0x18, 0x00, 0x80, 0x03, 0x28,
0x48, 0x48, 0x00, 0x11, 0x48, 0x80, 0x02, 0x42,
0x20, 0x02, 0x00, 0x82, 0x80, 0x02, 0x00, 0x42,
0xa0, 0x14, 0x20, 0x88, 0x88, 0x24, 0x04, 0x11,
0x8a, 0x04, 0x22, 0x00, 0x00, 0x42, 0xf0, 0x54,
0x42, 0xa0, 0x12, 0x80, 0x02, 0x28, 0x20, 0x02,
0x28, 0x48, 0x28, 0x00, 0x00, 0x00, 0x81, 0x00,
0x21, 0x00, 0x10, 0xa8, 0x42, 0x42, 0x11, 0x28,
0x28, 0x80, 0x84, 0x08, 0x80, 0x04, 0x00, 0x00,
0x00, 0x80, 0x22, 0x24, 0x41, 0x01, 0x20, 0x02,
0x42, 0x00, 0x48, 0x22, 0x82, 0x82, 0xff, 0xef,
0x0b, 0x48, 0x42, 0x28, 0x90, 0x44, 0x81, 0x22,
0x49, 0x88, 0x24, 0x04, 0x80, 0x03, 0x00, 0x28,
0x00, 0x10, 0x88, 0x01, 0x00, 0x84, 0x00, 0x22,
0x28, 0x10, 0x01, 0x80, 0x04, 0x42, 0x10, 0x08,
0x00, 0x00, 0xc0, 0x28, 0x20, 0x04, 0x81, 0x00,
0x12, 0x18, 0x42, 0x00, 0x12, 0x12, 0x4f, 0x85,
0x0a, 0x20, 0x44, 0x08, 0x80, 0x01, 0x28, 0x80,
0x01, 0x46, 0x88, 0xc2, 0x48, 0x20, 0x42, 0x84,
0x81, 0x02, 0x32, 0x10, 0x21, 0x68, 0x41, 0x00,
0x10, 0xa8, 0x41, 0x82, 0x19, 0xe5, 0x84, 0x81,
0x9a, 0x18, 0xa0, 0x24, 0x16, 0x08, 0x22, 0x18,
0x00, 0x80, 0x02, 0x80, 0x28, 0x02, 0x20, 0x02,
0x22, 0x80, 0x08, 0x48, 0x12, 0x3e, 0x63, 0x00,
0x28, 0xc0, 0x28, 0x00, 0xa0, 0x18, 0x00, 0x12,
0x20, 0x04, 0x10, 0x04, 0x00, 0x32, 0x80, 0x08,
0x80, 0x02, 0x20, 0x04, 0x80, 0x24, 0x02, 0x00,
0x00, 0x80, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
0x4a, 0x01, 0x22, 0x20, 0x21, 0x01, 0x80, 0xf2,
0x17, 0xd4, 0x20, 0x04, 0x8c, 0x22, 0x42, 0x84,
0x01, 0x26, 0x04, 0x42, 0x18, 0x20, 0x95, 0x48,
0x90, 0x24, 0x26, 0x04, 0x28, 0x1a, 0x32, 0x18,
0x88, 0x20, 0xc8, 0x24, 0x84, 0x00, 0x81, 0x4a,
0x22, 0x28, 0x23, 0x84, 0x82, 0x01, 0x22, 0x83,
0x41, 0x08, 0x18, 0x00, 0x20, 0x62, 0x82, 0x20,
0x04, 0x84, 0x52, 0x28, 0x32, 0x18, 0x4a, 0x21,
0x01, 0x58, 0x22, 0xdf, 0xf7, 0x08, 0x80, 0x02,
0x84, 0x42, 0x84, 0x22, 0x12, 0x42, 0x12, 0xc0,
0x48, 0x00, 0x00, 0x20, 0x01, 0x80, 0x22, 0x41,
0x01, 0x00, 0x80, 0x84, 0x82, 0x21, 0x84, 0x34,
0x18, 0x88, 0x42, 0x00, 0x20, 0x28, 0x02, 0x00,
0x00, 0x00, 0x88, 0x00, 0x00, 0x80, 0x02, 0x88,
0x00, 0x70, 0xbc, 0x01, 0x42, 0x00, 0x4a, 0x02,
0x83, 0x04, 0x48, 0x20, 0x02, 0x20, 0x04, 0x20,
0x84, 0x22, 0x02, 0x22, 0x00, 0x00, 0x80, 0x01,
0x00, 0x28, 0x42, 0x00, 0x11, 0x00, 0x00, 0x42,
0x00, 0x00, 0x80, 0x08, 0x00, 0x00, 0x80, 0x08,
0x12, 0x88, 0x00, 0x48, 0xf0, 0x1a, 0x45, 0x00,
0x81, 0x00, 0x81, 0x82, 0x20, 0x01, 0x80, 0xa4,
0x41, 0x00, 0x42, 0x12, 0x89, 0x04, 0x26, 0x08,
0x22, 0x48, 0x80, 0x04, 0x00, 0x20, 0x04, 0xb0,
0x21, 0x04, 0x00, 0x22, 0x00, 0x20, 0x02, 0x00,
0x80, 0x24, 0x04, 0x00, 0x00, 0x00, 0x00, 0x88,
0x00, 0x42, 0x5f, 0x16, 0x01, 0x10, 0x08, 0xa0,
0x84, 0x2a, 0x84, 0x02, 0x00, 0x00, 0x00, 0x80,
0x84, 0x02, 0x40, 0x88, 0x04, 0x00, 0x48, 0x42,
0x00, 0x20, 0x84, 0x04, 0x20, 0x84, 0x24, 0x04,
0x00, 0x00, 0x48, 0x80, 0x04, 0x00, 0x00, 0x00,
0x00, 0x80, 0x08, 0x00, 0xf0, 0xe1, 0x69, 0x00,
0x80, 0x05, 0x10, 0x88, 0x24, 0x02, 0x00, 0x00,
0x00, 0x22, 0x10, 0x68, 0x82, 0x00, 0x28, 0x42,
0x00, 0x00, 0x18, 0x00, 0x00, 0x14, 0x18, 0x00,
0x80, 0x01, 0x00, 0x00, 0x80, 0x88, 0x08, 0x00,
0x20, 0x88, 0x82, 0x01, 0x00, 0x80, 0x02, 0xdf,
0x3f, 0x0f, 0x82, 0x48, 0x80, 0x44, 0x28, 0x02,
0x00, 0x22, 0x00, 0x00, 0x22, 0x10, 0x88, 0x02,
0x00, 0x4a, 0x22, 0x02, 0x00, 0x80, 0x04, 0x00,
0x00, 0x14, 0x81, 0x00, 0x20, 0x04, 0x20, 0x04,
0x00, 0x00, 0x00, 0x28, 0x00, 0x80, 0x08, 0x00,
0x8a, 0x64, 0x11, 0xef, 0x7a, 0x0d, 0x84, 0x80,
0x06, 0x2a, 0x04, 0x58, 0x80, 0x02, 0x48, 0x80,
0x82, 0x82, 0x24, 0x92, 0x41, 0x00, 0x81, 0x22,
0x00, 0x00, 0x10, 0x01, 0x14, 0x20, 0x02, 0x00,
0xc0, 0x48, 0x48, 0x48, 0x00, 0x80, 0x01, 0x00,
0x82, 0x00, 0x00, 0x00, 0x00, 0x20, 0x08, 0x80,
0xf4, 0x4c, 0xb9, 0x00, 0x80, 0x04, 0x12, 0x00,
0x68, 0x80, 0x01, 0x48, 0x80, 0x01, 0x00, 0x52,
0x11, 0x32, 0x20, 0x01, 0x00, 0x80, 0x02, 0x42,
0x68, 0x00, 0x1c, 0x84, 0x06, 0x40, 0x81, 0x02,
0x12, 0x20, 0x42, 0xa1, 0x42, 0x42, 0x20, 0x02,
0x28, 0x00, 0x82, 0x00, 0x00, 0x00, 0xf0, 0xa6,
0x53, 0x00, 0x80, 0x02, 0x28, 0x20, 0x02, 0x00,
0x00, 0x00, 0x00, 0x10, 0x88, 0x04, 0x42, 0x00,
0x48, 0x20, 0x86, 0x04, 0x00, 0x13, 0x02, 0x00,
0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x88,
0x11, 0x00, 0x00, 0x12, 0x00, 0x00, 0xf0, 0xb7,
0x18, 0xc0, 0x18, 0x80, 0x84, 0x02, 0x00, 0xa0,
0x24, 0x00, 0x44, 0x80, 0x22, 0x02, 0x80, 0x04,
0x00, 0x90, 0x22, 0x80, 0x05, 0x2a, 0x08, 0x80,
0x01, 0x18, 0x1c, 0x04, 0xc0, 0x18, 0x81, 0x48,
0x00, 0x00, 0x00, 0x00, 0x44, 0x80, 0x82, 0x28,
0x08, 0x18, 0x28, 0x80, 0x02, 0x21, 0xe0, 0xec,
0x08, 0x18, 0x82, 0x1a, 0x82, 0xa2, 0x21, 0x6a,
0x26, 0x22, 0xa1, 0x22, 0x28, 0x20, 0x04, 0x00,
0x48, 0x89, 0xc6, 0x78, 0x85, 0x09, 0x6a, 0x02,
0x22, 0x4a, 0x24, 0x04, 0x26, 0x81, 0xa4, 0x44,
0xe0, 0x16, 0x66, 0x12, 0x00, 0x48, 0x18, 0x20,
0x81, 0x24, 0x01, 0x4a, 0x02, 0x20, 0x88, 0x04,
0x10, 0xa1, 0x82, 0x88, 0x82, 0x20, 0x21, 0x08,
0xc0, 0x81, 0xf0, 0x7f, 0xa3, 0x20, 0x04, 0x22,
0x62, 0x66, 0x18, 0x88, 0xa2, 0x26, 0xa0, 0x12,
0x42, 0x1a, 0xa4, 0x42, 0xa0, 0x64, 0x4a, 0x62,
0x84, 0x83, 0x84, 0xd2, 0x88, 0x03, 0x62, 0x48,
0x00, 0x48, 0x00, 0x14, 0x6a, 0x02, 0x4a, 0xa1,
0x44, 0x1b, 0x25, 0x81, 0x2a, 0x34, 0x41, 0x20,
0x04, 0x80, 0x04, 0x68, 0xc8, 0x88, 0x00, 0x00,
0x82, 0x80, 0x01, 0x88, 0xa8, 0xa0, 0x42, 0x1a,
0xf4, 0xea, 0x6b, 0x00, 0x87, 0x84, 0x80, 0x94,
0x48, 0x84, 0x5a, 0x84, 0x24, 0x04, 0x48, 0x00,
0x18, 0x22, 0x32, 0x26, 0x21, 0x22, 0x26, 0x82,
0x84, 0x87, 0x02, 0x48, 0x6a, 0xa1, 0x24, 0x12,
0x80, 0x05, 0x00, 0x1c, 0x04, 0x42, 0x84, 0x28,
0x20, 0x02, 0x12, 0x19, 0x24, 0x24, 0x24, 0x88,
0x82, 0x08, 0x00, 0x2a, 0x28, 0x81, 0x0b, 0x82,
0x20, 0x24, 0xf4, 0x7e, 0x3f, 0x20, 0x01, 0x12,
0x22, 0x1e, 0x48, 0x20, 0x81, 0x01, 0x2a, 0x01,
0x18, 0x80, 0x81, 0x84, 0x41, 0x88, 0x01, 0x89,
0x03, 0x4a, 0x01, 0x42, 0x20, 0x04, 0x12, 0xa0,
0x21, 0xa0, 0x25, 0xa0, 0x21, 0xa0, 0x25, 0xa0,
0x21, 0xa0, 0x21, 0x80, 0x02, 0x28, 0xa0, 0x28,
0x00, 0x00, 0x20, 0x02, 0x32, 0x20, 0x0a, 0x22,
0xf0, 0x3d, 0xdc, 0x80, 0xa1, 0x11, 0xa0, 0x33,
0x8b, 0x39, 0xda, 0x81, 0x84, 0xa1, 0x75, 0x1a,
0xa3, 0x11, 0x4a, 0xa1, 0x11, 0x1a, 0xa1, 0x51,
0x18, 0x9f, 0x91, 0xa3, 0x11, 0x9f, 0x15, 0x47,
0xa8, 0x13, 0x1a, 0xa5, 0x11, 0x00, 0x58, 0x1f,
0x17, 0xa7, 0x51, 0x1f, 0x11, 0xa1, 0x41, 0x1d,
0x71, 0x78, 0x3a, 0xa3, 0x62, 0x2a, 0xa3, 0x74,
0x1f, 0x13, 0xa3, 0x22, 0x3a, 0xa3, 0x31, 0x2a,
0xa2, 0x33, 0x1f, 0x12, 0xa2, 0x44, 0x2a, 0xaa,
0x22, 0xa0, 0x88, 0x15, 0xa1, 0xa8, 0x2a, 0xa2,
0xaa, 0x2a, 0xa2, 0x9a, 0xa8, 0x28, 0x2a, 0xa2,
0x88, 0x28, 0x5b, 0xdb, 0x80, 0xa1, 0x59, 0x1a,
0x21, 0x32, 0x68, 0x8b, 0x1d, 0x1a, 0x85, 0xa1,
0x55, 0x28, 0x4f, 0x44, 0x84, 0xe1, 0x41, 0x03,
0x4a, 0x84, 0xf1, 0x39, 0x11, 0x4a, 0xf6, 0x41,
0x41, 0x3a, 0xe3, 0x21, 0xb1, 0x42, 0xa4, 0x44,
0x2b, 0x11, 0x48, 0x8a, 0xfd, 0x61, 0x41, 0xc8,
0x1f, 0x15, 0xa5, 0x63, 0x1d, 0x11, 0x1c, 0xa3,
0x77, 0x1a, 0xd5, 0x88, 0x81, 0xf3, 0x31, 0x71,
0x1a, 0x01, 0x28, 0x3a, 0x03, 0x15, 0xa1, 0x26,
0x6a, 0xfa, 0x24, 0xa4, 0xe0, 0x4a, 0x5a, 0x11,
0x8a, 0x8a, 0x88, 0xa8, 0x22, 0xba, 0x89, 0xca,
0xa2, 0x2b, 0x22, 0xaa, 0x9a, 0x32, 0x17, 0x11,
0x20, 0x81, 0xa4, 0x11, 0x2a, 0xd2, 0x88, 0xe4,
0x84, 0xa2, 0x15, 0x52, 0x4a, 0x87, 0x42, 0x24,
0x85, 0x03, 0x48, 0x5a, 0xf2, 0x49, 0x59, 0x42,
0x1f, 0x16, 0xa4, 0x33, 0x6a, 0x94, 0x42, 0xa0,
0x54, 0x42, 0x4a, 0xfc, 0x61, 0x61, 0x48, 0x1f,
0x11, 0xa4, 0x72, 0x1d, 0x61, 0x3e, 0x41, 0x68,
0x1a, 0x45, 0xa8, 0x47, 0x1d, 0x61, 0x1a, 0x01,
0x22, 0x28, 0x5a, 0x75, 0x41, 0xa1, 0x26, 0x4a,
0x68, 0x48, 0x2a, 0xa2, 0xa8, 0x15, 0xa1, 0x88,
0x00, 0x3a, 0xa1, 0xb8, 0x88, 0xa2, 0x21, 0xaa,
0x8a, 0xf1, 0x5d, 0x85, 0x20, 0xa1, 0x19, 0x2a,
0x22, 0xb2, 0xd8, 0xb5, 0x78, 0xa1, 0x44, 0x5a,
0xa6, 0x56, 0x3a, 0xe3, 0x44, 0xa4, 0x45, 0x49,
0xa1, 0x11, 0x4a, 0x24, 0xf7, 0x49, 0x51, 0x8f,
0x87, 0xf1, 0x49, 0x41, 0x2e, 0x28, 0x1a, 0xb1,
0x72, 0xe5, 0x24, 0xa4, 0x54, 0x48, 0x1a, 0xfc,
0x61, 0x41, 0x9a, 0xf5, 0x11, 0x41, 0x2a, 0xf7,
0x41, 0x41, 0x7a, 0xa4, 0x71, 0x2a, 0xe6, 0x84,
0xa4, 0x47, 0x1f, 0x11, 0xa3, 0x22, 0xa0, 0x13,
0x1a, 0xa3, 0x66, 0x17, 0x14, 0x42, 0x6a, 0xea,
0x48, 0xa8, 0x22, 0x4b, 0xa8, 0x15, 0xa1, 0x8a,
0x8a, 0xa8, 0xaa, 0x22, 0x9a, 0x8b, 0xa8, 0x8a,
0x2b, 0x22, 0x8e, 0x82, 0x48, 0x2f, 0x7b, 0x07,
0x00, 0x22, 0x20, 0x82, 0x24, 0x02, 0x22, 0x00,
0x00, 0x00, 0x48, 0x28, 0x80, 0x02, 0x42, 0x80,
0x02, 0x42, 0x20, 0x04, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00,
0x00, 0x20, 0x08, 0x20, 0x04, 0x4f, 0xe8, 0x0a,
0x18, 0x80, 0x01, 0x89, 0x01, 0x18, 0x12, 0x20,
0x01, 0x12, 0x20, 0x01, 0x12, 0x81, 0x12, 0x60,
0x81, 0x28, 0x12, 0x80, 0x04, 0x22, 0x80, 0x25,
0x84, 0x81, 0xa2, 0x52, 0x42, 0x2a, 0x01, 0x2a,
0x05, 0x2a, 0x01, 0x2a, 0x01, 0x2a, 0x81, 0x04,
0x68, 0x80, 0x02, 0x00, 0x80, 0x22, 0x03, 0x80,
0x22, 0x02, 0x14, 0x6f, 0xaf, 0x09, 0x2c, 0xf4,
0x11, 0x24, 0x87, 0x22, 0x1f, 0x41, 0x32, 0x48,
0x1f, 0xc1, 0x36, 0x4a, 0x1d, 0x24, 0xab, 0x16,
0x1d, 0x24, 0xab, 0x94, 0x19, 0xb2, 0x4a, 0x99,
0x45, 0xab, 0x94, 0x4b, 0x42, 0xaf, 0x14, 0x79,
0x24, 0xf8, 0x4a, 0x91, 0x47, 0x82, 0x2f, 0x14,
0xfb, 0x24, 0x48, 0x4e, 0x91, 0x4f, 0xa2, 0xe4,
0x14, 0xf8, 0x24, 0x4a, 0x16, 0xf1, 0x24, 0x4a,
0x96, 0xe1, 0xa2, 0xe4, 0x5d, 0xc2, 0x4a, 0x9e,
0x24, 0xac, 0xf4, 0xd1, 0x24, 0x2c, 0xf4, 0x91,
0x24, 0x85, 0xf2, 0x91, 0x24, 0x83, 0xf4, 0x91,
0x24, 0xa3, 0xf4, 0x81, 0x24, 0xab, 0x14, 0x1f,
0x48, 0xb2, 0x4a, 0x99, 0x61, 0xab, 0x94, 0x51,
0xab, 0x94, 0x43, 0xb2, 0x4a, 0x39, 0x34, 0x2b,
0x94, 0x47, 0x8a, 0x29, 0xf9, 0x24, 0x48, 0x98,
0x4f, 0xaa, 0xf4, 0x37, 0x68, 0xc0, 0x42, 0x1d,
0x6c, 0x85, 0xd2, 0x41, 0x36, 0x48, 0x1d, 0x24,
0xa1, 0x1d, 0x64, 0xa3, 0xd4, 0x41, 0xd2, 0x4a,
0xd8, 0x41, 0xb6, 0x4a, 0x1a, 0xb5, 0x4a, 0x3a,
0x25, 0x29, 0xb8, 0x25, 0xb4, 0x42, 0x18, 0xd4,
0x12, 0x78, 0x26, 0xd8, 0x12, 0xf8, 0x24, 0x5a,
0x1c, 0xf8, 0x24, 0x9a, 0x1c, 0xf8, 0x24, 0x4a,
0x86, 0xc1, 0x4a, 0x86, 0xc5, 0x4b, 0x86, 0xc4,
0x4b, 0x17, 0xc8, 0x2c, 0xe4, 0xc8, 0x54, 0x38,
0x1f, 0x48, 0x34, 0x48, 0x17, 0x48, 0xa3, 0x64,
0x48, 0xaf, 0x14, 0x51, 0x41, 0xad, 0x94, 0x15,
0xb4, 0x4a, 0x1b, 0xb5, 0x4a, 0x3b, 0x84, 0xab,
0x14, 0x41, 0x2b, 0x94, 0x45, 0x98, 0x92, 0x6d,
0x48, 0x29, 0xd9, 0xa4, 0xf5, 0x75, 0xb2, 0x00,
0x82, 0x00, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00,
0x00, 0x00, 0x00, 0x10, 0x02, 0x18, 0x80, 0x08,
0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x40, 0x04, 0x28, 0x00, 0x00, 0x00, 0x00,
0x21, 0xf0, 0x7b, 0x5b, 0x80, 0x21, 0x02, 0x00,
0x81, 0x16, 0x98, 0x18, 0x44, 0x00, 0x00, 0x00,
0x30, 0x84, 0x1d, 0x18, 0x45, 0x28, 0xd4, 0x84,
0x82, 0x02, 0x83, 0x22, 0x02, 0x80, 0x26, 0x42,
0x44, 0x89, 0x21, 0x24, 0x01, 0x32, 0x00, 0x80,
0x22, 0x04, 0x80, 0x84, 0x84, 0x08, 0x4a, 0x21,
0x04, 0x00, 0x20, 0x82, 0x21, 0x82, 0x04, 0xf0,
0x71, 0xee, 0x60, 0x44, 0x82, 0x36, 0x04, 0x1c,
0x84, 0x82, 0xa4, 0x28, 0x62, 0x22, 0x2a, 0x34,
0x28, 0x13, 0x04, 0x85, 0x02, 0x20, 0x82, 0x02,
0x20, 0x74, 0x28, 0x24, 0x04, 0x4a, 0x32, 0x28,
0x12, 0x81, 0xe0, 0x24, 0x22, 0x42, 0x08, 0x00,
0x00, 0x28, 0x48, 0x00, 0x83, 0x91, 0x88, 0xa3,
0x22, 0x41, 0x41, 0x22, 0x41, 0x46, 0xe8, 0x4a,
0x04, 0x8a, 0x84, 0x24, 0x0c, 0xe6, 0x81, 0xf4,
0x4f, 0xbd, 0x60, 0x41, 0xca, 0xc2, 0x14, 0x80,
0x64, 0x82, 0x1e, 0x48, 0xa6, 0x38, 0x44, 0x90,
0x44, 0x28, 0x22, 0x00, 0x80, 0x78, 0x18, 0x61,
0x42, 0x48, 0x87, 0x62, 0x28, 0xa0, 0x41, 0x20,
0x2c, 0xa2, 0x16, 0x28, 0x44, 0x26, 0x33, 0x21,
0x89, 0x04, 0x81, 0x20, 0x04, 0x20, 0x24, 0x04,
0x84, 0x84, 0xa3, 0x14, 0x04, 0x62, 0x10, 0x14,
0x28, 0x02, 0x8a, 0x84, 0x61, 0x2c, 0x42, 0x8a,
0xa2, 0x41, 0x1f, 0x77, 0x0a, 0x48, 0x20, 0x02,
0x14, 0x00, 0x12, 0x22, 0x28, 0x22, 0x84, 0x46,
0x01, 0x85, 0x02, 0x44, 0x22, 0x81, 0x00, 0x48,
0x8d, 0x24, 0x26, 0x88, 0x22, 0x12, 0x08, 0x81,
0x30, 0x48, 0x18, 0x80, 0x01, 0x2a, 0x01, 0x80,
0x22, 0x02, 0x20, 0xa1, 0x84, 0x28, 0x98, 0x11,
0x2c, 0xa1, 0x41, 0x24, 0xe0, 0x44, 0x08, 0x28,
0x48, 0x28, 0x20, 0x04, 0x5f, 0x81, 0x05, 0x00,
0x00, 0x18, 0x00, 0x84, 0x42, 0x13, 0x01, 0x00,
0x80, 0x11, 0x04, 0x12, 0x81, 0x32, 0x20, 0x21,
0x84, 0x04, 0x00, 0x00, 0x48, 0x80, 0x21, 0x21,
0x02, 0x00, 0x00, 0x18, 0x48, 0x83, 0x22, 0x21,
0xc2, 0x48, 0x18, 0x48, 0x00, 0x00, 0x28, 0x84,
0x00, 0x28, 0x12, 0x28, 0x48, 0x4f, 0xc5, 0x07,
0x62, 0xe0, 0x89, 0x22, 0x82, 0xc6, 0x28, 0x1a,
0x82, 0xc3, 0x1c, 0x26, 0x88, 0x88, 0x01, 0x84,
0x14, 0x89, 0xe1, 0x88, 0x12, 0x88, 0x02, 0x46,
0x88, 0x86, 0x02, 0x84, 0x84, 0x81, 0x42, 0x20,
0xc1, 0x68, 0x4a, 0xb2, 0x28, 0x28, 0x85, 0x88,
0x32, 0x32, 0x32, 0x81, 0x4a, 0x12, 0xb8, 0x14,
0x14, 0x09, 0x32, 0x28, 0x12, 0x4a, 0x18, 0x81,
0x14, 0x48, 0x28, 0x82, 0x26, 0x01, 0x00, 0xf0,
0x36, 0xbf, 0x80, 0x02, 0x92, 0x28, 0x12, 0x22,
0x12, 0x8c, 0xe1, 0x44, 0xb1, 0x28, 0x21, 0x88,
0x01, 0x84, 0x18, 0x89, 0x91, 0x88, 0x18, 0x28,
0x2a, 0x31, 0x48, 0x18, 0x4a, 0x02, 0x40, 0x08,
0x00, 0x12, 0x66, 0xa8, 0x21, 0x89, 0xa1, 0x21,
0x80, 0xa2, 0x12, 0x32, 0x81, 0x1a, 0x12, 0xe8,
0x45, 0x12, 0x08, 0x2e, 0x18, 0x38, 0x18, 0x4a,
0x48, 0x01, 0xc0, 0x28, 0x22, 0x00, 0x22, 0x20,
0x02, 0x37, 0xc8, 0x80, 0x04, 0x89, 0x02, 0x2a,
0x14, 0x28, 0x82, 0x12, 0x18, 0x01, 0x00, 0x10,
0x11, 0x24, 0x12, 0x18, 0x08, 0x20, 0x06, 0x48,
0x84, 0x10, 0x88, 0x04, 0x48, 0x20, 0xa4, 0x28,
0x42, 0x82, 0x24, 0x00, 0x20, 0x84, 0x14, 0xc8,
0x11, 0x28, 0x48, 0x80, 0x04, 0x20, 0x44, 0x08,
0x84, 0x2a, 0x84, 0x01, 0x12, 0x20, 0x74, 0xac,
0x06, 0x00, 0x26, 0x14, 0x0a, 0x81, 0xb0, 0x1c,
0x1a, 0x11, 0x28, 0x3a, 0x18, 0x89, 0x42, 0xa8,
0x14, 0x22, 0x28, 0x81, 0x10, 0x88, 0x01, 0x12,
0x98, 0x40, 0x48, 0x88, 0x02, 0x29, 0x21, 0x61,
0x43, 0x46, 0xa2, 0x38, 0x81, 0x42, 0x52, 0x81,
0x1a, 0x42, 0x24, 0x01, 0x80, 0x24, 0x14, 0x18,
0xc8, 0x68, 0x80, 0x01, 0x48, 0x00, 0x2e, 0x11,
0x45, 0x68, 0x44, 0x22, 0xf2, 0x9f, 0x14, 0x04,
0x80, 0x04, 0x18, 0x41, 0x32, 0x8c, 0x01, 0x8c,
0x22, 0x14, 0x04, 0x1a, 0x02, 0x40, 0x41, 0x24,
0x24, 0x31, 0x24, 0x10, 0x02, 0x18, 0x80, 0x28,
0x21, 0x01, 0x20, 0x08, 0x10, 0x38, 0x18, 0x12,
0x42, 0x28, 0x21, 0x42, 0x46, 0x01, 0x26, 0x21,
0x22, 0x93, 0x14, 0x22, 0x38, 0x10, 0xa8, 0x82,
0x28, 0x15, 0x08, 0x00, 0x21, 0x20, 0xf1, 0x53,
0xf4, 0x24, 0x18, 0x22, 0x00, 0x84, 0x10, 0x82,
0x08, 0x43, 0x81, 0x81, 0x02, 0x40, 0x8c, 0x08,
0x10, 0x28, 0x24, 0xc2, 0x88, 0x20, 0x04, 0x80,
0x04, 0x40, 0x88, 0x06, 0x00, 0x28, 0x00, 0x00,
0x00, 0x84, 0x23, 0x01, 0x00, 0x48, 0x00, 0x80,
0x01, 0x19, 0x21, 0x11, 0x21, 0x82, 0x82, 0x11,
0xf8, 0x22, 0xab, 0x80, 0x81, 0x42, 0x54, 0x82,
0x45, 0x68, 0x21, 0x81, 0x43, 0xc2, 0x21, 0x4c,
0xa1, 0x28, 0x84, 0x83, 0x41, 0xd8, 0x48, 0x64,
0x18, 0x49, 0x22, 0x94, 0x18, 0x85, 0x84, 0x12,
0x08, 0x88, 0x00, 0x56, 0x28, 0x02, 0xa1, 0xb8,
0x12, 0x42, 0xa3, 0x22, 0x83, 0x24, 0x71, 0x28,
0x82, 0x01, 0x40, 0x4a, 0xa1, 0x24, 0x00, 0x4e,
0x28, 0x56, 0x08, 0x81, 0x2a, 0xa9, 0x42, 0x18,
0x12, 0x40, 0x24, 0xa4, 0x21, 0x8b, 0x82, 0x2b,
0x18, 0x30, 0x82, 0x20, 0x22, 0x01, 0x8c, 0x82,
0x61, 0x81, 0x81, 0x8c, 0x84, 0xa1, 0x21, 0x00,
0x18, 0x22, 0x40, 0x08, 0x2a, 0x84, 0x21, 0x88,
0x81, 0x04, 0x84, 0x80, 0x01, 0x18, 0x42, 0x43,
0x02, 0x98, 0x80, 0x01, 0x80, 0x32, 0x44, 0x1b,
0x41, 0xa0, 0x21, 0xa0, 0x61, 0x89, 0x01, 0x00,
0x18, 0x00, 0x84, 0x20, 0x93, 0x28, 0x43, 0x02,
0x48, 0x57, 0xcb, 0x00, 0x00, 0x28, 0x00, 0x16,
0x18, 0x08, 0x40, 0x24, 0x11, 0x41, 0x88, 0x02,
0x84, 0x80, 0x92, 0x18, 0x22, 0x12, 0x22, 0x00,
0x00, 0x00, 0x00, 0x80, 0x01, 0x20, 0x07, 0x26,
0x48, 0x18, 0x08, 0x12, 0x81, 0x83, 0x03, 0x28,
0x00, 0x81, 0x48, 0x00, 0x00, 0x00, 0x40, 0x01,
0x9f, 0xcd, 0x0c, 0x12, 0x10, 0x04, 0x85, 0x82,
0x02, 0x12, 0x24, 0x8a, 0x21, 0x82, 0x52, 0x24,
0x82, 0x00, 0x20, 0x48, 0x28, 0x12, 0x88, 0x14,
0x48, 0x48, 0x28, 0x01, 0x00, 0x43, 0x01, 0x00,
0x41, 0x00, 0x10, 0x84, 0x64, 0x24, 0x81, 0x28,
0x60, 0x24, 0x8a, 0x01, 0x60, 0x24, 0x82, 0x00,
0xa0, 0x58, 0x81, 0x80, 0x01, 0x83, 0x82, 0xf4,
0x2e, 0x5b, 0x20, 0x08, 0x18, 0x48, 0x12, 0x00,
0x30, 0x28, 0x10, 0x08, 0x00, 0x22, 0x00, 0x00,
0x80, 0x85, 0xa2, 0x12, 0x12, 0x40, 0x28, 0x21,
0x08, 0x89, 0x01, 0x00, 0x00, 0x40, 0xa8, 0x12,
0x00, 0x42, 0x42, 0x00, 0x42, 0x00, 0x44, 0x81,
0x28, 0x18, 0x20, 0x02, 0x12, 0x22, 0x42, 0x00,
0x3b, 0x57, 0x50, 0x92, 0x12, 0x81, 0x81, 0x28,
0x48, 0x14, 0x80, 0xc1, 0x28, 0x14, 0x48, 0x81,
0x89, 0x42, 0x84, 0x04, 0x22, 0x26, 0x08, 0x26,
0x44, 0x48, 0x82, 0x44, 0xb4, 0x12, 0x04, 0x8c,
0x05, 0xc8, 0x10, 0x02, 0x18, 0xf0, 0x12, 0x88,
0x28, 0x48, 0x81, 0x88, 0x83, 0x41, 0x08, 0x90,
0x18, 0x18, 0x40, 0x88, 0x42, 0x04, 0x12, 0xa0,
0x12, 0x22, 0x4c, 0x04, 0x24, 0xf0, 0xef, 0xba,
0x20, 0x11, 0x18, 0x08, 0x00, 0x20, 0x01, 0x00,
0x12, 0x83, 0x82, 0x01, 0x00, 0x00, 0x81, 0x80,
0x02, 0x00, 0x84, 0x00, 0x00, 0x20, 0x83, 0x04,
0xa0, 0x24, 0x00, 0x48, 0x18, 0x10, 0x48, 0x08,
0x80, 0x01, 0x89, 0x02, 0x48, 0x80, 0x82, 0x21,
0x01, 0x00, 0x62, 0x70, 0xfa, 0x01, 0x84, 0x80,
0x02, 0x21, 0x80, 0x01, 0x80, 0x61, 0x82, 0x00,
0x28, 0x80, 0x01, 0x18, 0xa0, 0x41, 0x81, 0x80,
0x84, 0x14, 0x88, 0x04, 0x48, 0xc4, 0x00, 0x42,
0x80, 0x02, 0x84, 0x10, 0x08, 0x2b, 0x24, 0xa0,
0x34, 0xa0, 0x86, 0x60, 0x44, 0x00, 0x4a, 0x82,
0x01, 0x12, 0x00, 0x00, 0x48, 0x00, 0x7f, 0xfa,
0x04, 0xc4, 0x24, 0x48, 0x30, 0x84, 0x88, 0x41,
0xa1, 0x81, 0x41, 0x90, 0x8a, 0x11, 0x28, 0x24,
0x88, 0x24, 0x42, 0x60, 0x28, 0x20, 0x59, 0x82,
0x84, 0xc2, 0xb0, 0x44, 0x18, 0x28, 0x04, 0x48,
0x44, 0x00, 0x42, 0xc4, 0x24, 0x48, 0x10, 0x04,
0x43, 0x38, 0x12, 0x43, 0x01, 0xd0, 0x42, 0x08,
0x28, 0x24, 0xc8, 0x2c, 0x24, 0xc4, 0x42, 0x8a,
0x64, 0x81, 0x82, 0x21, 0x82, 0x9f, 0x52, 0x07,
0x60, 0x88, 0x12, 0x89, 0x82, 0x81, 0x12, 0x08,
0x22, 0x00, 0x28, 0x80, 0x01, 0x18, 0x20, 0x02,
0x22, 0x30, 0x48, 0x00, 0x00, 0x00, 0x90, 0x48,
0x80, 0x23, 0x84, 0x43, 0x08, 0x81, 0x12, 0x80,
0x01, 0x20, 0x01, 0x00, 0x22, 0x00, 0x20, 0x01,
0x00, 0x13, 0x84, 0x02, 0x14, 0x1a, 0xf4, 0xc8,
0x2a, 0x40, 0x08, 0x1c, 0x06, 0x1c, 0x02, 0x80,
0x44, 0xe1, 0x82, 0x04, 0xc4, 0x80, 0x06, 0x40,
0x84, 0x41, 0x04, 0x48, 0x50, 0x42, 0xa0, 0x14,
0xa0, 0x84, 0x23, 0x61, 0x84, 0x21, 0x80, 0x48,
0xb1, 0x42, 0x88, 0x44, 0x08, 0xc8, 0x90, 0x28,
0x42, 0x00, 0x81, 0x46, 0x08, 0x48, 0x48, 0x4a,
0x22, 0x22, 0x64, 0x42, 0xc0, 0x25, 0x18, 0x48,
0x70, 0x42, 0x04, 0xff, 0xee, 0x48, 0x02, 0x86,
0xc2, 0x18, 0x66, 0xc8, 0x96, 0x88, 0x12, 0x12,
0x14, 0x8b, 0x1a, 0x11, 0x12, 0x97, 0x82, 0x8c,
0x84, 0x32, 0x52, 0xa0, 0x25, 0x84, 0x98, 0x8b,
0x41, 0x28, 0x2e, 0x44, 0x42, 0xc5, 0xa8, 0x51,
0x41, 0x8c, 0x44, 0xd8, 0x84, 0x84, 0x24, 0x81,
0x94, 0x22, 0x24, 0x2a, 0x57, 0xa8, 0x88, 0x81,
0xfe, 0x16, 0x83, 0xb4, 0xe8, 0xe4, 0x81, 0x11,
0x38, 0xd8, 0x4b, 0x14, 0x10, 0x48, 0xa8, 0x16,
0x29, 0xa1, 0x13, 0x38, 0x81, 0x1e, 0xa1, 0x4a,
0x21, 0xc4, 0x45, 0xf0, 0xbb, 0x48, 0x20, 0x61,
0x88, 0x81, 0x89, 0x62, 0x92, 0x2a, 0x52, 0x49,
0x21, 0x2e, 0x2a, 0x8c, 0xc4, 0x24, 0x8b, 0xb6,
0xb0, 0x98, 0x01, 0x18, 0x84, 0x23, 0x52, 0x48,
0x83, 0xd3, 0x84, 0xa2, 0xc3, 0xa4, 0x18, 0x4a,
0x44, 0xa8, 0x44, 0x81, 0x4a, 0xb4, 0x1a, 0x41,
0x62, 0x42, 0xb0, 0x14, 0xbd, 0x48, 0x24, 0x09,
0x8d, 0x28, 0x90, 0x28, 0x84, 0xc4, 0xa1, 0x3e,
0x32, 0x18, 0x22, 0xe8, 0x43, 0x32, 0x88, 0x28,
0x4a, 0x24, 0xb4, 0x42, 0x74, 0x21, 0x24, 0x74,
0x34, 0x88, 0xfc, 0x48, 0x23, 0x48, 0x3f, 0x7d,
0x05, 0x1d, 0x14, 0x89, 0xf1, 0x34, 0x21, 0x24,
0x1a, 0x22, 0xc4, 0x18, 0x8d, 0x58, 0x83, 0xe1,
0x41, 0x72, 0x28, 0x58, 0x82, 0x74, 0x30, 0x24,
0x88, 0x44, 0x8a, 0xa1, 0x22, 0x4e, 0x28, 0x23,
0xf6, 0x48, 0x18, 0x8b, 0x21, 0x8d, 0x48, 0x2c,
0x38, 0x48, 0x18, 0x2b, 0x1d, 0xc1, 0xc2, 0x80,
0xaf, 0x14, 0x22, 0x60, 0x44, 0x22, 0x4b, 0x13,
0x4e, 0x4a, 0x8c, 0x84, 0xa5, 0x31, 0xe0, 0xcc,
0xc4, 0x48, 0x12, 0x21, 0x4e, 0x4a, 0x4a, 0x94,
0x44, 0x1a, 0xc8, 0x24, 0x92, 0x5a, 0x93, 0x52,
0x68, 0x20, 0xa2, 0x85, 0x8f, 0xf4, 0x4f, 0x72,
0x11, 0x44, 0x72, 0x11, 0x2c, 0x72, 0x11, 0x34,
0x62, 0x17, 0xc1, 0x2b, 0x14, 0x15, 0xbc, 0x62,
0x19, 0xb1, 0x62, 0x49, 0xf8, 0x42, 0x91, 0x41,
0x2b, 0x94, 0x41, 0x2b, 0xb4, 0x41, 0xa9, 0x1b,
0x94, 0xb8, 0x41, 0x89, 0x58, 0x24, 0x81, 0x45,
0x32, 0x18, 0x45, 0x72, 0x98, 0x44, 0xe2, 0x49,
0x42, 0xe2, 0x4d, 0x42, 0xe2, 0x49, 0x42, 0xe2,
0xc9, 0x42, 0xe2, 0xc9, 0x12, 0xe2, 0x48, 0x12,
0xe2, 0xc9, 0x92, 0x82, 0x1a, 0x92, 0x82, 0x90,
0x82, 0x41, 0x29, 0xb8, 0x24, 0x94, 0x82, 0x5f,
0x83, 0x94, 0x82, 0x47, 0x83, 0x4a, 0x78, 0x24,
0xa8, 0x84, 0x5f, 0x88, 0x45, 0xf1, 0x54, 0x56,
0x6f, 0x71, 0xf1, 0x12, 0x3d, 0x5f, 0x71, 0xf1,
0x57, 0x56, 0x5f, 0x74, 0xf5, 0x51, 0x51, 0x5f,
0xf5, 0xf1, 0x17, 0x56, 0x1f, 0x31, 0xff, 0xd9,
0xc9, 0x9f, 0xa9, 0xfb, 0x9a, 0xcb, 0x5f, 0x71,
0xfd, 0xd5, 0xc5, 0x4f, 0x69, 0xf9, 0xd6, 0xd2,
0x2f, 0x65, 0xfd, 0x92, 0x8c, 0x4f, 0xed, 0xbd,
0xd2, 0xed, 0x47, 0xe7, 0x4b, 0xfb, 0xc4, 0xc6,
0xab, 0x44, 0x4f, 0x44, 0xf4, 0x56, 0x54, 0x6f,
0x65, 0xf5, 0x92, 0xd2, 0x8f, 0x69, 0xfd, 0x96,
0x96, 0x6f, 0x6b, 0xf3, 0x66, 0xf6, 0x3e, 0xb6,
0x6f, 0x6e, 0xfd, 0x76, 0x76, 0x6f, 0x43, 0xf9,
0x38, 0xb6, 0x6f, 0x6b, 0xfb, 0x7e, 0x36, 0xcf,
0x6e, 0xaf, 0xbb, 0x4f, 0xee, 0xfc, 0x2e, 0x26,
0x4f, 0x62, 0xaa, 0xc8, 0xee, 0xc2, 0x2f, 0x28,
0xd8, 0xe4, 0xfc, 0xd4, 0xd4, 0x4f, 0x6f, 0xfe,
0xa6, 0xa2, 0x2f, 0x62, 0xfb, 0xe2, 0xac, 0xdf,
0xeb, 0xfa, 0xaa, 0xb8, 0x8d, 0x6c, 0xae, 0xac,
0xcf, 0xfa, 0xfe, 0xf6, 0xaf, 0x34, 0x3f, 0x11,
0xe1, 0x15, 0xf4, 0x18, 0x37, 0xff, 0x51, 0xf6,
0x31, 0x32, 0x1e, 0x32, 0x4f, 0xe5, 0xf5, 0x57,
0x17, 0x7d, 0x56, 0x3e, 0xf2, 0xcf, 0xad, 0xff,
0x5b, 0x7b, 0xff, 0x61, 0xf7, 0x11, 0xd3, 0x1f,
0x3d, 0xfd, 0x56, 0x56, 0x69, 0xe1, 0x43, 0xe9,
0x4f, 0xff, 0x3c, 0x16, 0x6f, 0x62, 0xf7, 0xf2,
0xf4, 0xee, 0xf4, 0x6f, 0x6c, 0xfd, 0x46, 0x4e,
0x2b, 0x8c, 0x2b, 0x45, 0x6f, 0x65, 0xfd, 0x5e,
0x46, 0x5e, 0x14, 0x4f, 0x49, 0xf8, 0xf1, 0x73,
0x2f, 0x25, 0xef, 0x53, 0xfb, 0xf4, 0xbc, 0xfe,
0xf2, 0x2f, 0x23, 0xfe, 0x3a, 0xb4, 0xcf, 0x49,
0xee, 0xaf, 0xef, 0x25, 0xf7, 0x3c, 0x36, 0x6f,
0xee, 0xfe, 0xaa, 0xa2, 0x8f, 0x21, 0xff, 0x84,
0xd2, 0x2f, 0x26, 0xd4, 0x6e, 0xc2, 0x8a, 0x9e,
0xd2, 0x6f, 0x66, 0xb5, 0x26, 0xe2, 0x46, 0xe8,
0xfb, 0x7b, 0x2e, 0xfe, 0x26, 0x66, 0x2f, 0x4a,
0xee, 0xca, 0xfe, 0x2e, 0x5e, 0x47, 0x6f, 0x24,
0x3f, 0x11, 0xa1, 0x41, 0xdf, 0x81, 0x73, 0x39,
0xf6, 0x12, 0x11, 0x2b, 0x22, 0x4f, 0x65, 0xb1,
0x1b, 0xe5, 0x12, 0xf3, 0xd6, 0x34, 0x8f, 0xe2,
0xf8, 0x5b, 0x78, 0x8d, 0x29, 0x2b, 0x1d, 0x2c,
0xb8, 0x56, 0xc5, 0x14, 0xba, 0xd3, 0xa4, 0xf8,
0x72, 0x78, 0x4f, 0x44, 0xb5, 0xf2, 0xbf, 0x64,
0xa7, 0x54, 0x4f, 0x6c, 0xbc, 0x4a, 0xec, 0x25,
0xf4, 0x58, 0x5a, 0x4f, 0x41, 0xf4, 0x16, 0x58,
0x96, 0xe4, 0x33, 0xab, 0x64, 0x6b, 0x7f, 0x4e,
0x4c, 0xfa, 0xef, 0x21, 0xf4, 0xbe, 0x38, 0x1e,
0x2c, 0x8b, 0xff, 0xab, 0x74, 0x4f, 0xe7, 0xf7,
0x42, 0x48, 0x8f, 0x8a, 0xfa, 0x82, 0x28, 0x3e,
0xd6, 0x2b, 0x66, 0x8c, 0x72, 0x82, 0xe8, 0x25,
0xbd, 0x66, 0xe4, 0x47, 0xa2, 0x1e, 0xcf, 0x27,
0x7f, 0x23, 0xf8, 0x64, 0x24, 0x2b, 0xcc, 0xcb,
0x26, 0x2e, 0x58, 0x4f, 0x53, 0x4b, 0xf1, 0x14,
0x14, 0x2c, 0xf4, 0x1f, 0x32, 0xbf, 0x46, 0xf2,
0x34, 0x35, 0x2b, 0x74, 0x9f, 0x15, 0xf1, 0x15,
0x56, 0xa5, 0xf1, 0xf6, 0x34, 0x1f, 0xd7, 0xfe,
0x99, 0xbb, 0xf3, 0xf1, 0xda, 0x18, 0x4f, 0x45,
0xfc, 0x94, 0x92, 0x25, 0xb6, 0xf2, 0xf5, 0x74,
0xea, 0xef, 0xcb, 0xa9, 0x66, 0x2f, 0x85, 0xf7,
0xe4, 0xe2, 0x4f, 0xe4, 0xb4, 0xc2, 0xec, 0x84,
0xfc, 0x44, 0x46, 0xcf, 0xed, 0xe1, 0x84, 0xb4,
0xd6, 0x6d, 0x68, 0x6f, 0x77, 0xaf, 0x54, 0x7b,
0x7b, 0xee, 0xd6, 0x6f, 0x67, 0x37, 0x22, 0xcb,
0x3b, 0x8f, 0x6c, 0xf8, 0x7e, 0x7c, 0xab, 0x55,
0x8f, 0x8f, 0xff, 0xe4, 0xce, 0xef, 0x42, 0xb3,
0x9a, 0xe1, 0x42, 0xed, 0x2e, 0x5e, 0x8e, 0x27,
0x88, 0x4f, 0x45, 0xfd, 0xc4, 0xc2, 0x2f, 0x66,
0x33, 0xc2, 0xcb, 0xf7, 0x4f, 0xe9, 0xf8, 0x2a,
0x78, 0x29, 0xf6, 0xec, 0xe2, 0x4f, 0xe8, 0xfc,
0x81, 0xce, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x28, 0x90, 0x28, 0x00,
0x20, 0x04, 0x81, 0x20, 0x04, 0x00, 0x00, 0x42,
0x00, 0x40, 0x08, 0x84, 0x80, 0x04, 0x8c, 0x04,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x8d,
0xb3, 0x20, 0x08, 0x81, 0x28, 0x00, 0x81, 0x00,
0x8c, 0x22, 0x42, 0x08, 0x84, 0x00, 0x00, 0x40,
0x28, 0x04, 0x28, 0x8c, 0x14, 0x88, 0x04, 0x48,
0x40, 0x08, 0x48, 0x00, 0x42, 0x00, 0x00, 0x80,
0x24, 0x44, 0x88, 0x01, 0x2a, 0x01, 0x81, 0x48,
0x42, 0x12, 0x20, 0x01, 0x12, 0x42, 0x00, 0x48,
0xfe, 0x74, 0xd0, 0x26, 0xf4, 0x11, 0x24, 0xef,
0x22, 0xf1, 0x11, 0x2c, 0xe3, 0xf6, 0x11, 0x2c,
0xe3, 0xf4, 0x11, 0x2c, 0xeb, 0x16, 0x1d, 0x2c,
0xab, 0x96, 0x19, 0xb2, 0x4a, 0x59, 0x85, 0xaf,
0x44, 0x39, 0x24, 0xaf, 0x54, 0x79, 0x24, 0xf8,
0x4a, 0xb5, 0x47, 0x83, 0xad, 0xb5, 0x4f, 0x83,
0xd4, 0x58, 0xfb, 0x24, 0x4a, 0x8d, 0x85, 0x4f,
0xa2, 0x74, 0x18, 0xf5, 0x24, 0x5a, 0x87, 0x59,
0x4f, 0xa2, 0x64, 0x59, 0x4d, 0x4a, 0x9e, 0x24,
0x4d, 0x5a, 0x1f, 0x49, 0xf2, 0x24, 0x42, 0x1f,
0x49, 0x52, 0x2c, 0x1f, 0xc9, 0x32, 0x4c, 0x1f,
0xc9, 0xb2, 0x4e, 0xf1, 0x91, 0x24, 0xeb, 0x14,
0x1f, 0xc1, 0xb2, 0x4a, 0x99, 0x21, 0xab, 0x94,
0x51, 0xaf, 0x44, 0x39, 0x24, 0xaf, 0x44, 0x39,
0x34, 0xaf, 0x44, 0x7b, 0x34, 0xf8, 0x4a, 0xb4,
0x4f, 0x82, 0xf4, 0x48, 0x94, 0x4f, 0xa2, 0xf4,
0x66, 0x33, 0x00, 0x1e, 0x68, 0x81, 0x1a, 0x16,
0xa8, 0x21, 0x80, 0x02, 0xd0, 0x48, 0x01, 0x4c,
0x03, 0x89, 0x23, 0xd2, 0x18, 0x21, 0xc2, 0x11,
0x22, 0x14, 0x29, 0x44, 0xb1, 0x22, 0x45, 0xa1,
0xd2, 0x16, 0xa1, 0xc2, 0x16, 0xa1, 0x42, 0x16,
0xc1, 0x49, 0x1e, 0x21, 0x84, 0x1f, 0x81, 0x82,
0xf4, 0x11, 0x48, 0x81, 0x1b, 0x61, 0x42, 0x1b,
0x21, 0x83, 0x94, 0x21, 0x83, 0x94, 0x21, 0x8f,
0x44, 0x91, 0x21, 0x8f, 0x44, 0x13, 0xb1, 0x48,
0x22, 0x92, 0x18, 0x22, 0x20, 0x12, 0xb1, 0x22,
0x84, 0xb1, 0x22, 0x71, 0x75, 0x01, 0x00, 0x48,
0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00,
0x00, 0x00, 0x21, 0x00, 0x80, 0x08, 0x00, 0x00,
0x14, 0x00, 0x00, 0x48, 0x40, 0x02, 0x00, 0x00,
0x40, 0x04, 0x00, 0x40, 0x01, 0x00, 0x00, 0x25,
0x01, 0x2f, 0x57, 0x01, 0x22, 0x00, 0x18, 0x12,
0x12, 0x8b, 0x41, 0x12, 0x12, 0x4e, 0x28, 0x36,
0x08, 0x18, 0x84, 0x16, 0x38, 0x28, 0x85, 0x04,
0x16, 0x14, 0x08, 0x81, 0x1a, 0x12, 0x08, 0x28,
0x18, 0x21, 0x60, 0x12, 0x42, 0x41, 0x10, 0xa4,
0x12, 0x21, 0x2a, 0x01, 0x70, 0x14, 0xb8, 0x28,
0xd1, 0x48, 0x48, 0x18, 0x81, 0x02, 0x28, 0x19,
0x34, 0x88, 0x84, 0x8b, 0x21, 0x52, 0x28, 0x2c,
0x84, 0x24, 0x04, 0x48, 0xf0, 0xee, 0x82, 0x20,
0x21, 0x89, 0x12, 0x08, 0xa1, 0x30, 0x28, 0x84,
0x18, 0x90, 0x28, 0x81, 0x18, 0x45, 0x11, 0x02,
0x22, 0x28, 0x2a, 0xa5, 0x52, 0x10, 0x64, 0x14,
0x42, 0x21, 0xc1, 0x14, 0x48, 0x20, 0x81, 0xa2,
0x18, 0x8c, 0x24, 0x04, 0x90, 0x28, 0x1a, 0x02,
0x80, 0x81, 0x47, 0x88, 0x91, 0x11, 0x20, 0x91,
0x14, 0x24, 0x20, 0xc2, 0x11, 0x20, 0x22, 0xa2,
0x52, 0x14, 0x4a, 0xba, 0xc1, 0x07, 0xa0, 0x14,
0x28, 0x89, 0x01, 0xa1, 0x48, 0x89, 0x93, 0x18,
0x8b, 0x34, 0x4f, 0x82, 0x41, 0x68, 0x83, 0xd0,
0xa4, 0x61, 0x82, 0x45, 0x88, 0x12, 0x64, 0x84,
0x2c, 0x41, 0x28, 0xb1, 0x18, 0x84, 0x24, 0xd8,
0x24, 0x11, 0x21, 0x14, 0xa1, 0x14, 0x15, 0x24,
0x41, 0xb8, 0x18, 0x04, 0x42, 0x89, 0x82, 0x53,
0x48, 0x18, 0x83, 0x99, 0x18, 0x20, 0x31, 0x14,
0x22, 0x13, 0x92, 0x94, 0x20, 0x22, 0xa7, 0x21,
0x48, 0x21, 0x2c, 0x84, 0xc5, 0x41, 0x1a, 0xfc,
0xa3, 0x1e, 0xa0, 0x12, 0x00, 0x80, 0x21, 0x91,
0x18, 0x00, 0x00, 0x28, 0x60, 0x81, 0x14, 0x00,
0x80, 0x23, 0xa3, 0x24, 0xc0, 0x24, 0x11, 0x30,
0x22, 0x81, 0x00, 0x22, 0x20, 0x22, 0x98, 0x44,
0x28, 0x21, 0x1a, 0x02, 0x80, 0xc1, 0x28, 0x41,
0x68, 0x85, 0x81, 0x42, 0x01, 0x4a, 0x41, 0x58,
0x28, 0x16, 0x08, 0x14, 0xa0, 0x42, 0x28, 0x22,
0x20, 0x72, 0xa1, 0x0d, 0x14, 0xd0, 0x14, 0x01,
0x41, 0xc0, 0x12, 0x8c, 0x22, 0x06, 0x42, 0x40,
0x61, 0x81, 0x44, 0x84, 0x24, 0x48, 0x1c, 0x13,
0x94, 0x28, 0x41, 0x42, 0x60, 0x44, 0x61, 0x54,
0x22, 0x90, 0x42, 0x80, 0x91, 0x28, 0x48, 0x13,
0x01, 0x00, 0x20, 0x82, 0x44, 0x82, 0x04, 0x20,
0x22, 0x08, 0x40, 0x82, 0x44, 0x02, 0x00, 0x20,
0x21, 0x04, 0x4f, 0xe3, 0x02, 0x41, 0x40, 0xa8,
0x21, 0x8d, 0x31, 0x69, 0x52, 0x41, 0x50, 0x48,
0x2f, 0x81, 0x12, 0xb1, 0x22, 0x21, 0x14, 0x12,
0xa9, 0x14, 0x20, 0x62, 0xa8, 0x18, 0x49, 0x8c,
0x61, 0x82, 0x81, 0x89, 0x22, 0x46, 0x32, 0x18,
0xcb, 0x82, 0x8b, 0x12, 0x2c, 0x22, 0x06, 0x38,
0xc6, 0x82, 0x62, 0x22, 0x32, 0x24, 0x18, 0xa9,
0xa2, 0x12, 0x83, 0x21, 0xf1, 0x32, 0xc8, 0x12,
0x2b, 0x52, 0x18, 0x1a, 0x0c, 0x8c, 0x28, 0xb2,
0xc9, 0xb1, 0x18, 0xb4, 0x82, 0x65, 0x82, 0xa2,
0x83, 0x22, 0xfa, 0x73, 0x41, 0x50, 0x41, 0x70,
0x11, 0x08, 0x1d, 0x38, 0x2d, 0x24, 0x59, 0x31,
0x2a, 0x4e, 0x28, 0xa9, 0x32, 0x41, 0x29, 0x12,
0x11, 0x52, 0x41, 0x42, 0x30, 0x62, 0x3e, 0x89,
0xf0, 0x24, 0x48, 0x60, 0x82, 0x84, 0xc9, 0x22,
0x54, 0x24, 0x22, 0x47, 0xa8, 0x8b, 0x34, 0x26,
0x82, 0x12, 0x88, 0xf6, 0x81, 0x42, 0x60, 0x22,
0x18, 0x24, 0x30, 0x4a, 0x2a, 0xd1, 0x82, 0x25,
0xf1, 0x42, 0x88, 0x2a, 0x91, 0xc2, 0x18, 0x1a,
0x04, 0x88, 0x30, 0x92, 0x46, 0x28, 0x98, 0x28,
0x12, 0x8c, 0x84, 0xfa, 0x24, 0x7f, 0x00, 0x40,
0x84, 0x43, 0x04, 0x00, 0x41, 0x12, 0x80, 0x21,
0xc4, 0x18, 0x81, 0x83, 0x01, 0x40, 0x62, 0x41,
0x88, 0x43, 0x81, 0x04, 0x42, 0x63, 0x12, 0xc1,
0x18, 0x28, 0x00, 0x1a, 0x84, 0x22, 0x21, 0x21,
0x02, 0x22, 0xa0, 0x21, 0x22, 0x00, 0x80, 0x03,
0x32, 0x20, 0x08, 0xa9, 0x84, 0x32, 0x49, 0x2c,
0xa1, 0x41, 0x20, 0x8a, 0x02, 0xcf, 0xe3, 0x05,
0x42, 0x42, 0x00, 0x64, 0x18, 0x45, 0x08, 0x11,
0x81, 0xc3, 0x63, 0x82, 0x2a, 0x91, 0x18, 0x81,
0x00, 0x42, 0x80, 0x82, 0x71, 0x48, 0x44, 0x2c,
0x04, 0x84, 0x42, 0x00, 0x42, 0x20, 0x45, 0x02,
0x8b, 0x41, 0x20, 0x24, 0x01, 0x42, 0x18, 0x89,
0x02, 0x28, 0x32, 0x80, 0x92, 0x22, 0x42, 0xc0,
0x12, 0x8b, 0x48, 0x80, 0x02, 0x84, 0x00, 0x12,
0x4e, 0x63, 0x24, 0x22, 0x43, 0xd5, 0x48, 0x12,
0xa8, 0x41, 0x22, 0x10, 0xb4, 0x16, 0x12, 0x14,
0x14, 0x31, 0x22, 0x4a, 0x48, 0x84, 0x68, 0x41,
0x22, 0xc0, 0x14, 0x27, 0x22, 0x88, 0x28, 0xac,
0x71, 0x44, 0x88, 0x82, 0x21, 0x82, 0x41, 0x04,
0x28, 0x22, 0x90, 0x2c, 0x4a, 0x23, 0x45, 0xbc,
0x38, 0x28, 0x02, 0x9a, 0x94, 0x14, 0x56, 0x08,
0x8c, 0x83, 0x94, 0x28, 0x90, 0x58, 0x22, 0x4b,
0x21, 0x20, 0x81, 0x61, 0x22, 0xc4, 0x20, 0xf1,
0xbe, 0x24, 0x80, 0x01, 0xc0, 0x11, 0x00, 0x00,
0x83, 0x04, 0x82, 0x00, 0x20, 0x01, 0x48, 0x44,
0x8c, 0x31, 0x41, 0x00, 0x40, 0x04, 0x44, 0x84,
0x4a, 0x11, 0x12, 0x68, 0x41, 0x20, 0x84, 0x02,
0x24, 0x28, 0x00, 0x44, 0x84, 0x44, 0x2c, 0x02,
0x00, 0x16, 0x88, 0x08, 0x00, 0x20, 0x14, 0x68,
0x62, 0x00, 0x2a, 0xd4, 0x28, 0xc4, 0x84, 0x24,
0x5a, 0x62, 0x41, 0x8c, 0x92, 0x19, 0x6c, 0x24,
0x42, 0x14, 0xf4, 0x14, 0x29, 0x45, 0xb8, 0x88,
0x43, 0x8a, 0xa1, 0x81, 0x49, 0x81, 0xc8, 0x44,
0x4c, 0x82, 0x31, 0x65, 0x29, 0x81, 0x68, 0xc2,
0x46, 0x72, 0x44, 0x68, 0xc2, 0x18, 0x2e, 0x52,
0x18, 0x4c, 0xc4, 0x14, 0x62, 0x46, 0x02, 0x4c,
0x81, 0x87, 0x31, 0x18, 0x83, 0x32, 0x44, 0x16,
0xf8, 0x18, 0x64, 0x43, 0xf2, 0x12, 0x48, 0x12,
0x28, 0x5e, 0x22, 0x82, 0x48, 0x89, 0xc1, 0x32,
0x76, 0x08, 0x89, 0xc2, 0x16, 0x00, 0x48, 0x83,
0xf4, 0x2e, 0x3e, 0x00, 0x10, 0x04, 0x18, 0x12,
0x81, 0x30, 0x42, 0x00, 0x19, 0x02, 0x8c, 0x14,
0x08, 0x18, 0x48, 0x81, 0x12, 0x28, 0x4d, 0x48,
0x50, 0x84, 0x00, 0x83, 0x04, 0x40, 0x08, 0x18,
0x28, 0x22, 0x4a, 0x42, 0x82, 0x12, 0x24, 0x29,
0x02, 0x88, 0x12, 0x22, 0x28, 0x89, 0x41, 0x18,
0x08, 0x42, 0xc0, 0x84, 0x48, 0x18, 0x22, 0x89,
0x52, 0x84, 0x28, 0x24, 0x77, 0x95, 0x10, 0x64,
0x84, 0x20, 0x12, 0x84, 0xc2, 0x48, 0x50, 0x28,
0x28, 0x14, 0x18, 0x84, 0x12, 0x11, 0x12, 0xd0,
0x22, 0x81, 0x04, 0x00, 0x84, 0x56, 0x04, 0x40,
0x82, 0x94, 0x48, 0x26, 0x08, 0x10, 0x28, 0x02,
0x23, 0x02, 0x28, 0x46, 0x22, 0x04, 0x78, 0x21,
0x24, 0x28, 0x00, 0x00, 0x82, 0x24, 0x50, 0x82,
0x84, 0x8c, 0x84, 0x02, 0x00, 0xcf, 0xbc, 0x03,
0x00, 0x60, 0x48, 0x00, 0x28, 0x00, 0x80, 0x04,
0x45, 0x12, 0x21, 0x14, 0x02, 0x44, 0x44, 0x21,
0x10, 0x08, 0x00, 0x00, 0x00, 0x48, 0x12, 0x20,
0x01, 0x00, 0x00, 0x20, 0x02, 0x81, 0x4a, 0x81,
0x02, 0x18, 0x8a, 0x02, 0x23, 0x01, 0x23, 0x36,
0x98, 0x00, 0x80, 0x08, 0x22, 0x42, 0x39, 0x4d,
0x01, 0x00, 0x00, 0x20, 0x01, 0x48, 0x23, 0x44,
0x29, 0x42, 0x44, 0x42, 0x02, 0x00, 0x10, 0x44,
0x14, 0x44, 0x04, 0x90, 0x48, 0x40, 0x88, 0x81,
0x41, 0x32, 0x18, 0x40, 0x18, 0x18, 0x02, 0x00,
0x18, 0x20, 0x03, 0x48, 0x12, 0xc8, 0x20, 0x11,
0xa2, 0x14, 0x80, 0x42, 0xaa, 0x34, 0x60, 0x22,
0x60, 0xa2, 0x92, 0x27, 0xb9, 0xc0, 0x45, 0x44,
0x13, 0x21, 0x14, 0x44, 0x04, 0x89, 0x82, 0x02,
0x80, 0x11, 0x41, 0x08, 0x00, 0x00, 0x00, 0x00,
0xa4, 0x10, 0x62, 0x24, 0x00, 0x00, 0x80, 0x84,
0x81, 0xa2, 0x41, 0x81, 0x16, 0x82, 0x04, 0x28,
0x40, 0x98, 0x18, 0x21, 0x80, 0x21, 0xa8, 0xa1,
0x00, 0x42, 0x10, 0x08, 0x40, 0x08, 0x84, 0x2f,
0xfd, 0x0d, 0x82, 0x81, 0x00, 0x1d, 0x12, 0x22,
0x00, 0x85, 0x81, 0x01, 0x28, 0x80, 0x21, 0x82,
0x01, 0x44, 0x44, 0x16, 0x62, 0x24, 0x43, 0x01,
0x48, 0x44, 0x00, 0x40, 0x0a, 0x42, 0x89, 0x02,
0x21, 0x80, 0x42, 0x02, 0xc0, 0x62, 0x10, 0x28,
0x91, 0x18, 0x80, 0x21, 0x22, 0x81, 0x04, 0x40,
0x28, 0x61, 0x28, 0x00, 0x00, 0xf0, 0xe5, 0x85,
0x20, 0x05, 0x49, 0x02, 0x62, 0x90, 0x29, 0x2b,
0x12, 0x48, 0x84, 0x4d, 0x4a, 0x85, 0x24, 0x94,
0x22, 0x1c, 0x84, 0xc4, 0x42, 0x18, 0x00, 0x81,
0x30, 0x42, 0x44, 0x80, 0x01, 0x18, 0xc0, 0x48,
0x00, 0x84, 0x00, 0x48, 0x80, 0x02, 0x21, 0x20,
0x14, 0x22, 0x64, 0x88, 0x46, 0x02, 0xa2, 0x28,
0xca, 0x02, 0xc6, 0x02, 0x42, 0x84, 0x40, 0x88,
0x08, 0xff, 0x87, 0x02, 0x00, 0x10, 0x04, 0x44,
0x00, 0x00, 0x28, 0x48, 0x80, 0x02, 0x00, 0x00,
0x00, 0x83, 0x14, 0x08, 0x58, 0x10, 0x18, 0x28,
0x24, 0xc2, 0x28, 0x00, 0x8c, 0x22, 0x04, 0x00,
0x00, 0x48, 0x80, 0x24, 0x82, 0x24, 0xa2, 0x48,
0x48, 0x28, 0x16, 0x82, 0x0d, 0x48, 0x18, 0x48,
0x89, 0x04, 0x23, 0xc4, 0x48, 0xae, 0x48, 0x20,
0x11, 0x34, 0x14, 0x22, 0x12, 0x21, 0x1c, 0x31,
0x1a, 0x26, 0xe1, 0x84, 0x82, 0x42, 0x78, 0x28,
0x01, 0x00, 0x20, 0x02, 0x12, 0x41, 0x12, 0x49,
0x14, 0x88, 0x84, 0x14, 0xa8, 0x42, 0x10, 0xc2,
0x28, 0x21, 0xb0, 0x12, 0x24, 0x24, 0x41, 0x02,
0x20, 0x11, 0x02, 0x84, 0x90, 0xd8, 0x82, 0x23,
0x01, 0x88, 0x28, 0x00, 0x58, 0x28, 0x21, 0x80,
0x04, 0x88, 0x3f, 0xa7, 0x04, 0x15, 0x08, 0x19,
0x26, 0x14, 0x01, 0x00, 0x80, 0x01, 0x2d, 0x44,
0x90, 0x28, 0x80, 0x04, 0x00, 0x41, 0x8c, 0x04,
0x25, 0x02, 0x4d, 0x12, 0x80, 0x2c, 0x81, 0x82,
0x01, 0x78, 0x46, 0x01, 0x40, 0x18, 0xa8, 0x41,
0x00, 0x42, 0x00, 0x00, 0x60, 0x44, 0x80, 0x02,
0x92, 0x32, 0x00, 0x60, 0x84, 0x70, 0x42, 0x08,
0x9e, 0x83, 0xa0, 0x41, 0x4f, 0x48, 0x74, 0x21,
0x75, 0x44, 0xf4, 0x45, 0x14, 0xe0, 0x81, 0xf2,
0x2a, 0x38, 0x9f, 0x26, 0xa4, 0x76, 0x87, 0x24,
0x8f, 0x81, 0x42, 0x61, 0x11, 0x46, 0x12, 0x02,
0x65, 0x84, 0x84, 0x11, 0xac, 0x41, 0x46, 0x14,
0x08, 0x12, 0x8d, 0x48, 0x29, 0xc5, 0x48, 0x8f,
0x85, 0x34, 0x28, 0x28, 0x8f, 0x24, 0x91, 0x4a,
0x2a, 0xa4, 0x46, 0x24, 0x23, 0x91, 0x42, 0x58,
0x42, 0x5e, 0x42, 0x2b, 0x15, 0x6e, 0x12, 0xea,
0xac, 0x94, 0xca, 0xac, 0x81, 0x9a, 0xa1, 0x95,
0x2b, 0x8c, 0x4e, 0x98, 0xa7, 0x24, 0x6e, 0x62,
0x46, 0xe8, 0x88, 0x04, 0x24, 0x8b, 0x4c, 0x87,
0x32, 0x14, 0x54, 0x85, 0x98, 0x34, 0x40, 0x82,
0x42, 0x21, 0x41, 0x38, 0x18, 0x28, 0x2b, 0x56,
0xd3, 0xd2, 0x2a, 0x21, 0x22, 0x61, 0x24, 0x3a,
0x01, 0x41, 0x25, 0x92, 0x1c, 0x84, 0x6d, 0x4c,
0x4f, 0x44, 0x14, 0x68, 0x24, 0x87, 0x87, 0x80,
0xc2, 0x32, 0xad, 0x18, 0x48, 0x1a, 0x02, 0x29,
0x13, 0x88, 0x02, 0x16, 0x22, 0x62, 0x82, 0x89,
0xb4, 0x18, 0xb6, 0x18, 0x21, 0xb1, 0x12, 0xe2,
0x24, 0x81, 0xa8, 0x6a, 0x16, 0xe2, 0x2b, 0xe2,
0x81, 0xf4, 0x18, 0x18, 0x29, 0x94, 0x28, 0x2d,
0x48, 0x8f, 0x82, 0x0a, 0x6f, 0xa7, 0x08, 0x5b,
0x14, 0x20, 0xa1, 0x62, 0x1e, 0x21, 0x67, 0x42,
0x9f, 0x22, 0x05, 0x1c, 0x52, 0x82, 0x5f, 0x92,
0x04, 0x46, 0x4e, 0xd8, 0x11, 0xa4, 0x54, 0x40,
0x52, 0x64, 0x16, 0xe4, 0xc4, 0x44, 0x9c, 0x4c,
0x4a, 0x51, 0x22, 0x2b, 0x44, 0x00, 0x8f, 0x24,
0xb3, 0x22, 0xc1, 0x48, 0x3a, 0x44, 0xe8, 0x82,
0x61, 0xa4, 0x12, 0x84, 0x2a, 0x61, 0x24, 0x2b,
0x26, 0x29, 0x94, 0x38, 0x84, 0x84, 0x25, 0xe8,
0x28, 0xa6, 0x12, 0xa2, 0x23, 0x44, 0x82, 0x97,
0x48, 0x18, 0x88, 0x81, 0x62, 0x81, 0x4a, 0xc4,
0x98, 0x3f, 0x97, 0x0b, 0x13, 0x15, 0x34, 0x11,
0x41, 0x13, 0x11, 0x36, 0x11, 0x29, 0xd1, 0x81,
0x94, 0x12, 0x11, 0x29, 0x51, 0x81, 0x29, 0x01,
0x29, 0x01, 0x29, 0x03, 0x2d, 0x14, 0xe0, 0x44,
0x01, 0x44, 0x24, 0x40, 0xb2, 0x18, 0x42, 0x32,
0x18, 0x24, 0x8b, 0x25, 0x24, 0x5a, 0x42, 0xa2,
0x21, 0x24, 0x1a, 0x42, 0xa2, 0x21, 0x21, 0x28,
0x21, 0x1a, 0x12, 0xa2, 0x28, 0x21, 0x10, 0x22,
0x19, 0x22, 0x12, 0x32, 0x31, 0x21, 0x22, 0x83,
0x24, 0x12, 0xf8, 0xa8, 0x27, 0x14, 0x5f, 0x11,
0xc1, 0x11, 0x5f, 0x13, 0xf3, 0x31, 0x31, 0x1f,
0x37, 0xf7, 0x32, 0x33, 0xbf, 0xb3, 0xf3, 0x3b,
0x3b, 0x9f, 0xb3, 0xf3, 0x73, 0x33, 0x97, 0xb5,
0xbf, 0xb3, 0xf1, 0x71, 0x43, 0x2f, 0x31, 0xf1,
0x13, 0x23, 0x2f, 0x21, 0xf1, 0x52, 0x52, 0x2f,
0x23, 0xb3, 0x32, 0xf3, 0x14, 0x16, 0x12, 0x1a,
0x31, 0x18, 0x4e, 0x4e, 0xa5, 0x7a, 0x4a, 0xfa,
0x12, 0x12, 0x2f, 0x21, 0xf3, 0x3a, 0x32, 0x2f,
0x83, 0xf3, 0x22, 0x12, 0xaf, 0xa3, 0xf3, 0x22,
0x72, 0xaf, 0x27, 0xf7, 0x32, 0x32, 0x2f, 0x23,
0xf3, 0x32, 0x32, 0x2b, 0x33, 0x2f, 0x23, 0xf1,
0x32, 0x32, 0x2f, 0x23, 0xf3, 0x32, 0x32, 0x2f,
0x22, 0xe2, 0x22, 0xf2, 0x22, 0x8a, 0x1e, 0x82,
0x2f, 0x21, 0xe1, 0x21, 0xf9, 0x52, 0xd2, 0x5e,
0x12, 0x2f, 0x24, 0xfb, 0x32, 0x32, 0x2f, 0xa2,
0xf2, 0xa2, 0xba, 0xad, 0x23, 0x6a, 0xe6, 0x86,
0xa2, 0xae, 0x2e, 0xa3, 0x97, 0x31, 0xf0, 0x11,
0x55, 0x1f, 0x11, 0xf5, 0x31, 0x31, 0x5b, 0x23,
0x1f, 0x37, 0xf7, 0x33, 0x21, 0xbf, 0xb3, 0xf3,
0x3b, 0x3a, 0xbf, 0xb6, 0xf3, 0x73, 0x32, 0xbf,
0xf7, 0xf3, 0x3b, 0x7a, 0xbf, 0xb7, 0xf7, 0x1b,
0x11, 0x3f, 0x31, 0xb1, 0x52, 0xf5, 0x42, 0x52,
0x2b, 0x33, 0x2b, 0x32, 0x1e, 0x16, 0x5e, 0x52,
0x6f, 0x41, 0xb1, 0x54, 0xf1, 0x56, 0x52, 0xcf,
0xa4, 0xf4, 0xca, 0xca, 0x5e, 0x42, 0x2f, 0x21,
0xeb, 0x27, 0xf6, 0x32, 0x72, 0x2f, 0x27, 0xf7,
0x7b, 0x73, 0x8f, 0x25, 0xf7, 0x72, 0x73, 0x5e,
0x6a, 0x2f, 0x23, 0xe7, 0x21, 0xf6, 0x32, 0x32,
0x2f, 0x23, 0xf6, 0x72, 0x72, 0x2b, 0x61, 0x2f,
0x27, 0xf3, 0x42, 0x72, 0x2f, 0x27, 0xf3, 0x6a,
0x62, 0x6f, 0x67, 0xfb, 0xd2, 0x52, 0x2f, 0x65,
0xff, 0x52, 0xd2, 0x2f, 0x21, 0xb9, 0x72, 0xff,
0x72, 0x3a, 0x2b, 0x46, 0x2f, 0x2f, 0xfb, 0x62,
0x63, 0x2f, 0x26, 0x76, 0x2a, 0xe8, 0x8a, 0xfe,
0x6a, 0xda, 0xaf, 0x95, 0x0d, 0x1f, 0x15, 0x91,
0x44, 0x1f, 0x53, 0xb3, 0x31, 0xf2, 0x71, 0x73,
0x23, 0xf1, 0x3b, 0x3b, 0xbf, 0x83, 0xf3, 0x21,
0x73, 0xbb, 0x37, 0x97, 0xf4, 0xbf, 0x85, 0xf1,
0x41, 0x63, 0xaf, 0x91, 0xf1, 0x43, 0x43, 0x2b,
0x15, 0x2f, 0x24, 0xb5, 0x12, 0xf1, 0x22, 0x32,
0x4f, 0x61, 0xb1, 0x42, 0xb4, 0x12, 0x55, 0x44,
0x6c, 0xe1, 0x24, 0xf4, 0x42, 0xc2, 0x56, 0xf2,
0x72, 0x12, 0x7e, 0x62, 0x2b, 0x77, 0x2e, 0x2a,
0xaf, 0xb7, 0xc7, 0x22, 0x2f, 0xa7, 0xe7, 0xa5,
0xf6, 0x72, 0x72, 0x1e, 0x62, 0x2b, 0x33, 0x16,
0xf2, 0x72, 0x72, 0x2b, 0x75, 0x2f, 0x27, 0xb7,
0x52, 0xe7, 0xa6, 0xb6, 0x42, 0xed, 0x67, 0xbe,
0x52, 0xed, 0x21, 0xbb, 0x52, 0xed, 0x2d, 0xb1,
0x52, 0xf1, 0xf2, 0xf2, 0xab, 0x47, 0x2f, 0x2e,
0xbf, 0x42, 0xb4, 0x68, 0xf6, 0x22, 0x48, 0x8b,
0xaa, 0x8f, 0x22, 0xf9, 0x4d, 0x1a, 0xf0, 0x51,
0x51, 0x5c, 0xf1, 0x31, 0x31, 0x26, 0xf4, 0x51,
0x53, 0x25, 0xf5, 0x31, 0x3b, 0xaf, 0xa3, 0xf1,
0x69, 0x6b, 0xaf, 0x27, 0xf1, 0x71, 0x2b, 0xaf,
0xa7, 0xf7, 0x59, 0x6b, 0xbf, 0x11, 0xf1, 0x51,
0x43, 0x2b, 0x15, 0x4e, 0x42, 0x6b, 0x11, 0x2e,
0x22, 0x1e, 0x16, 0x6f, 0x45, 0xf4, 0x56, 0x5c,
0xc3, 0xf5, 0x44, 0x1c, 0x4f, 0x64, 0xb4, 0x42,
0xec, 0x24, 0xf4, 0xf2, 0x18, 0x8f, 0x26, 0xf6,
0x32, 0x78, 0x2f, 0xa6, 0xf7, 0x7a, 0x71, 0x4e,
0x5a, 0x3b, 0x77, 0x4e, 0x42, 0x2b, 0x73, 0x24,
0x2b, 0x33, 0x27, 0x26, 0x2f, 0x27, 0xb7, 0x52,
0xf4, 0x78, 0x32, 0x2f, 0x24, 0xf5, 0x78, 0x32,
0x2f, 0x2e, 0xe5, 0x6f, 0xfb, 0xf2, 0xf2, 0x4f,
0x25, 0xfc, 0x52, 0xd2, 0xde, 0xc2, 0x2b, 0xfd,
0x8f, 0x2f, 0xbb, 0x52, 0xe4, 0xbf, 0xfb, 0x4a,
0x62, 0x8b, 0x66, 0xaf, 0x84, 0xe4, 0x8e, 0xfe,
0x48, 0xc8, 0x4f, 0x5d, 0x0f, 0x00, 0x43, 0x02,
0x00, 0x22, 0x84, 0xc0, 0x48, 0x40, 0x08, 0x00,
0x00, 0x00, 0x00, 0x30, 0x48, 0x00, 0x00, 0x00,
0x80, 0x02, 0x81, 0x00, 0x00, 0x00, 0x80, 0x04,
0x00, 0x96, 0x08, 0x12, 0x20, 0x09, 0x00, 0x84,
0x81, 0x00, 0x20, 0x04, 0x7d, 0xb7, 0xb0, 0x84,
0x04, 0x00, 0x41, 0x00, 0x20, 0x02, 0x00, 0x40,
0x08, 0x00, 0x40, 0x16, 0x14, 0x08, 0x44, 0x41,
0x42, 0x30, 0x48, 0x00, 0x84, 0x81, 0x20, 0x04,
0x00, 0x00, 0x00, 0x00, 0x16, 0x08, 0x00, 0x28,
0x00, 0x20, 0x01, 0x12, 0x00, 0x81, 0x20, 0x44,
0xf8, 0x75, 0xfe, 0xd0, 0x34, 0xf4, 0x11, 0x24,
0xc5, 0xf2, 0x11, 0x24, 0xc3, 0xf4, 0x11, 0x24,
0xa3, 0xd4, 0x41, 0xb6, 0x4a, 0xd1, 0xc1, 0xb6,
0x4a, 0x99, 0x21, 0xaf, 0x24, 0x59, 0x85, 0xaf,
0x14, 0x39, 0x24, 0xaf, 0x34, 0x39, 0x24, 0x2f,
0x14, 0xf9, 0x24, 0x48, 0x2d, 0x95, 0x4f, 0x82,
0xc4, 0x95, 0x4f, 0xa2, 0xc4, 0x85, 0x6f, 0xa2,
0x74, 0x18, 0xf1, 0x24, 0x4a, 0x87, 0x19, 0x2e,
0x5a, 0x87, 0x59, 0xac, 0xe5, 0x49, 0xe2, 0xa2,
0xf5, 0x91, 0x24, 0x2c, 0xf4, 0x91, 0x24, 0x85,
0xf2, 0x91, 0x24, 0xa3, 0xf6, 0x91, 0x24, 0xa3,
0xf4, 0x91, 0x24, 0xab, 0x16, 0x1f, 0x48, 0xb2,
0x6a, 0x99, 0x21, 0xab, 0x94, 0x53, 0xf9, 0x4a,
0x92, 0x43, 0xf2, 0x4a, 0xb2, 0x43, 0xb3, 0x42,
0x79, 0xa4, 0x98, 0x9a, 0x4f, 0x82, 0x94, 0x98,
0x4f, 0xaa, 0xf4, 0xfb, 0x9a, 0xc0, 0x42, 0x1f,
0x81, 0x56, 0x28, 0x1b, 0x61, 0x83, 0x34, 0x11,
0xa3, 0xd4, 0x41, 0xb2, 0x42, 0xd1, 0x41, 0xd2,
0x4a, 0x99, 0x61, 0xaf, 0x44, 0x1b, 0x94, 0xb8,
0x4b, 0x42, 0xaf, 0x14, 0x39, 0x24, 0x4e, 0x91,
0x26, 0xd8, 0x12, 0x79, 0x26, 0xc8, 0x91, 0x2f,
0x82, 0xc5, 0x81, 0x4f, 0xa2, 0xed, 0x11, 0xf8,
0x24, 0x42, 0xc6, 0xe1, 0x22, 0x64, 0x58, 0x34,
0x8e, 0x25, 0xa4, 0x17, 0xcd, 0x2c, 0xf4, 0x91,
0x6c, 0x81, 0x1f, 0x49, 0x36, 0x48, 0x17, 0x49,
0xa3, 0xf4, 0x81, 0x64, 0xab, 0x14, 0x1d, 0x44,
0xaf, 0x44, 0xf9, 0x81, 0x44, 0xa9, 0x13, 0xb5,
0x4a, 0xbb, 0xa4, 0xb4, 0x48, 0xb1, 0x24, 0xa4,
0x94, 0x4f, 0x82, 0x94, 0x92, 0x6f, 0x82, 0x84,
0xf9, 0x26, 0x58, 0x4f, 0x6b, 0x02, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00,
0x00, 0x00, 0x00, 0x80, 0x08, 0x00, 0x00, 0x14,
0x00, 0x00, 0x48, 0x00, 0x00, 0x18, 0x00, 0x40,
0x04, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0xdf,
0x76, 0x04, 0x00, 0x81, 0x28, 0x81, 0x91, 0x11,
0x47, 0x22, 0x8b, 0x41, 0x16, 0x98, 0x22, 0x10,
0x13, 0x05, 0xac, 0x18, 0x34, 0x44, 0x28, 0x84,
0x52, 0x46, 0x08, 0x00, 0x46, 0x08, 0x22, 0x42,
0x24, 0x28, 0x23, 0x05, 0x84, 0x2a, 0x64, 0x21,
0x70, 0x11, 0x44, 0x42, 0x08, 0x99, 0x62, 0x21,
0xcc, 0x04, 0x82, 0x48, 0x12, 0x18, 0x8d, 0x12,
0x24, 0x89, 0x04, 0x90, 0x82, 0x00, 0x72, 0x24,
0xff, 0x27, 0x07, 0x12, 0x8e, 0x31, 0x4b, 0x12,
0x1c, 0x81, 0xd3, 0x24, 0x31, 0x48, 0x11, 0x24,
0x51, 0x12, 0x99, 0x63, 0x81, 0x87, 0x21, 0x81,
0x49, 0xb2, 0x18, 0x66, 0x21, 0x43, 0x65, 0x68,
0x28, 0x4c, 0x31, 0x18, 0x26, 0x0a, 0x1d, 0x24,
0x29, 0x91, 0x48, 0x2d, 0x1a, 0x80, 0x41, 0xe2,
0x24, 0x22, 0x31, 0x12, 0x20, 0xc3, 0x28, 0x18,
0x48, 0x2e, 0x12, 0x12, 0x22, 0x00, 0x1e, 0x48,
0x22, 0x48, 0x30, 0x41, 0x8b, 0x24, 0xe0, 0x28,
0x23, 0x85, 0xb6, 0x42, 0xe1, 0x14, 0x42, 0xe1,
0x84, 0xb2, 0x2b, 0x03, 0x18, 0x6e, 0x11, 0x16,
0xe8, 0x12, 0x21, 0xd1, 0x84, 0x71, 0x42, 0x18,
0xb4, 0x1a, 0x74, 0x1c, 0xb1, 0x16, 0x62, 0xb1,
0x87, 0x12, 0xdd, 0x12, 0x81, 0x28, 0x12, 0x4b,
0x14, 0x2b, 0x25, 0x86, 0xe6, 0x21, 0x64, 0x45,
0x16, 0xa8, 0x21, 0xf0, 0x8c, 0x21, 0x21, 0x2e,
0x48, 0x2f, 0xa4, 0x01, 0x29, 0x71, 0x43, 0x82,
0x86, 0x91, 0x7a, 0x24, 0x6a, 0xb1, 0x18, 0x82,
0x71, 0x42, 0xa8, 0x12, 0x29, 0xa2, 0x12, 0x27,
0x84, 0x30, 0x8c, 0x62, 0x6a, 0x21, 0xe1, 0x81,
0x94, 0x28, 0x46, 0x88, 0x93, 0x12, 0x8a, 0x72,
0x12, 0x92, 0x21, 0x2e, 0x51, 0x5a, 0xe2, 0xf7,
0x03, 0x00, 0x43, 0x02, 0x83, 0x12, 0x41, 0x91,
0x21, 0x24, 0x00, 0x28, 0x18, 0x00, 0x47, 0x88,
0xaf, 0x44, 0x02, 0x44, 0x84, 0x28, 0x84, 0x40,
0x0a, 0x48, 0x12, 0x00, 0x80, 0x82, 0x01, 0x25,
0x08, 0x18, 0x50, 0x14, 0x00, 0xd0, 0x18, 0x01,
0x41, 0xa0, 0x14, 0x00, 0x40, 0x83, 0x14, 0x22,
0x68, 0x24, 0x48, 0x42, 0x48, 0x40, 0xfa, 0x45,
0x8f, 0x20, 0x02, 0x22, 0x60, 0x16, 0x44, 0x41,
0x28, 0x00, 0x18, 0x10, 0x08, 0x24, 0x84, 0x85,
0x02, 0x2c, 0x23, 0x92, 0x2a, 0x22, 0x8b, 0x24,
0x84, 0x20, 0x02, 0x84, 0x83, 0x81, 0x84, 0x02,
0x28, 0x00, 0x29, 0x04, 0x20, 0x01, 0x1e, 0x48,
0x41, 0x84, 0x18, 0x28, 0x40, 0x08, 0x00, 0x20,
0x24, 0x02, 0x10, 0x08, 0x42, 0xb0, 0x31, 0x04,
0x18, 0x00, 0x89, 0xc2, 0x82, 0x26, 0xf8, 0x23,
0x82, 0x11, 0x47, 0x81, 0x63, 0x62, 0x22, 0x14,
0x14, 0x21, 0x44, 0x43, 0x02, 0x46, 0x1a, 0x48,
0x44, 0x14, 0x24, 0x01, 0x84, 0x30, 0x28, 0xc0,
0x22, 0x24, 0x4e, 0x18, 0xb0, 0x18, 0x08, 0x21,
0x10, 0x64, 0x81, 0x24, 0x00, 0x24, 0x18, 0x80,
0x15, 0x38, 0x32, 0x42, 0x16, 0x88, 0xa4, 0x52,
0x12, 0x81, 0x24, 0x87, 0x21, 0x48, 0x3a, 0x24,
0x11, 0xf8, 0xc6, 0xab, 0x80, 0x02, 0x00, 0x50,
0x22, 0x2e, 0x81, 0x1c, 0x32, 0x1c, 0x43, 0xa2,
0x21, 0x14, 0x14, 0x21, 0x40, 0x14, 0x98, 0x42,
0x84, 0x49, 0x52, 0x82, 0x4c, 0x32, 0x48, 0x81,
0x84, 0x00, 0xc0, 0x18, 0x21, 0x2f, 0x81, 0x06,
0x00, 0x21, 0x48, 0x44, 0x8c, 0x41, 0x02, 0x1e,
0x48, 0x10, 0x08, 0x28, 0x24, 0x22, 0x40, 0x08,
0x48, 0x60, 0x82, 0x20, 0x81, 0x24, 0x23, 0x04,
0xef, 0x19, 0x0d, 0x18, 0x80, 0x62, 0x82, 0x19,
0xce, 0x2c, 0x45, 0x02, 0x10, 0x42, 0x02, 0x81,
0x40, 0x74, 0x22, 0x08, 0x84, 0x2b, 0x12, 0x21,
0x26, 0x04, 0x1a, 0x02, 0x80, 0x32, 0x28, 0x84,
0x22, 0x48, 0x00, 0x8c, 0x0b, 0x24, 0x00, 0x20,
0x01, 0x40, 0x86, 0x21, 0x21, 0x45, 0x68, 0x81,
0x48, 0x18, 0x48, 0x38, 0x4a, 0x01, 0x10, 0x1a,
0x8a, 0x24, 0x41, 0xe8, 0x85, 0x07, 0x20, 0x45,
0x91, 0x28, 0x42, 0x45, 0x81, 0x01, 0x29, 0x44,
0x34, 0x84, 0x26, 0x88, 0x52, 0x14, 0x81, 0x40,
0xa8, 0x12, 0xc0, 0x22, 0xa4, 0x10, 0x48, 0x02,
0x8c, 0x06, 0x22, 0x00, 0x44, 0x24, 0x89, 0x02,
0x83, 0x24, 0x24, 0x44, 0x1c, 0xb4, 0x22, 0x04,
0x49, 0x68, 0xc4, 0x16, 0x88, 0x31, 0x88, 0x30,
0x12, 0x49, 0x08, 0x2c, 0x81, 0xa1, 0x24, 0x00,
0x45, 0x42, 0x04, 0x52, 0xef, 0xac, 0x03, 0x22,
0x43, 0x44, 0x6c, 0x11, 0x18, 0xc0, 0x88, 0x12,
0xc4, 0x81, 0x45, 0x22, 0xd4, 0x82, 0x42, 0x0a,
0x82, 0x40, 0x42, 0x04, 0x24, 0x4a, 0x01, 0x12,
0xcb, 0x42, 0x80, 0x44, 0x44, 0x78, 0x44, 0x48,
0x28, 0x81, 0xa4, 0x82, 0x85, 0x04, 0x52, 0x28,
0x30, 0x18, 0x90, 0x48, 0x80, 0x12, 0x18, 0xc4,
0x18, 0x22, 0x00, 0x88, 0x00, 0x2a, 0x51, 0x28,
0x26, 0x2a, 0xe1, 0xc1, 0x62, 0x21, 0x2f, 0x9b,
0x06, 0x00, 0x00, 0x44, 0x81, 0x8a, 0x22, 0x02,
0x12, 0x8c, 0xc2, 0x11, 0x00, 0x20, 0x12, 0x06,
0x40, 0x84, 0x44, 0x8c, 0x02, 0x10, 0x04, 0x42,
0x21, 0x40, 0x02, 0x45, 0x22, 0x21, 0x81, 0x82,
0x02, 0x00, 0x18, 0x20, 0x01, 0x42, 0x18, 0x88,
0xc0, 0x58, 0x84, 0x40, 0x88, 0x41, 0x88, 0x21,
0x09, 0x30, 0x88, 0xef, 0xb1, 0x03, 0x22, 0x18,
0x91, 0x8d, 0x31, 0x4c, 0x45, 0x15, 0x88, 0xc1,
0x48, 0x18, 0x83, 0x62, 0xa1, 0x81, 0x45, 0x01,
0x8a, 0x42, 0x68, 0x23, 0x41, 0x64, 0x48, 0xc1,
0x84, 0x90, 0x28, 0x84, 0x80, 0x42, 0x18, 0x4c,
0x5c, 0x22, 0x45, 0x2a, 0x2a, 0xa4, 0x42, 0x1a,
0x02, 0x41, 0x23, 0x23, 0x61, 0x48, 0x43, 0x44,
0x68, 0x84, 0x96, 0xa8, 0x81, 0x18, 0x45, 0x18,
0x88, 0x09, 0x2a, 0x21, 0xc1, 0x18, 0x36, 0x14,
0x94, 0x14, 0x8d, 0x82, 0x5f, 0x11, 0x0b, 0x82,
0x44, 0x41, 0x00, 0x84, 0x2a, 0x81, 0x12, 0x46,
0xcc, 0x82, 0x19, 0x06, 0x84, 0xa1, 0x50, 0x42,
0x00, 0x22, 0x81, 0x1a, 0x84, 0x42, 0x62, 0x44,
0x4b, 0x42, 0x42, 0x4d, 0x42, 0x80, 0x04, 0x18,
0x4a, 0x82, 0x61, 0x41, 0x00, 0xc3, 0x02, 0x83,
0x04, 0x83, 0x64, 0x81, 0x2a, 0x21, 0x01, 0x84,
0x21, 0x9a, 0x04, 0x90, 0x1a, 0x48, 0x89, 0x02,
0xa9, 0x28, 0x91, 0x28, 0x48, 0x3f, 0x7c, 0x0f,
0x10, 0x11, 0x68, 0x44, 0x81, 0x10, 0x01, 0x20,
0x22, 0x32, 0x22, 0x21, 0x24, 0x84, 0x28, 0x26,
0x08, 0x00, 0x00, 0x22, 0x00, 0x30, 0x28, 0x10,
0x48, 0x18, 0x0a, 0x50, 0x22, 0x24, 0x00, 0x00,
0x00, 0x81, 0x8c, 0x01, 0x81, 0x00, 0x12, 0x00,
0x84, 0x81, 0xa4, 0x12, 0x40, 0x14, 0x88, 0x04,
0x2f, 0xe7, 0x0c, 0x00, 0x40, 0x19, 0x11, 0x28,
0x72, 0x12, 0x02, 0x00, 0x12, 0x22, 0x00, 0x12,
0x40, 0x14, 0x34, 0x22, 0x30, 0x24, 0x00, 0x22,
0x40, 0x02, 0x21, 0x80, 0xa6, 0x42, 0x00, 0x20,
0x02, 0x00, 0x22, 0x00, 0x20, 0x21, 0x18, 0x18,
0x98, 0x82, 0x92, 0x8c, 0x08, 0x88, 0x00, 0x8c,
0x31, 0x42, 0x50, 0x28, 0x46, 0xf8, 0x82, 0x6b,
0x20, 0x8a, 0x02, 0x8c, 0x04, 0x5c, 0x12, 0x48,
0x04, 0x44, 0x83, 0x02, 0x44, 0x00, 0x10, 0x02,
0x50, 0x24, 0x00, 0x28, 0x00, 0x18, 0x81, 0x84,
0x00, 0x83, 0x04, 0x10, 0x02, 0x40, 0x08, 0x00,
0x00, 0x00, 0x00, 0x81, 0x81, 0x00, 0x00, 0x00,
0x80, 0x81, 0x34, 0x48, 0x29, 0xf1, 0x94, 0xa6,
0x40, 0x08, 0x38, 0x28, 0x20, 0x08, 0x28, 0x81,
0x10, 0x44, 0x04, 0x11, 0x10, 0x08, 0x26, 0x08,
0x00, 0x40, 0xc2, 0x28, 0xc0, 0x28, 0x29, 0x82,
0x03, 0x22, 0x22, 0xa4, 0x80, 0x01, 0x84, 0x80,
0x05, 0x40, 0x44, 0x04, 0x81, 0x88, 0x00, 0x00,
0x6a, 0x01, 0x38, 0x20, 0x84, 0x44, 0x02, 0x29,
0x02, 0x3f, 0x5a, 0x06, 0x00, 0x40, 0x11, 0x59,
0x81, 0x25, 0x42, 0x1a, 0x08, 0x24, 0x00, 0x11,
0x26, 0x01, 0x00, 0x44, 0x90, 0x22, 0x00, 0x10,
0x08, 0x00, 0x00, 0x40, 0x0a, 0x00, 0x00, 0x60,
0x44, 0x40, 0x14, 0x68, 0x41, 0x84, 0x00, 0x18,
0x81, 0x00, 0x80, 0x81, 0x08, 0x18, 0x00, 0x60,
0x14, 0xff, 0x82, 0x0c, 0x30, 0x28, 0x49, 0x04,
0x00, 0x38, 0x00, 0x22, 0x84, 0x22, 0x21, 0x21,
0x00, 0x60, 0x22, 0x10, 0x02, 0x10, 0x92, 0x28,
0x2a, 0x11, 0x58, 0x22, 0xd0, 0x28, 0x02, 0x00,
0x00, 0x24, 0x84, 0x80, 0x04, 0x00, 0x18, 0x81,
0x00, 0x10, 0x42, 0xa4, 0x21, 0x42, 0x83, 0x45,
0x52, 0x28, 0x4a, 0x01, 0x46, 0x08, 0x00, 0x7f,
0x29, 0x0d, 0x84, 0x90, 0x48, 0xa0, 0x83, 0xa2,
0x15, 0x08, 0x43, 0xc2, 0x18, 0x50, 0x48, 0x80,
0x01, 0x21, 0x21, 0x12, 0x28, 0x12, 0x44, 0x1a,
0x12, 0x08, 0x18, 0x22, 0x20, 0x12, 0x02, 0x00,
0x80, 0x02, 0x45, 0x08, 0x49, 0x06, 0x43, 0x01,
0x22, 0x20, 0x12, 0x08, 0x2e, 0x84, 0x90, 0x28,
0x00, 0x88, 0x10, 0x18, 0x48, 0x04, 0x21, 0xa0,
0xe9, 0x80, 0xa2, 0x48, 0x22, 0x44, 0x00, 0x30,
0x28, 0x22, 0x81, 0x21, 0x14, 0x41, 0x30, 0x28,
0x10, 0x18, 0x88, 0x82, 0x22, 0x12, 0x42, 0x22,
0x01, 0x00, 0x00, 0x28, 0x20, 0x04, 0x10, 0x08,
0x83, 0x04, 0x40, 0x04, 0x44, 0x20, 0x01, 0xc0,
0x12, 0x22, 0xd0, 0x82, 0xc1, 0x52, 0x80, 0x08,
0x41, 0x89, 0x81, 0x04, 0xf0, 0xce, 0xe5, 0xc0,
0x18, 0x81, 0x4c, 0x84, 0x82, 0x02, 0x00, 0x44,
0x44, 0x40, 0x4c, 0x82, 0x52, 0x23, 0x81, 0x40,
0x04, 0x41, 0x41, 0x50, 0x82, 0x90, 0x18, 0x80,
0x18, 0xc8, 0x22, 0x8c, 0x01, 0x18, 0x14, 0x24,
0xc0, 0x18, 0x44, 0x48, 0x42, 0x00, 0x00, 0x00,
0x45, 0x18, 0x82, 0x81, 0x02, 0x50, 0x28, 0x90,
0xa8, 0x42, 0x28, 0x84, 0x21, 0x84, 0x17, 0x44,
0x80, 0x71, 0xc8, 0x71, 0x18, 0xf4, 0x25, 0x28,
0x8b, 0x29, 0x93, 0x22, 0xb2, 0x14, 0x42, 0x3c,
0x28, 0x44, 0x23, 0x12, 0x46, 0xc1, 0x22, 0x84,
0x85, 0xd8, 0x44, 0x41, 0xc6, 0x26, 0x23, 0x02,
0x22, 0x27, 0x81, 0x2a, 0x52, 0x28, 0x28, 0x84,
0xa1, 0x8c, 0xb2, 0x48, 0x62, 0x82, 0x10, 0x12,
0xc2, 0x14, 0x85, 0x68, 0x41, 0x20, 0x01, 0x8d,
0x28, 0x16, 0x88, 0x21, 0x08, 0xa5, 0x38, 0x26,
0x89, 0x31, 0x62, 0x81, 0x40, 0x78, 0x58, 0x28,
0x54, 0x84, 0xd0, 0x38, 0xb4, 0x42, 0xf1, 0xcd,
0xe7, 0x20, 0xe2, 0x8a, 0x22, 0xb2, 0x48, 0x44,
0xd9, 0x94, 0x5a, 0xb8, 0x27, 0x82, 0xd0, 0xc4,
0x43, 0xf2, 0x11, 0x28, 0x44, 0x30, 0x21, 0x89,
0x92, 0x22, 0x87, 0x82, 0x6b, 0x22, 0x49, 0x11,
0xa4, 0x22, 0xa4, 0x83, 0x52, 0x88, 0x26, 0x78,
0x22, 0x52, 0x28, 0x30, 0x28, 0x25, 0xd8, 0x28,
0x01, 0x1a, 0x02, 0x22, 0x42, 0xc0, 0x44, 0x44,
0x41, 0x44, 0x18, 0x1a, 0x02, 0x85, 0xe8, 0x21,
0x39, 0x98, 0x82, 0x8a, 0xe5, 0x81, 0x61, 0xa8,
0xad, 0x82, 0x58, 0xc5, 0xb8, 0x58, 0x37, 0x48,
0x26, 0x18, 0xf8, 0x6d, 0x88, 0x80, 0x02, 0x4d,
0x28, 0x54, 0x13, 0x02, 0x3b, 0x21, 0x85, 0xb2,
0x2e, 0x02, 0xaf, 0x82, 0x52, 0x28, 0x2c, 0xd2,
0x23, 0x51, 0x9a, 0x27, 0x21, 0x80, 0x02, 0x23,
0xc2, 0x26, 0x4c, 0x91, 0x28, 0x28, 0xa0, 0x21,
0x85, 0xb8, 0x32, 0xe2, 0xa2, 0x92, 0x12, 0x2a,
0xa4, 0x44, 0x25, 0x42, 0x52, 0x28, 0x21, 0x44,
0x28, 0x42, 0x43, 0x42, 0x34, 0x14, 0x85, 0x54,
0x88, 0x8d, 0x88, 0x45, 0x82, 0xc2, 0x18, 0x12,
0x87, 0x81, 0x4a, 0xb4, 0x3a, 0x29, 0x98, 0xa2,
0x1e, 0x52, 0x44, 0x2d, 0x48, 0x42, 0x8c, 0x34,
0x5d, 0x20, 0x21, 0x22, 0x51, 0x14, 0x12, 0x88,
0x16, 0xa8, 0x12, 0xb0, 0x24, 0x01, 0x2a, 0x01,
0x3c, 0x01, 0x38, 0x84, 0x18, 0xc0, 0x16, 0x80,
0x01, 0x81, 0x00, 0x21, 0x12, 0x21, 0x83, 0x01,
0x8b, 0x25, 0xa0, 0x21, 0x21, 0x1a, 0x02, 0x1a,
0x12, 0xa4, 0x21, 0xc0, 0x28, 0x41, 0x28, 0x80,
0x82, 0x28, 0x81, 0xa8, 0x41, 0x88, 0x36, 0x08,
0xba, 0x14, 0x28, 0x33, 0x48, 0x22, 0x81, 0xcf,
0xc6, 0x0f, 0x8a, 0xa1, 0x11, 0x87, 0x82, 0x9f,
0x41, 0xf3, 0x3c, 0x9c, 0xdf, 0xf3, 0xd3, 0x6f,
0xf2, 0x26, 0x36, 0x2f, 0xc1, 0xe1, 0x61, 0xf1,
0x1a, 0x1a, 0xbd, 0x1b, 0x2b, 0x11, 0x1a, 0xf1,
0x1a, 0x18, 0xad, 0x3a, 0x2f, 0x81, 0xe3, 0x63,
0xb3, 0x16, 0xb3, 0x24, 0xb2, 0x36, 0xf3, 0x34,
0x34, 0x4f, 0x43, 0x03, 0xe0, 0x22, 0xf1, 0x32,
0x32, 0x2b, 0x33, 0x3a, 0xa3, 0x21, 0x2e, 0x58,
0x2c, 0xf3, 0x32, 0x32, 0x2b, 0x22, 0x2a, 0x83,
0xa3, 0x33, 0x2a, 0xa2, 0x33, 0x1e, 0x34, 0x4f,
0x42, 0xe2, 0x83, 0xa3, 0x33, 0x1a, 0xa1, 0x2a,
0x8f, 0x22, 0xfa, 0x82, 0x9a, 0x2b, 0x98, 0x8d,
0x8a, 0x2b, 0xb8, 0xee, 0xa2, 0x2f, 0xa3, 0xf2,
0x22, 0x22, 0x23, 0xa2, 0xac, 0x4f, 0x88, 0xab,
0x62, 0x48, 0x8f, 0x84, 0xf2, 0xe3, 0xe9, 0xa0,
0x32, 0x5a, 0xf7, 0x1c, 0x18, 0x9f, 0xd2, 0xf2,
0x2c, 0x2c, 0xdf, 0xf3, 0xf3, 0x3f, 0x17, 0x6f,
0xe2, 0xf3, 0x1a, 0x3c, 0x2e, 0x22, 0xaf, 0xe2,
0xd2, 0xbb, 0xf3, 0x12, 0x32, 0x35, 0x51, 0xa9,
0xad, 0x3a, 0xab, 0x31, 0x87, 0x22, 0x2b, 0x22,
0x2b, 0x33, 0x6b, 0x33, 0x6d, 0x24, 0x47, 0xc2,
0xaf, 0x83, 0x23, 0xe2, 0x2a, 0xfa, 0x22, 0x22,
0x2f, 0x22, 0xfa, 0x32, 0x18, 0xaf, 0x81, 0xc2,
0x38, 0x9f, 0x34, 0xf7, 0x32, 0x32, 0x2f, 0x31,
0xc1, 0x1a, 0x6d, 0x34, 0x3a, 0xf7, 0x14, 0x14,
0x45, 0x84, 0xa2, 0x33, 0x84, 0x8b, 0x11, 0x3a,
0xa3, 0xa2, 0x4f, 0x2a, 0x5a, 0x22, 0x2f, 0x42,
0xe3, 0x21, 0xb8, 0xc2, 0xe9, 0x2c, 0x79, 0x12,
0xfa, 0x2a, 0xa2, 0x2b, 0x46, 0x9a, 0xfb, 0x84,
0xe4, 0xaf, 0x82, 0xa6, 0x66, 0x2d, 0x38, 0xcb,
0xb1, 0x20, 0xa1, 0x62, 0x8f, 0x81, 0xf1, 0x2d,
0x2c, 0x9f, 0x92, 0x7a, 0x29, 0xfb, 0x3b, 0x3b,
0x2f, 0x21, 0xf2, 0x22, 0x3c, 0xc5, 0x56, 0xea,
0xbf, 0xb3, 0x92, 0x32, 0x50, 0xbb, 0xa7, 0xa3,
0x2f, 0x82, 0x61, 0x22, 0x2f, 0x22, 0xf2, 0x34,
0x36, 0x6b, 0x22, 0x23, 0x92, 0x28, 0x89, 0xa1,
0x22, 0x2c, 0xfa, 0x22, 0x22, 0x2f, 0x22, 0xf2,
0x38, 0x22, 0x8b, 0x12, 0x8c, 0x66, 0xb3, 0x2d,
0x22, 0x2f, 0x21, 0x51, 0x82, 0x32, 0x68, 0x1a,
0x51, 0x44, 0x26, 0xd4, 0x44, 0xf2, 0x1c, 0x1c,
0x4f, 0x41, 0xa1, 0x33, 0x82, 0x6c, 0xf8, 0x22,
0x32, 0x29, 0xf3, 0x88, 0x1a, 0x29, 0x6d, 0x24,
0xaf, 0xa9, 0xf9, 0xa2, 0x82, 0xab, 0xb9, 0xca,
0xf8, 0xe4, 0x98, 0x2b, 0x44, 0x6a, 0xd2, 0x88,
0xf5, 0xa4, 0x3e, 0xa0, 0x2b, 0x1a, 0x57, 0x8c,
0xdf, 0xd2, 0xe2, 0x83, 0xf3, 0xb9, 0x3b, 0xbf,
0xb2, 0x72, 0x32, 0xda, 0xc8, 0xf3, 0x3c, 0x32,
0x2f, 0xa2, 0xf2, 0x1b, 0x2b, 0x2c, 0xf1, 0x13,
0x13, 0x35, 0x7a, 0x3a, 0xfa, 0x2a, 0x18, 0x8f,
0xe3, 0x93, 0x26, 0x2d, 0x24, 0x6b, 0x33, 0x3a,
0xe3, 0x82, 0xf2, 0x28, 0x38, 0x26, 0xa8, 0xa2,
0x2f, 0x22, 0xf2, 0xb2, 0x1a, 0x2f, 0x83, 0xf2,
0x2a, 0x18, 0x6e, 0x48, 0x8f, 0x97, 0xf4, 0x12,
0x32, 0x3f, 0x22, 0x42, 0x72, 0x36, 0xa4, 0x31,
0x4f, 0x42, 0x52, 0x44, 0x3e, 0x14, 0x4f, 0x41,
0xf3, 0x2c, 0x28, 0x8b, 0x11, 0x83, 0xa1, 0xa2,
0x8f, 0x68, 0xf8, 0xb2, 0xaa, 0x4b, 0x31, 0x8f,
0xa9, 0xb1, 0x4a, 0xed, 0x24, 0xf1, 0xba, 0xba,
0xaf, 0x22, 0xa8, 0xfd, 0xda, 0xfd, 0xbc, 0xdc,
0x8f, 0x82, 0x56, 0x88, 0x4e, 0x48, 0x8f, 0x4a,
0x07, 0x22, 0x20, 0x02, 0x00, 0x26, 0x02, 0x40,
0x68, 0x22, 0x00, 0x00, 0x84, 0x00, 0x28, 0x00,
0x80, 0x02, 0x81, 0x10, 0x08, 0x00, 0x89, 0x02,
0x10, 0x02, 0x00, 0x00, 0x00, 0x20, 0x01, 0x40,
0x42, 0x08, 0x00, 0x1e, 0x48, 0x40, 0x08, 0x12,
0x00, 0x42, 0xf0, 0x68, 0xb3, 0x00, 0x12, 0x81,
0x1e, 0x24, 0x14, 0x1f, 0x81, 0x02, 0x84, 0x2a,
0x41, 0x94, 0x18, 0x12, 0x24, 0x11, 0x2c, 0x01,
0x38, 0x45, 0xc8, 0x32, 0x43, 0x82, 0x01, 0x89,
0x23, 0x02, 0x22, 0x28, 0x29, 0xb1, 0x18, 0x12,
0xa2, 0x25, 0x22, 0x80, 0x81, 0x92, 0x16, 0x1a,
0x22, 0x22, 0x01, 0x1a, 0x02, 0x8c, 0x32, 0x28,
0x00, 0x28, 0x18, 0x84, 0x18, 0x22, 0x24, 0x22,
0x4a, 0x69, 0x82, 0x4c, 0xe8, 0x82, 0x14, 0xe8,
0x12, 0xf4, 0x9b, 0xe2, 0xe0, 0x22, 0xf4, 0x11,
0x24, 0xc5, 0xf3, 0x11, 0x24, 0x87, 0x14, 0x1f,
0x41, 0x32, 0x6a, 0x1d, 0x2c, 0xeb, 0x16, 0x1d,
0x24, 0xab, 0x96, 0x19, 0xf2, 0x4a, 0x92, 0x51,
0xaf, 0x14, 0x39, 0x24, 0xaf, 0x14, 0x7b, 0x24,
0xf8, 0x42, 0x93, 0x47, 0x82, 0x2d, 0x95, 0x4f,
0x82, 0xd4, 0x18, 0xf9, 0x24, 0x4a, 0x1c, 0xf8,
0x24, 0x4a, 0x16, 0xf1, 0x26, 0x4a, 0x87, 0x19,
0x2f, 0xa2, 0x74, 0xd8, 0xd5, 0xa2, 0xe4, 0x49,
0xc2, 0x4a, 0x1f, 0x49, 0xd2, 0x22, 0xf4, 0x91,
0x24, 0xc5, 0xf2, 0x91, 0x24, 0xc3, 0xf4, 0x91,
0x24, 0xe3, 0xf4, 0x81, 0x2c, 0xab, 0x14, 0x1f,
0x48, 0xb2, 0x4a, 0xb9, 0x91, 0xb2, 0x4a, 0x39,
0x95, 0xab, 0x94, 0x4b, 0x4b, 0xab, 0x94, 0x47,
0x83, 0xaf, 0x24, 0xf9, 0x34, 0x48, 0xab, 0x94,
0x4f, 0x82, 0x94, 0x98, 0x4f, 0xa2, 0xf4, 0xeb,
0xaa, 0xc0, 0x42, 0x1d, 0x6c, 0x85, 0xc2, 0x64,
0x83, 0x94, 0x21, 0xa3, 0x14, 0x31, 0x4a, 0x15,
0xf4, 0x4a, 0x84, 0x19, 0xf2, 0x4a, 0xa4, 0x41,
0x8b, 0xa4, 0x41, 0xaf, 0x14, 0x38, 0x24, 0x4e,
0x81, 0x47, 0x82, 0x1c, 0xf8, 0x22, 0x48, 0x1c,
0xf8, 0x26, 0x5a, 0x1c, 0xf8, 0x24, 0xd8, 0x1c,
0xf8, 0x24, 0x48, 0x86, 0xe1, 0xa2, 0x64, 0x58,
0x3c, 0x64, 0x58, 0x8c, 0x74, 0x81, 0xcc, 0x42,
0x1f, 0xc8, 0x54, 0x28, 0x1b, 0x48, 0x83, 0x34,
0x81, 0x23, 0x34, 0x81, 0xab, 0x14, 0x15, 0xf4,
0x4a, 0x14, 0x11, 0xaf, 0x44, 0x13, 0xb5, 0x4a,
0x13, 0x34, 0x42, 0x41, 0x39, 0x18, 0x94, 0x82,
0x65, 0x88, 0xd9, 0xa6, 0xf5, 0x24, 0xe9, 0x00,
0x82, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x40, 0x04, 0x00, 0x00, 0x00, 0x18, 0x41, 0x88,
0x22, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x40, 0x04, 0x28, 0x00, 0x00, 0x00,
0x00, 0x00, 0xb7, 0x67, 0x00, 0x26, 0x04, 0x90,
0x48, 0x10, 0x46, 0x68, 0x82, 0x45, 0x42, 0x08,
0x25, 0x58, 0x28, 0x81, 0x8d, 0x12, 0x28, 0x26,
0x02, 0x85, 0xd4, 0x82, 0x92, 0x14, 0x81, 0x26,
0x84, 0x34, 0x28, 0x48, 0x26, 0xb4, 0x42, 0x72,
0x62, 0x08, 0x40, 0x02, 0x41, 0x00, 0x61, 0x12,
0x00, 0x84, 0x20, 0x01, 0x81, 0x60, 0x21, 0x8b,
0x14, 0x83, 0xf4, 0x88, 0x12, 0x18, 0x8a, 0x01,
0x24, 0x92, 0x4c, 0xa5, 0x14, 0x64, 0x3f, 0xb3,
0x08, 0x30, 0x81, 0x83, 0xa2, 0x21, 0x40, 0x68,
0x83, 0x26, 0x42, 0x81, 0x82, 0x52, 0x81, 0x48,
0x41, 0x18, 0x61, 0x40, 0x18, 0x88, 0x01, 0x26,
0x68, 0x42, 0x84, 0x22, 0x10, 0x82, 0x04, 0x80,
0x46, 0x82, 0xc4, 0x28, 0x24, 0x1d, 0x12, 0xb0,
0x18, 0x42, 0x56, 0x81, 0x10, 0x12, 0x78, 0x8a,
0x81, 0xa1, 0x21, 0x84, 0x40, 0x82, 0x18, 0x42,
0x08, 0x27, 0x81, 0x84, 0x26, 0x04, 0x5c, 0x02,
0x2f, 0x25, 0x0b, 0xf0, 0xc4, 0x21, 0x22, 0x1a,
0xc4, 0x48, 0x85, 0x92, 0x28, 0x89, 0xc2, 0x28,
0x45, 0xd2, 0x84, 0x52, 0x21, 0x83, 0x46, 0x18,
0x98, 0x1a, 0x28, 0x89, 0x12, 0x8a, 0x41, 0x22,
0x13, 0x38, 0x38, 0x28, 0x86, 0x8a, 0x84, 0x64,
0x22, 0x42, 0x2a, 0x54, 0x21, 0x46, 0x02, 0x85,
0x42, 0x22, 0xd4, 0x48, 0xc1, 0x16, 0x85, 0x01,
0xa1, 0x85, 0x32, 0x88, 0x18, 0xcb, 0x12, 0x81,
0x2a, 0xc1, 0x18, 0x27, 0x2c, 0x84, 0x89, 0xe1,
0x21, 0xc8, 0x18, 0x84, 0x2f, 0x68, 0x63, 0x45,
0x5a, 0x22, 0xf1, 0x54, 0x95, 0x00, 0x10, 0x88,
0x02, 0x90, 0x14, 0x50, 0x12, 0x28, 0x40, 0x08,
0x41, 0x29, 0x11, 0x14, 0x02, 0x50, 0x84, 0xa9,
0x52, 0x84, 0x4c, 0x12, 0x24, 0x24, 0x02, 0x47,
0x22, 0x42, 0x26, 0x08, 0x00, 0x26, 0x48, 0xc4,
0x11, 0x30, 0x22, 0x00, 0x00, 0xc0, 0x11, 0x00,
0x40, 0x82, 0x14, 0x28, 0x19, 0x02, 0x00, 0x00,
0x44, 0x45, 0x72, 0x8b, 0x0b, 0x00, 0xc1, 0x00,
0x12, 0x22, 0x00, 0x80, 0x01, 0x30, 0x14, 0x00,
0x44, 0x00, 0x00, 0x80, 0x81, 0x14, 0x08, 0x90,
0x44, 0x12, 0x20, 0x01, 0xb0, 0x24, 0x04, 0x80,
0x02, 0x00, 0x00, 0x10, 0x02, 0x40, 0x08, 0x80,
0x21, 0xa2, 0x34, 0x80, 0x01, 0x00, 0x00, 0xab,
0xc8, 0x00, 0x00, 0x41, 0x46, 0x18, 0x14, 0x26,
0x43, 0x11, 0x04, 0x26, 0x28, 0x41, 0x61, 0x24,
0x49, 0x02, 0xa4, 0x20, 0x08, 0x8c, 0x03, 0x00,
0x24, 0x83, 0x01, 0x81, 0x17, 0x24, 0xd0, 0x28,
0xa4, 0x12, 0x82, 0x44, 0x1a, 0x64, 0x41, 0x82,
0x12, 0x84, 0x00, 0x18, 0x83, 0x24, 0x2a, 0x21,
0xc2, 0x18, 0x81, 0x89, 0x98, 0x48, 0x45, 0x08,
0x00, 0x12, 0x42, 0x90, 0x28, 0xbf, 0x2a, 0x0e,
0x00, 0x85, 0x44, 0x14, 0x68, 0x21, 0xa0, 0x21,
0x14, 0x44, 0x12, 0x89, 0x82, 0x11, 0x05, 0x26,
0x04, 0x84, 0x00, 0x60, 0x82, 0x18, 0x40, 0x08,
0x12, 0x43, 0x24, 0x71, 0x41, 0x22, 0x41, 0xaa,
0x21, 0x44, 0x41, 0x18, 0x38, 0x82, 0x40, 0x08,
0x00, 0xa1, 0x8a, 0x22, 0x41, 0x18, 0x08, 0x8b,
0x18, 0x8c, 0xb4, 0x4c, 0x01, 0x12, 0x80, 0x01,
0x40, 0xf8, 0xc8, 0xca, 0x00, 0x42, 0x00, 0x42,
0x41, 0x43, 0x02, 0x00, 0x41, 0x80, 0x22, 0x61,
0x24, 0x10, 0x44, 0x02, 0x82, 0x24, 0x12, 0xa0,
0x14, 0x20, 0x18, 0x0a, 0x81, 0x00, 0x19, 0x04,
0xca, 0x12, 0x28, 0x64, 0x44, 0x20, 0x01, 0x00,
0x18, 0x42, 0x10, 0x24, 0x82, 0x13, 0x08, 0x28,
0x22, 0x00, 0x40, 0x82, 0x04, 0x1a, 0xf2, 0xc5,
0x5f, 0xa0, 0x12, 0x18, 0x8c, 0x01, 0x40, 0x08,
0x00, 0x80, 0x61, 0x84, 0x83, 0x44, 0x04, 0x50,
0x84, 0x11, 0x60, 0x82, 0x11, 0x22, 0x28, 0x88,
0x8a, 0x92, 0x21, 0x14, 0x22, 0x88, 0x00, 0x30,
0x22, 0x00, 0x41, 0x4c, 0x81, 0x82, 0x08, 0x00,
0x81, 0x83, 0x03, 0x46, 0x08, 0x88, 0x41, 0x48,
0x4c, 0x82, 0x23, 0x02, 0x00, 0x80, 0x6a, 0x22,
0x2f, 0xb1, 0x0f, 0x00, 0x41, 0x44, 0x44, 0x44,
0x43, 0x32, 0x14, 0x4e, 0x14, 0x80, 0x02, 0x00,
0x16, 0x44, 0x84, 0xc4, 0x12, 0x16, 0x44, 0xc4,
0x88, 0x43, 0x68, 0x11, 0x30, 0x42, 0x42, 0x28,
0x20, 0x02, 0x00, 0x42, 0x44, 0x14, 0x24, 0x50,
0xb2, 0x40, 0x08, 0x40, 0x11, 0xb2, 0x84, 0x25,
0x82, 0x04, 0x89, 0x18, 0x92, 0xc2, 0x44, 0x87,
0x24, 0x20, 0x04, 0x46, 0x04, 0x42, 0x9f, 0xb6,
0x0a, 0x00, 0x00, 0x40, 0x11, 0x98, 0x22, 0x28,
0x81, 0x85, 0x41, 0x01, 0x18, 0x90, 0x12, 0x00,
0x86, 0x81, 0x01, 0x40, 0x08, 0x81, 0x00, 0x41,
0x84, 0x18, 0x34, 0x4c, 0x02, 0x20, 0x31, 0x42,
0x40, 0x04, 0x00, 0x80, 0x06, 0x81, 0x8a, 0x01,
0x25, 0x08, 0x81, 0x90, 0x42, 0x82, 0x81, 0xc0,
0x18, 0x2a, 0x08, 0xf0, 0x4e, 0x7e, 0x14, 0x18,
0x90, 0x1c, 0x41, 0x41, 0xd4, 0x47, 0xa2, 0x44,
0x4b, 0x25, 0x84, 0x8f, 0x11, 0x72, 0x41, 0x98,
0x48, 0x41, 0x16, 0x34, 0x16, 0x41, 0x2c, 0x81,
0xe9, 0xc2, 0xc1, 0x81, 0x49, 0xca, 0x18, 0x82,
0xa3, 0x64, 0x14, 0x26, 0x01, 0x84, 0x18, 0x11,
0x63, 0x22, 0x04, 0x16, 0x31, 0x42, 0x43, 0x51,
0x2e, 0x10, 0x08, 0xf0, 0x41, 0x28, 0x21, 0x46,
0xa4, 0x1a, 0x42, 0x82, 0x85, 0x46, 0x3a, 0x24,
0x2f, 0x41, 0xa6, 0x86, 0x81, 0x42, 0x8c, 0x81,
0xaa, 0x82, 0x48, 0xdf, 0x4f, 0x0b, 0x22, 0x12,
0x00, 0x00, 0xa0, 0x21, 0x00, 0x00, 0x20, 0x01,
0x30, 0x48, 0x11, 0x54, 0x10, 0x08, 0x1c, 0x02,
0xa8, 0x22, 0x30, 0x24, 0x8a, 0x02, 0x40, 0x82,
0x12, 0x04, 0x45, 0x02, 0x26, 0x21, 0x08, 0x00,
0xb0, 0x28, 0x61, 0x89, 0x83, 0x04, 0xa1, 0x82,
0x42, 0x8a, 0x04, 0x84, 0x21, 0x00, 0x49, 0x04,
0x22, 0x2f, 0x56, 0x05, 0x18, 0x11, 0x00, 0x41,
0x84, 0x21, 0x00, 0x11, 0x42, 0x20, 0x04, 0x00,
0x10, 0x04, 0x00, 0x00, 0x60, 0x44, 0x25, 0x02,
0x48, 0x81, 0x11, 0x00, 0x50, 0x22, 0x40, 0x41,
0x44, 0x02, 0x00, 0x00, 0x00, 0x18, 0x40, 0x02,
0x81, 0x90, 0x88, 0x00, 0x48, 0xa0, 0x41, 0x80,
0x74, 0xc3, 0x0c, 0x43, 0x02, 0x18, 0x14, 0x48,
0x13, 0x11, 0xc4, 0x28, 0x43, 0x12, 0x08, 0x12,
0x92, 0x90, 0x41, 0x26, 0x52, 0x28, 0x00, 0xc8,
0x88, 0x4c, 0x31, 0x48, 0x42, 0x90, 0x21, 0x11,
0x43, 0xc2, 0xc2, 0x16, 0x44, 0xd2, 0x24, 0x21,
0xa4, 0x82, 0x22, 0x20, 0x92, 0x98, 0x19, 0x91,
0x81, 0x86, 0xc4, 0x45, 0x4e, 0x11, 0x82, 0x82,
0x89, 0x88, 0x14, 0x12, 0x84, 0x34, 0x22, 0xd0,
0x84, 0xc8, 0x12, 0x88, 0xc1, 0x49, 0x22, 0x02,
0x4f, 0x61, 0x02, 0x18, 0x42, 0x10, 0x41, 0xd4,
0x18, 0x11, 0x24, 0x82, 0x12, 0x11, 0x84, 0x81,
0x02, 0x00, 0x25, 0x08, 0x20, 0x44, 0x22, 0x01,
0x18, 0x41, 0x86, 0x02, 0x66, 0x24, 0x48, 0x01,
0x15, 0x02, 0x2d, 0x22, 0x81, 0x60, 0x44, 0x98,
0x21, 0x14, 0x00, 0x00, 0x82, 0x4f, 0x88, 0x01,
0x2c, 0x02, 0x24, 0x10, 0x58, 0x48, 0x18, 0x48,
0x64, 0x80, 0x22, 0xd1, 0x86, 0x09, 0x8d, 0x2c,
0x8f, 0x14, 0xa4, 0x45, 0x42, 0x42, 0x24, 0x40,
0x48, 0x44, 0xd8, 0x44, 0x54, 0x44, 0x4b, 0x7a,
0x2a, 0x62, 0x16, 0x28, 0x50, 0x42, 0x20, 0xc8,
0x82, 0x65, 0xd2, 0xa2, 0xa4, 0x15, 0x5e, 0x12,
0xbe, 0x81, 0x1b, 0x88, 0x82, 0x46, 0x98, 0x16,
0x24, 0x1d, 0x15, 0x1d, 0x41, 0x13, 0x78, 0x28,
0x58, 0x98, 0x8b, 0x64, 0x8b, 0x44, 0x1b, 0x14,
0x82, 0x86, 0xd4, 0x41, 0x64, 0x15, 0x82, 0x50,
0x44, 0x4d, 0x44, 0x6b, 0x22, 0x2e, 0x24, 0x2e,
0x48, 0x28, 0x82, 0x88, 0x24, 0x82, 0xa4, 0x2f,
0x61, 0x56, 0x22, 0x5a, 0x71, 0x3d, 0x04, 0x40,
0x04, 0x28, 0x24, 0x41, 0x84, 0x00, 0x21, 0x00,
0x80, 0x08, 0x00, 0x80, 0x81, 0x22, 0x08, 0x00,
0x00, 0x14, 0x42, 0x00, 0x00, 0x00, 0x00, 0x44,
0x00, 0x00, 0xa0, 0x12, 0x10, 0x02, 0x00, 0x82,
0x19, 0x01, 0x00, 0x00, 0x42, 0x00, 0xb0, 0x36,
0x03, 0x81, 0x84, 0x42, 0x48, 0x00, 0x20, 0x01,
0x42, 0x10, 0x44, 0x24, 0x82, 0x53, 0x21, 0x00,
0x84, 0x00, 0x26, 0x02, 0x21, 0x12, 0x18, 0x82,
0x88, 0x44, 0xc1, 0x80, 0x96, 0x81, 0x86, 0x05,
0x89, 0x42, 0x28, 0x84, 0x04, 0x00, 0x00, 0x88,
0x10, 0x44, 0x24, 0x82, 0x02, 0x21, 0x90, 0x18,
0x28, 0x82, 0x24, 0x10, 0xf2, 0x7b, 0xb2, 0x60,
0x82, 0x80, 0x84, 0x04, 0x14, 0x80, 0x02, 0x20,
0x44, 0x26, 0x82, 0x92, 0x21, 0x20, 0x18, 0x08,
0x48, 0x28, 0x50, 0x92, 0x12, 0x58, 0x83, 0x88,
0x88, 0x08, 0x20, 0x01, 0x14, 0x20, 0x48, 0x08,
0x48, 0x48, 0x21, 0x44, 0x00, 0x00, 0x40, 0x34,
0x22, 0x28, 0x00, 0x88, 0x84, 0x80, 0x04, 0x10,
0x2a, 0xd1, 0xbe, 0x07, 0x80, 0x04, 0x24, 0x00,
0x12, 0x00, 0x82, 0x44, 0x80, 0x02, 0x00, 0x00,
0x00, 0x42, 0x21, 0x80, 0x01, 0x88, 0x00, 0x00,
0x40, 0x01, 0x40, 0x08, 0x48, 0x80, 0x02, 0x00,
0x40, 0x08, 0x44, 0x12, 0x28, 0x00, 0x00, 0x00,
0x00, 0x21, 0x80, 0xf1, 0xb3, 0x83, 0x00, 0x00,
0x00, 0x11, 0x84, 0x00, 0x11, 0x48, 0x12, 0x00,
0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00,
0x80, 0x02, 0x21, 0x24, 0x00, 0x00, 0x14, 0x24,
0x80, 0x01, 0x88, 0x42, 0x42, 0x00, 0x00, 0x00,
0x00, 0x28, 0x88, 0x00, 0xf0, 0x43, 0x4b, 0xd0,
0x88, 0x71, 0x48, 0x28, 0xa4, 0x44, 0x22, 0x41,
0x00, 0x00, 0x41, 0x45, 0x74, 0x24, 0x24, 0xa6,
0x26, 0x00, 0x00, 0x41, 0x24, 0x45, 0x52, 0x22,
0x27, 0x11, 0x3a, 0xa1, 0x19, 0x82, 0x8a, 0x28,
0x04, 0x2c, 0x91, 0x41, 0x1d, 0x11, 0x15, 0x11,
0x38, 0x88, 0x87, 0x84, 0x4e, 0x44, 0x4a, 0x04,
0x44, 0x00, 0x89, 0x04, 0x41, 0x45, 0x7c, 0x64,
0xb4, 0x22, 0xa2, 0x22, 0x10, 0x02, 0x00, 0x64,
0x2c, 0x42, 0x32, 0x12, 0xef, 0xe7, 0x0f, 0x90,
0x18, 0x20, 0x04, 0x40, 0x01, 0x11, 0x81, 0x20,
0x54, 0xa4, 0x20, 0x02, 0x00, 0x00, 0x80, 0x52,
0x24, 0x00, 0x12, 0x20, 0x18, 0x42, 0x02, 0x00,
0x31, 0x00, 0x89, 0x01, 0x4a, 0x08, 0x14, 0x14,
0x10, 0x11, 0x01, 0x48, 0x41, 0x48, 0x22, 0x12,
0x30, 0x84, 0x00, 0x00, 0x45, 0x42, 0xf4, 0xec,
0xec, 0x00, 0x00, 0x10, 0x04, 0x40, 0x41, 0x08,
0x81, 0x00, 0x40, 0x82, 0x11, 0xc2, 0x94, 0x00,
0x41, 0x80, 0x22, 0x02, 0x19, 0x42, 0x01, 0x81,
0x84, 0x00, 0x80, 0x81, 0x08, 0x82, 0x88, 0x60,
0x42, 0x20, 0x42, 0x01, 0x81, 0x00, 0x00, 0x46,
0x02, 0x20, 0x01, 0x44, 0x00, 0x28, 0x22, 0x45,
0x03, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x81,
0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00,
0x81, 0x00, 0x00, 0x00, 0x20, 0x21, 0x01, 0x00,
0x00, 0x00, 0x00, 0x81, 0x10, 0x08, 0x00, 0x00,
0x00, 0x40, 0x04, 0xf0, 0x2f, 0x68, 0x00, 0x41,
0x00, 0x21, 0x45, 0x01, 0x11, 0xb0, 0x88, 0x84,
0x64, 0x24, 0x10, 0x02, 0x1d, 0x12, 0x10, 0x34,
0x18, 0x48, 0x28, 0x49, 0x32, 0x28, 0x43, 0x22,
0x16, 0x18, 0x01, 0x10, 0x4c, 0x42, 0x22, 0xb1,
0x14, 0x88, 0x28, 0x23, 0x29, 0x28, 0x08, 0x15,
0x04, 0x13, 0xc1, 0x82, 0x81, 0x40, 0x32, 0x48,
0x00, 0x18, 0x10, 0x14, 0xa8, 0x42, 0x82, 0x43,
0x22, 0x02, 0x5f, 0x4f, 0x04, 0x20, 0x41, 0x24,
0xc2, 0x24, 0x11, 0x85, 0x28, 0x41, 0x02, 0x83,
0x24, 0x11, 0x28, 0x68, 0x15, 0x21, 0x21, 0x00,
0x49, 0x32, 0xc4, 0x10, 0x41, 0x01, 0x14, 0x20,
0x44, 0x4c, 0xaa, 0x31, 0x42, 0x2c, 0x08, 0x82,
0x82, 0x41, 0x30, 0x21, 0x24, 0x41, 0x19, 0x22,
0x72, 0x48, 0x98, 0x41, 0x81, 0x83, 0x04, 0x21,
0x16, 0x11, 0x02, 0x18, 0x12, 0x49, 0x82, 0x08,
0x81, 0x43, 0xf2, 0xfd, 0x36, 0x20, 0x03, 0x00,
0x24, 0x44, 0x19, 0x21, 0x12, 0x19, 0x01, 0x81,
0x42, 0x42, 0x00, 0x82, 0x8c, 0x09, 0x11, 0x20,
0x12, 0x04, 0x20, 0x42, 0x49, 0x82, 0x04, 0xa0,
0x42, 0x40, 0x22, 0x01, 0x40, 0x04, 0x2d, 0x24,
0x80, 0x01, 0x11, 0x82, 0x42, 0x12, 0x20, 0x2c,
0x44, 0x32, 0x82, 0x8c, 0x08, 0x30, 0x44, 0x10,
0x04, 0xdf, 0x16, 0x0e, 0x6f, 0x62, 0xd2, 0x22,
0xa2, 0x32, 0x2b, 0x11, 0x12, 0x29, 0x01, 0x2c,
0x51, 0x22, 0x29, 0xf8, 0x12, 0x13, 0x3f, 0x11,
0xb1, 0x81, 0xe9, 0x99, 0xd9, 0x88, 0xf8, 0x88,
0xc1, 0x4e, 0x48, 0x42, 0x1d, 0x49, 0x15, 0xc1,
0x41, 0x95, 0x59, 0x88, 0x4e, 0x48, 0x8f, 0xc4,
0xd4, 0x44, 0xb4, 0x44, 0xe6, 0x42, 0x22, 0xc2,
0x24, 0x80, 0x52, 0x44, 0x45, 0xe4, 0x42, 0xf2,
0x26, 0x26, 0x2d, 0x22, 0x2a, 0xb3, 0x12, 0xa1,
0x81, 0x2b, 0x98, 0x82, 0x2c, 0x59, 0x22, 0x29,
0xf8, 0x12, 0x13, 0x3f, 0x11, 0xb1, 0x81, 0xe9,
0x99, 0xd9, 0x88, 0xb8, 0x88, 0xec, 0x84, 0x24,
0xc4, 0x48, 0x80, 0x54, 0x88, 0x85, 0xe8, 0x84,
0xd4, 0xd3, 0x05, 0x6f, 0x22, 0x72, 0x12, 0xa2,
0x12, 0x1a, 0x31, 0x12, 0x80, 0x01, 0x25, 0x12,
0xc3, 0x13, 0x1f, 0x11, 0x91, 0x89, 0x9e, 0x88,
0x87, 0x94, 0x8b, 0x48, 0x4a, 0x64, 0x84, 0x14,
0x1d, 0x41, 0x50, 0x81, 0x85, 0x98, 0x44, 0x8f,
0x44, 0x74, 0x24, 0xb4, 0x44, 0xa2, 0x22, 0x26,
0x04, 0x28, 0x40, 0x54, 0x64, 0x28, 0x6f, 0x22,
0x72, 0x12, 0xa2, 0x12, 0x9a, 0xb1, 0x12, 0xa8,
0x88, 0x8a, 0x01, 0x2d, 0x82, 0x31, 0x3c, 0xf1,
0x11, 0x11, 0x99, 0xe8, 0x89, 0x78, 0x48, 0xb9,
0x88, 0xa4, 0x44, 0x46, 0x08, 0x48, 0x40, 0x58,
0x88, 0x49, 0xf4, 0x41, 0xed, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4,
0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f,
0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4,
0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f,
0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4,
0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f,
0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4,
0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f,
0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4,
0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f,
0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4,
0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f,
0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4,
0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f,
0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4,
0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f,
0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x40, 0x21, 0x04,
0x9c, 0xd4, 0x34, 0x01, 0x26, 0x68, 0x82, 0x41,
0x48, 0x69, 0x01, 0x8d, 0x85, 0x86, 0x04, 0xa4,
0xe0, 0x21, 0xd2, 0x28, 0x42, 0x22, 0x08, 0x00,
0x82, 0x19, 0x01, 0x88, 0x88, 0x80, 0x89, 0x31,
0x48, 0x46, 0xb3, 0x48, 0x62, 0x14, 0x00, 0x84,
0x14, 0x41, 0x45, 0x48, 0x88, 0x2c, 0x0a, 0x10,
0x08, 0x4c, 0x02, 0x24, 0x1a, 0x22, 0xa1, 0x29,
0x2c, 0x22, 0x08, 0x63, 0xd8, 0xfc, 0x4c, 0x82,
0x56, 0x81, 0x35, 0x08, 0x89, 0x94, 0x4c, 0x4b,
0x14, 0x49, 0xa4, 0x24, 0x4b, 0x29, 0x19, 0x82,
0xa3, 0x12, 0x81, 0x4d, 0x23, 0x49, 0xc2, 0x24,
0xad, 0x44, 0x49, 0xb1, 0x11, 0xfe, 0x38, 0x42,
0x8a, 0xe1, 0x29, 0xf4, 0x84, 0x58, 0x27, 0x24,
0xe8, 0x2f, 0x32, 0x31, 0x11, 0x3f, 0xe1, 0xf2,
0x18, 0x81, 0x87, 0x16, 0x1d, 0xcc, 0x4c, 0x38,
0x88, 0x74, 0x28, 0x1d, 0x68, 0x93, 0xc1, 0x43,
0x8f, 0x48, 0x35, 0x48, 0x4a, 0xe3, 0x46, 0x61,
0x42, 0x37, 0x64, 0x43, 0xa2, 0x21, 0x4c, 0x4a,
0xdc, 0x21, 0xf8, 0x44, 0x28, 0x69, 0x62, 0x64,
0x26, 0x94, 0x42, 0x2b, 0x18, 0x83, 0xc1, 0x98,
0x16, 0xf2, 0xb3, 0xad, 0x30, 0x21, 0x81, 0x11,
0x50, 0x48, 0x25, 0x8c, 0x83, 0x94, 0x24, 0x40,
0x21, 0xc1, 0x81, 0x84, 0x47, 0x12, 0x00, 0x84,
0x89, 0x62, 0x34, 0xac, 0x02, 0x70, 0x82, 0x28,
0x7c, 0x81, 0xd2, 0x21, 0x02, 0x16, 0x48, 0x08,
0x10, 0x24, 0x14, 0x32, 0x23, 0x90, 0x11, 0x42,
0x00, 0x18, 0x12, 0x86, 0x22, 0x28, 0x82, 0x71,
0x84, 0x08, 0x45, 0xd1, 0x24, 0x04, 0x20, 0x83,
0x89, 0x12, 0x08, 0xf0, 0xc9, 0x92, 0x24, 0x48,
0x10, 0x62, 0x14, 0x12, 0x00, 0x80, 0xe4, 0x68,
0x37, 0x14, 0x90, 0x1c, 0x82, 0x10, 0x5a, 0x42,
0x42, 0x44, 0x38, 0x48, 0x82, 0xc8, 0x46, 0x04,
0x3a, 0x04, 0x92, 0x4c, 0x4a, 0x31, 0x21, 0x41,
0x81, 0x15, 0x78, 0x61, 0x04, 0x28, 0x50, 0x18,
0x2b, 0x18, 0x44, 0x48, 0x20, 0x72, 0x45, 0x02,
0x28, 0x10, 0x28, 0x1a, 0x0a, 0x49, 0x04, 0x48,
0x21, 0x50, 0x28, 0x44, 0x9d, 0x9c, 0x00, 0x46,
0x11, 0x48, 0x88, 0x24, 0x84, 0x54, 0x48, 0x00,
0x22, 0x28, 0x00, 0xc0, 0x24, 0x22, 0x26, 0x82,
0x21, 0x08, 0x20, 0x41, 0x02, 0x21, 0x12, 0x40,
0x83, 0x89, 0xb1, 0x19, 0x24, 0x28, 0x48, 0x08,
0x94, 0x00, 0x46, 0x14, 0x68, 0x42, 0x8c, 0x24,
0x04, 0x41, 0x00, 0x00, 0x28, 0x26, 0x34, 0x22,
0x21, 0x29, 0xc2, 0x12, 0x12, 0x12, 0x88, 0x4f,
0x92, 0x03, 0x00, 0x00, 0x11, 0x50, 0x84, 0x28,
0x00, 0x00, 0x22, 0x41, 0x00, 0x90, 0x16, 0x24,
0x80, 0x89, 0x01, 0x12, 0x00, 0x10, 0x11, 0x02,
0x89, 0x2c, 0x28, 0x04, 0x80, 0x24, 0x14, 0x08,
0x15, 0x28, 0x44, 0xc8, 0x24, 0x41, 0x28, 0x00,
0x28, 0x44, 0x00, 0x80, 0x11, 0x04, 0x88, 0x82,
0x88, 0x16, 0xf2, 0x8a, 0x66, 0x00, 0x20, 0x01,
0x00, 0x00, 0x10, 0x08, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00,
0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x48,
0x80, 0x01, 0x00, 0x20, 0x04, 0x00, 0x42, 0xcf,
0xe1, 0x0a, 0x52, 0x24, 0x40, 0x21, 0x81, 0x91,
0x28, 0x00, 0x16, 0x11, 0x88, 0x41, 0x89, 0x91,
0x8a, 0x22, 0x18, 0x28, 0x14, 0x30, 0x52, 0x43,
0x86, 0x88, 0x42, 0x91, 0x24, 0x10, 0x88, 0x44,
0x05, 0x24, 0x60, 0xa8, 0x34, 0x90, 0x81, 0x90,
0x81, 0x12, 0xc2, 0x10, 0x19, 0x48, 0x51, 0x82,
0x80, 0x88, 0x04, 0x48, 0x22, 0x52, 0x88, 0x41,
0x28, 0x41, 0x60, 0x82, 0x5b, 0x69, 0x90, 0x24,
0x45, 0x11, 0x94, 0x14, 0x91, 0x89, 0x74, 0x14,
0x91, 0x21, 0xcc, 0x94, 0x68, 0x29, 0xb8, 0x48,
0x28, 0x65, 0x44, 0x4c, 0x41, 0x64, 0x62, 0x51,
0x4c, 0xdd, 0x94, 0x17, 0x01, 0x36, 0x64, 0x84,
0x84, 0x24, 0x45, 0x83, 0xb6, 0x11, 0x88, 0x31,
0x22, 0xcb, 0x25, 0x43, 0x04, 0x16, 0x64, 0x61,
0xc0, 0x22, 0x44, 0x81, 0x2c, 0x42, 0xb2, 0x84,
0x06, 0x1a, 0xee, 0x34, 0xd8, 0x18, 0x26, 0x24,
0x18, 0xc6, 0x24, 0x23, 0x34, 0xa4, 0x81, 0x46,
0xba, 0x88, 0x15, 0xb8, 0xa8, 0x01, 0x2f, 0xc2,
0x08, 0x2a, 0x44, 0x04, 0x47, 0x11, 0x93, 0xa1,
0x41, 0x36, 0x94, 0x21, 0xc1, 0x16, 0x41, 0x98,
0xc8, 0x9c, 0x61, 0x41, 0x8c, 0xc9, 0x24, 0x2a,
0xd1, 0x14, 0xa2, 0x94, 0x83, 0x72, 0x52, 0x31,
0x64, 0x98, 0x2a, 0x04, 0x26, 0x44, 0x62, 0x82,
0x92, 0x53, 0x01, 0x4c, 0x47, 0x74, 0x88, 0x42,
0x01, 0x82, 0x70, 0x82, 0xc1, 0x18, 0x4a, 0x0a,
0x13, 0x04, 0x4e, 0xb1, 0xb7, 0x24, 0x89, 0x22,
0x88, 0x44, 0xb4, 0x24, 0x34, 0x22, 0x43, 0x8d,
0x88, 0x84, 0x13, 0x84, 0xc1, 0x28, 0xdb, 0x56,
0x90, 0x14, 0x11, 0x61, 0x00, 0x84, 0x85, 0x01,
0x42, 0x8c, 0x96, 0x82, 0x12, 0x42, 0x48, 0x25,
0x04, 0x64, 0x40, 0xb5, 0x15, 0x04, 0xc0, 0x24,
0x84, 0x85, 0x41, 0x42, 0x85, 0x64, 0x14, 0x24,
0x28, 0xa4, 0x42, 0x60, 0x41, 0x6d, 0x12, 0x11,
0x22, 0x44, 0x00, 0x25, 0xe2, 0xc8, 0x12, 0x08,
0x88, 0x19, 0x24, 0x24, 0x18, 0x02, 0x42, 0x22,
0x81, 0x45, 0xb8, 0x4a, 0x48, 0x98, 0xa8, 0xf0,
0xfc, 0x2d, 0x00, 0x1e, 0x24, 0x80, 0x42, 0x82,
0x02, 0x28, 0x10, 0x01, 0x11, 0x21, 0x84, 0x00,
0x14, 0x50, 0x42, 0x00, 0xc0, 0x24, 0x00, 0x00,
0x13, 0x62, 0x11, 0x43, 0x02, 0x48, 0x28, 0x24,
0x9a, 0x12, 0x04, 0x1c, 0x28, 0x01, 0x40, 0x01,
0x18, 0x48, 0x25, 0x31, 0x11, 0xa0, 0x48, 0x00,
0x42, 0xb2, 0xa3, 0x24, 0x81, 0x01, 0x81, 0x48,
0xfb, 0xff, 0x30, 0x42, 0x14, 0x25, 0xc5, 0x12,
0x94, 0x8b, 0x14, 0x85, 0xb1, 0x18, 0xf4, 0x48,
0x22, 0x1a, 0x36, 0x18, 0x83, 0x16, 0x19, 0x82,
0x99, 0x88, 0x4d, 0x82, 0x26, 0xbc, 0x88, 0x02,
0x43, 0xc8, 0x64, 0x11, 0xc4, 0x62, 0x27, 0x16,
0x64, 0xc4, 0x2b, 0x24, 0x21, 0x2d, 0x42, 0x8a,
0x82, 0x34, 0x52, 0x90, 0x22, 0x12, 0x00, 0x46,
0xc4, 0x2a, 0x46, 0x76, 0x18, 0xe4, 0x82, 0x34,
0x91, 0x8c, 0x67, 0x82, 0x9b, 0x84, 0xa4, 0x16,
0xa2, 0x12, 0x4b, 0x18, 0x61, 0x44, 0x41, 0x20,
0x89, 0xc6, 0x28, 0xff, 0x21, 0x03, 0x30, 0x34,
0x11, 0x2a, 0x41, 0xcb, 0x18, 0x14, 0x89, 0x21,
0x92, 0x21, 0x40, 0x53, 0x18, 0x84, 0x1a, 0x08,
0x44, 0x2c, 0xa2, 0x28, 0x00, 0x48, 0x4c, 0x42,
0x08, 0x2b, 0x24, 0x45, 0x72, 0x29, 0x94, 0x21,
0x41, 0x21, 0x29, 0xa4, 0x42, 0x4e, 0x12, 0x88,
0x27, 0x42, 0x18, 0x00, 0x40, 0x68, 0x14, 0x23,
0x01, 0x1f, 0x21, 0x98, 0x31, 0x81, 0x83, 0x84,
0x08, 0x32, 0x5a, 0x28, 0x99, 0x44, 0x00, 0x00,
0x81, 0x9f, 0xef, 0x0d, 0x23, 0x14, 0x51, 0x42,
0x10, 0xa2, 0x42, 0x81, 0x4a, 0xc2, 0x4a, 0x52,
0x83, 0xe1, 0x82, 0x04, 0x21, 0xc0, 0x88, 0x17,
0x28, 0x45, 0x48, 0x0c, 0x43, 0x38, 0x24, 0x14,
0x41, 0x4a, 0x12, 0x01, 0x30, 0x52, 0x23, 0x82,
0xa4, 0x28, 0x10, 0xa2, 0x21, 0x00, 0x1c, 0x28,
0x31, 0x44, 0x26, 0x12, 0x54, 0x84, 0x8b, 0x61,
0x48, 0x46, 0xe8, 0x12, 0x61, 0x18, 0x89, 0x74,
0x12, 0x02, 0x41, 0x67, 0x22, 0x84, 0x16, 0x24,
0xa1, 0x18, 0x83, 0xa6, 0x42, 0xdf, 0xce, 0x46,
0xa2, 0x24, 0x42, 0x44, 0x41, 0x10, 0x12, 0x28,
0x21, 0xc1, 0x22, 0x2e, 0x18, 0x1e, 0x48, 0x83,
0xc3, 0x98, 0x49, 0x41, 0x94, 0x24, 0x48, 0x49,
0xd4, 0x22, 0x64, 0x31, 0x66, 0x0c, 0x38, 0x41,
0x26, 0xb8, 0x24, 0x24, 0x93, 0x28, 0x18, 0x42,
0xd9, 0x64, 0x23, 0x49, 0x92, 0x12, 0x19, 0x22,
0x15, 0xc8, 0x91, 0x4c, 0x42, 0x81, 0x24, 0xa1,
0x24, 0x28, 0xa0, 0x48, 0x30, 0x83, 0x48, 0x88,
0x8c, 0x01, 0x89, 0x84, 0x64, 0x22, 0xc6, 0xa8,
0x12, 0x2a, 0xf1, 0xd9, 0x1f, 0x00, 0x42, 0x00,
0x10, 0x01, 0x24, 0x85, 0x11, 0x14, 0x44, 0x82,
0x62, 0x24, 0x50, 0x18, 0x21, 0x80, 0x21, 0x41,
0x02, 0x28, 0x49, 0x31, 0x42, 0x82, 0x11, 0x10,
0x01, 0x81, 0x15, 0x02, 0x42, 0x81, 0x20, 0x44,
0x02, 0x84, 0x18, 0xc9, 0x28, 0x14, 0x98, 0x44,
0x73, 0x08, 0x38, 0x4c, 0x01, 0x25, 0x08, 0x84,
0x18, 0x70, 0x88, 0x82, 0x12, 0x68, 0x81, 0x6d,
0x6f, 0x40, 0x02, 0x8c, 0x52, 0x81, 0x18, 0x16,
0xd2, 0x41, 0x21, 0x94, 0x24, 0x58, 0x00, 0x40,
0x04, 0x23, 0x84, 0x64, 0x41, 0x60, 0x42, 0x44,
0xb0, 0x44, 0x11, 0x88, 0x02, 0x30, 0x44, 0x2d,
0x14, 0x8c, 0x62, 0x41, 0x12, 0x00, 0x15, 0x22,
0x04, 0x3a, 0x08, 0x25, 0x02, 0x18, 0x31, 0x18,
0x86, 0xc8, 0x48, 0x00, 0x00, 0x4a, 0xa3, 0x24,
0x18, 0x26, 0x22, 0x08, 0x00, 0x86, 0xf4, 0xa5,
0x7a, 0x20, 0x12, 0x32, 0x28, 0x45, 0x88, 0x71,
0x12, 0xc1, 0x1d, 0x52, 0x6d, 0x19, 0x49, 0x36,
0x38, 0x87, 0x25, 0x8c, 0x91, 0xd4, 0x61, 0x83,
0x04, 0x60, 0x25, 0x4a, 0x52, 0x14, 0x42, 0x4b,
0x41, 0x89, 0x92, 0x62, 0x83, 0xb2, 0x21, 0x94,
0x54, 0x4c, 0x13, 0x38, 0x44, 0x4e, 0x18, 0x1a,
0xd2, 0x42, 0xc2, 0x11, 0x1b, 0x42, 0x12, 0xb6,
0x78, 0x12, 0xd1, 0x68, 0x62, 0x11, 0xcc, 0xac,
0x41, 0x32, 0x6c, 0xce, 0x89, 0x42, 0x18, 0x6b,
0x81, 0x2c, 0xa4, 0x87, 0x8b, 0x25, 0x84, 0x83,
0x85, 0x04, 0x2a, 0x68, 0x81, 0x4f, 0x88, 0xf2,
0x1a, 0x12, 0x90, 0x42, 0x10, 0x14, 0x01, 0x10,
0x02, 0x22, 0x12, 0x21, 0x00, 0x84, 0x2c, 0x11,
0xf5, 0x42, 0x24, 0x4b, 0x41, 0x44, 0x43, 0x91,
0x12, 0x47, 0x82, 0x28, 0x41, 0x44, 0x40, 0x64,
0x22, 0x85, 0xa1, 0x12, 0x83, 0x51, 0x24, 0xc0,
0x42, 0x10, 0x02, 0x20, 0x18, 0x02, 0x2c, 0x11,
0x31, 0x48, 0x84, 0x42, 0x82, 0x10, 0x01, 0x84,
0x20, 0xc1, 0x22, 0x82, 0x89, 0xca, 0x48, 0x28,
0xf0, 0x6f, 0xdf, 0x00, 0x80, 0x81, 0x21, 0x01,
0x18, 0x43, 0x01, 0x40, 0x04, 0x46, 0x02, 0x80,
0x11, 0x88, 0x05, 0x18, 0x42, 0x20, 0x04, 0x00,
0x48, 0x61, 0x20, 0x61, 0x44, 0x00, 0x22, 0x42,
0x00, 0x24, 0x20, 0xa2, 0x28, 0x22, 0x28, 0x22,
0x46, 0x28, 0x03, 0x20, 0x24, 0x88, 0x81, 0x82,
0x13, 0x22, 0x04, 0x32, 0x38, 0xf0, 0xa5, 0x7c,
0x20, 0x02, 0x00, 0x22, 0x41, 0x81, 0x00, 0x20,
0x01, 0x18, 0x80, 0x01, 0x19, 0x15, 0x8a, 0x43,
0xc2, 0x12, 0x8c, 0x04, 0x00, 0x18, 0x00, 0x43,
0x85, 0x04, 0x19, 0x81, 0xa4, 0x41, 0x00, 0x21,
0xc0, 0x12, 0x12, 0x12, 0x42, 0x10, 0x08, 0x42,
0x20, 0x14, 0x24, 0x84, 0x88, 0x04, 0x81, 0xe0,
0x11, 0x08, 0x81, 0x42, 0x6f, 0x13, 0x0d, 0x20,
0x01, 0x48, 0x26, 0x28, 0x01, 0x28, 0x20, 0x01,
0x2c, 0x42, 0x0a, 0x21, 0x24, 0x24, 0xc0, 0x42,
0x10, 0x08, 0x12, 0x00, 0x12, 0x2d, 0x12, 0xc8,
0x00, 0x00, 0x2c, 0x02, 0x28, 0xc0, 0x33, 0x28,
0x48, 0x00, 0x90, 0x14, 0x52, 0x28, 0x80, 0x52,
0x84, 0x00, 0x22, 0x2a, 0x08, 0x42, 0x22, 0x21,
0x48, 0x20, 0xf2, 0x1e, 0x79, 0x00, 0x11, 0x48,
0x80, 0x11, 0x61, 0x44, 0x12, 0x38, 0x00, 0x81,
0x00, 0x26, 0x14, 0x02, 0x10, 0x06, 0x4c, 0x24,
0x92, 0x42, 0x48, 0x2e, 0x14, 0x00, 0xa0, 0x42,
0xa0, 0x49, 0x48, 0x12, 0x11, 0x48, 0x48, 0x48,
0x48, 0x22, 0x00, 0x00, 0x80, 0x11, 0x04, 0x10,
0x08, 0x98, 0x80, 0x01, 0x00, 0x00, 0xf0, 0xca,
0xd3, 0x20, 0x22, 0x25, 0x02, 0x60, 0x43, 0x84,
0x22, 0x12, 0x10, 0x68, 0x22, 0x83, 0x01, 0x23,
0x01, 0x4e, 0x18, 0xa0, 0x34, 0x48, 0x38, 0x48,
0x90, 0x42, 0x60, 0x28, 0x41, 0x20, 0x81, 0x02,
0x1a, 0x14, 0x82, 0x91, 0x28, 0x2c, 0x04, 0x00,
0x18, 0x44, 0x18, 0x00, 0x4d, 0x28, 0x80, 0x02,
0x80, 0x08, 0x42, 0x21, 0xa8, 0x30, 0x48, 0x20,
0x81, 0xf4, 0xca, 0xfa, 0x00, 0x80, 0x45, 0x04,
0x80, 0x11, 0x08, 0x20, 0x12, 0x02, 0x81, 0x80,
0x01, 0x89, 0x05, 0x2c, 0x01, 0x22, 0x28, 0x80,
0x01, 0x88, 0x42, 0xa0, 0x41, 0x14, 0x20, 0x21,
0x02, 0x84, 0x88, 0x10, 0x04, 0x14, 0x48, 0xa0,
0x42, 0x24, 0x2a, 0x04, 0x29, 0x44, 0x81, 0x04,
0x88, 0x42, 0x29, 0x04, 0x28, 0x16, 0x94, 0x22,
0x41, 0x6f, 0x13, 0x02, 0x4c, 0x01, 0x48, 0x40,
0x04, 0x28, 0x10, 0x14, 0x04, 0x12, 0x28, 0x1a,
0x02, 0x24, 0x00, 0x14, 0x00, 0x10, 0x22, 0x81,
0x01, 0xc8, 0x38, 0x41, 0x80, 0x22, 0x82, 0x04,
0x14, 0x28, 0x80, 0x55, 0x32, 0x22, 0x20, 0xc2,
0x42, 0xc0, 0x41, 0x12, 0x4c, 0x04, 0x88, 0x20,
0x04, 0x00, 0x1a, 0x04, 0x20, 0x14, 0xf2, 0xb9,
0x62, 0x40, 0x28, 0x02, 0x1b, 0x41, 0xc1, 0x24,
0x10, 0x98, 0x44, 0x20, 0x21, 0x01, 0x8b, 0x21,
0x00, 0x20, 0x12, 0x02, 0x40, 0xa8, 0x21, 0x00,
0x40, 0xc1, 0x14, 0x31, 0x20, 0x01, 0x6c, 0x82,
0x04, 0xc0, 0x22, 0x18, 0x38, 0xc0, 0x32, 0xe0,
0x11, 0x42, 0x08, 0x10, 0x11, 0x18, 0x08, 0x26,
0x86, 0xa1, 0x42, 0x38, 0x26, 0x24, 0xb1, 0x22,
0x04, 0x22, 0xff, 0xaa, 0x07, 0x84, 0x81, 0x2e,
0x42, 0x28, 0x00, 0x43, 0x12, 0x04, 0x22, 0x27,
0x26, 0xc4, 0x41, 0x28, 0x10, 0x12, 0x04, 0xb0,
0x22, 0xd4, 0x81, 0x22, 0x51, 0x43, 0x21, 0x1c,
0x01, 0x88, 0x80, 0x02, 0x00, 0x14, 0x11, 0x82,
0x84, 0x81, 0x48, 0x48, 0x00, 0x18, 0x80, 0x01,
0x40, 0x04, 0x2c, 0x2a, 0x02, 0x10, 0x04, 0x12,
0x42, 0x70, 0x42, 0x82, 0xf1, 0x9d, 0xc2, 0x00,
0x12, 0x12, 0x1a, 0xa3, 0x13, 0x12, 0x12, 0x81,
0x41, 0x4c, 0x72, 0x42, 0x84, 0xb2, 0x38, 0xc5,
0x12, 0x3a, 0xa1, 0x11, 0x4e, 0x1c, 0x7a, 0xe5,
0x14, 0xa7, 0x53, 0x2b, 0x54, 0x87, 0x82, 0x6e,
0x65, 0x29, 0x54, 0x14, 0x24, 0x43, 0xd4, 0x42,
0xf4, 0x54, 0x61, 0x1a, 0xa1, 0x54, 0x1e, 0x52,
0x7a, 0x86, 0xa2, 0x6c, 0x48, 0x2f, 0x82, 0xb6,
0x12, 0xf2, 0x23, 0x66, 0x2b, 0x13, 0x2a, 0x33,
0x72, 0x6a, 0xa3, 0x34, 0x4a, 0xf6, 0x42, 0x24,
0x28, 0x42, 0x19, 0xa8, 0x8c, 0x4b, 0x82, 0xca,
0x31, 0x24, 0xab, 0x14, 0x2a, 0xa6, 0x51, 0x3a,
0x87, 0xb7, 0x32, 0xf6, 0x17, 0x15, 0xa0, 0x21,
0x4e, 0x31, 0x38, 0x1f, 0x44, 0xc4, 0x2c, 0x4c,
0xd3, 0xc6, 0xe7, 0x82, 0xc3, 0x24, 0x18, 0x18,
0xab, 0x13, 0x84, 0x23, 0x01, 0x25, 0x12, 0x18,
0x6a, 0x22, 0x25, 0x32, 0x24, 0x23, 0xe4, 0x21,
0x01, 0x22, 0x1a, 0x81, 0xb5, 0xb4, 0x21, 0x22,
0x86, 0x48, 0x41, 0xa6, 0x52, 0x22, 0x2c, 0xa2,
0x18, 0x2c, 0x21, 0x85, 0xe2, 0x41, 0x08, 0x11,
0x26, 0x38, 0x21, 0x3a, 0x31, 0x21, 0xc1, 0x8a,
0x14, 0xa2, 0x35, 0xa8, 0x5e, 0x32, 0x28, 0x16,
0x62, 0x28, 0x43, 0x54, 0x28, 0xf0, 0x51, 0xe7,
0x60, 0x42, 0x84, 0x26, 0x02, 0xc1, 0x45, 0x31,
0x28, 0x47, 0x41, 0x5a, 0x01, 0x8f, 0x23, 0x42,
0x5a, 0x62, 0x85, 0x58, 0x26, 0xf0, 0x13, 0x42,
0xa4, 0x63, 0x21, 0xf4, 0x18, 0x29, 0x1a, 0x06,
0x52, 0x20, 0x58, 0x32, 0x46, 0xc2, 0x14, 0x48,
0x47, 0x13, 0x4a, 0x82, 0x71, 0x53, 0x11, 0x29,
0x44, 0x03, 0x18, 0x10, 0x81, 0x37, 0x14, 0xab,
0x41, 0x8d, 0x1c, 0x48, 0x42, 0x2d, 0x48, 0x85,
0x8c, 0x26, 0xb8, 0x22, 0x94, 0x42, 0x2a, 0xbc,
0x44, 0x61, 0x86, 0x20, 0x37, 0x44, 0x8f, 0x9c,
0x07, 0x44, 0x22, 0x44, 0x22, 0x20, 0x02, 0x20,
0x21, 0x42, 0x08, 0x40, 0x12, 0x04, 0x41, 0x2c,
0x12, 0xc4, 0x22, 0x41, 0x83, 0x14, 0x84, 0x12,
0x04, 0x80, 0x02, 0x42, 0x00, 0x18, 0x00, 0x10,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,
0x01, 0x16, 0x08, 0x84, 0x40, 0x08, 0xdf, 0x17,
0x09, 0x22, 0x4f, 0x43, 0xf1, 0x34, 0x16, 0x3f,
0x11, 0x61, 0x41, 0x4f, 0x63, 0xf3, 0x1a, 0x1c,
0xc5, 0xec, 0x46, 0xf6, 0x24, 0x26, 0x2b, 0x57,
0x8d, 0x1a, 0x3e, 0x18, 0xcd, 0x1c, 0x2b, 0x11,
0x2f, 0x41, 0xf1, 0x58, 0x1c, 0xcf, 0x65, 0xf1,
0x53, 0x31, 0x4f, 0x61, 0xd1, 0x57, 0xf5, 0x2c,
0x74, 0x5f, 0x17, 0xf5, 0x64, 0x64, 0x5f, 0x52,
0x02, 0x5f, 0x51, 0xf4, 0x74, 0x66, 0x7f, 0x13,
0xa3, 0x36, 0x1f, 0x14, 0xe4, 0x25, 0xf5, 0x36,
0x36, 0x22, 0x1f, 0x1e, 0xee, 0x24, 0xa4, 0xab,
0x16, 0xf2, 0x37, 0x37, 0x2b, 0x21, 0x5f, 0x73,
0xb3, 0x52, 0xf6, 0x31, 0x33, 0x2b, 0x77, 0x5f,
0x77, 0xb3, 0x72, 0xf7, 0x21, 0x23, 0xaf, 0x84,
0x74, 0x41, 0xb3, 0x42, 0x74, 0x84, 0x76, 0x82,
0xf2, 0x56, 0x46, 0xab, 0xcc, 0xcf, 0x46, 0xa3,
0x11, 0xcf, 0xc3, 0xb3, 0x38, 0xf1, 0x3c, 0x24,
0x5d, 0xbf, 0xf0, 0x34, 0x34, 0x4f, 0xc3, 0xf7,
0x34, 0x36, 0x3f, 0x13, 0xf3, 0x34, 0x14, 0x3e,
0x26, 0xef, 0x83, 0xd1, 0xcc, 0xf1, 0x74, 0x74,
0x4f, 0x61, 0xf1, 0x7e, 0x5c, 0xaf, 0xa3, 0xf1,
0x32, 0x38, 0x4f, 0xe1, 0xf1, 0x16, 0x34, 0x2f,
0x61, 0xf1, 0x5a, 0x1c, 0xcf, 0xc7, 0xf7, 0x77,
0x65, 0x7a, 0xf7, 0x33, 0x39, 0x6f, 0xc2, 0xf7,
0x55, 0x51, 0x2b, 0x76, 0x1f, 0x12, 0xf2, 0x84,
0x86, 0x3f, 0x35, 0xf5, 0x56, 0x56, 0x3f, 0x51,
0xa7, 0x73, 0x1f, 0x16, 0xe6, 0x37, 0xf6, 0x26,
0x66, 0x2b, 0x67, 0x9f, 0x9e, 0xaa, 0x66, 0xba,
0xef, 0x23, 0xf3, 0x37, 0x37, 0x2b, 0x33, 0x5f,
0x73, 0xb3, 0x72, 0xf7, 0x71, 0x73, 0x2b, 0x77,
0x5f, 0x77, 0xf7, 0x76, 0x74, 0x1f, 0x36, 0xb6,
0x6a, 0xf6, 0xc9, 0x83, 0x2b, 0xec, 0x4f, 0x6d,
0xfd, 0x92, 0xd2, 0x6f, 0x65, 0xb5, 0xda, 0xfd,
0x7c, 0x74, 0x8f, 0x83, 0xf3, 0x7e, 0x3c, 0x8b,
0x77, 0xef, 0x47, 0xf7, 0x2c, 0x7e, 0xf0, 0x34,
0x34, 0x3a, 0xe5, 0x23, 0xf1, 0x37, 0x15, 0xcf,
0x81, 0xf3, 0x34, 0x36, 0xef, 0xc1, 0xf1, 0x18,
0x1c, 0x6e, 0x64, 0x4f, 0x63, 0xf3, 0x72, 0x5c,
0xaf, 0x81, 0xf1, 0x12, 0x3a, 0x2f, 0x81, 0xf1,
0x16, 0x14, 0x16, 0xf2, 0x5e, 0x58, 0x8f, 0x27,
0xf1, 0x77, 0x35, 0x7e, 0x72, 0x3f, 0x93, 0xf5,
0x3e, 0x78, 0x1f, 0x55, 0xa5, 0x76, 0x1f, 0x12,
0xc2, 0x82, 0x5f, 0x75, 0xf5, 0x74, 0x72, 0x7f,
0x53, 0xa7, 0x77, 0x1f, 0x14, 0xe4, 0x33, 0xf7,
0x36, 0x36, 0x2a, 0xf2, 0xe1, 0xe9, 0x6e, 0x62,
0xba, 0xef, 0x23, 0xf3, 0x37, 0x37, 0x2b, 0x33,
0x5f, 0x73, 0xb3, 0x72, 0xf7, 0x71, 0x73, 0x2b,
0x57, 0x5f, 0x77, 0xf7, 0x62, 0x64, 0x1f, 0x36,
0xb6, 0x42, 0xf6, 0x41, 0x43, 0x2b, 0x44, 0x4f,
0x64, 0xb5, 0x72, 0xf9, 0x54, 0x46, 0x2f, 0x8f,
0xfc, 0x74, 0x74, 0x8f, 0x83, 0xf3, 0x36, 0x34,
0x3e, 0x38, 0x4f, 0x46, 0xf3, 0xc8, 0xa6, 0xa0,
0x33, 0xcf, 0x42, 0xe3, 0x23, 0xf3, 0x37, 0x35,
0xcf, 0xc3, 0xf3, 0x34, 0x32, 0x6f, 0xc3, 0xd3,
0x8c, 0xf1, 0x54, 0x54, 0x4f, 0x63, 0xf3, 0x7a,
0x7c, 0xaf, 0x83, 0xf3, 0x12, 0x38, 0x4f, 0xe1,
0xb1, 0x32, 0xe1, 0x21, 0xf1, 0x5e, 0x5a, 0xef,
0x47, 0xf7, 0x73, 0x73, 0x2b, 0x77, 0x7f, 0xd7,
0xf3, 0x74, 0x78, 0x1f, 0x55, 0x85, 0x54, 0x55,
0x4d, 0x86, 0x3f, 0x15, 0xe5, 0x67, 0xf7, 0x37,
0x55, 0x3a, 0xf7, 0x71, 0x71, 0x7e, 0x62, 0x6f,
0x63, 0xb3, 0x32, 0xf2, 0xe1, 0xe9, 0x6e, 0x62,
0xbe, 0xb2, 0x3a, 0xf3, 0x37, 0x37, 0x2b, 0x33,
0x5f, 0x73, 0xb3, 0x72, 0xf7, 0x71, 0x73, 0xab,
0x67, 0x5f, 0x76, 0xf6, 0x62, 0x44, 0x1f, 0x36,
0xf6, 0x4a, 0x68, 0x9f, 0xbc, 0xbc, 0x62, 0xfc,
0xd4, 0x56, 0x2f, 0x2d, 0xfd, 0x56, 0x56, 0x2f,
0x8d, 0xfd, 0x74, 0x74, 0x3a, 0xf3, 0x7c, 0x7c,
0x7e, 0x68, 0x4f, 0x46, 0xf7, 0xf8, 0xb5, 0x00,
0x90, 0x14, 0x10, 0x44, 0x98, 0x14, 0x16, 0x08,
0x20, 0x22, 0x01, 0x12, 0x20, 0x41, 0xa4, 0x41,
0x64, 0x12, 0x42, 0x20, 0x04, 0x00, 0x44, 0x21,
0x42, 0x18, 0x42, 0x00, 0x2b, 0x12, 0x42, 0x00,
0x00, 0x00, 0x20, 0x21, 0x02, 0x22, 0x00, 0x48,
0x80, 0x44, 0x82, 0x04, 0x12, 0x83, 0x24, 0x21,
0x04, 0x1f, 0xaf, 0x06, 0x18, 0x44, 0x00, 0x18,
0x00, 0x10, 0x04, 0x18, 0x12, 0x21, 0x84, 0x2d,
0x14, 0x10, 0x42, 0x18, 0x92, 0x44, 0x81, 0xc0,
0x14, 0x40, 0x04, 0x12, 0x48, 0x44, 0x20, 0x41,
0x82, 0x82, 0x04, 0x24, 0x1a, 0x42, 0x82, 0xa2,
0x12, 0xa0, 0x16, 0x10, 0x88, 0x24, 0x04, 0xc0,
0x48, 0x42, 0x80, 0x08, 0xe0, 0x82, 0x24, 0x24,
0x02, 0x26, 0xe9, 0x5e, 0x0b, 0x2c, 0xf4, 0x11,
0x24, 0x85, 0xf3, 0x11, 0x24, 0x83, 0xf4, 0x11,
0x24, 0xa7, 0x14, 0x1f, 0x41, 0xb6, 0x4a, 0xd1,
0x41, 0xb2, 0x4a, 0x99, 0x21, 0xaf, 0x24, 0x99,
0x45, 0xab, 0x94, 0x53, 0xf2, 0x4a, 0x93, 0x43,
0xf2, 0x42, 0x93, 0x47, 0x82, 0xaf, 0x14, 0xf9,
0x24, 0x48, 0x1c, 0xf9, 0x24, 0x4a, 0x1c, 0xf8,
0x24, 0x4a, 0x16, 0xf1, 0x24, 0x4a, 0xd6, 0xf1,
0x24, 0x4a, 0x96, 0xc5, 0xca, 0x9e, 0x24, 0xac,
0xf5, 0x91, 0x24, 0x2c, 0xf4, 0x91, 0x24, 0xa5,
0xf3, 0x91, 0x24, 0x83, 0xf4, 0x91, 0x24, 0xeb,
0x84, 0x1f, 0x48, 0xb2, 0x4a, 0xd1, 0x41, 0xb2,
0x4a, 0x99, 0x21, 0xab, 0x94, 0x51, 0xaf, 0x44,
0x39, 0x24, 0xab, 0x94, 0x43, 0xf2, 0x42, 0x92,
0x47, 0x8a, 0x29, 0xf9, 0x24, 0x48, 0x98, 0x4f,
0xa2, 0xf4, 0xaa, 0x72, 0xc0, 0x42, 0x1f, 0x81,
0x14, 0xb8, 0x11, 0x34, 0x48, 0x17, 0x41, 0xa3,
0x54, 0x41, 0xab, 0x16, 0x1d, 0x24, 0x2f, 0x44,
0x99, 0x21, 0xaf, 0x44, 0x19, 0xb1, 0x48, 0x3b,
0x21, 0xa9, 0x19, 0x81, 0x59, 0x81, 0x98, 0x33,
0x82, 0xfb, 0x22, 0x5a, 0x1c, 0xea, 0xa2, 0x6d,
0x11, 0x4f, 0xa2, 0xec, 0x19, 0xc2, 0x4a, 0x16,
0xc1, 0x4b, 0x8a, 0xc2, 0x4b, 0x1e, 0x2c, 0x1c,
0xf4, 0x11, 0x6c, 0x85, 0xa2, 0x69, 0x87, 0x14,
0x1a, 0x72, 0x4a, 0xb1, 0x81, 0xb2, 0x48, 0xa1,
0x21, 0xaf, 0x54, 0x99, 0x21, 0xaf, 0x44, 0x1b,
0xb1, 0x48, 0x03, 0xab, 0x84, 0xb0, 0x42, 0x28,
0x92, 0x92, 0x2b, 0x42, 0x98, 0x2f, 0x23, 0xf4,
0x98, 0xc3, 0x40, 0x08, 0x00, 0x00, 0x00, 0x00,
0x40, 0x04, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x80, 0x42, 0x08, 0x00,
0x00, 0x10, 0x08, 0xd0, 0x12, 0x07, 0x49, 0x01,
0x00, 0x23, 0xe6, 0x14, 0x61, 0x46, 0x00, 0x85,
0x42, 0xc2, 0x12, 0x15, 0x08, 0x94, 0x40, 0x88,
0x31, 0x24, 0x18, 0xa0, 0x42, 0x80, 0x88, 0x02,
0x16, 0x14, 0xc8, 0x84, 0x48, 0x84, 0x90, 0x22,
0x40, 0xa4, 0x81, 0x10, 0x12, 0xc2, 0x43, 0xb0,
0x24, 0x11, 0x28, 0x71, 0x12, 0x31, 0x18, 0x89,
0x41, 0x48, 0xa2, 0x18, 0x10, 0x02, 0x85, 0x92,
0x28, 0x00, 0x00, 0x5f, 0x5d, 0x05, 0x1c, 0x02,
0x2d, 0x28, 0x2e, 0x18, 0x12, 0x50, 0x12, 0x24,
0x4d, 0x11, 0x13, 0x62, 0x91, 0x2a, 0x08, 0x89,
0x58, 0x42, 0x1a, 0x02, 0x2d, 0x88, 0x2b, 0x48,
0x11, 0x2b, 0x94, 0x11, 0x22, 0x13, 0x14, 0x02,
0x80, 0x72, 0x42, 0x6a, 0x68, 0x80, 0x84, 0x01,
0x36, 0x02, 0x21, 0x47, 0x18, 0xa0, 0x18, 0x00,
0x31, 0xce, 0x24, 0x90, 0xa1, 0x48, 0x82, 0x21,
0x4d, 0x4a, 0xa0, 0x21, 0x81, 0x1a, 0xc8, 0x44,
0x18, 0x26, 0x78, 0x1c, 0x61, 0xc4, 0x7f, 0x6c,
0x08, 0x17, 0x41, 0x46, 0xc2, 0x28, 0x28, 0x2b,
0x43, 0x30, 0x61, 0x30, 0x11, 0x13, 0x52, 0x86,
0x2e, 0x82, 0x13, 0xc2, 0x88, 0x35, 0x88, 0x03,
0x1e, 0x82, 0x4e, 0x24, 0x12, 0x2f, 0x21, 0x94,
0x61, 0x20, 0x89, 0x22, 0x28, 0xc1, 0x22, 0x86,
0x7c, 0x42, 0x04, 0x15, 0x82, 0x02, 0x89, 0x71,
0x92, 0x62, 0x24, 0x86, 0x04, 0x13, 0x1c, 0x92,
0x24, 0x15, 0x28, 0x3b, 0x11, 0x4f, 0x9a, 0x21,
0xb5, 0x28, 0x18, 0xa2, 0x85, 0x30, 0x32, 0x81,
0x1e, 0x8a, 0x89, 0x46, 0xc2, 0x28, 0x41, 0x83,
0xf5, 0x6c, 0xca, 0x20, 0x02, 0x60, 0x81, 0xb0,
0x11, 0x14, 0x06, 0x61, 0x84, 0x3c, 0x21, 0x11,
0x08, 0x44, 0x50, 0x28, 0x84, 0x88, 0x11, 0x88,
0x80, 0xd2, 0x21, 0x04, 0x40, 0x44, 0x28, 0xc4,
0x82, 0x81, 0x48, 0x12, 0xc0, 0x24, 0x00, 0x34,
0x80, 0x01, 0x2c, 0x01, 0x47, 0x24, 0x00, 0x84,
0x00, 0xa5, 0x06, 0x00, 0x10, 0x84, 0x01, 0x89,
0x11, 0xf4, 0x1d, 0xda, 0x00, 0xe0, 0x12, 0x11,
0x41, 0x31, 0x11, 0xc1, 0x19, 0x04, 0x40, 0x02,
0x21, 0x40, 0x14, 0x84, 0x01, 0x29, 0x02, 0x83,
0x24, 0x13, 0x88, 0x04, 0x55, 0xc2, 0x24, 0x63,
0x02, 0x41, 0x28, 0x21, 0x00, 0x12, 0x25, 0x32,
0x11, 0x2a, 0x49, 0x54, 0x28, 0xb0, 0x22, 0x11,
0x01, 0x12, 0x18, 0x00, 0x10, 0xaa, 0x41, 0x21,
0xa2, 0x81, 0x92, 0x28, 0x43, 0x88, 0x02, 0xef,
0xae, 0x09, 0x10, 0x91, 0x82, 0x49, 0x02, 0x48,
0x25, 0x01, 0x18, 0x63, 0x41, 0x31, 0x51, 0x18,
0x12, 0xa7, 0x11, 0x48, 0x65, 0x63, 0x41, 0xdf,
0x24, 0xd8, 0x48, 0xb5, 0x86, 0x91, 0x4c, 0x42,
0xe0, 0x24, 0x82, 0x02, 0xac, 0x91, 0x54, 0x29,
0x03, 0x8b, 0x12, 0x90, 0x38, 0x21, 0x19, 0x53,
0x24, 0x81, 0xd0, 0x42, 0x63, 0x85, 0x85, 0x42,
0xe6, 0x82, 0x11, 0xb2, 0x42, 0xaa, 0x48, 0x83,
0x04, 0x88, 0x49, 0xf2, 0x24, 0x88, 0x2c, 0x21,
0x34, 0x48, 0x8d, 0x44, 0x81, 0x4e, 0x18, 0x89,
0xf8, 0x46, 0x27, 0x00, 0x20, 0x19, 0x01, 0x24,
0xc1, 0x42, 0x00, 0x20, 0x05, 0x10, 0x4c, 0x34,
0x15, 0x41, 0x23, 0xbe, 0x46, 0x31, 0x8c, 0x49,
0x04, 0x48, 0x42, 0x11, 0x61, 0x87, 0x23, 0x45,
0xb2, 0x24, 0x01, 0x00, 0x28, 0x27, 0x21, 0x17,
0x22, 0x6c, 0x21, 0x41, 0x62, 0x21, 0x1e, 0x4a,
0x2a, 0x11, 0x14, 0x92, 0x12, 0xda, 0xa2, 0x48,
0x83, 0x04, 0x27, 0x88, 0x4e, 0x34, 0xc4, 0x8e,
0x22, 0x81, 0x1e, 0xc8, 0x68, 0xc3, 0xe8, 0x84,
0x82, 0xf8, 0x69, 0x38, 0x00, 0x14, 0x39, 0xc2,
0x24, 0x14, 0x19, 0x45, 0x11, 0x61, 0x21, 0x16,
0x14, 0x11, 0x33, 0x12, 0x16, 0x62, 0x11, 0x48,
0x25, 0x22, 0x51, 0x49, 0x85, 0x22, 0xe5, 0x82,
0x31, 0x48, 0x20, 0x72, 0x22, 0x64, 0x22, 0x41,
0x58, 0x60, 0x22, 0x8b, 0x21, 0x30, 0x18, 0x20,
0x41, 0xb1, 0x88, 0x12, 0x94, 0x2c, 0x50, 0x28,
0x14, 0x83, 0x03, 0x21, 0x00, 0x00, 0x24, 0x2a,
0x28, 0x81, 0x04, 0x45, 0x08, 0x18, 0x84, 0xaf,
0x36, 0x06, 0x56, 0x61, 0x24, 0x41, 0x14, 0x60,
0x82, 0x2c, 0x0c, 0x21, 0x16, 0x32, 0x18, 0x26,
0x92, 0x28, 0x29, 0x11, 0x14, 0x02, 0x24, 0x00,
0x45, 0x02, 0x1c, 0x25, 0x04, 0x22, 0x56, 0x28,
0x14, 0x08, 0x48, 0x13, 0x94, 0x44, 0x25, 0x16,
0xc8, 0x12, 0x43, 0x04, 0x1a, 0x02, 0x41, 0x20,
0x12, 0x23, 0x11, 0xc4, 0x28, 0x8b, 0x28, 0x20,
0x98, 0x48, 0x50, 0x28, 0x49, 0x01, 0x26, 0x63,
0x88, 0xc0, 0x1c, 0xf7, 0xd6, 0x24, 0x49, 0x32,
0x44, 0x70, 0x12, 0x8c, 0x84, 0x04, 0x45, 0x61,
0x41, 0x44, 0x41, 0x11, 0x38, 0x49, 0x04, 0x4c,
0x42, 0x58, 0x12, 0x11, 0xc4, 0x85, 0x02, 0x41,
0x1c, 0x01, 0x23, 0x04, 0x2c, 0x01, 0x42, 0x1e,
0x24, 0x13, 0x02, 0x82, 0xc3, 0x14, 0x22, 0x45,
0xc2, 0x81, 0x66, 0x24, 0x22, 0x31, 0x4c, 0x41,
0x28, 0x41, 0xc0, 0x32, 0x46, 0xb1, 0x14, 0x24,
0xf8, 0x84, 0x28, 0x68, 0x60, 0xa6, 0xa4, 0x46,
0x04, 0x52, 0xaf, 0x12, 0x04, 0x10, 0x02, 0x22,
0x12, 0x41, 0xc3, 0xa9, 0x41, 0x14, 0x93, 0xa4,
0x42, 0x20, 0x44, 0x8a, 0x61, 0x15, 0x25, 0x64,
0x81, 0x8c, 0x84, 0xa1, 0x12, 0x00, 0x85, 0x14,
0x42, 0x18, 0x44, 0x04, 0x4c, 0x41, 0x48, 0x84,
0x01, 0x12, 0x00, 0x1f, 0xc1, 0x02, 0x80, 0x61,
0xc8, 0x20, 0x24, 0x4c, 0x38, 0x41, 0x29, 0x04,
0x84, 0x23, 0x21, 0x25, 0x89, 0x62, 0x48, 0x86,
0x01, 0x8c, 0x88, 0xf8, 0x1d, 0x4d, 0x30, 0x14,
0x25, 0x14, 0x54, 0x86, 0x12, 0x26, 0x78, 0x54,
0xfa, 0x41, 0x14, 0x51, 0x15, 0x2e, 0x31, 0x21,
0x4e, 0x18, 0xad, 0x44, 0x49, 0xf1, 0x42, 0x12,
0xc4, 0xa5, 0x02, 0xc4, 0x8b, 0x12, 0x30, 0x41,
0x1d, 0x4e, 0x24, 0x4e, 0x28, 0x47, 0x85, 0x46,
0x14, 0x22, 0xd5, 0x48, 0x95, 0x44, 0x10, 0x72,
0x56, 0x82, 0xc1, 0x14, 0x83, 0x73, 0x82, 0x81,
0x62, 0x42, 0x92, 0x4d, 0x68, 0x54, 0x3a, 0x48,
0x58, 0x38, 0x4a, 0x01, 0x47, 0x81, 0x8b, 0x14,
0x4b, 0x78, 0xc8, 0x43, 0x62, 0x64, 0xa2, 0xc8,
0x89, 0xa8, 0x84, 0x2f, 0xba, 0x04, 0x2f, 0x12,
0x04, 0x21, 0x1b, 0x21, 0x42, 0x4c, 0x04, 0x90,
0x12, 0x1a, 0x34, 0x68, 0x10, 0x22, 0x11, 0x32,
0x25, 0x30, 0x11, 0x87, 0x14, 0x12, 0x44, 0xc0,
0x14, 0x00, 0x00, 0x18, 0x81, 0x41, 0x28, 0x22,
0x56, 0x94, 0x84, 0x40, 0x02, 0x45, 0xa1, 0x21,
0x43, 0x24, 0x11, 0x0c, 0x23, 0x84, 0x04, 0x68,
0x8d, 0x82, 0x19, 0xe4, 0x24, 0x28, 0x18, 0x68,
0x83, 0x29, 0x61, 0x8a, 0x81, 0x45, 0x08, 0x45,
0xe8, 0x61, 0x05, 0x41, 0x00, 0x11, 0x81, 0x1c,
0x92, 0x68, 0xa0, 0x52, 0x00, 0x2c, 0x86, 0x04,
0xe0, 0x24, 0x02, 0x42, 0x58, 0x90, 0x18, 0x20,
0x54, 0x14, 0x28, 0x10, 0x42, 0xca, 0x14, 0x42,
0x18, 0x12, 0x00, 0x18, 0x2e, 0x12, 0x22, 0x40,
0x02, 0x85, 0x22, 0x02, 0x20, 0x24, 0x08, 0x18,
0x14, 0x20, 0xa4, 0x28, 0x84, 0x82, 0x27, 0x48,
0x22, 0x81, 0x8a, 0x01, 0x3f, 0x21, 0x0c, 0x20,
0x44, 0x14, 0x18, 0x21, 0x41, 0xd1, 0x84, 0x14,
0x88, 0x02, 0x81, 0x00, 0x48, 0x41, 0x2e, 0x42,
0x89, 0x02, 0x4a, 0x81, 0x02, 0x60, 0x22, 0x00,
0x10, 0x04, 0x12, 0x22, 0x11, 0x18, 0x48, 0x85,
0x04, 0x24, 0x28, 0x2a, 0x01, 0x21, 0x20, 0xa2,
0x14, 0x16, 0x94, 0x34, 0x4a, 0x02, 0x18, 0x22,
0x12, 0x84, 0x98, 0x84, 0x00, 0x12, 0x28, 0xf0,
0x72, 0x2d, 0x80, 0x42, 0x08, 0x22, 0x1d, 0x44,
0x85, 0x14, 0x03, 0x00, 0x00, 0x44, 0x24, 0x41,
0x18, 0x16, 0x02, 0x24, 0x24, 0x4d, 0x28, 0x44,
0x48, 0x13, 0x44, 0x62, 0x82, 0x42, 0x68, 0x20,
0x01, 0x20, 0x02, 0x11, 0x12, 0x40, 0x02, 0x81,
0x23, 0x02, 0x10, 0x08, 0x42, 0x00, 0x00, 0x22,
0x10, 0x08, 0x21, 0x88, 0x23, 0x16, 0x18, 0xb2,
0xc1, 0x08, 0x48, 0x16, 0x11, 0x05, 0x10, 0x02,
0x18, 0x10, 0x21, 0x84, 0x04, 0x21, 0x89, 0x11,
0x02, 0xc4, 0x61, 0x28, 0x14, 0x84, 0x24, 0x10,
0x01, 0x00, 0x00, 0x60, 0x81, 0x48, 0x11, 0x00,
0x13, 0x14, 0x2a, 0x84, 0x02, 0x00, 0x20, 0x03,
0x90, 0x24, 0x28, 0x2a, 0x24, 0x28, 0x02, 0x20,
0x92, 0x12, 0x10, 0x02, 0x1f, 0x3c, 0x0e, 0x42,
0x54, 0xc0, 0x24, 0x81, 0x13, 0x01, 0x41, 0x41,
0x44, 0x48, 0x21, 0x22, 0x4b, 0x14, 0x48, 0x44,
0x80, 0x04, 0x47, 0x21, 0xc0, 0x28, 0x44, 0x00,
0x45, 0x18, 0x24, 0x16, 0x04, 0x28, 0x90, 0x24,
0x00, 0x10, 0x68, 0x22, 0x13, 0x11, 0x12, 0x48,
0x08, 0x81, 0xa0, 0x42, 0x80, 0x08, 0x48, 0x00,
0x44, 0x40, 0x08, 0x41, 0x42, 0x46, 0xf9, 0x4c,
0x82, 0x40, 0x04, 0x18, 0x13, 0x04, 0x41, 0x42,
0x83, 0x64, 0x27, 0x93, 0x02, 0x20, 0x84, 0x22,
0x51, 0x28, 0x4c, 0x03, 0x76, 0x01, 0x00, 0x21,
0x1a, 0x82, 0x03, 0x10, 0x22, 0x01, 0x00, 0x80,
0x06, 0x10, 0x02, 0x22, 0x18, 0x90, 0x22, 0x2e,
0x14, 0x62, 0x2a, 0x08, 0x4a, 0x01, 0x20, 0x28,
0x91, 0x88, 0x18, 0x88, 0x22, 0x88, 0x38, 0x88,
0xf0, 0x99, 0xab, 0x40, 0x08, 0x83, 0x42, 0x08,
0x60, 0x42, 0x40, 0x88, 0x44, 0x41, 0x4c, 0x08,
0x84, 0x48, 0x84, 0x18, 0x80, 0x06, 0x00, 0x50,
0x4a, 0x10, 0x02, 0x30, 0x22, 0x20, 0x02, 0x18,
0x00, 0x00, 0x10, 0x08, 0x00, 0xc0, 0x48, 0x12,
0x00, 0x38, 0x12, 0x42, 0x18, 0x88, 0x18, 0x1a,
0x08, 0x8c, 0x98, 0x22, 0x1a, 0x78, 0x94, 0x09,
0x86, 0x28, 0x49, 0x02, 0x2c, 0xc8, 0x22, 0x80,
0x01, 0x42, 0x00, 0x00, 0x24, 0x12, 0xe0, 0x42,
0x51, 0x26, 0x40, 0x42, 0x44, 0x94, 0x44, 0x34,
0x18, 0x00, 0x21, 0x48, 0x84, 0x28, 0x4a, 0x01,
0x22, 0x10, 0x04, 0x44, 0x00, 0x00, 0x18, 0x80,
0x28, 0x42, 0x04, 0x60, 0x22, 0x00, 0x00, 0x21,
0x82, 0x10, 0xf2, 0x21, 0xfb, 0x60, 0x82, 0x28,
0x2e, 0x41, 0x42, 0x26, 0x44, 0x68, 0xc1, 0x22,
0x00, 0x35, 0xca, 0x26, 0xe0, 0x85, 0x32, 0x22,
0x84, 0x4c, 0x04, 0x28, 0x80, 0x01, 0x25, 0x02,
0x4c, 0x01, 0x2c, 0x1c, 0xc4, 0x22, 0x20, 0x41,
0x48, 0x91, 0x11, 0x12, 0x84, 0x81, 0x48, 0x42,
0x12, 0x44, 0x00, 0x22, 0x88, 0x60, 0x41, 0x80,
0x02, 0x88, 0x00, 0x00, 0x00, 0x23, 0x35, 0x84,
0xd7, 0x42, 0xc0, 0x44, 0x92, 0x87, 0x61, 0x1d,
0x21, 0xcd, 0x8b, 0x36, 0x75, 0x48, 0x75, 0x1c,
0x78, 0x58, 0xb4, 0x23, 0x74, 0x41, 0xf1, 0x42,
0x22, 0x83, 0x04, 0x87, 0x21, 0x42, 0x4e, 0x76,
0x85, 0xb2, 0x62, 0x21, 0x92, 0x2a, 0x45, 0x9c,
0x44, 0x1d, 0x21, 0x25, 0x01, 0x45, 0x62, 0x62,
0x47, 0x61, 0x2b, 0x14, 0x89, 0x51, 0x18, 0x1a,
0x85, 0xd5, 0x94, 0x21, 0x61, 0xd2, 0xd0, 0x42,
0xd2, 0x82, 0x41, 0x9c, 0x22, 0x28, 0x5a, 0x91,
0xa4, 0x4a, 0xa1, 0x51, 0x49, 0x02, 0xa8, 0x8a,
0x91, 0x98, 0x86, 0x98, 0x98, 0x2c, 0x93, 0x82,
0x5a, 0xe1, 0xb4, 0x9b, 0xc4, 0x47, 0x57, 0xa0,
0x26, 0x8f, 0x18, 0xf1, 0x21, 0x21, 0x46, 0x38,
0x21, 0x6d, 0x18, 0x7d, 0x18, 0x78, 0x8c, 0xa1,
0x24, 0x2c, 0xf4, 0x28, 0x48, 0x43, 0xf2, 0x42,
0x48, 0x4a, 0x51, 0xc6, 0xa1, 0x5e, 0x28, 0x4b,
0x21, 0x4e, 0x72, 0x4d, 0x18, 0x22, 0x44, 0x6f,
0x22, 0x54, 0xe4, 0xad, 0x18, 0x2b, 0x44, 0x81,
0x29, 0x02, 0x12, 0x22, 0x4a, 0xf2, 0x51, 0x21,
0x28, 0x2a, 0x01, 0x2d, 0x28, 0x17, 0x26, 0x8b,
0x21, 0xa3, 0x22, 0x82, 0xf1, 0x28, 0x48, 0x83,
0xec, 0x41, 0x24, 0x66, 0x41, 0x1a, 0xa1, 0x54,
0x5a, 0xa6, 0x22, 0x83, 0x01, 0xa0, 0x28, 0xaa,
0x28, 0x13, 0xf2, 0xf2, 0xcf, 0x10, 0xd4, 0x41,
0x16, 0xf4, 0x28, 0x44, 0x4c, 0xd4, 0x29, 0xa2,
0x62, 0x46, 0xa4, 0x62, 0x85, 0x15, 0x0a, 0x29,
0xf4, 0x14, 0x12, 0x6d, 0x68, 0x8f, 0x21, 0x37,
0x34, 0x6f, 0x42, 0xc5, 0x47, 0x63, 0x71, 0x31,
0x12, 0x68, 0x24, 0x56, 0xb4, 0x21, 0xd2, 0x24,
0x02, 0x6b, 0x64, 0x18, 0x3a, 0xa4, 0x22, 0x1e,
0x38, 0x26, 0x04, 0x12, 0x24, 0xad, 0x42, 0x26,
0xa2, 0x51, 0x24, 0x24, 0x81, 0x26, 0x84, 0xa2,
0x53, 0xaa, 0x8a, 0x82, 0x48, 0x21, 0xa2, 0x82,
0x27, 0x88, 0x49, 0x69, 0x28, 0x2f, 0xca, 0x28,
0xd1, 0x8e, 0xa2, 0x48, 0x96, 0xf8, 0x91, 0x78,
0x00, 0x43, 0x42, 0x58, 0x14, 0x40, 0x03, 0x22,
0x50, 0x14, 0x84, 0x22, 0x40, 0x04, 0x24, 0x84,
0x24, 0xc0, 0x26, 0x10, 0x08, 0x10, 0x43, 0x04,
0x00, 0x28, 0x00, 0x20, 0x04, 0x00, 0x10, 0x02,
0x26, 0x02, 0x80, 0x04, 0x00, 0x00, 0x12, 0x28,
0x16, 0x08, 0x12, 0x85, 0x02, 0x00, 0x83, 0xf4,
0xb6, 0x5b, 0x80, 0xf2, 0x11, 0x11, 0x9f, 0x32,
0xf2, 0x2e, 0x24, 0xcc, 0xfa, 0x3c, 0x1d, 0xaf,
0xc1, 0xf1, 0x64, 0x14, 0x18, 0x1d, 0x22, 0xb5,
0xb8, 0x28, 0x32, 0x42, 0x46, 0x88, 0xf4, 0x34,
0x54, 0xcb, 0x46, 0x8f, 0x62, 0xf5, 0x15, 0x31,
0x2b, 0x32, 0x2a, 0xf2, 0x24, 0x24, 0x41, 0x4f,
0x76, 0xd2, 0x37, 0xf2, 0x28, 0x2a, 0x6a, 0xf6,
0x64, 0x64, 0x4b, 0x47, 0x3a, 0x73, 0x38, 0xe8,
0x83, 0xf3, 0x14, 0x14, 0x3a, 0xa2, 0x11, 0x36,
0x72, 0x26, 0x46, 0x52, 0x77, 0x50, 0x6c, 0xa5,
0xf8, 0x14, 0x14, 0x1a, 0xd1, 0x88, 0xac, 0xa2,
0x18, 0x8a, 0x09, 0x8a, 0xcc, 0x12, 0x29, 0xf8,
0x14, 0x14, 0x19, 0xf1, 0x13, 0x3a, 0x8f, 0x85,
0xf5, 0x7c, 0x7c, 0x3a, 0xfd, 0x54, 0x44, 0x3f,
0xde, 0x03, 0x41, 0x5f, 0x91, 0xf5, 0x39, 0x13,
0xe5, 0xdd, 0xf5, 0xf2, 0x31, 0x1e, 0xdf, 0x85,
0xf5, 0x7c, 0x34, 0x6e, 0x72, 0xff, 0xe6, 0x56,
0xce, 0x8f, 0x26, 0xf2, 0x62, 0x24, 0x4f, 0xe4,
0xf1, 0x42, 0x42, 0xcf, 0x63, 0xf7, 0x2e, 0x7c,
0xef, 0x43, 0xf7, 0x57, 0x75, 0x4f, 0x65, 0xf5,
0x3a, 0x12, 0xef, 0x82, 0x52, 0x44, 0x5f, 0x77,
0xf3, 0x2c, 0x2f, 0xef, 0xca, 0xba, 0x22, 0xf2,
0x66, 0xe2, 0x6f, 0x66, 0xa4, 0x13, 0x8f, 0x83,
0xe1, 0x93, 0xf3, 0x74, 0x74, 0x5e, 0x11, 0x3e,
0x28, 0x36, 0xf2, 0x26, 0x4e, 0x27, 0x22, 0x77,
0x52, 0xaf, 0x82, 0xf2, 0x24, 0x24, 0xa5, 0xf8,
0x14, 0x14, 0x8f, 0x85, 0xd7, 0x88, 0xeb, 0x42,
0xaa, 0x17, 0x9a, 0x8b, 0xa1, 0xdd, 0xfe, 0xf2,
0xaf, 0x81, 0xfb, 0x84, 0x9c, 0x8e, 0x93, 0x2f,
0xa8, 0xfa, 0xca, 0x4a, 0xef, 0xce, 0xaf, 0xb3,
0xcf, 0xd5, 0xfd, 0x74, 0x87, 0x80, 0xf2, 0x35,
0x75, 0x9f, 0xf3, 0xf3, 0x2f, 0x25, 0x4f, 0x82,
0xf2, 0x35, 0x3d, 0xff, 0xc5, 0xf6, 0x68, 0x64,
0x45, 0xf4, 0x21, 0x22, 0xbf, 0xf2, 0xb2, 0x2a,
0xd2, 0x22, 0xf2, 0x42, 0x18, 0x4d, 0x44, 0x6f,
0x47, 0xf7, 0x7e, 0x7c, 0xef, 0x63, 0xf5, 0x17,
0x35, 0x2f, 0x23, 0xf1, 0x16, 0x1c, 0x6f, 0xc2,
0xe2, 0x44, 0xf4, 0x65, 0x76, 0xf5, 0xdd, 0xaa,
0xf8, 0x44, 0x44, 0x4f, 0x46, 0xe6, 0x65, 0xb6,
0x72, 0x77, 0x38, 0xf8, 0x38, 0x39, 0x4f, 0x43,
0xa1, 0x77, 0x1e, 0x18, 0x2e, 0x22, 0x6f, 0x62,
0xf6, 0x22, 0x22, 0x5f, 0x71, 0xf1, 0x3a, 0x28,
0xcf, 0x62, 0x72, 0x2a, 0xf8, 0x14, 0x14, 0x8f,
0x82, 0xd2, 0x88, 0xcc, 0x84, 0x5a, 0xa1, 0xb9,
0x18, 0xda, 0xed, 0x2e, 0xbf, 0x9a, 0xfb, 0x1c,
0x14, 0x8f, 0xa1, 0xf1, 0x12, 0x3b, 0x2b, 0x31,
0xef, 0xca, 0xfb, 0xb8, 0xf8, 0x4f, 0x44, 0xf5,
0xf7, 0x89, 0xf0, 0x24, 0x24, 0xcf, 0x53, 0xf3,
0x1d, 0x3f, 0xe5, 0xfd, 0xa5, 0x2f, 0xff, 0xa3,
0xf3, 0x5f, 0x4c, 0xcb, 0x77, 0x4f, 0x66, 0xf2,
0x67, 0x66, 0xaf, 0xd2, 0xf2, 0x68, 0x6a, 0x6f,
0x24, 0xf2, 0x46, 0x1e, 0xef, 0x64, 0xf4, 0x7c,
0x76, 0xef, 0xc6, 0xf7, 0x7a, 0x54, 0x7f, 0x17,
0xf3, 0x74, 0x76, 0xef, 0x43, 0xf3, 0x28, 0x2c,
0x45, 0xf4, 0x65, 0x35, 0xff, 0xe2, 0xd2, 0xee,
0xd8, 0x66, 0xf4, 0xa2, 0x66, 0x6f, 0x65, 0xa7,
0x77, 0x8f, 0x83, 0xf2, 0x38, 0x38, 0x4f, 0x47,
0xa7, 0x15, 0x2a, 0xe2, 0x22, 0xf2, 0x26, 0x26,
0x2b, 0x22, 0x77, 0x72, 0xaf, 0xa2, 0xf2, 0x26,
0x24, 0xaf, 0x82, 0x52, 0x44, 0x8f, 0x86, 0xf6,
0x48, 0x68, 0x2a, 0xa8, 0x17, 0x9a, 0x89, 0xa1,
0xdd, 0xfe, 0xf2, 0xaf, 0x89, 0xfb, 0x84, 0x9c,
0x8f, 0x81, 0xf9, 0x92, 0xba, 0x9a, 0xfb, 0xac,
0xbc, 0x8f, 0x8f, 0xff, 0xcc, 0xdc, 0xbf, 0xdb,
0x0d, 0x00, 0x2a, 0x01, 0x24, 0x84, 0x49, 0x61,
0x81, 0x22, 0x20, 0x02, 0x60, 0x81, 0x24, 0x1e,
0x48, 0x80, 0x44, 0x26, 0x11, 0x08, 0x46, 0x04,
0x4c, 0x12, 0x02, 0x21, 0x44, 0x29, 0x11, 0x28,
0x22, 0x04, 0xa0, 0x12, 0x00, 0x70, 0x22, 0x02,
0x00, 0x22, 0x12, 0x22, 0x1a, 0x04, 0x00, 0x82,
0x28, 0x00, 0x12, 0x28, 0x92, 0x00, 0xaf, 0xd3,
0x06, 0x00, 0x14, 0x40, 0xc1, 0x24, 0x14, 0x48,
0xc0, 0x2c, 0x25, 0x81, 0x54, 0x22, 0x41, 0x21,
0x22, 0x44, 0x90, 0x22, 0x43, 0x02, 0x00, 0x11,
0x50, 0x84, 0xa0, 0x42, 0x80, 0x04, 0x18, 0x20,
0x02, 0x00, 0x23, 0x22, 0x01, 0x84, 0x22, 0x30,
0x48, 0x00, 0x00, 0x00, 0x48, 0x81, 0x00, 0x84,
0x21, 0x00, 0x86, 0xf8, 0xd2, 0x98, 0xc0, 0x42,
0x1f, 0x41, 0x52, 0x28, 0x1f, 0x41, 0x72, 0x48,
0xf3, 0x11, 0x64, 0xa7, 0x14, 0x1d, 0x24, 0xab,
0x14, 0x1d, 0x24, 0xaf, 0x16, 0x99, 0x21, 0xab,
0x94, 0x51, 0xaf, 0x24, 0x39, 0x24, 0xaf, 0x34,
0x39, 0x24, 0x2f, 0x34, 0x79, 0x25, 0xd8, 0x1a,
0xfb, 0x24, 0x48, 0x1c, 0xf9, 0x25, 0x4a, 0x1c,
0xf8, 0x26, 0x4a, 0x87, 0x11, 0x4f, 0xa2, 0x64,
0x19, 0x2e, 0x4a, 0x96, 0xc5, 0x4a, 0xde, 0x24,
0x4d, 0x4a, 0x1f, 0x49, 0xc2, 0x43, 0x1f, 0x49,
0x52, 0x38, 0x1f, 0xc9, 0x72, 0x6a, 0xf2, 0x91,
0x24, 0xa3, 0xf4, 0x81, 0x24, 0xeb, 0x14, 0x1d,
0x64, 0xab, 0x94, 0x19, 0xb2, 0x4a, 0x19, 0xf5,
0x4a, 0x91, 0x43, 0xb2, 0x4a, 0x7b, 0x24, 0xf8,
0x42, 0x92, 0x47, 0x82, 0x2d, 0x94, 0x4f, 0x82,
0x84, 0xf9, 0x24, 0x4a, 0x17, 0x68, 0xe0, 0x22,
0xf4, 0x11, 0x68, 0xb0, 0x11, 0x36, 0x48, 0x1f,
0x41, 0x12, 0xd8, 0x41, 0x92, 0x1a, 0x19, 0xf2,
0x42, 0x94, 0x11, 0xad, 0xb4, 0x11, 0xab, 0xb4,
0x43, 0xe2, 0x14, 0x39, 0x24, 0x2d, 0x81, 0x26,
0xd8, 0x12, 0xbb, 0x26, 0xc4, 0xb1, 0x6f, 0xa2,
0x85, 0xc8, 0xda, 0x1e, 0x81, 0x4f, 0xa2, 0x64,
0x19, 0x2e, 0x4a, 0x96, 0xc5, 0x4b, 0x8e, 0x24,
0xbc, 0xf4, 0x91, 0x2c, 0x2c, 0xf4, 0x91, 0x68,
0x85, 0xf2, 0x91, 0x64, 0x83, 0x74, 0x91, 0x34,
0x48, 0x1b, 0x29, 0xa9, 0x91, 0x21, 0xaf, 0x44,
0x91, 0x21, 0xaf, 0x44, 0x1b, 0xb5, 0x4a, 0x1a,
0x24, 0x24, 0x32, 0x42, 0x22, 0x29, 0x31, 0x22,
0x18, 0x2f, 0x22, 0xf4, 0xce, 0x1c, 0xc0, 0x48,
0x82, 0x00, 0x00, 0x00, 0x00, 0x40, 0x04, 0x80,
0x01, 0x00, 0x00, 0x00, 0x80, 0x82, 0x01, 0x88,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x11, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00,
0x14, 0xd0, 0x4e, 0x01, 0x1e, 0x42, 0x4c, 0x03,
0x10, 0x13, 0x19, 0xca, 0x24, 0x2d, 0x11, 0x4a,
0x22, 0x22, 0x41, 0x02, 0x00, 0x36, 0x84, 0x92,
0x22, 0x84, 0x29, 0xf4, 0x28, 0x14, 0x52, 0x00,
0x21, 0x10, 0x08, 0x21, 0xb0, 0x24, 0x11, 0xa2,
0x12, 0x2b, 0x42, 0x45, 0xc2, 0x31, 0x22, 0x2c,
0x41, 0x02, 0x31, 0x40, 0x88, 0x84, 0x25, 0x81,
0xc4, 0x11, 0x30, 0x28, 0x84, 0x40, 0x82, 0x08,
0xa0, 0x28, 0xd0, 0x4b, 0x0b, 0x49, 0x32, 0x81,
0x99, 0x72, 0x11, 0x04, 0x42, 0x10, 0x82, 0x92,
0x14, 0x48, 0x27, 0x12, 0x48, 0x49, 0x11, 0x4a,
0x94, 0x43, 0x85, 0x64, 0x81, 0x27, 0x42, 0x51,
0x00, 0xcc, 0x12, 0x12, 0x28, 0x42, 0x02, 0x84,
0x23, 0x25, 0x04, 0x29, 0x04, 0x58, 0xd0, 0x21,
0x31, 0x24, 0x1a, 0x84, 0x31, 0x14, 0x2a, 0xa1,
0x14, 0x00, 0x19, 0x02, 0x23, 0x34, 0xca, 0x40,
0x94, 0x42, 0x93, 0xaf, 0x24, 0xb0, 0x28, 0x44,
0xa1, 0x24, 0x7f, 0xdb, 0x02, 0x52, 0x13, 0x8c,
0xd2, 0x25, 0x11, 0x71, 0x41, 0x48, 0x98, 0x24,
0x29, 0xb3, 0x64, 0xb1, 0x24, 0x74, 0x12, 0xa1,
0x42, 0x18, 0x25, 0x48, 0xf4, 0x24, 0x11, 0xcc,
0x72, 0x22, 0x5a, 0x68, 0x46, 0xc3, 0x18, 0x4a,
0x71, 0x18, 0x04, 0x27, 0x88, 0x28, 0x85, 0x02,
0x21, 0x29, 0xf1, 0x31, 0x44, 0x21, 0x1a, 0xb6,
0x28, 0xa4, 0x41, 0x13, 0x84, 0xa2, 0x21, 0x42,
0x29, 0x31, 0x11, 0x1a, 0xc2, 0x48, 0x42, 0x41,
0x28, 0x66, 0xb2, 0x41, 0x91, 0x42, 0x8c, 0x42,
0x38, 0x42, 0x4a, 0xb2, 0x22, 0x48, 0x32, 0x68,
0x1c, 0x22, 0xf5, 0x39, 0x1d, 0x70, 0x24, 0xe2,
0x41, 0x52, 0x18, 0x00, 0x50, 0x22, 0x40, 0x01,
0x80, 0x42, 0x12, 0x04, 0x30, 0x42, 0x80, 0x21,
0x42, 0x34, 0x24, 0x60, 0x22, 0x00, 0x00, 0x40,
0x28, 0x04, 0x50, 0x22, 0x50, 0x24, 0x1a, 0xc2,
0x13, 0x44, 0x29, 0x01, 0x61, 0x80, 0x01, 0x4a,
0x31, 0x11, 0x00, 0x89, 0x08, 0x44, 0xd0, 0x18,
0x89, 0x04, 0x80, 0x28, 0xf2, 0xf8, 0xbf, 0x00,
0x20, 0x08, 0x88, 0x00, 0x80, 0x08, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x11, 0x00, 0x10, 0x01, 0x14, 0x00,
0x77, 0x5e, 0xa0, 0x22, 0x42, 0x31, 0x80, 0x71,
0x28, 0xc4, 0x21, 0x46, 0x02, 0x25, 0x18, 0xa4,
0x51, 0xa6, 0x83, 0x08, 0x25, 0x38, 0x14, 0x58,
0x1b, 0x82, 0x14, 0x86, 0xb6, 0x18, 0xc1, 0x28,
0x42, 0x48, 0x82, 0x74, 0x80, 0x62, 0x81, 0xb0,
0x83, 0x14, 0xc4, 0x14, 0x81, 0x2a, 0x2a, 0x14,
0x03, 0x18, 0x87, 0x42, 0x1c, 0x6a, 0x24, 0x50,
0x82, 0x4b, 0x23, 0x58, 0x86, 0x83, 0x08, 0x25,
0x98, 0x14, 0x1a, 0xa4, 0x82, 0x60, 0x68, 0x81,
0x8c, 0x22, 0xf1, 0xdd, 0xdf, 0xa0, 0x22, 0x46,
0x18, 0x33, 0x88, 0x18, 0x26, 0xc4, 0x21, 0x46,
0x02, 0x2d, 0x28, 0x43, 0xa2, 0x51, 0x86, 0x81,
0x08, 0x84, 0x63, 0x81, 0x35, 0x21, 0x14, 0x6c,
0x18, 0xc8, 0x28, 0x52, 0x48, 0x82, 0x74, 0x84,
0x89, 0xa2, 0x45, 0x84, 0x33, 0x18, 0xcc, 0x14,
0xa0, 0xa2, 0x42, 0x31, 0x80, 0x71, 0x28, 0xc4,
0xa1, 0x46, 0x02, 0x25, 0x98, 0x14, 0x1a, 0x64,
0x1a, 0x88, 0x40, 0x38, 0x16, 0x58, 0x22, 0xc0,
0x86, 0x81, 0x1e, 0x38, 0x70, 0xa1, 0x04, 0x00,
0x88, 0x80, 0x08, 0x00, 0x88, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x10, 0x01, 0x00, 0x11, 0x40, 0x01, 0xf0,
0x8e, 0xc5, 0x20, 0x02, 0x61, 0x12, 0x41, 0x11,
0x40, 0x44, 0x02, 0x80, 0x04, 0x12, 0x81, 0x12,
0x42, 0x22, 0x2d, 0x21, 0x40, 0x01, 0x00, 0x10,
0x41, 0x25, 0x42, 0x04, 0x00, 0x00, 0x00, 0x12,
0x41, 0x50, 0x14, 0x48, 0x22, 0x16, 0x04, 0x8c,
0x94, 0x18, 0x12, 0x1c, 0x21, 0x08, 0x10, 0xa2,
0x42, 0x18, 0x90, 0x22, 0xa0, 0x14, 0xf0, 0xe5,
0x96, 0x90, 0x12, 0x54, 0x28, 0x45, 0x92, 0x28,
0x89, 0xb2, 0x22, 0xb4, 0x38, 0xe4, 0x14, 0xc2,
0x18, 0x2b, 0x24, 0x32, 0x83, 0x45, 0xc2, 0x51,
0x28, 0x28, 0x94, 0xc1, 0x1c, 0x11, 0x44, 0x24,
0x42, 0xb1, 0x42, 0x42, 0xa2, 0x42, 0xb0, 0x41,
0x52, 0x14, 0x2a, 0x54, 0xa4, 0x42, 0x23, 0x14,
0x52, 0x25, 0x64, 0x1b, 0x12, 0xe1, 0xe0, 0x82,
0xc1, 0x11, 0x88, 0x4f, 0x82, 0xa1, 0x18, 0x21,
0x23, 0x02, 0x1f, 0x81, 0x34, 0xc5, 0x84, 0x8f,
0x4c, 0xc2, 0x1c, 0x26, 0xc8, 0x58, 0x47, 0x88,
0x1a, 0x64, 0x82, 0x81, 0xfe, 0x9d, 0x80, 0x13,
0x71, 0x22, 0xc4, 0x12, 0x45, 0x58, 0x29, 0x62,
0x16, 0x64, 0x12, 0x8d, 0x12, 0x42, 0x38, 0x83,
0x45, 0x62, 0x81, 0xa0, 0x24, 0x84, 0xa5, 0x85,
0x11, 0x04, 0x40, 0xa3, 0x24, 0x15, 0x12, 0x24,
0x32, 0x41, 0x14, 0x22, 0x84, 0x2c, 0x24, 0x14,
0x12, 0x81, 0x71, 0x21, 0x42, 0x08, 0x84, 0x38,
0x49, 0x29, 0x61, 0x28, 0x20, 0x21, 0xa1, 0x58,
0x13, 0x44, 0xd8, 0xc2, 0xe8, 0x82, 0xc1, 0x28,
0x81, 0x25, 0x28, 0xc5, 0x58, 0x84, 0x6f, 0xe4,
0x49, 0x02, 0x41, 0x40, 0x24, 0x22, 0x02, 0x2e,
0x48, 0x46, 0x02, 0x28, 0x42, 0x80, 0x31, 0x41,
0x32, 0x30, 0x21, 0x22, 0x11, 0x14, 0x41, 0x22,
0x00, 0xb0, 0x41, 0x02, 0x43, 0x42, 0x84, 0x44,
0x06, 0x00, 0x45, 0x42, 0x94, 0x16, 0x44, 0x54,
0x4a, 0x13, 0x01, 0x4d, 0x28, 0x8c, 0x35, 0x18,
0x23, 0x12, 0x51, 0x18, 0x49, 0x08, 0x4a, 0x32,
0x44, 0x12, 0x58, 0x43, 0x0a, 0x28, 0xf0, 0xa7,
0x29, 0x00, 0x1c, 0x12, 0x92, 0x12, 0x21, 0x25,
0x73, 0x49, 0x22, 0x12, 0x81, 0x44, 0x48, 0x98,
0x21, 0x20, 0x81, 0x02, 0x48, 0x18, 0x00, 0x48,
0x44, 0x40, 0x02, 0x18, 0x16, 0xc8, 0x28, 0x48,
0x00, 0x41, 0x10, 0x8d, 0x28, 0x04, 0x12, 0x48,
0x3c, 0x21, 0xd3, 0x12, 0x82, 0x14, 0x14, 0x74,
0x62, 0x81, 0x22, 0xa8, 0x14, 0x26, 0x04, 0x20,
0x81, 0x24, 0x01, 0x81, 0x41, 0x37, 0xfb, 0x60,
0x12, 0x21, 0x00, 0x40, 0x38, 0x34, 0xe0, 0x82,
0x41, 0x3c, 0x15, 0x42, 0x38, 0x61, 0x10, 0x18,
0x09, 0x84, 0x28, 0x24, 0x44, 0x81, 0x44, 0x48,
0x11, 0xa0, 0x42, 0x40, 0x48, 0x94, 0x41, 0x84,
0x30, 0x18, 0x46, 0x24, 0x44, 0x91, 0x28, 0x40,
0x44, 0x84, 0x64, 0xc8, 0x10, 0x0c, 0x28, 0x58,
0x10, 0x08, 0x83, 0x24, 0x08, 0x2c, 0x12, 0x44,
0x84, 0x7c, 0xc7, 0x09, 0x40, 0x34, 0x14, 0x8c,
0x12, 0x01, 0x00, 0x90, 0x12, 0x80, 0x01, 0x81,
0xc0, 0x11, 0x48, 0x00, 0x49, 0x61, 0x83, 0x84,
0x14, 0x1c, 0x06, 0x70, 0x22, 0x01, 0x00, 0x18,
0x18, 0x48, 0x44, 0x42, 0x10, 0x14, 0x44, 0x23,
0x02, 0x84, 0x40, 0x41, 0x82, 0x01, 0x12, 0x85,
0x04, 0x18, 0x81, 0x25, 0x44, 0x08, 0x41, 0x81,
0x00, 0xad, 0x7d, 0xc0, 0x23, 0x5c, 0xd2, 0x62,
0x81, 0x13, 0x52, 0x3a, 0x1d, 0x12, 0x22, 0x15,
0xc8, 0x4c, 0x19, 0xc1, 0x18, 0x12, 0x41, 0x90,
0x18, 0x8d, 0x41, 0x48, 0x90, 0x24, 0x32, 0xc1,
0x95, 0x94, 0x25, 0x46, 0x42, 0xd1, 0x12, 0x23,
0x81, 0xc2, 0x48, 0x4c, 0x01, 0x8d, 0x44, 0x60,
0x11, 0x4e, 0x84, 0x44, 0x51, 0x2e, 0x19, 0x28,
0x3c, 0x51, 0x48, 0x42, 0x46, 0x44, 0x86, 0x91,
0x42, 0x18, 0xcb, 0x1c, 0x58, 0x89, 0x41, 0x18,
0x8c, 0x01, 0x32, 0x81, 0x45, 0x98, 0xc4, 0xb3,
0x02, 0x00, 0x40, 0x48, 0x01, 0xc3, 0x06, 0x2e,
0x12, 0x12, 0x81, 0x48, 0x34, 0x84, 0x18, 0x13,
0x02, 0x90, 0x18, 0x12, 0x81, 0x48, 0x80, 0x04,
0x00, 0x2e, 0x48, 0x81, 0x00, 0x58, 0x10, 0x64,
0x44, 0x00, 0x00, 0x23, 0x44, 0xe4, 0x22, 0x91,
0x21, 0x8d, 0x81, 0x10, 0x98, 0x21, 0x00, 0x30,
0x24, 0x24, 0x48, 0x89, 0x88, 0x44, 0x14, 0x04,
0xf0, 0x39, 0x18, 0x30, 0x24, 0x20, 0x02, 0x40,
0x98, 0x28, 0x18, 0x16, 0xa4, 0x12, 0x18, 0x28,
0x12, 0x10, 0x11, 0xc1, 0x2c, 0x2e, 0x18, 0x19,
0x81, 0x81, 0x11, 0x02, 0x42, 0x41, 0x84, 0x16,
0x21, 0x81, 0x84, 0x01, 0x48, 0x56, 0x64, 0x81,
0x52, 0x12, 0x00, 0x00, 0x12, 0x12, 0x43, 0x45,
0x88, 0x09, 0x12, 0x10, 0x54, 0x41, 0x43, 0x09,
0x00, 0x1a, 0x88, 0x04, 0x00, 0x9f, 0x35, 0x46,
0x82, 0x01, 0x20, 0xf1, 0x18, 0x22, 0x20, 0x11,
0x48, 0x12, 0x04, 0x84, 0x24, 0x00, 0x26, 0x88,
0x01, 0x00, 0xa0, 0x43, 0x47, 0x14, 0x41, 0x00,
0x44, 0xb0, 0x11, 0x82, 0x06, 0x45, 0x08, 0x00,
0x49, 0x84, 0x83, 0x81, 0x42, 0x92, 0x21, 0x00,
0x2c, 0x01, 0x12, 0x28, 0x2c, 0x01, 0x00, 0x4c,
0x11, 0xa4, 0x42, 0x22, 0x00, 0x10, 0xf4, 0x85,
0xa3, 0x00, 0x28, 0x28, 0x22, 0xc0, 0x48, 0x80,
0x04, 0x42, 0x81, 0x4a, 0x11, 0x04, 0x83, 0x01,
0x14, 0x00, 0x00, 0x84, 0x10, 0x02, 0x14, 0x80,
0x02, 0x00, 0x44, 0x48, 0x19, 0x04, 0x00, 0x00,
0x50, 0x84, 0x42, 0x14, 0xc0, 0x34, 0x00, 0x40,
0x01, 0x00, 0x81, 0x43, 0x42, 0xc4, 0x14, 0x4a,
0x82, 0xb1, 0x22, 0xd4, 0x64, 0x4e, 0x42, 0x01,
0x00, 0x80, 0x41, 0x81, 0x02, 0x40, 0x01, 0x00,
0x41, 0x83, 0x04, 0x00, 0x00, 0x14, 0x38, 0x00,
0x21, 0x00, 0x2a, 0x04, 0x12, 0x21, 0x00, 0x10,
0x12, 0x15, 0x44, 0x45, 0x0c, 0x81, 0x50, 0x41,
0x80, 0x82, 0x21, 0x04, 0x00, 0x00, 0x00, 0x24,
0x00, 0xf0, 0xd7, 0x6f, 0x20, 0x08, 0x41, 0x00,
0x00, 0x22, 0x44, 0x18, 0x84, 0x81, 0x2a, 0x21,
0x61, 0x91, 0x14, 0x11, 0x12, 0x20, 0x11, 0x38,
0x38, 0x00, 0x81, 0x40, 0x81, 0x23, 0xa1, 0x42,
0xcb, 0x41, 0x40, 0x94, 0x48, 0x80, 0x01, 0x20,
0x44, 0x41, 0x34, 0x41, 0x84, 0x22, 0x45, 0x18,
0x84, 0x28, 0xc1, 0x84, 0x22, 0x80, 0x81, 0x08,
0x00, 0x18, 0x82, 0x14, 0x5f, 0xe6, 0x0e, 0x00,
0x00, 0x4b, 0x12, 0x28, 0x22, 0xc4, 0x32, 0xa0,
0x21, 0x00, 0x28, 0x22, 0xa0, 0x21, 0x15, 0x28,
0x03, 0x12, 0x90, 0x42, 0x44, 0x41, 0x41, 0x18,
0x41, 0x14, 0x12, 0x90, 0x11, 0x1c, 0x81, 0xa1,
0x12, 0x41, 0x44, 0x48, 0x30, 0x12, 0x18, 0x18,
0x58, 0x52, 0x22, 0x40, 0x14, 0x14, 0x11, 0x84,
0x01, 0x80, 0x04, 0x42, 0x29, 0xb4, 0x22, 0x04,
0x1f, 0x4d, 0x01, 0x28, 0x22, 0x00, 0x20, 0x81,
0x91, 0x12, 0x10, 0x04, 0x25, 0x14, 0x01, 0x24,
0x12, 0xa4, 0x22, 0x11, 0x24, 0x42, 0x10, 0x02,
0x00, 0x10, 0x41, 0x04, 0x22, 0x40, 0x29, 0x22,
0x04, 0x85, 0xa2, 0x21, 0x18, 0x28, 0x10, 0x14,
0x02, 0x00, 0x21, 0x80, 0x54, 0x21, 0x40, 0x2e,
0x42, 0xa2, 0x14, 0x22, 0x50, 0x82, 0xb0, 0x33,
0x09, 0x00, 0xa0, 0x12, 0x84, 0x10, 0x08, 0x80,
0x02, 0x18, 0x80, 0x04, 0x00, 0x80, 0x02, 0x85,
0x94, 0x43, 0x18, 0x48, 0x84, 0x85, 0x01, 0x00,
0x30, 0x68, 0x81, 0x81, 0x00, 0x48, 0x48, 0x44,
0x41, 0x51, 0x50, 0x14, 0x45, 0x59, 0x48, 0x84,
0x12, 0x00, 0x00, 0x44, 0x00, 0x85, 0x04, 0x8d,
0x14, 0x28, 0x22, 0x42, 0x4f, 0x74, 0x03, 0x84,
0xc0, 0x41, 0x40, 0x01, 0x00, 0x1c, 0x02, 0x40,
0x04, 0x1a, 0x22, 0xa2, 0x16, 0x10, 0x11, 0x04,
0x00, 0x33, 0x02, 0x18, 0x80, 0x58, 0x12, 0x10,
0x02, 0x42, 0x14, 0x29, 0x02, 0x26, 0x98, 0x18,
0x2a, 0x64, 0x14, 0x26, 0x38, 0x29, 0x81, 0x90,
0x21, 0x00, 0x44, 0x43, 0x84, 0x26, 0x02, 0x50,
0x84, 0x90, 0x44, 0x28, 0x12, 0x29, 0x41, 0xf4,
0xfe, 0x58, 0x24, 0x29, 0xa2, 0x28, 0x2a, 0x22,
0xc2, 0x2a, 0x12, 0x8c, 0xa1, 0x27, 0x4f, 0x13,
0xe2, 0x41, 0xd1, 0x89, 0xa2, 0x11, 0x11, 0x18,
0x84, 0x3f, 0x84, 0x46, 0x1d, 0xa8, 0x23, 0x70,
0x18, 0x92, 0x33, 0x24, 0x4c, 0x14, 0x44, 0xc9,
0x11, 0x14, 0x5b, 0x34, 0x22, 0x8b, 0x54, 0x55,
0x64, 0x44, 0x2b, 0x55, 0x4e, 0x12, 0x42, 0x4d,
0x1b, 0x12, 0x17, 0x41, 0x47, 0x71, 0x1d, 0x21,
0x4b, 0x15, 0x8c, 0x31, 0x38, 0x8e, 0x3c, 0x28,
0x88, 0x16, 0x64, 0x54, 0x43, 0x32, 0x86, 0x4f,
0x41, 0x01, 0x6e, 0x44, 0x4c, 0xf4, 0x48, 0x44,
0x28, 0x1e, 0x7b, 0x68, 0x1f, 0x46, 0x07, 0x00,
0xa0, 0x31, 0x36, 0xb1, 0x48, 0x31, 0x39, 0x25,
0xc8, 0x16, 0x43, 0xa2, 0x11, 0x87, 0x84, 0x22,
0x48, 0xdb, 0x22, 0x81, 0x1b, 0x23, 0x3f, 0x82,
0xd1, 0x11, 0x81, 0xc1, 0x1c, 0x83, 0x11, 0x01,
0x85, 0x18, 0x64, 0x41, 0x4b, 0x23, 0x1c, 0x34,
0x52, 0x1e, 0x2a, 0x8f, 0x81, 0xf4, 0x1c, 0x58,
0x81, 0x1a, 0xe6, 0x43, 0x24, 0x83, 0xe2, 0x16,
0xd4, 0x89, 0xe2, 0x83, 0x51, 0x19, 0xa7, 0x54,
0x5f, 0x74, 0x13, 0x98, 0x14, 0x10, 0x94, 0x84,
0x5c, 0x02, 0x70, 0x22, 0x94, 0x24, 0x4b, 0x3d,
0x47, 0x22, 0x21, 0x30, 0x44, 0x5f, 0xa2, 0x0f,
0x5b, 0x12, 0x22, 0x54, 0xd0, 0x48, 0xc1, 0x28,
0x28, 0x8d, 0x14, 0xa0, 0x24, 0x30, 0x22, 0x4f,
0x21, 0x21, 0xe1, 0x11, 0xe1, 0x13, 0x91, 0x18,
0x1e, 0x21, 0x44, 0x12, 0x29, 0xe4, 0x96, 0xe4,
0x57, 0x37, 0x44, 0x64, 0x91, 0x11, 0x39, 0x21,
0x83, 0x67, 0x42, 0x42, 0xf0, 0x21, 0x28, 0x90,
0x14, 0x87, 0x44, 0x4f, 0x42, 0x51, 0x24, 0x22,
0xc5, 0xc4, 0x4c, 0x5b, 0x41, 0x84, 0x43, 0x23,
0xb1, 0x32, 0xe1, 0x24, 0x95, 0x41, 0x11, 0x1e,
0x14, 0x81, 0xcd, 0x88, 0x81, 0x21, 0x1a, 0xa3,
0x57, 0x2a, 0x48, 0xf4, 0x17, 0x25, 0x50, 0x41,
0x50, 0x41, 0x50, 0x41, 0x23, 0x54, 0x41, 0x23,
0x14, 0x31, 0x42, 0x11, 0x23, 0x14, 0x31, 0x42,
0x41, 0x29, 0x12, 0x15, 0x12, 0x14, 0x12, 0x94,
0x28, 0x11, 0x40, 0x42, 0x54, 0x21, 0x44, 0x24,
0x40, 0x12, 0x58, 0x24, 0x60, 0x22, 0x40, 0x02,
0x45, 0x02, 0x65, 0x41, 0x58, 0x16, 0x84, 0x69,
0x08, 0x29, 0x08, 0x2d, 0x84, 0xd0, 0x42, 0x48,
0xd8, 0x42, 0x4a, 0xd8, 0x42, 0x48, 0x88, 0x48,
0x28, 0xd4, 0xcd, 0x42, 0xf1, 0x11, 0x15, 0x5f,
0x52, 0x52, 0x45, 0x4f, 0x51, 0xe1, 0x96, 0xf7,
0x57, 0x7f, 0x6f, 0xe5, 0xd4, 0x32, 0xf2, 0x62,
0x65, 0x7f, 0x37, 0xf6, 0x52, 0x5a, 0x3f, 0x31,
0xd1, 0x13, 0xd4, 0x77, 0x74, 0x53, 0xf2, 0x2a,
0x47, 0x3d, 0x2c, 0x4f, 0x73, 0xf3, 0x37, 0x33,
0x2f, 0x41, 0xf1, 0x58, 0x5c, 0xcd, 0x29, 0x1f,
0x51, 0xd4, 0x64, 0x54, 0xae, 0xe5, 0xfb, 0x13,
0x13, 0x3e, 0x11, 0x35, 0xf1, 0x42, 0x12, 0xe5,
0xfc, 0x58, 0x5c, 0xef, 0xc1, 0xf1, 0x5a, 0x32,
0x2b, 0x11, 0x4e, 0x32, 0x2f, 0x21, 0xf3, 0x32,
0x22, 0x3f, 0x52, 0xf2, 0x29, 0x28, 0xbf, 0xf3,
0xf3, 0x1b, 0x1a, 0xa7, 0xf1, 0xbf, 0xc7, 0xf7,
0x2e, 0xae, 0x2f, 0x2b, 0xfb, 0xb2, 0xa2, 0x2b,
0x99, 0x7f, 0x74, 0xf4, 0x87, 0x82, 0x27, 0x29,
0x63, 0xf9, 0x24, 0x2a, 0xaf, 0x2a, 0x7a, 0xca,
0xf6, 0x92, 0x18, 0x8f, 0x86, 0xf6, 0xa8, 0x98,
0x8f, 0xa6, 0xf6, 0xbc, 0x31, 0xf0, 0x12, 0x14,
0x5f, 0xd6, 0x16, 0xe1, 0x13, 0xf7, 0x2c, 0x2d,
0xff, 0xf3, 0xf3, 0x7f, 0x7d, 0x8f, 0x96, 0xf6,
0x34, 0x25, 0x7f, 0x73, 0xf3, 0x5f, 0x5d, 0x8b,
0x55, 0x4c, 0xd6, 0x67, 0xf5, 0x46, 0x5d, 0x97,
0xd5, 0x9f, 0xf1, 0xf2, 0x3f, 0x3f, 0x7f, 0x33,
0xf3, 0x12, 0x14, 0x5e, 0x56, 0xdf, 0x12, 0xe1,
0x56, 0xf5, 0x54, 0x54, 0x85, 0xfc, 0x85, 0x9a,
0x3f, 0x31, 0xf1, 0x35, 0xb5, 0x3f, 0x11, 0xf2,
0x42, 0x12, 0x6d, 0x46, 0xfd, 0x41, 0xef, 0x41,
0xf5, 0x4a, 0x13, 0x2f, 0xa1, 0xf5, 0x16, 0x74,
0x1e, 0x78, 0x4f, 0x23, 0x71, 0x23, 0xf7, 0x17,
0x11, 0x77, 0xa3, 0x7f, 0x91, 0xf5, 0x51, 0x45,
0x5f, 0xd7, 0xf7, 0x22, 0xa6, 0x6f, 0x4a, 0xaa,
0x23, 0x5a, 0xf7, 0xc7, 0xc7, 0x3f, 0x58, 0xfa,
0x94, 0x14, 0x9e, 0x12, 0x6f, 0x28, 0xf8, 0xea,
0xe4, 0x8f, 0x4d, 0xf6, 0x94, 0x7a, 0x8f, 0x83,
0xa2, 0xff, 0x4f, 0x47, 0xf7, 0x7a, 0x1d, 0x24,
0x43, 0xf3, 0x21, 0x64, 0x2e, 0x21, 0x3a, 0xf3,
0x3d, 0x36, 0x1a, 0xf3, 0x3b, 0x39, 0xcf, 0xc6,
0x56, 0x65, 0x4f, 0x43, 0xf3, 0x1b, 0x15, 0x8b,
0x54, 0x2c, 0xf2, 0x41, 0x11, 0xff, 0x45, 0xf1,
0x39, 0x71, 0x5d, 0x2b, 0x7f, 0x11, 0xd1, 0x51,
0x63, 0x21, 0xef, 0x81, 0xd1, 0x8f, 0xf3, 0x51,
0x55, 0x49, 0x55, 0xcc, 0xdd, 0x8b, 0x4d, 0x15,
0x3f, 0x13, 0xf1, 0x65, 0x47, 0x5a, 0xf5, 0x6c,
0x4e, 0xef, 0xd5, 0xf5, 0x18, 0x1e, 0x5a, 0xe7,
0xa3, 0xf3, 0x52, 0x14, 0x4f, 0x41, 0xe5, 0x43,
0xf3, 0x21, 0x27, 0x3f, 0x32, 0xf2, 0x31, 0x3d,
0xaf, 0x91, 0x51, 0xdd, 0xdf, 0xb4, 0xf4, 0xac,
0x1c, 0x2d, 0x94, 0xe0, 0x24, 0xf2, 0x85, 0x81,
0x75, 0x85, 0xd8, 0x24, 0xf1, 0xa6, 0x8c, 0x6e,
0x68, 0x4f, 0x47, 0xbf, 0x38, 0xf3, 0xe2, 0xf8,
0x6a, 0xb7, 0x64, 0xf5, 0x6c, 0x69, 0xf0, 0x37,
0x21, 0x9f, 0x42, 0xd6, 0x54, 0xa2, 0x35, 0x9f,
0x22, 0xf2, 0x75, 0x75, 0xaf, 0xa7, 0xf7, 0x2e,
0x2c, 0x1d, 0x26, 0x5f, 0x15, 0xf7, 0x7a, 0x76,
0xab, 0x32, 0x5f, 0x31, 0xf1, 0x45, 0x14, 0xaf,
0x34, 0xf5, 0x5a, 0x31, 0x5f, 0x81, 0xf2, 0x15,
0x13, 0x3f, 0x51, 0xe1, 0x21, 0xf1, 0x56, 0x58,
0xff, 0x92, 0xf3, 0x61, 0x74, 0x4e, 0x54, 0xc5,
0xfe, 0x1f, 0x8b, 0x5f, 0x41, 0xf1, 0xb7, 0x15,
0x57, 0x73, 0x5e, 0x12, 0x6f, 0xc6, 0xf6, 0x5c,
0x5d, 0x4f, 0x21, 0xe5, 0x27, 0xb7, 0x72, 0xe7,
0x45, 0xf5, 0x1c, 0x16, 0x6f, 0x63, 0xf3, 0x23,
0x25, 0x5f, 0x71, 0xf3, 0x34, 0x3d, 0xff, 0xb5,
0xf5, 0x4e, 0x55, 0xdf, 0xe6, 0xb7, 0xbc, 0xf3,
0x32, 0xb2, 0x2b, 0xba, 0x4e, 0x12, 0x1f, 0x54,
0xf4, 0xa7, 0x87, 0x6d, 0x84, 0xcd, 0x1c, 0xc7,
0xe2, 0x2f, 0xee, 0xfe, 0x76, 0xf4, 0xcb, 0x73,
0x2f, 0x8e, 0xff, 0x68, 0x78, 0x4f, 0x46, 0xf5,
0x1b, 0x6b, 0x90, 0x12, 0x20, 0x02, 0x4b, 0x12,
0x84, 0x22, 0x12, 0x00, 0x20, 0x01, 0x12, 0x30,
0x11, 0x28, 0x16, 0x08, 0x20, 0x34, 0x11, 0x42,
0x10, 0x18, 0x01, 0x11, 0x4a, 0x82, 0x81, 0x82,
0x31, 0x48, 0x20, 0x04, 0x10, 0x04, 0x4d, 0x11,
0x84, 0x1c, 0x21, 0x61, 0x12, 0x12, 0x22, 0x12,
0x80, 0x44, 0x21, 0x01, 0x40, 0x04, 0x42, 0x12,
0x89, 0x02, 0xbf, 0xfa, 0x0e, 0xa2, 0x44, 0x40,
0x04, 0x48, 0x41, 0x8c, 0x24, 0xc2, 0x44, 0x8b,
0x16, 0x20, 0x04, 0x87, 0x44, 0x41, 0x30, 0x15,
0x38, 0x43, 0x01, 0x47, 0x82, 0x10, 0x04, 0x60,
0x41, 0x18, 0x44, 0x00, 0x4d, 0x48, 0x80, 0x01,
0x2a, 0x61, 0x41, 0x22, 0x00, 0x12, 0x40, 0x1c,
0x0c, 0x88, 0x82, 0x10, 0x84, 0x08, 0x4c, 0x28,
0x08, 0x4f, 0x88, 0x84, 0x61, 0x88, 0xc0, 0x41,
0x3f, 0x6e, 0x05, 0x3c, 0xf4, 0x11, 0x24, 0x85,
0xf3, 0x11, 0x24, 0x87, 0x34, 0x1f, 0x41, 0x72,
0x4a, 0xd3, 0x41, 0xf2, 0x4a, 0x13, 0x1d, 0x24,
0xaf, 0x34, 0x99, 0x21, 0xaf, 0x34, 0x19, 0xf5,
0x4a, 0x93, 0x53, 0xf2, 0x4a, 0xb3, 0x43, 0xf2,
0x42, 0x93, 0x47, 0x82, 0xad, 0x91, 0x5f, 0x82,
0xc4, 0xb1, 0x4f, 0xa2, 0xc4, 0x81, 0x7f, 0xa2,
0x64, 0x11, 0x6f, 0xa2, 0x64, 0x19, 0x2f, 0xa2,
0x74, 0x98, 0xd5, 0xa6, 0xe4, 0x49, 0xd2, 0xa2,
0xf4, 0x91, 0x24, 0x2d, 0x42, 0x1f, 0x49, 0x52,
0x3e, 0x1f, 0x49, 0x72, 0x4e, 0xf2, 0x91, 0x24,
0xe7, 0x34, 0x1f, 0xc8, 0xf2, 0x4e, 0x13, 0x1d,
0x2c, 0xaf, 0x24, 0x99, 0x21, 0xaf, 0x24, 0x19,
0xf5, 0x4a, 0x96, 0x43, 0xf2, 0x4a, 0x96, 0x43,
0xf2, 0x42, 0x96, 0x47, 0x82, 0x2d, 0x94, 0x4f,
0x82, 0xa4, 0x94, 0x4f, 0xa2, 0xd4, 0x2d, 0x0f,
0xac, 0xe4, 0x41, 0xd6, 0x28, 0xe4, 0x41, 0x32,
0x48, 0x1e, 0x24, 0x83, 0xc4, 0x24, 0x8b, 0x14,
0x4c, 0xf2, 0x48, 0x94, 0x28, 0x8f, 0x44, 0x1b,
0xb4, 0x48, 0x3b, 0x24, 0x8b, 0x94, 0x43, 0xe2,
0x14, 0x79, 0x24, 0xc8, 0x91, 0x6d, 0x48, 0x98,
0x6f, 0x82, 0xc5, 0x91, 0x2e, 0xc8, 0x1a, 0xe8,
0x82, 0x64, 0x19, 0x2e, 0x48, 0x96, 0x45, 0xe9,
0x49, 0xc2, 0x49, 0x17, 0xc9, 0x48, 0x9e, 0x6c,
0x81, 0x1f, 0x49, 0x36, 0x48, 0x92, 0x81, 0x8e,
0x24, 0x8b, 0x14, 0x1d, 0x24, 0x8f, 0x44, 0x99,
0x21, 0x8f, 0x44, 0x1b, 0xb5, 0x48, 0x3b, 0x24,
0x4a, 0x19, 0xa4, 0x94, 0x94, 0x98, 0x6f, 0x82,
0x84, 0xf9, 0x26, 0x18, 0x4f, 0x9b, 0x0c, 0x84,
0x80, 0x44, 0x01, 0x00, 0x00, 0x00, 0x44, 0x00,
0x00, 0x00, 0x00, 0x00, 0x21, 0x80, 0x01, 0x88,
0x00, 0x81, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00,
0x00, 0x00, 0x00, 0x80, 0x42, 0x01, 0x00, 0x00,
0x00, 0x21, 0xf0, 0xb7, 0x8b, 0x20, 0x91, 0x21,
0x84, 0x29, 0x01, 0x2a, 0x51, 0x84, 0x2e, 0x48,
0x30, 0x28, 0x84, 0x22, 0x19, 0x01, 0x44, 0x60,
0x82, 0x28, 0x51, 0x10, 0x81, 0x86, 0x24, 0x32,
0x21, 0x48, 0x00, 0xb0, 0x18, 0x16, 0x01, 0x00,
0x44, 0x22, 0xd0, 0x42, 0xb1, 0x24, 0x11, 0x44,
0x44, 0x58, 0x1c, 0x4a, 0x01, 0x18, 0x14, 0x8c,
0x45, 0x65, 0x81, 0x44, 0x41, 0x28, 0x48, 0x45,
0x88, 0x81, 0x45, 0x14, 0xf8, 0x77, 0xbb, 0x40,
0x61, 0x48, 0x28, 0x22, 0x48, 0xa0, 0x41, 0x12,
0x49, 0xa5, 0x41, 0x1a, 0x04, 0x81, 0x83, 0x05,
0x27, 0x82, 0x43, 0xc1, 0x44, 0x18, 0x2b, 0x42,
0x43, 0x01, 0x89, 0x21, 0x14, 0x84, 0xd2, 0x12,
0x02, 0x1c, 0x34, 0x84, 0x43, 0x22, 0x62, 0x44,
0x84, 0x1e, 0x23, 0x13, 0x11, 0x01, 0x14, 0x31,
0x1e, 0x41, 0x44, 0x12, 0x94, 0x8d, 0x44, 0xc2,
0x22, 0x82, 0xa0, 0x48, 0x12, 0x4a, 0x99, 0x86,
0x82, 0x2a, 0x34, 0xc2, 0x86, 0xc4, 0x19, 0x4c,
0xf4, 0x7a, 0x99, 0x10, 0x61, 0x44, 0x26, 0x8a,
0x82, 0x84, 0xc2, 0x4c, 0x8b, 0x14, 0x58, 0x42,
0xcb, 0x41, 0x22, 0x26, 0x68, 0x84, 0x41, 0x83,
0xf2, 0x28, 0x14, 0x43, 0x42, 0x35, 0x22, 0x64,
0x4a, 0xc2, 0x18, 0x12, 0x26, 0x21, 0x28, 0x02,
0x46, 0x61, 0x46, 0x1d, 0x24, 0x13, 0x82, 0x44,
0xd8, 0x38, 0xc1, 0x31, 0x42, 0x41, 0x1d, 0x22,
0x15, 0xd4, 0x14, 0x41, 0x18, 0x95, 0x18, 0x46,
0xb4, 0xc4, 0x21, 0xa2, 0x4a, 0x41, 0x83, 0x19,
0x24, 0x28, 0x22, 0xac, 0x24, 0x27, 0x2d, 0x4a,
0x91, 0x18, 0x8b, 0x41, 0xaf, 0x2f, 0x07, 0x18,
0x19, 0x02, 0x12, 0x20, 0x81, 0x81, 0x12, 0xe4,
0x81, 0x02, 0xc0, 0x11, 0x12, 0x24, 0x00, 0x48,
0x18, 0x48, 0x1c, 0x01, 0x42, 0x2a, 0x44, 0xe4,
0x22, 0x44, 0x01, 0xc0, 0x98, 0x00, 0x44, 0xc0,
0x24, 0x10, 0x91, 0x12, 0x16, 0x04, 0x48, 0x41,
0x16, 0x68, 0x14, 0x84, 0x10, 0x91, 0x18, 0x11,
0x42, 0x12, 0x4e, 0x16, 0x43, 0x08, 0x45, 0x08,
0x43, 0x48, 0x14, 0x74, 0xa4, 0x04, 0x2c, 0x01,
0x41, 0x12, 0x85, 0x32, 0x11, 0x40, 0x54, 0x12,
0x1a, 0x84, 0x89, 0x84, 0x88, 0x04, 0x41, 0x2c,
0x01, 0x20, 0x21, 0x14, 0x01, 0x19, 0xa4, 0x84,
0x40, 0x04, 0x00, 0x44, 0x69, 0x04, 0x00, 0x4b,
0x12, 0x10, 0x22, 0x01, 0x44, 0x49, 0x41, 0x58,
0x12, 0x96, 0x48, 0x32, 0x91, 0x80, 0x54, 0x18,
0x41, 0xa0, 0x48, 0x18, 0x48, 0x00, 0x81, 0x70,
0xf8, 0x08, 0x15, 0x24, 0xc2, 0x93, 0x28, 0x15,
0xd4, 0x84, 0xc4, 0x19, 0x42, 0x18, 0x41, 0x84,
0x97, 0x23, 0x85, 0xd1, 0xe2, 0xf1, 0x11, 0x48,
0x24, 0x4e, 0x81, 0x8c, 0x96, 0xc1, 0x35, 0x34,
0x12, 0x8b, 0x24, 0x48, 0xc3, 0x52, 0x25, 0x19,
0xf4, 0x41, 0x12, 0x16, 0xb8, 0x46, 0x71, 0x42,
0xa4, 0x41, 0x28, 0x49, 0xd4, 0x4a, 0x24, 0x11,
0x82, 0x03, 0x87, 0x48, 0x83, 0x34, 0x29, 0xb0,
0x17, 0xf2, 0x38, 0x46, 0x42, 0x88, 0x2a, 0xa4,
0x81, 0x82, 0xc8, 0x21, 0x83, 0xd9, 0x28, 0x63,
0xae, 0x12, 0x83, 0x01, 0x82, 0xc6, 0xfc, 0xee,
0x12, 0x00, 0x28, 0x80, 0x42, 0x19, 0x58, 0x81,
0x42, 0x2d, 0x11, 0x12, 0x1a, 0x88, 0xc2, 0x89,
0x12, 0x15, 0x08, 0x46, 0x23, 0x62, 0x18, 0x18,
0x60, 0x12, 0x48, 0xc3, 0xb6, 0x41, 0x38, 0x43,
0x16, 0x51, 0x82, 0x2d, 0x42, 0x41, 0x20, 0x94,
0x44, 0x21, 0x12, 0x29, 0xc2, 0x22, 0x60, 0x88,
0x30, 0x28, 0x18, 0xcc, 0x91, 0x4c, 0xab, 0x49,
0xa0, 0x12, 0x12, 0x40, 0x51, 0x42, 0x89, 0x88,
0xe8, 0x21, 0xac, 0x14, 0x12, 0x10, 0xc8, 0x44,
0xaf, 0x1b, 0x04, 0x1d, 0x16, 0xc0, 0x95, 0x23,
0x51, 0x24, 0x59, 0x25, 0x41, 0x04, 0x46, 0x14,
0xf8, 0x48, 0x11, 0x25, 0x62, 0xc4, 0x2b, 0x14,
0x64, 0x92, 0x89, 0x84, 0x14, 0x97, 0x52, 0x46,
0x08, 0x14, 0x41, 0x90, 0x44, 0x18, 0x49, 0x81,
0xc4, 0x54, 0x69, 0x02, 0xc3, 0x04, 0x43, 0x21,
0x01, 0x49, 0x61, 0x84, 0x54, 0x44, 0x2d, 0x21,
0x39, 0x03, 0x88, 0x2f, 0x18, 0x24, 0x28, 0xbc,
0x88, 0x04, 0x12, 0x76, 0x9a, 0x28, 0x10, 0x08,
0x88, 0x8c, 0xe8, 0x88, 0x0b, 0x11, 0x24, 0xac,
0xb1, 0x18, 0x32, 0x21, 0x13, 0x02, 0x40, 0x4c,
0x51, 0x84, 0x14, 0x18, 0xcb, 0x81, 0x11, 0x21,
0x12, 0x18, 0x48, 0x2d, 0x14, 0x24, 0x42, 0x84,
0x4a, 0x01, 0x26, 0x41, 0x08, 0x10, 0x98, 0x62,
0xcc, 0x42, 0x48, 0x14, 0x88, 0x61, 0x26, 0x60,
0x12, 0x42, 0x2a, 0x91, 0x48, 0x41, 0x44, 0x83,
0x31, 0x28, 0x20, 0x08, 0x48, 0x87, 0x28, 0x82,
0x38, 0x48, 0x12, 0x67, 0xa3, 0x84, 0x84, 0x4e,
0x14, 0x2f, 0xbf, 0x0e, 0x12, 0x42, 0x11, 0x80,
0x54, 0x42, 0x48, 0x14, 0x50, 0x42, 0x69, 0x11,
0x82, 0x12, 0x12, 0x48, 0x13, 0x78, 0x22, 0x92,
0x18, 0x60, 0x22, 0x40, 0x84, 0x01, 0x44, 0x16,
0x32, 0x18, 0x22, 0x1a, 0x04, 0x11, 0x2b, 0x14,
0x70, 0x18, 0xa4, 0x24, 0x42, 0x22, 0xa4, 0x81,
0x45, 0x41, 0x04, 0x80, 0x0a, 0x21, 0x28, 0x46,
0x02, 0x40, 0xc8, 0x42, 0x40, 0xc4, 0x42, 0x88,
0xc0, 0x12, 0x8f, 0xc2, 0x07, 0x30, 0x25, 0x10,
0x81, 0x11, 0x08, 0x4d, 0x22, 0x20, 0x35, 0x41,
0x18, 0x21, 0x2c, 0x04, 0x4e, 0x14, 0x41, 0x46,
0x01, 0x42, 0x1d, 0x18, 0x88, 0x00, 0x21, 0x10,
0x46, 0x14, 0xc2, 0x24, 0x12, 0x48, 0x80, 0x84,
0x04, 0x21, 0x15, 0x06, 0x12, 0x00, 0x87, 0x11,
0x2b, 0x24, 0x42, 0x82, 0x30, 0x18, 0x82, 0x80,
0x21, 0x85, 0xa8, 0x29, 0x28, 0x82, 0x28, 0x00,
0x35, 0x44, 0x61, 0x11, 0x1d, 0x24, 0x84, 0x8d,
0x21, 0x1f, 0x26, 0x61, 0x42, 0x48, 0x59, 0x12,
0x74, 0x52, 0x63, 0x15, 0x25, 0x02, 0x6c, 0x48,
0x4a, 0x57, 0x48, 0x2f, 0x31, 0xe2, 0x81, 0x74,
0x52, 0xb4, 0x21, 0x21, 0x1c, 0x08, 0x21, 0x1c,
0x72, 0x16, 0x6a, 0xe1, 0x28, 0x2e, 0x48, 0x2b,
0x24, 0xec, 0xa4, 0x14, 0x48, 0x52, 0x58, 0x29,
0x62, 0x42, 0x23, 0x92, 0x42, 0x43, 0x63, 0x84,
0xc7, 0x11, 0x49, 0x24, 0x33, 0x88, 0xb0, 0x88,
0x81, 0x2c, 0xc4, 0x12, 0x8c, 0xec, 0x28, 0x22,
0x4a, 0xa2, 0x84, 0xa8, 0xc0, 0x44, 0x1b, 0x79,
0x00, 0xd0, 0x32, 0x21, 0x01, 0x15, 0x08, 0x10,
0x4a, 0x14, 0x38, 0x11, 0x2c, 0xe1, 0x81, 0x44,
0xa1, 0x41, 0x18, 0x48, 0x00, 0x81, 0x40, 0x84,
0x04, 0x41, 0x00, 0x90, 0x14, 0x12, 0x22, 0x81,
0x41, 0x44, 0x22, 0x50, 0x12, 0x15, 0x98, 0x18,
0x11, 0x41, 0x30, 0x22, 0x8e, 0x48, 0x26, 0x02,
0x00, 0x21, 0x86, 0x88, 0xa1, 0x41, 0x4a, 0x31,
0x34, 0x8d, 0x34, 0x84, 0x81, 0xf0, 0xb2, 0xad,
0x00, 0x21, 0x14, 0x21, 0x50, 0x41, 0x11, 0x19,
0x65, 0x41, 0x60, 0x81, 0x27, 0x14, 0xcc, 0x12,
0x4c, 0xca, 0x42, 0x00, 0x10, 0x84, 0x21, 0x04,
0x48, 0xc0, 0x48, 0x48, 0x12, 0x80, 0x01, 0x48,
0x41, 0x38, 0x81, 0x50, 0x14, 0x30, 0x14, 0x4a,
0x51, 0x25, 0x20, 0x84, 0x21, 0x28, 0xe2, 0x25,
0x88, 0xa1, 0x14, 0x52, 0x4c, 0x25, 0xc4, 0x44,
0x84, 0x46, 0x04, 0x87, 0x42, 0x9c, 0x41, 0x74,
0x5e, 0x0f, 0x18, 0x00, 0x15, 0xc4, 0x2c, 0x28,
0x00, 0x81, 0x14, 0x00, 0x40, 0x02, 0x30, 0x14,
0x00, 0x12, 0x45, 0x12, 0x04, 0x00, 0x12, 0x41,
0x46, 0x44, 0x84, 0xc4, 0x12, 0x41, 0x28, 0x44,
0x00, 0x00, 0x00, 0x60, 0x24, 0x10, 0x18, 0x02,
0x00, 0x88, 0xc0, 0x82, 0x00, 0x12, 0x18, 0x81,
0x00, 0xf0, 0x98, 0x87, 0x00, 0x10, 0x88, 0x54,
0x41, 0x10, 0x68, 0x44, 0x10, 0x44, 0x22, 0x44,
0x26, 0x24, 0x53, 0x42, 0x00, 0x24, 0x10, 0x06,
0x00, 0x00, 0x00, 0x41, 0x10, 0x16, 0x01, 0x44,
0x63, 0x12, 0x22, 0x04, 0x00, 0x00, 0x41, 0x10,
0x14, 0xa2, 0x21, 0x84, 0x00, 0x22, 0x00, 0x84,
0x40, 0x08, 0x30, 0x92, 0x97, 0x4b, 0x00, 0x1c,
0x01, 0x00, 0x10, 0x81, 0x01, 0x00, 0x44, 0x21,
0x00, 0x10, 0x28, 0x21, 0x01, 0x00, 0x40, 0x02,
0x44, 0x00, 0x21, 0x23, 0x21, 0x04, 0x10, 0x01,
0x28, 0x81, 0x22, 0x42, 0x20, 0x02, 0x28, 0x23,
0x86, 0x24, 0x04, 0x48, 0x24, 0x00, 0x20, 0x22,
0xc4, 0xc8, 0x12, 0x10, 0x62, 0x82, 0x4f, 0xb6,
0x0c, 0x90, 0x42, 0x51, 0x11, 0x28, 0x8c, 0x82,
0x41, 0xcc, 0x18, 0x42, 0x19, 0x41, 0x1a, 0x01,
0x44, 0x48, 0x80, 0x44, 0x81, 0x91, 0x12, 0x00,
0x29, 0x24, 0x94, 0x44, 0x20, 0x01, 0x60, 0x41,
0x29, 0x04, 0x32, 0x15, 0x24, 0x04, 0x00, 0x42,
0x22, 0x22, 0x35, 0x24, 0x74, 0x38, 0x14, 0x32,
0x22, 0x10, 0x82, 0x62, 0x45, 0x62, 0x1a, 0x2a,
0x44, 0x28, 0x81, 0xa8, 0x21, 0x81, 0x5f, 0x29,
0x0e, 0x21, 0x2c, 0x41, 0x48, 0x82, 0x01, 0x00,
0x44, 0x8c, 0x01, 0x44, 0x81, 0x44, 0x16, 0x18,
0x04, 0x41, 0x20, 0x94, 0x41, 0x48, 0x00, 0x14,
0x24, 0x44, 0x42, 0x29, 0x85, 0x04, 0x43, 0x12,
0x84, 0x24, 0x42, 0x84, 0x41, 0x34, 0x31, 0x4c,
0x81, 0x01, 0x2e, 0x42, 0x10, 0x22, 0xc6, 0x82,
0x48, 0x20, 0x21, 0x18, 0x84, 0x14, 0x84, 0x51,
0x24, 0x18, 0x61, 0x28, 0xff, 0xd2, 0x0b, 0x12,
0x11, 0x1a, 0x14, 0x26, 0x98, 0x44, 0x41, 0x00,
0x00, 0x44, 0xd0, 0x18, 0x13, 0x32, 0x18, 0x12,
0x00, 0x44, 0x40, 0x34, 0x44, 0x00, 0x18, 0x48,
0x00, 0x10, 0x02, 0x14, 0x10, 0x02, 0x41, 0x12,
0x41, 0x22, 0x49, 0xa4, 0x41, 0x00, 0x88, 0x20,
0x04, 0xca, 0x03, 0x21, 0x21, 0x44, 0x28, 0x44,
0x40, 0x14, 0x02, 0xff, 0x27, 0x4d, 0x22, 0x64,
0x28, 0x12, 0x16, 0x52, 0x18, 0x1a, 0x14, 0x0c,
0x21, 0x42, 0xc1, 0x11, 0x14, 0x29, 0x01, 0x2c,
0x81, 0x04, 0x29, 0x05, 0x10, 0xa8, 0x14, 0x20,
0x14, 0x08, 0x41, 0x10, 0x02, 0x28, 0x00, 0x50,
0x42, 0x28, 0x1e, 0x24, 0x48, 0x4c, 0x22, 0x04,
0x90, 0x28, 0x81, 0x18, 0x21, 0x18, 0x28, 0x42,
0x90, 0x14, 0x82, 0x4b, 0x12, 0x10, 0x26, 0x72,
0x84, 0x11, 0xf6, 0x66, 0x68, 0x40, 0x18, 0x18,
0x04, 0x40, 0x19, 0x02, 0x50, 0x1c, 0x14, 0x8d,
0x14, 0x18, 0x4a, 0x02, 0x81, 0x81, 0x52, 0x30,
0x42, 0x42, 0x50, 0x62, 0xc0, 0x18, 0xa0, 0x81,
0x20, 0x04, 0x48, 0x12, 0x36, 0x01, 0x40, 0x18,
0x88, 0x04, 0x00, 0x1a, 0x02, 0x12, 0x00, 0x44,
0x28, 0x29, 0x12, 0x12, 0x02, 0x12, 0x14, 0x14,
0x88, 0x1e, 0x88, 0x29, 0x82, 0xb8, 0x5c, 0x4f,
0x22, 0x71, 0x91, 0x5b, 0xd4, 0x17, 0x24, 0x9f,
0x83, 0x98, 0x4d, 0xe5, 0x54, 0x18, 0xe3, 0xd1,
0x15, 0x75, 0x1d, 0xf8, 0x49, 0x42, 0xa5, 0x68,
0x61, 0x1e, 0x18, 0x2b, 0x45, 0x2d, 0x18, 0x49,
0x04, 0x1e, 0x54, 0x52, 0x46, 0x94, 0x14, 0x48,
0x83, 0x84, 0x24, 0xe4, 0x21, 0x61, 0x41, 0x18,
0x6d, 0x12, 0x6d, 0x64, 0x43, 0xe2, 0x21, 0xd4,
0x85, 0xc2, 0x64, 0x16, 0xc1, 0x14, 0x5a, 0xe2,
0x44, 0x21, 0x21, 0xd6, 0x26, 0x16, 0x98, 0x96,
0x2b, 0x32, 0x1a, 0xc8, 0x52, 0x2b, 0x44, 0x7a,
0x21, 0xbc, 0x64, 0xa1, 0x14, 0x4b, 0x15, 0x84,
0x4d, 0x18, 0x8b, 0x88, 0x4d, 0x33, 0xef, 0x4a,
0xf2, 0x9c, 0xb1, 0x80, 0x35, 0x82, 0x50, 0x52,
0x41, 0x2e, 0x29, 0x84, 0x4f, 0x41, 0x45, 0x4c,
0x44, 0x53, 0x12, 0x4d, 0x13, 0xeb, 0x54, 0x26,
0x12, 0x68, 0x45, 0x4a, 0x21, 0x34, 0x42, 0x2d,
0x15, 0x29, 0x24, 0x14, 0x02, 0x1e, 0x1a, 0x1e,
0x44, 0x4f, 0x44, 0x44, 0xc2, 0x42, 0x12, 0x14,
0x16, 0x74, 0x24, 0x44, 0x12, 0x52, 0xc4, 0x12,
0x55, 0xa4, 0x21, 0x43, 0xe4, 0x21, 0x35, 0x21,
0x1e, 0x58, 0x87, 0xa4, 0x4e, 0x42, 0xae, 0x62,
0x27, 0x84, 0x8e, 0x92, 0x24, 0x25, 0x04, 0x1e,
0x84, 0x93, 0xf2, 0x18, 0x85, 0x50, 0x44, 0x1c,
0xc8, 0x88, 0xbf, 0x17, 0x09, 0x25, 0xa2, 0x14,
0xbf, 0x21, 0x31, 0x14, 0x2d, 0x25, 0x56, 0x74,
0x11, 0x21, 0x84, 0x71, 0x48, 0x88, 0x61, 0x81,
0x1d, 0x24, 0x15, 0x18, 0xde, 0xe4, 0x11, 0x28,
0xf1, 0x12, 0x13, 0x45, 0x92, 0x44, 0x45, 0xc8,
0x46, 0x42, 0x2d, 0x41, 0xc7, 0x44, 0x41, 0xb0,
0x46, 0x34, 0x52, 0x4e, 0x44, 0x6a, 0x81, 0x92,
0x31, 0x27, 0x42, 0x41, 0x89, 0xb6, 0x24, 0x82,
0xb5, 0x24, 0xe4, 0x72, 0x86, 0x62, 0x44, 0x2f,
0x26, 0xe2, 0x48, 0x02, 0x2b, 0x14, 0x32, 0x12,
0x29, 0xf4, 0x14, 0xf2, 0x2d, 0x44, 0x4b, 0x6a,
0xcc, 0xb6, 0x44, 0xf5, 0x1a, 0x86, 0x3e, 0x38,
0x87, 0x43, 0x18, 0xbf, 0xa8, 0x03, 0x42, 0x40,
0xc8, 0x11, 0xe0, 0x16, 0x41, 0x28, 0x04, 0x47,
0x14, 0x60, 0x24, 0x12, 0x46, 0x02, 0x24, 0x8c,
0x04, 0x48, 0x24, 0x00, 0x12, 0x00, 0x81, 0x18,
0x90, 0x12, 0x10, 0x02, 0x18, 0x10, 0x02, 0x22,
0xa0, 0x12, 0x80, 0x01, 0x24, 0x16, 0xe8, 0x22,
0x08, 0x88, 0x80, 0x08, 0x88, 0x12, 0xa8, 0x11,
0x89, 0x08, 0x20, 0x18, 0xf8, 0x44, 0x74, 0x24,
0x16, 0xf2, 0x12, 0x12, 0x1f, 0x61, 0xf1, 0x1e,
0x1e, 0xef, 0xcd, 0xf5, 0x1c, 0x7b, 0xbf, 0x85,
0xf5, 0x5c, 0x1e, 0xaf, 0x85, 0xf4, 0x19, 0x58,
0x5e, 0x58, 0x5e, 0x1a, 0xaf, 0x81, 0xf5, 0x19,
0x51, 0xab, 0x11, 0xaf, 0xe1, 0xf5, 0x18, 0x18,
0x4f, 0x61, 0xf1, 0x13, 0x11, 0x4d, 0x14, 0xff,
0xd1, 0xf1, 0x14, 0x14, 0x4f, 0x41, 0x05, 0x15,
0x59, 0xe8, 0x2b, 0x15, 0x1e, 0x16, 0x2f, 0x21,
0xf1, 0x14, 0x16, 0x4f, 0x41, 0xf1, 0x34, 0x24,
0x4f, 0x43, 0xf3, 0x54, 0x76, 0x1d, 0x25, 0x6e,
0x64, 0x4f, 0x42, 0xf3, 0x14, 0x34, 0x5f, 0x52,
0xf2, 0x34, 0x24, 0x4f, 0x47, 0xf3, 0x14, 0x74,
0x5f, 0x71, 0xb7, 0x58, 0xf7, 0x26, 0xa4, 0x8a,
0xa4, 0x5a, 0x8f, 0x89, 0xd5, 0x88, 0xbd, 0xd2,
0xf1, 0xf4, 0x34, 0x6f, 0x4f, 0xfb, 0x74, 0xb4,
0x4b, 0x3b, 0x5f, 0x68, 0xf9, 0x16, 0x1c, 0xcd,
0x1c, 0x4f, 0xc3, 0x71, 0x24, 0xfd, 0xb1, 0x8b,
0x24, 0x2f, 0x21, 0xf1, 0x53, 0x13, 0x27, 0x61,
0xbf, 0xe5, 0xf5, 0xfb, 0x19, 0x9f, 0xb5, 0xf3,
0x5b, 0x19, 0x8f, 0xa1, 0xf5, 0x5a, 0x1c, 0x1f,
0xc5, 0x71, 0x49, 0xfc, 0x11, 0x58, 0xbf, 0x87,
0xf7, 0x59, 0x1b, 0xef, 0xe1, 0xf5, 0x5a, 0x1e,
0xaf, 0x81, 0xf1, 0x54, 0x16, 0x3f, 0x11, 0xf1,
0x56, 0x14, 0xff, 0xd1, 0xf5, 0x16, 0x14, 0x4f,
0x41, 0xb5, 0x42, 0xf5, 0x41, 0x49, 0xcf, 0xec,
0xbd, 0x56, 0xf5, 0x54, 0x92, 0x4f, 0x21, 0xf5,
0x16, 0x16, 0x4f, 0x65, 0xf5, 0x75, 0x65, 0x4f,
0x43, 0xf3, 0x54, 0x56, 0x55, 0xff, 0x64, 0x64,
0x4f, 0x42, 0xc7, 0x34, 0x5f, 0x53, 0xf2, 0x54,
0x64, 0x4f, 0x47, 0xf3, 0x54, 0x54, 0x7f, 0x55,
0xf5, 0x5a, 0x78, 0x6f, 0x6e, 0xf6, 0x94, 0xd4,
0x2b, 0xd7, 0xaf, 0xcb, 0xff, 0xd8, 0x5a, 0x2b,
0xbd, 0x4f, 0x67, 0xbb, 0x76, 0xfb, 0xf4, 0x34,
0x4f, 0x5b, 0xfd, 0x5d, 0x5e, 0xef, 0x89, 0xf9,
0x1e, 0x9c, 0x4f, 0xc3, 0xf1, 0x36, 0x9c, 0x5f,
0x44, 0x47, 0xf2, 0x42, 0x42, 0x3f, 0x31, 0xf5,
0x1b, 0x1a, 0xff, 0xf1, 0x71, 0x44, 0xfc, 0x75,
0x3f, 0x77, 0x14, 0x4f, 0x21, 0xf5, 0x5e, 0x1c,
0xdf, 0x95, 0xf1, 0x58, 0x1d, 0x9d, 0x5b, 0xbf,
0xb1, 0xf3, 0x5f, 0x1d, 0xa7, 0xa1, 0xed, 0x4e,
0xef, 0x85, 0xf5, 0x1c, 0x5e, 0x3f, 0x35, 0xe5,
0x61, 0xf5, 0x1f, 0x5d, 0x61, 0x5a, 0xa5, 0x54,
0x95, 0xd9, 0xe8, 0xf8, 0x52, 0x14, 0x4f, 0x61,
0xb4, 0x16, 0xd5, 0x66, 0xb1, 0x12, 0xf1, 0x16,
0x35, 0x4f, 0x43, 0xf3, 0x64, 0x76, 0x7d, 0x2d,
0x6f, 0x44, 0xf4, 0x24, 0x74, 0x4f, 0x41, 0xf3,
0x25, 0x35, 0x4f, 0x47, 0xf6, 0x74, 0x74, 0x7a,
0xd6, 0x77, 0xf6, 0x1e, 0x34, 0xef, 0xca, 0xf2,
0x22, 0x26, 0x2f, 0x23, 0xfb, 0x52, 0x72, 0x2b,
0x59, 0x2f, 0x25, 0xf1, 0x64, 0xb4, 0x6f, 0x43,
0xfb, 0xe4, 0x34, 0xcf, 0xc2, 0xf3, 0x1c, 0x1e,
0x6f, 0xc9, 0xf9, 0x96, 0x1c, 0x4f, 0x4b, 0xfb,
0x8c, 0x1c, 0x2f, 0x7c, 0x4d, 0xf2, 0x52, 0x52,
0x3f, 0x31, 0xf5, 0x1a, 0x1a, 0xbf, 0xa5, 0xf1,
0x3f, 0x1d, 0x4f, 0xf3, 0xf7, 0x1f, 0x1c, 0x4f,
0x65, 0xf1, 0x1e, 0x1c, 0xdf, 0x81, 0xf5, 0x19,
0x1a, 0xbf, 0x94, 0xf1, 0x1a, 0x78, 0xdf, 0xf1,
0xf4, 0x1a, 0x48, 0xe7, 0xe5, 0xcf, 0x85, 0xf5,
0x5c, 0x5e, 0x3f, 0x15, 0xf4, 0x56, 0x54, 0xff,
0xd1, 0x15, 0xf4, 0x54, 0x54, 0x4a, 0xf4, 0x49,
0x49, 0xcf, 0xe1, 0xfc, 0x56, 0x54, 0x4b, 0x5d,
0x6f, 0x21, 0xf5, 0x16, 0x16, 0x5e, 0x52, 0x3e,
0x75, 0x4f, 0x43, 0xf3, 0x74, 0x76, 0x55, 0xf7,
0x64, 0x64, 0x4f, 0x42, 0xf3, 0x24, 0x34, 0x5f,
0x53, 0xe3, 0x47, 0xf6, 0x74, 0x74, 0x7a, 0xd7,
0x57, 0xf4, 0x7e, 0x7c, 0x6f, 0x66, 0xfe, 0x92,
0x14, 0xfe, 0x52, 0x6b, 0x7d, 0x5e, 0xd2, 0x2f,
0x2f, 0xf1, 0x94, 0x16, 0x6f, 0x45, 0xf1, 0x64,
0xb4, 0x4f, 0xcf, 0xf7, 0xd4, 0xde, 0xef, 0xc1,
0xf1, 0x9c, 0x9c, 0x4b, 0x9b, 0xcf, 0xc8, 0xf9,
0xd1, 0x19, 0x80, 0x01, 0x41, 0x84, 0x45, 0x41,
0x18, 0x24, 0x01, 0x12, 0x34, 0x12, 0x14, 0x40,
0x04, 0x44, 0x1a, 0x04, 0x1a, 0x04, 0x40, 0x04,
0x00, 0x46, 0x84, 0x41, 0x94, 0x14, 0x00, 0x80,
0x01, 0x00, 0x00, 0x80, 0x54, 0x24, 0x48, 0x45,
0x22, 0x41, 0x82, 0x44, 0x82, 0x04, 0x80, 0x02,
0x81, 0x00, 0x82, 0x81, 0x82, 0xef, 0x2a, 0x0d,
0x20, 0x51, 0x32, 0x84, 0x21, 0x1d, 0x2c, 0x81,
0x10, 0x44, 0x98, 0x18, 0x50, 0x28, 0xc0, 0x12,
0x16, 0x18, 0x08, 0x24, 0x41, 0x18, 0x48, 0x80,
0x14, 0x08, 0x40, 0x02, 0x2c, 0x44, 0x84, 0xc1,
0x24, 0x22, 0x44, 0x63, 0x22, 0x91, 0x14, 0x12,
0x41, 0x28, 0x18, 0x4c, 0xb2, 0x48, 0x01, 0xa0,
0x21, 0x20, 0x41, 0x02, 0x4c, 0x21, 0xc1, 0x34,
0x41, 0x89, 0x01, 0x4c, 0x13, 0xf4, 0xd3, 0x27,
0xc0, 0x42, 0x1f, 0x41, 0x52, 0x28, 0x1f, 0xc1,
0x72, 0x68, 0xf1, 0x11, 0x64, 0xa7, 0x14, 0x1d,
0x6c, 0xef, 0x14, 0xd1, 0x41, 0xf6, 0x4a, 0x93,
0x19, 0xf6, 0x4a, 0x92, 0x59, 0xf4, 0x4a, 0x92,
0x4b, 0x42, 0xaf, 0x14, 0x79, 0x24, 0xf8, 0x42,
0x93, 0x47, 0x82, 0x2d, 0x91, 0x4f, 0x82, 0xc4,
0x91, 0x4f, 0xa2, 0xd4, 0x18, 0xf8, 0x26, 0x4a,
0x16, 0xf1, 0x24, 0x4a, 0x96, 0xf1, 0x22, 0x4a,
0x96, 0xd5, 0xa2, 0xe4, 0x49, 0xc2, 0x4a, 0x1f,
0x49, 0xd2, 0x22, 0xf4, 0x91, 0x24, 0x85, 0xf3,
0x91, 0x24, 0x8f, 0x24, 0xf1, 0x91, 0x24, 0xa7,
0x34, 0x1f, 0x49, 0xf2, 0x4a, 0x12, 0x1f, 0xc8,
0xb2, 0x4a, 0xb9, 0x81, 0xb2, 0x4a, 0x39, 0x85,
0xab, 0x94, 0x43, 0xba, 0x4a, 0x39, 0xa4, 0xab,
0xb4, 0x47, 0x8a, 0x29, 0xf9, 0x24, 0x48, 0x89,
0xf9, 0x24, 0x4a, 0x7f, 0x23, 0x01, 0x24, 0x1f,
0xc1, 0x46, 0xc2, 0x64, 0x89, 0x41, 0x94, 0x12,
0x4c, 0x92, 0x1a, 0x28, 0xad, 0x94, 0x19, 0xd2,
0x48, 0x1a, 0x94, 0xb8, 0x43, 0xc2, 0x91, 0x43,
0x82, 0x79, 0x24, 0x88, 0xf9, 0x26, 0x48, 0x1c,
0xf8, 0x26, 0x1a, 0x88, 0x4f, 0xa2, 0xc9, 0x81,
0x4f, 0x82, 0x64, 0x18, 0x2e, 0x48, 0x96, 0x45,
0xeb, 0x48, 0xc2, 0x49, 0x9e, 0x2c, 0x2e, 0x42,
0x9e, 0x4c, 0x87, 0x22, 0x9e, 0x44, 0x81, 0x8e,
0x24, 0xa3, 0xe4, 0x48, 0x22, 0x56, 0x41, 0x8f,
0x44, 0xd1, 0x41, 0xb2, 0x6a, 0x11, 0x95, 0x3a,
0x43, 0x92, 0x1a, 0x41, 0x29, 0x11, 0x94, 0x13,
0x6f, 0x82, 0x84, 0xf1, 0x26, 0x52, 0xef, 0xc3,
0x04, 0x82, 0x82, 0x1a, 0x04, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x88, 0x00, 0x00, 0x00, 0x18, 0x00, 0x80, 0x04,
0x88, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00,
0x00, 0x00, 0x14, 0xf0, 0xe8, 0x95, 0x24, 0x14,
0x19, 0x02, 0x4c, 0x32, 0x52, 0x19, 0x32, 0x41,
0x14, 0x18, 0x24, 0x58, 0x1c, 0x61, 0x21, 0x11,
0xc9, 0x01, 0x82, 0x55, 0xe8, 0x14, 0x11, 0x04,
0x48, 0x90, 0x48, 0x25, 0x01, 0x21, 0x13, 0x24,
0x01, 0x30, 0x22, 0x20, 0xa7, 0x12, 0x12, 0xc0,
0x28, 0x81, 0x12, 0x42, 0x88, 0x22, 0x14, 0x46,
0x08, 0x22, 0x42, 0x00, 0x16, 0x24, 0x44, 0x98,
0x28, 0x26, 0x18, 0x7c, 0xa4, 0x48, 0xc4, 0x28,
0x7f, 0xea, 0x0f, 0x4a, 0x32, 0x86, 0x86, 0x04,
0x13, 0x42, 0x54, 0x48, 0x4c, 0xb1, 0x48, 0x52,
0x58, 0x20, 0x14, 0x92, 0x84, 0x50, 0x14, 0xe7,
0x25, 0x24, 0x50, 0x82, 0x14, 0x2e, 0x81, 0x49,
0x44, 0x64, 0x22, 0x85, 0x44, 0x58, 0x24, 0x24,
0x42, 0xa0, 0x48, 0x21, 0x24, 0x40, 0x02, 0x30,
0x36, 0x40, 0x83, 0x61, 0x24, 0x42, 0x22, 0x86,
0x42, 0x92, 0x88, 0x85, 0x92, 0x88, 0x10, 0x53,
0x12, 0x98, 0x44, 0x1b, 0x78, 0xc0, 0x81, 0xf0,
0xf5, 0xf6, 0x40, 0x33, 0xe1, 0x82, 0x22, 0x5e,
0x21, 0x26, 0x35, 0x49, 0x16, 0x81, 0x56, 0xe1,
0x43, 0x94, 0x11, 0x22, 0x71, 0x47, 0x81, 0x64,
0xc8, 0x75, 0xe8, 0x11, 0x14, 0x52, 0x21, 0xc2,
0x43, 0x64, 0x85, 0x31, 0x67, 0x28, 0x84, 0x17,
0x44, 0x80, 0x04, 0x3f, 0x22, 0x08, 0x4a, 0x32,
0x3a, 0x16, 0x22, 0x44, 0x1a, 0x88, 0x21, 0xb4,
0x12, 0x88, 0x42, 0x31, 0x48, 0x45, 0x82, 0xe2,
0x8a, 0x04, 0x86, 0x68, 0x61, 0x3c, 0x14, 0x28,
0x6a, 0x82, 0x57, 0x26, 0x4c, 0x62, 0x58, 0x36,
0xf8, 0x92, 0x8f, 0xb0, 0x22, 0x44, 0x14, 0x44,
0x14, 0x02, 0x41, 0x44, 0x89, 0x01, 0x18, 0x48,
0x29, 0x21, 0x08, 0x11, 0x8d, 0x14, 0x10, 0x52,
0x84, 0x30, 0x21, 0x10, 0x84, 0x42, 0x08, 0x24,
0x12, 0x21, 0x80, 0x04, 0x18, 0x00, 0x20, 0xe2,
0x41, 0x02, 0x11, 0x80, 0x34, 0x42, 0x28, 0x88,
0x10, 0x42, 0x18, 0x02, 0x40, 0x91, 0x18, 0x41,
0x89, 0x69, 0x88, 0x00, 0x4f, 0xa5, 0x05, 0x48,
0x00, 0x10, 0x08, 0x00, 0x80, 0x02, 0x10, 0x08,
0x00, 0x00, 0x10, 0x84, 0x48, 0x48, 0x21, 0x02,
0x84, 0x00, 0x20, 0x02, 0x24, 0x12, 0x60, 0x41,
0x00, 0x70, 0x81, 0x14, 0xa8, 0x21, 0x21, 0x44,
0x46, 0x81, 0x02, 0x11, 0x98, 0x80, 0x01, 0x4a,
0x01, 0x20, 0x82, 0x01, 0x00, 0x4f, 0xa3, 0x0b,
0x10, 0x01, 0x21, 0x20, 0xd1, 0x82, 0x04, 0x29,
0x11, 0x31, 0x1a, 0x90, 0x82, 0x42, 0x16, 0xc8,
0x22, 0x89, 0x41, 0x22, 0x04, 0x2d, 0x11, 0x22,
0x12, 0x48, 0x29, 0x22, 0x12, 0xa3, 0x42, 0x21,
0x24, 0x12, 0x00, 0x89, 0x24, 0x02, 0x43, 0x82,
0x88, 0x03, 0x15, 0x04, 0x40, 0x08, 0x42, 0x90,
0x48, 0x30, 0x4a, 0x10, 0x08, 0x2b, 0x94, 0xc1,
0x10, 0x24, 0x18, 0xf8, 0xf8, 0x76, 0x00, 0x14,
0x24, 0x10, 0x48, 0xc2, 0x48, 0x00, 0x26, 0x11,
0x02, 0x84, 0x48, 0x81, 0x28, 0x2d, 0x18, 0x10,
0x42, 0xb6, 0x81, 0x21, 0x12, 0x81, 0x96, 0x22,
0xac, 0x02, 0x00, 0x2c, 0x02, 0x20, 0x81, 0x24,
0x02, 0x26, 0x04, 0x17, 0x4b, 0x84, 0x36, 0x02,
0x41, 0x48, 0x22, 0x10, 0xe1, 0x88, 0x41, 0xa2,
0x14, 0xa0, 0x14, 0x90, 0xc2, 0x4d, 0x28, 0x00,
0x40, 0xf8, 0xbf, 0x43, 0x20, 0x04, 0x00, 0x80,
0x01, 0x90, 0x12, 0x60, 0x81, 0x24, 0x82, 0x20,
0x01, 0x00, 0x48, 0x00, 0x81, 0x12, 0x00, 0x10,
0xa1, 0x42, 0x21, 0x80, 0x01, 0x21, 0x81, 0x49,
0x01, 0x80, 0x08, 0x40, 0x05, 0x50, 0x81, 0x80,
0x04, 0x48, 0x40, 0x08, 0x81, 0x80, 0x01, 0x12,
0x44, 0x82, 0xf0, 0x19, 0xda, 0x10, 0x02, 0x24,
0x00, 0x00, 0x00, 0x10, 0x88, 0x54, 0x28, 0x84,
0x00, 0x80, 0x14, 0x12, 0x01, 0x20, 0x02, 0x42,
0x00, 0x80, 0x21, 0x82, 0x02, 0x80, 0x04, 0x20,
0x41, 0x01, 0x4c, 0x01, 0x10, 0x01, 0x30, 0x82,
0x00, 0x88, 0x30, 0x88, 0x00, 0x42, 0x00, 0x00,
0xd0, 0x47, 0x02, 0x20, 0x11, 0x14, 0x88, 0x72,
0x28, 0xe1, 0x44, 0x01, 0x84, 0x81, 0x00, 0x00,
0x30, 0x18, 0xc4, 0x14, 0x90, 0x42, 0x80, 0x01,
0x00, 0x00, 0x00, 0x18, 0x00, 0x28, 0x28, 0x43,
0xc1, 0x84, 0x24, 0x22, 0x20, 0xd2, 0x12, 0x01,
0x18, 0x84, 0x18, 0x00, 0x00, 0x23, 0x08, 0x20,
0xd1, 0x84, 0x38, 0x48, 0x84, 0x20, 0xc2, 0x84,
0xff, 0xdb, 0x06, 0x40, 0x42, 0x01, 0x00, 0x00,
0x20, 0x41, 0x02, 0x10, 0x01, 0x00, 0x81, 0x00,
0x41, 0x00, 0x14, 0x20, 0x02, 0x40, 0x42, 0x02,
0x22, 0x40, 0x02, 0x11, 0x40, 0x02, 0x40, 0x02,
0x00, 0x00, 0x40, 0x18, 0x42, 0xa2, 0x14, 0x84,
0x84, 0x00, 0x41, 0x00, 0xf0, 0x72, 0x41, 0x10,
0xc2, 0x12, 0x54, 0xa1, 0x28, 0x22, 0x48, 0x00,
0x12, 0x85, 0x02, 0x85, 0x42, 0x09, 0x89, 0x41,
0x08, 0x10, 0x03, 0x12, 0x28, 0x11, 0x80, 0x02,
0x60, 0x21, 0x2a, 0x81, 0x82, 0x02, 0x42, 0x21,
0x11, 0x12, 0x22, 0x21, 0x47, 0x22, 0x24, 0x80,
0x11, 0x48, 0x82, 0x08, 0x81, 0x2c, 0x48, 0x62,
0x84, 0x90, 0x18, 0x84, 0x89, 0x04, 0x00, 0x88,
0x8f, 0x97, 0x09, 0x00, 0x00, 0x50, 0x81, 0x49,
0x01, 0x81, 0x84, 0x80, 0x04, 0x00, 0x40, 0xd4,
0x81, 0x14, 0x82, 0x44, 0x04, 0x00, 0x42, 0x00,
0x00, 0x24, 0x00, 0x28, 0x22, 0x16, 0x94, 0x84,
0x50, 0x12, 0x80, 0x31, 0x11, 0x10, 0x01, 0x12,
0x00, 0x24, 0x80, 0x28, 0x19, 0x08, 0x4e, 0x84,
0x50, 0x48, 0x80, 0x12, 0xf4, 0xe6, 0xd7, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe,
0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x44, 0x80,
0x02, 0x00, 0x00, 0x00, 0x10, 0x02, 0x18, 0x80,
0x08, 0x00, 0x00, 0x14, 0x00, 0x84, 0x80, 0x04,
0x00, 0x00, 0x00, 0x40, 0x04, 0x28, 0x00, 0x00,
0x00, 0x00, 0x21, 0x80, 0xf1, 0xf3, 0xb5, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4,
0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f,
0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00,
0x12, 0x00, 0x00, 0x80, 0x08, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x81, 0x00, 0x5f, 0x25, 0x07, 0x40,
0x22, 0x21, 0x02, 0x48, 0x00, 0x00, 0x10, 0x12,
0x01, 0x51, 0x81, 0x00, 0x44, 0x88, 0x22, 0x14,
0x22, 0x40, 0x0a, 0xb0, 0x42, 0xc1, 0x28, 0x44,
0x00, 0x00, 0x20, 0x01, 0x00, 0x16, 0x04, 0x1a,
0x02, 0x28, 0x88, 0x28, 0x10, 0x01, 0x00, 0xc0,
0x88, 0x22, 0x21, 0x8c, 0x02, 0x00, 0xdf, 0x63,
0x09, 0x19, 0x12, 0x24, 0x42, 0x82, 0x12, 0x4a,
0x14, 0x18, 0x85, 0x08, 0x18, 0x10, 0x02, 0x48,
0x41, 0x91, 0x22, 0x48, 0x00, 0x00, 0x00, 0x26,
0x04, 0x2c, 0x04, 0x84, 0x44, 0x00, 0x80, 0x02,
0x15, 0x04, 0x00, 0x00, 0x82, 0xa1, 0x60, 0x88,
0x10, 0x68, 0x21, 0x18, 0x22, 0x12, 0x81, 0x48,
0x80, 0x48, 0x08, 0x3d, 0xf4, 0x90, 0x21, 0x44,
0x23, 0x83, 0x92, 0x22, 0x2d, 0x48, 0x10, 0x48,
0x05, 0x90, 0x12, 0x15, 0x02, 0x41, 0x81, 0x40,
0x41, 0x84, 0x28, 0x12, 0x81, 0x02, 0xa4, 0x00,
0x2b, 0x14, 0x8c, 0x06, 0x00, 0x00, 0x20, 0x03,
0x14, 0x60, 0x41, 0x20, 0x01, 0x28, 0x80, 0x02,
0x11, 0x81, 0x18, 0x20, 0x42, 0x08, 0x21, 0x8c,
0x22, 0x08, 0xf0, 0x4c, 0x6e, 0x00, 0x00, 0x00,
0x10, 0x04, 0x20, 0x08, 0x00, 0x40, 0x81, 0x44,
0x44, 0x88, 0x82, 0x04, 0x00, 0x00, 0xc0, 0x24,
0x00, 0x61, 0x81, 0x41, 0x00, 0x00, 0x10, 0x04,
0x00, 0x22, 0xc0, 0x82, 0x86, 0x08, 0x86, 0x08,
0x40, 0x22, 0x01, 0x92, 0x89, 0x82, 0x04, 0x10,
0x08, 0x2f, 0xe1, 0x01, 0x00, 0x49, 0x11, 0x01,
0x30, 0x44, 0x12, 0x22, 0x20, 0x82, 0x44, 0x01,
0x00, 0x44, 0x00, 0x48, 0x4c, 0x42, 0x98, 0x28,
0x00, 0x24, 0x00, 0x80, 0x01, 0x00, 0x24, 0x00,
0x00, 0x44, 0x2a, 0x01, 0x00, 0x00, 0x22, 0x00,
0x11, 0x29, 0x28, 0x08, 0x00, 0x80, 0x28, 0x8a,
0x28, 0xf8, 0x16, 0x6a, 0xc0, 0x24, 0x11, 0x22,
0x29, 0x22, 0x31, 0x21, 0x27, 0x82, 0x11, 0x21,
0x32, 0x24, 0x16, 0x2a, 0x51, 0x21, 0x11, 0x12,
0x48, 0x4e, 0x16, 0x22, 0x16, 0x01, 0x4a, 0x11,
0x41, 0x08, 0x41, 0x42, 0x12, 0x29, 0x83, 0x82,
0xe6, 0x22, 0x81, 0xb4, 0x28, 0xc1, 0x44, 0x28,
0x20, 0x83, 0x51, 0x22, 0x16, 0xb2, 0x18, 0x82,
0xa4, 0x34, 0x2a, 0x8c, 0x08, 0x24, 0x4c, 0x04,
0x90, 0xe8, 0x21, 0xa2, 0x86, 0x38, 0x78, 0x81,
0x4e, 0x38, 0x84, 0x8e, 0x58, 0x20, 0x42, 0x91,
0x24, 0x39, 0x22, 0x41, 0x13, 0x84, 0x11, 0x22,
0x22, 0xe2, 0x81, 0x34, 0x12, 0x11, 0x00, 0x44,
0x42, 0x22, 0x58, 0x44, 0x84, 0x94, 0x81, 0x40,
0x24, 0x24, 0x01, 0x20, 0x86, 0x02, 0x18, 0x44,
0x00, 0x38, 0x24, 0x18, 0x23, 0x01, 0x42, 0x28,
0xc2, 0x00, 0x24, 0x15, 0x04, 0x40, 0x18, 0x22,
0x9a, 0x88, 0x89, 0x84, 0x82, 0x02, 0xb7, 0x25,
0x10, 0x04, 0x18, 0x00, 0x28, 0x4e, 0x28, 0x14,
0x22, 0x12, 0x24, 0x10, 0x01, 0x25, 0x81, 0x21,
0x74, 0x14, 0x02, 0x11, 0x22, 0x52, 0x22, 0x00,
0x24, 0x40, 0x82, 0xa3, 0x12, 0xc0, 0x12, 0x42,
0x87, 0x22, 0x42, 0x22, 0x00, 0x43, 0x21, 0x42,
0xb2, 0x28, 0x01, 0x1a, 0x24, 0xa2, 0x28, 0x00,
0x42, 0x29, 0x88, 0x88, 0x0e, 0x00, 0x3a, 0x68,
0x88, 0x5e, 0x88, 0x86, 0xf8, 0x79, 0xc5, 0x40,
0x24, 0x04, 0x00, 0x00, 0x10, 0x02, 0x41, 0x12,
0x12, 0x21, 0x00, 0x84, 0x71, 0x30, 0x42, 0xc5,
0x02, 0x80, 0x21, 0x22, 0x84, 0x04, 0x24, 0x18,
0x44, 0x00, 0x00, 0x41, 0x23, 0x04, 0x80, 0x02,
0x41, 0x40, 0x38, 0x62, 0x18, 0xa0, 0x21, 0x21,
0x80, 0x21, 0x24, 0x24, 0x88, 0x66, 0xa1, 0x40,
0x08, 0x9f, 0x27, 0x0a, 0x18, 0x23, 0x15, 0x22,
0x02, 0x00, 0x20, 0x02, 0x4d, 0x22, 0x22, 0x22,
0x46, 0x42, 0x94, 0x11, 0x00, 0x38, 0x40, 0x02,
0x12, 0x18, 0x20, 0x12, 0x28, 0x12, 0x01, 0x12,
0x19, 0x24, 0x04, 0x8c, 0x82, 0x21, 0x04, 0x22,
0x00, 0x42, 0x10, 0x01, 0x90, 0x41, 0x28, 0x00,
0x2d, 0x22, 0x2c, 0x42, 0x18, 0x02, 0x6c, 0x38,
0x88, 0x20, 0xe5, 0x9e, 0x48, 0x81, 0x42, 0x84,
0x82, 0xa1, 0x42, 0x44, 0x80, 0x92, 0x41, 0x18,
0x83, 0x01, 0x00, 0x18, 0x20, 0x05, 0x60, 0x22,
0x80, 0x02, 0x14, 0x40, 0x04, 0x10, 0x8a, 0x24,
0x02, 0x00, 0x00, 0x22, 0x18, 0x12, 0x10, 0x04,
0x28, 0x00, 0x00, 0x40, 0x88, 0x04, 0x88, 0x20,
0x02, 0x20, 0x04, 0x28, 0xd7, 0x39, 0xe0, 0x42,
0x41, 0x06, 0x32, 0x4a, 0x12, 0x04, 0x22, 0x1c,
0x02, 0x22, 0x1a, 0x22, 0x91, 0x42, 0x63, 0x81,
0x91, 0x48, 0xa0, 0x12, 0x2d, 0x42, 0x00, 0x12,
0x14, 0x22, 0x43, 0x92, 0x48, 0x22, 0x21, 0x58,
0x38, 0x42, 0x48, 0x00, 0x16, 0x26, 0x22, 0xa1,
0x12, 0x22, 0x44, 0x48, 0x50, 0x38, 0x42, 0x12,
0x14, 0x18, 0x84, 0x48, 0x29, 0xa2, 0x24, 0x46,
0x8a, 0x28, 0xc2, 0x14, 0x89, 0x0c, 0x2e, 0x42,
0x7f, 0x85, 0x08, 0x24, 0x12, 0x22, 0x00, 0x00,
0x30, 0x42, 0x12, 0x8d, 0x12, 0x00, 0x00, 0x11,
0x2c, 0x11, 0x05, 0x22, 0x85, 0x24, 0x02, 0x00,
0x48, 0x00, 0x85, 0x11, 0x42, 0x04, 0x00, 0x28,
0x00, 0x00, 0x00, 0x41, 0x28, 0x80, 0x02, 0x48,
0x24, 0x00, 0x12, 0x2d, 0x82, 0x80, 0x82, 0x94,
0x88, 0x10, 0x08, 0x1f, 0xf8, 0x0a, 0x41, 0x84,
0x30, 0x24, 0xc0, 0x22, 0x00, 0x20, 0x05, 0xa0,
0x41, 0x2c, 0x21, 0x02, 0xa0, 0x12, 0x44, 0x40,
0x04, 0x24, 0x00, 0x28, 0x20, 0x04, 0x28, 0x20,
0x03, 0x26, 0x01, 0x40, 0x08, 0x00, 0x80, 0x03,
0x00, 0x80, 0x02, 0x29, 0x08, 0x22, 0x48, 0x80,
0x02, 0x10, 0x18, 0x08, 0x4f, 0xd7, 0x0d, 0x20,
0x04, 0x24, 0x22, 0x00, 0x28, 0x00, 0x42, 0x12,
0x22, 0x41, 0x41, 0x42, 0x00, 0x81, 0x18, 0x2e,
0x12, 0x10, 0x08, 0x00, 0x81, 0x12, 0x12, 0x00,
0x00, 0x00, 0x28, 0x00, 0x20, 0x02, 0x42, 0x12,
0x28, 0x20, 0x24, 0x01, 0x00, 0x96, 0x02, 0x82,
0x00, 0x81, 0x40, 0x02, 0x77, 0x6b, 0x00, 0x14,
0x24, 0x20, 0x04, 0x12, 0x45, 0x02, 0x42, 0x4b,
0x21, 0x28, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00,
0x00, 0x41, 0x80, 0x01, 0x2c, 0x01, 0x12, 0x20,
0x21, 0x02, 0x21, 0x24, 0x18, 0x80, 0x02, 0x10,
0x02, 0x21, 0x42, 0x00, 0x82, 0x80, 0x42, 0x02,
0x28, 0x80, 0x28, 0x02, 0x3f, 0x9c, 0x09, 0x00,
0x4c, 0x42, 0x0a, 0x00, 0x20, 0x44, 0x08, 0x00,
0x15, 0x08, 0x48, 0x25, 0x81, 0x21, 0x22, 0x02,
0x40, 0x22, 0x81, 0x01, 0x40, 0x02, 0x00, 0x11,
0x00, 0x00, 0x42, 0x48, 0x84, 0x00, 0x1a, 0x02,
0x40, 0x08, 0x82, 0x40, 0x0a, 0x82, 0x80, 0xa8,
0x82, 0x86, 0x38, 0x28, 0x42, 0x80, 0xf8, 0x9b,
0x79, 0x14, 0x82, 0x80, 0x11, 0x02, 0xc0, 0x24,
0x00, 0x18, 0xc0, 0x11, 0x42, 0x42, 0x80, 0x01,
0x62, 0xe0, 0x21, 0x02, 0x12, 0x00, 0x80, 0xc1,
0x24, 0x00, 0x00, 0x22, 0x21, 0x28, 0x00, 0x80,
0x02, 0x28, 0x20, 0x04, 0x20, 0x08, 0x22, 0x80,
0x08, 0x20, 0x08, 0x82, 0x40, 0x02, 0x40, 0xf1,
0x91, 0x15, 0x90, 0x14, 0x00, 0x4b, 0x24, 0x18,
0x22, 0x80, 0x01, 0x00, 0x24, 0xc0, 0x14, 0x41,
0x00, 0x84, 0x4c, 0x14, 0x84, 0x02, 0x00, 0x21,
0x22, 0x42, 0x42, 0x00, 0x00, 0x00, 0xa0, 0x21,
0x80, 0x21, 0x04, 0x00, 0x48, 0x28, 0xa0, 0x48,
0x24, 0x90, 0x22, 0xa2, 0x00, 0x2d, 0x48, 0x00,
0x20, 0x14, 0x42, 0xf8, 0xd6, 0x1c, 0x80, 0x04,
0x48, 0x00, 0x41, 0x80, 0x24, 0x04, 0x48, 0x48,
0x00, 0x10, 0x68, 0x44, 0x00, 0x42, 0x84, 0x00,
0x44, 0x8c, 0x01, 0x40, 0x54, 0x48, 0x28, 0x89,
0x02, 0x81, 0x00, 0x00, 0x48, 0x20, 0x01, 0x00,
0x80, 0x21, 0x02, 0x80, 0x01, 0x81, 0x42, 0x12,
0x81, 0x83, 0x81, 0x04, 0x1a, 0x18, 0xf2, 0xed,
0x25, 0x20, 0x01, 0x43, 0x03, 0x16, 0x84, 0xa4,
0x16, 0x4c, 0x02, 0x44, 0x69, 0x22, 0x16, 0x04,
0x30, 0x14, 0x20, 0x14, 0x02, 0x20, 0x01, 0x00,
0x45, 0x22, 0x06, 0x41, 0x00, 0x00, 0x2c, 0x01,
0x12, 0x20, 0x03, 0x12, 0x10, 0x82, 0x04, 0x00,
0x80, 0x08, 0x28, 0x00, 0x46, 0x62, 0x84, 0x82,
0x88, 0x88, 0x80, 0xf8, 0xf6, 0xbf, 0x40, 0x08,
0x48, 0x80, 0x44, 0x08, 0x8c, 0x01, 0x00, 0x84,
0xa0, 0x24, 0x00, 0x00, 0x22, 0x00, 0x10, 0x02,
0x18, 0x12, 0x4c, 0x08, 0x80, 0x81, 0x02, 0x14,
0x00, 0x84, 0x80, 0x24, 0x04, 0x84, 0x40, 0x08,
0x82, 0xc0, 0x4c, 0x22, 0x28, 0x21, 0x20, 0x02,
0x00, 0x4a, 0x42, 0x38, 0x22, 0xf0, 0x51, 0x86,
0x30, 0x14, 0x8a, 0x24, 0x63, 0x62, 0x4b, 0x12,
0xa0, 0x21, 0x7e, 0x32, 0x48, 0x18, 0x28, 0x8c,
0x24, 0x34, 0x18, 0x1e, 0x24, 0x81, 0x11, 0xf0,
0x6c, 0x24, 0x4b, 0x11, 0x44, 0x40, 0x02, 0x20,
0x02, 0x49, 0x44, 0x2c, 0x03, 0x00, 0x1c, 0x03,
0x2a, 0xd2, 0x82, 0x24, 0x83, 0xa4, 0x11, 0xa0,
0x31, 0x16, 0x02, 0x82, 0x88, 0x66, 0xb8, 0x22,
0x18, 0x08, 0x8d, 0x22, 0xc0, 0x12, 0xab, 0xa4,
0x8f, 0x88, 0x02, 0x8f, 0x84, 0x54, 0x18, 0x88,
0x1d, 0x7e, 0x40, 0x44, 0xd1, 0x24, 0x03, 0x23,
0x81, 0x64, 0x42, 0x45, 0x2c, 0x74, 0x48, 0xf4,
0x46, 0x44, 0x1a, 0xb1, 0x12, 0x54, 0x54, 0x41,
0x4b, 0x41, 0x41, 0x1a, 0x07, 0x22, 0x2f, 0x82,
0x82, 0x11, 0x48, 0x02, 0x4d, 0x32, 0x49, 0xa6,
0x15, 0x00, 0x84, 0x34, 0x20, 0x03, 0x12, 0x80,
0x03, 0x00, 0x2a, 0x64, 0x84, 0x22, 0x8d, 0x92,
0x4a, 0xa4, 0x21, 0xb0, 0x82, 0xa8, 0xaa, 0xa0,
0x62, 0x2b, 0x4c, 0x82, 0x18, 0x6e, 0x22, 0x8a,
0x68, 0x22, 0x27, 0xa8, 0xef, 0x15, 0x07, 0x58,
0x84, 0x44, 0xeb, 0x24, 0x4a, 0xe4, 0xe2, 0xa2,
0x14, 0x00, 0x1a, 0x24, 0xb3, 0x61, 0xc2, 0x24,
0x4e, 0x52, 0xe0, 0x24, 0x21, 0x34, 0x68, 0x21,
0x4a, 0x22, 0x31, 0x12, 0x90, 0x16, 0x84, 0x16,
0x74, 0x68, 0x04, 0x69, 0x81, 0xb3, 0x22, 0xa2,
0x33, 0x84, 0x24, 0x22, 0x18, 0x00, 0xab, 0x14,
0x2a, 0x62, 0x82, 0x23, 0x84, 0x84, 0x02, 0x28,
0xc8, 0x24, 0x2c, 0x11, 0xa2, 0x89, 0x4a, 0x98,
0x88, 0x26, 0x88, 0xd8, 0x88, 0x0c, 0xb8, 0xf0,
0x59, 0xfb, 0x20, 0x15, 0x24, 0x11, 0xa8, 0x41,
0xc1, 0x12, 0x89, 0x01, 0xc9, 0x01, 0x89, 0x01,
0x89, 0x81, 0x94, 0x18, 0x48, 0x8d, 0x14, 0x84,
0x4c, 0x41, 0x88, 0x41, 0x48, 0x44, 0x08, 0x84,
0x56, 0x44, 0x28, 0x41, 0xa8, 0x21, 0x84, 0x1a,
0x02, 0x1a, 0x02, 0x1a, 0x12, 0xa8, 0x21, 0x81,
0x68, 0x89, 0x81, 0x92, 0x18, 0x68, 0x89, 0x21,
0xd8, 0x28, 0x01, 0x89, 0xa1, 0x4a, 0x18, 0x22,
0x18, 0xa2, 0x18, 0xa2, 0x81, 0x9f, 0x42, 0x4d,
0xa1, 0x11, 0x8c, 0xf1, 0x38, 0x3c, 0xef, 0x83,
0xf3, 0x7c, 0x78, 0x8b, 0x37, 0x3e, 0x38, 0x7e,
0x78, 0xcf, 0xc5, 0xf5, 0x54, 0x16, 0x2f, 0x87,
0xe6, 0xa7, 0xf3, 0x5b, 0x59, 0x4f, 0x45, 0xf1,
0x5c, 0x2a, 0xef, 0xe5, 0xf1, 0x1a, 0x1a, 0x2b,
0x33, 0x7e, 0x7a, 0xef, 0x87, 0xf7, 0x38, 0x38,
0x8f, 0x81, 0x61, 0x81, 0x85, 0x5a, 0xce, 0x8f,
0x82, 0xf2, 0x24, 0x7a, 0xaf, 0x81, 0xf5, 0x18,
0x1c, 0x8f, 0x83, 0xa3, 0x12, 0x8f, 0xa3, 0xf3,
0x3a, 0x18, 0x8f, 0xa3, 0xb3, 0x32, 0xa1, 0x33,
0x2e, 0x38, 0x8f, 0x83, 0xf3, 0x38, 0x18, 0x8f,
0xa3, 0xb3, 0x3a, 0xe3, 0xa7, 0xf3, 0x62, 0x3a,
0xaf, 0x83, 0xa3, 0xb3, 0xde, 0x98, 0xac, 0xf1,
0x9a, 0x98, 0x2b, 0x91, 0xaf, 0x89, 0xf9, 0x88,
0xb8, 0xbe, 0xb2, 0xaf, 0xa7, 0xbb, 0xfa, 0x8f,
0xfa, 0x38, 0x78, 0x8f, 0x87, 0xa7, 0x22, 0x2e,
0x2a, 0xff, 0xa4, 0x4f, 0xe1, 0x45, 0xe1, 0xc5,
0xf5, 0x34, 0x36, 0x6f, 0x63, 0xf2, 0x7e, 0x78,
0x8b, 0x27, 0x4f, 0xc7, 0xe7, 0x87, 0xf7, 0x4c,
0x5c, 0xcf, 0xe1, 0xf5, 0x76, 0x78, 0x3e, 0x7a,
0xbf, 0x96, 0xf7, 0x1c, 0x5c, 0x1e, 0x16, 0x6f,
0x61, 0xd1, 0xee, 0xf5, 0x3e, 0x38, 0x4f, 0xa6,
0xf7, 0x3e, 0x38, 0x2a, 0xb3, 0x12, 0xe1, 0x81,
0xd1, 0xa8, 0x51, 0x46, 0x4f, 0x4a, 0xfa, 0x34,
0x3a, 0xaf, 0x85, 0x29, 0xa1, 0x33, 0x8f, 0x83,
0xf3, 0x39, 0x3b, 0x2b, 0x23, 0x3e, 0x32, 0xaf,
0x83, 0xa2, 0x33, 0x1e, 0x78, 0x3a, 0xa3, 0x23,
0x8f, 0xa3, 0xb3, 0x1a, 0xe2, 0xa3, 0xd7, 0xa2,
0xf3, 0x3a, 0x38, 0x8f, 0x88, 0xfa, 0xe4, 0xac,
0xac, 0xf5, 0x1a, 0x3c, 0x87, 0xa8, 0x8a, 0xa8,
0x32, 0x8f, 0x87, 0xe7, 0x2a, 0xb8, 0xe2, 0xae,
0xb3, 0x8f, 0x87, 0xf7, 0x7a, 0x58, 0xaa, 0xe2,
0xa3, 0xe1, 0x8f, 0x44, 0xb1, 0x14, 0x95, 0x44,
0x4f, 0x63, 0xf3, 0x36, 0x26, 0x8f, 0x47, 0x75,
0x14, 0xac, 0x33, 0xcf, 0x47, 0xa7, 0x14, 0xcf,
0xe5, 0xf5, 0x62, 0x24, 0x8f, 0x27, 0xf7, 0x43,
0x31, 0xcf, 0x85, 0x75, 0x44, 0xf4, 0x54, 0x14,
0x4e, 0x12, 0xaf, 0xc7, 0xf7, 0x68, 0x76, 0x6f,
0xc7, 0xe7, 0x42, 0xb3, 0x12, 0x11, 0xd8, 0xe4,
0x11, 0xf2, 0x24, 0xa4, 0xcf, 0x22, 0xf6, 0x16,
0x5c, 0x43, 0xa1, 0x33, 0x8f, 0x82, 0xe2, 0x33,
0x33, 0x12, 0x3e, 0x32, 0x27, 0x81, 0x3a, 0x83,
0xa6, 0x33, 0x12, 0x8f, 0x23, 0xf3, 0x12, 0x38,
0x7a, 0xb3, 0x58, 0xa2, 0x32, 0x8d, 0xa8, 0xee,
0xa4, 0x87, 0x25, 0x2b, 0xb8, 0xaf, 0x88, 0x98,
0x82, 0x9a, 0xe8, 0x2e, 0xff, 0xea, 0x8a, 0x2b,
0xee, 0x9a, 0xe9, 0x8e, 0xfe, 0xea, 0xc8, 0x8b,
0xb3, 0x8f, 0xaa, 0xf9, 0x3f, 0xe9, 0x14, 0x4f,
0x45, 0xd5, 0x4c, 0xe5, 0x63, 0x73, 0x2e, 0xfa,
0x7a, 0x54, 0x45, 0xfc, 0x74, 0x74, 0xcf, 0x47,
0xd5, 0x88, 0xf4, 0x54, 0x56, 0x2f, 0x43, 0xf6,
0x78, 0x52, 0xbd, 0x69, 0x5e, 0x54, 0x4f, 0x45,
0xf4, 0x5c, 0x5c, 0xcf, 0xe4, 0xf4, 0x56, 0x74,
0xcf, 0x66, 0xf6, 0x16, 0x3c, 0x8f, 0xc2, 0xa2,
0x11, 0x83, 0x51, 0xe4, 0xa5, 0xd8, 0x44, 0xfa,
0x2c, 0x72, 0x6f, 0xcd, 0x55, 0xcc, 0x3a, 0xa3,
0x32, 0x8f, 0xb3, 0x73, 0x2a, 0xe8, 0x23, 0x73,
0x22, 0xa8, 0x33, 0x89, 0xa1, 0x33, 0x87, 0x82,
0x8f, 0x23, 0x73, 0x12, 0xa8, 0x77, 0x83, 0xf5,
0x28, 0x38, 0x9a, 0xe9, 0x4e, 0xfa, 0xf8, 0xe2,
0xef, 0x88, 0xf9, 0x92, 0x92, 0x23, 0xf8, 0x18,
0xa8, 0x8f, 0xae, 0xff, 0x92, 0x92, 0x2b, 0xee,
0xa8, 0x8f, 0x87, 0xff, 0xc8, 0xc8, 0x8b, 0xbb,
0x8f, 0xa8, 0xf9, 0x76, 0x58, 0x00, 0x30, 0x24,
0x00, 0x48, 0x22, 0x00, 0x20, 0x02, 0x80, 0x44,
0x04, 0x00, 0x28, 0x80, 0x02, 0x00, 0x00, 0x4a,
0x02, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0x04, 0x00, 0x00, 0x82, 0x00, 0x24, 0x82,
0x00, 0x42, 0x00, 0xb0, 0x6c, 0x01, 0x8a, 0x44,
0x04, 0x84, 0x21, 0x8c, 0x04, 0x84, 0x42, 0x84,
0xc0, 0x48, 0x40, 0x08, 0x8c, 0x24, 0x44, 0x78,
0x48, 0x94, 0x44, 0x81, 0x10, 0x08, 0x81, 0x10,
0x08, 0x81, 0x10, 0x08, 0x81, 0x00, 0x00, 0x40,
0x08, 0x84, 0x60, 0x81, 0x60, 0x81, 0x89, 0xa8,
0x69, 0x60, 0x81, 0x21, 0x86, 0x88, 0xc1, 0x48,
0x18, 0x16, 0x08, 0x16, 0x88, 0x48, 0xf9, 0xa1,
0x53, 0xc0, 0x42, 0x1f, 0x41, 0x52, 0x38, 0x1f,
0x41, 0x72, 0x4c, 0xf2, 0x11, 0x64, 0xa7, 0x24,
0x1d, 0x24, 0xab, 0x14, 0x1f, 0x41, 0xb2, 0x4a,
0xb9, 0x11, 0xf2, 0x4a, 0x92, 0x53, 0xf1, 0x4a,
0x91, 0x53, 0xf2, 0x4a, 0x91, 0x43, 0xf2, 0x42,
0x91, 0x47, 0x83, 0x2d, 0x91, 0x4f, 0x82, 0xc4,
0x91, 0x4f, 0xa2, 0xc4, 0x85, 0x4f, 0xa2, 0x64,
0x15, 0x4f, 0xa2, 0x64, 0x59, 0x2f, 0xa2, 0x65,
0x59, 0x2d, 0x4a, 0x9e, 0x24, 0x2e, 0x4a, 0x1f,
0x49, 0xc2, 0x42, 0x1f, 0x49, 0x52, 0x2a, 0x1f,
0x49, 0xb2, 0x6a, 0xf1, 0x91, 0x24, 0xa3, 0xf4,
0x81, 0x64, 0xaf, 0x24, 0xd1, 0x41, 0xb2, 0x6a,
0x99, 0x61, 0xaf, 0x24, 0x19, 0xf5, 0x4a, 0x92,
0x43, 0xb2, 0x4a, 0xbb, 0x24, 0xb4, 0x42, 0x79,
0x24, 0x98, 0xb2, 0x4f, 0x82, 0x84, 0xf9, 0x24,
0x4a, 0x53, 0x0c, 0x2c, 0xf4, 0x11, 0x64, 0x24,
0x1f, 0x41, 0x06, 0x13, 0x21, 0x94, 0x21, 0x4a,
0x91, 0x21, 0x2f, 0x44, 0x98, 0x21, 0x4e, 0xa4,
0x51, 0x2b, 0x84, 0x22, 0x4a, 0x39, 0x24, 0x4e,
0x91, 0x43, 0xc2, 0x81, 0x6b, 0x42, 0x1c, 0xf9,
0x22, 0x52, 0x1c, 0xa8, 0xd2, 0x1e, 0x81, 0x2e,
0x42, 0x96, 0xe1, 0x22, 0x64, 0x59, 0x3c, 0xe4,
0x49, 0xc2, 0x43, 0x17, 0xc9, 0x2c, 0xf4, 0x91,
0x64, 0xf0, 0x91, 0x64, 0x42, 0x17, 0x49, 0x23,
0xf4, 0x81, 0x24, 0x23, 0xd4, 0x41, 0xd2, 0x42,
0x58, 0x41, 0x2b, 0xa4, 0x51, 0x4a, 0x3a, 0x24,
0x88, 0x43, 0xb2, 0x42, 0x78, 0x24, 0x98, 0x82,
0x6f, 0x82, 0x84, 0xf8, 0x26, 0x5a, 0xde, 0xab,
0x40, 0x08, 0x00, 0x42, 0x00, 0x40, 0x12, 0x02,
0x54, 0x80, 0x02, 0x00, 0x00, 0x00, 0x20, 0x01,
0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00,
0x00, 0x00, 0x22, 0x00, 0x12, 0x44, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x9f, 0x7f, 0x06, 0x14,
0x45, 0x41, 0x21, 0x22, 0xb1, 0x21, 0x04, 0x15,
0xc8, 0x61, 0x16, 0x08, 0x8c, 0x02, 0xc9, 0x25,
0xd1, 0x81, 0x01, 0x48, 0x85, 0xe4, 0x41, 0x92,
0x22, 0x40, 0x08, 0x22, 0x44, 0x25, 0x02, 0xe1,
0x40, 0x02, 0x80, 0x02, 0x40, 0x02, 0x20, 0xc1,
0x58, 0x00, 0xe0, 0x49, 0x42, 0x22, 0x31, 0x81,
0x10, 0x51, 0x82, 0x40, 0x24, 0xe4, 0x29, 0x12,
0x04, 0x43, 0x78, 0x48, 0xf2, 0x21, 0x72, 0x20,
0xa4, 0x18, 0x12, 0x8d, 0x12, 0x19, 0x94, 0x12,
0x12, 0x62, 0x12, 0x41, 0x1e, 0x43, 0x18, 0x52,
0x31, 0x42, 0x21, 0x4b, 0x41, 0xa5, 0x24, 0x91,
0xc2, 0x43, 0x45, 0xa5, 0x21, 0x49, 0x02, 0x22,
0x8c, 0x81, 0x82, 0xa1, 0x25, 0x18, 0xb0, 0x22,
0x41, 0xa2, 0x12, 0x6d, 0x11, 0x2e, 0x14, 0x82,
0x2a, 0x51, 0x24, 0x22, 0x16, 0x64, 0x82, 0x22,
0x27, 0x24, 0xb0, 0x28, 0x44, 0x02, 0xd2, 0x78,
0x46, 0xa2, 0xc2, 0x87, 0x4a, 0x90, 0x88, 0x68,
0x14, 0x28, 0x3f, 0x6c, 0x4b, 0x61, 0x14, 0x4e,
0x14, 0x19, 0xd1, 0x28, 0x93, 0x41, 0x2f, 0x16,
0x81, 0x61, 0x96, 0x14, 0x16, 0xb8, 0x14, 0x34,
0x38, 0x3a, 0xf4, 0x16, 0x48, 0x4a, 0x71, 0x12,
0x61, 0x41, 0xa3, 0x34, 0x14, 0x2f, 0x63, 0xe8,
0x61, 0x16, 0x34, 0x38, 0x1a, 0x22, 0x62, 0x4a,
0x29, 0x31, 0x22, 0x2d, 0x18, 0x28, 0x18, 0x15,
0x82, 0x81, 0xb2, 0x28, 0x31, 0x15, 0x4a, 0x31,
0x82, 0x38, 0x16, 0xb4, 0x28, 0x94, 0x14, 0x22,
0x28, 0x4d, 0x12, 0x41, 0x83, 0xe2, 0x12, 0x08,
0xce, 0x13, 0x38, 0x48, 0x86, 0xb4, 0x88, 0x24,
0x7a, 0x82, 0x82, 0x82, 0xb8, 0x58, 0xf2, 0x66,
0xc4, 0x00, 0x11, 0x00, 0x18, 0x00, 0xa0, 0x16,
0x44, 0x34, 0x00, 0x11, 0x40, 0x28, 0x14, 0x14,
0x88, 0x04, 0x11, 0x10, 0x04, 0x10, 0x08, 0x44,
0x58, 0x10, 0x82, 0x42, 0x02, 0x21, 0x4c, 0x02,
0x40, 0x22, 0x01, 0x84, 0x24, 0x8a, 0x46, 0xa2,
0x41, 0x24, 0x00, 0x8c, 0x44, 0xa2, 0x42, 0x4c,
0x22, 0x51, 0x48, 0x48, 0x44, 0xf0, 0x38, 0x82,
0x80, 0x44, 0x44, 0x02, 0xe0, 0x81, 0x02, 0x8c,
0x52, 0x12, 0x11, 0x00, 0x1c, 0xc1, 0x48, 0x18,
0x84, 0x80, 0xa4, 0x24, 0x00, 0x22, 0x28, 0x00,
0x00, 0x48, 0x50, 0x83, 0x81, 0x41, 0x00, 0x1a,
0x12, 0x86, 0x02, 0x50, 0x24, 0x44, 0xd0, 0x81,
0x02, 0x40, 0x01, 0x40, 0x18, 0x48, 0xd8, 0x28,
0x08, 0xa0, 0x43, 0x18, 0x86, 0x98, 0x88, 0x49,
0xd4, 0x87, 0x4a, 0x91, 0x21, 0x70, 0x22, 0xc1,
0x28, 0xcd, 0x61, 0x14, 0x2b, 0x42, 0x31, 0x1a,
0xd6, 0x2a, 0x82, 0x52, 0xa1, 0x40, 0xd2, 0x21,
0x54, 0x24, 0x1c, 0x52, 0x28, 0x15, 0x98, 0x66,
0x32, 0xd0, 0x81, 0x61, 0x82, 0x15, 0x8a, 0x42,
0x78, 0x22, 0x2d, 0x82, 0x91, 0x22, 0x30, 0x78,
0x10, 0xc2, 0x21, 0x40, 0x94, 0x28, 0x31, 0x89,
0x11, 0xc4, 0x14, 0x25, 0x58, 0x2a, 0xc8, 0x2d,
0x98, 0x8b, 0x1c, 0x16, 0x26, 0xa8, 0x68, 0x29,
0x34, 0xa8, 0x2c, 0xc8, 0x86, 0x8b, 0x48, 0x43,
0x07, 0x81, 0x8e, 0xd5, 0x40, 0x41, 0x36, 0x21,
0xa1, 0x87, 0x12, 0x87, 0x21, 0x10, 0xfa, 0x12,
0x22, 0x99, 0x32, 0x22, 0x84, 0x11, 0x84, 0x1b,
0x14, 0x85, 0x34, 0x21, 0x83, 0xc4, 0x28, 0xa0,
0x12, 0x60, 0x82, 0x8c, 0x52, 0x81, 0x28, 0x84,
0xd3, 0x04, 0x85, 0x62, 0x82, 0x41, 0x2a, 0x41,
0x82, 0x51, 0x42, 0x00, 0x89, 0x12, 0x57, 0x48,
0x44, 0x89, 0x01, 0xa1, 0x13, 0xb4, 0x82, 0xa1,
0x85, 0x85, 0x06, 0x83, 0xfa, 0x4a, 0x82, 0x83,
0x22, 0x98, 0xd2, 0x83, 0x91, 0xbc, 0x88, 0x84,
0xbf, 0xbf, 0x05, 0x62, 0x00, 0x28, 0x43, 0x94,
0x21, 0x62, 0x1c, 0x32, 0x41, 0x00, 0x15, 0x82,
0x21, 0x14, 0x12, 0x12, 0x42, 0x62, 0x34, 0x4b,
0x24, 0x20, 0xc2, 0x11, 0x40, 0x02, 0x24, 0x28,
0x2c, 0x32, 0x11, 0x00, 0x46, 0x08, 0x28, 0x26,
0x21, 0x42, 0x04, 0x24, 0x18, 0xd0, 0x34, 0x42,
0x48, 0x22, 0x18, 0x18, 0x28, 0xc1, 0x88, 0x48,
0x20, 0x08, 0x43, 0x92, 0xc2, 0x48, 0x81, 0x4d,
0x42, 0x8f, 0x6d, 0x09, 0x10, 0xd4, 0x21, 0x12,
0x44, 0x74, 0x22, 0x41, 0x18, 0x91, 0x21, 0x25,
0x16, 0x84, 0x82, 0x02, 0x48, 0x80, 0x14, 0x11,
0x41, 0x74, 0x23, 0x42, 0x48, 0x04, 0x40, 0x09,
0x30, 0x21, 0xb0, 0x24, 0x54, 0x81, 0x30, 0x42,
0x89, 0x24, 0x24, 0x84, 0x81, 0x01, 0x40, 0x04,
0x21, 0x61, 0x41, 0x42, 0x21, 0x4e, 0x11, 0x8b,
0x18, 0x86, 0x34, 0x14, 0x12, 0x18, 0x42, 0x2c,
0x21, 0x25, 0xf1, 0x48, 0x14, 0x7f, 0x8a, 0x03,
0x2c, 0x64, 0x24, 0x81, 0x2c, 0xa2, 0x24, 0x43,
0x81, 0x21, 0x92, 0x14, 0x90, 0x44, 0x34, 0x8c,
0x12, 0x19, 0x42, 0x14, 0xa2, 0x14, 0x41, 0x40,
0x42, 0x04, 0x83, 0x01, 0x90, 0x21, 0x84, 0x84,
0x12, 0x14, 0x15, 0x02, 0x84, 0x81, 0x21, 0x4a,
0x12, 0x08, 0x28, 0x00, 0x20, 0x24, 0xb2, 0x14,
0x14, 0x21, 0x42, 0x04, 0x20, 0x32, 0x24, 0x82,
0x16, 0x42, 0x82, 0x48, 0x84, 0xf1, 0x5f, 0x55,
0xc0, 0x24, 0x2a, 0x01, 0x14, 0x40, 0x02, 0x24,
0x00, 0x10, 0x18, 0x81, 0x54, 0x84, 0x2b, 0x28,
0x00, 0xa0, 0x24, 0x41, 0x48, 0x50, 0x24, 0x00,
0x24, 0x2a, 0x04, 0x84, 0x80, 0x02, 0x18, 0x14,
0x43, 0x12, 0x84, 0x12, 0x02, 0xc9, 0x62, 0x88,
0x25, 0x48, 0x41, 0x02, 0x81, 0x24, 0x20, 0x14,
0x22, 0x08, 0x41, 0x00, 0x00, 0xf0, 0x51, 0xf8,
0x90, 0x44, 0x32, 0xa5, 0xd2, 0x25, 0xe2, 0x64,
0x62, 0x33, 0x16, 0x98, 0x21, 0x5b, 0x21, 0x21,
0x48, 0x84, 0xa1, 0x46, 0x78, 0x48, 0xf4, 0x86,
0x22, 0x42, 0x11, 0x44, 0x26, 0x64, 0x12, 0x42,
0x40, 0x0c, 0x91, 0x28, 0x8b, 0x24, 0x15, 0x28,
0x11, 0x54, 0x28, 0x60, 0x85, 0x46, 0x33, 0x64,
0x30, 0x28, 0x21, 0x80, 0x92, 0x88, 0xa1, 0x1c,
0x64, 0x22, 0xc0, 0x4b, 0x24, 0x51, 0x8c, 0x81,
0xb8, 0x24, 0xe1, 0x41, 0x02, 0x18, 0x29, 0x21,
0x84, 0xd1, 0x48, 0xf4, 0xb8, 0x3e, 0x60, 0x22,
0x44, 0x26, 0x01, 0x40, 0x04, 0x10, 0x42, 0x14,
0x92, 0x21, 0x14, 0x11, 0x21, 0x00, 0x1a, 0x44,
0x81, 0x54, 0x42, 0x45, 0x48, 0x44, 0x02, 0x40,
0x11, 0x82, 0x42, 0xe8, 0x14, 0x22, 0x02, 0x21,
0x00, 0x4c, 0x82, 0x21, 0x21, 0x42, 0x1c, 0x04,
0x25, 0x42, 0xa4, 0x14, 0x00, 0x1a, 0xe4, 0x24,
0x18, 0x84, 0x08, 0x4c, 0x89, 0x04, 0x92, 0x44,
0xf0, 0x75, 0xa7, 0x80, 0x06, 0x28, 0x11, 0x10,
0x81, 0x02, 0x00, 0x40, 0x61, 0x12, 0x46, 0x02,
0x00, 0x81, 0x11, 0x2c, 0x82, 0x02, 0x85, 0x02,
0x00, 0x84, 0x43, 0x12, 0x08, 0x84, 0x00, 0x85,
0x11, 0x02, 0x00, 0x00, 0x44, 0x00, 0x20, 0x01,
0x12, 0x28, 0x18, 0x22, 0x00, 0x83, 0x01, 0x46,
0x02, 0x83, 0x84, 0x44, 0xf2, 0x54, 0x6e, 0x00,
0x00, 0x00, 0x28, 0x20, 0x11, 0xa3, 0x24, 0x41,
0x83, 0x11, 0x14, 0x11, 0x79, 0x12, 0x02, 0x43,
0x04, 0x40, 0x08, 0x26, 0x21, 0x02, 0x26, 0x02,
0x14, 0x00, 0x43, 0x24, 0x42, 0x08, 0x20, 0x02,
0x44, 0x20, 0x82, 0x44, 0x64, 0x45, 0x18, 0x48,
0x4a, 0x11, 0x48, 0x02, 0x00, 0x00, 0x00, 0x80,
0x08, 0x21, 0x3f, 0x78, 0x0e, 0x00, 0x84, 0x28,
0x00, 0x80, 0x02, 0x84, 0x11, 0x23, 0x12, 0x01,
0x24, 0x42, 0x40, 0x18, 0x22, 0x04, 0x26, 0x14,
0x88, 0x24, 0x84, 0x24, 0x04, 0x11, 0x29, 0x06,
0x00, 0x40, 0x34, 0x42, 0x81, 0x10, 0x0a, 0x00,
0x25, 0x18, 0x42, 0x02, 0x2c, 0x41, 0xd8, 0x12,
0x01, 0x10, 0x08, 0x00, 0x80, 0x81, 0x18, 0xe8,
0x7c, 0x04, 0x11, 0x28, 0x18, 0x84, 0x20, 0x14,
0x12, 0x08, 0x11, 0x40, 0x16, 0x14, 0x08, 0x00,
0x14, 0x00, 0x84, 0x20, 0x04, 0x20, 0x01, 0x4a,
0x11, 0x42, 0x08, 0x13, 0x44, 0x81, 0x01, 0x84,
0x42, 0x18, 0x46, 0x04, 0x81, 0x81, 0x48, 0x00,
0x41, 0x48, 0xc0, 0x88, 0x31, 0x80, 0x02, 0x80,
0x04, 0x41, 0x29, 0xa2, 0x41, 0x4f, 0x11, 0x05,
0x82, 0x26, 0x09, 0x00, 0x00, 0x22, 0x19, 0x02,
0x21, 0x81, 0x00, 0x11, 0x00, 0x10, 0x08, 0x22,
0x21, 0x00, 0x23, 0x02, 0x50, 0x21, 0x10, 0x24,
0x02, 0x10, 0x41, 0x08, 0x42, 0x10, 0x04, 0x10,
0x64, 0x21, 0x10, 0x1a, 0x12, 0x28, 0x44, 0x01,
0x8b, 0x81, 0x80, 0x01, 0x41, 0x00, 0x18, 0x14,
0x1f, 0x23, 0x0b, 0x2c, 0x02, 0xa0, 0x24, 0x40,
0x88, 0xc3, 0x41, 0x00, 0x22, 0x48, 0x21, 0x21,
0x28, 0x10, 0x12, 0x02, 0x41, 0x30, 0x41, 0x23,
0x32, 0x44, 0x89, 0x21, 0x64, 0x82, 0x30, 0x21,
0x42, 0x81, 0x00, 0x00, 0x84, 0x90, 0x44, 0x00,
0x24, 0x18, 0x00, 0x4c, 0x08, 0x88, 0x41, 0x40,
0x02, 0x40, 0x0c, 0x12, 0x20, 0x28, 0x54, 0x42,
0x6f, 0xce, 0x43, 0x01, 0x80, 0x14, 0x24, 0x83,
0x02, 0x00, 0x38, 0xc0, 0x24, 0x80, 0x01, 0x81,
0x20, 0x01, 0x32, 0xa0, 0x21, 0x11, 0x23, 0x82,
0x21, 0x02, 0x10, 0x28, 0x22, 0x04, 0x8d, 0x41,
0x28, 0x40, 0x08, 0x68, 0xa0, 0x41, 0x48, 0x2a,
0x04, 0x22, 0x58, 0x20, 0x02, 0x44, 0x00, 0x21,
0x48, 0x48, 0x20, 0x84, 0x14, 0x22, 0xf8, 0x48,
0xa8, 0x00, 0x81, 0x10, 0x22, 0x02, 0x40, 0x08,
0xc4, 0x10, 0x01, 0x81, 0x22, 0x84, 0x40, 0x51,
0x82, 0x00, 0x00, 0xc0, 0x68, 0x00, 0x80, 0x42,
0x44, 0x04, 0x48, 0x90, 0x42, 0x00, 0x00, 0x10,
0x08, 0xc4, 0x24, 0x84, 0x20, 0x04, 0x40, 0x61,
0x84, 0x42, 0x24, 0x82, 0x18, 0xc8, 0x80, 0x88,
0xf4, 0x3a, 0xcb, 0xf0, 0x41, 0x18, 0x80, 0x14,
0x08, 0x81, 0x00, 0x28, 0x14, 0x19, 0x52, 0x42,
0x90, 0x23, 0x21, 0x00, 0x40, 0x21, 0x04, 0x14,
0x23, 0x24, 0x81, 0x01, 0x4a, 0x2a, 0x44, 0xc2,
0x12, 0x22, 0x4a, 0x41, 0x21, 0x44, 0xc2, 0x18,
0x81, 0x48, 0x81, 0x00, 0x24, 0x80, 0x04, 0x48,
0x44, 0x41, 0x89, 0x92, 0x42, 0x18, 0x00, 0x28,
0x88, 0x28, 0x10, 0x22, 0xf8, 0x6a, 0x16, 0x14,
0x3c, 0xb1, 0xa8, 0x62, 0x21, 0x22, 0x12, 0x26,
0x08, 0x83, 0x41, 0xf1, 0x28, 0x44, 0x35, 0x31,
0x69, 0x19, 0xc2, 0x41, 0x28, 0xa5, 0x18, 0xc2,
0x14, 0x81, 0x24, 0x8d, 0x28, 0x2e, 0x45, 0x81,
0x47, 0x21, 0x4a, 0x22, 0x91, 0x22, 0x54, 0xa4,
0x6c, 0xd2, 0x88, 0x62, 0x12, 0x42, 0x11, 0x46,
0x82, 0x01, 0x47, 0x41, 0x44, 0x52, 0xe0, 0x64,
0x72, 0x18, 0x34, 0x12, 0x4a, 0xc8, 0x44, 0x8f,
0x21, 0xc4, 0x22, 0xbf, 0xa1, 0x98, 0x22, 0x8c,
0x4c, 0x08, 0x2b, 0x84, 0x4f, 0x21, 0x01, 0x8b,
0x58, 0x3c, 0x84, 0xf8, 0xcf, 0x76, 0x30, 0x21,
0x20, 0x22, 0xa4, 0x22, 0x87, 0x34, 0x22, 0x62,
0xd0, 0x81, 0x21, 0x72, 0x12, 0x5a, 0x54, 0x95,
0x7a, 0x22, 0x62, 0x24, 0x50, 0x18, 0x35, 0x81,
0x43, 0x82, 0x72, 0x41, 0x8b, 0x52, 0x88, 0x28,
0x87, 0x82, 0x2c, 0x16, 0x18, 0x14, 0xa4, 0x14,
0x48, 0x1a, 0x16, 0x2c, 0xf2, 0x48, 0x48, 0x00,
0x10, 0x1c, 0x52, 0x26, 0x28, 0xac, 0x35, 0x42,
0x84, 0x43, 0xc4, 0x11, 0x13, 0xb4, 0x18, 0x31,
0x42, 0x5a, 0x01, 0xa0, 0x24, 0x4c, 0x28, 0x72,
0x8e, 0xf2, 0x68, 0x6a, 0xa0, 0x64, 0x15, 0x48,
0xd8, 0xd8, 0x02, 0x28, 0x1a, 0xd2, 0xa1, 0xb2,
0x21, 0xc2, 0x21, 0x6c, 0xc2, 0x21, 0x25, 0x92,
0x12, 0x15, 0x29, 0x01, 0x3d, 0x4a, 0x84, 0x4b,
0x46, 0x22, 0x19, 0xa1, 0x62, 0x2b, 0x46, 0x2a,
0xa4, 0x46, 0x4a, 0x34, 0x51, 0x3f, 0x12, 0xb2,
0x6a, 0xe5, 0x46, 0x84, 0x54, 0x88, 0x85, 0x13,
0x32, 0x42, 0x80, 0x72, 0x4e, 0x28, 0xe2, 0x84,
0x74, 0x14, 0xe8, 0x84, 0x65, 0x24, 0xa7, 0x41,
0x12, 0x4a, 0x4b, 0x1c, 0x44, 0x11, 0x22, 0x52,
0x8c, 0x28, 0xca, 0x84, 0x2c, 0xa4, 0x9c, 0x4a,
0xf5, 0x89, 0x3f, 0x14, 0x12, 0x22, 0x12, 0x81,
0x12, 0x83, 0x26, 0xf1, 0x68, 0x11, 0xf0, 0x68,
0x11, 0xf0, 0x68, 0x13, 0xf0, 0x48, 0x12, 0xf0,
0x48, 0x12, 0x90, 0x18, 0x1d, 0x48, 0x38, 0x84,
0x38, 0x15, 0x88, 0x42, 0x88, 0x42, 0x28, 0x51,
0x83, 0x1a, 0x52, 0x84, 0x1a, 0x42, 0xa8, 0x25,
0x21, 0x1a, 0x02, 0x1a, 0x12, 0xa8, 0x61, 0x81,
0x68, 0xcd, 0x12, 0x68, 0x89, 0x89, 0x96, 0x98,
0xd0, 0x38, 0x09, 0x8d, 0x92, 0x2a, 0x84, 0xa9,
0x42, 0x18, 0xa2, 0x18, 0x22, 0x42, 0x6f, 0x86,
0x05, 0x1f, 0x24, 0xf7, 0x13, 0x31, 0x8d, 0x2a,
0xef, 0xc3, 0xe3, 0x85, 0xf5, 0x18, 0x18, 0x8f,
0x84, 0xf6, 0x49, 0x79, 0x5e, 0x58, 0xdf, 0xe5,
0xf1, 0x5b, 0x58, 0xbf, 0x94, 0xf5, 0x58, 0x58,
0xaf, 0x85, 0xf1, 0x5b, 0x58, 0xaf, 0x84, 0xf5,
0x52, 0x1a, 0xaf, 0xa1, 0xf5, 0x1b, 0x19, 0xc5,
0xfc, 0x38, 0x18, 0x8f, 0x97, 0xf5, 0x19, 0x19,
0xc5, 0x76, 0x4a, 0xb8, 0x68, 0xf1, 0x58, 0x58,
0x8f, 0xa7, 0xf7, 0x78, 0x79, 0x8f, 0xe5, 0xf4,
0x4a, 0x18, 0x8f, 0x84, 0xf3, 0x38, 0x38, 0x8f,
0xa2, 0xa2, 0x72, 0x78, 0x3a, 0xf3, 0x2c, 0x2c,
0xcf, 0xc3, 0xf3, 0x58, 0x38, 0x8f, 0xa2, 0xf2,
0x7a, 0x3a, 0xcf, 0xa3, 0xf3, 0x12, 0x1a, 0xef,
0xeb, 0xfb, 0xf8, 0xf8, 0x8f, 0x85, 0xe5, 0x89,
0xf8, 0xdd, 0xde, 0xaf, 0x8d, 0xff, 0x38, 0x78,
0xbe, 0xa8, 0xcf, 0xeb, 0xbb, 0x72, 0xf5, 0x14,
0x34, 0x9a, 0xa3, 0xe2, 0xca, 0xf4, 0x44, 0xe6,
0xff, 0x37, 0x0f, 0x1f, 0x24, 0xf5, 0x53, 0x71,
0x8f, 0x21, 0xf3, 0x2e, 0x6c, 0x8f, 0x84, 0xf6,
0x78, 0x78, 0x8b, 0x11, 0x9d, 0x39, 0x8f, 0x87,
0xf7, 0x4d, 0x2e, 0xad, 0x24, 0xaf, 0xa2, 0xb3,
0x59, 0x77, 0x49, 0x1a, 0xd9, 0xa8, 0xf1, 0x58,
0x18, 0x8d, 0x4a, 0xad, 0x49, 0x4f, 0xc1, 0xf5,
0x38, 0x38, 0x3f, 0x96, 0x56, 0x98, 0xcf, 0xe3,
0xf5, 0x2a, 0x28, 0x8f, 0x8a, 0xf8, 0x68, 0x48,
0x6e, 0xe8, 0xbf, 0x97, 0xf7, 0x72, 0x4a, 0xef,
0xc6, 0xf3, 0x41, 0x39, 0x8f, 0x87, 0xe3, 0x85,
0xd5, 0x82, 0x95, 0x72, 0x7a, 0xf7, 0x18, 0x14,
0xc5, 0xbc, 0x48, 0xf6, 0x38, 0x3a, 0xa5, 0xf6,
0x1a, 0x1e, 0xaf, 0x82, 0xf7, 0x7c, 0x7c, 0x8f,
0x42, 0xf7, 0xd8, 0xd8, 0x8f, 0x8b, 0xfb, 0x5c,
0x5c, 0xbf, 0x14, 0xf5, 0x98, 0xda, 0xaf, 0x89,
0xf9, 0xbc, 0xbe, 0x2b, 0x16, 0x4f, 0x41, 0xa3,
0x38, 0x2b, 0xff, 0xea, 0xfe, 0xc6, 0x74, 0x5d,
0x66, 0xf0, 0x11, 0x62, 0x3d, 0x61, 0x8f, 0x21,
0xd3, 0xce, 0xa2, 0x22, 0x8f, 0x84, 0xb4, 0x18,
0xf3, 0x19, 0x29, 0x1f, 0x14, 0xf1, 0x2d, 0x6e,
0xbf, 0x42, 0x72, 0x1b, 0xb9, 0x4a, 0xd3, 0x8a,
0x14, 0x7a, 0x1a, 0xf8, 0x42, 0x12, 0xad, 0x4a,
0xb7, 0x94, 0x4f, 0xc7, 0x73, 0x28, 0xf8, 0x63,
0x48, 0x9f, 0x92, 0xf2, 0x24, 0x36, 0xa5, 0xa8,
0x86, 0x8f, 0x84, 0xf6, 0x21, 0x4b, 0x87, 0x93,
0x6e, 0x7e, 0xe7, 0xc4, 0x7e, 0x49, 0x8f, 0x84,
0xe2, 0xa5, 0xe5, 0x84, 0xa4, 0x47, 0x68, 0xcf,
0x41, 0x51, 0xcc, 0x83, 0xf6, 0x48, 0x6a, 0xaf,
0x45, 0xf1, 0x5c, 0x5c, 0x2a, 0xf7, 0x5c, 0x5e,
0x8f, 0x44, 0xf5, 0xf8, 0xf8, 0x28, 0xdf, 0xe5,
0xb5, 0x4a, 0xf5, 0x98, 0xda, 0x2f, 0x84, 0xf4,
0x3c, 0x1e, 0x2b, 0xfc, 0x4f, 0x45, 0xad, 0x9a,
0x2b, 0x99, 0xea, 0xfe, 0xc4, 0xd6, 0xcf, 0x5b,
0x4f, 0x71, 0x71, 0xf3, 0x33, 0x71, 0x2c, 0xf2,
0x4e, 0x2c, 0x5e, 0x78, 0x8f, 0x83, 0x23, 0xf2,
0x79, 0x69, 0x1f, 0x86, 0xf3, 0x1d, 0x7f, 0x2d,
0x21, 0xbf, 0xb7, 0xb6, 0x43, 0xf1, 0x1b, 0x5a,
0x31, 0xaf, 0xa5, 0xf4, 0x42, 0x1a, 0xbf, 0xb1,
0xf5, 0x4a, 0x49, 0x4f, 0x44, 0xf4, 0x38, 0x38,
0x1f, 0x17, 0xd7, 0x89, 0xf4, 0x2c, 0x56, 0xaf,
0x82, 0xb2, 0x28, 0xf8, 0x68, 0x68, 0xbe, 0x32,
0xbf, 0xb3, 0xf2, 0x62, 0x52, 0xef, 0xc6, 0xa6,
0x47, 0x8f, 0x85, 0xe3, 0x26, 0xf6, 0x42, 0x42,
0x2b, 0x47, 0x1a, 0xf7, 0x24, 0x24, 0xc5, 0xac,
0x17, 0x8f, 0xa5, 0xf7, 0x22, 0x26, 0x8f, 0xe5,
0xd5, 0x82, 0xf4, 0xfc, 0xfc, 0xf0, 0x78, 0x38,
0x9e, 0xaa, 0xff, 0xdd, 0xfd, 0x43, 0x41, 0x8f,
0xa1, 0xf5, 0xfa, 0xe8, 0xcf, 0xe7, 0xb5, 0xc2,
0xfa, 0x54, 0x94, 0xaa, 0xa8, 0xb3, 0xde, 0x52,
0x4f, 0x4c, 0x78, 0x4c, 0x0e, 0x00, 0x22, 0x00,
0x20, 0x82, 0x24, 0x82, 0x24, 0x02, 0x00, 0x00,
0x24, 0x00, 0x00, 0x20, 0x04, 0x4a, 0x02, 0x00,
0x4a, 0x02, 0x4a, 0x02, 0x00, 0x42, 0x00, 0x00,
0x00, 0x24, 0x40, 0x02, 0x80, 0x04, 0x40, 0x01,
0x00, 0x00, 0x00, 0x00, 0x2f, 0x77, 0x0c, 0x8a,
0xa4, 0x21, 0x20, 0x21, 0xa4, 0x21, 0x42, 0xa0,
0x14, 0xe0, 0x34, 0x11, 0x81, 0x81, 0x94, 0x12,
0x48, 0x2b, 0x14, 0xc0, 0x11, 0x2a, 0x84, 0x21,
0xc2, 0x11, 0x00, 0xa0, 0x25, 0x24, 0x16, 0x01,
0x16, 0x04, 0x1a, 0x02, 0x1a, 0x92, 0x42, 0x1a,
0x02, 0x1e, 0x24, 0xa0, 0x21, 0x41, 0x28, 0x24,
0x8a, 0x12, 0xa2, 0x28, 0x24, 0xa0, 0x84, 0xa2,
0x88, 0x22, 0x88, 0x80, 0xaa, 0x4b, 0x42, 0x26,
0xf3, 0xd5, 0x6a, 0xe0, 0x32, 0xf4, 0x11, 0x24,
0x85, 0xf2, 0x11, 0x2c, 0x87, 0x36, 0x1f, 0x41,
0x72, 0x6a, 0xd3, 0x41, 0xb2, 0x6a, 0xd1, 0x41,
0xf2, 0x6a, 0x93, 0x19, 0xf2, 0x4a, 0x93, 0x51,
0xaf, 0x24, 0x79, 0x24, 0xf8, 0x4a, 0x91, 0x53,
0xf2, 0x42, 0x97, 0x47, 0x82, 0x2d, 0xb1, 0x5f,
0x82, 0xc4, 0xb5, 0x4f, 0xa2, 0xc4, 0xa1, 0x4f,
0xa2, 0xe4, 0x11, 0xf2, 0x27, 0x4a, 0x87, 0x59,
0x6f, 0xa2, 0xe4, 0x59, 0xc2, 0x4a, 0x8f, 0x49,
0xd2, 0xa4, 0xf4, 0x91, 0x24, 0x2d, 0x42, 0x1f,
0x49, 0x52, 0x28, 0x1f, 0x49, 0x32, 0x4e, 0x1f,
0x49, 0x72, 0x4e, 0xf2, 0x91, 0x2c, 0xab, 0x14,
0x1f, 0x41, 0xf2, 0x4a, 0x92, 0x19, 0xf6, 0x4a,
0x92, 0x55, 0xf8, 0x4a, 0x91, 0x43, 0xb2, 0x4a,
0x79, 0x24, 0xf8, 0x42, 0x92, 0x47, 0x82, 0xa9,
0xf9, 0x24, 0x48, 0x8f, 0x44, 0xf9, 0x24, 0x4a,
0x46, 0x0b, 0x2c, 0xd4, 0xc1, 0x56, 0x28, 0x19,
0x36, 0x48, 0x15, 0x34, 0x4a, 0x4c, 0x32, 0x4a,
0x1d, 0x24, 0xaf, 0x44, 0x18, 0xf1, 0x48, 0xa4,
0x41, 0x8b, 0xa4, 0x43, 0xf2, 0x48, 0x81, 0x43,
0x92, 0x82, 0x47, 0x82, 0x2d, 0x81, 0x65, 0xc8,
0x81, 0x6f, 0xa2, 0xc5, 0x81, 0x4d, 0xca, 0x1c,
0xf8, 0x24, 0x48, 0x86, 0xe1, 0x22, 0x64, 0x18,
0xbc, 0x64, 0x48, 0x1c, 0x74, 0x81, 0xcc, 0x42,
0x17, 0xcc, 0x85, 0xf2, 0x81, 0x44, 0x83, 0x74,
0x81, 0x74, 0x4a, 0x32, 0x81, 0x83, 0x54, 0x41,
0xad, 0x84, 0x11, 0xaf, 0x44, 0x0b, 0xab, 0x94,
0x41, 0x8b, 0x94, 0x48, 0x2b, 0x94, 0x45, 0x98,
0x12, 0x6d, 0x48, 0x98, 0x6d, 0x1a, 0xd7, 0xdb,
0x00, 0x80, 0x84, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x44, 0x40, 0x01, 0x00, 0x90, 0x12,
0x80, 0x08, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00,
0x00, 0x00, 0x00, 0x12, 0x00, 0x28, 0x00, 0x40,
0x08, 0x00, 0x00, 0xb0, 0xfb, 0x0c, 0x24, 0x14,
0x14, 0x81, 0x16, 0x28, 0xc2, 0x21, 0x24, 0x48,
0x50, 0x29, 0x12, 0x24, 0x13, 0x44, 0xc1, 0x1c,
0xb0, 0x41, 0x02, 0x27, 0x28, 0x44, 0x28, 0x4b,
0x42, 0x1c, 0x42, 0x04, 0x4b, 0x42, 0x22, 0x26,
0x85, 0x02, 0x90, 0x44, 0x98, 0x00, 0x40, 0x04,
0x44, 0x46, 0x4c, 0x72, 0x19, 0xe4, 0x24, 0x63,
0x21, 0x24, 0x00, 0xa4, 0x48, 0x50, 0x22, 0x8a,
0x11, 0x02, 0x20, 0x24, 0x42, 0xf2, 0x99, 0xd2,
0x00, 0x82, 0xc4, 0x22, 0x28, 0x91, 0x84, 0x1a,
0x52, 0x84, 0x89, 0x93, 0x42, 0x14, 0x17, 0x84,
0x85, 0xc4, 0x18, 0x29, 0x44, 0x4c, 0x42, 0x99,
0x58, 0x22, 0x81, 0x10, 0xc8, 0x22, 0x66, 0x54,
0x22, 0x81, 0x25, 0x52, 0x18, 0x25, 0x02, 0x28,
0xc3, 0x52, 0x12, 0x14, 0x40, 0x28, 0x12, 0x09,
0x2d, 0x1c, 0x40, 0x38, 0x48, 0x96, 0x68, 0x84,
0x1e, 0x88, 0x12, 0x94, 0x81, 0x4d, 0xf8, 0x84,
0x26, 0x64, 0xc8, 0x18, 0x4c, 0x69, 0x11, 0x43,
0xf8, 0x84, 0x95, 0x00, 0x42, 0x84, 0x89, 0x82,
0x82, 0x62, 0x82, 0x70, 0x42, 0x48, 0xd2, 0x94,
0x24, 0xf1, 0x21, 0x48, 0x47, 0x94, 0x16, 0x38,
0x1a, 0x84, 0x66, 0x41, 0x33, 0xc8, 0x25, 0x12,
0x18, 0x34, 0x19, 0x24, 0xa2, 0x4b, 0x42, 0x87,
0x22, 0x49, 0xd2, 0x18, 0x02, 0x31, 0x46, 0xc4,
0x96, 0x91, 0x11, 0x42, 0x84, 0x28, 0x95, 0x64,
0xa4, 0x2c, 0x91, 0x11, 0x8b, 0x25, 0x2d, 0x18,
0x67, 0x81, 0xa9, 0x64, 0x8b, 0x89, 0x71, 0x41,
0x58, 0x28, 0x8b, 0x92, 0x87, 0x21, 0x49, 0x22,
0x48, 0xb2, 0x14, 0xa4, 0x21, 0x43, 0xb1, 0xd8,
0x07, 0x24, 0x11, 0x45, 0x01, 0x89, 0x51, 0x81,
0x14, 0x1a, 0x12, 0xe4, 0x81, 0x42, 0x12, 0x41,
0x02, 0x14, 0x49, 0x44, 0x04, 0xa1, 0x12, 0x4c,
0x22, 0xa2, 0x24, 0x22, 0x4c, 0xd2, 0x24, 0x04,
0x21, 0x14, 0x25, 0x02, 0x80, 0x62, 0x82, 0x00,
0x10, 0x04, 0x40, 0x14, 0x4c, 0x0c, 0x48, 0x88,
0x00, 0x10, 0x02, 0x46, 0x26, 0x08, 0x45, 0x88,
0x21, 0x08, 0x86, 0xf2, 0x48, 0xfa, 0x40, 0x02,
0x60, 0x81, 0x18, 0x84, 0x42, 0x40, 0xc2, 0x28,
0x2f, 0x14, 0x08, 0x87, 0x14, 0x41, 0x24, 0x15,
0x18, 0x02, 0x18, 0x80, 0x21, 0x02, 0x00, 0x21,
0x42, 0x10, 0x58, 0x22, 0x00, 0x20, 0x82, 0x12,
0x12, 0x51, 0x14, 0x13, 0x11, 0x04, 0xa9, 0xc1,
0x28, 0x24, 0x1a, 0x24, 0xe4, 0x81, 0x44, 0x23,
0x81, 0x28, 0xd1, 0x62, 0x4a, 0x88, 0x08, 0x70,
0x84, 0x18, 0x08, 0x1f, 0xa6, 0x02, 0x27, 0x54,
0x11, 0x61, 0x24, 0xa0, 0x12, 0x25, 0x35, 0x4b,
0x63, 0x14, 0x04, 0x23, 0x02, 0x25, 0xd9, 0x81,
0x24, 0x14, 0x84, 0xd1, 0x1c, 0xf4, 0x12, 0x23,
0x1c, 0x44, 0x91, 0x48, 0x19, 0x76, 0x44, 0x69,
0x16, 0xc5, 0x92, 0x21, 0x5b, 0x68, 0x41, 0x50,
0x6a, 0x42, 0x47, 0x84, 0x27, 0x14, 0x2e, 0x41,
0x2f, 0x62, 0x01, 0x84, 0x21, 0xab, 0x52, 0x44,
0x29, 0xc1, 0x14, 0x8c, 0xaa, 0x28, 0x29, 0x22,
0x18, 0xc9, 0x4f, 0x89, 0xc8, 0x58, 0x2a, 0xf5,
0x24, 0x48, 0x2f, 0x28, 0x73, 0xb4, 0x08, 0x96,
0x64, 0x84, 0xdf, 0xb7, 0x0d, 0x24, 0x10, 0x36,
0x18, 0x80, 0x13, 0x72, 0x48, 0x21, 0x04, 0x39,
0x88, 0x12, 0x11, 0x47, 0x39, 0x4b, 0x80, 0x61,
0x84, 0x22, 0x29, 0x64, 0x12, 0x81, 0x22, 0x53,
0x04, 0x2c, 0x84, 0x52, 0xa4, 0x45, 0x02, 0x85,
0x22, 0x54, 0x24, 0x90, 0x21, 0x44, 0x21, 0x18,
0x10, 0x3a, 0x12, 0x2a, 0x01, 0x4a, 0x2a, 0x2a,
0x84, 0x98, 0x1a, 0x14, 0x8b, 0x81, 0x2b, 0x21,
0x23, 0x12, 0xa4, 0x92, 0x90, 0x8c, 0xc9, 0x81,
0xf4, 0xce, 0xf9, 0xd0, 0x43, 0x44, 0x01, 0x24,
0x12, 0x84, 0x46, 0x55, 0x22, 0x45, 0x72, 0x28,
0x24, 0x14, 0x32, 0x48, 0x84, 0x42, 0x24, 0x44,
0xd0, 0x41, 0x31, 0x13, 0x13, 0x01, 0x42, 0x1c,
0x14, 0xb8, 0x23, 0x54, 0x48, 0x11, 0x1b, 0xc2,
0x40, 0x42, 0x04, 0x8b, 0x24, 0x1b, 0x24, 0x27,
0x24, 0x1c, 0x53, 0x14, 0x91, 0x25, 0xa4, 0x34,
0x85, 0x54, 0x82, 0x16, 0x34, 0x1a, 0x46, 0xe2,
0x81, 0x12, 0x41, 0xc1, 0xcc, 0x21, 0x4e, 0x8c,
0x8b, 0x14, 0x2e, 0xc8, 0x21, 0x6d, 0xb8, 0x80,
0x18, 0xf8, 0xe5, 0xfc, 0x24, 0x40, 0x54, 0x83,
0x51, 0x28, 0x80, 0xd6, 0x22, 0x81, 0xc4, 0x14,
0x30, 0x48, 0x28, 0x85, 0x76, 0x18, 0x84, 0x42,
0x82, 0x51, 0x84, 0x21, 0x00, 0xc0, 0x41, 0x10,
0x04, 0x26, 0x82, 0x01, 0x13, 0x12, 0x31, 0x44,
0x10, 0x28, 0x34, 0x74, 0x90, 0x28, 0x2a, 0x44,
0x85, 0x04, 0x26, 0x64, 0x44, 0x98, 0x81, 0x82,
0xc3, 0x21, 0xe1, 0x21, 0x02, 0x27, 0x26, 0xe0,
0x22, 0xc4, 0x89, 0x80, 0xb4, 0x84, 0xf3, 0x4b,
0xc7, 0x14, 0x24, 0x42, 0x00, 0x25, 0x68, 0x32,
0x10, 0x81, 0x01, 0x49, 0x12, 0x91, 0x21, 0x46,
0x01, 0x41, 0x46, 0x04, 0x00, 0x24, 0xc6, 0x08,
0x4d, 0x32, 0x48, 0x81, 0x64, 0x46, 0x78, 0x28,
0x52, 0x48, 0x49, 0x51, 0x49, 0x40, 0x78, 0x28,
0x04, 0x29, 0x44, 0x98, 0x14, 0x21, 0x23, 0x41,
0x5d, 0xa2, 0x81, 0x24, 0x41, 0xc0, 0x28, 0x86,
0x12, 0x08, 0xc6, 0x18, 0x84, 0x11, 0x41, 0x62,
0x84, 0x80, 0xf1, 0x97, 0xd3, 0x80, 0x24, 0x01,
0x23, 0xd2, 0x61, 0x11, 0x44, 0x48, 0x08, 0x40,
0x41, 0x12, 0x08, 0x14, 0x87, 0x24, 0x70, 0x44,
0x13, 0x51, 0x24, 0x22, 0x40, 0x05, 0x40, 0x41,
0x09, 0x40, 0x02, 0x52, 0x21, 0x25, 0x42, 0xa3,
0x12, 0x80, 0x41, 0x41, 0x04, 0x20, 0x62, 0x11,
0x00, 0x62, 0x21, 0x20, 0x14, 0x04, 0x81, 0x2a,
0x38, 0x11, 0x53, 0x82, 0x38, 0x14, 0xf0, 0x48,
0x5b, 0x34, 0x40, 0x06, 0x69, 0xd2, 0xa6, 0xd3,
0x24, 0x82, 0x02, 0x1a, 0x84, 0xc1, 0x21, 0x10,
0x4a, 0x39, 0x1d, 0x64, 0x50, 0x32, 0x81, 0x65,
0x82, 0x22, 0x14, 0x24, 0x14, 0x52, 0x84, 0x51,
0x29, 0x92, 0x12, 0x44, 0x79, 0xd1, 0x2c, 0x31,
0x44, 0x25, 0xca, 0x21, 0x38, 0x63, 0x32, 0x18,
0x8f, 0x61, 0xd2, 0x24, 0xd2, 0x14, 0x51, 0x49,
0x8c, 0x72, 0x12, 0x01, 0x12, 0x28, 0x83, 0xd8,
0x24, 0x18, 0x38, 0x14, 0x25, 0xd8, 0x4a, 0x82,
0xa1, 0x12, 0x81, 0x84, 0x43, 0x11, 0xf4, 0xb8,
0xd8, 0xc0, 0x42, 0x12, 0x85, 0x11, 0x41, 0x11,
0x71, 0x48, 0x72, 0x11, 0x18, 0x42, 0x04, 0x1d,
0x48, 0x14, 0x49, 0x14, 0xe2, 0x82, 0x64, 0x44,
0x4b, 0x41, 0x54, 0x00, 0x86, 0x48, 0x31, 0x25,
0x42, 0x11, 0x81, 0x8c, 0x94, 0x28, 0x25, 0x88,
0x82, 0x04, 0x40, 0x94, 0x42, 0x12, 0x10, 0x21,
0x04, 0x46, 0x02, 0xc3, 0xc2, 0x44, 0x29, 0xc8,
0x48, 0x21, 0x16, 0xa8, 0x14, 0x22, 0x4a, 0x88,
0x94, 0xa2, 0x48, 0x2d, 0xa4, 0x8a, 0x24, 0x24,
0xfa, 0x3d, 0xd2, 0x00, 0x14, 0x40, 0x54, 0x42,
0x10, 0x04, 0x10, 0x04, 0x29, 0x44, 0x11, 0x48,
0x0c, 0x00, 0x42, 0x21, 0x84, 0x46, 0x08, 0x10,
0x31, 0x42, 0x30, 0x4a, 0x50, 0x48, 0x00, 0xc0,
0x21, 0xb0, 0x11, 0x16, 0x32, 0x24, 0x24, 0x26,
0x1c, 0x43, 0x22, 0x41, 0x34, 0x88, 0x90, 0x22,
0x89, 0x02, 0x88, 0xc2, 0x20, 0x48, 0xc8, 0x14,
0x23, 0x01, 0x00, 0xef, 0xfe, 0x06, 0x26, 0x14,
0x18, 0xac, 0x14, 0x22, 0x52, 0x89, 0x84, 0x74,
0x41, 0xa2, 0x41, 0x00, 0x83, 0x02, 0x70, 0x56,
0x08, 0x2b, 0x14, 0x60, 0x84, 0x20, 0x01, 0x48,
0x00, 0x11, 0x50, 0x14, 0x18, 0x14, 0x85, 0x94,
0x38, 0x46, 0x18, 0x41, 0x44, 0x02, 0x18, 0x80,
0x62, 0x84, 0x00, 0x29, 0x34, 0x48, 0x00, 0x20,
0x01, 0x30, 0x28, 0x43, 0xb7, 0x62, 0x28, 0x24,
0x02, 0x88, 0x9a, 0x08, 0x40, 0x08, 0x34, 0x16,
0x01, 0x90, 0x44, 0x81, 0x50, 0x82, 0x48, 0x29,
0x81, 0xc4, 0x24, 0x50, 0x48, 0x29, 0x54, 0xa4,
0x10, 0x04, 0x85, 0x41, 0x08, 0x12, 0x00, 0x41,
0x43, 0x14, 0x38, 0x43, 0x00, 0x28, 0x80, 0x02,
0x4a, 0x22, 0x04, 0x00, 0x21, 0x22, 0x18, 0x20,
0x01, 0x50, 0x82, 0x81, 0x21, 0x41, 0x10, 0x24,
0x01, 0x27, 0x42, 0xaf, 0x3a, 0x09, 0x27, 0x81,
0x00, 0x40, 0x4c, 0x08, 0x00, 0x12, 0x41, 0x30,
0x44, 0x21, 0x18, 0x12, 0x29, 0x02, 0x12, 0x42,
0x00, 0x28, 0x14, 0x10, 0x88, 0x02, 0x00, 0x22,
0x00, 0x28, 0x12, 0x1e, 0x28, 0x15, 0x84, 0x44,
0x02, 0x81, 0xb0, 0x28, 0x61, 0x85, 0x84, 0x41,
0x20, 0x18, 0x12, 0x88, 0x98, 0x51, 0x18, 0x00,
0x24, 0x90, 0x94, 0xd0, 0x43, 0x0e, 0x47, 0x18,
0x40, 0x04, 0x46, 0x02, 0x43, 0x15, 0xd2, 0x81,
0x51, 0x86, 0x14, 0x40, 0x08, 0x1c, 0x01, 0x85,
0x41, 0x68, 0x14, 0x70, 0x41, 0x08, 0x80, 0x24,
0x04, 0x81, 0x00, 0x2b, 0x42, 0xc0, 0x24, 0xc0,
0x44, 0x4a, 0x12, 0xb4, 0x18, 0xc2, 0x24, 0x14,
0x30, 0x12, 0x43, 0x04, 0x43, 0x01, 0x4a, 0x02,
0x12, 0x82, 0x22, 0x48, 0xb0, 0x88, 0x04, 0x1a,
0xe4, 0x82, 0x28, 0x68, 0x81, 0xf0, 0x72, 0xee,
0x40, 0x48, 0x52, 0x81, 0x81, 0x00, 0x14, 0x81,
0x48, 0x48, 0x83, 0x14, 0x48, 0x91, 0x28, 0x40,
0x08, 0x18, 0x80, 0x01, 0x84, 0x63, 0x41, 0x58,
0x25, 0x11, 0x46, 0x54, 0x82, 0x48, 0x00, 0x40,
0x1a, 0xc1, 0x1b, 0x15, 0x08, 0x14, 0x70, 0x18,
0x04, 0x80, 0x42, 0xb8, 0x82, 0x84, 0x38, 0x12,
0x00, 0x43, 0x04, 0x8d, 0xc4, 0x90, 0xa8, 0x80,
0x01, 0x00, 0x5f, 0x68, 0x09, 0x84, 0x80, 0x02,
0x81, 0x20, 0x82, 0x11, 0x24, 0x22, 0xd1, 0x42,
0xa1, 0x41, 0x1a, 0x42, 0x0a, 0x12, 0x00, 0x80,
0xa1, 0x41, 0x00, 0x89, 0x11, 0x08, 0x12, 0x18,
0x80, 0x65, 0x81, 0x42, 0x83, 0x01, 0x84, 0x24,
0x1a, 0x04, 0x28, 0x4a, 0x22, 0x13, 0x82, 0x02,
0x80, 0x08, 0x1a, 0x82, 0x09, 0x20, 0x62, 0x21,
0x00, 0x22, 0x2b, 0x68, 0x90, 0x75, 0x24, 0x48,
0x24, 0x80, 0x41, 0x42, 0x38, 0x19, 0x21, 0x40,
0x18, 0x01, 0x20, 0x64, 0x14, 0x00, 0x81, 0x84,
0x81, 0x64, 0x70, 0x4c, 0x02, 0x41, 0x11, 0xc9,
0x22, 0x24, 0x04, 0x89, 0x04, 0x10, 0x02, 0x21,
0x11, 0x80, 0x04, 0x46, 0x18, 0x84, 0x24, 0x06,
0x28, 0xc8, 0x88, 0x10, 0x18, 0x5a, 0x24, 0x00,
0x50, 0x48, 0x60, 0x42, 0x18, 0xef, 0x33, 0x0c,
0x15, 0x08, 0x1c, 0x14, 0x48, 0x21, 0x01, 0x83,
0x01, 0x00, 0x85, 0x24, 0xb2, 0x12, 0x02, 0x40,
0x04, 0x4b, 0x21, 0x12, 0x4a, 0x02, 0x21, 0x14,
0x89, 0x83, 0xe4, 0x14, 0x09, 0x24, 0x40, 0xa2,
0x34, 0x1c, 0x46, 0x24, 0x44, 0x18, 0x98, 0x59,
0x38, 0x58, 0xc0, 0x38, 0x81, 0x20, 0x02, 0x1e,
0x24, 0x41, 0x2b, 0x29, 0x41, 0x00, 0x18, 0x20,
0x22, 0x82, 0x59, 0x82, 0xd0, 0x84, 0x4b, 0x12,
0x31, 0x88, 0xb5, 0xe8, 0xa1, 0x74, 0x12, 0x72,
0x18, 0xd8, 0x59, 0xd3, 0x8a, 0xc5, 0x11, 0xc7,
0x24, 0x6c, 0x41, 0xe8, 0x11, 0x82, 0xe4, 0x83,
0xd1, 0x62, 0xd1, 0x84, 0x21, 0xc1, 0x51, 0x23,
0x01, 0x89, 0x71, 0x41, 0xb8, 0x43, 0x94, 0x24,
0x17, 0x14, 0x4f, 0x42, 0x16, 0xfa, 0x55, 0x42,
0xeb, 0x44, 0x83, 0x42, 0xb4, 0x28, 0x66, 0x92,
0x17, 0x21, 0x47, 0x16, 0x17, 0x21, 0xb1, 0x1b,
0x24, 0x2c, 0xa1, 0x43, 0x4e, 0x44, 0x2c, 0xc6,
0x68, 0x4a, 0xe6, 0x44, 0xa4, 0x61, 0xcc, 0x82,
0xf1, 0x34, 0x18, 0x70, 0x14, 0xd2, 0x88, 0x12,
0xa8, 0x23, 0x87, 0x85, 0x2b, 0x28, 0x8f, 0x69,
0x08, 0x1f, 0xc1, 0x0d, 0x63, 0x42, 0x03, 0x1c,
0x51, 0x5c, 0x29, 0x74, 0x44, 0x2a, 0xd4, 0xa8,
0xf4, 0x12, 0x6c, 0x81, 0xd0, 0xa9, 0x44, 0x78,
0x45, 0xe1, 0x81, 0x44, 0xb3, 0x4a, 0x74, 0x18,
0x52, 0x88, 0xc9, 0xe3, 0x85, 0x34, 0x24, 0x85,
0x59, 0xd8, 0x81, 0x15, 0xc2, 0x48, 0xc0, 0x14,
0x1b, 0x45, 0xc7, 0x84, 0x46, 0x72, 0x13, 0xb4,
0x68, 0x01, 0xa3, 0x72, 0x24, 0x41, 0x92, 0x4c,
0x2b, 0x24, 0x2a, 0x72, 0x2a, 0x68, 0x61, 0x2a,
0x68, 0xa1, 0x2b, 0x1a, 0x8e, 0x12, 0x88, 0xce,
0x86, 0xad, 0xc8, 0x87, 0x84, 0x3a, 0xc1, 0x78,
0x8a, 0xd1, 0x44, 0xa8, 0x12, 0x4d, 0x78, 0x8a,
0x72, 0x9a, 0x06, 0x1e, 0x45, 0x84, 0x4d, 0x25,
0xc1, 0x17, 0x86, 0x18, 0x1a, 0x34, 0x14, 0x17,
0x44, 0x18, 0x17, 0x94, 0xaf, 0x24, 0xb5, 0x64,
0xb1, 0x5a, 0x51, 0x68, 0x81, 0x87, 0x42, 0x8c,
0xf1, 0x44, 0x2c, 0x4a, 0xe5, 0xf4, 0x04, 0x8d,
0x14, 0xd0, 0x21, 0xf4, 0x12, 0x48, 0x87, 0x95,
0x52, 0x44, 0x22, 0xa4, 0x2f, 0x13, 0xc7, 0x18,
0xcb, 0x64, 0x1c, 0xf6, 0x13, 0x34, 0x4d, 0x29,
0x1e, 0x34, 0x3a, 0xf5, 0x72, 0x2c, 0x85, 0xf9,
0x1c, 0x1a, 0x1a, 0xb1, 0x6c, 0x71, 0x8a, 0xa8,
0xa2, 0x88, 0x1a, 0x38, 0x92, 0x81, 0xc2, 0x4c,
0xbc, 0xc2, 0xf8, 0x34, 0x86, 0x2f, 0x64, 0xa4,
0x32, 0x1a, 0x28, 0x62, 0x41, 0x5f, 0x5c, 0x47,
0xf2, 0x41, 0x24, 0x24, 0x1d, 0x2c, 0xd0, 0x41,
0x16, 0xd2, 0xc1, 0x12, 0xf2, 0x11, 0x2c, 0x21,
0x1f, 0x81, 0x14, 0x72, 0x11, 0x18, 0xf2, 0x14,
0x48, 0x21, 0x4f, 0x83, 0x14, 0x32, 0x24, 0xa1,
0x43, 0x32, 0x48, 0x43, 0x13, 0x78, 0x25, 0x02,
0x55, 0x12, 0xd8, 0x24, 0xe1, 0x44, 0xc2, 0x12,
0x46, 0x44, 0x42, 0x44, 0x43, 0x44, 0x43, 0x44,
0xc2, 0x4c, 0x21, 0x44, 0x21, 0x4c, 0x14, 0x22,
0x18, 0x22, 0x11, 0x52, 0x84, 0x21, 0x47, 0x88,
0x21, 0x47, 0x88, 0x21, 0x4f, 0x89, 0x04, 0x4f,
0x81, 0x04, 0xdc, 0x4e, 0xf3, 0x47, 0x27, 0x5f,
0x72, 0xf2, 0x27, 0x27, 0x7f, 0x63, 0xd3, 0xff,
0xf6, 0x3f, 0x3e, 0xdf, 0x73, 0xf7, 0x76, 0x27,
0x9f, 0x35, 0xf4, 0x63, 0x23, 0x37, 0x31, 0x3f,
0x31, 0xf1, 0x53, 0x53, 0x3f, 0x74, 0xd1, 0xfd,
0xf5, 0x2e, 0x2e, 0xff, 0x73, 0xf2, 0x32, 0x36,
0x5f, 0x56, 0xf5, 0x4c, 0x34, 0x5f, 0x51, 0xf3,
0x24, 0x6c, 0x4f, 0xc4, 0xe4, 0x44, 0xd2, 0xe7,
0xf2, 0x4e, 0x6f, 0x6f, 0xe6, 0xf4, 0x16, 0x54,
0x6f, 0x64, 0xf5, 0x66, 0x66, 0xef, 0xa2, 0xf2,
0x2e, 0x3c, 0xef, 0xa2, 0xf2, 0x6e, 0x6c, 0x6f,
0x63, 0xf3, 0x36, 0x16, 0x6f, 0x21, 0xf1, 0x3f,
0x3c, 0x7f, 0x73, 0x77, 0x16, 0xd6, 0x6e, 0xf1,
0x4e, 0x7e, 0xef, 0xe7, 0xf7, 0x5e, 0x3e, 0xed,
0x2a, 0x2f, 0x26, 0xf6, 0x62, 0xe2, 0x8e, 0x92,
0x6d, 0x96, 0xef, 0x6d, 0x79, 0x42, 0xf6, 0x44,
0x46, 0xef, 0x21, 0xf1, 0x5d, 0x1e, 0xff, 0x66,
0xf2, 0xbe, 0x7c, 0x8f, 0x44, 0xfc, 0xcc, 0x5c,
0xcf, 0xe4, 0xf4, 0x81, 0x84, 0x24, 0x7f, 0x74,
0xf2, 0x63, 0x66, 0xf5, 0xdd, 0xf3, 0xd4, 0xff,
0xf6, 0x3b, 0x2f, 0xff, 0xf4, 0xf4, 0x43, 0x47,
0xff, 0x74, 0xf4, 0x6a, 0x61, 0xff, 0xf1, 0xf1,
0x53, 0x18, 0xbf, 0x37, 0xf1, 0x4f, 0x5e, 0xfd,
0x5f, 0xe5, 0xf8, 0x1f, 0x5f, 0x6f, 0x62, 0xf7,
0x67, 0x1f, 0x4f, 0xa5, 0xf7, 0x1d, 0x3f, 0x6b,
0x77, 0x4f, 0xc7, 0xf6, 0x5c, 0x37, 0xed, 0x2f,
0xef, 0xba, 0xfb, 0x54, 0x7f, 0xef, 0x25, 0xfd,
0x46, 0x56, 0x6f, 0x66, 0xf2, 0x2c, 0x6e, 0xef,
0xf4, 0xf7, 0x2e, 0x2e, 0xef, 0xe6, 0xf6, 0x33,
0x7f, 0x6f, 0x73, 0xf5, 0x15, 0x56, 0xfd, 0x3e,
0x3f, 0x71, 0xf5, 0x56, 0x7e, 0xaf, 0x47, 0xf3,
0x6e, 0x7e, 0xaf, 0xc7, 0xf7, 0x3e, 0x3e, 0xed,
0xac, 0x6f, 0x64, 0xf6, 0xc2, 0x52, 0x2f, 0x2a,
0xbb, 0x96, 0xf9, 0xde, 0xd6, 0x6d, 0x8e, 0xe5,
0xfe, 0x36, 0xb6, 0xef, 0xe3, 0x71, 0x2e, 0xf8,
0xae, 0x7e, 0xef, 0xce, 0xff, 0xac, 0x9c, 0xec,
0xf1, 0x65, 0xdf, 0x24, 0x7f, 0x57, 0xd5, 0x61,
0x56, 0x7f, 0xaf, 0x61, 0xf1, 0x7f, 0x5f, 0xaf,
0xc5, 0xf3, 0x5d, 0x57, 0x2f, 0xc5, 0xf4, 0x7d,
0x67, 0x2f, 0x95, 0xf5, 0x5b, 0x47, 0xbb, 0x51,
0xbf, 0xb5, 0xd7, 0x13, 0xf5, 0x5d, 0x5f, 0xef,
0x85, 0x71, 0x5f, 0xf7, 0x6a, 0x18, 0x5f, 0x74,
0xd7, 0x2c, 0xf5, 0x35, 0x55, 0x6f, 0x81, 0xf5,
0x74, 0x7c, 0x4e, 0x58, 0xd7, 0xe2, 0xff, 0xb4,
0xfe, 0x65, 0x4e, 0x6f, 0x85, 0xf5, 0x44, 0x56,
0x6f, 0x67, 0xd7, 0xa8, 0xf5, 0x6e, 0x7d, 0x8f,
0xa2, 0xf2, 0x6e, 0x6c, 0x6e, 0x7e, 0x7f, 0x77,
0xe7, 0x33, 0xf7, 0x3f, 0x3d, 0x1f, 0x73, 0xf3,
0x5e, 0x56, 0xaf, 0x44, 0xf1, 0x6e, 0x3e, 0xaf,
0xc7, 0xf7, 0x5e, 0x3e, 0xaf, 0x8c, 0xf2, 0xa2,
0xe6, 0x2b, 0xef, 0x2c, 0xbb, 0x96, 0xf9, 0xde,
0x9e, 0x23, 0xfc, 0xc4, 0xc6, 0xab, 0x19, 0xcf,
0xfd, 0xf9, 0x66, 0xa1, 0xef, 0xcf, 0xbb, 0x92,
0xfc, 0x8c, 0x9d, 0x2e, 0xbe, 0xef, 0x15, 0x49,
0xf2, 0x67, 0x47, 0x2c, 0xf6, 0x2f, 0x2d, 0x37,
0xa4, 0x7f, 0xf6, 0xf4, 0x5b, 0x2a, 0xdf, 0xf3,
0x77, 0x52, 0xfb, 0x7d, 0x77, 0xef, 0xc5, 0xf5,
0x59, 0x5f, 0x2f, 0x84, 0xf4, 0x19, 0x73, 0xbf,
0xe4, 0xf5, 0x45, 0x4f, 0xaf, 0x85, 0xf1, 0x7d,
0x7f, 0x2f, 0x66, 0xd5, 0xfd, 0xf7, 0x5a, 0x5a,
0xff, 0xd7, 0xf5, 0x7a, 0x78, 0x4f, 0xc5, 0xf4,
0x49, 0x5d, 0xff, 0xf6, 0xf4, 0x7a, 0xe9, 0x4f,
0xf5, 0xf7, 0xda, 0x58, 0x6f, 0x64, 0xf5, 0x76,
0x74, 0xcf, 0xa3, 0xf7, 0x7e, 0x74, 0xef, 0xa7,
0xf3, 0x7e, 0x54, 0x3f, 0x33, 0xf7, 0x16, 0x55,
0x5f, 0x21, 0xd1, 0xcf, 0xf3, 0x73, 0x33, 0xef,
0xe5, 0xb5, 0x5a, 0xf1, 0x64, 0x3e, 0xaf, 0x87,
0xf7, 0x34, 0x2e, 0xef, 0x8a, 0xea, 0x68, 0xfe,
0xf2, 0xf2, 0x8e, 0x32, 0x2b, 0x99, 0xcf, 0xed,
0xfd, 0x82, 0x8e, 0xcf, 0xec, 0xfc, 0xde, 0xda,
0xcf, 0xed, 0xbc, 0x7a, 0xff, 0xec, 0xbc, 0xaf,
0x41, 0xfd, 0xcc, 0x5c, 0x88, 0x9b, 0x94, 0x80,
0x01, 0x00, 0x18, 0x84, 0x18, 0x48, 0x00, 0x60,
0x81, 0x00, 0x40, 0x08, 0x12, 0xa0, 0x41, 0x42,
0x20, 0x04, 0x00, 0x80, 0x21, 0x04, 0x83, 0x04,
0x81, 0x2a, 0x01, 0x2a, 0x01, 0x2a, 0x01, 0x18,
0x80, 0xe1, 0x81, 0x24, 0x42, 0x28, 0x22, 0x08,
0x82, 0x00, 0x20, 0x01, 0x00, 0x80, 0x02, 0x6d,
0x93, 0xa0, 0x48, 0x00, 0x84, 0x42, 0x00, 0x84,
0x43, 0x44, 0x08, 0x48, 0xc0, 0x48, 0x4a, 0x01,
0x42, 0x84, 0x81, 0x12, 0xa9, 0x01, 0x83, 0x04,
0x85, 0x11, 0x11, 0x88, 0x04, 0x22, 0x20, 0x22,
0x04, 0x19, 0x02, 0x19, 0x02, 0x20, 0xe4, 0x81,
0x22, 0x04, 0x42, 0x80, 0xa8, 0x41, 0x20, 0x01,
0x84, 0x89, 0x08, 0xa8, 0x32, 0x88, 0x12, 0x88,
0x22, 0x47, 0x74, 0xf0, 0x22, 0x42, 0x1f, 0x41,
0x72, 0x2c, 0xf3, 0x11, 0x2c, 0x87, 0x16, 0x1f,
0x41, 0x32, 0x6e, 0x1d, 0x2c, 0xef, 0x26, 0xd1,
0xc1, 0xf2, 0x4a, 0x92, 0x1f, 0x81, 0xb2, 0x4a,
0x79, 0x15, 0xf8, 0x4a, 0x92, 0x47, 0x82, 0xaf,
0x54, 0x7b, 0x24, 0xf8, 0x4a, 0xb1, 0x47, 0x82,
0xaf, 0x14, 0xfb, 0x25, 0x48, 0x8d, 0xb1, 0x5f,
0xa2, 0xc4, 0xa1, 0x5f, 0xa2, 0xf4, 0x18, 0x21,
0x5f, 0xa2, 0x74, 0xd8, 0xf1, 0x21, 0x4a, 0xd6,
0xc5, 0x4a, 0x9e, 0x24, 0xac, 0xf4, 0x91, 0x24,
0x4d, 0x43, 0x1f, 0x49, 0x52, 0x3a, 0x1f, 0x49,
0x32, 0x48, 0x1f, 0xc9, 0x76, 0x4a, 0xf3, 0x81,
0x24, 0xab, 0x14, 0x1f, 0x41, 0xb6, 0x4a, 0xf9,
0x11, 0x28, 0xab, 0x94, 0x55, 0xb8, 0x4a, 0x79,
0x34, 0xb8, 0x4a, 0x79, 0x24, 0xf8, 0x42, 0x92,
0x47, 0x83, 0x2f, 0x44, 0xf9, 0x34, 0x48, 0x4a,
0xf9, 0x24, 0x4a, 0x7e, 0xcc, 0x40, 0xe2, 0xc1,
0x54, 0x28, 0x1a, 0x14, 0x78, 0x11, 0x34, 0x42,
0x11, 0x23, 0x14, 0xd1, 0x48, 0x98, 0x21, 0x8f,
0x44, 0x1a, 0x95, 0xa2, 0xc0, 0x81, 0x41, 0x2f,
0x14, 0x19, 0xd4, 0x12, 0x59, 0x86, 0x1c, 0xd8,
0xa6, 0x85, 0xd8, 0xa4, 0xad, 0x81, 0x4f, 0xa2,
0x64, 0x18, 0x26, 0x62, 0x58, 0xb4, 0x9e, 0x24,
0xbc, 0xe4, 0xc9, 0x82, 0xe4, 0x89, 0x46, 0xf2,
0x91, 0x64, 0x81, 0x1f, 0x49, 0x32, 0x4a, 0x17,
0x48, 0x89, 0xd1, 0x41, 0xf2, 0x4a, 0x14, 0x19,
0xf2, 0x42, 0xa4, 0x51, 0x2b, 0xb4, 0x43, 0xb2,
0x42, 0x31, 0x24, 0x2b, 0x14, 0x26, 0x98, 0x11,
0x67, 0x82, 0x88, 0x2f, 0xa2, 0xf1, 0xe4, 0xfc,
0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x00, 0x80,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x08,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x14,
0x22, 0xdf, 0xa7, 0x0f, 0x11, 0x59, 0x11, 0x28,
0x62, 0xc1, 0x93, 0x22, 0xd3, 0x21, 0x41, 0x19,
0x71, 0x18, 0xc2, 0x11, 0x42, 0x18, 0x45, 0x78,
0x48, 0xc2, 0x41, 0x9c, 0x16, 0x02, 0x4e, 0x21,
0x89, 0x45, 0xe4, 0x88, 0x04, 0x24, 0x84, 0x46,
0xc2, 0x43, 0x42, 0x12, 0x24, 0x42, 0x00, 0x00,
0x97, 0x48, 0x31, 0x25, 0x69, 0x26, 0x2c, 0x81,
0x92, 0x11, 0x88, 0x83, 0x92, 0x52, 0x99, 0x24,
0x1c, 0x32, 0x88, 0x18, 0x24, 0x4b, 0x12, 0x24,
0x49, 0x31, 0x24, 0x18, 0xf0, 0xb8, 0xf6, 0x24,
0x42, 0x23, 0xc8, 0x14, 0x77, 0x21, 0x48, 0x6d,
0x12, 0x30, 0x44, 0x90, 0x94, 0x21, 0x83, 0x04,
0x15, 0x84, 0x44, 0x75, 0x84, 0xc8, 0x14, 0x19,
0x42, 0x5c, 0x82, 0x44, 0x42, 0x44, 0x62, 0x44,
0x2a, 0x54, 0xc2, 0x84, 0x85, 0x72, 0x24, 0x28,
0xdc, 0x84, 0x22, 0xb2, 0x46, 0x42, 0x02, 0x10,
0x84, 0x34, 0x14, 0x8b, 0x42, 0x43, 0x11, 0x18,
0xb4, 0x82, 0x54, 0x18, 0xd0, 0x41, 0xa1, 0x48,
0x62, 0x29, 0xd4, 0x4a, 0xe8, 0x84, 0x78, 0x28,
0x34, 0x88, 0x81, 0x94, 0x8d, 0x26, 0x3f, 0xa1,
0x08, 0x13, 0x74, 0x53, 0x44, 0xf8, 0x16, 0x21,
0xcc, 0x34, 0x1e, 0x12, 0x4f, 0x14, 0x51, 0x12,
0x4d, 0x12, 0xc1, 0x25, 0x28, 0x66, 0x41, 0x4d,
0x48, 0x85, 0xd5, 0x1a, 0xc4, 0x7d, 0x50, 0x48,
0x15, 0x62, 0x41, 0x44, 0x9e, 0x44, 0x28, 0x86,
0x26, 0x54, 0xc2, 0x3d, 0x4a, 0x84, 0x43, 0x92,
0x41, 0x4d, 0x28, 0x2c, 0x92, 0x6c, 0x30, 0x42,
0x47, 0x88, 0x65, 0x91, 0x42, 0x47, 0x24, 0x78,
0x6b, 0x21, 0x84, 0x4d, 0x82, 0x4b, 0x4a, 0xb3,
0x64, 0x12, 0x4d, 0x11, 0x23, 0x3c, 0x68, 0x21,
0x86, 0xf6, 0xc8, 0x34, 0x85, 0xc6, 0x8a, 0x81,
0x16, 0x71, 0x38, 0xf6, 0x5d, 0x72, 0x10, 0x02,
0x49, 0x01, 0x29, 0x91, 0x21, 0x23, 0x02, 0x81,
0x13, 0x88, 0xb1, 0x11, 0x04, 0x11, 0x80, 0xc4,
0x84, 0xd0, 0x12, 0x02, 0xab, 0x24, 0x8c, 0x24,
0x44, 0x28, 0x04, 0x89, 0x82, 0x04, 0x2c, 0x34,
0x18, 0x2c, 0x28, 0x04, 0x00, 0x40, 0x01, 0x85,
0xa1, 0x21, 0x81, 0xc0, 0x11, 0x10, 0x28, 0x31,
0x48, 0x8a, 0x04, 0x82, 0x4e, 0x12, 0x84, 0x20,
0xc2, 0x14, 0x43, 0x12, 0x08, 0x5f, 0x66, 0x01,
0x14, 0x40, 0x01, 0x14, 0x20, 0x56, 0x81, 0x00,
0x25, 0x11, 0x51, 0x18, 0x12, 0x85, 0x13, 0xc4,
0x23, 0x48, 0x20, 0xc1, 0x21, 0x90, 0x28, 0x40,
0x01, 0x28, 0x21, 0x00, 0x40, 0x62, 0x41, 0x24,
0x16, 0x44, 0x02, 0x21, 0x50, 0x22, 0x84, 0x00,
0x00, 0x00, 0x40, 0xc8, 0x92, 0x41, 0x29, 0x78,
0x84, 0xc8, 0x82, 0x43, 0x88, 0x09, 0x42, 0xd0,
0x57, 0x06, 0x50, 0x12, 0x28, 0x14, 0x41, 0x41,
0x94, 0x61, 0x26, 0x18, 0xc6, 0x4a, 0x84, 0x48,
0x84, 0x21, 0x4e, 0x18, 0x8c, 0x84, 0x31, 0x23,
0xad, 0x62, 0xe0, 0x84, 0x01, 0x89, 0x92, 0x28,
0x21, 0x84, 0x8b, 0x12, 0x8d, 0x22, 0x2a, 0x21,
0x36, 0x12, 0xa0, 0x24, 0x00, 0x41, 0x83, 0x11,
0x04, 0x11, 0x8c, 0x11, 0x04, 0x84, 0x8e, 0x42,
0x1c, 0x31, 0x12, 0x33, 0x74, 0x42, 0x38, 0x18,
0x16, 0xf8, 0x12, 0x41, 0x48, 0x12, 0x48, 0x4c,
0xb8, 0x94, 0x22, 0xb2, 0xb2, 0x0c, 0x10, 0x13,
0x11, 0x11, 0x15, 0xb4, 0x48, 0x42, 0x9d, 0x28,
0x25, 0x74, 0x42, 0x41, 0x38, 0x48, 0x89, 0x11,
0x72, 0x5a, 0x34, 0x68, 0x42, 0x25, 0xc2, 0x18,
0x26, 0xa1, 0x41, 0x10, 0xc8, 0x2b, 0x90, 0x28,
0x16, 0x08, 0x20, 0x44, 0x32, 0x14, 0x22, 0x25,
0x04, 0x25, 0x42, 0x18, 0x04, 0x25, 0x48, 0x08,
0x10, 0xa8, 0x84, 0x14, 0x2c, 0x51, 0x29, 0x89,
0x21, 0x91, 0x9a, 0x27, 0x94, 0x48, 0x4c, 0x88,
0x25, 0x88, 0x84, 0xf2, 0x72, 0x8e, 0x40, 0x01,
0x22, 0x00, 0x50, 0x21, 0x00, 0x10, 0x58, 0x12,
0x11, 0x50, 0x18, 0x10, 0x31, 0x12, 0x19, 0xe2,
0x22, 0x04, 0x84, 0x89, 0x22, 0x02, 0x40, 0x22,
0xc2, 0x2a, 0x1a, 0x62, 0x22, 0x18, 0x80, 0x24,
0x01, 0x44, 0x18, 0x10, 0x42, 0x81, 0x11, 0x04,
0x00, 0x27, 0x21, 0x80, 0xa4, 0x84, 0x65, 0x08,
0x4b, 0x81, 0x88, 0x29, 0x81, 0x18, 0xb4, 0x34,
0x08, 0xaf, 0xbd, 0x07, 0x21, 0x22, 0x41, 0x84,
0x30, 0x28, 0x00, 0x81, 0xa0, 0x12, 0x84, 0x29,
0x02, 0xa0, 0x38, 0x1e, 0x44, 0x91, 0x40, 0x24,
0x43, 0x08, 0x2c, 0x11, 0xc8, 0x28, 0x30, 0x28,
0x28, 0x81, 0x30, 0x18, 0x00, 0x22, 0x44, 0x23,
0x84, 0x82, 0x01, 0x43, 0x01, 0x12, 0x21, 0x00,
0x22, 0xa9, 0x02, 0x46, 0x04, 0x29, 0x63, 0x84,
0x82, 0x81, 0x20, 0x04, 0x8c, 0xf1, 0xd7, 0xb9,
0x80, 0x64, 0x25, 0x30, 0x24, 0x47, 0x84, 0x00,
0x84, 0x23, 0x81, 0x01, 0x39, 0x33, 0x11, 0x13,
0x72, 0x42, 0x18, 0x04, 0x42, 0x41, 0x2c, 0x44,
0x04, 0x38, 0x8d, 0x31, 0x40, 0xa1, 0x12, 0x10,
0x22, 0x04, 0x29, 0x22, 0x44, 0x54, 0x48, 0x11,
0x42, 0x51, 0x21, 0x40, 0x51, 0x84, 0x60, 0x82,
0x68, 0x1e, 0x88, 0x23, 0x84, 0xc2, 0x88, 0x12,
0x49, 0x58, 0x58, 0x00, 0x49, 0x31, 0x26, 0x28,
0xc0, 0x12, 0xff, 0x3c, 0x01, 0x00, 0x12, 0x00,
0x10, 0x88, 0x12, 0x11, 0x08, 0x10, 0x88, 0x24,
0x01, 0x25, 0x08, 0x58, 0x28, 0x84, 0x42, 0x40,
0x84, 0x42, 0x02, 0x40, 0x0c, 0x18, 0xc0, 0x12,
0x00, 0x20, 0x31, 0x12, 0x45, 0x48, 0x22, 0x82,
0x35, 0x22, 0x43, 0x01, 0x21, 0x18, 0x20, 0x05,
0x81, 0x14, 0xc0, 0x48, 0x42, 0x88, 0x00, 0x46,
0xf4, 0x3a, 0x82, 0x34, 0x48, 0x00, 0x8c, 0x62,
0xc4, 0x8c, 0x42, 0x18, 0x18, 0x6b, 0x81, 0x26,
0x32, 0x31, 0xb9, 0xc1, 0x41, 0xa9, 0xc4, 0xb4,
0x23, 0x71, 0x48, 0x21, 0xd1, 0x24, 0x66, 0xc3,
0x89, 0x24, 0x01, 0x21, 0x28, 0x23, 0x03, 0x2d,
0x2c, 0x81, 0x2c, 0x91, 0x28, 0x2c, 0x01, 0x41,
0x51, 0x12, 0x27, 0x61, 0x44, 0x24, 0x2e, 0x14,
0x4f, 0x81, 0xb4, 0x12, 0x22, 0x21, 0xd2, 0xa2,
0x21, 0x43, 0x38, 0x58, 0x43, 0x41, 0xc4, 0x18,
0x81, 0x83, 0xc8, 0x5c, 0x2b, 0x82, 0x48, 0x40,
0xf8, 0x85, 0x8b, 0x00, 0x1a, 0x92, 0x16, 0x44,
0x00, 0x80, 0x82, 0x01, 0x18, 0x84, 0x00, 0x18,
0x70, 0x48, 0x04, 0x46, 0x04, 0x00, 0x28, 0x57,
0x82, 0x89, 0x52, 0x81, 0x60, 0x82, 0x80, 0x04,
0x18, 0x42, 0x41, 0x28, 0x24, 0x60, 0x12, 0x16,
0x08, 0x11, 0x00, 0xe3, 0x82, 0x84, 0x88, 0x14,
0x22, 0x28, 0x64, 0x88, 0x2d, 0x24, 0x48, 0x42,
0x40, 0x24, 0x02, 0x49, 0xf4, 0x53, 0x75, 0x00,
0x00, 0x18, 0x85, 0x04, 0x24, 0x18, 0x24, 0x52,
0x18, 0x89, 0xc1, 0x13, 0x40, 0x41, 0x28, 0x82,
0x02, 0x23, 0x02, 0x12, 0x18, 0x40, 0x02, 0x81,
0x00, 0x44, 0x40, 0x08, 0x00, 0x40, 0x08, 0x24,
0x44, 0x00, 0x21, 0x10, 0x02, 0x00, 0x00, 0x23,
0x01, 0x40, 0x28, 0x01, 0x12, 0x48, 0x1c, 0xf4,
0x44, 0x1c, 0x10, 0x81, 0x11, 0xa8, 0x24, 0x18,
0x23, 0x01, 0x2a, 0x04, 0x00, 0x21, 0x84, 0x8c,
0x01, 0x22, 0xa0, 0x14, 0x18, 0x18, 0x00, 0x00,
0xe0, 0x84, 0x02, 0x84, 0x16, 0x82, 0x61, 0x81,
0x42, 0x12, 0x18, 0x26, 0x48, 0x04, 0x20, 0x22,
0x12, 0x02, 0x22, 0x20, 0x22, 0x21, 0x02, 0x10,
0x08, 0x28, 0x60, 0x12, 0x29, 0x02, 0x8a, 0x04,
0xf0, 0x91, 0x1e, 0x40, 0x01, 0x11, 0x24, 0x16,
0x82, 0x22, 0x01, 0x18, 0x28, 0x11, 0x00, 0x42,
0x1e, 0x24, 0x48, 0x44, 0x10, 0x04, 0x41, 0x00,
0x40, 0x02, 0x8c, 0x12, 0x52, 0x24, 0x1a, 0x42,
0x22, 0x81, 0x02, 0x00, 0x28, 0x00, 0x10, 0x02,
0x84, 0x00, 0x00, 0x10, 0xc8, 0x16, 0x40, 0x04,
0x4f, 0x22, 0x01, 0x43, 0x21, 0x22, 0x21, 0xf2,
0x38, 0xba, 0x80, 0x96, 0x28, 0x2a, 0x01, 0x28,
0x10, 0x11, 0x82, 0x02, 0x8c, 0x92, 0x22, 0x10,
0x12, 0x08, 0x8c, 0x01, 0x84, 0xa0, 0x12, 0x00,
0x00, 0x00, 0x00, 0x20, 0x02, 0x20, 0x04, 0x00,
0x00, 0x2a, 0x04, 0x22, 0x20, 0x02, 0x2a, 0x04,
0x90, 0x22, 0x00, 0x4a, 0x01, 0x00, 0x28, 0x80,
0x82, 0xf8, 0xf5, 0x41, 0x20, 0x08, 0x44, 0x00,
0x12, 0xc1, 0x60, 0xa1, 0x43, 0x01, 0x12, 0x11,
0x40, 0x01, 0x22, 0x00, 0x42, 0x20, 0x81, 0x02,
0x30, 0x18, 0x00, 0x18, 0x00, 0x44, 0x84, 0xcc,
0x01, 0x40, 0x42, 0x44, 0x02, 0x50, 0xa4, 0x28,
0x49, 0x11, 0x02, 0x80, 0x02, 0x84, 0x00, 0x00,
0x40, 0x08, 0x8c, 0x24, 0x71, 0x42, 0x0d, 0xcc,
0x81, 0x01, 0x22, 0x14, 0x20, 0x82, 0x11, 0x01,
0x84, 0x62, 0xc0, 0x18, 0x81, 0x25, 0x48, 0x8a,
0x23, 0x83, 0x81, 0x01, 0x80, 0xc1, 0x38, 0x28,
0x00, 0x22, 0x40, 0x18, 0x08, 0x21, 0x26, 0x02,
0x00, 0x62, 0x00, 0x00, 0x20, 0x01, 0x21, 0x84,
0xa8, 0x22, 0x12, 0x46, 0x22, 0x28, 0xa4, 0x29,
0x42, 0xd2, 0x18, 0xf0, 0x4a, 0x4d, 0x80, 0x84,
0x02, 0x00, 0x00, 0x00, 0x20, 0x41, 0x68, 0x81,
0x00, 0x12, 0x10, 0x08, 0x00, 0x4a, 0x82, 0x01,
0x00, 0x80, 0x02, 0x42, 0x12, 0x22, 0x22, 0x22,
0x80, 0x02, 0x22, 0x00, 0x00, 0x00, 0x82, 0x18,
0x82, 0x42, 0x28, 0x48, 0x00, 0x28, 0x00, 0x88,
0x22, 0x20, 0xf2, 0x2d, 0xd5, 0x24, 0x32, 0xa4,
0x12, 0x12, 0x26, 0x81, 0xc4, 0x11, 0x22, 0x11,
0x22, 0x26, 0x01, 0x00, 0x18, 0x2b, 0x12, 0x24,
0x10, 0x88, 0x02, 0x30, 0x24, 0x10, 0x04, 0x41,
0xa1, 0x22, 0x28, 0x28, 0x18, 0x81, 0x28, 0x24,
0x00, 0x29, 0x82, 0x04, 0x20, 0x46, 0x08, 0x00,
0x21, 0x18, 0x84, 0x00, 0x12, 0x00, 0xa0, 0x12,
0x50, 0x14, 0x48, 0xde, 0xa8, 0x40, 0x08, 0x19,
0x04, 0x80, 0x02, 0x00, 0x00, 0x44, 0x80, 0x22,
0x02, 0x18, 0x84, 0x40, 0x18, 0x02, 0x21, 0x4a,
0xa2, 0x12, 0x12, 0x88, 0x00, 0x40, 0x22, 0x62,
0x31, 0x00, 0x46, 0x08, 0x48, 0x00, 0x00, 0x80,
0x24, 0x01, 0x44, 0x90, 0x22, 0x28, 0x80, 0x18,
0x62, 0x18, 0x14, 0x00, 0x21, 0x82, 0x5b, 0x8f,
0xb0, 0x21, 0x62, 0x88, 0x25, 0x49, 0xe2, 0x82,
0x83, 0x74, 0x19, 0x15, 0xc2, 0x23, 0x28, 0x8f,
0x22, 0x93, 0x28, 0x70, 0x48, 0xd8, 0x81, 0x92,
0x28, 0xc3, 0x12, 0x2a, 0xe1, 0x82, 0x22, 0x03,
0x28, 0x12, 0x24, 0x2f, 0x84, 0x61, 0xe2, 0x85,
0xb8, 0x34, 0x32, 0x14, 0x8b, 0x22, 0x44, 0x2a,
0x92, 0x12, 0x24, 0x29, 0x42, 0x18, 0x82, 0xe4,
0x22, 0x14, 0x62, 0x64, 0x20, 0x84, 0x01, 0x88,
0x22, 0xb0, 0x68, 0x82, 0x91, 0x24, 0x2b, 0x82,
0x93, 0xe3, 0x11, 0xc9, 0x18, 0xaa, 0xc9, 0x41,
0x2a, 0xf8, 0x45, 0x13, 0xf0, 0x42, 0x41, 0x28,
0x12, 0x1a, 0x56, 0x25, 0x2b, 0x11, 0x38, 0x2a,
0xb1, 0x19, 0xf1, 0x22, 0x14, 0x15, 0xe1, 0x87,
0xd1, 0xa1, 0x91, 0x12, 0x45, 0x21, 0xc3, 0x18,
0x2a, 0xd1, 0x28, 0xa1, 0x14, 0x41, 0x3a, 0x05,
0x22, 0x2e, 0x2c, 0x83, 0x02, 0x21, 0x2c, 0xa1,
0x32, 0x1a, 0x51, 0x82, 0x85, 0x6a, 0x45, 0x22,
0x49, 0x44, 0x82, 0x22, 0x12, 0x04, 0x83, 0xc2,
0x28, 0x6c, 0xa1, 0x81, 0x00, 0x8b, 0x14, 0xa5,
0x78, 0x14, 0x08, 0x1e, 0x42, 0x00, 0x21, 0x4b,
0xc3, 0x42, 0x9c, 0xa1, 0x44, 0x5f, 0x25, 0x05,
0x1e, 0x14, 0x8b, 0x13, 0x1d, 0x34, 0x2a, 0x61,
0x11, 0x2a, 0x42, 0xa2, 0x61, 0xa0, 0x41, 0x16,
0x18, 0x72, 0x18, 0x21, 0xf1, 0x38, 0x12, 0x2f,
0x84, 0xe1, 0x21, 0xe2, 0x81, 0x76, 0x24, 0x28,
0x91, 0x12, 0xe0, 0x43, 0x81, 0x04, 0x1a, 0x12,
0x28, 0x02, 0x29, 0x44, 0xba, 0x78, 0xa3, 0x11,
0x2e, 0x28, 0x8c, 0x02, 0x22, 0x26, 0xe4, 0x24,
0x92, 0x22, 0x80, 0x32, 0x2a, 0x28, 0x23, 0xe2,
0x21, 0x37, 0x22, 0x24, 0x88, 0x24, 0x23, 0xa1,
0x94, 0xf0, 0x44, 0xa2, 0x2a, 0x82, 0xa2, 0x61,
0x76, 0xa4, 0x29, 0x9f, 0xa3, 0x4f, 0x52, 0x41,
0x26, 0x52, 0x41, 0x18, 0x15, 0x34, 0x62, 0x15,
0x34, 0x42, 0x17, 0x41, 0x23, 0x16, 0x31, 0x62,
0x11, 0x23, 0x74, 0x14, 0xb8, 0x42, 0x12, 0x34,
0x42, 0x43, 0x91, 0x2a, 0x43, 0x01, 0x41, 0x50,
0x24, 0x50, 0x24, 0x50, 0x24, 0x4c, 0x42, 0x42,
0x44, 0x52, 0x48, 0x24, 0x44, 0x24, 0x44, 0x24,
0x44, 0x23, 0x42, 0x1c, 0x42, 0x94, 0x82, 0x90,
0x82, 0x84, 0x29, 0x18, 0x94, 0xa2, 0x43, 0x91,
0x22, 0x57, 0x88, 0x21, 0x47, 0x89, 0x70, 0x94,
0x28, 0xd4, 0x97, 0x49, 0xf1, 0x43, 0x53, 0x7d,
0x37, 0x5d, 0x15, 0x17, 0x21, 0x3f, 0x71, 0xd4,
0x77, 0xf6, 0x4f, 0x4f, 0x3f, 0x37, 0xd2, 0xbb,
0xf4, 0x37, 0x77, 0xbf, 0x35, 0xf5, 0x13, 0x32,
0x1f, 0x35, 0xf5, 0x4f, 0x47, 0xbf, 0x34, 0xd6,
0x2a, 0xf3, 0x36, 0x76, 0xed, 0x46, 0x25, 0xe8,
0x26, 0x56, 0x44, 0x4f, 0x47, 0xb5, 0x14, 0xb1,
0x64, 0x74, 0x2a, 0x5e, 0x66, 0xe5, 0x32, 0x22,
0x6f, 0x61, 0xf1, 0x76, 0x42, 0xaf, 0xe1, 0x71,
0x1a, 0xf8, 0x16, 0x2e, 0x67, 0x43, 0x27, 0x22,
0x2f, 0x44, 0x54, 0x66, 0x6f, 0x42, 0x72, 0x22,
0xf2, 0x22, 0x26, 0x6f, 0x62, 0xf2, 0x46, 0x46,
0xad, 0x22, 0x2f, 0x25, 0xd5, 0x66, 0xe1, 0x28,
0xf9, 0x82, 0x82, 0xaf, 0x2d, 0x5d, 0x6e, 0x2f,
0x2c, 0xfc, 0xaa, 0xba, 0x6f, 0x62, 0xf3, 0x26,
0x26, 0x8f, 0x2c, 0xde, 0xb2, 0xf2, 0xb4, 0xb4,
0xcf, 0xc2, 0xfb, 0x6c, 0xf8, 0x4f, 0x16, 0xba,
0x35, 0x4b, 0xf1, 0x57, 0x57, 0x7f, 0x64, 0xf5,
0x11, 0x13, 0x7f, 0x53, 0xf7, 0x11, 0x57, 0x7f,
0x41, 0xf4, 0x4b, 0x4b, 0x77, 0x45, 0xbf, 0xb1,
0xd4, 0x56, 0xf5, 0x5f, 0x57, 0xbf, 0x34, 0xf5,
0x1b, 0x3f, 0x67, 0x51, 0xff, 0x75, 0xf7, 0x76,
0x74, 0xaf, 0xa3, 0xf7, 0x16, 0x44, 0x6f, 0xc7,
0x77, 0x14, 0xe6, 0x21, 0xf1, 0x66, 0x74, 0x4b,
0x31, 0x6f, 0x26, 0x57, 0x62, 0x6f, 0x68, 0xf8,
0x24, 0x22, 0x6f, 0x62, 0xfa, 0x12, 0x32, 0x6f,
0x25, 0xf5, 0x18, 0x1e, 0xff, 0xf1, 0x71, 0x36,
0xfe, 0x32, 0x23, 0xe7, 0xe2, 0x2f, 0x66, 0xf6,
0x26, 0x66, 0x27, 0x22, 0x6f, 0x62, 0xd4, 0x62,
0xd2, 0x46, 0xf2, 0x62, 0x42, 0xe5, 0xf4, 0x56,
0x56, 0x6f, 0x68, 0xf8, 0xa6, 0xa6, 0x2b, 0x22,
0x2f, 0x65, 0xf7, 0x86, 0x84, 0x6f, 0x6c, 0xfc,
0xae, 0xac, 0x2f, 0x22, 0xd3, 0x66, 0xf2, 0x4e,
0x66, 0x6d, 0x2e, 0xaf, 0xa2, 0xf3, 0x6e, 0x6c,
0x4b, 0x54, 0xef, 0xae, 0xf7, 0x99, 0xf7, 0x24,
0x5f, 0x51, 0xf5, 0x27, 0x74, 0x3f, 0x13, 0x63,
0x21, 0x7f, 0x31, 0xb1, 0x77, 0xf3, 0x5b, 0x1b,
0x3b, 0x63, 0xff, 0xf3, 0xf2, 0x62, 0x31, 0xbd,
0x17, 0x2f, 0x86, 0xd7, 0xb9, 0x73, 0x1f, 0xf5,
0x1f, 0x17, 0xab, 0x77, 0x2f, 0x23, 0xf3, 0x7e,
0x24, 0x6f, 0xe1, 0xe1, 0xa7, 0xb6, 0x32, 0xf3,
0x62, 0x54, 0x4c, 0xa1, 0x56, 0xc7, 0xa2, 0x2f,
0x62, 0x5a, 0xe8, 0x23, 0xe2, 0x21, 0xf1, 0x72,
0x76, 0x8f, 0x21, 0xf1, 0x1e, 0x1d, 0x47, 0xe3,
0x2f, 0x83, 0x62, 0xa2, 0x6b, 0x66, 0x4f, 0x22,
0xb6, 0x22, 0x62, 0x22, 0x6d, 0x22, 0x69, 0xf2,
0x4a, 0x62, 0xa1, 0x6f, 0x67, 0xf7, 0xa6, 0xa4,
0x3e, 0x36, 0x2b, 0x22, 0xaf, 0xa5, 0xf7, 0x8e,
0x84, 0x6f, 0x64, 0xb4, 0x22, 0xf1, 0xe2, 0xd2,
0x6f, 0x42, 0xf2, 0xe4, 0xce, 0x29, 0xf2, 0xd8,
0xf8, 0xaf, 0xc6, 0xef, 0x46, 0xaf, 0xfe, 0x27,
0x72, 0x34, 0x1f, 0x15, 0x91, 0x52, 0x7f, 0x73,
0xb3, 0x63, 0xf2, 0x15, 0x13, 0x6b, 0x15, 0xdf,
0xf7, 0xb3, 0x32, 0x76, 0x1d, 0xbf, 0x42, 0xf1,
0x49, 0x57, 0xbd, 0x1a, 0xdd, 0x1b, 0x2f, 0x15,
0xf4, 0x79, 0x5b, 0x2f, 0x83, 0xf3, 0x3c, 0x3e,
0xaf, 0x87, 0xf2, 0x78, 0x7a, 0x87, 0xa1, 0x6f,
0x41, 0xf1, 0x62, 0x74, 0x6c, 0xa3, 0x66, 0xe5,
0xfa, 0x22, 0xa4, 0x2e, 0x26, 0x2b, 0x2a, 0x6f,
0x61, 0xf3, 0x52, 0x54, 0x8f, 0xa1, 0xf1, 0x1a,
0x19, 0xaf, 0xa1, 0xf2, 0x2f, 0x2c, 0x27, 0xa2,
0x6b, 0x66, 0x6f, 0x22, 0xf2, 0x26, 0x24, 0x27,
0x26, 0x6f, 0x22, 0xb2, 0x26, 0xf2, 0x4c, 0x4e,
0xa7, 0x82, 0x5e, 0x52, 0x2f, 0x21, 0xe1, 0x6b,
0xbb, 0xa2, 0xfa, 0x5c, 0x5a, 0xa1, 0xce, 0xc2,
0x23, 0xf3, 0xf4, 0xd6, 0x2f, 0x2a, 0xe8, 0xbe,
0xfc, 0x92, 0xb3, 0x4f, 0x4a, 0xfb, 0xf2, 0xe4,
0x8f, 0xef, 0xef, 0x1e, 0xfe, 0x38, 0x7b, 0x80,
0x01, 0x00, 0x00, 0x18, 0x1a, 0x04, 0x12, 0x20,
0x01, 0x12, 0x40, 0x08, 0x12, 0x20, 0x01, 0x12,
0x00, 0x00, 0x81, 0x00, 0x00, 0x22, 0x00, 0x20,
0x02, 0x00, 0x00, 0x22, 0x20, 0x22, 0x28, 0x22,
0x08, 0x00, 0x12, 0x00, 0x00, 0x20, 0xa1, 0x24,
0xb0, 0xda, 0x05, 0x4f, 0x22, 0x24, 0x41, 0x62,
0x41, 0x62, 0x44, 0x18, 0x44, 0x22, 0x4c, 0x24,
0x82, 0x04, 0x49, 0x24, 0x34, 0x24, 0x90, 0x44,
0x24, 0x4b, 0x42, 0x10, 0x04, 0x41, 0x81, 0x41,
0x10, 0x04, 0xc0, 0x24, 0x26, 0x68, 0x41, 0x22,
0x44, 0x40, 0x24, 0x42, 0x04, 0x44, 0x40, 0x04,
0x44, 0x88, 0x28, 0x10, 0x94, 0x88, 0x41, 0x88,
0x49, 0x84, 0x78, 0x94, 0x88, 0x52, 0x84, 0x88,
0x45, 0xf8, 0xdd, 0xe4, 0xe0, 0x22, 0xf4, 0x11,
0x24, 0x85, 0xf2, 0x11, 0x2c, 0x8b, 0x16, 0x1f,
0xc1, 0x32, 0x4a, 0x1f, 0x41, 0xb2, 0x6a, 0xd1,
0x41, 0xb2, 0x6a, 0x99, 0x21, 0xab, 0x94, 0x53,
0xb1, 0x4a, 0x79, 0x24, 0xf8, 0x4a, 0xb1, 0x43,
0xf3, 0x42, 0x91, 0x47, 0x83, 0x2d, 0xb1, 0x4f,
0x82, 0xc4, 0x91, 0x4f, 0xa2, 0xe4, 0x14, 0xf8,
0x24, 0x4a, 0x16, 0xf1, 0x24, 0x4a, 0x96, 0xe1,
0xa2, 0xe4, 0x5d, 0xc2, 0x4a, 0xde, 0x24, 0xac,
0xf4, 0x91, 0x24, 0x2c, 0xf4, 0x91, 0x24, 0x85,
0xf2, 0x91, 0x24, 0x83, 0xf4, 0x91, 0x64, 0xa3,
0xf4, 0x81, 0x24, 0xab, 0x14, 0x1d, 0x24, 0xab,
0x94, 0x19, 0xb6, 0x4a, 0x39, 0x15, 0xab, 0x94,
0x43, 0xb3, 0x4a, 0x39, 0x34, 0x2b, 0x94, 0x47,
0x83, 0x29, 0xf9, 0x34, 0x48, 0x4a, 0xf9, 0x24,
0x4a, 0x5b, 0x1d, 0xc0, 0x42, 0x1f, 0xc1, 0x54,
0x28, 0x1d, 0x64, 0x83, 0x74, 0x11, 0x34, 0x4a,
0x1d, 0x24, 0xab, 0x14, 0x15, 0xf4, 0x42, 0x94,
0x15, 0xbc, 0x42, 0x5b, 0x85, 0xab, 0xb4, 0x41,
0x2f, 0x14, 0x78, 0x24, 0xf8, 0x42, 0x91, 0x41,
0x2d, 0x91, 0x6f, 0x82, 0xd4, 0x12, 0xf9, 0x24,
0x5a, 0x1c, 0xf8, 0x24, 0xda, 0x1e, 0x81, 0x4f,
0xa2, 0x64, 0x18, 0xac, 0x64, 0x58, 0xbc, 0xe4,
0x59, 0xc2, 0x42, 0x1f, 0xc9, 0xc2, 0x42, 0x1f,
0xc9, 0x56, 0x28, 0x1f, 0x49, 0x36, 0x48, 0x1f,
0x49, 0x32, 0x42, 0x1f, 0x48, 0xb2, 0x4a, 0xf1,
0x11, 0x24, 0xaf, 0x44, 0xd8, 0x41, 0xb2, 0x42,
0x1b, 0xb5, 0x4a, 0x3b, 0x24, 0xab, 0x94, 0x43,
0x92, 0x12, 0x47, 0x82, 0x29, 0xf1, 0x26, 0x48,
0x29, 0xf1, 0x24, 0x1a, 0x1f, 0x4a, 0x0f, 0x82,
0x82, 0x48, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00,
0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x80, 0x08,
0x00, 0x00, 0x14, 0x00, 0x84, 0x80, 0x21, 0x12,
0x02, 0x00, 0x00, 0x40, 0x84, 0x04, 0x00, 0x00,
0x00, 0x20, 0x58, 0x12, 0xf0, 0x1a, 0x1f, 0x40,
0x04, 0x50, 0x18, 0x11, 0x3c, 0x81, 0x41, 0x01,
0x9a, 0x04, 0x83, 0x11, 0xc9, 0x41, 0xd0, 0x2a,
0x81, 0x61, 0x13, 0x43, 0x61, 0x22, 0x18, 0x28,
0x41, 0x81, 0x84, 0x28, 0x24, 0x24, 0xac, 0x04,
0x2b, 0x41, 0x83, 0xd2, 0xa2, 0x01, 0x80, 0x22,
0x21, 0x42, 0x02, 0x12, 0x20, 0x04, 0x00, 0xa9,
0x01, 0x84, 0x21, 0x24, 0xa4, 0x82, 0x12, 0x82,
0x4c, 0x02, 0x43, 0x21, 0xfa, 0x61, 0x2e, 0x00,
0x3b, 0x18, 0xc4, 0x61, 0x24, 0x41, 0x4c, 0x32,
0x24, 0x93, 0x52, 0x84, 0x31, 0x11, 0x21, 0x6c,
0x58, 0x48, 0x4e, 0x25, 0x84, 0xa5, 0x84, 0x44,
0x24, 0x44, 0x24, 0x43, 0x76, 0x44, 0x52, 0x68,
0x70, 0x21, 0x0c, 0x82, 0x4d, 0x28, 0x12, 0x41,
0x85, 0x34, 0x14, 0x25, 0xc2, 0x22, 0x16, 0x32,
0x24, 0x90, 0x46, 0x21, 0x41, 0x83, 0xb9, 0x24,
0x3c, 0x12, 0x42, 0x12, 0x16, 0x24, 0x49, 0xa4,
0x14, 0x1e, 0x44, 0x35, 0xd8, 0x48, 0x22, 0xd4,
0x58, 0xc5, 0x29, 0x8d, 0x46, 0xff, 0x3b, 0x05,
0x44, 0x3b, 0x1c, 0x84, 0xe5, 0x41, 0x53, 0x14,
0x22, 0x59, 0xc2, 0x28, 0x4b, 0x49, 0x65, 0x31,
0x19, 0x33, 0xc2, 0x44, 0x25, 0xe2, 0x63, 0x94,
0x18, 0x16, 0x35, 0x14, 0x64, 0x16, 0x42, 0x94,
0x34, 0x87, 0x61, 0x6c, 0x64, 0xea, 0x70, 0x21,
0xce, 0x48, 0x82, 0x6f, 0x81, 0x52, 0x21, 0xcd,
0x12, 0x84, 0xc7, 0x21, 0x2c, 0xa2, 0x24, 0x29,
0x93, 0x26, 0x21, 0x47, 0x21, 0x90, 0x44, 0x16,
0xb8, 0x24, 0x38, 0x16, 0x29, 0x24, 0x43, 0x8c,
0x48, 0xe6, 0x21, 0x64, 0x44, 0x31, 0x8f, 0x48,
0xe2, 0x62, 0xf4, 0x48, 0x15, 0x4f, 0x12, 0xf1,
0x98, 0x26, 0x7f, 0x9b, 0x0d, 0x00, 0x41, 0x00,
0x12, 0x69, 0x01, 0x14, 0x84, 0x00, 0x81, 0x13,
0x58, 0x48, 0x15, 0x48, 0x62, 0x82, 0x42, 0x22,
0x42, 0x22, 0x00, 0x81, 0x00, 0x21, 0x10, 0x22,
0xe4, 0x82, 0x01, 0x41, 0x00, 0x12, 0x00, 0x24,
0x48, 0x00, 0x88, 0x48, 0x60, 0x81, 0x20, 0x91,
0x12, 0x10, 0x28, 0x99, 0x18, 0x00, 0x10, 0x88,
0xd4, 0x8d, 0x05, 0x00, 0x00, 0x18, 0x4c, 0x12,
0x02, 0x25, 0x02, 0x80, 0x42, 0x03, 0x00, 0x00,
0x25, 0x02, 0x40, 0x08, 0x22, 0x00, 0x40, 0x42,
0x01, 0x00, 0x28, 0x80, 0x12, 0x02, 0x00, 0x00,
0x24, 0x48, 0x81, 0x00, 0x48, 0x18, 0x00, 0x20,
0x04, 0x10, 0x84, 0x13, 0x84, 0x41, 0xe8, 0xdf,
0x42, 0x11, 0x11, 0x45, 0x81, 0x01, 0x14, 0x9c,
0x11, 0xa2, 0x41, 0x24, 0x89, 0x54, 0x22, 0x48,
0x24, 0x11, 0xa5, 0xc4, 0x48, 0x21, 0x48, 0x8d,
0x22, 0x48, 0x44, 0x00, 0x46, 0x38, 0x22, 0x42,
0x65, 0x68, 0x24, 0x6c, 0x92, 0x24, 0x2f, 0x24,
0x22, 0x14, 0x28, 0x0d, 0x45, 0x62, 0x82, 0x34,
0x24, 0x45, 0x92, 0x28, 0x45, 0x42, 0x22, 0x3a,
0x12, 0x21, 0x46, 0x0a, 0x88, 0x21, 0xa4, 0x2a,
0x38, 0x98, 0x21, 0x82, 0x88, 0x82, 0xf0, 0x9a,
0x9f, 0x00, 0x11, 0x11, 0x12, 0x12, 0x1c, 0x52,
0x81, 0x20, 0x54, 0x22, 0x83, 0x04, 0x42, 0x00,
0x21, 0x87, 0x24, 0x20, 0x44, 0x2a, 0x14, 0x08,
0x20, 0x14, 0x42, 0x12, 0x1c, 0x22, 0xc2, 0x22,
0x28, 0x29, 0x44, 0xa8, 0x38, 0x21, 0x24, 0x22,
0x14, 0x50, 0x24, 0x00, 0x81, 0x29, 0x88, 0x01,
0x83, 0x04, 0x10, 0x62, 0x24, 0x22, 0x1e, 0x88,
0x21, 0x88, 0x88, 0x88, 0x84, 0xae, 0x37, 0x40,
0x11, 0x04, 0x00, 0x41, 0x29, 0x11, 0x32, 0x12,
0x00, 0x23, 0x52, 0x23, 0x24, 0x14, 0xc4, 0x00,
0x25, 0x82, 0x02, 0x41, 0x80, 0x12, 0x88, 0x82,
0x04, 0x13, 0x54, 0x42, 0x61, 0x48, 0x28, 0x80,
0x04, 0x44, 0x81, 0x50, 0x22, 0x70, 0x28, 0x62,
0x44, 0x21, 0x28, 0x21, 0x29, 0x24, 0x11, 0x22,
0x08, 0x84, 0x88, 0x10, 0x84, 0x13, 0x24, 0x41,
0xb2, 0x82, 0x08, 0x16, 0x64, 0x37, 0x50, 0x34,
0x00, 0x00, 0x4c, 0x21, 0x04, 0x00, 0x20, 0xd4,
0x41, 0x02, 0x84, 0x60, 0x44, 0x45, 0x08, 0x10,
0x08, 0x10, 0x64, 0x42, 0x00, 0x41, 0x83, 0x46,
0x58, 0x42, 0x68, 0x44, 0x42, 0x10, 0x84, 0x01,
0x40, 0xe2, 0x44, 0x21, 0x44, 0x48, 0x92, 0x21,
0x11, 0x48, 0x44, 0x22, 0x8c, 0x11, 0x14, 0xf8,
0x86, 0x18, 0x00, 0x26, 0xf2, 0x31, 0x55, 0x40,
0x28, 0x14, 0x04, 0xa0, 0x12, 0x80, 0x91, 0x22,
0x90, 0x24, 0x31, 0x28, 0x48, 0x14, 0x96, 0x02,
0x25, 0x03, 0x24, 0x2c, 0x22, 0x04, 0x48, 0x25,
0x48, 0x83, 0x24, 0x54, 0x42, 0x00, 0x80, 0x04,
0x10, 0x28, 0x84, 0x02, 0x48, 0x16, 0x01, 0x25,
0x28, 0x02, 0x41, 0x80, 0x0a, 0x40, 0x02, 0x80,
0x08, 0x26, 0x22, 0x24, 0x04, 0x1f, 0x3e, 0x0d,
0x00, 0x00, 0x00, 0x44, 0x61, 0x11, 0x40, 0x81,
0x95, 0x12, 0x00, 0x00, 0x18, 0x41, 0x00, 0x00,
0x44, 0x4c, 0x04, 0x00, 0x22, 0x42, 0x84, 0x00,
0x12, 0x41, 0x19, 0x32, 0x14, 0x00, 0x61, 0x81,
0x4c, 0x51, 0x14, 0x00, 0x00, 0xb0, 0x88, 0x01,
0x29, 0x04, 0x80, 0x84, 0x02, 0x40, 0x48, 0x74,
0xc1, 0x0c, 0x4c, 0x81, 0x12, 0x14, 0x04, 0x2a,
0x01, 0x4c, 0xd1, 0x52, 0x22, 0xd4, 0x21, 0x32,
0x11, 0x29, 0x21, 0x14, 0x61, 0x42, 0x21, 0x8d,
0x13, 0x40, 0x54, 0x86, 0x42, 0xd0, 0x48, 0x74,
0x46, 0x48, 0x11, 0xc2, 0x24, 0x63, 0x22, 0x14,
0x0c, 0x10, 0xb2, 0x24, 0x54, 0x41, 0x12, 0x22,
0x41, 0x6b, 0x41, 0x19, 0x61, 0x21, 0xd5, 0xc2,
0x64, 0x10, 0x08, 0x2d, 0x81, 0x1e, 0x81, 0x2c,
0x24, 0x14, 0x32, 0x18, 0xc8, 0x81, 0x63, 0x0b,
0x48, 0x4c, 0xf2, 0x8b, 0xa9, 0x00, 0x13, 0x11,
0x12, 0x11, 0x02, 0x45, 0x02, 0x18, 0x00, 0x48,
0x00, 0x42, 0x13, 0x49, 0x02, 0x44, 0x48, 0x28,
0x00, 0x00, 0x60, 0x44, 0x48, 0x00, 0xe0, 0x82,
0x34, 0x48, 0x49, 0x01, 0x22, 0x44, 0x00, 0x40,
0x18, 0x04, 0x18, 0x48, 0x00, 0x40, 0x08, 0x41,
0x28, 0x40, 0x24, 0x12, 0x88, 0x14, 0x48, 0xf2,
0xcf, 0x21, 0x00, 0x40, 0x01, 0x2c, 0x81, 0x14,
0x81, 0x04, 0x40, 0x02, 0x80, 0x04, 0xc0, 0x42,
0x62, 0x48, 0x10, 0x22, 0x02, 0x60, 0x24, 0x20,
0x04, 0x00, 0x24, 0x00, 0x00, 0x00, 0x28, 0x80,
0xa4, 0x24, 0xb0, 0x22, 0x04, 0x82, 0x80, 0x34,
0x82, 0x8a, 0x04, 0xc0, 0x42, 0x28, 0x80, 0x02,
0x00, 0x21, 0xff, 0x39, 0x0b, 0x18, 0x10, 0x64,
0x24, 0x80, 0x01, 0xc0, 0x42, 0x80, 0x04, 0x11,
0x10, 0x01, 0x00, 0x81, 0x21, 0x00, 0x81, 0x00,
0x42, 0x85, 0x22, 0x04, 0x41, 0x48, 0x22, 0x24,
0x49, 0x84, 0x84, 0x04, 0x41, 0x22, 0x26, 0x02,
0x20, 0x21, 0x34, 0x22, 0x20, 0x81, 0x84, 0x02,
0x52, 0x00, 0x81, 0x00, 0x82, 0x81, 0x82, 0x4f,
0xa6, 0x08, 0x00, 0x00, 0x11, 0x21, 0x00, 0x21,
0x24, 0x40, 0x02, 0x20, 0x02, 0x00, 0x00, 0x00,
0x20, 0x04, 0x00, 0x23, 0x02, 0x42, 0x00, 0x80,
0x02, 0x00, 0x40, 0x82, 0x52, 0x22, 0x22, 0x24,
0x00, 0x00, 0x00, 0x00, 0x10, 0x02, 0x00, 0x28,
0x00, 0xef, 0x7d, 0x0a, 0x27, 0x11, 0x42, 0x11,
0x16, 0x88, 0x21, 0x08, 0x00, 0x84, 0x80, 0x04,
0x25, 0x48, 0x34, 0x22, 0x00, 0x00, 0x44, 0x48,
0x42, 0x40, 0x04, 0x42, 0x20, 0x04, 0x80, 0x26,
0x02, 0x00, 0x28, 0x40, 0x08, 0x80, 0x04, 0x40,
0x88, 0x22, 0x82, 0x42, 0x68, 0x46, 0x23, 0x08,
0x20, 0x22, 0xc8, 0x24, 0x00, 0x2c, 0x72, 0x54,
0x04, 0x82, 0x00, 0x00, 0x12, 0x00, 0x24, 0x50,
0x41, 0x10, 0x04, 0x14, 0x60, 0x24, 0x48, 0x80,
0x04, 0x48, 0x20, 0x04, 0x00, 0x00, 0x42, 0x46,
0x22, 0x24, 0x86, 0x24, 0x84, 0x02, 0x22, 0x28,
0x00, 0x00, 0x2c, 0x04, 0x44, 0xe2, 0x00, 0x48,
0x48, 0x00, 0x20, 0x02, 0x29, 0x04, 0xf0, 0x4c,
0x5a, 0x00, 0x00, 0x10, 0x82, 0x64, 0x14, 0x48,
0x11, 0x00, 0x10, 0x81, 0x06, 0x00, 0x84, 0x00,
0x00, 0x21, 0x40, 0x22, 0x04, 0x40, 0x06, 0x00,
0x24, 0x20, 0x92, 0x42, 0x84, 0x29, 0x04, 0x00,
0x00, 0xa0, 0x48, 0x48, 0xc0, 0x42, 0x8a, 0x02,
0x22, 0x40, 0x08, 0x29, 0x04, 0x90, 0x22, 0xf0,
0xbc, 0x35, 0x40, 0xc4, 0x12, 0x12, 0x18, 0x49,
0x04, 0x41, 0x21, 0x10, 0x04, 0x25, 0x24, 0x84,
0x02, 0x81, 0x00, 0x42, 0x24, 0x84, 0x00, 0xc0,
0x48, 0x10, 0x04, 0x81, 0x10, 0x48, 0x14, 0x08,
0x40, 0x0c, 0x20, 0x14, 0x04, 0x41, 0x29, 0x14,
0x84, 0x21, 0x18, 0xa2, 0x82, 0x4a, 0x21, 0x18,
0x08, 0x12, 0x20, 0x41, 0x08, 0x12, 0xf0, 0x7a,
0xc8, 0x00, 0x84, 0x12, 0x10, 0x01, 0x2c, 0x01,
0x14, 0x28, 0x14, 0x00, 0x00, 0x21, 0x00, 0x20,
0x04, 0x40, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00,
0x00, 0x21, 0x26, 0x02, 0x48, 0x00, 0x00, 0x22,
0x20, 0x92, 0x82, 0x41, 0x80, 0x12, 0x02, 0x80,
0x22, 0x04, 0x22, 0x80, 0xf4, 0xd2, 0xa4, 0x50,
0x81, 0x80, 0x04, 0x40, 0x08, 0x84, 0x48, 0x80,
0xc4, 0x48, 0x22, 0x29, 0x02, 0x40, 0x04, 0x44,
0x40, 0x02, 0x27, 0x44, 0x80, 0x01, 0x88, 0x42,
0x42, 0x00, 0xc0, 0x41, 0x22, 0x60, 0x82, 0x42,
0x48, 0x24, 0x60, 0x82, 0x48, 0x84, 0x20, 0x04,
0x84, 0x90, 0x22, 0x20, 0x68, 0x44, 0x82, 0x4c,
0x14, 0x02, 0xd0, 0x42, 0x82, 0xf2, 0x48, 0xd5,
0x24, 0x60, 0xa9, 0x00, 0x27, 0x44, 0x42, 0x2c,
0x21, 0xe4, 0x14, 0x04, 0x24, 0xa4, 0x14, 0x83,
0x14, 0x91, 0x28, 0x90, 0x42, 0x81, 0x2c, 0x44,
0x02, 0x44, 0x42, 0x43, 0x04, 0x43, 0x34, 0x42,
0x84, 0x43, 0xa4, 0x44, 0x60, 0x26, 0xe0, 0x24,
0x04, 0x28, 0x2b, 0x22, 0x4e, 0x22, 0x26, 0x96,
0x22, 0x28, 0x1e, 0x42, 0x2a, 0x84, 0x2c, 0x62,
0xa6, 0x2e, 0x82, 0xa9, 0x4c, 0xb2, 0xca, 0x44,
0x82, 0xb1, 0x48, 0x32, 0x62, 0x22, 0x68, 0x44,
0x8a, 0xf2, 0x6b, 0xbb, 0x14, 0x14, 0x48, 0x80,
0x65, 0x31, 0x12, 0x17, 0x54, 0x25, 0x4a, 0x52,
0x2a, 0x1d, 0x41, 0x48, 0x51, 0x00, 0x21, 0xa0,
0x24, 0x46, 0x06, 0x45, 0x08, 0x8b, 0x44, 0x21,
0x48, 0x48, 0x80, 0xe6, 0x24, 0x14, 0x42, 0xda,
0x42, 0x04, 0x4b, 0x24, 0x28, 0x4a, 0x54, 0x28,
0xa0, 0x42, 0x29, 0xc4, 0x42, 0x46, 0x74, 0x42,
0x48, 0xb2, 0x4a, 0x01, 0x92, 0x46, 0x24, 0xa4,
0x86, 0x88, 0x10, 0x42, 0x84, 0x51, 0x84, 0xa2,
0x83, 0x92, 0x42, 0xaf, 0x17, 0x0d, 0x1f, 0x41,
0x01, 0x5f, 0x11, 0x71, 0x18, 0x92, 0x11, 0x2d,
0x58, 0x80, 0x14, 0xc1, 0x24, 0x43, 0x34, 0x42,
0x66, 0x92, 0x42, 0x47, 0x32, 0xe0, 0x64, 0x14,
0x88, 0x24, 0x14, 0xa2, 0x64, 0x80, 0x44, 0x3a,
0x42, 0x8d, 0x42, 0x10, 0x84, 0x04, 0x6a, 0xc2,
0x68, 0x2b, 0x42, 0xf0, 0x22, 0x24, 0x62, 0x41,
0x81, 0x28, 0x26, 0xc8, 0x42, 0x22, 0x46, 0x24,
0xfa, 0x44, 0xa2, 0x29, 0xae, 0x68, 0x8a, 0x91,
0x64, 0x32, 0x4e, 0x44, 0x8b, 0x28, 0x26, 0x82,
0x4e, 0x02, 0x38, 0x22, 0x9f, 0x93, 0x4e, 0x52,
0x41, 0x2c, 0x51, 0x41, 0x81, 0x1d, 0x44, 0xa1,
0x1d, 0x44, 0xa1, 0x15, 0x14, 0x1a, 0x11, 0x9a,
0x41, 0xa1, 0x41, 0xa1, 0x41, 0xa1, 0x45, 0x18,
0x52, 0x84, 0x42, 0x45, 0x08, 0x45, 0x0a, 0x45,
0x0a, 0x45, 0x4a, 0x44, 0x4a, 0x44, 0x6a, 0x44,
0x26, 0x42, 0x44, 0x42, 0x54, 0x28, 0x4c, 0x14,
0x4a, 0x94, 0x1a, 0x4c, 0x94, 0x1a, 0x8a, 0x94,
0x1a, 0x90, 0x1a, 0x43, 0x98, 0x1a, 0x41, 0x29,
0x59, 0x84, 0x29, 0x59, 0x84, 0x98, 0x45, 0x88,
0xf8, 0xf5, 0x75, 0x14, 0x5f, 0x71, 0x75, 0x17,
0x57, 0xfb, 0xcf, 0xd1, 0xf1, 0x1f, 0x1f, 0xf5,
0xf7, 0x11, 0x1b, 0x75, 0xff, 0x4f, 0x4f, 0x2f,
0x36, 0xf6, 0x43, 0x4b, 0x37, 0xa4, 0xb5, 0x5b,
0x77, 0xf5, 0x5f, 0xee, 0xcf, 0xa4, 0x54, 0x62,
0x2f, 0xc4, 0x54, 0xec, 0x85, 0x58, 0xc8, 0x4e,
0x4c, 0xcf, 0xe4, 0xd4, 0xaa, 0xd4, 0xee, 0x74,
0x46, 0x5e, 0xee, 0xaf, 0xa4, 0xd4, 0xca, 0x74,
0x46, 0xd6, 0xee, 0xf6, 0x2e, 0x2e, 0xa5, 0xdc,
0x66, 0xf4, 0x66, 0x66, 0x67, 0x62, 0xad, 0x2c,
0xe5, 0x7e, 0x4e, 0xfe, 0x4e, 0x26, 0x2f, 0xa6,
0xf2, 0x26, 0x3e, 0xef, 0xe5, 0xf5, 0x16, 0x16,
0x5e, 0x3a, 0x2f, 0xa6, 0xf3, 0xda, 0xda, 0x6f,
0x61, 0xf5, 0x1e, 0x1e, 0xed, 0xde, 0x4f, 0x2f,
0xff, 0xfa, 0x5e, 0x2f, 0xeb, 0xf5, 0x6e, 0x2e,
0xaf, 0x8b, 0xfb, 0xd8, 0x7c, 0x8e, 0x2c, 0xcf,
0xe6, 0xfe, 0xc7, 0xe8, 0x24, 0x3f, 0x11, 0xf5,
0x51, 0x48, 0x17, 0x71, 0x7f, 0x71, 0xf1, 0x59,
0x5b, 0xa7, 0x34, 0x7f, 0xf5, 0x75, 0x47, 0xfc,
0x4f, 0x4f, 0xbf, 0x96, 0xf6, 0x47, 0x4b, 0x3f,
0x94, 0xf4, 0x6f, 0x6f, 0xa7, 0x94, 0x35, 0x53,
0x66, 0xef, 0xa4, 0x54, 0xca, 0x2f, 0xc4, 0x54,
0xec, 0x45, 0x56, 0x42, 0xcc, 0xf4, 0x1c, 0x5e,
0x4d, 0x46, 0x2f, 0x2c, 0x49, 0xda, 0xee, 0x58,
0x64, 0x27, 0x64, 0xed, 0x4e, 0xbf, 0xb6, 0xe2,
0x26, 0x76, 0x42, 0xf7, 0x4e, 0x4e, 0x2f, 0x24,
0xc6, 0x4a, 0x2f, 0x62, 0xf2, 0x26, 0x46, 0xaf,
0xa6, 0xb2, 0x6a, 0xf2, 0x46, 0x4e, 0x6d, 0x1c,
0xaf, 0xa5, 0xd5, 0xaa, 0xf8, 0xe6, 0xaa, 0x2f,
0x86, 0xf7, 0xfe, 0xfe, 0xaf, 0x84, 0xfc, 0xc2,
0x82, 0x6f, 0x68, 0xf1, 0x7e, 0xfa, 0x2f, 0x4e,
0xf6, 0xe2, 0x6e, 0xef, 0xcf, 0xff, 0x96, 0x96,
0x2f, 0x4f, 0x65, 0xca, 0xcf, 0xe7, 0xfd, 0xfe,
0x61, 0x24, 0x3f, 0x15, 0xb1, 0x11, 0xd5, 0x35,
0xc1, 0x14, 0xbf, 0x34, 0x75, 0x42, 0xf9, 0x55,
0x47, 0xb3, 0xf4, 0x43, 0x43, 0xef, 0xc2, 0xf2,
0x43, 0x47, 0xab, 0x44, 0x3f, 0x34, 0x76, 0x4b,
0x59, 0x33, 0x61, 0x6c, 0xd4, 0x8a, 0xf4, 0x4e,
0x42, 0x4e, 0x4a, 0x6f, 0x44, 0x14, 0x92, 0x4c,
0x4e, 0x5a, 0x4f, 0x64, 0xf4, 0x42, 0x82, 0x87,
0x24, 0x2f, 0xa4, 0xf4, 0x44, 0x46, 0x6b, 0x44,
0x8d, 0x4e, 0x27, 0x34, 0x24, 0x63, 0xe2, 0xe6,
0xf6, 0x62, 0x62, 0x2e, 0x62, 0x61, 0x64, 0xaf,
0x24, 0xf4, 0x62, 0x68, 0x6f, 0x66, 0xb2, 0x7a,
0xf2, 0x62, 0x52, 0xaf, 0x86, 0xe8, 0x6c, 0xbc,
0xfa, 0xf8, 0xc2, 0xf2, 0xaf, 0x84, 0xf8, 0xc2,
0x82, 0x6b, 0x81, 0xae, 0xb6, 0xaf, 0x86, 0xfe,
0x2e, 0x62, 0x2f, 0x8f, 0xfb, 0x26, 0x24, 0x2b,
0xe6, 0xcb, 0x31, 0xee, 0x7a, 0x7f, 0x9d, 0x09,
0x5f, 0x55, 0xf1, 0x18, 0x52, 0x7f, 0x31, 0x51,
0xfa, 0xdf, 0x74, 0x75, 0x42, 0xfa, 0x51, 0x43,
0xe7, 0x44, 0x9f, 0xb4, 0xf4, 0x26, 0x25, 0x1f,
0x74, 0xb4, 0x4b, 0xf4, 0x4d, 0x6b, 0x27, 0x14,
0x55, 0x57, 0xae, 0x8f, 0xe4, 0xb4, 0x42, 0x74,
0x4c, 0x72, 0x44, 0xfe, 0x4a, 0x48, 0x21, 0xcb,
0x44, 0x4f, 0xc4, 0xf5, 0x48, 0x4a, 0x2b, 0xc5,
0xc5, 0xf6, 0xc6, 0x4c, 0x8f, 0xa4, 0xb4, 0x46,
0x74, 0x42, 0xd6, 0xde, 0xf4, 0x48, 0x4a, 0x7b,
0x22, 0x2f, 0xe6, 0xf6, 0x46, 0x64, 0x8d, 0x22,
0x63, 0x72, 0x2a, 0xfe, 0x6e, 0x66, 0x2f, 0x86,
0xe6, 0x26, 0xf6, 0x7e, 0x24, 0xcf, 0xe6, 0xf5,
0x72, 0xd2, 0xee, 0xc6, 0xab, 0xc7, 0xcf, 0xa4,
0xbf, 0x12, 0xfd, 0xc4, 0xc6, 0xe7, 0xad, 0x8f,
0xe2, 0xbb, 0x72, 0xff, 0x6c, 0x62, 0x6f, 0xc6,
0xf6, 0xb8, 0xb8, 0x2b, 0xc6, 0xcb, 0x11, 0x4f,
0xce, 0xf7, 0xd8, 0x6b, 0x80, 0x01, 0x00, 0x18,
0x00, 0x00, 0x48, 0x80, 0x04, 0x00, 0x00, 0x00,
0x20, 0x04, 0x42, 0x00, 0x00, 0x20, 0x04, 0x20,
0x22, 0x04, 0x20, 0x02, 0x22, 0x00, 0x48, 0x22,
0x00, 0x20, 0x02, 0x80, 0x04, 0x82, 0x80, 0x04,
0x8a, 0x04, 0x82, 0x28, 0x82, 0x6f, 0x7a, 0x0b,
0x82, 0x00, 0x00, 0x12, 0x00, 0x00, 0x42, 0x00,
0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x42, 0x20,
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x04,
0x42, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x88,
0x00, 0x00, 0x14, 0x4f, 0xb5, 0x06, 0x6d, 0x43,
0x1f, 0x41, 0x52, 0x2e, 0x1f, 0x41, 0x32, 0x4e,
0x1f, 0x41, 0x72, 0x4e, 0xd2, 0x41, 0xf2, 0x4e,
0x12, 0x1d, 0x24, 0xaf, 0x24, 0x99, 0x21, 0xab,
0x94, 0x51, 0xaf, 0x44, 0x39, 0x24, 0xaf, 0x54,
0x3b, 0x24, 0x2f, 0x74, 0x7b, 0x24, 0xf8, 0x42,
0x95, 0x4f, 0x82, 0xc4, 0xb5, 0x4f, 0xa2, 0xc4,
0x85, 0x4f, 0xa2, 0x64, 0x51, 0x4f, 0xa2, 0xe4,
0x59, 0xf2, 0x24, 0x4a, 0x96, 0xd5, 0xa4, 0xe4,
0x4d, 0xd2, 0xa4, 0xf4, 0x91, 0x24, 0x4d, 0x42,
0x1f, 0x49, 0x52, 0x2c, 0x1f, 0x49, 0x72, 0x6c,
0xf2, 0x91, 0x64, 0xe7, 0x24, 0x1f, 0x48, 0xb2,
0x4e, 0xd1, 0x41, 0xf6, 0x4a, 0x92, 0x19, 0xb2,
0x4a, 0x19, 0xf5, 0x4a, 0x94, 0x43, 0xf2, 0x4a,
0x94, 0x43, 0xf2, 0x4a, 0x94, 0x47, 0x82, 0xad,
0x94, 0x4f, 0x82, 0xd4, 0x48, 0xf9, 0x24, 0x4a,
0xbf, 0xcf, 0x06, 0x48, 0x1f, 0x81, 0x06, 0x1b,
0x61, 0x42, 0x1b, 0x21, 0x23, 0x94, 0x21, 0x4a,
0x11, 0xe1, 0x44, 0x99, 0x21, 0x4e, 0xb4, 0x11,
0x2b, 0xb4, 0xd0, 0x12, 0x09, 0x2d, 0x91, 0x22,
0x1c, 0x99, 0x42, 0x1c, 0xf9, 0x22, 0x52, 0x1c,
0xe9, 0x22, 0xec, 0x11, 0xc8, 0x42, 0x96, 0xe1,
0x22, 0x64, 0x19, 0x3c, 0xe4, 0x19, 0xe2, 0x22,
0xf4, 0x91, 0x28, 0x2c, 0xf4, 0x91, 0x68, 0x24,
0x1b, 0x69, 0x42, 0x1b, 0x29, 0x42, 0x1b, 0x28,
0x42, 0x19, 0xd2, 0x42, 0x98, 0x21, 0x66, 0x14,
0xb1, 0x42, 0x2a, 0xb2, 0x42, 0x08, 0x2b, 0x84,
0x90, 0x82, 0x23, 0x82, 0xb8, 0x22, 0x71, 0xae,
0x04, 0x84, 0x80, 0x04, 0x00, 0x80, 0x01, 0x00,
0x44, 0x00, 0x14, 0x00, 0x80, 0x02, 0x00, 0x00,
0x18, 0x80, 0x08, 0x00, 0x00, 0x14, 0x00, 0x84,
0x00, 0x00, 0x00, 0x20, 0x02, 0x40, 0x04, 0x28,
0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x39, 0x0a,
0x12, 0x20, 0x21, 0x32, 0x11, 0x84, 0x90, 0x29,
0xe0, 0x84, 0x11, 0xc2, 0x89, 0xc0, 0x11, 0x80,
0x01, 0x10, 0x26, 0x12, 0x28, 0xa2, 0x42, 0xc2,
0x42, 0x10, 0x08, 0x48, 0xc8, 0x42, 0x42, 0x80,
0x14, 0x22, 0x86, 0x02, 0x80, 0xa2, 0x42, 0xc0,
0x48, 0x00, 0x29, 0x88, 0x85, 0x04, 0x00, 0x00,
0x88, 0x28, 0x28, 0x28, 0xa0, 0x48, 0x7f, 0x23,
0x46, 0x21, 0x64, 0x19, 0x28, 0x14, 0x28, 0x15,
0x32, 0x14, 0x18, 0x28, 0x14, 0x10, 0x02, 0x80,
0x24, 0x94, 0x46, 0x14, 0x60, 0x24, 0x20, 0x01,
0x22, 0x61, 0x28, 0x23, 0x42, 0x02, 0x10, 0x12,
0xb2, 0x22, 0x04, 0x28, 0x13, 0x11, 0x22, 0x11,
0x02, 0x24, 0x2a, 0x24, 0x01, 0x8a, 0x22, 0x22,
0x08, 0x81, 0x60, 0x2c, 0xe0, 0x22, 0x34, 0x24,
0x88, 0x21, 0x12, 0x45, 0x61, 0xc2, 0xbf, 0xee,
0x4b, 0x21, 0xe5, 0x14, 0x21, 0x32, 0x21, 0x32,
0x85, 0x32, 0x14, 0x8f, 0x11, 0x82, 0xb2, 0x41,
0x11, 0x44, 0x28, 0x82, 0x81, 0x04, 0x48, 0x24,
0x41, 0x2a, 0x54, 0x2a, 0x18, 0x68, 0x9a, 0x52,
0x42, 0xa2, 0x21, 0x24, 0x80, 0x58, 0x22, 0x15,
0x22, 0x06, 0x83, 0x72, 0x71, 0x22, 0x86, 0x01,
0xe0, 0x22, 0x24, 0x24, 0x01, 0x24, 0x41, 0x00,
0x81, 0x28, 0x88, 0x21, 0x10, 0xa2, 0x82, 0x2c,
0x82, 0x43, 0x64, 0x8f, 0x97, 0x19, 0x00, 0x80,
0x01, 0x14, 0x11, 0x00, 0x40, 0x58, 0x22, 0x13,
0x08, 0x11, 0xa0, 0x41, 0x25, 0x14, 0x01, 0x00,
0x22, 0x80, 0x24, 0x04, 0x89, 0x02, 0x42, 0x48,
0x42, 0x48, 0xc0, 0x42, 0x00, 0x40, 0x02, 0x22,
0x20, 0xc2, 0x48, 0xa0, 0x28, 0x2a, 0xa8, 0x49,
0x42, 0x00, 0x48, 0xa0, 0x42, 0x4c, 0x0a, 0x21,
0x00, 0x41, 0xdf, 0x69, 0x02, 0x40, 0xa4, 0x12,
0x11, 0x40, 0x48, 0x82, 0x32, 0x28, 0x15, 0x48,
0x01, 0x40, 0x08, 0x22, 0x00, 0x2d, 0x21, 0x40,
0x61, 0x82, 0x00, 0x40, 0x08, 0xc0, 0x21, 0x84,
0x28, 0x20, 0x44, 0x82, 0x02, 0x10, 0x08, 0x80,
0x24, 0x14, 0x01, 0x19, 0x16, 0x02, 0x00, 0x00,
0x21, 0x80, 0xa3, 0x41, 0x10, 0x64, 0x44, 0xf0,
0x1f, 0x85, 0x10, 0x12, 0x01, 0x30, 0x32, 0x18,
0x1c, 0x18, 0x98, 0x12, 0x24, 0x28, 0x14, 0x80,
0x54, 0xa1, 0x19, 0x74, 0x61, 0x88, 0x84, 0x18,
0x01, 0x11, 0x22, 0x24, 0x48, 0x11, 0x11, 0x4d,
0x41, 0x27, 0x2c, 0x60, 0x44, 0x24, 0xa0, 0x24,
0x10, 0x12, 0x41, 0xc4, 0x22, 0x81, 0x00, 0x6c,
0x64, 0x61, 0x12, 0x2c, 0x62, 0xa4, 0x1e, 0x41,
0x12, 0x16, 0x83, 0x29, 0xf4, 0x12, 0x84, 0x42,
0x17, 0x82, 0x78, 0x22, 0x12, 0x26, 0xf2, 0xbf,
0x75, 0x14, 0x21, 0x15, 0x84, 0x13, 0xa1, 0x12,
0x84, 0x19, 0x98, 0x28, 0x29, 0x53, 0x18, 0x1c,
0x02, 0x40, 0x58, 0x18, 0x2d, 0x21, 0x91, 0x24,
0x2a, 0x08, 0x80, 0x22, 0x02, 0x42, 0x81, 0x10,
0xf5, 0x22, 0x82, 0x84, 0x68, 0x90, 0x42, 0x2c,
0x04, 0x21, 0x10, 0x0c, 0x20, 0x24, 0x04, 0x12,
0x21, 0x29, 0x12, 0x02, 0x12, 0x14, 0x18, 0x24,
0x82, 0x2a, 0x91, 0x11, 0x48, 0x80, 0x04, 0xbf,
0x17, 0x0d, 0x00, 0x00, 0x21, 0x18, 0x10, 0x12,
0x08, 0x21, 0x11, 0x80, 0x04, 0x42, 0x68, 0x42,
0x14, 0x14, 0x14, 0x91, 0x00, 0x21, 0x14, 0x14,
0x48, 0x19, 0x04, 0x44, 0x00, 0x22, 0x28, 0x10,
0x01, 0x2c, 0x12, 0x08, 0x30, 0x45, 0x25, 0xb4,
0x21, 0x05, 0x46, 0xd8, 0x12, 0x05, 0x18, 0x29,
0x38, 0x42, 0x43, 0x81, 0x64, 0x86, 0x1a, 0x92,
0x24, 0x16, 0x24, 0xf2, 0x77, 0xb2, 0x80, 0xe4,
0x24, 0x62, 0x81, 0x00, 0x94, 0x21, 0x40, 0x08,
0x00, 0x28, 0x70, 0x41, 0x4c, 0x01, 0x00, 0x62,
0x15, 0x82, 0x82, 0xe2, 0x12, 0x04, 0x46, 0x81,
0x04, 0x11, 0x00, 0x80, 0x84, 0x42, 0x04, 0x42,
0x1c, 0x02, 0x40, 0x01, 0x14, 0x48, 0x42, 0x65,
0x22, 0xc4, 0x22, 0x41, 0x30, 0x24, 0x00, 0x60,
0x44, 0x2c, 0x11, 0x14, 0xa8, 0x14, 0xef, 0x4a,
0x03, 0x20, 0x04, 0x41, 0x20, 0x41, 0xc8, 0x14,
0x48, 0x20, 0x18, 0x89, 0x93, 0xc9, 0x20, 0x02,
0x21, 0x41, 0x40, 0x02, 0x10, 0x38, 0x28, 0x40,
0x08, 0x84, 0x30, 0x24, 0x19, 0x04, 0xa0, 0x42,
0x44, 0x46, 0x04, 0x41, 0x42, 0x23, 0x01, 0x44,
0x40, 0xd8, 0x84, 0x8c, 0x82, 0x12, 0x08, 0x50,
0x82, 0x48, 0x00, 0x24, 0x28, 0x48, 0x18, 0x2f,
0xae, 0x03, 0x12, 0x18, 0x41, 0x00, 0x00, 0x00,
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8c, 0x01,
0x10, 0x04, 0x50, 0x14, 0x10, 0x04, 0x81, 0x22,
0xcc, 0x01, 0x00, 0x29, 0x02, 0x20, 0x02, 0x00,
0x84, 0x00, 0x11, 0x00, 0x18, 0xc0, 0x42, 0x24,
0xc1, 0x00, 0x80, 0x11, 0xf8, 0xcc, 0xfc, 0x20,
0xa1, 0x21, 0x44, 0x00, 0x14, 0x00, 0x48, 0x12,
0x88, 0x14, 0x18, 0x8f, 0x18, 0x14, 0x24, 0x02,
0x10, 0x24, 0xd2, 0x81, 0x81, 0x22, 0x42, 0xc5,
0x28, 0x48, 0x49, 0x04, 0x51, 0x10, 0xa4, 0x24,
0xc1, 0x60, 0x44, 0x64, 0x20, 0x02, 0x68, 0x2d,
0x11, 0x00, 0x42, 0x80, 0x7c, 0x22, 0x01, 0x21,
0x00, 0x21, 0x2d, 0x42, 0x45, 0x08, 0x12, 0x44,
0x42, 0x8c, 0xf4, 0x18, 0x2a, 0xa0, 0x48, 0x90,
0x1a, 0x44, 0x60, 0x81, 0xa1, 0x16, 0x14, 0x08,
0x40, 0x08, 0x70, 0x48, 0x11, 0x41, 0x02, 0x80,
0x04, 0x00, 0x2e, 0x48, 0x10, 0x51, 0x18, 0x10,
0x08, 0x89, 0x02, 0x52, 0x22, 0x28, 0xc0, 0x24,
0x14, 0x44, 0x00, 0x50, 0x41, 0x81, 0x8c, 0x14,
0x8a, 0x04, 0x45, 0x88, 0x31, 0x24, 0x83, 0x04,
0x90, 0x44, 0x20, 0x92, 0x18, 0x14, 0x1f, 0x18,
0x04, 0x00, 0x00, 0x90, 0x21, 0x00, 0x80, 0x02,
0x28, 0x81, 0x11, 0x22, 0x22, 0x00, 0x22, 0x20,
0x22, 0x06, 0x22, 0x28, 0x22, 0x20, 0xc6, 0x21,
0x26, 0x02, 0x80, 0x04, 0x00, 0x00, 0x22, 0x42,
0x24, 0x48, 0x80, 0x04, 0x44, 0x50, 0x14, 0x80,
0x02, 0x21, 0xc0, 0x44, 0x00, 0x48, 0xc0, 0x42,
0x6f, 0x3e, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x22,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02,
0x00, 0x00, 0x00, 0x00, 0x20, 0x04, 0x00, 0x20,
0x04, 0x00, 0x00, 0x88, 0xb0, 0x81, 0xa2, 0x41,
0x80, 0x04, 0x18, 0x44, 0x21, 0x10, 0x04, 0x42,
0x12, 0x6f, 0x94, 0x09, 0x82, 0x1e, 0x28, 0x00,
0x84, 0x00, 0x10, 0x48, 0x02, 0x00, 0x00, 0x24,
0x84, 0x00, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00,
0x00, 0x00, 0x00, 0x00, 0x46, 0x04, 0x00, 0x26,
0x02, 0x88, 0x82, 0x42, 0x86, 0x04, 0x00, 0x00,
0x41, 0x30, 0x24, 0x00, 0x14, 0xaf, 0xc3, 0x0b,
0x84, 0x13, 0x04, 0x38, 0x00, 0x84, 0x00, 0x00,
0x00, 0x28, 0x22, 0x00, 0x28, 0x42, 0x28, 0x00,
0x25, 0x82, 0x04, 0x00, 0x00, 0x48, 0x00, 0x00,
0x80, 0x24, 0x82, 0x04, 0x00, 0x80, 0x24, 0x01,
0x40, 0x24, 0x12, 0x21, 0x01, 0x00, 0x1c, 0x41,
0x84, 0x01, 0x29, 0x01, 0x1f, 0x2a, 0x03, 0x20,
0x01, 0x42, 0x12, 0x32, 0x16, 0x08, 0x40, 0x08,
0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x48, 0x48,
0x00, 0x00, 0x48, 0x48, 0x80, 0x06, 0x46, 0x81,
0x84, 0x04, 0x28, 0x28, 0x40, 0x04, 0x28, 0x00,
0xa0, 0x21, 0x4a, 0x08, 0x42, 0x20, 0x22, 0x21,
0x62, 0x41, 0x18, 0x12, 0x2a, 0x01, 0x6f, 0xbf,
0x09, 0x48, 0x40, 0x08, 0x22, 0x10, 0x82, 0x32,
0x28, 0x60, 0x82, 0x13, 0x02, 0x28, 0x48, 0x28,
0x28, 0x22, 0x28, 0xc0, 0x21, 0x90, 0x23, 0x24,
0x68, 0xa0, 0x24, 0x24, 0x00, 0x68, 0x40, 0x01,
0x00, 0x00, 0x00, 0x46, 0x21, 0x04, 0x12, 0x48,
0x18, 0x00, 0x49, 0x24, 0x02, 0x48, 0x80, 0x81,
0x04, 0x21, 0x23, 0x14, 0xf2, 0x4d, 0x8a, 0x40,
0x08, 0x00, 0x00, 0x10, 0x08, 0x22, 0x00, 0x80,
0x02, 0x00, 0x00, 0x00, 0x22, 0x21, 0x22, 0x80,
0x02, 0x28, 0x22, 0x00, 0x11, 0x46, 0x01, 0x80,
0x82, 0x82, 0x04, 0x00, 0x20, 0x01, 0x00, 0x44,
0x12, 0x18, 0x12, 0x42, 0x20, 0x02, 0x00, 0x22,
0x21, 0x44, 0x9f, 0x65, 0x0a, 0x60, 0x8c, 0x48,
0x42, 0x00, 0x00, 0x40, 0x08, 0x00, 0x00, 0xc0,
0x41, 0x00, 0x28, 0x10, 0x42, 0x02, 0x40, 0x82,
0x02, 0x00, 0x42, 0x80, 0x02, 0x00, 0x00, 0x20,
0x84, 0x04, 0x1c, 0x04, 0x80, 0x08, 0x21, 0x00,
0x28, 0x20, 0x01, 0x1a, 0x82, 0x22, 0x41, 0x11,
0xf2, 0xf8, 0x81, 0x60, 0x88, 0x80, 0x04, 0x22,
0x00, 0x84, 0x00, 0x28, 0x44, 0x80, 0x12, 0x08,
0x22, 0x00, 0x80, 0x84, 0x94, 0x42, 0x80, 0x21,
0x84, 0x8c, 0x84, 0x84, 0x22, 0x22, 0x42, 0x01,
0x48, 0x26, 0x08, 0x68, 0x00, 0x00, 0x18, 0x42,
0x42, 0x48, 0x1e, 0x44, 0xa0, 0x34, 0x20, 0x24,
0x32, 0x44, 0x46, 0x61, 0x14, 0x00, 0x21, 0x42,
0xef, 0x18, 0x0c, 0x70, 0xa8, 0x11, 0x88, 0x04,
0x22, 0xa3, 0x41, 0x18, 0xb8, 0x28, 0x02, 0x2a,
0x42, 0x08, 0x80, 0xa2, 0x24, 0x22, 0x28, 0x28,
0x28, 0x28, 0x34, 0x2a, 0x06, 0x2c, 0x92, 0x61,
0x2c, 0x02, 0x68, 0x90, 0x41, 0xa0, 0x44, 0xa0,
0x64, 0x20, 0x12, 0x04, 0x24, 0x48, 0x1b, 0x11,
0x12, 0x42, 0xa0, 0x58, 0x4e, 0x81, 0x1e, 0x51,
0x22, 0x22, 0x42, 0x2a, 0x41, 0xb1, 0x64, 0xc1,
0x16, 0x18, 0x56, 0xb1, 0x44, 0xe5, 0xf2, 0x45,
0x81, 0xa4, 0x5c, 0xa0, 0x16, 0x8c, 0x42, 0x41,
0x98, 0x28, 0x8c, 0x42, 0xb8, 0x28, 0x02, 0x22,
0xa0, 0x24, 0x60, 0x12, 0x20, 0x22, 0x22, 0x26,
0xa2, 0x62, 0x21, 0x2a, 0x82, 0x24, 0x26, 0x82,
0x24, 0x22, 0x06, 0x28, 0x80, 0x04, 0x22, 0xa0,
0x66, 0x4a, 0x94, 0x41, 0x42, 0x00, 0xc8, 0x8a,
0x41, 0x81, 0x16, 0x84, 0xa1, 0x44, 0xe0, 0x21,
0x74, 0x14, 0xe4, 0x11, 0x14, 0x24, 0xc1, 0x43,
0x21, 0xef, 0x2a, 0x04, 0x60, 0x81, 0x00, 0x32,
0x1a, 0x02, 0x20, 0x42, 0x02, 0x11, 0x40, 0x31,
0x28, 0x26, 0x42, 0x88, 0x82, 0x04, 0x34, 0x4a,
0x24, 0x64, 0x24, 0x48, 0x22, 0xa0, 0x44, 0x1b,
0x26, 0x42, 0x29, 0xa6, 0x22, 0x4a, 0x14, 0x21,
0x24, 0x82, 0x82, 0x02, 0x60, 0x44, 0xe0, 0x26,
0xa6, 0x54, 0x82, 0x4e, 0x84, 0x7a, 0xf2, 0x96,
0x14, 0x42, 0x5a, 0x46, 0xa2, 0x23, 0x45, 0xa4,
0x56, 0x44, 0x3a, 0x22, 0xa6, 0x12, 0x70, 0x34,
0x08, 0x00, 0x00, 0x82, 0x00, 0x40, 0x08, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04,
0x00, 0x48, 0x00, 0x00, 0x28, 0x40, 0x24, 0xc1,
0x24, 0x12, 0x20, 0x01, 0x8f, 0xe6, 0x0b, 0x4a,
0xa4, 0x11, 0x85, 0x08, 0x28, 0x1e, 0x32, 0x21,
0x2a, 0x92, 0x28, 0x89, 0xd2, 0x88, 0xd2, 0x11,
0x02, 0xf0, 0x48, 0x48, 0x2a, 0xf2, 0x41, 0x41,
0x22, 0x22, 0x22, 0x1f, 0x12, 0xa4, 0x62, 0x1f,
0x14, 0xe4, 0x26, 0x16, 0xe2, 0x26, 0x16, 0xe2,
0x22, 0x92, 0x42, 0x6a, 0x02, 0xa0, 0x24, 0x4a,
0x24, 0xa4, 0x62, 0x2a, 0x82, 0xa2, 0x22, 0x42,
0x55, 0x05, 0x1f, 0x12, 0x82, 0xa4, 0x44, 0x5a,
0xfd, 0x21, 0xa3, 0x3f, 0x14, 0x59, 0x44, 0x58,
0x4a, 0xa4, 0x24, 0x2a, 0xe7, 0x14, 0xe1, 0x12,
0xa1, 0x32, 0x2a, 0x83, 0xf1, 0x44, 0x45, 0x3f,
0xd4, 0x06, 0x4a, 0xa4, 0x51, 0x85, 0xa8, 0x11,
0x1a, 0xe3, 0x21, 0xb3, 0x12, 0xf1, 0x28, 0x28,
0x89, 0x82, 0xd2, 0xcc, 0xd2, 0x11, 0xc2, 0x24,
0xf0, 0x48, 0x48, 0x2a, 0xf2, 0x41, 0x41, 0x22,
0x20, 0xd2, 0x11, 0xb4, 0x22, 0xd6, 0x11, 0xe4,
0x23, 0xb7, 0x42, 0xe4, 0x2e, 0x1f, 0xe2, 0x22,
0xba, 0x42, 0xa4, 0x22, 0x4a, 0xf4, 0x61, 0x21,
0x2a, 0x26, 0x54, 0x88, 0x6a, 0xe6, 0x82, 0xa6,
0x22, 0x2a, 0x26, 0x54, 0x55, 0xf0, 0x21, 0x31,
0x1a, 0xa1, 0x4c, 0xde, 0xd4, 0x1f, 0x32, 0xfa,
0x53, 0xb1, 0x4f, 0x44, 0xa4, 0x71, 0x6a, 0xa2,
0x26, 0x4f, 0x42, 0xe6, 0x56, 0x37, 0x24, 0x4f,
0x42, 0xb1, 0x22, 0xa2, 0x32, 0x4f, 0x44, 0xf5,
0x21, 0x11, 0xa0, 0x44, 0x1a, 0xf5, 0x18, 0x18,
0x1a, 0xa1, 0x33, 0x3e, 0x32, 0xa5, 0xb8, 0x28,
0xb2, 0x28, 0xb2, 0x28, 0xf2, 0x28, 0x2c, 0x1f,
0x12, 0x82, 0x02, 0x8f, 0x84, 0xa4, 0x22, 0x1f,
0x16, 0xa6, 0x22, 0x6a, 0xa6, 0x66, 0x1f, 0x16,
0xb6, 0x22, 0xf6, 0x61, 0x21, 0x2e, 0x72, 0x2b,
0x22, 0x6e, 0xe2, 0x2b, 0x26, 0x2c, 0xb2, 0x42,
0xa6, 0x66, 0x2a, 0x42, 0xa1, 0x64, 0x4a, 0xe4,
0x84, 0xa4, 0x22, 0x2a, 0xa6, 0x22, 0x2a, 0x02,
0x55, 0xa5, 0x26, 0x1f, 0x17, 0xa2, 0x41, 0x48,
0x7e, 0xb4, 0x1f, 0x27, 0xb7, 0xc3, 0x7f, 0x14,
0xa4, 0x54, 0x6a, 0x26, 0xb6, 0x24, 0xb7, 0x44,
0xf1, 0x64, 0x74, 0x2a, 0xb1, 0x22, 0xa3, 0x54,
0x4f, 0x44, 0xf5, 0xcf, 0x62, 0xa0, 0x44, 0x1a,
0xf1, 0x18, 0x18, 0x1a, 0xa1, 0x91, 0x3e, 0x32,
0xaf, 0x81, 0xb1, 0x28, 0x52, 0x88, 0x2e, 0x28,
0x85, 0xfc, 0x21, 0x21, 0x41, 0xf0, 0x48, 0x48,
0x22, 0x1f, 0x16, 0xa4, 0x22, 0x4a, 0xa6, 0x66,
0x1f, 0x14, 0xa6, 0x42, 0x17, 0x12, 0x6e, 0x52,
0x2b, 0x46, 0x7e, 0xc2, 0x23, 0xe2, 0x2a, 0xb6,
0x62, 0xa6, 0x46, 0x6a, 0xe4, 0x16, 0xa2, 0x62,
0x4a, 0xe4, 0x84, 0xa4, 0x66, 0x83, 0xa2, 0x22,
0x6a, 0xa2, 0x44, 0x55, 0xa5, 0x66, 0x1f, 0x16,
0xa3, 0x15, 0x82, 0xfa, 0xff, 0x61, 0x62, 0x3b,
0xdd, 0x4f, 0x45, 0xa4, 0x55, 0x6a, 0xa2, 0x26,
0x4f, 0x43, 0xe6, 0x47, 0xb7, 0x75, 0xf6, 0x34,
0x34, 0x3a, 0xa2, 0x73, 0x4d, 0x45, 0x8b, 0x7e,
0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00,
0x00, 0x00, 0x00, 0x42, 0x20, 0x04, 0x42, 0x00,
0x20, 0x04, 0x00, 0x00, 0x42, 0x00, 0x00, 0x80,
0x04, 0x48, 0x80, 0x04, 0x40, 0x81, 0x04, 0x00,
0x12, 0xa0, 0x41, 0x20, 0x01, 0xf0, 0xf6, 0x29,
0x00, 0x12, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48,
0x00, 0x42, 0x00, 0x48, 0x00, 0x28, 0x00, 0x00,
0x42, 0x28, 0x00, 0x2a, 0x08, 0x88, 0x00, 0x48,
0x42, 0x41, 0x42, 0x41, 0x00, 0x00, 0x3f, 0x1e,
0x0c, 0x2e, 0x43, 0x1f, 0x41, 0x72, 0x28, 0xf3,
0x11, 0x24, 0x83, 0xf4, 0x11, 0x2c, 0xa7, 0x14,
0x1d, 0x24, 0xaf, 0x24, 0xd1, 0xc1, 0xb2, 0x4a,
0x99, 0x21, 0xab, 0x94, 0x55, 0xf8, 0x4a, 0x93,
0x43, 0xf2, 0x4a, 0x91, 0x47, 0x82, 0x2f, 0x14,
0x79, 0x24, 0xd8, 0x12, 0xf9, 0x24, 0x48, 0x1c,
0xf9, 0x24, 0x4a, 0x1c, 0xf8, 0x25, 0x4a, 0x16,
0xf1, 0x25, 0x4a, 0x96, 0xe1, 0xa2, 0x64, 0x59,
0x2d, 0x4a, 0x9e, 0x24, 0xac, 0xf4, 0x91, 0x24,
0x2c, 0xf4, 0x91, 0x24, 0xc5, 0xf2, 0x91, 0x24,
0x87, 0x24, 0x1f, 0x49, 0x72, 0x4a, 0xf2, 0x81,
0x64, 0xab, 0x14, 0x1f, 0x48, 0xb2, 0x4a, 0x99,
0x21, 0xab, 0x94, 0x51, 0xaf, 0x34, 0x39, 0x34,
0xaf, 0x24, 0x39, 0x34, 0x2f, 0x44, 0x79, 0x34,
0xf8, 0x42, 0x95, 0x4f, 0x83, 0x84, 0xf9, 0x24,
0x4a, 0xcf, 0x61, 0x0c, 0x2c, 0xe4, 0xc5, 0xd2,
0x28, 0xd4, 0x41, 0x32, 0x48, 0x17, 0x41, 0x42,
0x1d, 0x2c, 0xab, 0x14, 0x15, 0xf4, 0x4a, 0x94,
0x44, 0xab, 0xb4, 0x41, 0xab, 0xb4, 0x49, 0xb4,
0x48, 0x99, 0x44, 0x2f, 0x14, 0xd9, 0x84, 0x94,
0x92, 0x6d, 0x48, 0x98, 0x6d, 0x58, 0x1c, 0xd9,
0x84, 0xac, 0x81, 0x4d, 0x4a, 0x92, 0x8c, 0x64,
0x59, 0xbc, 0x64, 0x49, 0xbc, 0xf4, 0x91, 0x2c,
0xac, 0xf4, 0x91, 0x64, 0x85, 0xf2, 0x91, 0x44,
0x83, 0xe4, 0x49, 0x32, 0x48, 0x9e, 0x24, 0x83,
0xf4, 0x81, 0x24, 0xad, 0x14, 0x1b, 0x21, 0x8f,
0x44, 0x3a, 0x14, 0xab, 0xa4, 0x41, 0xab, 0x94,
0xa0, 0x94, 0x84, 0x29, 0xd9, 0x86, 0x84, 0xf9,
0xa2, 0x18, 0xdb, 0xf4, 0x20, 0x28, 0x88, 0x04,
0x00, 0x00, 0x00, 0xc0, 0x24, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x18, 0x80, 0x08, 0x00, 0x00,
0x00, 0x40, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0x02, 0x80, 0x08, 0x00, 0x00, 0x14, 0xf0,
0x4f, 0x36, 0x00, 0x18, 0x84, 0x90, 0x18, 0x00,
0x42, 0x8d, 0x24, 0x82, 0x42, 0x82, 0x42, 0x42,
0x11, 0x8b, 0x14, 0x48, 0x8b, 0x14, 0x00, 0x26,
0x08, 0x00, 0x20, 0x04, 0x00, 0x42, 0x42, 0x42,
0x60, 0x24, 0x48, 0x10, 0x22, 0x21, 0x02, 0x2a,
0x04, 0xa0, 0x12, 0x48, 0x2a, 0x81, 0x08, 0x80,
0x04, 0x21, 0x00, 0x6e, 0x84, 0x83, 0x81, 0x04,
0x88, 0x5f, 0xe7, 0x0d, 0x28, 0x8a, 0xc2, 0x16,
0x20, 0x04, 0x2a, 0xc1, 0x31, 0x14, 0x20, 0x32,
0x48, 0x00, 0x42, 0x10, 0x04, 0x00, 0x48, 0x88,
0x8c, 0x84, 0x14, 0x08, 0x22, 0x00, 0x22, 0x22,
0x82, 0x10, 0x82, 0x22, 0x91, 0x21, 0x26, 0x14,
0x84, 0x02, 0x22, 0x16, 0x64, 0x34, 0x14, 0x48,
0x25, 0x88, 0x28, 0x84, 0x88, 0x3c, 0x11, 0x60,
0x82, 0xf0, 0x21, 0x44, 0xa8, 0x14, 0xf0, 0x61,
0x44, 0x80, 0xa2, 0x1a, 0xc7, 0x21, 0x48, 0x46,
0x08, 0x1a, 0xa2, 0x34, 0x4d, 0x28, 0x82, 0x49,
0xb2, 0x88, 0x24, 0x26, 0x24, 0x34, 0x18, 0x46,
0xb4, 0x48, 0x01, 0x50, 0x28, 0x82, 0x46, 0xa8,
0x41, 0x84, 0xc2, 0x00, 0x80, 0x82, 0xb4, 0x41,
0x08, 0x46, 0xb2, 0x48, 0x62, 0x21, 0x42, 0x26,
0x24, 0x02, 0x68, 0x28, 0x12, 0x2c, 0x04, 0x4b,
0x25, 0x82, 0xa2, 0x42, 0x8a, 0xa4, 0x84, 0x18,
0x30, 0x28, 0x4c, 0xfa, 0x3c, 0x42, 0x22, 0x14,
0x1a, 0xf8, 0xb7, 0x28, 0x00, 0x00, 0x80, 0x01,
0x10, 0x41, 0x01, 0x42, 0x00, 0x40, 0x81, 0x04,
0x00, 0xa0, 0x24, 0x00, 0x00, 0x80, 0x02, 0x80,
0x84, 0x02, 0x10, 0x02, 0x90, 0x21, 0x18, 0x44,
0x22, 0x00, 0x44, 0x2e, 0x11, 0x19, 0x44, 0x42,
0x08, 0x00, 0x50, 0x12, 0x00, 0x48, 0x11, 0x8a,
0x04, 0xf0, 0x69, 0x6e, 0x00, 0x12, 0x24, 0x00,
0x50, 0x14, 0x00, 0x00, 0x00, 0x10, 0x12, 0x04,
0x00, 0x00, 0x11, 0x00, 0x30, 0x22, 0x00, 0x00,
0x40, 0x02, 0x24, 0x00, 0x00, 0x28, 0x22, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82,
0x20, 0xf2, 0x57, 0x5f, 0x40, 0x04, 0x13, 0x02,
0x41, 0x00, 0x81, 0x60, 0x21, 0x00, 0x20, 0x04,
0x11, 0x80, 0x04, 0x00, 0x00, 0x42, 0x81, 0x24,
0xc9, 0x44, 0x31, 0x22, 0x44, 0x42, 0x42, 0x00,
0x20, 0x41, 0x04, 0x10, 0x34, 0x18, 0x2c, 0x24,
0x02, 0x10, 0x08, 0x48, 0x1c, 0x24, 0x24, 0x08,
0x48, 0x81, 0x44, 0x84, 0x41, 0x00, 0x2f, 0x3d,
0x04, 0x41, 0x10, 0x11, 0x02, 0x00, 0x84, 0x60,
0x21, 0x00, 0x00, 0x21, 0x14, 0x20, 0x04, 0x00,
0x00, 0x42, 0x84, 0x10, 0x42, 0x03, 0x80, 0x44,
0x02, 0x24, 0x00, 0x00, 0x22, 0x22, 0x89, 0x21,
0x94, 0x22, 0x00, 0x81, 0x00, 0x11, 0x48, 0x88,
0x20, 0x44, 0x18, 0x04, 0x82, 0x80, 0xf2, 0x99,
0x49, 0x00, 0x52, 0x28, 0x40, 0x04, 0x45, 0x01,
0x00, 0x41, 0x80, 0x82, 0x04, 0x44, 0x00, 0x00,
0x24, 0x11, 0x80, 0x41, 0x22, 0xd2, 0x84, 0x04,
0x22, 0x44, 0x30, 0x41, 0x00, 0x81, 0x18, 0x43,
0x04, 0x10, 0x04, 0x00, 0x00, 0x41, 0xa0, 0x24,
0x42, 0x00, 0x00, 0x00, 0xa4, 0x44, 0x80, 0xf1,
0xae, 0x95, 0x40, 0x04, 0x22, 0x22, 0x10, 0x44,
0x04, 0x42, 0x81, 0x21, 0x25, 0x82, 0x51, 0x84,
0x44, 0x28, 0x46, 0x08, 0x00, 0x40, 0x14, 0x31,
0x44, 0x85, 0x54, 0x22, 0x4e, 0x24, 0x22, 0x10,
0x42, 0x04, 0x00, 0x11, 0x48, 0x24, 0x8d, 0x22,
0x1a, 0x82, 0x42, 0x14, 0x18, 0x02, 0x10, 0x92,
0x42, 0x88, 0x00, 0x00, 0x41, 0x82, 0x84, 0x18,
0x44, 0x46, 0x54, 0x84, 0x8f, 0x99, 0x08, 0x24,
0x28, 0x60, 0x41, 0x20, 0x22, 0x04, 0x80, 0x01,
0x14, 0x00, 0x10, 0x54, 0x42, 0x12, 0x11, 0x00,
0xc8, 0x40, 0x08, 0x84, 0x20, 0x11, 0x08, 0x80,
0x02, 0x88, 0x00, 0x00, 0x20, 0x21, 0x41, 0x74,
0x28, 0x22, 0x22, 0x04, 0x00, 0x86, 0x01, 0x00,
0x4a, 0xe3, 0x22, 0x01, 0x41, 0x00, 0xa2, 0x9f,
0xea, 0x0d, 0x00, 0x00, 0x14, 0x84, 0x00, 0x40,
0xc1, 0x11, 0x28, 0x20, 0x88, 0x01, 0x24, 0x42,
0x8a, 0x01, 0x00, 0x40, 0x83, 0x04, 0x40, 0x22,
0x01, 0x22, 0x40, 0x08, 0x00, 0x41, 0x10, 0x08,
0x28, 0x28, 0x80, 0x08, 0x18, 0x24, 0x00, 0x89,
0x01, 0x42, 0x81, 0x41, 0x12, 0x80, 0x02, 0xf0,
0xf6, 0xc1, 0x10, 0x94, 0x22, 0x28, 0x4c, 0x13,
0x91, 0x24, 0x4c, 0x04, 0x90, 0x19, 0x13, 0x41,
0x11, 0x22, 0x18, 0x44, 0x94, 0x42, 0x29, 0x84,
0x09, 0x20, 0x4c, 0x41, 0x6c, 0xa4, 0x84, 0x43,
0x24, 0x72, 0x12, 0x08, 0x43, 0x82, 0x42, 0x08,
0x00, 0x30, 0x2a, 0x2d, 0x38, 0x32, 0x1e, 0x24,
0x47, 0xa2, 0x83, 0x92, 0x82, 0xd0, 0x22, 0x81,
0x14, 0x62, 0x18, 0x81, 0x20, 0xb4, 0x1c, 0x92,
0x84, 0x20, 0x81, 0x92, 0x44, 0xcc, 0xf8, 0x8e,
0x5d, 0x00, 0x00, 0x00, 0x84, 0x00, 0x42, 0x50,
0x22, 0x28, 0x18, 0x45, 0x88, 0x21, 0x52, 0x48,
0x12, 0x14, 0x00, 0x41, 0xd0, 0x21, 0x44, 0x44,
0x82, 0x82, 0x01, 0x21, 0x00, 0x80, 0x18, 0x81,
0x44, 0x04, 0x00, 0x00, 0x20, 0x82, 0x04, 0x80,
0x08, 0x18, 0x00, 0x48, 0x2c, 0x63, 0x81, 0x44,
0x41, 0x20, 0xf2, 0x29, 0x13, 0x00, 0x00, 0x11,
0x41, 0x44, 0x00, 0x80, 0x04, 0x90, 0x12, 0x84,
0x00, 0x85, 0xa1, 0x42, 0xa0, 0x41, 0x00, 0x42,
0x84, 0x81, 0x00, 0x00, 0x22, 0x00, 0x81, 0x00,
0x00, 0x24, 0x10, 0x46, 0x84, 0x01, 0x00, 0x80,
0x04, 0x16, 0x88, 0x08, 0x89, 0x28, 0xa2, 0x24,
0x84, 0x00, 0x00, 0xdf, 0x41, 0x0c, 0x16, 0x24,
0x01, 0x2c, 0x43, 0x98, 0x22, 0x91, 0x90, 0x28,
0x89, 0x81, 0x51, 0x18, 0x84, 0x40, 0x44, 0x08,
0x40, 0x02, 0x30, 0x11, 0x40, 0x81, 0x22, 0x12,
0x41, 0x32, 0x24, 0x80, 0x61, 0x61, 0x24, 0x22,
0x00, 0x21, 0x28, 0x14, 0x30, 0x12, 0x31, 0x89,
0x22, 0x02, 0x42, 0x87, 0x18, 0x25, 0x21, 0xc4,
0x44, 0x24, 0x80, 0x5c, 0x24, 0x48, 0x20, 0x08,
0x43, 0xf2, 0xcf, 0xc1, 0x00, 0x52, 0x00, 0x24,
0x49, 0x42, 0x01, 0x80, 0x14, 0x04, 0x1a, 0x02,
0x40, 0x48, 0x28, 0x02, 0x42, 0x24, 0x16, 0x01,
0x19, 0x21, 0x82, 0x02, 0x90, 0x22, 0x00, 0x55,
0x12, 0x08, 0x81, 0x20, 0x04, 0x31, 0x44, 0x43,
0x11, 0x82, 0x82, 0x02, 0x41, 0x13, 0x94, 0x22,
0x83, 0x01, 0x00, 0x48, 0x24, 0x84, 0x24, 0x00,
0x4b, 0x12, 0x8f, 0x94, 0x04, 0xcd, 0x18, 0x8b,
0x44, 0x4a, 0xe4, 0x34, 0x43, 0x0c, 0x81, 0x30,
0x28, 0x89, 0xd1, 0x44, 0x51, 0xd4, 0xeb, 0x22,
0x8b, 0x22, 0x43, 0x02, 0x11, 0x48, 0x24, 0x12,
0x24, 0x25, 0xd2, 0x22, 0xb4, 0x18, 0xb1, 0x18,
0x21, 0x19, 0x01, 0x44, 0x28, 0x12, 0x1d, 0x11,
0x15, 0x91, 0x23, 0x85, 0x58, 0xa8, 0x8b, 0x44,
0x6a, 0x24, 0x54, 0x22, 0x60, 0x11, 0x81, 0x00,
0x47, 0x44, 0x4d, 0x8c, 0x4f, 0x12, 0xa2, 0x62,
0x43, 0x0e, 0x27, 0x88, 0x8a, 0xc2, 0x64, 0x42,
0x24, 0x2d, 0x82, 0x25, 0xa2, 0x11, 0x1b, 0xe6,
0x00, 0x00, 0x28, 0x40, 0x04, 0x18, 0x00, 0x00,
0x00, 0x14, 0x14, 0x21, 0x44, 0x44, 0x11, 0x00,
0x91, 0x00, 0x00, 0x00, 0x84, 0x00, 0x18, 0x00,
0x00, 0x00, 0x00, 0x80, 0x02, 0x21, 0x20, 0x01,
0x00, 0x10, 0x12, 0x04, 0x80, 0x02, 0x00, 0xbf,
0xc7, 0x01, 0x81, 0x84, 0x42, 0x48, 0x00, 0x12,
0x40, 0x02, 0x10, 0x44, 0x24, 0x82, 0x02, 0x10,
0x08, 0x68, 0x42, 0x24, 0x10, 0x22, 0x91, 0x98,
0x82, 0xc8, 0x00, 0x00, 0x11, 0x14, 0x10, 0x48,
0x28, 0x84, 0x04, 0x14, 0x20, 0x01, 0x00, 0x41,
0x44, 0x22, 0x28, 0x00, 0x20, 0x01, 0xc0, 0x22,
0x10, 0xb2, 0xaf, 0x0d, 0x8c, 0x42, 0x88, 0xc4,
0x41, 0x31, 0x21, 0x20, 0x02, 0x48, 0x41, 0x44,
0x26, 0x84, 0x82, 0x01, 0x00, 0x84, 0x40, 0x02,
0x21, 0x21, 0x58, 0x18, 0x19, 0x48, 0x42, 0x44,
0x04, 0x1b, 0x14, 0x14, 0x44, 0xc0, 0x28, 0x44,
0x48, 0x1f, 0x22, 0x04, 0x41, 0x12, 0x10, 0x88,
0x18, 0x44, 0x04, 0x28, 0x38, 0x80, 0x48, 0x48,
0x88, 0x64, 0x28, 0x10, 0x3a, 0x12, 0x8f, 0x44,
0x0a, 0xc0, 0x44, 0x00, 0x00, 0x84, 0x00, 0x40,
0x04, 0x29, 0x02, 0x00, 0x00, 0x18, 0x00, 0x21,
0x80, 0x01, 0x88, 0x00, 0x00, 0x40, 0x01, 0x40,
0x08, 0x48, 0x00, 0x00, 0x00, 0x00, 0x44, 0x90,
0x22, 0x00, 0x00, 0x00, 0x00, 0x21, 0x80, 0xf1,
0x22, 0x14, 0x00, 0x18, 0x00, 0x00, 0x84, 0x84,
0x81, 0x80, 0x24, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x21, 0x28, 0x28, 0x00,
0x00, 0x00, 0x40, 0x12, 0x01, 0x80, 0x84, 0x44,
0x08, 0x80, 0x48, 0x01, 0x00, 0x00, 0x48, 0x00,
0xf0, 0x31, 0x9a, 0x50, 0x88, 0x87, 0x84, 0x4a,
0xa4, 0x44, 0x00, 0x10, 0x01, 0x10, 0x54, 0x44,
0x47, 0x46, 0x2a, 0xa2, 0x62, 0x00, 0x41, 0x00,
0x24, 0x26, 0x72, 0x22, 0x32, 0x12, 0x12, 0x9a,
0x21, 0x28, 0x18, 0x48, 0x02, 0x11, 0x19, 0x51,
0x11, 0x81, 0x83, 0xf1, 0x48, 0x18, 0x4a, 0xa4,
0x44, 0x28, 0x00, 0x00, 0x90, 0x44, 0x45, 0x74,
0x24, 0x24, 0xa2, 0x22, 0x00, 0x86, 0x04, 0xc0,
0x82, 0x45, 0x52, 0x22, 0x2b, 0x21, 0x4f, 0x91,
0x01, 0x18, 0x81, 0x20, 0x24, 0x12, 0x01, 0x80,
0x14, 0x09, 0x50, 0x84, 0x20, 0x82, 0x01, 0x20,
0x01, 0x00, 0x24, 0x45, 0x01, 0x12, 0x88, 0x88,
0x42, 0x00, 0x24, 0x50, 0x21, 0x00, 0x81, 0x41,
0x42, 0x41, 0x00, 0x00, 0x14, 0x00, 0x45, 0x8a,
0x24, 0x22, 0x01, 0x00, 0x00, 0x50, 0x24, 0x70,
0x2b, 0x06, 0x00, 0x41, 0x00, 0x00, 0x10, 0x01,
0x81, 0x84, 0x10, 0x02, 0x00, 0x00, 0x28, 0x44,
0x00, 0x22, 0x22, 0x10, 0x08, 0x21, 0x84, 0x90,
0x42, 0x24, 0x12, 0x18, 0x00, 0x00, 0x00, 0x14,
0x22, 0x11, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00,
0x44, 0x20, 0x42, 0xf4, 0x87, 0x5a, 0x00, 0x00,
0x14, 0x00, 0x1c, 0x02, 0x00, 0x80, 0x04, 0x42,
0x00, 0x00, 0x10, 0x04, 0x41, 0x44, 0x00, 0x1c,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x10, 0x11, 0x48, 0x08, 0x81, 0x48, 0x20, 0x04,
0x00, 0x10, 0x04, 0x22, 0x00, 0xbd, 0x23, 0x00,
0x12, 0x44, 0x14, 0x21, 0x11, 0x1d, 0x28, 0x36,
0x78, 0x41, 0x82, 0x04, 0x81, 0x20, 0x24, 0x45,
0x02, 0xc0, 0x14, 0x11, 0x10, 0x34, 0x28, 0x20,
0x04, 0x00, 0x25, 0x18, 0xce, 0x22, 0x4e, 0x12,
0x24, 0x20, 0x21, 0x21, 0x41, 0x24, 0x82, 0x02,
0x90, 0x21, 0x91, 0x89, 0x14, 0x28, 0x11, 0x08,
0x42, 0x24, 0x82, 0x84, 0x81, 0x90, 0xa4, 0x28,
0x22, 0xf0, 0x6f, 0x7c, 0x20, 0x12, 0x04, 0x11,
0x34, 0x41, 0x89, 0x01, 0x00, 0x83, 0x24, 0x01,
0x21, 0x10, 0x01, 0x41, 0x83, 0x21, 0x12, 0x04,
0x30, 0x24, 0x10, 0x58, 0x81, 0x24, 0x48, 0x84,
0x00, 0x18, 0x12, 0x20, 0x12, 0x04, 0x14, 0x24,
0x11, 0x19, 0x21, 0x62, 0x24, 0x11, 0x70, 0x48,
0x02, 0x23, 0x68, 0x11, 0x18, 0x40, 0x24, 0x01,
0x82, 0x43, 0x12, 0x0c, 0xa7, 0xd7, 0x20, 0x01,
0x20, 0x82, 0x02, 0x10, 0x11, 0x18, 0x09, 0x46,
0x32, 0x48, 0x40, 0x81, 0x01, 0xc4, 0x90, 0x64,
0x42, 0x22, 0x51, 0x14, 0x22, 0x26, 0x01, 0x42,
0x44, 0x24, 0xa0, 0x42, 0x12, 0x45, 0x02, 0x00,
0x00, 0x25, 0x54, 0x14, 0x20, 0x41, 0x28, 0x28,
0x04, 0x42, 0x42, 0x00, 0x90, 0x84, 0x90, 0x44,
0x42, 0x00, 0x43, 0xe2, 0xd7, 0x0d, 0x6f, 0x62,
0xd2, 0x22, 0xa2, 0x32, 0x2b, 0x11, 0x12, 0x29,
0x01, 0x2c, 0x51, 0x22, 0x29, 0xf8, 0x12, 0x13,
0x3f, 0x11, 0xb1, 0x81, 0xe9, 0x99, 0x51, 0x88,
0x8f, 0x18, 0xe4, 0x84, 0x24, 0xd4, 0x91, 0x54,
0x11, 0x1c, 0x54, 0x99, 0x85, 0xe8, 0x84, 0xf4,
0x48, 0x4c, 0x4d, 0x44, 0x4b, 0x64, 0x2e, 0x24,
0x22, 0x4c, 0x02, 0x28, 0x45, 0x54, 0x44, 0x2e,
0x24, 0x6f, 0x62, 0xd2, 0x22, 0xa2, 0x32, 0x2b,
0x11, 0x1a, 0xb8, 0x82, 0x09, 0x2c, 0x59, 0x22,
0x29, 0xf8, 0x12, 0x13, 0x3f, 0x11, 0xb1, 0x81,
0xe9, 0x99, 0xd9, 0x88, 0xb8, 0x88, 0xec, 0x84,
0x24, 0xc4, 0x48, 0x80, 0x54, 0x88, 0x85, 0xe8,
0x84, 0xf4, 0x68, 0x42, 0xf0, 0x26, 0x22, 0x27,
0x21, 0x2a, 0xa1, 0x11, 0x23, 0x01, 0x18, 0x50,
0x22, 0x39, 0xc8, 0x13, 0x1f, 0x11, 0x91, 0x89,
0x9e, 0x88, 0x87, 0x94, 0x89, 0xa4, 0x44, 0x46,
0x48, 0xd1, 0x11, 0x04, 0x15, 0x58, 0x88, 0x49,
0xf4, 0x48, 0x44, 0x47, 0x42, 0x4b, 0x24, 0x2a,
0x62, 0x42, 0x80, 0x02, 0x44, 0x45, 0x86, 0xf2,
0x26, 0x22, 0x27, 0x21, 0x2a, 0xa1, 0x11, 0x2b,
0x81, 0x82, 0x8a, 0x01, 0x25, 0x12, 0xc3, 0x13,
0x1f, 0x11, 0x91, 0x89, 0x9e, 0x88, 0x87, 0x94,
0x8b, 0x48, 0x4a, 0x64, 0x84, 0x80, 0x04, 0x84,
0x85, 0x98, 0x44, 0x2f, 0x1a, 0x07, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4,
0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f,
0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4,
0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f,
0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4,
0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f,
0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4,
0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f,
0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4,
0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f,
0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4,
0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f,
0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4,
0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f,
0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4,
0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f,
0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xff, 0xe4, 0x4f, 0x11, 0x62,
0x84, 0x14, 0x00, 0x49, 0xb4, 0x24, 0xb1, 0x24,
0xb4, 0x24, 0x24, 0x43, 0x21, 0x61, 0x12, 0x00,
0x15, 0xc2, 0x24, 0x16, 0x42, 0x12, 0xc1, 0x22,
0x20, 0x01, 0x00, 0x39, 0x92, 0x12, 0xa1, 0x11,
0x1b, 0x34, 0x30, 0x48, 0x87, 0x14, 0x85, 0x34,
0x22, 0x46, 0xd8, 0x12, 0x41, 0x18, 0x04, 0x2e,
0x48, 0x32, 0x49, 0x34, 0x14, 0x20, 0x0a, 0x80,
0x48, 0x04, 0x16, 0x26, 0x81, 0x82, 0x22, 0x08,
0x67, 0x81, 0x4f, 0xcf, 0x0a, 0x1b, 0x42, 0x13,
0x91, 0x1a, 0x99, 0xf4, 0x48, 0x15, 0x25, 0xc8,
0x48, 0x81, 0x70, 0x42, 0x34, 0x24, 0x22, 0x16,
0x54, 0x84, 0x17, 0x42, 0x2f, 0x42, 0x44, 0x62,
0xc6, 0x1e, 0x2d, 0x1e, 0x22, 0x1c, 0x95, 0x18,
0x81, 0x2f, 0xa4, 0xc1, 0x42, 0x1b, 0x41, 0x16,
0x14, 0xe1, 0x72, 0xd1, 0x48, 0x11, 0x68, 0x97,
0x41, 0x26, 0xc2, 0x41, 0x13, 0x44, 0x41, 0x68,
0x14, 0x9b, 0x14, 0x47, 0x84, 0x64, 0xcc, 0x84,
0x92, 0xe2, 0x43, 0x02, 0x4c, 0x4b, 0x74, 0x24,
0xc2, 0x2a, 0x4d, 0x22, 0x8b, 0x42, 0xcc, 0x92,
0x92, 0x2b, 0x58, 0x23, 0xa1, 0x18, 0x8a, 0xf4,
0x58, 0x59, 0x10, 0x63, 0x84, 0x40, 0x18, 0x18,
0x68, 0x81, 0x40, 0x26, 0x41, 0x21, 0x91, 0x14,
0x60, 0x42, 0x60, 0x42, 0x89, 0xa4, 0x12, 0x11,
0x4e, 0x21, 0x84, 0x16, 0x3a, 0x18, 0x24, 0x12,
0x4c, 0x42, 0x42, 0x98, 0x12, 0x80, 0x42, 0x94,
0x68, 0x21, 0x31, 0x42, 0x14, 0x11, 0x18, 0x84,
0xa0, 0x14, 0x24, 0x92, 0x22, 0x8a, 0x32, 0xb4,
0x60, 0x22, 0x45, 0x48, 0xc4, 0x44, 0x18, 0x86,
0x82, 0x08, 0x70, 0xc8, 0xe4, 0xd6, 0x02, 0x28,
0x17, 0x21, 0x12, 0x48, 0x1c, 0x11, 0x06, 0x28,
0x40, 0x44, 0x04, 0x14, 0x81, 0x14, 0x3b, 0x24,
0x10, 0x52, 0x78, 0x1a, 0x82, 0x01, 0x80, 0x24,
0xd4, 0x21, 0x04, 0x14, 0x43, 0x42, 0x84, 0x62,
0x14, 0x89, 0x14, 0x61, 0x44, 0x28, 0x24, 0x12,
0x10, 0x2c, 0x54, 0x2c, 0x84, 0x00, 0x00, 0x00,
0x82, 0x80, 0x72, 0x22, 0x4a, 0x8c, 0x21, 0x84,
0x68, 0x21, 0x12, 0x5e, 0x37, 0x80, 0x04, 0x91,
0x14, 0x41, 0x80, 0x64, 0x44, 0x48, 0x22, 0x28,
0x80, 0x02, 0x40, 0x06, 0x4b, 0x12, 0x00, 0x80,
0x01, 0x24, 0x00, 0x15, 0x02, 0x19, 0x41, 0x98,
0x18, 0x00, 0x00, 0x50, 0x18, 0x80, 0x04, 0x00,
0x4c, 0xe2, 0x44, 0x82, 0x14, 0x04, 0x00, 0x00,
0x21, 0x20, 0x82, 0x02, 0x29, 0x01, 0xf0, 0x26,
0x5f, 0x00, 0x00, 0x20, 0x84, 0x34, 0x24, 0x84,
0x28, 0x48, 0x80, 0x02, 0x41, 0x00, 0x00, 0x21,
0x24, 0x24, 0x00, 0x00, 0x20, 0x21, 0x01, 0x11,
0x46, 0xc1, 0x18, 0x00, 0x91, 0x48, 0x10, 0x18,
0x38, 0x41, 0x41, 0x62, 0x00, 0x43, 0x02, 0x00,
0x41, 0x41, 0x28, 0x20, 0x41, 0x02, 0x2a, 0x01,
0x88, 0x24, 0xef, 0x62, 0x06, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x40, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xcf, 0x65, 0x0e, 0x42, 0x12,
0x00, 0xc0, 0x24, 0x10, 0x15, 0x88, 0x98, 0x22,
0x22, 0x81, 0x15, 0x24, 0x24, 0x32, 0x42, 0x43,
0x82, 0x64, 0x22, 0x12, 0x26, 0x84, 0x84, 0x48,
0x41, 0x82, 0x61, 0x86, 0x17, 0x41, 0x2c, 0x74,
0x24, 0x21, 0x14, 0x24, 0x08, 0x90, 0x11, 0x28,
0x40, 0x04, 0x81, 0x17, 0x44, 0x4a, 0x01, 0x00,
0x42, 0x48, 0x80, 0x12, 0x18, 0x84, 0x31, 0x28,
0x84, 0x00, 0x83, 0xf4, 0x59, 0x3f, 0x80, 0x11,
0x83, 0x03, 0x66, 0x98, 0x18, 0x27, 0x81, 0x00,
0x11, 0x42, 0x00, 0x42, 0x25, 0x08, 0x45, 0x18,
0x88, 0x11, 0x4c, 0x01, 0x12, 0x48, 0x48, 0x44,
0x14, 0x44, 0x21, 0x16, 0x18, 0x68, 0x83, 0x58,
0x62, 0x31, 0x28, 0x40, 0xa8, 0x21, 0xc2, 0x1c,
0x91, 0x82, 0x28, 0x00, 0x2b, 0x14, 0x1c, 0x02,
0x49, 0x18, 0x2a, 0x34, 0x42, 0x83, 0xe2, 0x88,
0x12, 0x14, 0x04, 0xaa, 0xc4, 0x86, 0x6f, 0x8a,
0x0d, 0x46, 0x12, 0x01, 0x30, 0x48, 0x4c, 0x12,
0x18, 0x05, 0x30, 0x42, 0x28, 0x50, 0x61, 0x81,
0x28, 0xa1, 0x26, 0x88, 0x61, 0xa2, 0x16, 0x41,
0x84, 0x85, 0x28, 0x54, 0x24, 0x12, 0x2e, 0x4a,
0x15, 0x24, 0x74, 0x28, 0x95, 0x48, 0x56, 0xe4,
0x28, 0x14, 0x21, 0x82, 0x91, 0x28, 0x38, 0xc6,
0x24, 0x31, 0x8a, 0x45, 0x21, 0x05, 0x18, 0x19,
0x02, 0x49, 0x04, 0x22, 0x30, 0x24, 0x12, 0x22,
0x84, 0x80, 0xe6, 0xa8, 0xe4, 0x92, 0x01, 0x18,
0x12, 0x2a, 0x01, 0x22, 0x16, 0x98, 0x12, 0x10,
0x38, 0x81, 0x22, 0x10, 0x88, 0x24, 0x04, 0x46,
0x14, 0x24, 0x14, 0x04, 0x22, 0x80, 0x44, 0x01,
0x14, 0x41, 0x12, 0xac, 0x01, 0x2a, 0x01, 0x22,
0x00, 0x11, 0x00, 0x10, 0x01, 0x68, 0x00, 0x23,
0x04, 0x42, 0x82, 0xa1, 0x48, 0xa3, 0x44, 0x98,
0xa8, 0x45, 0x48, 0x04, 0x88, 0x41, 0x2f, 0xf5,
0x04, 0x00, 0x00, 0x00, 0x22, 0x00, 0x11, 0x40,
0x88, 0x09, 0x20, 0x81, 0x01, 0x88, 0x00, 0x40,
0x21, 0x02, 0x22, 0x80, 0x64, 0x1c, 0x2a, 0x01,
0x00, 0x2a, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x88, 0x48, 0x00, 0x20, 0x01, 0x48, 0x00,
0x00, 0x2f, 0xaf, 0x0f, 0x10, 0x63, 0x83, 0x32,
0x8b, 0x21, 0x00, 0x2a, 0x61, 0x84, 0x00, 0x00,
0xa0, 0x81, 0x49, 0x12, 0x02, 0x22, 0x20, 0xa9,
0x42, 0x28, 0x00, 0x20, 0x84, 0x82, 0x02, 0x49,
0x03, 0x8a, 0x01, 0x44, 0x28, 0x12, 0x22, 0x82,
0x80, 0x14, 0x22, 0x24, 0x96, 0x41, 0x00, 0x4a,
0x01, 0x20, 0xa4, 0x21, 0x48, 0x2a, 0x14, 0xa8,
0x24, 0x48, 0x4a, 0x42, 0xf8, 0x56, 0x53, 0x00,
0x21, 0x8c, 0x21, 0x11, 0x08, 0x20, 0x01, 0x11,
0x00, 0x88, 0x80, 0xc1, 0x14, 0x12, 0x00, 0x00,
0x48, 0x19, 0x02, 0x00, 0x20, 0x24, 0x0a, 0x00,
0xa0, 0x12, 0x41, 0x20, 0x01, 0x00, 0x10, 0x82,
0x24, 0x14, 0x01, 0xa0, 0x49, 0x00, 0x48, 0x32,
0x12, 0x48, 0x20, 0x84, 0x24, 0x04, 0x3f, 0x81,
0x02, 0x10, 0x21, 0x82, 0xa2, 0x12, 0x80, 0x82,
0x32, 0x48, 0x00, 0x81, 0x18, 0x20, 0x68, 0x22,
0x00, 0xa2, 0xa0, 0x18, 0x28, 0x20, 0x02, 0x22,
0x48, 0x28, 0x13, 0xa4, 0x12, 0x36, 0x04, 0x92,
0x00, 0x22, 0x80, 0x82, 0x08, 0x42, 0x00, 0x22,
0x42, 0x00, 0x20, 0x04, 0x00, 0x42, 0x28, 0x46,
0x88, 0x02, 0x28, 0x81, 0xbf, 0x3a, 0x07, 0x25,
0x01, 0x18, 0x00, 0x23, 0x21, 0x24, 0x81, 0x31,
0x42, 0x18, 0x23, 0x81, 0x83, 0x41, 0x02, 0x00,
0x88, 0xc4, 0x54, 0x48, 0xa0, 0x1c, 0x22, 0x00,
0x36, 0x48, 0x84, 0xc4, 0x88, 0x48, 0x22, 0x24,
0x00, 0x00, 0x32, 0x20, 0x62, 0x44, 0x12, 0x20,
0x01, 0x80, 0x02, 0xc0, 0x88, 0x43, 0x02, 0x42,
0x00, 0x28, 0x28, 0xf0, 0x6b, 0x6b, 0x30, 0x28,
0x42, 0x40, 0x14, 0x04, 0x00, 0x22, 0x18, 0x80,
0x84, 0x02, 0x12, 0x12, 0x44, 0x00, 0x00, 0x00,
0x2a, 0x01, 0x00, 0x00, 0x00, 0x00, 0x28, 0x20,
0x21, 0x24, 0x02, 0x48, 0x12, 0x00, 0x88, 0x00,
0x80, 0x02, 0x00, 0x48, 0x88, 0x89, 0x28, 0x06,
0x8a, 0x14, 0x08, 0x5f, 0x5b, 0x06, 0x18, 0x00,
0x12, 0x90, 0x48, 0x49, 0x81, 0x02, 0x00, 0x28,
0x14, 0x88, 0x11, 0x44, 0x42, 0x80, 0xa1, 0x24,
0x26, 0x48, 0x64, 0x84, 0x10, 0x08, 0x48, 0x48,
0x12, 0x4c, 0x82, 0x04, 0x00, 0x4a, 0x11, 0x02,
0x1c, 0x01, 0x00, 0x40, 0x28, 0x02, 0x28, 0x28,
0x80, 0x04, 0x22, 0x84, 0x00, 0x20, 0x02, 0x80,
0xfc, 0xb1, 0xe6, 0xb0, 0x21, 0x01, 0x18, 0x18,
0x64, 0x8c, 0x65, 0x41, 0x22, 0x2c, 0x22, 0x45,
0x22, 0x22, 0x21, 0x79, 0x11, 0x32, 0x14, 0x48,
0x20, 0x39, 0x4c, 0x85, 0x35, 0x44, 0x81, 0x82,
0x8c, 0x02, 0x42, 0x8c, 0x23, 0x41, 0x34, 0x88,
0x80, 0x82, 0xd2, 0x22, 0x81, 0x01, 0x2a, 0x81,
0x22, 0x84, 0x41, 0x04, 0x80, 0x21, 0x02, 0x20,
0x04, 0x83, 0x58, 0x48, 0x82, 0x83, 0x84, 0x06,
0x22, 0x28, 0x4a, 0xf8, 0xa8, 0x45, 0x10, 0x02,
0x40, 0x04, 0x20, 0x24, 0x81, 0x01, 0x18, 0x1a,
0x44, 0x01, 0x00, 0x44, 0x00, 0x22, 0x28, 0x20,
0xa4, 0x42, 0x00, 0x80, 0x44, 0xa4, 0x42, 0x42,
0x48, 0x00, 0x42, 0x00, 0x14, 0x12, 0x80, 0x22,
0x64, 0x81, 0x2a, 0x08, 0x80, 0x02, 0x00, 0x22,
0x4a, 0x02, 0x88, 0x80, 0xa2, 0x48, 0x81, 0xf0,
0x9d, 0x44, 0x00, 0x12, 0x80, 0x02, 0x00, 0x00,
0x28, 0x20, 0x04, 0x18, 0x00, 0x00, 0x20, 0x02,
0x42, 0x20, 0x02, 0x1a, 0x24, 0x04, 0x42, 0x00,
0x00, 0x18, 0x00, 0x28, 0x00, 0x20, 0x02, 0x48,
0x80, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00,
0x42, 0xf0, 0xec, 0xc6, 0x00, 0x00, 0x00, 0x00,
0x28, 0x18, 0x00, 0x00, 0x20, 0x21, 0x02, 0x22,
0x80, 0x01, 0x00, 0x20, 0x24, 0x02, 0x80, 0x02,
0x42, 0x20, 0x04, 0x00, 0x00, 0x28, 0x00, 0x00,
0x42, 0x80, 0x22, 0x04, 0x20, 0x04, 0x00, 0x42,
0x40, 0x01, 0x20, 0xf6, 0xe8, 0x12, 0x00, 0x22,
0x80, 0x81, 0x02, 0x00, 0x00, 0x20, 0x22, 0x02,
0x00, 0x00, 0x00, 0x22, 0x28, 0x12, 0x42, 0x00,
0xa0, 0x24, 0x12, 0x62, 0x12, 0x80, 0x01, 0x00,
0x00, 0x00, 0x80, 0x04, 0x00, 0x22, 0x28, 0x68,
0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x5b, 0x56,
0x00, 0x00, 0x42, 0x80, 0x23, 0x02, 0x00, 0x00,
0x80, 0x21, 0x02, 0x00, 0x18, 0x18, 0x18, 0x00,
0x00, 0x00, 0x00, 0x00, 0x12, 0xa0, 0x41, 0x80,
0x02, 0x00, 0x42, 0x00, 0x00, 0x00, 0x48, 0x80,
0x02, 0x22, 0x00, 0x20, 0x82, 0x82, 0x04, 0xf0,
0x3f, 0x39, 0x20, 0x01, 0x00, 0x00, 0xa0, 0x12,
0x00, 0x20, 0x04, 0x20, 0x01, 0x00, 0x00, 0x00,
0x48, 0x22, 0x48, 0x00, 0x00, 0x20, 0x04, 0x48,
0x80, 0x04, 0x00, 0x00, 0x42, 0x80, 0x02, 0x42,
0x48, 0x00, 0x42, 0x28, 0x00, 0x00, 0x80, 0x04,
0x42, 0x14, 0xfd, 0x96, 0x00, 0x00, 0x00, 0x12,
0x18, 0x00, 0x00, 0x00, 0x00, 0x20, 0x02, 0x80,
0x02, 0x22, 0x00, 0x38, 0x12, 0x42, 0x20, 0x06,
0x00, 0x00, 0x80, 0x24, 0x82, 0x24, 0x02, 0x00,
0x48, 0x00, 0x00, 0x00, 0x00, 0x80, 0x05, 0x28,
0x80, 0x02, 0xd0, 0x8a, 0x02, 0x00, 0x2a, 0x04,
0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00,
0x20, 0x01, 0x28, 0x00, 0x00, 0x00, 0x00, 0x80,
0x01, 0x00, 0x20, 0x02, 0x00, 0x00, 0x00, 0x00,
0x80, 0x02, 0x48, 0x00, 0x48, 0x42, 0x00, 0x00,
0xef, 0xf2, 0x08, 0x18, 0x18, 0x22, 0x28, 0x80,
0xa2, 0x12, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02,
0x00, 0x00, 0x28, 0x12, 0x28, 0x00, 0x28, 0x20,
0x82, 0x23, 0x84, 0x22, 0x82, 0x22, 0x02, 0x22,
0x48, 0x00, 0x00, 0x00, 0x20, 0x02, 0x42, 0x00,
0x00, 0x28, 0xa0, 0x24, 0x00, 0x4a, 0xf2, 0x5b,
0xaf, 0x40, 0x08, 0x48, 0x00, 0x00, 0x80, 0x01,
0x40, 0x04, 0x28, 0x22, 0x28, 0x00, 0x00, 0x80,
0x34, 0x42, 0x48, 0x18, 0x48, 0x88, 0x48, 0x80,
0x04, 0x18, 0x14, 0x48, 0x42, 0x84, 0x42, 0x48,
0x20, 0x84, 0x24, 0x04, 0x42, 0x28, 0x40, 0x24,
0x84, 0xa2, 0x42, 0x42, 0x42, 0x22, 0x20, 0x04,
0x42, 0x21, 0xf0, 0x49, 0xa3, 0x00, 0x18, 0x22,
0x62, 0x28, 0x1a, 0xa2, 0x23, 0x18, 0x89, 0x21,
0x02, 0x62, 0x00, 0x3a, 0x02, 0x2a, 0x02, 0x12,
0x12, 0x3a, 0x81, 0xa2, 0x21, 0x48, 0x28, 0x58,
0x20, 0x86, 0xa1, 0x24, 0x58, 0xa0, 0x34, 0x48,
0x48, 0x80, 0x02, 0x68, 0x4a, 0x24, 0x82, 0x04,
0x00, 0x42, 0x48, 0x4a, 0x02, 0x2a, 0x84, 0x82,
0x24, 0x82, 0x24, 0x22, 0x04, 0x14, 0x2a, 0xf6,
0x8c, 0x4f, 0x80, 0x21, 0x82, 0x82, 0x03, 0x22,
0x20, 0x22, 0x01, 0x80, 0x84, 0xa2, 0x11, 0x00,
0x00, 0xa0, 0x32, 0xa0, 0x42, 0x48, 0x22, 0x48,
0x1a, 0x82, 0x84, 0x86, 0x86, 0xa4, 0x25, 0x12,
0x48, 0x52, 0x28, 0x48, 0x22, 0x00, 0x20, 0x24,
0xa4, 0x24, 0x4a, 0xa4, 0x24, 0x80, 0x02, 0x4a,
0x24, 0x04, 0x42, 0x42, 0x42, 0x28, 0x22, 0x2a,
0x84, 0x04, 0x4f, 0x74, 0x0d, 0x12, 0x12, 0x00,
0x80, 0x81, 0x81, 0x02, 0x00, 0x00, 0x80, 0xa1,
0x22, 0x80, 0x02, 0x00, 0x42, 0x62, 0x5a, 0x22,
0x26, 0x24, 0x04, 0x62, 0x22, 0x80, 0x25, 0xa1,
0x12, 0x42, 0x2a, 0x22, 0xa4, 0x22, 0x22, 0x80,
0x04, 0x48, 0x80, 0xa4, 0x22, 0x62, 0x48, 0x80,
0xa2, 0x44, 0x80, 0x85, 0xa2, 0x44, 0x68, 0x42,
0x42, 0x42, 0x3f, 0x42, 0x08, 0x00, 0x20, 0x02,
0x00, 0x22, 0x00, 0x48, 0x00, 0x20, 0x81, 0x02,
0x00, 0x20, 0x81, 0x02, 0x28, 0x00, 0x80, 0x02,
0x80, 0x21, 0x84, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x80, 0x24, 0x02, 0x00, 0x00, 0x00, 0x00,
0x42, 0xa0, 0x24, 0x8f, 0x57, 0x0b, 0x12, 0x1a,
0x01, 0x28, 0xa0, 0x11, 0x12, 0x28, 0x85, 0x08,
0x00, 0x00, 0x12, 0x00, 0x00, 0xa0, 0x32, 0x6a,
0x04, 0x22, 0x00, 0x42, 0x4a, 0xa4, 0x42, 0x2a,
0x02, 0x5a, 0xa4, 0x67, 0x4a, 0xa2, 0x62, 0x4a,
0x86, 0x82, 0x82, 0x02, 0xa0, 0x44, 0x6a, 0x82,
0xa4, 0x62, 0x42, 0x4a, 0x22, 0x24, 0x84, 0x84,
0x04, 0x6a, 0xa2, 0x46, 0x6a, 0x24, 0xa6, 0x22,
0x48, 0xf0, 0x6a, 0xa9, 0x20, 0xe1, 0x85, 0x05,
0x2a, 0x06, 0x3a, 0x22, 0x83, 0xf2, 0x18, 0x18,
0xd0, 0x44, 0x84, 0xc4, 0x24, 0x18, 0x18, 0x2a,
0x22, 0x02, 0xa0, 0x32, 0x2e, 0x32, 0x2b, 0x66,
0x4a, 0xb4, 0x62, 0x85, 0xa6, 0xcc, 0x4a, 0xa4,
0xe6, 0x42, 0x2a, 0xa2, 0x51, 0x1f, 0x14, 0xa4,
0x63, 0x1e, 0x21, 0x8f, 0x86, 0xa6, 0x66, 0x4e,
0x68, 0x28, 0x2a, 0xa6, 0x44, 0x42, 0x42, 0x2a,
0x02, 0x2a, 0xf2, 0x64, 0x64, 0x42, 0x4e, 0x64,
0x4a, 0x84, 0xa4, 0x44, 0x4a, 0xa4, 0x37, 0x3a,
0xa5, 0x66, 0x6e, 0x42, 0x2b, 0x66, 0xb0, 0x52,
0xd7, 0xe5, 0x09, 0x12, 0x1a, 0xa5, 0x13, 0x28,
0x2a, 0xa2, 0x33, 0x12, 0x3a, 0xf3, 0x18, 0x18,
0x40, 0x04, 0x28, 0x18, 0x1a, 0x81, 0x82, 0x02,
0x20, 0xa1, 0x77, 0x2b, 0x46, 0x28, 0x2a, 0x83,
0xa4, 0xc4, 0x4a, 0xa4, 0x44, 0x62, 0x22, 0x3a,
0xe5, 0x15, 0xa4, 0x77, 0x4a, 0xe7, 0x82, 0xa6,
0x64, 0x2a, 0xa6, 0x22, 0x28, 0x4a, 0x24, 0x24,
0xa4, 0x22, 0xa0, 0x62, 0x46, 0xa4, 0x24, 0x4a,
0x02, 0x48, 0x48, 0x4a, 0xa4, 0x26, 0x2a, 0xa4,
0x42, 0x6a, 0xb2, 0x22, 0x82, 0xa4, 0x12, 0x8e,
0x91, 0x20, 0xb1, 0x18, 0xa5, 0x13, 0x6a, 0x02,
0x3a, 0xa3, 0x13, 0x2a, 0xf2, 0x18, 0x18, 0xe0,
0x44, 0xa4, 0x44, 0x41, 0x18, 0x18, 0x2a, 0x22,
0x02, 0x80, 0xa1, 0x54, 0x2b, 0x66, 0x2c, 0xa6,
0x66, 0x68, 0x4a, 0x0c, 0xaa, 0xa2, 0x66, 0x6a,
0xa4, 0x53, 0x4e, 0x41, 0x7a, 0xb6, 0x11, 0xe2,
0x86, 0xa6, 0x66, 0x8b, 0x62, 0x2a, 0xa2, 0x22,
0x4a, 0x24, 0x24, 0xa4, 0x22, 0xa0, 0x22, 0x6e,
0x64, 0x6a, 0xb6, 0x44, 0x04, 0x48, 0x48, 0x4a,
0xa4, 0x77, 0x3a, 0xa5, 0x62, 0x2a, 0xb6, 0x22,
0xe6, 0x24, 0xa4, 0x76, 0x9f, 0xcb, 0x0b, 0x00,
0x00, 0x22, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x42, 0x00, 0x20, 0x04, 0x42, 0x20,
0x04, 0x00, 0x42, 0x20, 0x04, 0x00, 0x00, 0x48,
0x80, 0x04, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xef, 0x3f, 0x0c, 0x82, 0x80, 0x81,
0x22, 0x02, 0xa0, 0x21, 0x00, 0x00, 0x00, 0x18,
0x22, 0x00, 0x20, 0xa2, 0x14, 0x22, 0x42, 0x22,
0x00, 0x20, 0x02, 0x22, 0x1a, 0x02, 0x12, 0x80,
0x02, 0x00, 0x00, 0x00, 0x00, 0x20, 0x02, 0x80,
0x04, 0x48, 0x42, 0x80, 0x82, 0x04, 0x48, 0x42,
0x26, 0xf1, 0xf2, 0xbf, 0xe0, 0x22, 0xf5, 0x11,
0x24, 0x87, 0x22, 0x1f, 0x41, 0xb2, 0x48, 0xf1,
0x11, 0x24, 0xa3, 0xd6, 0x41, 0xb2, 0x6a, 0xd1,
0x41, 0xb2, 0x6a, 0x99, 0x21, 0xab, 0x94, 0x53,
0xb1, 0x4a, 0x39, 0x24, 0xaf, 0x14, 0x3b, 0x34,
0x2f, 0x14, 0x7b, 0x34, 0xd8, 0x12, 0xf9, 0x34,
0x48, 0x1c, 0xfb, 0x24, 0x4a, 0x1c, 0xfa, 0x24,
0x4a, 0x1e, 0x21, 0x4f, 0xa2, 0xe4, 0x19, 0xe2,
0xa2, 0x65, 0x59, 0xac, 0xe5, 0x49, 0xc2, 0x5a,
0x1f, 0x49, 0xc2, 0x42, 0x1f, 0x49, 0x52, 0x28,
0x1f, 0x49, 0x32, 0x68, 0x1f, 0x49, 0x32, 0x4a,
0x1f, 0x48, 0xb2, 0x4a, 0xd1, 0x41, 0xb2, 0x6a,
0x99, 0x21, 0xab, 0x94, 0x51, 0xab, 0x94, 0x43,
0xb2, 0x4a, 0x3b, 0x24, 0x2b, 0x94, 0x47, 0x82,
0x2b, 0x94, 0x4f, 0x82, 0xa4, 0x94, 0x4f, 0xa2,
0xf4, 0xd4, 0x6e, 0xc0, 0x4a, 0x1f, 0x41, 0x56,
0x28, 0x1f, 0x41, 0x36, 0x48, 0x1d, 0x24, 0xa3,
0x54, 0x41, 0x2b, 0x14, 0x15, 0xdc, 0x4a, 0x59,
0x41, 0xab, 0xb4, 0x51, 0xab, 0xa4, 0x43, 0xf2,
0x4a, 0x91, 0x41, 0x2f, 0x14, 0x78, 0x24, 0xd8,
0x12, 0xf9, 0x26, 0x48, 0x2d, 0x81, 0x4d, 0x5a,
0x1c, 0xf8, 0x24, 0xda, 0x1e, 0x81, 0x4d, 0x4a,
0x96, 0xe1, 0xa2, 0x64, 0x58, 0xb4, 0x9e, 0x25,
0xac, 0xf4, 0x91, 0x2c, 0xac, 0xf4, 0x91, 0x44,
0x85, 0xf2, 0x91, 0x44, 0x83, 0xf4, 0x91, 0x24,
0xa3, 0xf4, 0x81, 0x24, 0xab, 0x14, 0x1d, 0x24,
0xad, 0x94, 0x1d, 0x24, 0xab, 0xb4, 0x51, 0xab,
0xb4, 0x43, 0xb2, 0x4a, 0x39, 0x34, 0x2b, 0x84,
0x45, 0x98, 0x92, 0x67, 0x82, 0x29, 0xf9, 0x24,
0x1a, 0x87, 0x47, 0x40, 0x08, 0x48, 0x00, 0x00,
0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00,
0x21, 0x00, 0x80, 0x08, 0x00, 0x00, 0x14, 0x80,
0x41, 0x08, 0x48, 0x00, 0x00, 0x00, 0x00, 0x44,
0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0xf0, 0x5c,
0xa2, 0xc0, 0x14, 0x2a, 0x81, 0x21, 0x82, 0x21,
0x02, 0x28, 0x00, 0x80, 0x0a, 0x00, 0x00, 0x88,
0x80, 0x21, 0x04, 0x42, 0x48, 0x80, 0x02, 0x00,
0x22, 0x20, 0x22, 0x82, 0x26, 0x21, 0x02, 0x22,
0x28, 0x20, 0x24, 0x22, 0x22, 0x02, 0x00, 0x88,
0x48, 0x42, 0x48, 0x80, 0x02, 0x22, 0x28, 0x18,
0x00, 0x8f, 0xe4, 0x01, 0x30, 0x84, 0x80, 0x81,
0x02, 0x28, 0x12, 0x18, 0x82, 0x12, 0x12, 0xc0,
0x88, 0x80, 0xa7, 0x28, 0x38, 0x12, 0x88, 0xa0,
0x82, 0xa0, 0x82, 0x80, 0x04, 0x62, 0x18, 0x80,
0x22, 0x08, 0x88, 0x00, 0x28, 0x00, 0x8a, 0xa3,
0x12, 0x48, 0x20, 0xa8, 0x82, 0x20, 0x08, 0x1a,
0x08, 0xa8, 0x28, 0x20, 0x02, 0x4a, 0x28, 0x44,
0x01, 0x2f, 0xed, 0x0c, 0x16, 0xe4, 0x46, 0x21,
0xa1, 0x12, 0x32, 0x28, 0xa0, 0x12, 0x12, 0x82,
0x41, 0xa2, 0x22, 0x84, 0x80, 0xa3, 0x82, 0x1a,
0x22, 0x01, 0x2c, 0x84, 0x82, 0xa4, 0x25, 0x20,
0x0a, 0x48, 0x20, 0x22, 0x32, 0x81, 0x28, 0x8a,
0x12, 0x28, 0x22, 0x86, 0x22, 0x22, 0x28, 0xa6,
0x24, 0x00, 0x82, 0x41, 0x20, 0x22, 0x8c, 0xa4,
0xa4, 0x20, 0x22, 0x22, 0xc2, 0x42, 0x42, 0x20,
0xd1, 0xcc, 0x0c, 0x00, 0x00, 0x00, 0x22, 0x00,
0x80, 0x21, 0x01, 0x82, 0x80, 0x04, 0x82, 0x20,
0x09, 0x82, 0x20, 0x08, 0x48, 0x20, 0x22, 0x01,
0x20, 0x02, 0x48, 0x12, 0x00, 0x00, 0x2a, 0x21,
0x01, 0x28, 0x2a, 0x88, 0x02, 0x82, 0x88, 0x12,
0x00, 0x28, 0x00, 0x80, 0x2a, 0x01, 0xf0, 0x4a,
0xcb, 0x00, 0x00, 0x12, 0x18, 0x90, 0x18, 0x00,
0x28, 0x00, 0x00, 0x40, 0x28, 0x04, 0x80, 0x04,
0x00, 0x20, 0x44, 0x02, 0x20, 0x88, 0x81, 0x02,
0x12, 0x24, 0x00, 0x00, 0x20, 0x02, 0x22, 0x68,
0x62, 0x00, 0x80, 0x01, 0x42, 0x00, 0xa0, 0x24,
0x32, 0x00, 0x00, 0x4d, 0xbd, 0x00, 0xa0, 0x12,
0x28, 0x28, 0x80, 0x32, 0x18, 0x28, 0x12, 0x1a,
0x62, 0x81, 0xc0, 0x18, 0x88, 0x38, 0x60, 0x84,
0xe2, 0x12, 0x82, 0x20, 0x02, 0x80, 0x22, 0x22,
0x82, 0x02, 0x48, 0x22, 0x2a, 0x24, 0x07, 0x12,
0x18, 0x88, 0x80, 0x04, 0x8c, 0x01, 0x80, 0x8a,
0x28, 0x2c, 0x08, 0x80, 0xa8, 0x42, 0x13, 0x08,
0x80, 0x22, 0x24, 0x06, 0x9f, 0x48, 0x0f, 0x00,
0x18, 0xa0, 0x21, 0xa0, 0x21, 0x18, 0x28, 0x18,
0x28, 0x00, 0x00, 0x84, 0x80, 0x04, 0x42, 0x82,
0x80, 0x02, 0x00, 0x21, 0x80, 0x82, 0xa1, 0x42,
0x20, 0x04, 0x00, 0x18, 0x00, 0x00, 0x8c, 0x22,
0x82, 0xa2, 0x28, 0x88, 0x00, 0x00, 0x80, 0x04,
0x28, 0x22, 0x22, 0x20, 0x02, 0x6f, 0x21, 0x0d,
0x00, 0x28, 0x2a, 0x01, 0x10, 0x48, 0x08, 0x22,
0x12, 0x8c, 0x01, 0x8c, 0x21, 0x88, 0x23, 0x14,
0xa8, 0x4a, 0x18, 0x00, 0x00, 0x48, 0x28, 0x22,
0x22, 0x88, 0x00, 0x22, 0x32, 0x1a, 0x16, 0x22,
0x01, 0x82, 0x80, 0x06, 0x12, 0x48, 0x42, 0x00,
0x4a, 0x88, 0x09, 0x42, 0x82, 0x28, 0x1c, 0x28,
0x24, 0x01, 0x42, 0x42, 0xf0, 0x5d, 0x19, 0x80,
0xa3, 0x14, 0x12, 0x22, 0x84, 0xca, 0x01, 0x80,
0x02, 0x28, 0x22, 0x28, 0x84, 0x42, 0x58, 0x80,
0x91, 0x18, 0xa0, 0x24, 0x28, 0x22, 0x4a, 0x81,
0x06, 0x12, 0xa0, 0x42, 0x80, 0x41, 0x08, 0x80,
0x03, 0x42, 0x00, 0x22, 0x80, 0x08, 0x00, 0x86,
0x81, 0x82, 0x92, 0x88, 0x20, 0x24, 0x04, 0x2a,
0xa4, 0x24, 0x00, 0xc0, 0x18, 0x4f, 0xea, 0x08,
0x48, 0x42, 0x00, 0x00, 0x22, 0x2a, 0x01, 0x88,
0x00, 0x28, 0x82, 0x84, 0x28, 0x81, 0x22, 0x80,
0x06, 0x00, 0x8a, 0x01, 0x00, 0x22, 0x00, 0x82,
0x20, 0x82, 0x02, 0x42, 0x42, 0x20, 0x08, 0x00,
0x00, 0x12, 0x48, 0xa0, 0x28, 0x00, 0x22, 0x80,
0x0a, 0x00, 0x80, 0x81, 0xd1, 0x21, 0x0a, 0x00,
0x80, 0x01, 0x82, 0x00, 0x20, 0x02, 0x12, 0x12,
0x48, 0x30, 0x84, 0x00, 0x00, 0x00, 0x00, 0x41,
0x20, 0x02, 0x00, 0x80, 0x04, 0x4c, 0x04, 0x21,
0x00, 0x2a, 0x01, 0x00, 0x20, 0x08, 0x00, 0x00,
0x00, 0x88, 0x00, 0x00, 0x4a, 0x08, 0x42, 0x2f,
0xfe, 0x07, 0x52, 0x18, 0x18, 0x22, 0x00, 0x28,
0x38, 0x20, 0x0a, 0x80, 0x21, 0x44, 0xb8, 0x24,
0x09, 0x28, 0x12, 0x28, 0x2a, 0x24, 0x02, 0x88,
0x49, 0x02, 0x2a, 0x81, 0x82, 0x06, 0x82, 0x81,
0x60, 0x46, 0x80, 0x04, 0xa0, 0x28, 0x00, 0x00,
0x88, 0x18, 0x8a, 0x24, 0x02, 0x84, 0x20, 0x82,
0x24, 0x88, 0x84, 0x06, 0x42, 0x12, 0x81, 0xdf,
0x1f, 0x06, 0x22, 0x00, 0x12, 0x81, 0x1a, 0x04,
0x20, 0x02, 0x22, 0x1a, 0x02, 0x86, 0x28, 0x84,
0x14, 0x28, 0x11, 0x88, 0x04, 0x80, 0x82, 0x24,
0x04, 0x00, 0x00, 0x12, 0x48, 0x28, 0xa0, 0x21,
0x21, 0x00, 0x12, 0x22, 0x80, 0x08, 0x00, 0x14,
0x80, 0x28, 0x08, 0x48, 0x88, 0x22, 0x28, 0x00,
0x82, 0x80, 0xe4, 0x1a, 0x0b, 0x28, 0x12, 0x20,
0x04, 0x22, 0x00, 0x18, 0x00, 0x10, 0x08, 0x78,
0x00, 0x00, 0x00, 0x80, 0x01, 0x42, 0x22, 0x00,
0x00, 0x00, 0x18, 0x00, 0x00, 0x28, 0x00, 0x00,
0x00, 0x48, 0x48, 0x20, 0x08, 0x2a, 0x84, 0x04,
0x00, 0x28, 0x80, 0x02, 0x2a, 0xf4, 0x8e, 0x2d,
0x00, 0x28, 0x28, 0x10, 0x48, 0x88, 0x62, 0x82,
0x20, 0x02, 0x00, 0x00, 0x28, 0x22, 0x20, 0x03,
0x00, 0x42, 0x00, 0x18, 0x42, 0x48, 0x20, 0xa2,
0x14, 0x48, 0x28, 0x20, 0x02, 0x00, 0x00, 0x12,
0x22, 0x1a, 0x02, 0x20, 0x83, 0x28, 0x24, 0x01,
0x00, 0x32, 0x48, 0x80, 0x0c, 0x48, 0xe0, 0x63,
0x0e, 0x40, 0x88, 0x03, 0x10, 0x18, 0x88, 0x01,
0x00, 0x80, 0x02, 0x00, 0x20, 0x02, 0x00, 0x18,
0x48, 0x00, 0x80, 0x04, 0x48, 0x12, 0x48, 0x22,
0x80, 0x01, 0x22, 0x28, 0x22, 0x1a, 0x02, 0x00,
0x20, 0x02, 0x80, 0x02, 0x42, 0x22, 0x80, 0x02,
0x20, 0x04, 0x48, 0x28, 0xe0, 0x97, 0x0f, 0x8c,
0x02, 0x20, 0x02, 0x12, 0x10, 0x88, 0x02, 0x80,
0x02, 0x40, 0x08, 0x8c, 0x01, 0x28, 0x80, 0x21,
0x02, 0x80, 0x81, 0x04, 0x00, 0x00, 0x00, 0xa0,
0x14, 0x00, 0x00, 0x48, 0x80, 0x02, 0xa0, 0x42,
0xa8, 0x00, 0x00, 0xa0, 0x81, 0x00, 0x80, 0x22,
0xa1, 0x14, 0xf0, 0x45, 0xb8, 0x20, 0x08, 0x00,
0x20, 0x21, 0x82, 0x02, 0x00, 0x18, 0x81, 0x00,
0x20, 0x82, 0x82, 0x01, 0x00, 0x00, 0x80, 0x01,
0x00, 0x00, 0x00, 0x22, 0x22, 0x00, 0x20, 0x04,
0x18, 0x00, 0x00, 0x88, 0x18, 0x8a, 0x02, 0x00,
0x00, 0x20, 0x02, 0x00, 0x14, 0x6f, 0x46, 0x0b,
0x12, 0x48, 0x8c, 0x24, 0x05, 0x00, 0x00, 0x00,
0x80, 0xa1, 0x21, 0x32, 0x18, 0x20, 0x01, 0x1a,
0x02, 0x00, 0x28, 0x58, 0x00, 0x20, 0x21, 0x22,
0x81, 0x21, 0x05, 0x80, 0x21, 0x02, 0x18, 0x12,
0x20, 0x81, 0x04, 0x20, 0x04, 0x80, 0x82, 0x28,
0x04, 0x00, 0x80, 0x24, 0x02, 0xe0, 0x6b, 0x0e,
0x84, 0x28, 0x00, 0x00, 0x16, 0x08, 0x00, 0x00,
0x40, 0x08, 0x00, 0x84, 0x00, 0x4a, 0x21, 0x04,
0x18, 0x18, 0x00, 0x42, 0x00, 0x20, 0x04, 0x42,
0x00, 0x00, 0x00, 0x00, 0x12, 0xa0, 0x81, 0x00,
0x48, 0x12, 0x00, 0x58, 0x1a, 0x84, 0x04, 0x12,
0x00, 0xf0, 0xd4, 0xa4, 0x20, 0x41, 0x88, 0x81,
0x42, 0x08, 0x12, 0x10, 0x28, 0x02, 0x20, 0x92,
0x18, 0xa0, 0x12, 0x80, 0x01, 0x18, 0x00, 0x00,
0x00, 0x80, 0x02, 0x00, 0x32, 0x22, 0x22, 0x58,
0x32, 0x00, 0x42, 0x00, 0x20, 0xa2, 0x42, 0x22,
0x20, 0x82, 0x01, 0x00, 0x00, 0x82, 0x80, 0x02,
0x28, 0x28, 0x1f, 0x55, 0x06, 0x84, 0x12, 0x48,
0x20, 0x81, 0x02, 0x12, 0x2a, 0x01, 0xc0, 0x14,
0x80, 0x02, 0x00, 0x84, 0x00, 0x48, 0x12, 0x29,
0x81, 0x84, 0x21, 0x84, 0x08, 0x42, 0x00, 0xc0,
0x41, 0x00, 0x46, 0x08, 0x48, 0x22, 0x28, 0x28,
0x48, 0x42, 0x12, 0x20, 0x41, 0x04, 0x28, 0x1a,
0x24, 0x02, 0x62, 0x12, 0x1a, 0x04, 0x42, 0x21,
0x48, 0xbf, 0x5f, 0x0e, 0x2a, 0xa2, 0x28, 0x81,
0x12, 0x81, 0x38, 0x1a, 0x33, 0x28, 0x8b, 0x23,
0x00, 0x12, 0x8b, 0x12, 0x81, 0xa0, 0x11, 0x84,
0x28, 0x18, 0x22, 0x5a, 0x05, 0x12, 0x48, 0x42,
0x4a, 0x81, 0x24, 0x22, 0xa5, 0x21, 0x48, 0xa0,
0x57, 0x1a, 0xa6, 0x44, 0x80, 0x22, 0x22, 0xa5,
0x41, 0x1a, 0x22, 0xa7, 0x56, 0x80, 0xa2, 0x41,
0x18, 0x20, 0xa5, 0x82, 0x48, 0x18, 0x4a, 0x84,
0xa8, 0x42, 0x8a, 0x05, 0x1e, 0x41, 0xf0, 0x7a,
0xeb, 0xa0, 0x11, 0x62, 0x28, 0x4a, 0x82, 0x11,
0x48, 0x88, 0x03, 0x2a, 0x02, 0x00, 0x8c, 0xc1,
0x28, 0x00, 0x8f, 0x82, 0x21, 0x83, 0x01, 0x78,
0x20, 0x02, 0x48, 0x20, 0x04, 0x22, 0x12, 0x12,
0x28, 0xa0, 0x31, 0x1a, 0x24, 0x02, 0x48, 0x22,
0x18, 0x28, 0x12, 0x4a, 0x81, 0xa9, 0x1a, 0x22,
0x18, 0x18, 0x4a, 0x23, 0x22, 0xaf, 0x13, 0x4a,
0x21, 0x21, 0x82, 0x04, 0x42, 0xbf, 0x5c, 0x0f,
0xf0, 0x18, 0x18, 0x3a, 0xa1, 0x42, 0x84, 0x36,
0x38, 0x28, 0x16, 0x88, 0x01, 0xa0, 0x12, 0x8c,
0x22, 0xa1, 0x53, 0x2a, 0xa2, 0x23, 0x12, 0x28,
0x12, 0x20, 0xa1, 0x54, 0x12, 0x48, 0x1a, 0x22,
0x84, 0x84, 0x04, 0x4a, 0xa1, 0x76, 0x20, 0x22,
0xa2, 0x32, 0x80, 0xa2, 0x32, 0x00, 0x80, 0xa2,
0x22, 0x6a, 0xa4, 0xa4, 0x8a, 0xa2, 0xce, 0x80,
0x24, 0x04, 0x28, 0x48, 0x4a, 0xa2, 0x24, 0x6a,
0xa3, 0x26, 0x2a, 0x76, 0x4b, 0x05, 0x80, 0x01,
0x60, 0x88, 0x18, 0x00, 0x00, 0x00, 0x00, 0x12,
0x00, 0x20, 0x01, 0x12, 0x42, 0x20, 0x04, 0x00,
0x42, 0x20, 0x84, 0x01, 0x22, 0xa0, 0x12, 0x42,
0x22, 0x20, 0x02, 0x80, 0x24, 0xa2, 0x41, 0x22,
0x82, 0x22, 0x82, 0x20, 0x01, 0x48, 0x20, 0xc1,
0x21, 0x80, 0x02, 0x28, 0x1f, 0x24, 0x09, 0x28,
0x28, 0xf0, 0x38, 0x18, 0x87, 0x81, 0x3a, 0x52,
0x88, 0x32, 0x8f, 0x81, 0xa1, 0x22, 0x00, 0x18,
0x84, 0x4a, 0xa4, 0x56, 0x18, 0x28, 0xa0, 0x22,
0x20, 0xa1, 0x55, 0x2a, 0xa6, 0x44, 0x48, 0x4a,
0xa4, 0x66, 0x1a, 0xa5, 0x62, 0x42, 0x42, 0x1a,
0xa1, 0x55, 0x12, 0x12, 0x00, 0x28, 0x28, 0x3a,
0x23, 0x84, 0xa2, 0x54, 0x5a, 0xa5, 0xdd, 0xa8,
0x1a, 0x81, 0xa1, 0x9c, 0x7a, 0x07, 0x3a, 0xe2,
0x1d, 0xac, 0x44, 0x18, 0x1a, 0xa5, 0x11, 0x46,
0xe1, 0xd3, 0x09, 0x12, 0x3e, 0x78, 0x38, 0x8f,
0x83, 0x73, 0x18, 0xa8, 0x23, 0x8d, 0x38, 0x8f,
0x83, 0xf3, 0x18, 0x38, 0x28, 0x45, 0xa4, 0x11,
0x4c, 0x23, 0xa1, 0x55, 0x6a, 0x96, 0x28, 0x8b,
0x23, 0x3a, 0xa1, 0x23, 0x1e, 0x12, 0x29, 0xa4,
0x55, 0x2b, 0x72, 0x4a, 0xa4, 0xcc, 0x42, 0x6a,
0xae, 0x11, 0x3a, 0xa3, 0x15, 0x1f, 0x16, 0xa5,
0x33, 0x1c, 0xf6, 0x28, 0x78, 0x3a, 0xe1, 0x82,
0x86, 0xa2, 0x71, 0x28, 0x2a, 0xa2, 0x64, 0x28,
0x3a, 0xa1, 0x33, 0x4f, 0x4d, 0xaf, 0xb1, 0x5e,
0x74, 0xa0, 0xdc, 0x7a, 0xa7, 0x26, 0x2a, 0xe2,
0x19, 0xa8, 0x66, 0x6e, 0x12, 0x2b, 0x66, 0x68,
0x2b, 0x76, 0x87, 0xd7, 0xa0, 0x31, 0x1a, 0x26,
0xf1, 0x38, 0x18, 0x1a, 0xa8, 0x33, 0x81, 0x83,
0xf2, 0x18, 0x18, 0x2a, 0xe2, 0x42, 0xa2, 0x22,
0x38, 0x8c, 0x81, 0xa1, 0x12, 0x8d, 0x18, 0x8d,
0x38, 0x18, 0x2a, 0x83, 0xb1, 0x32, 0xa3, 0x77,
0x6a, 0xa7, 0x44, 0x6a, 0xae, 0x66, 0x6a, 0xa6,
0x51, 0x2a, 0xa6, 0x45, 0x5e, 0x61, 0x28, 0x7a,
0xe5, 0x82, 0x84, 0x86, 0x26, 0xa2, 0x33, 0x1a,
0xa3, 0x33, 0x62, 0x4a, 0xa3, 0x74, 0x4a, 0xe6,
0x46, 0xa4, 0xe4, 0xda, 0xaf, 0x55, 0xda, 0xad,
0x77, 0x1a, 0xa1, 0x33, 0xfa, 0xaf, 0x64, 0x38,
0x2b, 0x53, 0x3a, 0xa1, 0x14, 0xaf, 0x64, 0x05,
0x12, 0x8b, 0x33, 0x38, 0x8f, 0x83, 0x63, 0x81,
0x3e, 0x38, 0x8d, 0x38, 0x8f, 0x83, 0xf2, 0x18,
0x38, 0x28, 0x2e, 0x24, 0x3a, 0xd3, 0x8c, 0x71,
0x18, 0xa8, 0x11, 0x3a, 0xb3, 0x18, 0xb3, 0x38,
0xa2, 0x13, 0x3a, 0xa2, 0x55, 0x2b, 0x76, 0x7e,
0x72, 0x2a, 0xa6, 0x44, 0x6a, 0xae, 0x66, 0xea,
0xa6, 0x51, 0x3a, 0xa7, 0x15, 0x6e, 0x51, 0x2a,
0x92, 0x61, 0x2e, 0x78, 0x3a, 0xb5, 0x28, 0x82,
0xa2, 0x35, 0x28, 0x3a, 0xa3, 0x77, 0x5a, 0xa7,
0x57, 0xea, 0xea, 0x4f, 0xaf, 0xf5, 0x4b, 0xdd,
0xa0, 0xdd, 0x7a, 0xa7, 0x77, 0x6a, 0xa6, 0xbf,
0x1b, 0x66, 0x6a, 0xb1, 0x72, 0xe7, 0x21, 0xe7,
0x16, 0xf6, 0x39, 0xed, 0x00, 0x00, 0x00, 0x00,
0x16, 0x08, 0x00, 0x12, 0x40, 0x08, 0x12, 0x00,
0x00, 0x20, 0x01, 0x00, 0x00, 0x00, 0x18, 0x42,
0x22, 0x80, 0x01, 0x22, 0x00, 0x20, 0x02, 0x00,
0x00, 0x20, 0x01, 0x48, 0x00, 0x28, 0x00, 0x00,
0x80, 0x02, 0x6f, 0x3b, 0x01, 0x18, 0x1a, 0x22,
0x22, 0x91, 0x18, 0x80, 0xa1, 0x21, 0x80, 0x02,
0x80, 0x01, 0x18, 0x32, 0x20, 0x82, 0x01, 0x18,
0x12, 0x00, 0x42, 0x48, 0x80, 0x04, 0x20, 0x01,
0xa0, 0x12, 0x12, 0x00, 0x22, 0x12, 0x22, 0x12,
0x2a, 0x01, 0x22, 0x92, 0x62, 0xa0, 0x84, 0x20,
0xa4, 0x42, 0x20, 0xa2, 0x24, 0x80, 0x82, 0x24,
0x04, 0x4f, 0x49, 0x06, 0x2e, 0x52, 0x1f, 0x41,
0xf2, 0x28, 0x12, 0x1f, 0x41, 0x32, 0x68, 0x1f,
0xc1, 0xb2, 0x6a, 0xd1, 0x41, 0xb2, 0x6a, 0xd1,
0x41, 0xb2, 0x4a, 0x99, 0x21, 0xab, 0x94, 0x53,
0xb1, 0x4a, 0x79, 0x24, 0xf8, 0x4a, 0xb1, 0x43,
0xf3, 0x42, 0xb1, 0x47, 0x83, 0x2d, 0x91, 0x4f,
0x82, 0xc4, 0x91, 0x4f, 0xa2, 0xc4, 0x81, 0x4f,
0xa2, 0x64, 0x15, 0x4f, 0xa2, 0x64, 0x19, 0x2e,
0x4a, 0x9e, 0x25, 0x2e, 0x5a, 0x9e, 0x24, 0x2e,
0x4a, 0x1f, 0x49, 0xe2, 0x22, 0xf5, 0x91, 0x24,
0x87, 0x22, 0x1f, 0x49, 0x32, 0x48, 0x1f, 0x49,
0x36, 0x6a, 0x1f, 0x48, 0xb2, 0x6a, 0xf1, 0x81,
0x24, 0xab, 0x96, 0x1b, 0x28, 0xab, 0x94, 0x51,
0xab, 0x94, 0x43, 0xba, 0x4a, 0x39, 0x24, 0x2b,
0x94, 0x47, 0x8a, 0x2b, 0xb4, 0x4f, 0x82, 0xa4,
0xb4, 0x4f, 0xa2, 0xf4, 0xbc, 0x63, 0xe0, 0x22,
0xd4, 0xc1, 0x64, 0x22, 0x1f, 0x41, 0x34, 0x68,
0x15, 0x34, 0x6a, 0x15, 0xb4, 0x62, 0x51, 0x41,
0xaf, 0x46, 0xd9, 0x41, 0xb2, 0x6a, 0x99, 0x25,
0x2b, 0x84, 0x41, 0x2f, 0x14, 0x1b, 0xf4, 0x42,
0xa1, 0x47, 0x82, 0x2d, 0xa1, 0x67, 0x82, 0x2d,
0xb1, 0x4f, 0xa2, 0xc1, 0xa1, 0x4f, 0xa2, 0xed,
0x11, 0xfa, 0x24, 0x4a, 0x9e, 0x21, 0xa4, 0x8e,
0x25, 0xbc, 0x64, 0x59, 0xa4, 0x1f, 0xc8, 0x42,
0xfa, 0x91, 0x44, 0x85, 0xf2, 0x91, 0x64, 0x81,
0x17, 0x49, 0xa1, 0x1f, 0x48, 0x12, 0x5a, 0x41,
0xaf, 0x44, 0xd1, 0x41, 0xb2, 0x4a, 0x1b, 0x95,
0xaa, 0x43, 0x92, 0x8a, 0x41, 0x2b, 0x84, 0x47,
0x82, 0x2b, 0x84, 0x65, 0xb8, 0x42, 0xf8, 0x24,
0x1a, 0x9f, 0xa5, 0x0c, 0x20, 0x08, 0x00, 0x00,
0x00, 0x00, 0x44, 0x80, 0x02, 0x14, 0x00, 0x00,
0x00, 0x21, 0x00, 0x80, 0x08, 0x00, 0x00, 0x14,
0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44,
0x00, 0x00, 0x00, 0x80, 0x02, 0x50, 0x92, 0xf0,
0x4c, 0x5c, 0x20, 0x81, 0x01, 0x12, 0x18, 0x81,
0x20, 0x83, 0x21, 0x22, 0x01, 0x20, 0x41, 0x08,
0x20, 0x04, 0x1a, 0x82, 0x21, 0x02, 0x6a, 0x08,
0x80, 0x86, 0x02, 0xa2, 0x18, 0x12, 0x00, 0x1a,
0x04, 0x80, 0xa8, 0x21, 0x00, 0x00, 0x68, 0x80,
0xa2, 0x81, 0x00, 0x42, 0x32, 0x48, 0x48, 0x22,
0x28, 0x22, 0x20, 0x04, 0xcf, 0x73, 0x07, 0x20,
0x0a, 0x00, 0x32, 0x2a, 0x01, 0x84, 0x82, 0x20,
0x42, 0xb8, 0x48, 0x08, 0x82, 0x12, 0x10, 0xa8,
0x84, 0x48, 0x00, 0x00, 0x28, 0x80, 0xa1, 0x43,
0x00, 0x28, 0x2a, 0x21, 0x22, 0x22, 0x01, 0x22,
0x20, 0x2a, 0x03, 0x28, 0x20, 0x22, 0x21, 0x02,
0x42, 0x80, 0x4c, 0x01, 0xc8, 0x42, 0x48, 0x6a,
0x48, 0x81, 0xe8, 0x52, 0x01, 0x12, 0xd2, 0x20,
0x21, 0x61, 0x82, 0x1a, 0x82, 0x81, 0xa1, 0x28,
0x41, 0x22, 0x84, 0x46, 0x98, 0x28, 0x82, 0x18,
0x48, 0x84, 0xc8, 0x46, 0x02, 0xa0, 0xa1, 0xa0,
0x28, 0x48, 0x22, 0x12, 0x82, 0x18, 0x19, 0xa1,
0x12, 0x28, 0x8b, 0x16, 0x18, 0x42, 0x2a, 0xa8,
0x12, 0x8a, 0xa2, 0x12, 0x00, 0x22, 0x30, 0x34,
0x2a, 0x28, 0x82, 0x84, 0xa4, 0xa4, 0x48, 0x42,
0xa8, 0x42, 0x4e, 0x22, 0x4a, 0x68, 0x14, 0x1a,
0xf8, 0x47, 0xe4, 0x00, 0x28, 0x00, 0x20, 0x01,
0x28, 0x81, 0x80, 0x01, 0x20, 0x09, 0x00, 0x00,
0x32, 0x18, 0x22, 0x80, 0x04, 0x80, 0x82, 0xa1,
0x24, 0x22, 0x20, 0x02, 0x00, 0x00, 0x00, 0x00,
0x80, 0x22, 0x84, 0x02, 0x12, 0x00, 0x20, 0x11,
0x01, 0x42, 0x22, 0x20, 0x02, 0xf0, 0xdc, 0x9c,
0x00, 0x28, 0x00, 0x80, 0x82, 0x21, 0x01, 0x80,
0x08, 0x18, 0x00, 0x84, 0x00, 0x00, 0x42, 0x00,
0x43, 0x02, 0x00, 0x00, 0x00, 0x18, 0x42, 0x00,
0x22, 0x80, 0x41, 0x04, 0x00, 0x20, 0x22, 0x21,
0x04, 0x00, 0x80, 0x04, 0x12, 0x20, 0x02, 0x48,
0x42, 0x22, 0x2f, 0x32, 0x0a, 0x22, 0x00, 0x20,
0x01, 0x28, 0x80, 0xa2, 0x12, 0x20, 0x03, 0x18,
0x20, 0x81, 0xa8, 0x14, 0x80, 0x04, 0x52, 0x00,
0x14, 0x28, 0x22, 0x58, 0xc2, 0x18, 0x4a, 0x22,
0x02, 0x8c, 0x02, 0x00, 0x00, 0x8b, 0x12, 0x22,
0x12, 0x00, 0x1b, 0x48, 0x22, 0x00, 0x11, 0x00,
0x60, 0x12, 0x22, 0x20, 0x42, 0x01, 0x42, 0x4f,
0xd8, 0x09, 0x28, 0x28, 0x00, 0x80, 0x22, 0x01,
0x28, 0x18, 0x88, 0x28, 0x20, 0x01, 0x20, 0x88,
0x04, 0x80, 0x84, 0x04, 0x10, 0x81, 0x02, 0x4a,
0x21, 0x08, 0x22, 0x28, 0x10, 0x08, 0x28, 0x00,
0x41, 0x8c, 0x81, 0x02, 0x80, 0xb2, 0x41, 0xa9,
0x24, 0x00, 0x11, 0x20, 0x04, 0x2e, 0x11, 0x28,
0x22, 0x22, 0x14, 0x80, 0xb6, 0xc1, 0x02, 0x00,
0x00, 0x18, 0x20, 0x22, 0x01, 0x28, 0x80, 0x21,
0x01, 0x60, 0x81, 0x80, 0x01, 0x48, 0x20, 0x01,
0x26, 0x04, 0x20, 0x02, 0x42, 0x12, 0x48, 0x18,
0x42, 0x28, 0x00, 0x20, 0x01, 0x22, 0x80, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x24,
0x04, 0x97, 0xcb, 0x00, 0x20, 0x82, 0x21, 0x01,
0x80, 0x01, 0x42, 0x40, 0x08, 0x30, 0x14, 0x00,
0x00, 0x20, 0x04, 0x80, 0x44, 0x88, 0x02, 0x00,
0x43, 0x04, 0x00, 0x20, 0x02, 0x80, 0x02, 0x00,
0x80, 0x01, 0x42, 0x48, 0x80, 0x12, 0x08, 0x10,
0x28, 0x0c, 0x62, 0x22, 0x42, 0x22, 0x4a, 0xf1,
0x7a, 0xf9, 0x20, 0x22, 0x04, 0x00, 0x22, 0x30,
0x88, 0x28, 0x28, 0x88, 0x80, 0x23, 0x08, 0x48,
0x84, 0xa0, 0x81, 0x48, 0x00, 0x12, 0x18, 0x28,
0x00, 0x22, 0x22, 0x00, 0x48, 0x28, 0x1a, 0x04,
0x20, 0x06, 0x1a, 0x08, 0x18, 0x00, 0x20, 0x22,
0x08, 0xa8, 0x88, 0xa0, 0xc2, 0x18, 0x20, 0x0c,
0x00, 0x48, 0x38, 0x8f, 0x31, 0x03, 0x12, 0x18,
0x00, 0x00, 0x20, 0x08, 0x11, 0x52, 0x00, 0xa4,
0x20, 0x08, 0x00, 0x18, 0x22, 0x88, 0x48, 0x00,
0xa0, 0x41, 0x00, 0x20, 0xa2, 0x21, 0x80, 0x88,
0x91, 0x92, 0x00, 0x80, 0x06, 0x28, 0x28, 0x82,
0x00, 0x10, 0x08, 0x00, 0x00, 0x18, 0x00, 0x8a,
0x02, 0xf0, 0xc7, 0x6e, 0x80, 0x81, 0x01, 0x00,
0x28, 0x80, 0x01, 0x1b, 0x24, 0x42, 0x84, 0x12,
0x89, 0x28, 0x81, 0x18, 0x08, 0x92, 0x48, 0x2a,
0x84, 0x88, 0x25, 0x24, 0x02, 0x42, 0x28, 0x60,
0x44, 0x20, 0x84, 0xa2, 0x48, 0x2c, 0x81, 0x01,
0x28, 0x98, 0x48, 0x18, 0x20, 0x81, 0x28, 0xa2,
0x48, 0x40, 0x48, 0x08, 0x2a, 0x6c, 0x81, 0x4a,
0x28, 0x29, 0x22, 0xa2, 0x28, 0x62, 0x4a, 0xf2,
0x1f, 0xf5, 0x20, 0x02, 0x22, 0x12, 0x18, 0x00,
0x84, 0x22, 0x80, 0x09, 0x00, 0x25, 0x84, 0x04,
0x00, 0x12, 0x00, 0x00, 0x81, 0x22, 0x12, 0x80,
0x02, 0x28, 0x2a, 0x01, 0x18, 0x28, 0x88, 0x28,
0x00, 0x22, 0x20, 0x82, 0x02, 0x48, 0x00, 0x88,
0x82, 0x00, 0x00, 0x42, 0x48, 0x80, 0x04, 0xf0,
0x37, 0x37, 0x00, 0x48, 0x28, 0x62, 0x80, 0x02,
0x00, 0x38, 0x80, 0x82, 0x02, 0x00, 0x20, 0x23,
0x23, 0x02, 0x20, 0x22, 0x22, 0x24, 0x02, 0x22,
0x00, 0x42, 0x48, 0x4a, 0xa1, 0x21, 0x42, 0x68,
0x20, 0x02, 0x20, 0x24, 0x04, 0x20, 0x04, 0x20,
0x84, 0x24, 0x82, 0x02, 0x20, 0x02, 0x28, 0x48,
0x80, 0xf4, 0xeb, 0x99, 0x00, 0x00, 0x00, 0xc0,
0x18, 0x40, 0x08, 0x18, 0x18, 0x10, 0x08, 0x20,
0x01, 0x00, 0x00, 0x00, 0x18, 0x48, 0x00, 0x00,
0x18, 0x12, 0x20, 0x04, 0x00, 0x00, 0x42, 0x00,
0x28, 0x42, 0xa0, 0x41, 0x00, 0x00, 0x80, 0x04,
0x14, 0x40, 0x01, 0x1a, 0x02, 0xaf, 0x35, 0x06,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a,
0x02, 0x84, 0x00, 0x00, 0x00, 0x12, 0x00, 0x12,
0x80, 0x01, 0x00, 0x22, 0x00, 0x80, 0x01, 0x48,
0x00, 0x00, 0x20, 0x02, 0x20, 0x02, 0x00, 0x20,
0x02, 0x00, 0x00, 0x12, 0x8f, 0x1f, 0x07, 0x20,
0x01, 0x12, 0x20, 0x01, 0x20, 0x01, 0x00, 0x18,
0x00, 0x18, 0x00, 0x00, 0x22, 0x22, 0x00, 0x42,
0x00, 0x00, 0x42, 0x80, 0x02, 0x80, 0x02, 0x28,
0x28, 0x22, 0x28, 0x28, 0x00, 0x28, 0x00, 0x80,
0x81, 0x02, 0x30, 0x21, 0x20, 0x22, 0x02, 0x22,
0x20, 0xf2, 0x1e, 0xb2, 0x20, 0x01, 0x12, 0x20,
0x21, 0x11, 0x08, 0x20, 0x92, 0x48, 0x80, 0x01,
0x00, 0x10, 0x28, 0x01, 0x00, 0x20, 0x02, 0x18,
0x20, 0x22, 0x01, 0x20, 0x04, 0x00, 0x28, 0x00,
0x28, 0x00, 0x00, 0x20, 0x04, 0x22, 0x58, 0x20,
0x22, 0x02, 0x00, 0x20, 0x22, 0x02, 0x12, 0x6f,
0x25, 0x03, 0x10, 0x08, 0x00, 0x81, 0x12, 0x12,
0x18, 0x00, 0x1a, 0x02, 0x12, 0x89, 0x01, 0x20,
0x01, 0x00, 0x00, 0x00, 0x00, 0x18, 0x42, 0x80,
0x84, 0xa1, 0x21, 0x18, 0x42, 0x48, 0x80, 0x05,
0x80, 0xa2, 0x42, 0x00, 0x00, 0x42, 0x80, 0x05,
0x18, 0x00, 0x20, 0x04, 0x42, 0x22, 0x48, 0xbf,
0x85, 0x08, 0x80, 0x01, 0x18, 0x81, 0x00, 0x40,
0x48, 0x08, 0x10, 0xc8, 0x28, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00,
0x00, 0x48, 0x00, 0x48, 0x20, 0x21, 0x81, 0x81,
0x05, 0x80, 0x22, 0x01, 0x18, 0x12, 0x48, 0x22,
0x00, 0x18, 0x28, 0xef, 0xc8, 0x05, 0x12, 0x83,
0x08, 0x80, 0x81, 0x02, 0x00, 0x00, 0x48, 0x20,
0x01, 0x40, 0x08, 0x00, 0x00, 0x00, 0x20, 0x83,
0x21, 0x21, 0x04, 0x20, 0x02, 0x48, 0x00, 0x12,
0x00, 0x62, 0x20, 0x02, 0x62, 0x00, 0x4a, 0x01,
0x00, 0x80, 0x82, 0x02, 0x00, 0x00, 0xe0, 0xfa,
0x02, 0x82, 0xa0, 0x41, 0x00, 0x00, 0x18, 0x40,
0x08, 0x44, 0x80, 0x02, 0x00, 0x84, 0x00, 0x00,
0x21, 0x80, 0x21, 0x84, 0x08, 0x00, 0x12, 0x40,
0x01, 0x40, 0x28, 0xa6, 0x41, 0x00, 0x00, 0x1a,
0x02, 0x1a, 0x02, 0x44, 0x80, 0x02, 0x12, 0x80,
0x24, 0x81, 0x24, 0x21, 0x11, 0x02, 0xca, 0x0c,
0x18, 0x83, 0xa8, 0x12, 0x32, 0x81, 0x22, 0x83,
0x21, 0xc1, 0x18, 0x87, 0x83, 0x83, 0xa1, 0x62,
0x12, 0x12, 0x00, 0x85, 0x38, 0x18, 0x28, 0x28,
0x22, 0x80, 0x82, 0x02, 0x1a, 0x02, 0x28, 0x1a,
0x85, 0x84, 0xa1, 0x26, 0x80, 0x84, 0x24, 0x24,
0x21, 0x02, 0x6a, 0x82, 0xa6, 0x66, 0x12, 0x6a,
0xa3, 0x62, 0x18, 0x48, 0x58, 0x42, 0x2a, 0x02,
0x2a, 0xa3, 0x22, 0x6a, 0x81, 0x84, 0xa1, 0x44,
0x38, 0x52, 0xdf, 0x9c, 0x0e, 0x60, 0x89, 0x00,
0x00, 0x84, 0x18, 0x81, 0x28, 0xa0, 0x11, 0x18,
0x8c, 0x81, 0x81, 0x21, 0xc1, 0x18, 0x00, 0x80,
0x02, 0x18, 0x48, 0x6a, 0x05, 0x32, 0x00, 0x20,
0xa1, 0x32, 0x32, 0x00, 0x18, 0x1a, 0x01, 0x48,
0x62, 0xa0, 0x12, 0x48, 0x42, 0x48, 0x42, 0x12,
0x00, 0x22, 0x80, 0x05, 0x62, 0x28, 0x20, 0x02,
0x2f, 0x7b, 0x01, 0x12, 0x58, 0x12, 0x58, 0x1a,
0xb1, 0x18, 0x83, 0x01, 0x12, 0x20, 0x04, 0x89,
0x12, 0x38, 0x38, 0x00, 0x28, 0x1a, 0x01, 0x00,
0x20, 0x22, 0x04, 0x1a, 0x81, 0x21, 0x24, 0xa4,
0x45, 0x58, 0x52, 0x4a, 0x21, 0xa6, 0x62, 0x6a,
0x82, 0xa2, 0x26, 0x00, 0x80, 0x02, 0x1a, 0x21,
0xa5, 0x21, 0x4a, 0x82, 0x85, 0xa1, 0x31, 0x48,
0x80, 0x82, 0x22, 0xa2, 0x23, 0x12, 0x2a, 0xb7,
0x4b, 0x0e, 0x00, 0x00, 0x84, 0x00, 0x00, 0xc0,
0x48, 0x40, 0x08, 0x84, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00,
0x00, 0x22, 0x20, 0x22, 0x21, 0x02, 0x00, 0x20,
0x81, 0x22, 0x81, 0xb2, 0x11, 0x04, 0x12, 0x00,
0xf0, 0x4a, 0x19, 0x00, 0x1a, 0x81, 0xa2, 0x31,
0x82, 0x8f, 0x82, 0x72, 0x18, 0x08, 0x1a, 0xe1,
0x82, 0xd3, 0x88, 0xf1, 0x68, 0x28, 0x8b, 0x11,
0x85, 0xf8, 0x18, 0x18, 0x85, 0x18, 0x38, 0x28,
0x3a, 0x01, 0x20, 0x22, 0xa2, 0x22, 0x4a, 0xa4,
0x22, 0x1a, 0xa1, 0x22, 0x1a, 0xa5, 0x44, 0x5a,
0x81, 0xa2, 0x31, 0x28, 0x28, 0xa0, 0x23, 0x12,
0x28, 0x4a, 0xa6, 0x24, 0x4a, 0x24, 0xa3, 0x64,
0x1a, 0xa3, 0x11, 0x2a, 0xa3, 0x44, 0x5a, 0x01,
0x32, 0x2a, 0xa4, 0x73, 0x42, 0x1b, 0x33, 0xa0,
0x54, 0x3a, 0xa1, 0x66, 0x7f, 0x21, 0x02, 0x12,
0x52, 0x1a, 0xa2, 0x65, 0x87, 0x81, 0x8f, 0x83,
0x73, 0x18, 0x88, 0x81, 0xa1, 0x32, 0xcd, 0x1c,
0x8f, 0x86, 0xf3, 0x28, 0x34, 0x89, 0xd1, 0x88,
0xf1, 0x18, 0x18, 0x8f, 0x81, 0xa1, 0x12, 0x2a,
0xa1, 0x22, 0x2e, 0x22, 0x23, 0x22, 0xb2, 0x32,
0xa3, 0x44, 0xea, 0x2e, 0xa1, 0xa3, 0x1a, 0x85,
0x24, 0x71, 0x11, 0xa1, 0x21, 0x1e, 0x21, 0x8f,
0x84, 0x86, 0xe2, 0x85, 0xa7, 0x22, 0x2a, 0xa6,
0x44, 0x4a, 0xa2, 0x64, 0x28, 0x4a, 0xa4, 0x35,
0x4f, 0x45, 0xa5, 0x76, 0x4e, 0x64, 0x5a, 0xa5,
0x11, 0x3a, 0xa1, 0x51, 0x2a, 0xa4, 0x44, 0x7a,
0x65, 0x22, 0x2b, 0x76, 0x3e, 0x11, 0x2b, 0x46,
0x9f, 0xce, 0x06, 0x1a, 0xa1, 0x51, 0x3a, 0xa3,
0x33, 0x8f, 0x83, 0xa3, 0x33, 0x8f, 0x81, 0x51,
0x88, 0x3a, 0xa3, 0x32, 0x8f, 0xc6, 0xa7, 0x26,
0x8f, 0x81, 0x13, 0xf8, 0x18, 0x18, 0x10, 0xb8,
0x28, 0xa2, 0x33, 0x2a, 0xa2, 0x22, 0x2b, 0x22,
0x2a, 0xa2, 0x32, 0x6a, 0xa2, 0xa2, 0x3a, 0xa3,
0x22, 0x3a, 0xa7, 0x44, 0x5a, 0xc5, 0x21, 0x1a,
0xa7, 0x66, 0x6e, 0x68, 0x6a, 0xa2, 0x63, 0x3a,
0x82, 0x82, 0x86, 0xa6, 0x44, 0x6a, 0xa5, 0x75,
0x1a, 0xe3, 0x45, 0xa5, 0x36, 0x5a, 0xa7, 0x44,
0x1a, 0xa1, 0x12, 0x7a, 0xa5, 0x66, 0x5a, 0xa1,
0x26, 0x7a, 0xb7, 0x72, 0xa7, 0x77, 0x6a, 0xf7,
0x1e, 0xc8, 0xa0, 0x11, 0x1a, 0xa5, 0x33, 0x7a,
0xf3, 0xb8, 0x38, 0x8f, 0x83, 0xf3, 0x18, 0x18,
0x8d, 0x18, 0x2a, 0xa3, 0x32, 0x8f, 0xc6, 0xa7,
0x36, 0xcd, 0x38, 0x8d, 0x18, 0x8d, 0x18, 0x1a,
0xf1, 0x18, 0x18, 0x8f, 0x82, 0xa3, 0x32, 0x2a,
0xa2, 0x22, 0x2b, 0x22, 0x2e, 0x22, 0x2a, 0xa3,
0x66, 0x6a, 0xae, 0x23, 0xba, 0xa2, 0x73, 0x4a,
0xa4, 0x45, 0x36, 0xa1, 0x63, 0x1b, 0x67, 0x6e,
0x68, 0x6a, 0xb6, 0x38, 0xa7, 0x22, 0x2a, 0xa2,
0x46, 0x6a, 0xa6, 0x66, 0x7a, 0xa7, 0x57, 0x2a,
0xe3, 0x45, 0xa5, 0x76, 0x4b, 0x55, 0x5a, 0xa5,
0x11, 0x3a, 0xa3, 0x75, 0x7a, 0xe5, 0x17, 0xe7,
0x16, 0xa6, 0x77, 0x2b, 0x77, 0x7e, 0x73, 0x6a,
0x76, 0x5d, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42,
0x00, 0x00, 0x20, 0x04, 0x42, 0x20, 0x04, 0x00,
0x00, 0x48, 0x00, 0x80, 0x04, 0x00, 0x48, 0x00,
0x80, 0x04, 0x00, 0x12, 0x00, 0xcf, 0xb2, 0x01,
0x00, 0x00, 0x00, 0x20, 0x01, 0x84, 0x20, 0x01,
0x12, 0x00, 0x20, 0x01, 0x00, 0x00, 0x00, 0x20,
0x01, 0x00, 0x12, 0xa0, 0x21, 0x22, 0x00, 0x80,
0x01, 0x80, 0x22, 0x84, 0x22, 0x02, 0x18, 0x00,
0x00, 0x80, 0x02, 0x28, 0x00, 0x00, 0xf0, 0x7d,
0x1d, 0xc0, 0x42, 0x1f, 0x41, 0x52, 0x28, 0x1f,
0x41, 0x32, 0x48, 0x1f, 0x41, 0x32, 0x4a, 0x1f,
0x41, 0xb2, 0x4a, 0xf1, 0x11, 0x24, 0xab, 0x94,
0x1b, 0x61, 0xab, 0x94, 0x53, 0xb1, 0x4a, 0x39,
0x34, 0xaf, 0x14, 0x39, 0x34, 0x2f, 0x14, 0x79,
0x24, 0xd8, 0x12, 0xf9, 0x24, 0x48, 0x1c, 0xf9,
0x24, 0x4a, 0x1c, 0xf8, 0x24, 0x4a, 0x16, 0xf1,
0x24, 0x5a, 0x96, 0xe1, 0xa2, 0x65, 0x59, 0x2e,
0x5a, 0x9e, 0x24, 0xac, 0xf5, 0x91, 0x24, 0x2c,
0xf4, 0x91, 0x24, 0x8d, 0x12, 0x1f, 0x49, 0x32,
0x68, 0x1f, 0x49, 0x32, 0x6a, 0x1f, 0x49, 0xb2,
0x6a, 0xd1, 0x41, 0xb2, 0x4a, 0x99, 0x21, 0xab,
0x94, 0x51, 0xab, 0x94, 0x43, 0xb2, 0x4a, 0x3b,
0x34, 0x2b, 0xb4, 0x47, 0x83, 0x29, 0xf9, 0x24,
0x48, 0x98, 0x4f, 0xa2, 0xf4, 0x39, 0x8a, 0xc0,
0x42, 0x1d, 0x6c, 0x85, 0xd2, 0x41, 0x34, 0x48,
0x15, 0x34, 0x42, 0x1d, 0x24, 0xa3, 0x54, 0x41,
0x2d, 0x84, 0x15, 0xb4, 0x4a, 0x1a, 0xb5, 0x4a,
0x3a, 0x24, 0x2f, 0x14, 0x18, 0xf4, 0x42, 0x81,
0x45, 0xd8, 0x12, 0xd9, 0x86, 0xd4, 0x12, 0xd9,
0xa4, 0xc5, 0x81, 0x4d, 0xda, 0x1c, 0xd8, 0xa4,
0x64, 0x18, 0x26, 0x6a, 0x58, 0xbc, 0xe4, 0x58,
0xc2, 0x4a, 0x1f, 0xc9, 0xc2, 0x4a, 0x1f, 0x48,
0x54, 0x28, 0x1f, 0x49, 0x34, 0x48, 0x1f, 0x49,
0x32, 0x4a, 0x1f, 0x48, 0x32, 0x4a, 0x1d, 0x24,
0xad, 0x94, 0x1d, 0x24, 0xab, 0xa4, 0x51, 0xab,
0xb4, 0x43, 0xb2, 0x4a, 0x39, 0x24, 0x29, 0x58,
0x84, 0x29, 0x58, 0x86, 0x29, 0xd9, 0xa4, 0xf1,
0x99, 0xee, 0x60, 0x88, 0x82, 0x48, 0x00, 0x00,
0x00, 0x00, 0x44, 0x80, 0x02, 0x00, 0x00, 0x00,
0x10, 0x02, 0x18, 0x80, 0x08, 0x00, 0x00, 0x14,
0x40, 0x42, 0x08, 0x58, 0x00, 0x00, 0x80, 0x04,
0x40, 0x04, 0x00, 0x00, 0x00, 0x00, 0x50, 0x12,
0xf0, 0x61, 0x29, 0x00, 0x80, 0x22, 0x11, 0x08,
0x8c, 0x02, 0x1a, 0x02, 0x16, 0x28, 0x91, 0x18,
0x18, 0x80, 0x08, 0x00, 0x88, 0x18, 0x88, 0x84,
0x28, 0x20, 0x24, 0x01, 0x00, 0x18, 0x20, 0x02,
0x1a, 0x04, 0x32, 0x20, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x22, 0x42, 0x62, 0x00, 0x80, 0x04,
0x88, 0xaf, 0x72, 0x0f, 0xa0, 0x28, 0x00, 0x20,
0x07, 0x83, 0x04, 0x88, 0x20, 0x02, 0x42, 0x00,
0x88, 0x88, 0x80, 0x04, 0x42, 0x00, 0x28, 0x22,
0x00, 0x12, 0x82, 0x20, 0x88, 0x21, 0x82, 0x02,
0x20, 0x08, 0x88, 0x28, 0x12, 0x28, 0x82, 0x48,
0x18, 0x00, 0x42, 0x80, 0x04, 0x21, 0xa0, 0x82,
0x00, 0x14, 0xf0, 0x63, 0x11, 0x00, 0xc2, 0x28,
0x12, 0x84, 0x1a, 0xc6, 0x28, 0x81, 0x38, 0x70,
0x14, 0x08, 0x26, 0xa8, 0x14, 0x00, 0x88, 0x88,
0xa0, 0x48, 0x24, 0x8a, 0x44, 0x88, 0x22, 0xa2,
0x1e, 0x18, 0x20, 0x01, 0x30, 0x81, 0x28, 0x28,
0x83, 0x06, 0x62, 0x82, 0x18, 0x88, 0x28, 0x80,
0x22, 0x28, 0x14, 0x04, 0x22, 0x42, 0xa0, 0x24,
0x42, 0x62, 0xa0, 0x82, 0x24, 0x42, 0x14, 0x92,
0x6b, 0x23, 0x00, 0x28, 0x00, 0x00, 0x80, 0x04,
0x82, 0xa0, 0x21, 0x18, 0x00, 0x82, 0x00, 0x00,
0x18, 0x00, 0x00, 0x00, 0x00, 0x88, 0x12, 0x20,
0x01, 0x12, 0x20, 0x01, 0x00, 0x80, 0x01, 0x00,
0x18, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00,
0xdf, 0x51, 0x06, 0x00, 0x00, 0x00, 0x00, 0x20,
0x01, 0x00, 0x80, 0x48, 0x08, 0x80, 0x01, 0x20,
0x02, 0x00, 0x00, 0x00, 0x00, 0x22, 0x12, 0x00,
0x2a, 0x24, 0x89, 0x08, 0x00, 0x00, 0x22, 0x00,
0x00, 0x10, 0x08, 0x42, 0x80, 0x02, 0x00, 0x00,
0x7f, 0xce, 0x0c, 0x20, 0x02, 0x28, 0x42, 0x28,
0x82, 0x42, 0x12, 0x82, 0x82, 0x8a, 0x81, 0x88,
0x08, 0x42, 0x12, 0x8c, 0x22, 0xa8, 0x48, 0x98,
0x1a, 0x98, 0x81, 0x80, 0x8a, 0x02, 0x28, 0x00,
0x18, 0x00, 0x82, 0x22, 0x88, 0x28, 0x12, 0x20,
0x21, 0x08, 0x88, 0x88, 0x20, 0x08, 0x80, 0x01,
0x11, 0x20, 0x02, 0x00, 0x83, 0x02, 0xf0, 0xc6,
0xff, 0x00, 0x22, 0x80, 0x22, 0x24, 0x02, 0x48,
0x18, 0x12, 0xa0, 0x18, 0x20, 0x08, 0x00, 0x22,
0x80, 0x88, 0x29, 0x22, 0x08, 0x88, 0x28, 0x20,
0x02, 0x80, 0x81, 0x22, 0x81, 0x88, 0xa2, 0x24,
0x1a, 0xa2, 0x81, 0x20, 0x21, 0x08, 0x80, 0x02,
0x00, 0x00, 0x84, 0x80, 0x04, 0x22, 0x00, 0x00,
0xd0, 0x54, 0x0b, 0x00, 0x00, 0x00, 0x88, 0x00,
0x82, 0x88, 0x80, 0x08, 0x88, 0x89, 0x84, 0x41,
0x28, 0x29, 0x04, 0x1a, 0x18, 0x01, 0x28, 0x00,
0x00, 0x00, 0x00, 0x00, 0x88, 0x82, 0x00, 0x00,
0x80, 0x28, 0x08, 0x82, 0x00, 0x18, 0x10, 0x01,
0x28, 0x00, 0x90, 0x28, 0x00, 0xbf, 0xe4, 0x0b,
0x20, 0x24, 0x82, 0x01, 0x42, 0x20, 0x21, 0x84,
0x81, 0x81, 0x08, 0x00, 0x18, 0x00, 0x18, 0x42,
0x4a, 0x02, 0xa0, 0x12, 0x20, 0x08, 0x44, 0x00,
0x00, 0x00, 0x00, 0x20, 0x02, 0x20, 0x24, 0x08,
0x20, 0x01, 0xa0, 0x28, 0x00, 0x00, 0x48, 0x22,
0x50, 0x81, 0x00, 0xd0, 0xbd, 0x0f, 0x44, 0x42,
0x00, 0x28, 0x92, 0x42, 0x00, 0xc0, 0x88, 0x00,
0x8a, 0x01, 0xc0, 0x88, 0x18, 0x42, 0x00, 0xa2,
0x80, 0x01, 0x82, 0x00, 0x62, 0x00, 0x80, 0x81,
0x04, 0x28, 0x80, 0x88, 0x08, 0x00, 0x00, 0x88,
0x88, 0x88, 0x28, 0x80, 0x28, 0x02, 0x22, 0x42,
0x40, 0x24, 0x82, 0x8c, 0xf1, 0x54, 0x54, 0x00,
0x28, 0x12, 0x80, 0x21, 0x88, 0x02, 0x20, 0x02,
0x00, 0x20, 0x21, 0x28, 0x05, 0x84, 0x20, 0x01,
0x42, 0x88, 0x00, 0x00, 0x83, 0x01, 0x22, 0x82,
0xa2, 0x82, 0x28, 0x20, 0x23, 0x81, 0x02, 0x80,
0x21, 0x44, 0x04, 0x4a, 0x02, 0x00, 0x90, 0x42,
0x88, 0x00, 0x60, 0x13, 0x88, 0x12, 0xf0, 0x98,
0x78, 0x10, 0x84, 0x82, 0x82, 0x21, 0x22, 0xa1,
0x42, 0x18, 0x80, 0x23, 0x21, 0x08, 0x80, 0x81,
0xe9, 0x81, 0x88, 0x11, 0x08, 0x1a, 0x04, 0xa0,
0x28, 0x00, 0x00, 0x6a, 0x01, 0x22, 0xa0, 0x38,
0x42, 0x80, 0xa2, 0x12, 0x2a, 0x29, 0x08, 0x20,
0x81, 0x44, 0xa4, 0x18, 0xe2, 0x88, 0x00, 0x24,
0x2a, 0x84, 0xa8, 0x24, 0x00, 0x83, 0x03, 0x5a,
0x08, 0x2f, 0x7e, 0x0c, 0x00, 0x18, 0x80, 0x81,
0x04, 0x20, 0x04, 0x89, 0x08, 0x20, 0x09, 0x20,
0x04, 0x4a, 0x81, 0x84, 0x22, 0x2a, 0x04, 0x00,
0x10, 0x14, 0x08, 0x80, 0x08, 0x88, 0x28, 0x00,
0x80, 0x02, 0x48, 0x88, 0x00, 0x00, 0x80, 0x08,
0x88, 0x00, 0xa0, 0x24, 0x40, 0x24, 0x0a, 0x14,
0x2b, 0x75, 0x00, 0x81, 0x80, 0x01, 0x00, 0xa0,
0x14, 0x88, 0x12, 0x00, 0x20, 0x01, 0x12, 0x88,
0x42, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x18,
0x88, 0x18, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00,
0x80, 0x08, 0x00, 0x00, 0x20, 0x88, 0x2a, 0x88,
0x88, 0x82, 0x28, 0xf1, 0xde, 0xc6, 0x00, 0x80,
0x84, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0x01, 0x00, 0x20, 0x01, 0x80, 0x88, 0x08,
0x00, 0x00, 0x00, 0x00, 0x20, 0x08, 0x12, 0x00,
0x00, 0x80, 0x82, 0x01, 0x80, 0x08, 0x22, 0x00,
0x00, 0x00, 0xef, 0xcc, 0x08, 0x20, 0x04, 0x00,
0x00, 0x00, 0x00, 0x20, 0x01, 0x81, 0x80, 0x08,
0x00, 0x18, 0x20, 0x01, 0x00, 0x12, 0x00, 0x00,
0x00, 0x20, 0x08, 0xa2, 0x20, 0x02, 0x82, 0x00,
0x00, 0x00, 0x00, 0x22, 0x20, 0x08, 0x18, 0x00,
0x00, 0x14, 0xcf, 0x34, 0x01, 0x48, 0x80, 0x84,
0x88, 0x21, 0x01, 0x00, 0x88, 0x00, 0x00, 0x00,
0x00, 0x20, 0x84, 0x08, 0x00, 0x00, 0x88, 0x00,
0x20, 0x08, 0x00, 0x28, 0x00, 0x00, 0x00, 0x20,
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xf0, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00, 0x48,
0x00, 0x00, 0x20, 0x08, 0x00, 0x80, 0x08, 0x00,
0x00, 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x88, 0x88, 0x80, 0x88, 0x03,
0x00, 0x00, 0x18, 0x00, 0x00, 0xf0, 0xd7, 0x33,
0x00, 0x00, 0x48, 0x00, 0x80, 0x81, 0x04, 0x82,
0x18, 0x80, 0x01, 0x18, 0x84, 0x8a, 0x21, 0x01,
0x82, 0x00, 0x82, 0x82, 0x82, 0xa0, 0x81, 0x00,
0x00, 0x88, 0x3a, 0x08, 0x22, 0x00, 0x00, 0x00,
0x82, 0x00, 0x82, 0x20, 0x88, 0x02, 0x00, 0x00,
0x00, 0x20, 0x08, 0xfb, 0x57, 0x00, 0x00, 0x00,
0x20, 0x04, 0x18, 0x10, 0x08, 0x12, 0x20, 0x28,
0x88, 0x01, 0x42, 0x00, 0x00, 0x00, 0x80, 0x01,
0x00, 0x00, 0x00, 0x80, 0x88, 0x02, 0x80, 0x08,
0x88, 0x20, 0x01, 0x00, 0x00, 0x00, 0x20, 0xa8,
0x28, 0x82, 0x82, 0x00, 0xf0, 0x87, 0x6b, 0x20,
0x28, 0x08, 0x20, 0x09, 0x80, 0x01, 0x00, 0x18,
0x80, 0x01, 0x18, 0x82, 0x89, 0x01, 0x00, 0x00,
0x00, 0x18, 0x88, 0x12, 0x00, 0x00, 0xa0, 0x21,
0x88, 0x28, 0x82, 0x80, 0x88, 0x88, 0x08, 0x00,
0x00, 0x00, 0x20, 0x02, 0x20, 0x02, 0x14, 0x12,
0x40, 0x01, 0x2f, 0x5a, 0x0a, 0x8c, 0x04, 0x48,
0x12, 0x00, 0x00, 0x00, 0x40, 0x04, 0x28, 0x12,
0x82, 0x00, 0x20, 0x04, 0x10, 0x02, 0x18, 0x80,
0x08, 0x00, 0x00, 0x1c, 0x01, 0x28, 0x84, 0x80,
0x04, 0x00, 0x00, 0x88, 0x00, 0x44, 0x80, 0x02,
0x00, 0x40, 0x01, 0x00, 0x21, 0x70, 0x47, 0x03,
0x48, 0x8a, 0x04, 0x58, 0x82, 0x18, 0x80, 0xa1,
0x11, 0x90, 0x88, 0x18, 0x80, 0xa1, 0x81, 0x18,
0xc0, 0x18, 0xa0, 0x44, 0x00, 0x80, 0x81, 0xa8,
0x18, 0xa0, 0x81, 0x18, 0x00, 0x88, 0x82, 0x12,
0x2a, 0x82, 0x82, 0x08, 0x98, 0x00, 0x00, 0x88,
0x00, 0x22, 0x18, 0x20, 0x22, 0x08, 0x28, 0x8e,
0x11, 0x11, 0x8a, 0x81, 0x42, 0x81, 0xf1, 0xfa,
0x7b, 0x00, 0x82, 0x00, 0x1a, 0x01, 0x42, 0x52,
0x80, 0x08, 0x12, 0xa0, 0x81, 0x84, 0x12, 0x89,
0x21, 0xa9, 0xc1, 0x20, 0x09, 0x00, 0x20, 0xa1,
0x11, 0x18, 0x00, 0x18, 0xa0, 0x11, 0x2a, 0x01,
0x22, 0xa2, 0x20, 0x82, 0x88, 0x01, 0x88, 0x18,
0x00, 0x00, 0x00, 0x00, 0x22, 0x88, 0x80, 0x08,
0x14, 0xf0, 0x5d, 0xfe, 0x20, 0x44, 0x08, 0x52,
0x00, 0x00, 0x4a, 0x24, 0x28, 0x01, 0x1a, 0x01,
0x18, 0x8a, 0xa8, 0x89, 0x88, 0x4a, 0x01, 0x88,
0x20, 0x81, 0x08, 0x00, 0x82, 0x00, 0x88, 0x00,
0x8a, 0xa2, 0x88, 0x82, 0x28, 0x20, 0x28, 0xa8,
0x88, 0x82, 0x82, 0x82, 0x88, 0x8a, 0x88, 0xa8,
0x83, 0x80, 0x02, 0x82, 0x8a, 0xa8, 0x23, 0x8a,
0x08, 0xa0, 0x88, 0xf0, 0xe7, 0xc2, 0x00, 0x00,
0x18, 0x00, 0x82, 0x88, 0x12, 0x00, 0x20, 0x01,
0x12, 0x60, 0x81, 0x20, 0x01, 0x00, 0x00, 0x00,
0x18, 0x00, 0x00, 0x80, 0x01, 0x22, 0x20, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28,
0x00, 0x00, 0x00, 0xdf, 0x3e, 0x05, 0x4a, 0x04,
0x20, 0x81, 0x08, 0x00, 0x20, 0xf8, 0x88, 0x88,
0x00, 0x80, 0xa1, 0x88, 0x8a, 0x98, 0x88, 0x4a,
0x09, 0x00, 0xa0, 0x88, 0x8a, 0x08, 0x12, 0x00,
0x20, 0x28, 0x08, 0xa0, 0xa8, 0x8a, 0x28, 0xa2,
0x88, 0x00, 0x00, 0x8a, 0xa8, 0x11, 0x8a, 0x08,
0x1a, 0xa1, 0x11, 0x00, 0x88, 0x88, 0xba, 0xe1,
0x19, 0xb9, 0x81, 0xa8, 0x99, 0x8a, 0x08, 0x14,
0x8f, 0xf8, 0x01, 0x4a, 0xd4, 0x88, 0x04, 0x1a,
0x85, 0x08, 0xa0, 0x45, 0x1a, 0x01, 0xcd, 0x8c,
0x12, 0x3e, 0x34, 0x9a, 0xa8, 0x21, 0x9a, 0xa8,
0x11, 0x83, 0xa1, 0xcd, 0x48, 0x24, 0x21, 0x90,
0x12, 0x8a, 0x88, 0x88, 0x81, 0x09, 0x20, 0x78,
0x81, 0xa1, 0x99, 0x1c, 0xf1, 0x28, 0x28, 0x8a,
0xea, 0x84, 0xa6, 0x88, 0xc8, 0xa0, 0x88, 0x20,
0xa8, 0x19, 0x50, 0x44, 0x9a, 0xe9, 0x41, 0x03,
0x80, 0x88, 0xa8, 0x13, 0x9e, 0xb1, 0x88, 0x9e,
0x92, 0x2b, 0x88, 0x30, 0x12, 0x1e, 0x1a, 0xa0,
0x44, 0x48, 0x20, 0x81, 0x01, 0x88, 0x18, 0x4a,
0x25, 0xf8, 0x88, 0x8c, 0x18, 0x38, 0xd0, 0x88,
0xd1, 0x88, 0xd9, 0x88, 0x99, 0x88, 0x4a, 0xa9,
0x88, 0x10, 0x02, 0x8a, 0xa9, 0x88, 0x88, 0x12,
0x00, 0xa0, 0x88, 0x8e, 0x81, 0x12, 0x32, 0x8e,
0xa8, 0x8a, 0xa8, 0xca, 0x8a, 0x88, 0x88, 0xa8,
0x88, 0x8a, 0xa8, 0x88, 0x1a, 0xa1, 0x88, 0x8e,
0x84, 0x1a, 0x81, 0x02, 0xa0, 0x88, 0x8a, 0xa8,
0x9b, 0xaa, 0x08, 0x9a, 0xb9, 0x82, 0xa8, 0x88,
0x8a, 0xf9, 0xe2, 0x9b, 0xa0, 0x44, 0x81, 0xa0,
0x15, 0x18, 0x00, 0xda, 0xa4, 0x55, 0xd0, 0xc8,
0x28, 0xb1, 0x14, 0xa3, 0x99, 0x8f, 0x83, 0xf1,
0x18, 0x88, 0x8f, 0x81, 0xb9, 0x18, 0xa1, 0xdd,
0x8a, 0x0c, 0x21, 0x24, 0xa0, 0x88, 0xa0, 0x11,
0x9a, 0x01, 0xa0, 0x88, 0x8e, 0x81, 0x9a, 0xb9,
0x21, 0xe1, 0x8a, 0xaa, 0xaa, 0x8b, 0xea, 0x8a,
0xa8, 0x84, 0x88, 0x8a, 0xa8, 0x88, 0x82, 0x9a,
0x01, 0x8e, 0x84, 0x9a, 0x19, 0x04, 0xa0, 0x88,
0x8a, 0xa8, 0x1b, 0xaa, 0x9a, 0x81, 0x9a, 0xb9,
0x82, 0xe8, 0x28, 0xe8, 0x18, 0xf9, 0x46, 0x47,
0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x20,
0xf8, 0x67, 0x1d, 0x00, 0x00, 0x12, 0x00, 0x80,
0x84, 0x81, 0x04, 0x12, 0x20, 0x88, 0x01, 0x98,
0x82, 0x4a, 0x01, 0x00, 0x20, 0x08, 0x00, 0x18,
0x00, 0x80, 0x28, 0x88, 0xa1, 0x28, 0x22, 0x00,
0x82, 0x00, 0x88, 0x80, 0x08, 0x00, 0x00, 0x00,
0x20, 0x0b, 0x80, 0x08, 0x00, 0x4e, 0xd1, 0xe0,
0x28, 0xf4, 0x11, 0x24, 0x85, 0xf2, 0x11, 0x24,
0x8b, 0x14, 0x1f, 0x41, 0xb2, 0x4a, 0xf1, 0x11,
0x24, 0xab, 0x14, 0x1f, 0x41, 0xb2, 0x4a, 0xb9,
0x11, 0xb2, 0x4a, 0x39, 0x15, 0xab, 0x94, 0x43,
0xf3, 0x4a, 0x91, 0x47, 0x83, 0x2f, 0x14, 0xf9,
0x34, 0x48, 0x2d, 0x91, 0x4f, 0x83, 0xc4, 0x91,
0x4f, 0xa2, 0xc4, 0x81, 0x4f, 0xa2, 0x64, 0x11,
0x4f, 0xa2, 0x65, 0x19, 0x2e, 0x5a, 0x96, 0xc5,
0x5a, 0x9e, 0x24, 0x2e, 0x5a, 0x1f, 0x49, 0xe2,
0x22, 0xf4, 0x91, 0x24, 0x87, 0x22, 0x1f, 0x49,
0xb2, 0x48, 0xf1, 0x91, 0x24, 0xab, 0x14, 0x1f,
0x48, 0xb2, 0x4a, 0xd9, 0x41, 0xb2, 0x6a, 0x99,
0x21, 0xab, 0x94, 0x51, 0xab, 0x94, 0x43, 0xb2,
0x4a, 0x39, 0x24, 0x2b, 0xb4, 0x47, 0x82, 0x29,
0xf9, 0x24, 0x48, 0xb8, 0x4f, 0xa2, 0xf4, 0xe2,
0x21, 0xc0, 0x42, 0x1f, 0xc5, 0xd2, 0x28, 0xf4,
0x11, 0x24, 0x83, 0xd4, 0x41, 0x32, 0x4a, 0x1d,
0x24, 0xa3, 0xd4, 0x41, 0xf2, 0x42, 0x94, 0x1d,
0x24, 0xab, 0xa4, 0x59, 0xb2, 0x42, 0x39, 0x24,
0x2f, 0x14, 0x38, 0x24, 0x2d, 0x91, 0x4f, 0x8a,
0xd4, 0x12, 0xf8, 0x26, 0x48, 0x2d, 0x91, 0x4f,
0xaa, 0xc5, 0x81, 0x4f, 0xaa, 0xe5, 0x11, 0xf8,
0x24, 0x4a, 0x86, 0xe1, 0xa2, 0x64, 0x59, 0xbc,
0xe4, 0x58, 0xc2, 0x4a, 0x1f, 0xc9, 0xc2, 0x4a,
0x1f, 0x41, 0xd4, 0x28, 0xfc, 0x91, 0x24, 0x83,
0xf4, 0x81, 0x24, 0xa3, 0xd4, 0x41, 0xb2, 0x4a,
0xd8, 0x41, 0xf2, 0x4a, 0x94, 0x1f, 0x48, 0xb2,
0x4a, 0x1a, 0xb5, 0x4a, 0x3b, 0xa4, 0xab, 0x14,
0x41, 0x2b, 0x84, 0x47, 0x82, 0x29, 0xf8, 0x86,
0x48, 0x29, 0xf9, 0x24, 0x5a, 0x67, 0x5a, 0x40,
0x28, 0x84, 0x04, 0x00, 0x00, 0x00, 0x40, 0x04,
0x28, 0x10, 0x01, 0x00, 0x00, 0x10, 0x02, 0x20,
0x88, 0x08, 0x00, 0x00, 0x14, 0x00, 0x84, 0x80,
0x04, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00,
0x00, 0x00, 0x70, 0x22, 0x01, 0x7f, 0xbc, 0x06,
0x20, 0x01, 0x00, 0x12, 0x84, 0x80, 0x03, 0x28,
0x20, 0x01, 0x88, 0x18, 0x82, 0x00, 0x88, 0x80,
0x08, 0x88, 0x00, 0x00, 0x22, 0x00, 0x20, 0x09,
0x00, 0xc0, 0x81, 0x00, 0x80, 0x28, 0x08, 0x80,
0x08, 0x00, 0x00, 0x00, 0x82, 0x80, 0x08, 0x80,
0xf2, 0x64, 0x34, 0x00, 0x8a, 0x08, 0x00, 0x20,
0x22, 0x68, 0x88, 0x42, 0x80, 0x08, 0x42, 0x84,
0x80, 0x22, 0x84, 0x04, 0x4a, 0x08, 0x00, 0x22,
0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x18, 0x20,
0x08, 0x00, 0x21, 0x8a, 0x23, 0x28, 0x01, 0x20,
0x04, 0x2a, 0x4c, 0x01, 0x00, 0x80, 0x48, 0x81,
0xb8, 0xf6, 0x08, 0xa0, 0x18, 0x80, 0x04, 0x12,
0x8c, 0x02, 0x84, 0x10, 0x84, 0x28, 0x23, 0x14,
0x88, 0x21, 0x2a, 0x24, 0x24, 0xc8, 0xc2, 0x82,
0xa0, 0x81, 0x28, 0x00, 0x88, 0x00, 0x90, 0x81,
0x82, 0x10, 0x08, 0x52, 0x1c, 0x08, 0x00, 0x88,
0x29, 0xa8, 0x28, 0x88, 0x43, 0x09, 0x22, 0x48,
0xa0, 0x86, 0x14, 0x20, 0x08, 0x86, 0x82, 0x48,
0xa1, 0xa1, 0x3f, 0x3e, 0x01, 0x00, 0x00, 0x00,
0x80, 0xa8, 0x1a, 0x48, 0x22, 0x00, 0x80, 0x08,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00,
0x20, 0x01, 0x00, 0x00, 0x82, 0x00, 0x00, 0x18,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0,
0x55, 0x08, 0x20, 0x01, 0x00, 0x40, 0x81, 0x04,
0x48, 0x00, 0x88, 0x10, 0x08, 0x21, 0x00, 0x80,
0x08, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x84,
0x16, 0x04, 0x80, 0x28, 0x08, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x57,
0xd9, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x80,
0x22, 0x81, 0x88, 0x09, 0x84, 0x80, 0x8c, 0x04,
0x28, 0x98, 0x20, 0x08, 0x80, 0x22, 0x88, 0x84,
0x08, 0x8a, 0x03, 0x28, 0x00, 0x00, 0x80, 0x08,
0x18, 0x00, 0x00, 0x12, 0x20, 0x04, 0x00, 0x00,
0x00, 0x82, 0xf0, 0xc2, 0x88, 0x00, 0x00, 0x00,
0x10, 0x21, 0x24, 0x24, 0x04, 0x28, 0x8a, 0x81,
0xa8, 0x81, 0x24, 0x81, 0x20, 0x0c, 0x82, 0x28,
0x18, 0x80, 0x08, 0x80, 0x22, 0x21, 0x24, 0x08,
0x1a, 0x12, 0x08, 0x00, 0x88, 0x82, 0x20, 0x08,
0x18, 0x00, 0x00, 0x18, 0x20, 0x04, 0x18, 0x00,
0x00, 0x80, 0x08, 0xef, 0x5e, 0x02, 0x80, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x08, 0x00,
0x80, 0x04, 0x20, 0x08, 0x00, 0x00, 0x82, 0x00,
0x80, 0x08, 0x49, 0x03, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x17, 0x61, 0x00, 0x10, 0x04, 0x40, 0x08, 0x00,
0x80, 0x08, 0x00, 0x18, 0x10, 0x08, 0x00, 0x42,
0x20, 0x04, 0x00, 0x00, 0x2a, 0x08, 0x00, 0x28,
0x00, 0x80, 0x02, 0x00, 0x22, 0x00, 0x00, 0x00,
0x82, 0x20, 0x04, 0x00, 0x42, 0x83, 0x08, 0x18,
0x00, 0x2f, 0x7d, 0x01, 0x00, 0x00, 0x80, 0x04,
0x00, 0x20, 0x12, 0x08, 0x82, 0xa0, 0x41, 0x80,
0x48, 0x02, 0x80, 0x04, 0x82, 0x80, 0x02, 0x00,
0x00, 0x00, 0x28, 0x00, 0x00, 0x82, 0x00, 0x88,
0x28, 0x88, 0x00, 0xa2, 0x20, 0x08, 0x82, 0x00,
0x82, 0x00, 0x80, 0x0c, 0x8f, 0x2e, 0x0a, 0x00,
0x22, 0x81, 0x00, 0x20, 0x04, 0x22, 0x42, 0x42,
0x40, 0x02, 0x82, 0x22, 0x18, 0x2a, 0x88, 0x08,
0x2a, 0x08, 0x00, 0x00, 0x00, 0x80, 0x08, 0x20,
0x0c, 0x00, 0x11, 0x20, 0x61, 0x24, 0x28, 0x00,
0x88, 0x00, 0x81, 0x80, 0x28, 0x24, 0x01, 0x20,
0x04, 0x00, 0xf0, 0xbb, 0x25, 0x00, 0x80, 0x42,
0x08, 0x42, 0x80, 0x04, 0x28, 0xca, 0x02, 0x00,
0x18, 0x98, 0x26, 0x28, 0x81, 0x8a, 0x88, 0x24,
0x8a, 0x84, 0x08, 0x22, 0x00, 0x28, 0x20, 0x08,
0x80, 0x0c, 0x20, 0x42, 0x01, 0x80, 0x36, 0xa2,
0x22, 0x88, 0x00, 0xa8, 0x83, 0x08, 0x88, 0xc8,
0x12, 0xa0, 0x48, 0x48, 0x80, 0x21, 0x0c, 0x67,
0x4e, 0x00, 0x10, 0x04, 0x40, 0x08, 0x00, 0x00,
0x8c, 0x04, 0x82, 0x21, 0x48, 0x20, 0x48, 0x02,
0x80, 0x04, 0x00, 0x00, 0x20, 0x08, 0x00, 0x28,
0x22, 0x00, 0x00, 0x82, 0x18, 0x00, 0x00, 0x82,
0x00, 0x20, 0x28, 0x04, 0x00, 0x60, 0x88, 0x00,
0x00, 0xde, 0x43, 0x00, 0x00, 0x00, 0x11, 0x00,
0x00, 0x11, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00,
0x00, 0x00, 0x44, 0x41, 0x00, 0x21, 0x00, 0x00,
0x21, 0x40, 0x02, 0x00, 0x00, 0x81, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x26, 0x8e,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f,
0x51, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xf0, 0x4d, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x21, 0x20, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x8b, 0xae, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f, 0x00, 0x10,
0x08, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x80, 0x02,
0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x1e, 0xfc,
0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,
0x01, 0x00, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00,
0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x6f, 0xee, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x08, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xdf, 0xb1, 0x0a, 0x00, 0x00, 0x00, 0x81,
0x00, 0x48, 0x14, 0x00, 0x80, 0x04, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xf0, 0x62, 0xc1, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x20, 0x04, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xf0, 0x53, 0xda, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0xe7, 0x18,
0x00, 0x00, 0x81, 0x00, 0x00, 0x10, 0x41, 0x01,
0x48, 0x20, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x20, 0x01, 0x88, 0x00, 0x00, 0x00, 0x88,
0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x2a, 0x17, 0x00, 0x00, 0x00,
0x40, 0x88, 0x04, 0x48, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x80, 0x01,
0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0xef, 0xfa,
0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f,
0xfe, 0x00, 0x40, 0x01, 0x00, 0x80, 0x04, 0x54,
0x00, 0x00, 0x48, 0x40, 0x04, 0x00, 0x21, 0x00,
0x44, 0x00, 0x10, 0x02, 0x18, 0x80, 0x88, 0x02,
0x21, 0x80, 0x01, 0x88, 0x40, 0x08, 0x00, 0x00,
0x28, 0x84, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00,
0x9f, 0xd2, 0x01, 0x00, 0x14, 0x00, 0x00, 0x48,
0x40, 0x55, 0x88, 0x28, 0x10, 0x82, 0x04, 0x44,
0x80, 0x02, 0x21, 0x00, 0x44, 0x80, 0x02, 0x21,
0x48, 0x18, 0x80, 0x88, 0x02, 0x21, 0x48, 0x18,
0x44, 0x88, 0x28, 0x84, 0x21, 0x48, 0x40, 0x84,
0xa1, 0x21, 0x84, 0x21, 0x48, 0xe0, 0x41, 0x01,
0x28, 0x10, 0xa2, 0x11, 0x40, 0xf4, 0x94, 0xca,
0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x44,
0x00, 0x00, 0x00, 0x44, 0x00, 0x10, 0x02, 0x40,
0x04, 0x00, 0x21, 0x00, 0x00, 0x28, 0x10, 0x02,
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00,
0x00, 0x00, 0x00, 0x9f, 0x74, 0x0f, 0x00, 0x14,
0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x48, 0x40,
0x04, 0x00, 0x21, 0x00, 0x44, 0x00, 0x10, 0x02,
0x18, 0x80, 0x88, 0x03, 0x21, 0x80, 0x01, 0x88,
0x40, 0x88, 0x08, 0x00, 0x80, 0x42, 0x08, 0x00,
0x00, 0x28, 0x00, 0x00, 0xf0, 0xab, 0xb9, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x0f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x89,
0x03, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0x02, 0x21, 0x00, 0x00, 0x28, 0x00, 0x00,
0x00, 0x28, 0x00, 0x48, 0x00, 0x00, 0x00, 0x48,
0x40, 0x04, 0x28, 0x10, 0x82, 0x04, 0x44, 0x00,
0x10, 0x82, 0x04, 0x44, 0x00, 0x10, 0xf2, 0x2e,
0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
0xe4, 0x0f, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00,
0x40, 0x05, 0x00, 0x44, 0x00, 0x00, 0x00, 0x21,
0x00, 0x44, 0x21, 0x00, 0x00, 0x00, 0x00, 0x18,
0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84,
0x00, 0x00, 0x00, 0x00, 0x9f, 0x42, 0x0c, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xf0, 0x4f, 0xfe, 0x00,
0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00,
0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2e,
0x92, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00,
0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00,
0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00,
0x00, 0x00, 0xdf, 0x3d, 0xf8, 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, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff
)
| 56.978874
| 56
| 0.561404
| 72,301
| 515,146
| 4
| 0.003568
| 0.344504
| 0.442193
| 0.528789
| 0.321918
| 0.273551
| 0.247797
| 0.226166
| 0.213344
| 0.203248
| 0
| 0.546796
| 0.298246
| 515,146
| 9,040
| 57
| 56.985177
| 0.253202
| 0
| 0
| 0.154757
| 0
| 0
| 0
| 0
| 0
| 0
| 0.561386
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
4c24558c3f5419ec633a0eb12c1e4bf425deb2be
| 8,557
|
py
|
Python
|
tests/test_api.py
|
thanos/couchfs
|
69f51d929f8abeb7a9945206a34fe7b7cf050e96
|
[
"MIT"
] | 1
|
2021-03-16T12:05:37.000Z
|
2021-03-16T12:05:37.000Z
|
tests/test_api.py
|
thanos/couchfs
|
69f51d929f8abeb7a9945206a34fe7b7cf050e96
|
[
"MIT"
] | null | null | null |
tests/test_api.py
|
thanos/couchfs
|
69f51d929f8abeb7a9945206a34fe7b7cf050e96
|
[
"MIT"
] | null | null | null |
import os
import pytest
import requests_mock
from couchfs.api import CouchDBClient, BadConnectionURI, URLRequired
#
#
#
#
attachment_list = {"total_rows":3,"offset":0,"rows":[
{"id":"1","key":["1"],"value":0},
{"id":"doc-1","key":["doc-1","isis28.gif"],"value":10415},
{"id":"doc-2","key":["doc-2"],"value":0}
]}
def test_connection_str():
scheme = 'http'
username = 'username'
password = 'password'
host = 'host'
port = '5984'
database = 'database'
connection_str = f'couchdb://{username}:{password}@{host}:{port}/{database}'
db_uri = f'http://{host}:{port}/{database}'
client = CouchDBClient(connection_str)
assert client.db == database
assert client.db_uri == db_uri
assert client.auth == (username, password)
def test_connection_str_couchdbs():
scheme = 'http'
username = 'username'
password = 'password'
host = 'host'
port = '5984'
database = 'database'
connection_str = f'couchdbs://{username}:{password}@{host}:{port}/{database}'
db_uri = f'https://{host}:{port}/{database}'
client = CouchDBClient(connection_str)
assert client.db_uri == db_uri
def test_connection_str_no_auth():
scheme = 'http'
host = 'host'
port = '5984'
database = 'database'
connection_str = f'couchdb://{host}:{port}/{database}'
db_uri = f'http://{host}:{port}/{database}'
client = CouchDBClient(connection_str)
assert client.db_uri == db_uri
assert client.auth is None
def test_connection_str_no_database():
scheme = 'http'
host = 'host'
port = '5984'
database = 'database'
connection_str = f'couchdb://{host}:{port}/'
db_uri = f'http://{host}:{port}/{database}'
with pytest.raises(BadConnectionURI):
CouchDBClient(connection_str)
def test_env_connection_str():
scheme = 'http'
host = '127.0.0.1'
port = '5984'
database = 'test'
connection_str = f'couchdb://{host}:{port}/{database}'
db_uri = f'http://{host}:{port}/{database}'
os.environ[CouchDBClient.URI_ENVIRON_KEY] = connection_str
client = CouchDBClient()
assert client.db_uri == db_uri
def test_no_connection_str():
class NoConStr(CouchDBClient):
URI_ENVIRON_KEY = 'XXXX'
with pytest.raises(URLRequired):
NoConStr()
def test_list_attchments_one_pattern():
host = '127.0.0.1'
port = '5984'
database = 'test'
connection_str = f'couchdb://{host}:{port}/{database}'
params = {'reduce': False, 'include_docs': False}
with requests_mock.Mocker() as m:
client = CouchDBClient(connection_str)
m.get(f'{client.db_uri}/_design/couchfs_views/_view/attachment_list?reduce=false', json={"total_rows":3,"offset":0,"rows":[
{"id":"1","key":["1"],"value":0},
{"id":"doc-1","key":["doc-1","isis28.gif"],"value":10415},
{"id":"doc-2","key":["doc-2"],"value":0}
]})
assert len(list(client.list_attachments('doc-1'))) == 1
def test_list_attchments_two_patterns():
host = '127.0.0.1'
port = '5984'
database = 'test'
connection_str = f'couchdb://{host}:{port}/{database}'
with requests_mock.Mocker() as m:
client = CouchDBClient(connection_str)
m.get(f'{client.db_uri}/_design/couchfs_views/_view/attachment_list?reduce=false',
json={"total_rows": 3, "offset": 0, "rows": [
{"id": "1", "key": ["1"], "value": 0},
{"id": "doc-1", "key": ["doc-1", "isis28.gif"], "value": 10415},
{"id": "doc-2", "key": ["doc-2"], "value": 0}
]})
assert len(list(client.list_attachments('doc-1','doc-2'))) == 2
def test_list_attchments_no_patterns():
host = '127.0.0.1'
port = '5984'
database = 'test'
connection_str = f'couchdb://{host}:{port}/{database}'
with requests_mock.Mocker() as m:
client = CouchDBClient(connection_str)
m.get(f'{client.db_uri}/_design/couchfs_views/_view/attachment_list?reduce=false',
json={"total_rows": 3, "offset": 0, "rows": [
{"id": "1", "key": ["1"], "value": 0},
{"id": "doc-1", "key": ["doc-1", "isis28.gif"], "value": 10415},
{"id": "doc-2", "key": ["doc-2"], "value": 0}
]})
assert len(list(client.list_attachments())) == 3
def test_get_attachment():
host = '127.0.0.1'
port = '5984'
database = 'test'
connection_str = f'couchdb://{host}:{port}/{database}'
with requests_mock.Mocker() as m:
client = CouchDBClient(connection_str)
m.get(f'{client.db_uri}/DOC/wsgi.py', content=bytes('1'*10, 'utf-8'))
with client.get_attachment(f'{client.db_uri}/DOC/wsgi.py') as fp:
assert len(fp.read()) == 10
assert os.path.exists(fp.name)
assert not os.path.exists(fp.name)
def test_get_attachment_in_memory():
host = '127.0.0.1'
port = '5984'
database = 'test'
connection_str = f'couchdb://{host}:{port}/{database}'
with requests_mock.Mocker() as m:
client = CouchDBClient(connection_str)
m.get(f'{client.db_uri}/DOC/wsgi.py', content=bytes('1'*10, 'utf-8'))
with CouchDBClient(connection_str).get_attachment(f'{client.db_uri}/DOC/wsgi.py',in_memory=True) as buff:
assert len(buff) == 10
assert len(buff) == 10
def test_upload_file_existing_doc():
host = '127.0.0.1'
port = '5984'
database = 'test'
connection_str = f'couchdb://{host}:{port}/{database}'
doc_id = 'DOC'
headers = {'Cache-Control': 'must-revalidate', 'Content-Length': '55002', 'Content-Type': 'application/json', 'Date': 'Mon, 07 Dec 2020 18:32:24 GMT', 'ETag': '"361-31e194e4bb0c4e4507f6c43428bd9bc3"', 'Server': 'CouchDB/3.1.1 (Erlang OTP/22)', 'X-Couch-Request-ID': 'a27fd9fe9b', 'X-CouchDB-Body-Time': '0'}
client = CouchDBClient(connection_str)
with requests_mock.Mocker() as doc_check:
doc_check.register_uri('HEAD', f'{client.db_uri}/{doc_id}', status_code=200, headers=headers)
doc_check.register_uri('PUT', f'{client.db_uri}/{doc_id}/test.py', status_code=201)
with open(__file__, 'rb') as fp:
client.upload_file(fp, f'{doc_id}/test.py')
def test_upload_file_new_doc():
host = '127.0.0.1'
port = '5984'
database = 'test'
connection_str = f'couchdb://{host}:{port}/{database}'
doc_id = 'DOC'
client = CouchDBClient(connection_str)
with requests_mock.Mocker() as doc_check:
doc_check.register_uri('HEAD', f'{client.db_uri}/{doc_id}', status_code=404)
doc_check.register_uri('POST', f'{client.db_uri}', status_code=201, json = {"rev":"362-6053b30578b8ca949d50ba125c76c4e9"})
doc_check.register_uri('PUT', f'{client.db_uri}/{doc_id}/test.py', status_code=201)
with open(__file__, 'rb') as fp:
client.upload_file(fp, f'{doc_id}/test.py')
def test_upload_bytes_as_file():
import json
host = '127.0.0.1'
port = '5984'
database = 'test'
connection_str = f'couchdb://{host}:{port}/{database}'
doc_id = 'DOC'
my_data = {
'name': 'thanos'
}
attachment_file_name = 'takis/takis/catelog.json'
client = CouchDBClient(connection_str)
with requests_mock.Mocker() as doc_check:
doc_check.register_uri('HEAD', f'{client.db_uri}/{doc_id}', status_code=404)
doc_check.register_uri('POST', f'{client.db_uri}', status_code=201, json = {"rev":"362-6053b30578b8ca949d50ba125c76c4e9"})
doc_check.register_uri('PUT', f'{client.db_uri}/{doc_id}/{attachment_file_name}', status_code=201)
with open(__file__, 'rb') as fp:
client.upload_bytes_file(bytes(json.dumps(my_data), 'utf-8'), f'{doc_id}/{attachment_file_name}')
def test_init_db_clean():
import json
host = '127.0.0.1'
port = '5984'
database = 'test'
connection_str = f'couchdb://{host}:{port}/{database}'
doc_id = 'DOC'
my_data = {
'name': 'thanos'
}
attachment_file_name = 'takis/takis/catelog.json'
client = CouchDBClient(connection_str)
with requests_mock.Mocker() as doc_check:
doc_check.register_uri('HEAD', f'{client.db_uri}', status_code=404)
doc_check.register_uri('PUT', f'{client.db_uri}')
doc_check.register_uri('HEAD', f'{client.db_uri}/{client.COUCHFS_VIEWS["_id"]}', status_code=404)
doc_check.register_uri('POST', f'{client.db_uri}', status_code=201,
json={"rev": "362-6053b30578b8ca949d50ba125c76c4e9"})
with open(__file__, 'rb') as fp:
client.init_db()
| 37.04329
| 311
| 0.622181
| 1,144
| 8,557
| 4.446678
| 0.134615
| 0.089444
| 0.049735
| 0.04482
| 0.784942
| 0.762532
| 0.762532
| 0.750147
| 0.732455
| 0.702182
| 0
| 0.0528
| 0.196564
| 8,557
| 231
| 312
| 37.04329
| 0.687127
| 0
| 0
| 0.704082
| 0
| 0
| 0.293079
| 0.150573
| 0
| 0
| 0
| 0
| 0.076531
| 1
| 0.076531
| false
| 0.02551
| 0.030612
| 0
| 0.117347
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
4c6c977a376572e4d96c430b9a24bbe4a64017b6
| 54
|
py
|
Python
|
emaileer/kancyemail.py
|
kancyframework/python-plugins
|
430d0f781b5669d8e6ad83f7af0782b672c43db5
|
[
"MIT"
] | 1
|
2021-12-11T12:44:12.000Z
|
2021-12-11T12:44:12.000Z
|
emaileer/kancyemail.py
|
kancyframework/python-plugins
|
430d0f781b5669d8e6ad83f7af0782b672c43db5
|
[
"MIT"
] | null | null | null |
emaileer/kancyemail.py
|
kancyframework/python-plugins
|
430d0f781b5669d8e6ad83f7af0782b672c43db5
|
[
"MIT"
] | null | null | null |
"""
组件emaileer的别名kancyemail
"""
from emaileer import *
| 13.5
| 23
| 0.759259
| 4
| 54
| 10.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 54
| 4
| 24
| 13.5
| 0.854167
| 0.425926
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 6
|
910c6fee6ffcff5a3002877bd33d370472bbdef2
| 4,003
|
py
|
Python
|
app/src/search.py
|
LukeZSW/yelp_recommendation_system
|
62ef9ee3f14417c0ab0f1c50b8bfce8b470a20b0
|
[
"MIT"
] | null | null | null |
app/src/search.py
|
LukeZSW/yelp_recommendation_system
|
62ef9ee3f14417c0ab0f1c50b8bfce8b470a20b0
|
[
"MIT"
] | null | null | null |
app/src/search.py
|
LukeZSW/yelp_recommendation_system
|
62ef9ee3f14417c0ab0f1c50b8bfce8b470a20b0
|
[
"MIT"
] | null | null | null |
# -*- coding: UTF-8 -*-
# retrieve information by whoosh library
# two methods: BM25F (default) and TF_IDF
# combine with CF
from whoosh import index
from whoosh.fields import *
from whoosh.qparser import MultifieldParser
from whoosh.qparser.dateparse import DateParserPlugin
from whoosh import scoring, query, sorting, qparser
from .collaborative_filtering import user_cf
import numpy as np
def query_search(indexdir, queries, n=10, function='BM25F'):
ix = index.open_dir(indexdir)
search_fields = ['resname', 'categories', 'address', 'city', 'state'] # search fields
og = qparser.OrGroup.factory(0.9)
qp = MultifieldParser(search_fields, ix.schema, termclass=query.Variations, group=og)
qp.add_plugin(DateParserPlugin(free=True))
q = qp.parse(queries)
result_index = []
if function == 'BM25F':
with ix.searcher(weighting=scoring.BM25F(B=0.75, K1=1.2)) as s:
rates = sorting.FieldFacet('rating', reverse=True)
scores = sorting.ScoreFacet()
results = s.search(q, limit=n, sortedby=[scores, rates])
k = min(len(results), n)
for i in range(k):
result_index.append(int(results[i]['ID']))
if function == 'TF_IDF':
with ix.searcher(weighting=scoring.TF_IDF()) as s:
rates = sorting.FieldFacet('rating', reverse=True)
scores = sorting.ScoreFacet()
results = s.search(q, limit=n, sortedby=[scores, rates])
k = min(len(results), n)
for i in range(k):
result_index.append(int(results[i]['ID']))
return result_index
def person_query_search(indexdir, queries, user_id, E, n=10, function='BM25F'):
prediction = user_cf(E, user_id, 3)
ix = index.open_dir(indexdir)
search_fields = ['resname', 'categories', 'address', 'city', 'state'] # search fields
og = qparser.OrGroup.factory(0.9)
qp = MultifieldParser(search_fields, ix.schema, termclass=query.Variations, group=og)
qp.add_plugin(DateParserPlugin(free=True))
q = qp.parse(queries)
result_index = []
if function == 'BM25F':
# with ix.searcher(weighting=scoring.BM25F(B=0.75, resname_B = 1.0, categories_B = 0.8, K1=1.2)) as s:
# add weight for the resname and the categories_B
with ix.searcher(weighting=scoring.BM25F(B=0.75, K1=1.2)) as s:
scores = sorting.ScoreFacet()
results = s.search(q, limit=None, sortedby=[scores])
m = len(results)
if m != 0:
relevance = np.zeros(m)
expected = np.zeros(m)
for i in range(m):
relevance[i] = - results[i].score
relevance = (relevance - relevance.min()) / (relevance.max() - relevance.min())
# normalized score from 0 to 1
for i in range(m):
expected[i] = relevance[i] * prediction[int(results[i]['ID'])]
indorder = np.argsort(expected)
k = min(m, n)
for i in range(k):
result_index.append(int(results[indorder[-1-i]]['ID']))
if function == 'TF_IDF':
with ix.searcher(weighting=scoring.TF_IDF()) as s:
scores = sorting.ScoreFacet()
results = s.search(q, limit=m, sortedby=[scores])
m = len(results)
if m != 0:
relevance = np.zeros(m)
expected = np.zeros(m)
for i in range(m):
relevance[i] = - results[i].score
relevance = (relevance - relevance.min())/(relevance.max() - relevance.min()) # normalized score from 0 to 1
for i in range(m):
expected[i] = relevance[i] * prediction[int(results[i]['ID'])]
indorder = np.argsort(expected)
k = min(m, n)
for i in range(k):
result_index.append(int(results[indorder[-1-i]]['ID']))
return result_index
| 44.977528
| 125
| 0.584062
| 506
| 4,003
| 4.557312
| 0.22332
| 0.038161
| 0.020815
| 0.038161
| 0.780572
| 0.762793
| 0.762793
| 0.762793
| 0.762793
| 0.762793
| 0
| 0.019567
| 0.285036
| 4,003
| 88
| 126
| 45.488636
| 0.786164
| 0.087684
| 0
| 0.842105
| 0
| 0
| 0.033507
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.026316
| false
| 0
| 0.092105
| 0
| 0.144737
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
9134b292537299996182b965d07df6ee3c8dfc97
| 550
|
py
|
Python
|
pypact/analysis/__init__.py
|
zxkjack123/pypact
|
8b37f42007e0accabc9fb31d4ab76935b559d817
|
[
"Apache-2.0"
] | 18
|
2018-01-22T14:00:18.000Z
|
2022-03-08T06:29:22.000Z
|
pypact/analysis/__init__.py
|
listato/pypact
|
a418ba218cdf4a25ae3e7d72e0919905d027d2ba
|
[
"Apache-2.0"
] | 28
|
2018-12-07T14:30:46.000Z
|
2022-02-27T20:33:06.000Z
|
pypact/analysis/__init__.py
|
listato/pypact
|
a418ba218cdf4a25ae3e7d72e0919905d027d2ba
|
[
"Apache-2.0"
] | 8
|
2018-05-29T13:41:59.000Z
|
2021-01-21T01:33:41.000Z
|
from pypact.analysis.plotadapter import LinePlotAdapter
from pypact.analysis.plotadapter import MatrixPlotAdapter
from pypact.analysis.plotadapter import AnimatedMatrixPlotAdapter
from pypact.analysis.propertyplotter import NuclideDataEntry
from pypact.analysis.propertyplotter import plotproperty
from pypact.analysis.timezone import TimeZone
from pypact.library.nuclidelib import find_isotopes
from pypact.library.nuclidelib import find_element
from pypact.library.nuclidelib import find_z
from pypact.library.nuclidelib import get_all_isotopes
| 39.285714
| 65
| 0.885455
| 65
| 550
| 7.415385
| 0.307692
| 0.207469
| 0.224066
| 0.224066
| 0.678423
| 0.23029
| 0
| 0
| 0
| 0
| 0
| 0
| 0.078182
| 550
| 13
| 66
| 42.307692
| 0.95069
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 6
|
91374a9ff9e878c694ad7a5ee7dccc40cf2e5a9e
| 130,550
|
py
|
Python
|
functional_tests/sample/test_questionnaire.py
|
SCiO-systems/qcat
|
8c2b8e07650bc2049420fa6de758fba7e50c2f28
|
[
"Apache-2.0"
] | null | null | null |
functional_tests/sample/test_questionnaire.py
|
SCiO-systems/qcat
|
8c2b8e07650bc2049420fa6de758fba7e50c2f28
|
[
"Apache-2.0"
] | null | null | null |
functional_tests/sample/test_questionnaire.py
|
SCiO-systems/qcat
|
8c2b8e07650bc2049420fa6de758fba7e50c2f28
|
[
"Apache-2.0"
] | null | null | null |
import pytest
from django.urls import reverse
from django.http import JsonResponse
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from unittest.mock import patch
from elasticmock import elasticmock
from apps.accounts.models import User
from functional_tests.base import FunctionalTest
from apps.questionnaire.views import QuestionnaireLinkSearchView
from apps.sample.tests.test_views import (
route_questionnaire_list,
route_questionnaire_new,
route_questionnaire_new_step,
get_category_count,
)
from apps.search.tests.test_index import create_temp_indices
from functional_tests.pages.sample import SampleDetailPage, SampleEditPage, \
SampleStepPage
from functional_tests.pages.samplemulti import SampleMultiDetailPage, \
SampleMultiEditPage, SampleMultiStepPage
@elasticmock
class QuestionnaireTest(FunctionalTest):
fixtures = [
'sample_global_key_values',
'sample',
]
# def test_numbered_questiongroups(self):
#
# # Alice logs in
# self.doLogin()
#
# # She goes to a step of the questionnaire
# self.browser.get(self.live_server_url + reverse(
# route_questionnaire_new_step,
# kwargs={'identifier': 'new', 'step': 'cat_3'}))
#
# # She sees that the Questiongroup with Key 9 is numbered
# fieldset = self.findBy('xpath', '//fieldset[@class="row"][2]')
#
# numbered_1 = self.findBy(
# 'xpath', '(//p[contains(@class, "questiongroup-numbered-number"'
# ')])[1]', base=fieldset)
# self.assertEqual(numbered_1.text, '1:')
# numbered_2 = self.findBy(
# 'xpath', '(//p[contains(@class, "questiongroup-numbered-number"'
# ')])[2]', base=fieldset)
# self.assertEqual(numbered_2.text, '2:')
#
# # She enters some data for the Keys 9
# self.findBy('id', 'id_qg_7-0-original_key_9').send_keys(
# 'This is the first key')
# self.findBy('id', 'id_qg_7-1-original_key_9').send_keys('Second key')
#
# # She submits the step and sees the values are presented in the
# # correct order in the overview
# self.findBy('id', 'button-submit').click()
# res = self.findManyBy(
# 'xpath', '//div[contains(@class, "questiongroup-numbered-right")]')
#
# self.assertEqual(len(res), 2)
# self.assertIn('This is the first key', res[0].text)
# self.assertIn('Second key', res[1].text)
#
# # She starts editing again and sees that the keys are displayed
# # in the correct order
# self.browser.get(self.live_server_url + reverse(
# route_questionnaire_new_step,
# kwargs={'identifier': 'new', 'step': 'cat_3'}))
# self.findBy(
# 'xpath', '//input[@id="id_qg_7-0-original_key_9" and @value="This '
# 'is the first key"]')
# self.findBy(
# 'xpath', '//input[@id="id_qg_7-1-original_key_9" and @value="'
# 'Second key"]')
#
# fieldset = self.findBy('xpath', '//fieldset[@class="row"][2]')
#
# # She changes the order of the keys by drag-and-drop
# el_1 = self.findBy(
# 'xpath', '//fieldset[@class="row"][2]//p[contains(@class, '
# '"questiongroup-numbered-number")][1]',
# base=fieldset)
# ActionChains(self.browser).click_and_hold(
# on_element=el_1).move_by_offset(0, 100).release().perform()
#
# # She submits the step and sees the values are presented in the
# # correct order in the overview
# self.findBy('id', 'button-submit').click()
#
# res = self.findManyBy(
# 'xpath', '//div[contains(@class, "questiongroup-numbered-right")]')
# self.assertEqual(len(res), 2)
# self.assertIn('Second key', res[0].text)
# self.assertIn('This is the first key', res[1].text)
#
# # She goes back to the form and sees the order persists
# self.browser.get(self.live_server_url + reverse(
# route_questionnaire_new_step,
# kwargs={'identifier': 'new', 'step': 'cat_3'}))
# self.findBy(
# 'xpath', '//input[@id="id_qg_7-0-original_key_9" and @value="'
# 'Second key"]')
# self.findBy(
# 'xpath', '//input[@id="id_qg_7-1-original_key_9" and @value="'
# 'This is the first key"]')
#
# # She submits the step and the entire questionnaire
# self.findBy('id', 'button-submit').click()
# self.findBy('id', 'button-submit').click()
#
# # She sees that the values were submitted correctly
# self.findBy('xpath', '//div[contains(@class, "success")]')
# res = self.findManyBy(
# 'xpath', '//div[contains(@class, "questiongroup-numbered-right")]')
# self.assertEqual(len(res), 2)
# self.assertIn('Second key', res[0].text)
# self.assertIn('This is the first key', res[1].text)
# def test_numbered_questiongroups_2(self):
#
# # Alice logs in
# self.doLogin()
#
# # She goes to a step of the questionnaire
# self.browser.get(self.live_server_url + reverse(
# route_questionnaire_new_step,
# kwargs={'identifier': 'new', 'step': 'cat_3'}))
#
# # She sees that the Questiongroup with Keys 17 and 18 is numbered
# fieldset = self.findBy('xpath', '//fieldset[@class="row"][1]')
#
# numbered_1 = self.findBy(
# 'xpath', '(//p[contains(@class, "questiongroup-numbered-number"'
# ')])[1]', base=fieldset)
# self.assertEqual(numbered_1.text, '1:')
# numbered_2 = self.findBy(
# 'xpath', '(//p[contains(@class, "questiongroup-numbered-number"'
# ')])[2]', base=fieldset)
# self.assertEqual(numbered_2.text, '2:')
#
# # She enters some data for the Keys 17 and 18
# self.findBy('id', 'id_qg_13-0-original_key_17').send_keys('Key 17 - 1')
# self.findBy('id', 'id_qg_13-0-original_key_18').send_keys('Key 18 - 1')
# self.findBy('id', 'id_qg_13-1-original_key_17').send_keys('Key 17 - 2')
# self.findBy('id', 'id_qg_13-1-original_key_18').send_keys('Key 18 - 2')
#
# # She submits the step and sees the values are presented in the
# # correct order in the overview
# self.findBy('id', 'button-submit').click()
# res = self.findManyBy(
# 'xpath', '//div[contains(@class, "questiongroup-numbered-right")]')
# self.assertEqual(len(res), 2)
# self.assertIn('Key 17 - 1', res[0].text)
# self.assertIn('Key 18 - 1', res[0].text)
# self.assertIn('Key 17 - 2', res[1].text)
# self.assertIn('Key 18 - 2', res[1].text)
#
# # She starts editing again and sees that the keys are displayed
# # in the correct order
# self.browser.get(self.live_server_url + reverse(
# route_questionnaire_new_step,
# kwargs={'identifier': 'new', 'step': 'cat_3'}))
# self.findBy(
# 'xpath', '//input[@id="id_qg_13-0-original_key_17" and '
# '@value="Key 17 - 1"]')
# self.findBy(
# 'xpath', '//textarea[@id="id_qg_13-0-original_key_18" and '
# 'text()="Key 18 - 1"]')
# self.findBy(
# 'xpath', '//input[@id="id_qg_13-1-original_key_17" and '
# '@value="Key 17 - 2"]')
# self.findBy(
# 'xpath', '//textarea[@id="id_qg_13-1-original_key_18" and '
# 'text()="Key 18 - 2"]')
#
# self.findByNot(
# 'xpath', '//input[@id="id_qg_13-2-original_key_17"]')
#
# # She adds another questiongroup
# self.findBy(
# 'xpath', '//fieldset[@class="row"][1]//div[contains(@class, '
# '"questiongroup")][3]//a[contains(text(), "Add More")]').click()
#
# # The new questiongroup has the number 3:
# fieldset = self.findBy('xpath', '//fieldset[@class="row"][1]')
# numbered_3 = self.findBy(
# 'xpath', '//fieldset[@class="row"][1]//div[contains(@class, '
# '"questiongroup")][3]/div[contains(@class, "row")][3]//p['
# 'contains(@class, "questiongroup-numbered-number")]')
# self.assertEqual(numbered_3.text, '3:')
#
# # She adds some content to the 3rd questiongroup
# self.findBy('id', 'id_qg_13-2-original_key_17').send_keys('Key 17 - 3')
# self.findBy('id', 'id_qg_13-2-original_key_18').send_keys('Key 18 - 3')
#
# # She also decides to change the order
# el_1 = self.findBy(
# 'xpath', '//fieldset[@class="row"][1]/div[contains(@class, '
# '"questiongroup")][3]/div[contains(@class, "row")][2]//p['
# 'contains(@class, "questiongroup-numbered-number")]')
# ActionChains(self.browser).click_and_hold(
# on_element=el_1).move_by_offset(0, -200).release().perform()
#
# # She submits the step and sees the values are presented in the
# # correct order in the overview
# self.findBy('id', 'button-submit').click()
# res = self.findManyBy(
# 'xpath', '//div[contains(@class, "questiongroup-numbered-right")]')
# self.assertEqual(len(res), 3)
# self.assertIn('Key 17 - 2', res[0].text)
# self.assertIn('Key 18 - 2', res[0].text)
# self.assertIn('Key 17 - 1', res[1].text)
# self.assertIn('Key 18 - 1', res[1].text)
# self.assertIn('Key 17 - 3', res[2].text)
# self.assertIn('Key 18 - 3', res[2].text)
#
# # She goes back to the form and sees the order persists
# self.browser.get(self.live_server_url + reverse(
# route_questionnaire_new_step,
# kwargs={'identifier': 'new', 'step': 'cat_3'}))
#
# self.findBy(
# 'xpath', '//input[@id="id_qg_13-0-original_key_17" and '
# '@value="Key 17 - 2"]')
# self.findBy(
# 'xpath', '//textarea[@id="id_qg_13-0-original_key_18" and '
# 'text()="Key 18 - 2"]')
# self.findBy(
# 'xpath', '//input[@id="id_qg_13-1-original_key_17" and '
# '@value="Key 17 - 1"]')
# self.findBy(
# 'xpath', '//textarea[@id="id_qg_13-1-original_key_18" and '
# 'text()="Key 18 - 1"]')
# self.findBy(
# 'xpath', '//input[@id="id_qg_13-2-original_key_17" and '
# '@value="Key 17 - 3"]')
# self.findBy(
# 'xpath', '//textarea[@id="id_qg_13-2-original_key_18" and '
# 'text()="Key 18 - 3"]')
#
# # She submits the step and the entire questionnaire
# self.findBy('id', 'button-submit').click()
# self.findBy('id', 'button-submit').click()
#
# # She sees that the values were submitted correctly
# self.findBy('xpath', '//div[contains(@class, "success")]')
# res = self.findManyBy(
# 'xpath', '//div[contains(@class, "questiongroup-numbered-right")]')
# self.assertEqual(len(res), 3)
# self.assertIn('Key 17 - 2', res[0].text)
# self.assertIn('Key 18 - 2', res[0].text)
# self.assertIn('Key 17 - 1', res[1].text)
# self.assertIn('Key 18 - 1', res[1].text)
# self.assertIn('Key 17 - 3', res[2].text)
# self.assertIn('Key 18 - 3', res[2].text)
def test_repeating_questiongroups(self):
initial_button_count = 4
# Alice logs in
self.doLogin()
# She goes to a step of the questionnaire
self.browser.get(self.live_server_url + reverse(
route_questionnaire_new_step,
kwargs={'identifier': 'new', 'step': 'cat_3'}))
self.rearrangeFormHeader()
# She sees the helptext
self.checkOnPage('Helptext 1')
# She sees many buttons to add more questions
add_more_buttons = self.findManyBy(
'xpath', '//a[@data-questiongroup-keyword]')
self.assertEqual(len(add_more_buttons), initial_button_count)
# She sees the first questiongroups which has no possibility to
# add more questions
self.findBy('name', 'qg_5-0-original_key_7')
self.findByNot('name', 'qg_5-1-original_key_7')
# The second questiongroup is shown only once but can be
# repeated up to 3 times
self.findBy('name', 'qg_6-0-original_key_8').send_keys('1')
self.findByNot('name', 'qg_6-1-original_key_8')
btn_add_more_qg_6 = self.findBy(
'xpath', '//a[@data-questiongroup-keyword="qg_6"]')
self.assertTrue(btn_add_more_qg_6.is_displayed())
# She adds another one and sees there is a remove button
btn_add_more_qg_6.click()
self.assertTrue(btn_add_more_qg_6.is_displayed())
self.findBy('name', 'qg_6-1-original_key_8').send_keys('2')
self.findByNot('name', 'qg_6-2-original_key_8')
remove_buttons = self.findManyBy(
'xpath',
'//a[@data-remove-this and not(contains(@style,"display: none"))]')
self.assertEqual(len(remove_buttons), 2)
# And yet another one. The maximum is reached and the button to add
# one more is hidden.
btn_add_more_qg_6.click()
self.assertFalse(btn_add_more_qg_6.is_displayed())
self.findBy('name', 'qg_6-1-original_key_8')
self.findBy('name', 'qg_6-2-original_key_8').send_keys('3')
remove_buttons = self.findManyBy(
'xpath',
'//a[@data-remove-this and not(contains(@style,"display: none"))]')
self.assertEqual(len(remove_buttons), 3)
# She removes the middle one and sees that the correct one is
# removed and the names of the other ones are updated.
remove_buttons[1].click()
f1 = self.findBy('name', 'qg_6-0-original_key_8')
self.assertEqual(f1.get_attribute('value'), '1')
f2 = self.findBy('name', 'qg_6-1-original_key_8')
self.assertEqual(f2.get_attribute('value'), '3')
self.findByNot('name', 'qg_6-2-original_key_8')
remove_buttons = self.findManyBy(
'xpath',
'//a[@data-remove-this and not(contains(@style,"display: none"))]')
self.assertEqual(len(remove_buttons), 2)
# She removes the first one and sees that only one remains with
# no button to remove it
remove_buttons[0].click()
f1 = self.findBy('name', 'qg_6-0-original_key_8')
self.assertEqual(f1.get_attribute('value'), '3')
self.findByNot('name', 'qg_6-1-original_key_8')
self.findByNot('name', 'qg_6-2-original_key_8')
self.findByNot(
'xpath',
'//a[@data-remove-this and not(contains(@style,"display: none"))]')
# The third questiongroup appears two times but has no buttons
self.findBy('name', 'qg_7-0-original_key_9').send_keys('a')
self.findBy('name', 'qg_7-1-original_key_9').send_keys('b')
# The fourth questiongroup has two minimum fields and maximum 3
self.findBy('name', 'qg_8-0-original_key_10').send_keys('x')
self.findBy('name', 'qg_8-1-original_key_10').send_keys('y')
self.findByNot('name', 'qg_8-2-original_key_10')
# She adds one questiongroup and sees the button to remove it 3 times.
btn_add_more_qg_8 = self.findBy(
'xpath', '//a[@data-questiongroup-keyword="qg_8"]')
btn_add_more_qg_8.click()
self.findBy('name', 'qg_8-2-original_key_10').send_keys('z')
remove_buttons = self.findManyBy(
'xpath',
'//a[@data-remove-this and not(contains(@style,"display: none"))]')
self.assertEqual(len(remove_buttons), 3)
# The button to add another one is not visible anymore
self.assertFalse(btn_add_more_qg_8.is_displayed())
# She submits the form
self.findBy('id', 'button-submit').click()
# She sees the values were submitted
self.findBy('xpath', '//*[text()[contains(.,"Key 8")]]')
self.assertEqual(len(self.findManyBy(
'xpath', '//*[text()[contains(.,"Key 9")]]')), 2)
self.assertEqual(len(self.findManyBy(
'xpath', '//*[text()[contains(.,"Key 10")]]')), 3)
# She edits again
self.click_edit_section('cat_3')
# Key 8 is there only once
f1 = self.findBy('name', 'qg_6-0-original_key_8')
self.assertEqual(f1.get_attribute('value'), '3')
self.findByNot('name', 'qg_6-1-original_key_8')
self.findByNot('name', 'qg_6-2-original_key_8')
# Key 10 is there 3 times
f1 = self.findBy('name', 'qg_8-0-original_key_10')
self.assertEqual(f1.get_attribute('value'), 'x')
f2 = self.findBy('name', 'qg_8-1-original_key_10')
self.assertEqual(f2.get_attribute('value'), 'y')
f3 = self.findBy('name', 'qg_8-2-original_key_10')
self.assertEqual(f3.get_attribute('value'), 'z')
# The button to add onther one is not visible
btn_add_more_qg_8 = self.findBy(
'xpath', '//a[@data-questiongroup-keyword="qg_8"]')
self.assertFalse(btn_add_more_qg_8.is_displayed())
# She removes one Key 10 and submits the form again
remove_buttons = self.findManyBy(
'xpath',
'//a[@data-remove-this and not(contains(@style,"display: none"))]')
self.assertEqual(len(remove_buttons), 3)
remove_buttons[0].click()
self.findByNot(
'xpath',
'//a[@data-remove-this and not(contains(@style,"display: none"))]')
self.findBy('id', 'button-submit').click()
self.review_action('submit')
def test_form_progress(self):
# Alice logs in
self.doLogin()
# She goes directly to the Sample questionnaire
self.browser.get(self.live_server_url + reverse(
route_questionnaire_new))
# She sees that all progress bars are to 0%
progress_indicators = self.findManyBy(
'xpath',
'//div[@class="tech-section-progress"]/span[@class="steps"]')
self.assertEqual(len(progress_indicators), get_category_count())
for x in progress_indicators:
self.assertIn('0/', x.text)
progress_bars = self.findManyBy(
'xpath', '//span[@class="meter" and @style="width:0%"]')
self.assertEqual(len(progress_bars), len(progress_indicators))
# She goes to the first category and sees another progress bar
self.click_edit_section('cat_1')
self.findBy('xpath', '//span[@class="meter" and @style="width:0%"]')
completed_steps = self.findBy('class_name', 'progress-completed')
self.assertEqual(completed_steps.text, '0')
total_steps = self.findBy('class_name', 'progress-total')
self.assertEqual(total_steps.text, '2')
# She types something in the first field and sees that the
# progress bar changed
self.findBy('name', 'qg_1-0-original_key_1').send_keys('Foo')
self.findBy('name', 'qg_1-0-original_key_3').send_keys('')
self.findByNot('xpath', '//span[@class="meter" and @style="width:0%"]')
self.findBy('xpath', '//span[@class="meter" and @style="width: 50%;"]')
completed_steps = self.findBy('class_name', 'progress-completed')
self.assertEqual(completed_steps.text, '1')
# She saves the step and sees that the progress bar on the
# overview page has changed
self.findBy('id', 'button-submit').click()
progress_bars = self.findManyBy(
'xpath', '//span[@class="meter" and @style="width:0%"]')
self.assertEqual(len(progress_bars), get_category_count() - 1)
progress_bars = self.findBy(
'xpath', '//span[@class="meter" and @style="width:50%"]')
progress_indicator = self.findBy(
'xpath',
'(//div[@class="tech-section-progress"])[2]/span[@class="steps"]')
self.assertIn('1/2', progress_indicator.text)
# She decides to edit the step again and deletes what she
# entered. She notices that the bar is back to 0, also on the
# overview page.
self.click_edit_section('cat_1')
self.findBy('xpath', '//span[@class="meter" and @style="width: 50%;"]')
self.findBy('name', 'qg_1-0-original_key_1').clear()
self.findBy('name', 'qg_1-0-original_key_3').send_keys('')
self.findBy('xpath', '//span[@class="meter" and @style="width: 0%;"]')
self.findBy('id', 'button-submit').click()
progress_indicators = self.findManyBy(
'xpath',
'//div[@class="tech-section-progress"]/span[@class="steps"]')
self.assertEqual(len(progress_indicators), get_category_count())
for x in progress_indicators:
self.assertIn('0/', x.text)
progress_bars = self.findManyBy(
'xpath', '//span[@class="meter" and @style="width:0%"]')
self.assertEqual(len(progress_bars), len(progress_indicators))
# She sees that step 0 has only 2 categories listed, although it
# contains 3 (a subcategory which has no content)
progress_indicator = self.findBy(
'xpath',
'(//div[@class="tech-section-progress"])[1]/span[@class="steps"]')
self.assertIn('0/2', progress_indicator.text)
# She finally goes to step 0 of the questionnaire and also there, sees a
# subcategory with no content and she notices it is not counted for the
# progress
self.click_edit_section('cat_0')
self.findBy('xpath', '//legend[contains(text(), "Subcategory 0_1")]')
self.findBy('xpath', '//legend[contains(text(), "Subcategory 0_2")]')
self.findBy('xpath', '//legend[contains(text(), "Subcategory 0_3")]')
completed_steps = self.findBy('class_name', 'progress-completed')
self.assertEqual(completed_steps.text, '0')
total_steps = self.findBy('class_name', 'progress-total')
self.assertEqual(total_steps.text, '2')
self.findBy('name', 'qg_31-0-original_key_45').send_keys('foo')
self.findBy('name', 'qg_31-0-original_key_46').send_keys('bar')
completed_steps = self.findBy('class_name', 'progress-completed')
self.assertEqual(completed_steps.text, '1')
total_steps = self.findBy('class_name', 'progress-total')
self.assertEqual(total_steps.text, '2')
def test_textarea_maximum_length(self):
# Alice logs in
self.doLogin()
# She goes to a step of the questionnaire
self.browser.get(self.live_server_url + reverse(
route_questionnaire_new_step,
kwargs={'identifier': 'new', 'step': 'cat_1'}))
# She tries to enter a lot of characters to Key 2, which is
# limited to 50 chars. Only the first 50 characters are entered
key_2 = self.findBy('id', 'id_qg_2-0-original_key_2')
key_2.send_keys("x" * 60)
self.assertEqual(key_2.get_attribute('value'), "x" * 50)
# She sees that the textarea is only 2 rows high
self.assertEqual(int(key_2.get_attribute('rows')), 2)
# She tries to enter a huge amount of characters to Key 6 which
# has a default max_length of 500. Again, only the first 500
# characters are entered.
# key_6 = self.findBy('id', 'id_qg_3-0-original_key_6')
# key_6.send_keys("x" * 600)
# self.assertEqual(key_6.get_attribute('value'), "x" * 500)
# # She sees that the textarea is by default 10 rows high
# self.assertEqual(int(key_6.get_attribute('rows')), 10)
# She tries the same with the first Key 3, a textfield with 50
# chars limit
key_3_1 = self.findBy('id', 'id_qg_1-0-original_key_3')
key_3_1.send_keys("x" * 60)
self.assertEqual(key_3_1.get_attribute('value'), "x" * 50)
# # The second Key 3 is a textfield with the default limit of 200
# key_3_2 = self.findBy('id', 'id_qg_2-0-original_key_3')
# key_3_2.send_keys("x" * 210)
# self.assertEqual(key_3_2.get_attribute('value'), "x" * 200)
# By some hack, she enters more values than allowed in Key 2 and
# she tries to submit the form
self.browser.execute_script(
"document.getElementById('id_qg_2-0-original_key_2')."
"value='{}'".format("x" * 600))
self.findBy('id', 'button-submit').click()
# She sees an error message and the form was not submitted
self.findBy('xpath', '//div[contains(@class, "alert")]')
# She enters an accepted amount of characters and can submit the
# form completely
self.findBy('id', 'id_qg_2-0-original_key_2').clear()
self.findBy('id', 'id_qg_2-0-original_key_2').send_keys("x" * 60)
self.submit_form_step()
self.review_action('submit')
def test_textarea_preserves_line_breaks(self):
# Alice logs in
self.doLogin()
# She goes to a step of the questionnaire
self.browser.get(self.live_server_url + reverse(
route_questionnaire_new_step,
kwargs={'identifier': 'new', 'step': 'cat_1'}))
# She enters some value for Key 2 with linebreaks
textarea = self.findBy('id', 'id_qg_2-0-original_key_2')
textarea.send_keys('asdf')
textarea.send_keys(Keys.RETURN)
textarea.send_keys('asdf')
# She submits the form
self.submit_form_step()
self.wait_for('xpath', '//p[contains(text(), "asdf")]')
# She sees the values were submitted with linebreaks
self.findBy('xpath', '//*[contains(text(), "Key 2")]')
details = self.findBy('xpath', '//p[contains(text(), "asdf")]')
self.assertEqual(details.text, 'asdf\nasdf')
self.review_action('submit')
def test_nested_subcategories(self):
# Alice logs in
self.doLogin()
# She goes to a step of the questionnaire
self.browser.get(self.live_server_url + reverse(
route_questionnaire_new_step,
kwargs={'identifier': 'new', 'step': 'cat_2'}))
# She sees values which are inside nested subcategories
self.findBy('id', 'id_qg_19-0-original_key_5')
self.findBy('id', 'id_qg_20-0-original_key_25')
self.findBy('id', 'id_qg_21-0-original_key_26')
# She sees the progress is at 0
self.findBy('xpath', '//span[@class="meter" and @style="width:0%"]')
# She submits the form empty and sees that no values were submitted
self.submit_form_step()
self.findByNot('xpath', '//*[text()[contains(.,"Key 5")]]')
self.findByNot('xpath', '//*[text()[contains(.,"Key 25")]]')
self.findByNot('xpath', '//*[text()[contains(.,"Key 26")]]')
progress_indicator = self.findBy(
'xpath',
'(//div[@class="tech-section-progress"])[3]/span[@class="steps"]')
self.assertIn('0/', progress_indicator.text)
# She goes back to the step and fills out some fields
self.click_edit_section('cat_2')
self.findBy('id', 'id_qg_19-0-original_key_5').send_keys('Foo')
self.findBy('id', 'id_qg_20-0-original_key_25').send_keys('')
self.findBy('xpath', '//span[@class="meter" and @style="width: 25%;"]')
self.findBy('id', 'id_qg_21-0-original_key_26').send_keys('Bar')
self.findBy('id', 'id_qg_20-0-original_key_25').send_keys('')
self.findBy('xpath', '//span[@class="meter" and @style="width: 50%;"]')
# She submits the form and sees the values were submitted
self.submit_form_step()
self.findBy('xpath', '//*[text()[contains(.,"Key 5")]]')
self.findBy('xpath', '//*[text()[contains(.,"Foo")]]')
self.findBy('xpath', '//*[text()[contains(.,"Key 26")]]')
self.findBy('xpath', '//*[text()[contains(.,"Bar")]]')
self.findByNot('xpath', '//*[text()[contains(.,"Key 25")]]')
# She sees that value to key 25 was only submitted once
key_26 = self.findManyBy('xpath', '//*[text()[contains(.,"Key 26")]]')
self.assertEqual(len(key_26), 1)
# She goes back to the form and sees that the values are populated
# correctly in the form
self.click_edit_section('cat_2')
self.findBy('xpath', '//span[@class="meter" and @style="width: 50%;"]')
self.assertEqual(self.findBy(
'id', 'id_qg_19-0-original_key_5').get_attribute('value'), 'Foo')
self.assertEqual(self.findBy(
'id', 'id_qg_21-0-original_key_26').get_attribute('value'), 'Bar')
self.findBy('id', 'id_qg_20-0-original_key_25').send_keys('Faz')
# She submits the form and sees the values were submitted
self.submit_form_step()
self.findBy('xpath', '//*[text()[contains(.,"Key 5")]]')
self.findBy('xpath', '//*[text()[contains(.,"Foo")]]')
self.findBy('xpath', '//*[text()[contains(.,"Key 26")]]')
self.findBy('xpath', '//*[text()[contains(.,"Bar")]]')
self.findBy('xpath', '//*[text()[contains(.,"Key 25")]]')
self.findBy('xpath', '//*[text()[contains(.,"Faz")]]')
# She submits the form completely and sees the values were submitted
self.review_action('submit')
self.findBy('xpath', '//*[text()[contains(.,"Key 5")]]')
self.findBy('xpath', '//*[text()[contains(.,"Foo")]]')
self.findBy('xpath', '//*[text()[contains(.,"Key 26")]]')
self.findBy('xpath', '//*[text()[contains(.,"Bar")]]')
self.findBy('xpath', '//*[text()[contains(.,"Key 25")]]')
self.findBy('xpath', '//*[text()[contains(.,"Faz")]]')
def test_selects_with_chosen(self):
# Alice logs in
self.doLogin()
# She goes to a step of the questionnaire
self.browser.get(self.live_server_url + reverse(
route_questionnaire_new_step,
kwargs={'identifier': 'new', 'step': 'cat_1'}))
# She sees Key 4, which is a select, rendered with Chosen.
# Initially, no value is selected.
self.findBy('xpath', '//select[@name="qg_3-0-key_4"]')
chosen_field = self.findBy('xpath', '//a[@class="chosen-single"]')
self.assertEqual(chosen_field.text, '-')
# She sees that the values are ordered alphabetically
values = ['Afghanistan', 'Cambodia', 'Germany', 'Switzerland']
for i, v in enumerate(values):
self.findBy(
'xpath',
'//select[@name="qg_3-0-key_4"]/option[{}][contains(text(),'
' "{}")]'.format(i + 2, v))
# She sees that the form progress is at 0
self.findBy('xpath', '//span[@class="meter" and @style="width:0%"]')
# She submits the form empty and sees that no value was submitted,
# progress of Category 1 is still 0
self.submit_form_step()
self.findByNot('xpath', '//*[text()[contains(.,"Key 4")]]')
progress_indicator = self.findBy(
'xpath',
'(//div[@class="tech-section-progress"])[2]/span[@class="steps"]')
self.assertIn('0/', progress_indicator.text)
# She goes back to the questionnaire step and sees that form
# progress is still at 0 and no value is selected
self.click_edit_section('cat_1')
self.findBy('xpath', '//span[@class="meter" and @style="width:0%"]')
self.findBy('xpath', '//select[@name="qg_3-0-key_4"]')
chosen_field = self.findBy('xpath', '//a[@class="chosen-single"]')
self.assertEqual(chosen_field.text, '-')
# She sees that she can select a Value by mouse click
self.select_chosen_element('id_qg_3_0_key_4_chosen', 'Afghanistan')
self.assertEqual(chosen_field.text, 'Afghanistan')
# She sees that the form progress was updated
self.findBy(
'xpath', '//span[@class="meter" and @style="width: 50%;"]')
# She submits the form and sees that the value was submitted,
# progress of Category 1 is now updated
self.submit_form_step()
self.findBy('xpath', '//*[text()[contains(.,"Key 4")]]')
self.findBy('xpath', '//*[text()[contains(.,"Afghanistan")]]')
progress_indicator = self.findBy(
'xpath',
'(//div[@class="tech-section-progress"])[2]/span[@class="steps"]')
self.assertIn('1/', progress_indicator.text)
# She goes back to the form and sees that the value is still selected
# and the progress is updated
self.click_edit_section('cat_1')
self.findBy('xpath', '//select[@name="qg_3-0-key_4"]')
chosen_field = self.findBy('xpath', '//a[@class="chosen-single"]')
self.assertEqual(chosen_field.text, 'Afghanistan')
self.findBy(
'xpath', '//span[@class="meter" and @style="width: 50%;"]')
# She selects another value, sees that the form progress is still at
# the same value
self.select_chosen_element('id_qg_3_0_key_4_chosen', 'Germany')
self.assertEqual(chosen_field.text, 'Germany')
self.findBy(
'xpath', '//span[@class="meter" and @style="width: 50%;"]')
# She submits the form and sees the value was updated
self.submit_form_step()
self.findBy('xpath', '//*[text()[contains(.,"Key 4")]]')
self.findBy('xpath', '//*[text()[contains(.,"Germany")]]')
# She submits the entire form and sees the value is on the details page
self.review_action('submit')
self.findBy('xpath', '//*[text()[contains(.,"Key 4")]]')
self.findBy('xpath', '//*[text()[contains(.,"Germany")]]')
def test_selects_with_chosen_repeating(self):
# Alice logs in
self.doLogin()
# She goes to a step of the questionnaire
self.browser.get(self.live_server_url + reverse(
route_questionnaire_new_step,
kwargs={'identifier': 'new', 'step': 'cat_0'}))
self.rearrangeFormHeader()
# She clicks the button to add a non-registered person
create_radio = self.findBy(
'xpath', '//input[@name="form-user-radio" and @value="create"]')
create_radio.click()
# She sees Key 4, which is a select, rendered with Chosen.
# Initially, no value is selected.
self.findBy('xpath', '//select[@name="qg_31-0-key_4"]')
chosen_fields = self.findManyBy('xpath', '//div[contains(@class, "form-user-tab-create")]//a[@class="chosen-single"]')
self.assertEqual(len(chosen_fields), 1)
self.assertEqual(chosen_fields[0].text, '-')
# She sees that she can select a Value by mouse click
self.select_chosen_element('id_qg_31_0_key_4_chosen', 'Afghanistan')
self.assertEqual(chosen_fields[0].text, 'Afghanistan')
# She adds another questiongroup
self.findBy('xpath', '//a[@data-questiongroup-keyword="qg_31"]').click()
# She clicks the tab to add a non-registered person
create_radios = self.findManyBy(
'xpath', '//input[@name="form-user-radio" and @value="create"]')
create_radios[1].click()
# No idea why 2 clicks are necessary
create_radios[1].click()
# She sees another chosen field which is empty
self.findBy('xpath', '//select[@name="qg_31-1-key_4"]')
chosen_fields = self.findManyBy('xpath',
'//div[contains(@class, "form-user-tab-create")]//a[@class="chosen-single"]')
self.assertEqual(len(chosen_fields), 2)
self.assertEqual(chosen_fields[0].text, 'Afghanistan')
self.assertEqual(chosen_fields[1].text, '-')
self.select_chosen_element('id_qg_31_1_key_4_chosen', 'Germany')
chosen_fields = self.findManyBy('xpath',
'//div[contains(@class, "form-user-tab-create")]//a[@class="chosen-single"]')
self.assertEqual(len(chosen_fields), 2)
self.assertEqual(chosen_fields[0].text, 'Afghanistan')
self.assertEqual(chosen_fields[1].text, 'Germany')
# She submits the form and sees the value was updated
self.submit_form_step()
self.findBy('xpath', '//*[text()[contains(.,"Key 4")]]')
self.findBy('xpath', '//*[text()[contains(.,"Germany")]]')
self.findBy('xpath', '//*[text()[contains(.,"Afghanistan")]]')
# She submits the entire form and sees the value is on the details page
self.review_action('submit')
self.findBy('xpath', '//*[text()[contains(.,"Key 4")]]')
self.findBy('xpath', '//*[text()[contains(.,"Germany")]]')
self.findBy('xpath', '//*[text()[contains(.,"Afghanistan")]]')
def test_checkbox(self):
# Alice logs in
self.doLogin()
# She goes to a step of the questionnaire
self.browser.get(self.live_server_url + reverse(
route_questionnaire_new_step,
kwargs={'identifier': 'new', 'step': 'cat_2'}))
# She sees that no Checkbox of Key 13 is selected by default
self.findByNot(
'xpath', '//input[@name="qg_10-0-key_13" and @checked="checked"]')
# She sees that the form progress is at 0
self.findBy('xpath', '//span[@class="meter" and @style="width:0%"]')
# She submits the form empty and sees that no value was submitted,
# progress of Category 2 is still 0
self.submit_form_step()
self.findByNot('xpath', '//*[text()[contains(.,"Key 13")]]')
progress_indicator = self.findBy(
'xpath',
'(//div[@class="tech-section-progress"])[3]/span[@class="steps"]')
self.assertIn('0/', progress_indicator.text)
# She goes back to the questionnaire step and sees that form
# progress is still at 0 and no checkbox is selected
self.click_edit_section('cat_2')
self.findBy('xpath', '//span[@class="meter" and @style="width:0%"]')
self.findByNot(
'xpath', '//input[@name="qg_10-0-key_13" and @checked="checked"]')
# She selects a first checkbox and sees that the form progress
# was updated
self.findBy(
'xpath', '(//input[@name="qg_10-0-key_13"])[1]').click()
self.findBy(
'xpath', '//span[@class="meter" and @style="width: 25%;"]')
# She submits the step and sees that the value was submitted and
# the form progress on the overview page is updated
self.submit_form_step()
self.findBy('xpath', '//*[text()[contains(.,"Key 13")]]')
self.findBy('xpath', '//*[text()[contains(.,"Value 13_1")]]')
progress_indicator = self.findBy(
'xpath',
'(//div[@class="tech-section-progress"])[3]/span[@class="steps"]')
self.assertIn('1/', progress_indicator.text)
# She goes back to the step and sees that the first checkbox is
# selected, form progress is at 1
self.click_edit_section('cat_2')
self.findBy(
'xpath', '//span[@class="meter" and @style="width: 25%;"]')
# She deselects the first value and sees that the progress was
# updated
self.findBy(
'xpath', '(//input[@name="qg_10-0-key_13"])[1]').click()
self.findBy(
'xpath', '//span[@class="meter" and @style="width: 0%;"]')
# She then selects the second and third values and submits the
# form
self.findBy(
'xpath', '(//input[@name="qg_10-0-key_13"])[2]').click()
self.findBy(
'xpath', '(//input[@name="qg_10-0-key_13"])[3]').click()
self.submit_form_step()
# The overview now shows both values
self.findBy('xpath', '//*[text()[contains(.,"Key 13")]]')
self.findByNot('xpath', '//*[text()[contains(.,"Value 13_1")]]')
self.findBy('xpath', '//*[text()[contains(.,"Value 13_2")]]')
self.findBy('xpath', '//*[text()[contains(.,"Value 13_3")]]')
# She submits the form and sees that the radio value is stored
# correctly
self.review_action('submit')
self.findBy('xpath', '//*[text()[contains(.,"Key 13")]]')
self.findByNot('xpath', '//*[text()[contains(.,"Value 13_1")]]')
self.findBy('xpath', '//*[text()[contains(.,"Value 13_2")]]')
self.findBy('xpath', '//*[text()[contains(.,"Value 13_3")]]')
def test_checkbox_other(self):
# Alice logs in
self.doLogin()
# She goes to a step of the questionnaire
self.browser.get(self.live_server_url + reverse(
route_questionnaire_new_step,
kwargs={'identifier': 'new', 'step': 'cat_1'}))
self.rearrangeFormHeader()
# She sees there are checkboxes and one "other" checkbox with a
# textfield
cb_1 = self.findBy('id', 'id_qg_36-0-key_50_1_1')
cb_2 = self.findBy('id', 'id_qg_36-0-key_50_1_2')
other_cb = self.findBy(
'xpath', '//label[@for="id_qg_36-0-original_key_51"]/input['
'contains(@class, "checkbox-other")]')
other_textfield = self.findBy('id', 'id_qg_36-0-original_key_51')
# She sees the textfield is readonly
self.assertEqual(other_textfield.get_attribute('readonly'), 'true')
# She selects the first checkbox, the other checkbox is still not
# selected, the textfield readonly
cb_1.click()
self.assertEqual(other_textfield.get_attribute('readonly'), 'true')
self.assertIsNone(other_cb.get_attribute('checked'))
# She selects the other checkbox and sees she can now enter some text
other_cb.click()
self.assertEqual(other_cb.get_attribute('checked'), 'true')
self.assertIsNone(other_textfield.get_attribute('readonly'))
# She selects another checkbox
cb_2.click()
self.assertEqual(other_cb.get_attribute('checked'), 'true')
self.assertIsNone(other_textfield.get_attribute('readonly'))
# She enters some text
other_textfield.send_keys('foo content')
# She deselects the first checkbox
cb_1.click()
self.assertEqual(other_cb.get_attribute('checked'), 'true')
self.assertIsNone(other_textfield.get_attribute('readonly'))
self.assertEqual(other_textfield.get_attribute('value'), 'foo content')
# She submits the step and sees the values are both submitted
self.submit_form_step()
self.findBy('xpath', '//*[text()[contains(.,"medium")]]')
self.findBy('xpath', '//*[text()[contains(.,"foo content")]]')
# She goes back to the form
self.click_edit_section('cat_1')
cb_1 = self.findBy('id', 'id_qg_36-0-key_50_1_1')
cb_2 = self.findBy('id', 'id_qg_36-0-key_50_1_2')
other_cb = self.findBy(
'xpath', '//label[@for="id_qg_36-0-original_key_51"]/input['
'contains(@class, "checkbox-other")]')
other_textfield = self.findBy('id', 'id_qg_36-0-original_key_51')
# She sees the correct checkboxes are selected
self.assertEqual(cb_2.get_attribute('checked'), 'true')
self.assertEqual(other_cb.get_attribute('checked'), 'true')
self.assertIsNone(other_textfield.get_attribute('readonly'))
self.assertEqual(other_textfield.get_attribute('value'), 'foo content')
# She deselects the other checkbox and sees the textfield is emptied
other_cb.click()
self.assertIsNone(other_cb.get_attribute('checked'))
self.assertEqual(other_textfield.get_attribute('readonly'), 'true')
self.assertEqual(other_textfield.get_attribute('value'), '')
# She selects it again and enters some text
other_cb.click()
other_textfield.send_keys('foo bar')
# She submits the step
self.submit_form_step()
self.findBy('xpath', '//*[text()[contains(.,"medium")]]')
self.findBy('xpath', '//*[text()[contains(.,"foo bar")]]')
# She submits the entire questionnaire
self.review_action('submit')
self.findBy('xpath', '//*[text()[contains(.,"medium")]]')
self.findBy('xpath', '//*[text()[contains(.,"foo bar")]]')
def test_image_checkbox(self):
# Alice logs in
self.doLogin()
# She goes to a step of the questionnaire
self.browser.get(self.live_server_url + reverse(
route_questionnaire_new_step,
kwargs={'identifier': 'new', 'step': 'cat_4'}))
self.rearrangeFormHeader()
# She sees that no Checkbox of Key 14 is selected by default
self.findByNot(
'xpath', '//input[@name="qg_11-0-key_14" and @checked="checked"]')
# She sees that the form progress is at 0
self.findBy('xpath', '//span[@class="meter" and @style="width:0%"]')
# She submits the form empty and sees that no value was submitted,
# progress of Category 4 is still 0
self.submit_form_step()
self.findByNot('xpath', '//article//*[text()[contains(.,"Key 14")]]')
progress_indicator = self.findBy(
'xpath',
'(//div[@class="tech-section-progress"])[5]/span[@class="steps"]')
self.assertIn('0/', progress_indicator.text)
WebDriverWait(self.browser, 10).until(
EC.visibility_of_element_located((By.ID, "cat_4"))
)
# She goes back to the questionnaire step and sees that form
# progress is still at 0 and no checkbox is selected
self.click_edit_section('cat_4')
self.findBy('xpath', '//span[@class="meter" and @style="width:0%"]')
self.findByNot(
'xpath', '//input[@name="qg_11-0-key_14" and @checked="checked"]')
# She selects a first checkbox and sees that the form progress
# was updated
self.findBy(
'xpath', '//label[@for="id_qg_11-0-key_14_1"]').click()
self.findBy(
'xpath', '//span[@class="meter" and @style="width: 16.6667%;"]')
# She submits the step and sees that the value was submitted and
# the form progress on the overview page is updated
self.submit_form_step()
self.findBy('xpath', '//img[@alt="Value 14_1"]')
progress_indicator = self.findBy(
'xpath',
'(//div[@class="tech-section-progress"])[5]/span[@class="steps"]')
self.assertIn('1/', progress_indicator.text)
# She goes back to the step and sees that the first checkbox is
# selected, form progress is at 1
self.click_edit_section('cat_4')
self.findBy(
'xpath', '//span[@class="meter" and @style="width: 16.6667%;"]')
# She deselects the first value and sees that the progress was
# updated
self.findBy(
'xpath', '//label[@for="id_qg_11-0-key_14_1"]').click()
self.findBy(
'xpath', '//span[@class="meter" and @style="width: 0%;"]')
# She then selects the second and third values and submits the
# form
self.findBy(
'xpath', '//label[@for="id_qg_11-0-key_14_2"]').click()
self.findBy(
'xpath', '//label[@for="id_qg_11-0-key_14_3"]').click()
self.submit_form_step()
# The overview now shows both values
self.findByNot(
'xpath',
'//div[contains(@class, "output")]/img[@alt="Value 14_1"]')
self.findBy(
'xpath',
'//div[contains(@class, "output")]/img[@alt="Value 14_2"]')
self.findBy(
'xpath',
'//div[contains(@class, "output")]/img[@alt="Value 14_3"]')
# She submits the form and sees that the radio value is stored
# correctly
self.review_action('submit')
self.findByNot(
'xpath',
'//div[contains(@class, "output")]/img[@alt="Value 14_1"]')
self.findBy(
'xpath',
'//div[contains(@class, "output")]/img[@alt="Value 14_2"]')
self.findBy(
'xpath',
'//div[contains(@class, "output")]/img[@alt="Value 14_3"]')
def test_measure_conditional(self):
# Alice logs in
self.doLogin()
# She goes to a step of the questionnaire
self.browser.get(self.live_server_url + reverse(
route_questionnaire_new_step,
kwargs={'identifier': 'new', 'step': 'cat_4'}))
self.rearrangeFormHeader()
# She sees the measure box for Key 21
self.findBy(
'xpath',
'//div[@class="button-bar"]/ul/li/input[@name="qg_16-0-key_21"]')
# She sees that Key 22 and Key 23 are not visible
key_22 = self.findBy('xpath', '//label[@for="id_qg_17-0-key_22_1"]')
key_23 = self.findBy('id', 'id_qg_17-0-original_key_23')
self.assertFalse(key_22.is_displayed())
self.assertFalse(key_23.is_displayed())
# She selects measure 2 of Key 21
self.findBy('xpath', '//label[@for="id_qg_16-0-key_21_2"]').click()
# She sees that Keys 22 and 23 are now visible
self.assertTrue(key_22.is_displayed())
self.assertTrue(key_23.is_displayed())
# She selects measure 1 of Key 21 and the Keys are hidden again.
self.findBy('xpath', '//label[@for="id_qg_16-0-key_21_1"]').click()
self.assertFalse(key_22.is_displayed())
self.assertFalse(key_23.is_displayed())
# She selects measure 2, selects a value of Key 22 and enters
# some text for Key 23.
self.findBy('xpath', '//label[@for="id_qg_16-0-key_21_2"]').click()
key_22.click()
key_23.send_keys('Foo')
# She selects measure 1 and then 2 again and sees the previously
# selected and entered values are gone.
self.findBy('xpath', '//label[@for="id_qg_16-0-key_21_1"]').click()
self.assertFalse(key_22.is_displayed())
self.assertFalse(key_23.is_displayed())
self.findBy('xpath', '//label[@for="id_qg_16-0-key_21_2"]').click()
self.assertFalse(key_22.is_selected())
self.assertEqual(key_23.get_attribute('value'), '')
# She enters some data, submits the form and sees that all
# values were submitted
key_22.click()
key_23.send_keys('Foo')
self.submit_form_step()
self.checkOnPage('Key 21')
self.checkOnPage('medium')
self.findBy('xpath', '//img[@alt="Value 16_1"]')
self.checkOnPage('Key 23')
self.checkOnPage('Foo')
# She goes back to the form and sees that the values are still
# there, Keys 22 and 23 are visible
self.click_edit_section('cat_4')
key_22 = self.findBy('xpath', '//label[@for="id_qg_17-0-key_22_1"]')
key_23 = self.findBy('id', 'id_qg_17-0-original_key_23')
self.assertTrue(key_22.is_displayed())
self.assertTrue(key_23.is_displayed())
# She unchecks Key 22
key_22.click()
self.assertTrue(key_22.is_displayed())
# She unselects Key 21 and sees that everything is hidden again
self.findBy('xpath', '//label[@for="id_qg_16-0-key_21_3"]').click()
self.assertFalse(key_22.is_displayed())
self.assertFalse(key_23.is_displayed())
# She selects Key 21 again and sees it is empty again
self.findBy('xpath', '//label[@for="id_qg_16-0-key_21_2"]').click()
self.assertFalse(key_22.is_selected())
self.assertEqual(key_23.get_attribute('value'), '')
# She enters some values again and submits the form completely
key_23.send_keys('Bar')
self.submit_form_step()
self.review_action('submit')
self.checkOnPage('Key 21')
self.checkOnPage('medium')
self.checkOnPage('Key 23')
self.checkOnPage('Bar')
def test_checkbox_conditional(self):
# Alice logs in
self.doLogin()
# She goes to a step of the questionnaire
self.browser.get(self.live_server_url + reverse(
route_questionnaire_new_step,
kwargs={'identifier': 'new', 'step': 'cat_2'}))
# She sees the checkbox (Value 13_5) for Key 13
value_5 = self.findBy('id', 'id_qg_10-0-key_13_1_5')
# She sees that Key 24 (Remark) is not visible
key_24 = self.findBy('id', 'id_qg_18-0-original_key_24')
self.assertFalse(key_24.is_displayed())
# She selects Value 5 and sees that Key 24 is now visible
value_5.click()
self.assertTrue(key_24.is_displayed())
# She deselects Value 5 and the Key is hidden again
value_5.click()
self.assertFalse(key_24.is_displayed())
# She selects Value 5 and enters some text for Key 24
value_5.click()
self.assertTrue(key_24.is_displayed())
key_24.send_keys('Foo')
# She selects Value 4 and sees that nothing happens to Key 24
self.findBy('id', 'id_qg_10-0-key_13_1_4').click()
self.assertTrue(key_24.is_displayed())
self.assertEqual(key_24.get_attribute('value'), 'Foo')
# She deselects Value 5 and selects it again and sees that the
# entered text is gone.
value_5.click()
self.assertFalse(key_24.is_displayed())
value_5.click()
self.assertTrue(key_24.is_displayed())
self.assertEqual(key_24.get_attribute('value'), '')
# She enters some text again, submits the form and sees that
# Key 24 was submitted.
key_24.send_keys('Bar')
self.submit_form_step()
self.checkOnPage('Key 13')
self.checkOnPage('Value 13_5')
self.checkOnPage('Key 24')
self.checkOnPage('Bar')
# She goes back to the form and sees that the values are still
# there, Key 24 is visible
self.click_edit_section('cat_2')
value_5 = self.findBy('id', 'id_qg_10-0-key_13_1_5')
self.findBy(
'xpath',
'//input[@id="id_qg_10-0-key_13_1_5" and @checked="checked"]')
key_24 = self.findBy('id', 'id_qg_18-0-original_key_24')
self.assertTrue(key_24.is_displayed())
self.assertEqual(key_24.get_attribute('value'), 'Bar')
# She unchecks value 5 and sees that everything is hidden again
value_5.click()
self.assertFalse(key_24.is_displayed())
# She selects Value 5 again and sees it is empty again
value_5.click()
self.assertTrue(key_24.is_displayed())
self.assertEqual(key_24.get_attribute('value'), '')
# She enters some values again and submits the form completely
key_24.send_keys('Foo')
self.submit_form_step()
self.review_action('submit')
self.checkOnPage('Key 13')
self.checkOnPage('Value 13_5')
self.checkOnPage('Key 24')
self.checkOnPage('Foo')
def test_conditional_chaining(self):
# Alice logs in
self.doLogin()
# She goes to a step of the questionnaire
self.browser.get(self.live_server_url + reverse(
route_questionnaire_new_step,
kwargs={'identifier': 'new', 'step': 'cat_1'}))
self.rearrangeFormHeader()
# She sees the radio button for Key 11
key_11_yes = self.findBy('id', 'id_qg_3-0-key_11_1')
# She does not see the Keys 27 and 28
key_27_value_3 = self.findBy('id', 'id_qg_22-0-key_27_1_3')
self.assertFalse(key_27_value_3.is_displayed())
key_28 = self.findBy('id', 'id_qg_23-0-original_key_28')
self.assertFalse(key_28.is_displayed())
# She selects Key 11 and sees that Key 27 is visible but Key 28
# is not
key_11_yes.click()
self.assertTrue(key_27_value_3.is_displayed())
self.assertFalse(key_28.is_displayed())
# She selects Key 27 and sees that Key 28 is now visible
key_27_value_3.click()
self.assertTrue(key_28.is_displayed())
# She enters some text for Key 28 and deselects Key 27. She sees
# that Key 28 is hidden
key_28.send_keys('Foo')
key_27_value_3.click()
self.assertFalse(key_28.is_displayed())
# She reselects Key 27 and sees Key 28 is visible again but empty
key_27_value_3.click()
self.assertTrue(key_28.is_displayed())
self.assertEqual(key_28.get_attribute('value'), '')
# She enters some text again and decides to deselect Key 11
key_28.send_keys('Foo')
key_11_no = self.findBy('id', 'id_qg_3-0-key_11_2')
key_11_no.click()
# She sees that both Key 27 and 28 are not visible anymore
self.assertFalse(key_27_value_3.is_displayed())
self.assertFalse(key_28.is_displayed())
# She reselects Key 11 and sees that only Key 27 is visible and empty
key_11_yes.click()
self.assertTrue(key_27_value_3.is_displayed())
self.assertFalse(key_28.is_displayed())
# She reselects Key 27 and sees that Key 28 is visible and empty
key_27_value_3.click()
self.assertTrue(key_28.is_displayed())
self.assertEqual(key_28.get_attribute('value'), '')
# She enters some text and submits the form
key_28.send_keys('Foo')
self.submit_form_step()
# She sees all values were submitted correctly
self.checkOnPage('Key 11')
self.checkOnPage('Yes')
self.checkOnPage('Key 27')
self.checkOnPage('Value 27 C')
self.checkOnPage('Key 28')
self.checkOnPage('Foo')
# She goes back to the form and sees that the values are still
# there, Keys 27 and 28 are visible
self.click_edit_section('cat_1')
key_11_yes = self.findBy('id', 'id_qg_3-0-key_11_1')
# She does not see the Keys 27 and 28
key_27_value_3 = self.findBy(
'xpath',
'//input[@id="id_qg_22-0-key_27_1_3" and @checked="checked"]')
self.assertTrue(key_27_value_3.is_displayed())
key_28 = self.findBy('id', 'id_qg_23-0-original_key_28')
self.assertTrue(key_28.is_displayed())
self.assertEqual(key_28.get_attribute('value'), 'Foo')
# She submits the form completely and sees all the values were
# submitted
self.submit_form_step()
self.review_action('submit')
self.checkOnPage('Key 11')
self.checkOnPage('Yes')
self.checkOnPage('Key 27')
self.checkOnPage('Value 27 C')
self.checkOnPage('Key 28')
self.checkOnPage('Foo')
def test_conditional_questions_translations(self):
send_text = 'asdfasdf'
# Alice logs in
self.doLogin()
# She goes to a step of the questionnaire
self.browser.get(self.live_server_url + reverse(
route_questionnaire_new_step,
kwargs={'identifier': 'new', 'step': 'cat_2'}))
self.rearrangeFormHeader()
value_13_5 = self.findBy('id', 'id_qg_10-0-key_13_1_5')
key_24 = self.findBy('id', 'id_qg_18-0-original_key_24')
# She selects value 13_5 and enters something in the field that is now
# visible
value_13_5.click()
key_24.send_keys(send_text)
# She submits the step
self.submit_form_step()
self.findBy('xpath', f'//*[text()="{send_text}"]')
# She changes the language and opens the step again
self.changeLanguage('fr')
self.findBy('xpath', f'//*[text()="{send_text}"]')
self.click_edit_section('cat_2')
# She sees a warning that she is about to create a new translation
step_page = SampleStepPage(self)
assert step_page.has_translation_warning()
step_page.translation_warning_click_continue()
value_13_5 = self.findBy('id', 'id_qg_10-0-key_13_1_5')
# This time, she is seeing the translation field!
key_24 = self.findBy('id', 'id_qg_18-0-translation_key_24')
# She sees the values are present
self.assertEqual(key_24.get_attribute('value'), send_text)
# She deselects value 13_5 and sees that key 24 is not visible anymore
value_13_5.click()
self.assertFalse(key_24.is_displayed())
# If she reselects value 13_5 again, key 24 is visible but empty.
value_13_5.click()
self.assertTrue(key_24.is_displayed())
self.assertEqual(key_24.get_attribute('value'), '')
# She deselects value 13_5 once again and submits the form
value_13_5.click()
step_page.submit_step(confirm_add_translation=True)
self.findByNot('xpath', f'//*[text()="{send_text}"]')
# Still in French, she goes to the step again
self.click_edit_section('cat_2')
value_13_5 = self.findBy('id', 'id_qg_10-0-key_13_1_5')
# This time, she is seeing the translation field!
key_24 = self.findBy('id', 'id_qg_18-0-translation_key_24')
# She selects value 13_5 again and enters some text for key 24
value_13_5.click()
self.assertEqual(key_24.get_attribute('value'), '')
key_24.send_keys(send_text)
self.submit_form_step()
self.findBy('xpath', f'//*[text()="{send_text}"]')
# She switches back to the original language of the questionnaire
self.changeLanguage('en')
# The text is not visible as it is only in the translation
self.findByNot('xpath', f'//*[text()="{send_text}"]')
# She enters the step again
self.click_edit_section('cat_2')
value_13_5 = self.findBy('id', 'id_qg_10-0-key_13_1_5')
key_24 = self.findBy('id', 'id_qg_18-0-original_key_24')
# In the step, it is not visible either
self.assertEqual(key_24.get_attribute('value'), '')
# She deselects value 13_5 and submits the step
value_13_5.click()
self.submit_form_step()
# The text is still not visible in the original language
self.findByNot('xpath', f'//*[text()="{send_text}"]')
# It is also not visible in the translation
self.changeLanguage('fr')
self.findByNot('xpath', f'//*[text()="{send_text}"]')
def test_conditional_questions(self):
# Alice logs in
self.doLogin()
# She goes to a step of the questionnaire
self.browser.get(self.live_server_url + reverse(
route_questionnaire_new_step,
kwargs={'identifier': 'new', 'step': 'cat_4'}))
self.rearrangeFormHeader()
cb_1_1 = self.findBy('xpath', '//label[@for="id_qg_12-0-key_16_1"]')
cb_1_2 = self.findBy('xpath', '//label[@for="id_qg_12-0-key_16_2"]')
cb_2_1 = self.findBy('xpath', '//label[@for="id_qg_12-0-key_15_1"]')
# She sees one checkbox, but not the conditional one
self.assertTrue(cb_1_1.is_displayed())
self.assertFalse(cb_2_1.is_displayed())
# She selects a checkbox which triggers the condition, she can now see
# the conditional question
cb_1_2.click()
self.assertTrue(cb_2_1.is_displayed())
# She deselects the checkbox and selects one which does not trigger
# anything, she sees the conditional question is hidden again
cb_1_2.click()
cb_1_1.click()
self.assertFalse(cb_2_1.is_displayed())
# She submits the form step and sees the correct value was submitted
self.submit_form_step()
self.findBy('xpath', '//img[@alt="Value 16_1"]')
self.findByNot('xpath', '//img[@alt="Value 15_1"]')
# She goes back to the form
WebDriverWait(self.browser, 10).until(
EC.visibility_of_element_located((By.ID, "cat_4"))
)
self.click_edit_section('cat_4')
cb_1_1 = self.findBy('xpath', '//label[@for="id_qg_12-0-key_16_1"]')
cb_1_2 = self.findBy('xpath', '//label[@for="id_qg_12-0-key_16_2"]')
cb_2_1 = self.findBy('xpath', '//label[@for="id_qg_12-0-key_15_1"]')
# She sees the conditional question is not visible
self.assertFalse(cb_2_1.is_displayed())
# She deselects the checkbox and selects one with a trigger, the
# conditional question is visible again
cb_1_1.click()
cb_1_2.click()
# She submits the form and checks the submitted value
self.submit_form_step()
self.findBy('xpath', '//img[@alt="Value 16_2"]')
self.findByNot('xpath', '//img[@alt="Value 15_1"]')
# She goes back to the form
WebDriverWait(self.browser, 10).until(
EC.visibility_of_element_located((By.ID, "cat_4"))
)
self.click_edit_section('cat_4')
cb_1_1 = self.findBy('xpath', '//label[@for="id_qg_12-0-key_16_1"]')
cb_1_2 = self.findBy('xpath', '//label[@for="id_qg_12-0-key_16_2"]')
cb_2_1 = self.findBy('xpath', '//label[@for="id_qg_12-0-key_15_1"]')
cb_2_1_cb = self.findBy('id', 'id_qg_12-0-key_15_1')
# She sees the conditional question is visible
self.assertTrue(cb_2_1.is_displayed())
# She selects a checkbox of the conditional question
cb_2_1.click()
# She deselects the checkbox which triggers and reselects it. She sees
# the conditional checkbox is not selected anymore
self.assertEqual(cb_2_1_cb.get_attribute('checked'), 'true')
cb_1_2.click()
self.assertFalse(cb_2_1.is_displayed())
cb_1_2.click()
self.assertTrue(cb_2_1.is_displayed())
self.assertIsNone(cb_2_1_cb.get_attribute('checked'))
# She selects something of the conditional question
cb_2_1.click()
# She submits the step
self.submit_form_step()
self.findBy('xpath', '//img[@alt="Value 16_2"]')
self.findBy('xpath', '//img[@alt="Value 15_1"]')
# She submits the entire form
self.review_action('submit')
self.findBy('xpath', '//img[@alt="Value 16_2"]')
self.findBy('xpath', '//img[@alt="Value 15_1"]')
# def test_image_checkbox_subcategory(self):
# # Alice logs in
# self.doLogin()
# cat_4_position = get_position_of_category('cat_4')
# # She goes to a step of the questionnaire
# self.browser.get(self.live_server_url + reverse(
# route_questionnaire_new_step,
# kwargs={'identifier': 'new', 'step': 'cat_4'}))
# # She sees the checkbox images of Key 15 which are not the same
# # as for Key 14.
# img_1_key_14 = self.findBy('xpath', '//img[@alt="Value 14_1"]')
# img_1_key_15 = self.findBy('xpath', '//img[@alt="Value 15_1"]')
# self.assertNotEqual(
# img_1_key_14.get_attribute('src'),
# img_1_key_15.get_attribute('src'))
# # She sees that no Checkbox of Key 15 is selected by default
# self.findByNot(
# 'xpath', '//input[@name="qg_12-0-key_15" and @checked="checked"]')
# # She also sees that Key 16 is not visible
# subcat_val_1 = self.findBy('id', 'id_qg_12-0-key_15_1_sub')
# self.findBy(
# 'xpath', '//input[@name="qg_12-0-key_16"]', base=subcat_val_1)
# self.assertIn('display: none;', subcat_val_1.get_attribute('style'))
# # She sees that the form progress is at 0
# self.findBy('xpath', '//span[@class="meter" and @style="width:0%"]')
# # She submits the form empty and sees that no value was submitted,
# # progress of Category 4 is still 0
# self.findBy('id', 'button-submit').click()
# self.findByNot('xpath', '//*[text()[contains(.,"Key 15")]]')
# progress_indicator = self.findBy(
# 'xpath', '(//a[contains(@href, "edit/new/cat")])[{}]'.format(
# cat_4_position))
# self.assertIn('0/', progress_indicator.text)
# # She goes back to the questionnaire step and sees that form
# # progress is still at 0 and no checkbox is selected
# self.browser.get(self.live_server_url + reverse(
# route_questionnaire_new_step,
# kwargs={'identifier': 'new', 'step': 'cat_4'}))
# self.findBy('xpath', '//span[@class="meter" and @style="width:0%"]')
# self.findByNot(
# 'xpath', '//input[@name="qg_12-0-key_15" and @checked="checked"]')
# # She also sees that Key 16 is not visible
# subcat_val_1 = self.findBy('id', 'id_qg_12-0-key_15_1_sub')
# self.findBy(
# 'xpath', '//input[@name="qg_12-0-key_16"]', base=subcat_val_1)
# self.assertIn('display: none;', subcat_val_1.get_attribute('style'))
# # She selects the first checkbox and sees that the form progress
# # was updated
# self.findBy(
# 'xpath', '(//input[@name="qg_12-0-key_15"])[1]').click()
# self.findBy(
# 'xpath', '//span[@class="meter" and @style="width: 33.3333%;"]')
# # She also sees that Key 16 is now visible but no value is selected
# subcat_val_1 = self.findBy('id', 'id_qg_12-0-key_15_1_sub')
# self.findBy(
# 'xpath', '//input[@name="qg_12-0-key_16"]', base=subcat_val_1)
# self.browser.implicitly_wait(5)
# self.assertNotIn(
# 'display: none;', subcat_val_1.get_attribute('style')
# )
# self.findByNot(
# 'xpath', '//input[@name="qg_12-0-key_16" and @checked="checked"]')
# # She submits the step and sees that Key 15 was submitted and
# # the form progress on the overview page is updated
# self.findBy('id', 'button-submit').click()
# self.checkOnPage('Key 15')
# self.findBy('xpath', '//img[@alt="Value 15_1"]')
# progress_indicator = self.findBy(
# 'xpath', '(//a[contains(@href, "edit/new/cat")])[{}]'.format(
# cat_4_position))
# self.assertIn('1/', progress_indicator.text)
# # She goes back to the step and sees that the value of Key 15 is
# # selected, form progress is at 1
# self.browser.get(self.live_server_url + reverse(
# route_questionnaire_new_step,
# kwargs={'identifier': 'new', 'step': 'cat_4'}))
# self.findBy(
# 'xpath', '//span[@class="meter" and @style="width: 33.3333%;"]')
# # Key 16 is visible but no value selected
# subcat_val_1 = self.findBy('id', 'id_qg_12-0-key_15_1_sub')
# self.findBy(
# 'xpath', '//input[@name="qg_12-0-key_16"]', base=subcat_val_1)
# self.assertNotIn(
# 'display: none;', subcat_val_1.get_attribute('style')
# )
# self.findByNot(
# 'xpath', '//input[@name="qg_12-0-key_16" and @checked="checked"]')
# # She selects a value of Key 16
# self.findBy(
# 'xpath', '(//input[@name="qg_12-0-key_16"])[1]').click()
# # She submits the step and sees that both values are submitted
# self.findBy('id', 'button-submit').click()
# self.checkOnPage('Key 15')
# self.findBy('xpath', '//img[@alt="Value 15_1"]')
# self.checkOnPage('Key 16')
# self.findBy('xpath', '//img[@alt="Value 16_1"]')
# progress_indicator = self.findBy(
# 'xpath', '(//a[contains(@href, "edit/new/cat")])[{}]'.format(
# cat_4_position))
# self.assertIn('1/', progress_indicator.text)
# # She goes back to the step and sees that the value of Key 15 is
# # selected, form progress is at 1
# self.browser.get(self.live_server_url + reverse(
# route_questionnaire_new_step,
# kwargs={'identifier': 'new', 'step': 'cat_4'}))
# self.findBy(
# 'xpath', '//span[@class="meter" and @style="width: 33.3333%;"]')
# # She sees that the value of Key 15 is selected. Key 16 is
# # visible and the first value is selected.
# subcat_val_1 = self.findBy('id', 'id_qg_12-0-key_15_1_sub')
# self.findBy(
# 'xpath', '//input[@name="qg_12-0-key_16"]', base=subcat_val_1)
# self.assertNotIn(
# 'display: none;', subcat_val_1.get_attribute('style'))
# self.findBy(
# 'xpath', '//input[@name="qg_12-0-key_16" and @checked="checked"]')
# # She deselects the value of Key 15 and sees that Key 16 is not
# # visible anymore
# self.findBy(
# 'xpath', '(//input[@name="qg_12-0-key_15"])[1]').click()
# subcat_val_1 = self.findBy('id', 'id_qg_12-0-key_15_1_sub')
# self.findBy(
# 'xpath', '//input[@name="qg_12-0-key_16"]', base=subcat_val_1)
# time.sleep(1)
# self.assertIn('display: none;', subcat_val_1.get_attribute('style'))
# # She reselects the value of Key 15 and sees that the previously
# # selected value of Key 16 is not selected anymore.
# self.findBy(
# 'xpath', '(//input[@name="qg_12-0-key_15"])[1]').click()
# self.findByNot(
# 'xpath', '//input[@name="qg_12-0-key_16" and @checked="checked"]')
# # She selects two values of Key 16 again and submits the form
# self.browser.implicitly_wait(5)
# self.findBy(
# 'xpath', '(//input[@name="qg_12-0-key_16"])[1]').click()
# self.findBy(
# 'xpath', '(//input[@name="qg_12-0-key_16"])[2]').click()
# self.findBy('id', 'button-submit').click()
# self.checkOnPage('Key 15')
# self.findBy('xpath', '//img[@alt="Value 15_1"]')
# self.checkOnPage('Key 16')
# self.findBy('xpath', '//img[@alt="Value 16_1"]')
# self.findBy('xpath', '//img[@alt="Value 16_2"]')
# # She submits the form and sees that the values were stored
# # correctly
# self.findBy('id', 'button-submit').click()
# self.checkOnPage('Key 15')
# self.findBy('xpath', '//img[@alt="Value 15_1"]')
# self.checkOnPage('Key 16')
# self.findBy('xpath', '//img[@alt="Value 16_1"]')
# self.findBy('xpath', '//img[@alt="Value 16_2"]')
def test_measure_selects(self):
# Alice logs in
self.doLogin()
# She goes to a step of the questionnaire
self.browser.get(self.live_server_url + reverse(
route_questionnaire_new_step,
kwargs={'identifier': 'new', 'step': 'cat_2'}))
# She sees Key 12 in a row which is not selected
self.findByNot(
'xpath', '//div[@class="row list-item is-selected"]/div/label['
'contains(text(), "Key 12")]')
# She sees that the form progress is at 0
self.findBy('xpath', '//span[@class="meter" and @style="width:0%"]')
# She submits the form empty and sees that no value was submitted,
# progress of Category 2 is still 0
self.submit_form_step()
self.findByNot('xpath', '//*[text()[contains(.,"Key 12")]]')
progress_indicator = self.findBy(
'xpath',
'(//div[@class="tech-section-progress"])[3]/span[@class="steps"]')
self.assertIn('0/', progress_indicator.text)
# She goes back to the questionnaire step and sees that form
# progress is still at 0 and the row is unselected
self.click_edit_section('cat_2')
self.findBy('xpath', '//span[@class="meter" and @style="width:0%"]')
self.findByNot(
'xpath', '//div[contains(@class, "is-selected")]//label/span['
'text()="low"]')
# She sees that the values are not ordered alphabetically
measures = ["low", "medium", "high"]
for i, m in enumerate(measures):
self.findBy(
'xpath', '(//div[@class="button-bar"]/ul/li/label/span)[{}]['
'contains(text(), "{}")]'.format(i + 1, m))
# She selects the first value and sees that the row is now
# selected and the form progress was updated
self.findBy(
'xpath', '//label/span[contains(text(), "low")]').click()
self.findBy(
'xpath', '//div[contains(@class, "is-selected")]//label/span['
'text()="low"]')
self.findBy(
'xpath', '//span[@class="meter" and @style="width: 25%;"]')
# She submits the step and sees that the value was submitted and
# the form progress on the overview page is updated
self.submit_form_step()
self.findBy('xpath', '//*[text()[contains(.,"Key 12")]]')
self.findBy('xpath', '//*[text()[contains(.,"low")]]')
progress_indicator = self.findBy(
'xpath',
'(//div[@class="tech-section-progress"])[3]/span[@class="steps"]')
self.assertIn('1/', progress_indicator.text)
# She goes back to the step and sees the row is highlighted and
# low selected, form progress is at 1
self.click_edit_section('cat_2')
self.findBy(
'xpath', '//div[contains(@class, "is-selected")]//label/span['
'text()="low"]')
self.findBy(
'xpath', '//span[@class="meter" and @style="width: 25%;"]')
# She selects None and sees that the row is not highlighted
# anymore and the progress was updated
self.findBy(
'xpath', '//label/span[contains(text(), "low")]').click()
self.findByNot(
'xpath', '//div[contains(@class, "is-selected")]//label/span['
'text()="low"]')
self.findBy(
'xpath', '//span[@class="meter" and @style="width: 0%;"]')
# She then selects medium and submits the form
self.findBy(
'xpath', '//label/span[contains(text(), "medium")]').click()
self.submit_form_step()
# The overview now shows medium and she submits the form
self.findBy('xpath', '//*[text()[contains(.,"Key 12")]]')
self.findBy('xpath', '//*[text()[contains(.,"medium")]]')
# She submits the form and sees that the radio value is stored
# correctly
self.review_action('submit')
self.findBy('xpath', '//*[text()[contains(.,"Key 12")]]')
self.findBy('xpath', '//*[text()[contains(.,"medium")]]')
def test_measure_selects_repeating(self):
# Alice logs in
self.doLogin()
# She goes to a step of the questionnaire
self.browser.get(self.live_server_url + reverse(
route_questionnaire_new_step,
kwargs={'identifier': 'new', 'step': 'cat_2'}))
self.rearrangeFormHeader()
# She sees Key 12 and selects a measure (low)
self.findBy(
'xpath', '//div[@data-questiongroup-keyword="qg_9"][1]//label/'
'span[contains(text(), "low")]').click()
# She adds another questiongroup
self.findBy(
'xpath', '//fieldset[@class="row"][2]//a[@data-add-item]').click()
# She selects measure (medium) in the second
self.findBy(
'xpath', '//div[@data-questiongroup-keyword="qg_9"][2]//label/'
'span[contains(text(), "medium")]').click()
# She changes the first measure (high)
self.findBy(
'xpath', '//div[@data-questiongroup-keyword="qg_9"][1]//label/'
'span[contains(text(), "high")]').click()
# She submits the step and sees the values were submitted
# correctly
self.submit_form_step()
self.findBy('xpath', '//*[text()[contains(.,"Key 12")]]')
self.findBy('xpath', '//*[text()[contains(.,"high")]]')
self.findBy('xpath', '//*[text()[contains(.,"medium")]]')
# She goes back to the form and sees the values were populated
self.click_edit_section('cat_2')
self.findBy(
'xpath', '//input[@id="id_qg_9-0-key_12_3" and @checked]')
self.findBy(
'xpath', '//input[@id="id_qg_9-1-key_12_2" and @checked]')
# She changes the values
self.findBy(
'xpath', '//div[@data-questiongroup-keyword="qg_9"][1]//label/'
'span[contains(text(), "medium")]').click()
self.findBy(
'xpath', '//div[@data-questiongroup-keyword="qg_9"][2]//label/'
'span[contains(text(), "low")]').click()
# She submits the step and sees the values were submitted
self.submit_form_step()
self.findBy('xpath', '//*[text()[contains(.,"Key 12")]]')
self.findBy('xpath', '//*[text()[contains(.,"medium")]]')
self.findBy('xpath', '//*[text()[contains(.,"low")]]')
# She submits the questionnaire and sees the values were submitted
self.review_action('submit')
self.findBy('xpath', '//*[text()[contains(.,"Key 12")]]')
self.findBy('xpath', '//*[text()[contains(.,"medium")]]')
self.findBy('xpath', '//*[text()[contains(.,"low")]]')
def test_date_picker(self):
# Alice logs in
self.doLogin()
# She goes to a step of the questionnaire
self.browser.get(self.live_server_url + reverse(
route_questionnaire_new_step,
kwargs={'identifier': 'new', 'step': 'cat_1'}))
self.rearrangeFormHeader()
# She sees that key 47 has a datepicker
self.findBy(
'xpath',
'//input[@name="qg_34-0-key_47" and contains(@class, '
'"hasDatepicker")]')
# She sees that the form does not have any progress
self.findBy('xpath', '//span[@class="meter" and @style="width:0%"]')
# She submits the form empty and sees no value was submitted,
# progress of Category 1 is still 0
self.submit_form_step()
self.findByNot('xpath', '//*[text()[contains(.,"Key 11")]]')
progress_indicator = self.findBy(
'xpath',
'(//div[@class="tech-section-progress"])[2]/span[@class="steps"]')
self.assertIn('0/', progress_indicator.text)
# She goes to the form again
self.click_edit_section('cat_1')
# She does not see the datepicker
datepicker = self.findBy('id', 'ui-datepicker-div')
self.assertFalse(datepicker.is_displayed())
# She sees there is no value in the field
datefield = self.findBy(
'xpath',
'//input[@name="qg_34-0-key_47" and contains(@class, '
'"hasDatepicker")]')
self.assertEqual(datefield.get_attribute('value'), '')
# She clicks the input and sees the datepicker opens
datefield.click()
self.assertTrue(datepicker.is_displayed())
# She selects a date
self.findBy(
'xpath',
'//div[@id="ui-datepicker-div"]/table/tbody/tr[3]/td[4]/a'
).click()
# She sees the value was selected
selected_date = datefield.get_attribute('value')
self.assertNotEqual(selected_date, '')
# She sees that the progress was updated and submits the form.
self.findBy('xpath', '//span[@class="meter" and @style="width: 50%;"]')
self.submit_form_step()
# She sees the value was submitted correctly
self.findBy('xpath', '//*[text()[contains(.,"{}")]]'.format(
selected_date))
# She goes back to the form again and sees the value was correctly
# populated
self.click_edit_section('cat_1')
datefield = self.findBy(
'xpath',
'//input[@name="qg_34-0-key_47" and contains(@class, '
'"hasDatepicker")]')
self.assertEqual(datefield.get_attribute('value'), selected_date)
# She clicks "Add more" and selects another date
self.findBy('xpath', '//a[@data-questiongroup-keyword="qg_34"]').click()
# She does not see the datepicker
datepicker = self.findBy('id', 'ui-datepicker-div')
self.assertFalse(datepicker.is_displayed())
# She sees there is no value in the field
datefield_2 = self.findBy(
'xpath',
'//input[@name="qg_34-1-key_47" and contains(@class, '
'"hasDatepicker")]')
self.assertEqual(datefield_2.get_attribute('value'), '')
# She clicks the input and sees the datepicker opens
datefield_2.click()
self.assertTrue(datepicker.is_displayed())
# She selects a date
self.findBy(
'xpath',
'//div[@id="ui-datepicker-div"]/table/tbody/tr[3]/td[2]/a'
).click()
# She sees the value was selected
selected_date_2 = datefield_2.get_attribute('value')
self.assertNotEqual(selected_date_2, '')
# She submits the step
self.submit_form_step()
self.findBy('xpath', '//*[text()[contains(.,"{}")]]'.format(
selected_date))
self.findBy('xpath', '//*[text()[contains(.,"{}")]]'.format(
selected_date_2))
# She submits the entire questionnaire
self.review_action('submit')
self.findBy('xpath', '//*[text()[contains(.,"{}")]]'.format(
selected_date))
self.findBy('xpath', '//*[text()[contains(.,"{}")]]'.format(
selected_date_2))
def test_radio_selects(self):
# Alice logs in
self.doLogin()
# She goes to a step of the questionnaire
self.browser.get(self.live_server_url + reverse(
route_questionnaire_new_step,
kwargs={'identifier': 'new', 'step': 'cat_1'}))
self.rearrangeFormHeader()
# She sees that Key 11 is a radio button
radios = self.findManyBy(
'xpath', '//input[@name="qg_3-0-key_11" and @type="radio"]')
self.assertEqual(len(radios), 2)
# She sees that the form does not have any progress
self.findBy('xpath', '//span[@class="meter" and @style="width:0%"]')
# She submits the form empty and sees no value was submitted,
# progress of Category 1 is still 0
self.submit_form_step()
self.findByNot('xpath', '//*[text()[contains(.,"Key 11")]]')
progress_indicator = self.findBy(
'xpath',
'(//div[@class="tech-section-progress"])[2]/span[@class="steps"]')
self.assertIn('0/', progress_indicator.text)
# She goes to the form again and clicks "Yes".
self.click_edit_section('cat_1')
self.findBy(
'xpath', '//input[@name="qg_3-0-key_11" and @value="1"]')\
.click()
# She sees that the progress was updated and submits the form.
self.findBy('xpath', '//span[@class="meter" and @style="width: 50%;"]')
self.submit_form_step()
# She sees the value was transmitted and the progress was updated
self.findBy('xpath', '//*[text()[contains(.,"Key 11")]]')
self.findBy('xpath', '//*[text()[contains(.,"Yes")]]')
self.findBy(
'xpath', '//span[@class="meter" and @style="width:50%"]')
progress_indicator = self.findBy(
'xpath',
'(//div[@class="tech-section-progress"])[2]/span[@class="steps"]')
self.assertIn('1/', progress_indicator.text)
# She edits the form again and sets the radio button to "No"
self.click_edit_section('cat_1')
self.findBy('xpath', '//span[@class="meter" and @style="width: 50%;"]')
self.findBy(
'xpath', '//input[@name="qg_3-0-key_11" and @value="1" and '
'@checked=""]')
self.findBy(
'xpath', '//input[@name="qg_3-0-key_11" and @value="0"]')\
.click()
self.submit_form_step()
# She sees the value was updated
self.findBy('xpath', '//*[text()[contains(.,"Key 11")]]')
self.findBy('xpath', '//*[text()[contains(.,"No")]]')
# She submits the form and sees the radio value is stored correctly
self.review_action('submit')
self.findBy('xpath', '//*[text()[contains(.,"Key 11")]]')
self.findBy('xpath', '//*[text()[contains(.,"No")]]')
def test_radio_other(self):
# Alice logs in
self.doLogin()
# She goes to a step of the Questionnaire
self.browser.get(self.live_server_url + reverse(
route_questionnaire_new_step,
kwargs={'identifier': 'new', 'step': 'cat_1'}))
self.rearrangeFormHeader()
# She sees there are radio buttons with labels and one with a textfield
radio_1 = self.findBy('id', 'id_qg_35-0-key_48_1')
other_radio = self.findBy(
'xpath', '//label[@for="id_qg_35-0-original_key_49"]/input['
'contains(@class, "radio-other")]')
other_textfield = self.findBy('id', 'id_qg_35-0-original_key_49')
# She sees the textfield is readonly
self.assertEqual(other_textfield.get_attribute('readonly'), 'true')
# She selects the radio in front of the textfield and sees she can now
# edit the textfield, she enters some text.
other_radio.click()
self.assertIsNone(other_textfield.get_attribute('readonly'))
other_textfield.send_keys('foo')
# She selects another radio and sees the radio in front of the textfield
# is deselected and the textfield is now empty and readonly
radio_1.click()
self.assertIsNone(other_radio.get_attribute('checked'))
self.assertEqual(other_textfield.get_attribute('readonly'), 'true')
self.assertEqual(other_textfield.get_attribute('value'), '')
# She submits the step and sees the radio value was submitted
self.submit_form_step()
self.findBy('xpath', '//*[text()[contains(.,"low")]]')
# She goes back to the form
self.click_edit_section('cat_1')
radio_1 = self.findBy('id', 'id_qg_35-0-key_48_1')
other_radio = self.findBy(
'xpath', '//label[@for="id_qg_35-0-original_key_49"]/input['
'contains(@class, "radio-other")]')
other_textfield = self.findBy('id', 'id_qg_35-0-original_key_49')
# She sees the radio was selected, the textfield is readonly
self.assertEqual(radio_1.get_attribute('checked'), 'true')
self.assertIsNone(other_radio.get_attribute('checked'))
self.assertEqual(other_textfield.get_attribute('readonly'), 'true')
self.assertEqual(other_textfield.get_attribute('value'), '')
# She selects the radio in front of the textfield and enters some text
other_radio.click()
other_textfield.send_keys('foo content')
# She sees that the first radio was deselected
self.assertIsNone(radio_1.get_attribute('checked'))
# She submits the step and sees the value was submitted.
self.submit_form_step()
self.findBy('xpath', '//*[text()[contains(.,"foo content")]]')
# She goes back to the form
self.click_edit_section('cat_1')
radio_1 = self.findBy('id', 'id_qg_35-0-key_48_1')
other_radio = self.findBy(
'xpath', '//label[@for="id_qg_35-0-original_key_49"]/input['
'contains(@class, "radio-other")]')
other_textfield = self.findBy('id', 'id_qg_35-0-original_key_49')
# She sees the correct radio was selected and she can edit the textfield
self.assertEqual(other_radio.get_attribute('checked'), 'true')
self.assertIsNone(radio_1.get_attribute('checked'))
self.assertIsNone(other_textfield.get_attribute('readonly'))
self.assertEqual(other_textfield.get_attribute('value'), 'foo content')
# She deselects the radio and sees the textfield is emptied and readonly
other_radio.click()
self.assertIsNone(other_radio.get_attribute('checked'))
self.assertEqual(other_textfield.get_attribute('readonly'), 'true')
self.assertEqual(other_textfield.get_attribute('value'), '')
# She selects the first radio
radio_1.click()
# She selects the other radio again
other_radio.click()
# And she selects the first radio again
radio_1.click()
# She makes sure the first radio is selected
self.assertEqual(radio_1.get_attribute('checked'), 'true')
# Once again, she checks the other radio and enters some text
other_radio.click()
self.assertEqual(other_radio.get_attribute('checked'), 'true')
other_textfield.send_keys('foo bar')
# She submits the step
self.submit_form_step()
self.findBy('xpath', '//*[text()[contains(.,"foo bar")]]')
# She submits the entire questionnaire
self.review_action('submit')
self.findBy('xpath', '//*[text()[contains(.,"foo bar")]]')
def test_plus_questiongroup(self):
# Alice logs in
self.doLogin()
# She goes to a step of the questionnaire
self.browser.get(self.live_server_url + reverse(
route_questionnaire_new_step,
kwargs={'identifier': 'new', 'step': 'cat_1'}))
self.rearrangeFormHeader()
# She sees that Subcategory 1_2 contains an additional
# questiongroups for "plus" questions, the keys initially hidden
plus_button = self.findBy(
'xpath', '//ul[contains(@class, "plus-questiongroup")]/li/a')
key_37 = self.findBy(
'xpath', '//input[@name="qg_29-0-original_key_37"]')
key_38 = self.findBy(
'xpath', '//input[@name="qg_29-0-original_key_38"]')
self.assertFalse(key_37.is_displayed())
self.assertFalse(key_38.is_displayed())
# She clicks on the button and sees the keys are now visible
plus_button.click()
self.wait_for('xpath', '//input[@name="qg_29-0-original_key_37"]')
self.assertTrue(key_37.is_displayed())
self.assertTrue(key_38.is_displayed())
# She enters some text and sees that the progress was updated
key_37.send_keys('Foo')
key_38.send_keys('Bar')
self.findBy('xpath', '//span[@class="meter" and @style="width: 50%;"]')
# She submits the form and sees that the values were submitted
# correctly.
self.submit_form_step()
self.checkOnPage('Foo')
self.checkOnPage('Bar')
# She goes back to the form and sees the additional
# questiongroups are now visible because they have initial
# values
self.click_edit_section('cat_1')
key_37 = self.findBy(
'xpath', '//input[@name="qg_29-0-original_key_37"]')
key_38 = self.findBy(
'xpath', '//input[@name="qg_29-0-original_key_38"]')
self.assertTrue(key_37.is_displayed())
self.assertTrue(key_38.is_displayed())
# She hides the keys and shows them again, the values are still
# there
plus_button = self.findBy(
'xpath', '//ul[contains(@class, "plus-questiongroup")]/li/a')
plus_button.click()
self.wait_for('xpath', '//input[@name="qg_29-0-original_key_37"]',
visibility=False)
self.assertFalse(key_37.is_displayed())
self.assertFalse(key_38.is_displayed())
plus_button.click()
self.wait_for('xpath', '//input[@name="qg_29-0-original_key_37"]')
self.wait_for('xpath', '//input[@name="qg_29-0-original_key_38"]')
key_37_value = self.findBy(
'xpath',
'//input[@name="qg_29-0-original_key_37" and @value="Foo"]')
key_38_value = self.findBy(
'xpath',
'//input[@name="qg_29-0-original_key_38" and @value="Bar"]')
import time; time.sleep(1)
self.assertTrue(key_37_value.is_displayed())
self.assertTrue(key_38_value.is_displayed())
# She submits the form and sees that the values were submitted
# correctly.
self.submit_form_step()
self.checkOnPage('Foo')
self.checkOnPage('Bar')
self.review_action('submit')
self.checkOnPage('Foo')
self.checkOnPage('Bar')
def test_table_entry(self):
# Alice logs in
self.doLogin()
# She goes to a step of the questionnaire with a table
self.browser.get(self.live_server_url + reverse(
route_questionnaire_new_step,
kwargs={'identifier': 'new', 'step': 'cat_5'}))
self.rearrangeFormHeader()
# She sees a table and enters some values
table = self.findBy('xpath', '//fieldset[@id="subcat_5_1"]//table')
headers = self.findManyBy('xpath', '//fieldset[@id="subcat_5_1"]//th')
self.assertEqual(len(headers), 4)
self.assertEqual(headers[0].text, 'Key 33')
self.assertEqual(headers[1].text, 'Key 34')
self.assertEqual(headers[2].text, 'Key 35')
self.assertEqual(headers[3].text, 'Key 36')
row_1 = self.findBy('xpath', '//fieldset[@id="subcat_5_1"]//tr[1]')
td_1_1 = self.findBy('xpath', '//td[1]', base=row_1)
self.findBy(
'xpath', '//input[@name="qg_25-0-original_key_33"]',
base=td_1_1).send_keys('Foo 1')
td_1_2 = self.findBy('xpath', '//td[2]', base=row_1)
self.findBy(
'xpath', '//input[@name="qg_25-0-original_key_34"]',
base=td_1_2).send_keys('Bar 1')
td_1_3 = self.findBy('xpath', '//td[3]', base=row_1)
td_1_3_row_1 = self.findBy('xpath', '//table/tbody/tr[1]', base=td_1_3)
self.findBy(
'xpath', '//input[@name="qg_26-0-original_key_35"]',
base=td_1_3_row_1).send_keys('Foobar 1_1')
self.findBy(
'xpath', '//input[@name="qg_26-0-original_key_36"]',
base=td_1_3_row_1).send_keys('Foobar 1_2')
td_1_3_row_2 = self.findBy('xpath', '//table/tbody/tr[2]', base=td_1_3)
self.findBy(
'xpath', '//input[@name="qg_26-1-original_key_35"]',
base=td_1_3_row_2).send_keys('Foobar 2_1')
self.findBy(
'xpath', '//input[@name="qg_26-1-original_key_36"]',
base=td_1_3_row_2).send_keys('Foobar 2_2')
row_2 = self.findBy('xpath', '//tr[2]', base=table)
td_2_1 = self.findBy('xpath', '//td[1]', base=row_2)
self.findBy(
'xpath', '//input[@name="qg_27-0-original_key_33"]',
base=td_2_1).send_keys('Foo 2')
td_2_2 = self.findBy('xpath', '//td[2]', base=row_2)
self.findBy(
'xpath', '//input[@name="qg_27-0-original_key_34"]',
base=td_2_2).send_keys('Bar 2')
td_2_3 = self.findBy('xpath', '//td[3]', base=row_2)
td_2_3_row_1 = self.findBy('xpath', '//table/tbody/tr[1]', base=td_2_3)
self.findBy(
'xpath', '//input[@name="qg_28-0-original_key_35"]',
base=td_2_3_row_1).send_keys('Foobar 3_1')
self.findBy(
'xpath', '//input[@name="qg_28-0-original_key_36"]',
base=td_2_3_row_1).send_keys('Foobar 3_2')
self.submit_form_step()
self.wait_for('xpath', '//td[contains(text(), "Foobar 3_2")]')
# She sees that the values are represented as table
table = self.findBy('xpath', '//div/table')
table_text = table.text
headers = self.findManyBy('xpath', '//th', base=table)
self.assertEqual(len(headers), 4)
self.assertEqual(headers[0].text, 'Key 33')
self.assertEqual(headers[1].text, 'Key 34')
self.assertEqual(headers[2].text, 'Key 35')
self.assertEqual(headers[3].text, 'Key 36')
row_1 = self.findBy('xpath', '//tr[1]', base=table)
td_1_1 = self.findBy('xpath', '//td[1]', base=row_1)
self.assertEqual(td_1_1.text, 'Foo 1')
td_1_2 = self.findBy('xpath', '//td[2]', base=row_1)
self.assertEqual(td_1_2.text, 'Bar 1')
td_1_3_1_1 = self.findBy(
'xpath', '//table/tbody/tr[1]/td[3]/table/tbody/tr[1]/td[1]')
self.assertEqual(td_1_3_1_1.text, 'Foobar 1_1')
td_1_3_1_2 = self.findBy(
'xpath', '//table/tbody/tr[1]/td[3]/table/tbody/tr[1]/td[2]')
self.assertEqual(td_1_3_1_2.text, 'Foobar 1_2')
td_1_3_2_1 = self.findBy(
'xpath', '//table/tbody/tr[1]/td[3]/table/tbody/tr[2]/td[1]')
self.assertEqual(td_1_3_2_1.text, 'Foobar 2_1')
td_1_3_2_2 = self.findBy(
'xpath', '//table/tbody/tr[1]/td[3]/table/tbody/tr[2]/td[2]')
self.assertEqual(td_1_3_2_2.text, 'Foobar 2_2')
td_2_1 = self.findBy('xpath', '//div/table/tbody/tr[2]/td[1]')
self.assertEqual(td_2_1.text, 'Foo 2')
td_2_2 = self.findBy('xpath', '//div/table/tbody/tr[2]/td[2]')
self.assertEqual(td_2_2.text, 'Bar 2')
td_2_3_1_1 = self.findBy(
'xpath', '//table/tbody/tr[2]/td[3]/table/tbody/tr[1]/td[1]')
self.assertEqual(td_2_3_1_1.text, 'Foobar 3_1')
td_2_3_1_2 = self.findBy(
'xpath', '//table/tbody/tr[2]/td[3]/table/tbody/tr[1]/td[2]')
self.assertEqual(td_2_3_1_2.text, 'Foobar 3_2')
self.review_action('submit')
self.wait_for('xpath', '//td[contains(text(), "Foobar 3_2")]')
table_output = self.findBy('xpath', '//div/table')
self.assertEqual(table_text, table_output.text)
# def test_enter_questionnaire_requires_login(self):
# # Alice opens the login form and does not see a message
# self.browser.get(self.live_server_url + reverse(accounts_route_login))
# self.findByNot(
# 'xpath', '//div[@class="alert-box info" and contains(text(), "' +
# reverse(route_questionnaire_new) + '")]')
# # Alice tries to access the form without being logged in
# self.browser.get(self.live_server_url + reverse(
# route_questionnaire_new))
# self.findBy(
# 'xpath', '//div[@class="alert-box info" and contains(text(), "' +
# reverse(route_questionnaire_new) + '")]')
# # She sees that she has been redirected to the login page
# self.checkOnPage('Login')
# # self.checkOnPage(reverse(
# # route_questionnaire_new))
# self.findBy('name', 'user').send_keys('[email protected]')
# self.findBy('name', 'pass').send_keys('foo')
# self.findBy('id', 'button_login').click()
# # She sees that she is logged in and was redirected back to the form.
# # self.checkOnPage('Category 1')
def test_header_image(self):
# Alice logs in
self.doLogin()
# She goes to a step of the questionnaire
self.browser.get(self.live_server_url + reverse(
route_questionnaire_new_step,
kwargs={'identifier': 'new', 'step': 'cat_0'}))
self.rearrangeFormHeader()
# She sees a field to put files, drawn by Dropzone
dropzone = self.findBy(
'xpath', '//div[@id="id_qg_14-0-file_key_19" and contains(@class, '
'"dropzone")]')
self.assertTrue(dropzone.is_displayed())
# She does not see the preview field, which is hidden and does not
# contain an image
preview = self.findBy(
'xpath', '//div[@id="preview-id_qg_14-0-file_key_19"]')
self.assertFalse(preview.is_displayed())
self.findByNot(
'xpath', '//div[@id="preview-id_qg_14-0-file_key_19"]/'
'div[@class="image-preview"]/img')
# The hidden input field is empty
filename = self.findBy('xpath', '//input[@id="id_qg_14-0-key_19"]')
self.assertEqual(filename.get_attribute('value'), '')
# She sees that the form does not have any progress
self.findBy('xpath', '//span[@class="meter" and @style="width:0%"]')
# She uploads an image
self.dropImage('id_qg_14-0-file_key_19')
# She sees that the dropzone is hidden, the preview is visible
self.assertFalse(dropzone.is_displayed())
self.assertTrue(preview.is_displayed())
# Preview contains an image
self.findBy(
'xpath', '//div[@id="preview-id_qg_14-0-file_key_19"]/'
'div[@class="image-preview"]/img')
# The filename was added to the hidden input field
self.assertNotEqual(filename.get_attribute('value'), '')
# She sees that the progress was updated.
self.findBy(
'xpath', '//span[@class="meter" and @style="width: 50%;"]')
# She removes the file
self.findBy(
'xpath', '//div[@id="preview-id_qg_14-0-file_key_19"]/div/button'
).click()
# She sees the image was removed and the preview container is not
# visible anymore
self.findByNot(
'xpath', '//div[@id="preview-id_qg_14-0-file_key_19"]/'
'div[@class="image-preview"]/img')
self.assertFalse(preview.is_displayed())
# She sees the dropzone container again
self.assertTrue(dropzone.is_displayed())
# The hidden input field is empty again
self.assertEqual(filename.get_attribute('value'), '')
# She sees that the form does not have any progress
self.findBy('xpath', '//span[@class="meter" and @style="width: 0%;"]')
# She uploads an image again
self.dropImage('id_qg_14-0-file_key_19')
# Dropzone is hidden, preview is there, filename was written to field
self.assertFalse(dropzone.is_displayed())
self.assertTrue(preview.is_displayed())
self.assertNotEqual(filename.get_attribute('value'), '')
# She sees that the progress was updated.
self.findBy(
'xpath', '//span[@class="meter" and @style="width: 50%;"]')
# She submits the form
self.submit_form_step()
# On the overview page, she sees the image she uploaded
self.findBy('xpath',
'//div[contains(@class, "file-preview-container")]//img')
# She edits the form again and sees the image was populated correctly.
self.click_edit_section('cat_0')
# Dropzone is hidden, preview is there, filename was written to field
dropzone = self.findBy(
'xpath', '//div[@id="id_qg_14-0-file_key_19" and contains(@class, '
'"dropzone")]')
self.wait_for('xpath', '//div[@id="id_qg_14-0-file_key_19" and contains(@class, '
'"dropzone")]', visibility=False)
self.assertFalse(dropzone.is_displayed())
preview = self.findBy(
'xpath', '//div[@id="preview-id_qg_14-0-file_key_19"]')
self.assertTrue(preview.is_displayed())
filename = self.findBy('xpath', '//input[@id="id_qg_14-0-key_19"]')
self.assertNotEqual(filename.get_attribute('value'), '')
# She submits the form and sees that the image was submitted correctly.
self.submit_form_step()
self.findBy('xpath',
'//div[contains(@class, "file-preview-container")]//img')
self.review_action('submit')
@elasticmock
class QuestionnaireTestIndex(FunctionalTest):
# Tests requiring an index
fixtures = [
'sample_global_key_values',
'sample',
'samplemulti',
'sample_samplemulti_questionnaires',
]
def setUp(self):
super(QuestionnaireTestIndex, self).setUp()
create_temp_indices([('sample', '2015'), ('samplemulti', '2015')])
def test_enter_questionnaire(self):
# Alice logs in
self.doLogin()
# She goes directly to the Sample questionnaire
self.browser.get(self.live_server_url + reverse(
route_questionnaire_new))
# She sees the categories but without content, keys and
# subcategories are hidden if they are empty.
self.findByNot(
'xpath', '//article//h3[contains(text(), "Subcategory 1_1")]')
self.findByNot(
'xpath', '//article//article//*[contains(text(), "Key 1")]')
self.findByNot('xpath', '//article//*[text()[contains(.,"Foo")]]')
self.findByNot('xpath', '//article//*[text()[contains(.,"Bar")]]')
self.findByNot(
'xpath', '//article//h3[contains(text(), "Subcategory 1_2")]')
self.findByNot(
'xpath', '//article//*[text()[contains(.,"Key 4")]]')
self.findByNot(
'xpath', '//article//h3[contains(text(), "Subcategory 2_1")]')
self.findByNot('xpath', '//article//*[text()[contains(.,"Key 5")]]')
# She sees the author is not filled out
self.findByNot(
'xpath', '//ul[contains(@class, "tech-output-infos")]/li/a['
'contains(text(), "bar foo")]')
# She sees X buttons to edit a category and clicks the first
edit_buttons = self.findManyBy(
'xpath',
'//div[contains(@class, "tech-section-action")]/a')
self.assertEqual(len(edit_buttons), get_category_count())
self.click_edit_section('cat_1')
# She sees the form for Category 1
self.findBy('xpath', '//h2[contains(text(), "Category 1")]')
self.findBy('xpath', '//legend[contains(text(), "Subcategory 1_1")]')
self.findBy('xpath', '//legend[contains(text(), "Subcategory 1_2")]')
# She enters Key 1
self.findBy('name', 'qg_1-0-original_key_1').send_keys('Foo')
# # She tries to submit the form and sees an error message saying
# # that Key 3 is also required.
# self.findBy('id', 'button-submit').click()
# error = self.findBy(
# 'xpath', '//div[contains(@class, "qg_1")]/ul[contains(@class, '
# '"errorlist")]/li')
# self.assertEqual(error.text, "This field is required.")
# She enters Key 3 and submits the form again
self.findBy('name', 'qg_1-0-original_key_3').send_keys('Bar')
self.submit_form_step()
# She sees that she was redirected to the overview page and is
# shown a success message
self.findBy(
'xpath', '//article//h3[contains(text(), "Subcategory 1_1")]')
self.findBy('xpath', '//article//*[text()[contains(.,"Key 1")]]')
self.findBy('xpath', '//article//*[text()[contains(.,"Foo")]]')
self.findBy('xpath', '//article//*[text()[contains(.,"Bar")]]')
self.findByNot(
'xpath', '//article//h3[contains(text(), "Subcategory 1_2")]')
self.findByNot('xpath', '//article//*[text()[contains(.,"Key 4")]]')
self.findByNot(
'xpath', '//article//h3[contains(text(), "Subcategory 2_1")]')
self.findByNot('xpath', '//article//*[text()[contains(.,"Key 5")]]')
# She sees the author is already filled out
self.findBy(
'xpath', '//ul[contains(@class, "tech-infos")]/li/a['
'contains(text(), "bar foo")]')
# She submits the entire questionnaire
self.review_action('submit')
# She is being redirected to the details page and sees a success
# message.
self.findBy(
'xpath', '//article//h3[contains(text(), "Subcategory 1_1")]')
self.findBy('xpath', '//article//*[text()[contains(.,"Key 1")]]')
self.findBy('xpath', '//article//*[text()[contains(.,"Foo")]]')
self.findBy('xpath', '//article//*[text()[contains(.,"Bar")]]')
self.findByNot(
'xpath', '//article//h3[contains(text(), "Subcategory 1_2")]')
self.findByNot('xpath', '//article//*[text()[contains(.,"Key 4")]]')
self.findByNot(
'xpath', '//article//h3[contains(text(), "Subcategory 2_1")]')
self.findByNot('xpath', '//article//*[text()[contains(.,"Key 5")]]')
# She sees the author is still filled out
self.findBy(
'xpath', '//ul[contains(@class, "tech-infos")]/li/a['
'contains(text(), "bar foo")]')
# She sees that the # was removed from the URL
self.assertIn('#top', self.browser.current_url)
# She sees that on the detail page, there is no edit button as the
# questionnaire is in review
self.findByNot('xpath', '//a[contains(text(), "Edit")]')
# She goes to the list of questionnaires and sees that the
# questionnaire she created is listed there.
self.browser.get(self.live_server_url + reverse(
route_questionnaire_list))
expected = [
{
'title': 'Foo'
}
]
self.check_list_results(expected, count=False)
# If she goes to the questionnaire overview form again, she sees
# that the session values are not there anymore.
self.browser.get(self.live_server_url + reverse(
route_questionnaire_new))
self.findByNot(
'xpath', '//article//h3[contains(text(), "Subcategory 1_1")]')
self.findByNot('xpath', '//article//*[text()[contains(.,"Key 1")]]')
self.findByNot('xpath', '//article//*[contains(text(), "Foo")]')
self.findByNot('xpath', '//article//*[text()[contains(.,"Bar")]]')
self.findByNot(
'xpath', '//article//h3[contains(text(), "Subcategory 1_2")]')
self.findByNot('xpath', '//article//*[text()[contains(.,"Key 4")]]')
self.findByNot(
'xpath', '//article//h3[contains(text(), "Subcategory 2_1")]')
self.findByNot('xpath', '//article//*[text()[contains(.,"Key 5")]]')
class QuestionnaireLinkTest(FunctionalTest):
fixtures = [
'sample_global_key_values',
'sample',
'samplemulti',
'sample_samplemulti_questionnaires',
]
def test_add_questionnaire_link(self):
# Alice logs in
self.doLogin()
# She goes to a part of the questionnaire and enters some data
self.browser.get(self.live_server_url + reverse(
route_questionnaire_new_step,
kwargs={'identifier': 'new', 'step': 'cat_1'}))
self.findBy('name', 'qg_1-0-original_key_1').send_keys('Foo')
self.findBy('name', 'qg_1-0-original_key_3').send_keys('Bar')
# She submits the step
self.submit_form_step()
# She goes to the part where she can edit linked questionnaires
self.rearrange_notifications()
self.click_edit_section('cat_5')
# She sees there is a hidden field for the ID but it is empty
id_field = self.findBy('name', 'qg_33__samplemulti-0-link_id')
self.assertEqual(id_field.get_attribute('value'), '')
# She sees a field to search for linked questionnaires
self.findBy(
'xpath', '//input[contains(@class, "link-search-field")]'
'[1]').send_keys('key')
self.wait_for('xpath', '//li[@class="ui-menu-item"]')
self.findBy(
'xpath',
'//li[@class="ui-menu-item"]//strong[text()="This is key 1b"]')
elm = self.findBy(
'xpath',
'//li[@class="ui-menu-item"]//strong[text()="This is key 1a"'
']')
self.browser.execute_script("arguments[0].click();", elm)
# She sees that a field with the name was added
self.findBy(
'xpath', '//div[contains(@class, "alert-box") and contains(text(),'
'"This is key 1a")]')
# She sees the ID was added to the hidden field
id_field = self.findBy('name', 'qg_33__samplemulti-0-link_id')
self.assertEqual(id_field.get_attribute('value'), '3')
# She removes the link and sees the box is gone and the ID field is
# empty
elm = self.findBy(
'xpath',
'//div[contains(@class, "alert-box")][1]/a[@class="close"]')
self.browser.execute_script("arguments[0].click();", elm)
self.findByNot(
'xpath', '//div[contains(@class, "alert-box") and contains(text(),'
'"This is key 1a")]')
id_field = self.findBy('name', 'qg_33__samplemulti-0-link_id')
self.assertEqual(id_field.get_attribute('value'), '')
# She adds the link again
self.findBy(
'xpath', '//input[contains(@class, "link-search-field")]'
'[1]').send_keys('key')
self.wait_for('xpath', '//li[@class="ui-menu-item"]')
elm = self.findBy(
'xpath',
'//li[@class="ui-menu-item"]//strong[text()="This is key 1a"'
']')
self.browser.execute_script("arguments[0].click();", elm)
# She submits the step
self.submit_form_step()
# She sees that the link was added in category 6
self.findBy('xpath', '//*[text()[contains(.,"This is key 1a")]]')
# She goes back to the form and sees the one she linked is still
# in the form.
self.rearrange_notifications()
self.click_edit_section('cat_5')
id_field = self.findBy('name', 'qg_33__samplemulti-0-link_id')
self.assertEqual(id_field.get_attribute('value'), '3')
self.findBy(
'xpath', '//div[contains(@class, "alert-box") and contains(text(),'
'"This is key 1a")]')
# She deletes the link and submits the form
elm = self.findBy(
'xpath',
'//div[contains(@class, "alert-box")][1]/a[@class="close"]')
self.browser.execute_script("arguments[0].click();", elm)
id_field = self.findBy('name', 'qg_33__samplemulti-0-link_id')
self.assertEqual(id_field.get_attribute('value'), '')
self.submit_form_step()
self.findByNot('xpath', '//*[text()[contains(.,"This is key 1a")]]')
WebDriverWait(self.browser, 10).until(
EC.visibility_of_element_located((By.ID, "cat_5"))
)
# She links another questionnaire
self.click_edit_section('cat_5')
self.findBy(
'xpath', '//input[contains(@class, "link-search-field")]'
'[1]').send_keys('key')
self.wait_for('xpath', '//li[@class="ui-menu-item"]')
elm = self.findBy(
'xpath',
'//li[@class="ui-menu-item"]//strong[text()="This is key 1b"]')
self.browser.execute_script("arguments[0].click();", elm)
# She submits the step
self.submit_form_step()
# She sees that the link was added in category 6
self.findBy('xpath', '//*[text()[contains(.,"This is key 1b")]]')
# She submits the complete form
self.review_action('submit')
# She sees that the link was added in category 6
self.findBy('xpath', '//*[text()[contains(.,"This is key 1b")]]')
# The link can be clicked
self.wait_for('xpath', '//a[contains(@href, "samplemulti/view/")]')
elm = self.findBy(
'xpath', '//a[contains(@href, "samplemulti/view/")]')
self.browser.execute_script("arguments[0].click();", elm)
self.checkOnPage('MSection')
def test_delete_questionnaire_link(self):
user = User.objects.get(pk=101)
sample_title = 'This is the first key.'
samplemulti_title = 'This is key 1a'
samplemulti_id = 3
expected_links_to_samplemulti = [
{
'title': samplemulti_title,
'configuration': 'samplemulti',
}
]
expected_links_to_sample = [
{
'title': sample_title,
'configuration': 'sample'
}
]
# User logs in and opens an existing questionnaire
detail_page = SampleDetailPage(self)
detail_page.route_kwargs = {'identifier': 'sample_1'}
detail_page.open(login=True, user=user)
# User sees the linked questionnaire
detail_page.expand_details()
detail_page.check_linked_questionnaires(
expected=expected_links_to_samplemulti)
# User clicks the link
detail_page.click_linked_questionnaire(index=0)
# On the linked questionnaire details page, there is a link back
detail_page.expand_details()
detail_page.check_linked_questionnaires(
expected=expected_links_to_sample)
detail_page.click_linked_questionnaire(index=0)
# The user edits the questionnaire
detail_page.create_new_version()
# The links are still there
edit_page = SampleEditPage(self)
edit_page.check_linked_questionnaires(
expected=expected_links_to_samplemulti)
assert edit_page.has_text(edit_page.TEXT_SAMPLEMULTI_LINKS_SUBCATEGORY)
# The user opens the link form and sees the values are populated
# correctly
edit_page.click_edit_category(self.browser, 'cat_5')
step_page = SampleStepPage(self)
step_page.check_links([samplemulti_title])
assert step_page.get_value(
step_page.get_el(step_page.LOC_FORM_INPUT_SAMPLEMULTI_LINK_ID)
) == str(samplemulti_id)
# She deletes the link and submits the entire form
step_page.delete_link(index=0)
step_page.submit_step(self.browser)
assert edit_page.count_linked_questionnaires() == 0
assert not edit_page.has_text(
edit_page.TEXT_SAMPLEMULTI_LINKS_SUBCATEGORY)
# She submits the questionnaire
edit_page.submit_questionnaire()
assert edit_page.count_linked_questionnaires() == 0
assert not edit_page.has_text(
edit_page.TEXT_SAMPLEMULTI_LINKS_SUBCATEGORY)
def test_edit_questionnaire_multiple_links(self):
user = User.objects.get(pk=101)
samplemulti_identifier = 'samplemulti_1'
sample_title_1 = 'This is the first key.'
sample_id_1 = 1
sample_title_2 = 'Foo'
# User logs in and opens an existing questionnaire with a link
detail_page = SampleMultiDetailPage(self)
detail_page.route_kwargs = {'identifier': samplemulti_identifier}
detail_page.open(login=True, user=user)
expected_links = [
{
'title': sample_title_1,
'configuration': 'sample'
}
]
detail_page.check_linked_questionnaires(expected=expected_links)
# User edits the questionnaire
detail_page.create_new_version()
edit_page = SampleMultiEditPage(self)
# The links are there
edit_page.check_linked_questionnaires(expected=expected_links)
assert edit_page.has_text(edit_page.TEXT_SAMPLE_LINKS_SUBCATEGORY)
# User edits the link and sees the field is populated correctly
edit_page.click_edit_category(self.browser, 'mcat_1')
step_page = SampleMultiStepPage(self)
step_page.check_links([sample_title_1])
assert step_page.get_value(
step_page.get_el(step_page.LOC_FORM_INPUT_SAMPLE_LINK_ID)
) == str(sample_id_1)
# She tries to add the same link again, this does not work.
step_page.add_link(
qg_keyword='mqg_02__sample', link_name='key', add_more=True)
step_page.check_links([sample_title_1])
# She adds another link
step_page.add_link(qg_keyword='mqg_02__sample', link_name='Foo', add_more=False)
step_page.check_links([sample_title_1, sample_title_2])
# She submits the step
self.submit_form_step()
# She sees that both links were added
expected_links = [
{
'title': sample_title_2,
'configuration': 'sample'
}
] + expected_links
edit_page.check_linked_questionnaires(expected=expected_links)
# She submits the form and sees that both links were correctly
# submitted.
edit_page.submit_questionnaire()
detail_page.check_linked_questionnaires(expected=expected_links)
@patch.object(QuestionnaireLinkSearchView, 'dispatch')
def test_search(self, mock_link_search):
# Alice logs in
self.doLogin()
# She goes to the section containing the links of a new questionnaire
self.browser.get(self.live_server_url + reverse(
route_questionnaire_new_step,
kwargs={'identifier': 'new', 'step': 'cat_5'}))
self.rearrangeFormHeader()
search_field = self.findBy(
'xpath', '//input[contains(@class, "link-search-field")][1]')
mock_link_search.return_value = JsonResponse([], safe=False)
search_field.send_keys('foo')
self.wait_for('xpath', '//li[@class="ui-menu-item"]')
# She enters the name of link which does not exist. She gets a
# notice and when she clicks it, no link is added.
elm = self.findBy(
'xpath',
'//li[@class="ui-menu-item"]//strong[text()="No results found"]'
)
self.browser.execute_script("arguments[0].click();", elm)
self.findByNot(
'xpath',
'//div[contains(@class, "alert-box")]')
search_field.clear()
# She enters something which returns more results than expected
data = [{
'name': 'foo',
'code': 'bar',
'display': 'foo',
'value': 1,
'id': 1,
}] * 15
mock_link_search.return_value = JsonResponse(data, safe=False)
search_field.send_keys('foo')
self.wait_for('xpath', '//li[@class="ui-menu-item"]')
# She gets a message saying there are too many results to
# display them all. Clicking on the message does not do
# anything. Not all results are shown.
results = self.findManyBy(
'xpath',
'//li[@class="ui-menu-item"]//strong[text()="foo"]')
self.assertEqual(len(results), 10)
# self.rearrangeFormHeader()
# self.findBy(
# 'xpath',
# '//li[@class="ui-menu-item"]//strong[contains(text(), "Too many '
# 'results")]'
# ).click()
# self.findByNot(
# 'xpath',
# '//div[contains(@class, "alert-box")]')
#
# # The search field is still visible
# search_field = self.findBy(
# 'xpath', '//input[contains(@class, "link-search-field")][1]')
"""
Test:
* Show pending
"""
@elasticmock
class QuestionnaireTestProjects(FunctionalTest):
fixtures = [
'global_key_values',
'sample',
'sample_projects',
'sample_institutions',
]
def test_select_project(self):
# Alice logs in
self.doLogin()
# She goes to a step of the questionnaire
self.browser.get(self.live_server_url + reverse(
route_questionnaire_new_step,
kwargs={'identifier': 'new', 'step': 'cat_2'}))
self.rearrangeFormHeader()
# She sees Key 52, which is a select field rendered with Chosen
self.findBy('xpath', '//select[@name="qg_37-0-key_52"]')
chosen_field = self.findBy('xpath', '//a[@class="chosen-single"]')
self.assertEqual(chosen_field.text, '-')
# She sees that the values are ordered alphabetically and the list only
# shows active projects
values = ['International Project for Collecting Technologies (IPCT)',
'The first Project (TFP)']
for i, v in enumerate(values):
self.findBy(
'xpath',
'//select[@name="qg_37-0-key_52"]/option[{}][contains(text(),'
' "{}")]'.format(i + 2, v))
# She selects a project
self.findBy(
'xpath', '//div[contains(@class, "chosen-container")]').click()
self.findBy(
'xpath', '//ul[@class="chosen-results"]/li[contains(text(), '
'"International")]').click()
self.assertEqual(chosen_field.text, 'International Project for '
'Collecting Technologies (IPCT)')
# She submits the step
self.submit_form_step()
# She sees that the field is visible as Key 52. Previously, there used
# to be a Key 53 only holding the display value. This was now improved.
self.findBy('xpath', '//*[text()[contains(.,"Key 52")]]')
self.findBy('xpath', '//*[text()[contains(.,"International Project for '
'Collecting Technologies")]]')
# She goes back to the step and deselects the project
self.click_edit_section('cat_2')
self.findBy(
'xpath', '//div[contains(@class, "chosen-container")]').click()
self.findBy(
'xpath',
'//ul[@class="chosen-results"]/li[contains(text(), "-")]').click()
# She submits the step and sees the project is gone in the overview
self.submit_form_step()
self.findByNot('xpath', '//*[text()[contains(.,"Key 52")]]')
# She goes back to the step and selects another project
self.click_edit_section('cat_2')
self.findBy(
'xpath', '//div[contains(@class, "chosen-container")]').click()
self.findBy(
'xpath',
'//ul[@class="chosen-results"]/li[contains(text(), "first")]').\
click()
# She sees that she can also select an institution, which she does
self.findBy(
'xpath', '(//div[contains(@class, "chosen-container")])[2]').click()
self.findBy(
'xpath',
'//ul[@class="chosen-results"]/li[contains(text(), "Global")]'). \
click()
# She submits the step
self.submit_form_step()
self.findBy('xpath', '//*[text()[contains(.,"Key 52")]]')
self.findBy('xpath',
'//*[text()[contains(.,"The first Project (TFP)")]]')
self.findBy('xpath', '//*[text()[contains(.,"Key 54")]]')
self.findBy('xpath',
'//*[text()[contains(.,"Global Institution")]]')
# She submits the questionnaire and sees the project is submitted
self.review_action('submit')
self.findBy('xpath', '//*[text()[contains(.,"Key 52")]]')
self.findBy('xpath',
'//*[text()[contains(.,"The first Project (TFP)")]]')
self.findBy('xpath', '//*[text()[contains(.,"Key 54")]]')
self.findBy('xpath',
'//*[text()[contains(.,"Global Institution")]]')
| 41.963999
| 126
| 0.592279
| 16,825
| 130,550
| 4.42948
| 0.037444
| 0.069238
| 0.078094
| 0.021925
| 0.828879
| 0.796541
| 0.760929
| 0.716931
| 0.680702
| 0.642501
| 0
| 0.030082
| 0.255197
| 130,550
| 3,110
| 127
| 41.977492
| 0.736378
| 0.305255
| 0
| 0.74642
| 0
| 0.00716
| 0.291315
| 0.180116
| 0
| 0
| 0
| 0
| 0.145585
| 1
| 0.0179
| false
| 0
| 0.010143
| 0
| 0.032816
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
913cdc9de8310596907d309bbbc38cac1d7277c6
| 280
|
py
|
Python
|
operations.py
|
bv94/advanced-calculator
|
a41b7344b662acdf331fd744e97862a86d9a0e7d
|
[
"MIT"
] | null | null | null |
operations.py
|
bv94/advanced-calculator
|
a41b7344b662acdf331fd744e97862a86d9a0e7d
|
[
"MIT"
] | null | null | null |
operations.py
|
bv94/advanced-calculator
|
a41b7344b662acdf331fd744e97862a86d9a0e7d
|
[
"MIT"
] | null | null | null |
def sum(num1, num2):
return num1+num2
def subtract(num1, num2):
return num1-num2
def multiply(num1, num2):
return num1*num2
def divide(num1, num2):
return num1/num2
math_operations = {
"+": sum,
"-": subtract,
"*": multiply,
"/": divide
}
| 11.666667
| 25
| 0.589286
| 34
| 280
| 4.823529
| 0.294118
| 0.390244
| 0.341463
| 0.439024
| 0.591463
| 0.457317
| 0
| 0
| 0
| 0
| 0
| 0.077295
| 0.260714
| 280
| 23
| 26
| 12.173913
| 0.714976
| 0
| 0
| 0
| 0
| 0
| 0.014337
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0
| 0.285714
| 0.571429
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 6
|
e69cb960aa19c89398e7eeddc43f218483e8170d
| 11,820
|
py
|
Python
|
tests/tests_mot/serving/test_inference.py
|
amartya-dev/mot
|
6706860b10b524c4f90dfd98ec9b1f2433e4e09e
|
[
"MIT"
] | 22
|
2019-10-04T06:42:04.000Z
|
2022-03-25T02:32:50.000Z
|
tests/tests_mot/serving/test_inference.py
|
amartya-dev/mot
|
6706860b10b524c4f90dfd98ec9b1f2433e4e09e
|
[
"MIT"
] | 43
|
2019-10-05T10:15:32.000Z
|
2022-02-09T23:36:30.000Z
|
tests/tests_mot/serving/test_inference.py
|
amartya-dev/mot
|
6706860b10b524c4f90dfd98ec9b1f2433e4e09e
|
[
"MIT"
] | 15
|
2019-09-26T14:58:38.000Z
|
2022-03-29T20:22:31.000Z
|
import json
import os
from unittest import mock
import cv2
import numpy as np
import pytest
from werkzeug import FileStorage
from mot.serving.inference import handle_post_request, predict_and_format_image, process_image
HOME = os.path.expanduser("~")
PATH_TO_TEST_VIDEO = os.path.join(HOME, ".mot/tests/test_video.mp4")
PATH_TO_TEST_ZIP = os.path.join(HOME, ".mot/tests/test_video_folder.zip")
def mock_post_tensorpack_localizer(*args, **kwargs):
boxes = [[0, 0, 120, 40], [0, 0, 120, 80]]
scores = [[0.71, 0.1, 0.1], [0.2, 0.05, 0.71]]
classes = [1, 3]
class Response(mock.Mock):
json_text = {
'outputs':
{
'output/boxes:0': boxes,
'output/scores:0': scores,
'output/labels:0': classes,
}
}
@property
def text(self):
return json.dumps(self.json_text)
def json(self):
return self.json_text
response = Response()
return response
@mock.patch('requests.post', side_effect=mock_post_tensorpack_localizer)
def test_handle_post_request_image(mock_server_result):
image = np.ones((300, 200, 3))
data = "{}".format(json.dumps({"image": image.tolist()}))
data = data.encode('utf-8')
m = mock.MagicMock() # here we mock flask.request
m.data = data
with mock.patch("mot.serving.inference.request", m):
output = handle_post_request()
expected_output = {
"detected_trash":
[
{
"box": [0.0, 0.0, 0.1, 0.05],
"label": "bottles",
"score": 0.71
}, {
"box": [0.0, 0.0, 0.1, 0.1],
"label": "fragments",
"score": 0.71
}
]
}
assert output == expected_output
def test_handle_post_request_wrong_image():
data = "{}".format(json.dumps({"image:0": [[[0, 0, 0], [0, 0, 0]], [[0, 0, 0], [0, 0, 0]]]}))
data = data.encode('utf-8')
m = mock.MagicMock() # here we mock flask.request
m.data = data
with pytest.raises(ValueError):
with mock.patch("mot.serving.inference.request", m):
output = handle_post_request()
def test_handle_post_request_video():
# TODO test good behavior when implemented
data = "{}".format(json.dumps({"video": [[[0, 0, 0], [0, 0, 0]], [[0, 0, 0], [0, 0, 0]]]}))
data = data.encode('utf-8')
m = mock.MagicMock() # here we mock flask.request
m.data = data
with pytest.raises(NotImplementedError):
with mock.patch("mot.serving.inference.request", m):
output = handle_post_request()
@mock.patch('requests.post', side_effect=mock_post_tensorpack_localizer)
def test_handle_post_request_file_image(mock_server_result, tmpdir):
data = np.ones((300, 200, 3))
filename = "test.jpg"
filepath = os.path.join(tmpdir, filename)
cv2.imwrite(filepath, data)
m = mock.MagicMock()
files = {"file": FileStorage(open(filepath, "rb"), content_type='image/jpg')}
m.files = files
upload_folder = os.path.join(tmpdir, "upload")
os.mkdir(upload_folder)
with open(os.path.join(upload_folder, filename), "w+") as f:
f.write(
"this file should be deleted by the handle post request to be replaced"
" by the image we are uploading."
)
with mock.patch("mot.serving.inference.request", m):
output = handle_post_request(upload_folder=upload_folder)
expected_output = {
"image":
output["image"],
"detected_trash":
[
{
"box": [0.0, 0.0, 0.1, 0.05],
"label": "bottles",
"score": 0.71
}, {
"box": [0.0, 0.0, 0.1, 0.1],
"label": "fragments",
"score": 0.71
}
]
}
assert output == expected_output
@mock.patch('requests.post', side_effect=mock_post_tensorpack_localizer)
def test_handle_post_request_file_video(mock_server_result, tmpdir):
m = mock.MagicMock()
files = {"file": FileStorage(open(PATH_TO_TEST_VIDEO, "rb"), content_type='video/mkv')}
m.files = files
m.form = {"fps": 2, "foo": "bar"}
split_frames_folder = os.path.join(
tmpdir, "{}_split".format(os.path.basename(PATH_TO_TEST_VIDEO))
)
os.mkdir(split_frames_folder) # this folder should be deleted by handle post request
with mock.patch("mot.serving.inference.request", m):
output = handle_post_request(upload_folder=str(tmpdir))
assert len(output["detected_trash"]) == 2
assert "id" in output["detected_trash"][0]
assert "frame_to_box" in output["detected_trash"][1]
for frame, box in output["detected_trash"][1]["frame_to_box"].items():
assert isinstance(frame, int)
assert isinstance(box, list)
assert len(box) == 4
assert output["video_length"] == 6 or output["video_length"] == 7
assert output["fps"] == 2
assert "video_id" in output
@mock.patch('requests.post', side_effect=mock_post_tensorpack_localizer)
def test_handle_post_request_file_zip(mock_server_result, tmpdir):
m = mock.MagicMock()
files = {"file": FileStorage(open(PATH_TO_TEST_ZIP, "rb"), content_type='application/zip')}
m.files = files
m.form = {"fps": 2, "foo": "bar"}
with mock.patch("mot.serving.inference.request", m):
output = handle_post_request(upload_folder=str(tmpdir))
assert len(output["detected_trash"]) == 2
assert "id" in output["detected_trash"][0]
assert "frame_to_box" in output["detected_trash"][1]
for frame, box in output["detected_trash"][1]["frame_to_box"].items():
assert isinstance(frame, int)
assert isinstance(box, list)
assert len(box) == 4
assert output["video_length"] == 6 or output["video_length"] == 7
assert output["fps"] == 2
assert "video_id" in output
def test_handle_post_request_file_other(tmpdir):
filename = "test.pdf"
filepath = os.path.join(tmpdir, filename)
with open(filepath, "w") as f:
f.write("mock data")
m = mock.MagicMock()
files = {"file": FileStorage(open(filepath, "rb"), content_type='poulet/pdf')}
m.files = files
upload_folder = os.path.join(tmpdir, "upload_folder")
with pytest.raises(NotImplementedError):
with mock.patch("mot.serving.inference.request", m):
output = handle_post_request(upload_folder=upload_folder)
assert os.path.isdir(
upload_folder
) # the upload_folder should be created by handle post request
@mock.patch('requests.post', side_effect=mock_post_tensorpack_localizer)
def test_process_image(mock_server_result, tmpdir):
image = np.ones((300, 200, 3))
image_path = os.path.join(tmpdir, "image.jpg")
cv2.imwrite(image_path, image)
predictions = process_image(image_path)
assert predictions == {
'output/boxes:0': [[0, 0, 0.1, 0.05], [0, 0, 0.1, 0.1]],
'output/scores:0': [[0.71, 0.1, 0.1], [0.2, 0.05, 0.71]],
'output/labels:0': [1, 3]
}
@mock.patch('requests.post', side_effect=mock_post_tensorpack_localizer)
def test_predict_and_format_image(mock_server_result, tmpdir):
image = np.ones((300, 200, 3))
predictions = predict_and_format_image(image)
assert predictions == [
{
"box": [0, 0, 0.1, 0.05],
"label": "bottles",
"score": 0.71
}, {
"box": [0, 0, 0.1, 0.1],
"label": "fragments",
"score": 0.71
}
]
# tesing with different class names
class_names = ["others", "fragments", "chicken", "bottles"]
predictions = predict_and_format_image(image, class_names)
assert predictions == [
{
"box": [0, 0, 0.1, 0.05],
"label": "others",
"score": 0.71
}, {
"box": [0, 0, 0.1, 0.1],
"label": "chicken",
"score": 0.71
}
]
# testing with different thresholds
class_to_threshold = {"bottles": 0.8, "others": 0.3, "fragments": 0.3}
predictions = predict_and_format_image(image, class_to_threshold=class_to_threshold)
assert predictions == [{"box": [0, 0, 0.1, 0.1], "label": "fragments", "score": 0.71}]
# testing with different thresholds
class_to_threshold = {"bottles": 0.8, "others": 0.3, "fragments": 0.8}
predictions = predict_and_format_image(image, class_to_threshold=class_to_threshold)
assert predictions == []
def mock_post_tensorpack_localizer_error(*args, **kwargs):
class Response(mock.Mock):
json_text = {'error': "¯\(°_o)/¯"}
@property
def text(self):
return json.dumps(self.json_text)
def json(self):
return self.json_text
response = Response()
return response
@mock.patch('requests.post', side_effect=mock_post_tensorpack_localizer_error)
def test_handle_post_request_file_error(mock_server_result, tmpdir):
# videos
m = mock.MagicMock()
files = {"file": FileStorage(open(PATH_TO_TEST_VIDEO, "rb"), content_type='video/mkv')}
m.files = files
m.form = {"fps": 2, "foo": "bar"}
split_frames_folder = os.path.join(
tmpdir, "{}_split".format(os.path.basename(PATH_TO_TEST_VIDEO))
)
os.mkdir(split_frames_folder) # this folder should be deleted by handle post request
with mock.patch("mot.serving.inference.request", m):
outputs = handle_post_request(upload_folder=str(tmpdir))
assert "error" in outputs
assert outputs["error"].endswith("¯\(°_o)/¯")
# images
data = np.ones((300, 200, 3))
filename = "test.jpg"
filepath = os.path.join(tmpdir, filename)
cv2.imwrite(filepath, data)
m = mock.MagicMock()
files = {"file": FileStorage(open(filepath, "rb"), content_type='image/jpg')}
m.files = files
with mock.patch("mot.serving.inference.request", m):
outputs = handle_post_request(upload_folder=str(tmpdir))
assert "error" in outputs
assert outputs["error"].endswith("¯\(°_o)/¯")
def mock_post_tensorpack_localizer_unknown(*args, **kwargs):
class Response(mock.Mock):
json_text = {'unknown': "¯\_(ツ)_/¯"}
@property
def text(self):
return json.dumps(self.json_text)
def json(self):
return self.json_text
response = Response()
return response
@mock.patch('requests.post', side_effect=mock_post_tensorpack_localizer_unknown)
def test_handle_post_request_file_unknwon(mock_server_result, tmpdir):
# videos
m = mock.MagicMock()
files = {"file": FileStorage(open(PATH_TO_TEST_VIDEO, "rb"), content_type='video/mkv')}
m.files = files
m.form = {"fps": 2, "foo": "bar"}
split_frames_folder = os.path.join(
tmpdir, "{}_split".format(os.path.basename(PATH_TO_TEST_VIDEO))
)
os.mkdir(split_frames_folder) # this folder should be deleted by handle post request
with mock.patch("mot.serving.inference.request", m):
outputs = handle_post_request(upload_folder=str(tmpdir))
assert "error" in outputs
assert outputs["error"].endswith("{'unknown': '¯\\\\_(ツ)_/¯'}")
# images
data = np.ones((300, 200, 3))
filename = "test.jpg"
filepath = os.path.join(tmpdir, filename)
cv2.imwrite(filepath, data)
m = mock.MagicMock()
files = {"file": FileStorage(open(filepath, "rb"), content_type='image/jpg')}
m.files = files
with mock.patch("mot.serving.inference.request", m):
outputs = handle_post_request(upload_folder=str(tmpdir))
assert "error" in outputs
assert outputs["error"].endswith("{'unknown': '¯\\\\_(ツ)_/¯'}")
| 35.495495
| 97
| 0.613452
| 1,549
| 11,820
| 4.507424
| 0.111685
| 0.016328
| 0.017617
| 0.016041
| 0.845603
| 0.810083
| 0.782441
| 0.769837
| 0.749785
| 0.746061
| 0
| 0.029811
| 0.239425
| 11,820
| 332
| 98
| 35.60241
| 0.745161
| 0.039679
| 0
| 0.644928
| 0
| 0
| 0.145302
| 0.033172
| 0
| 0
| 0
| 0.003012
| 0.123188
| 1
| 0.072464
| false
| 0
| 0.028986
| 0.021739
| 0.155797
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
e6a5e94f083a47a099d003d1153ef56a2329394e
| 3,071
|
py
|
Python
|
tests/components/nexia/test_scene.py
|
Fred-Ch/core
|
4ac4a5ada957622d8a602f9b88d13596c79f305b
|
[
"Apache-2.0"
] | 1
|
2020-11-29T03:14:56.000Z
|
2020-11-29T03:14:56.000Z
|
tests/components/nexia/test_scene.py
|
Fred-Ch/core
|
4ac4a5ada957622d8a602f9b88d13596c79f305b
|
[
"Apache-2.0"
] | null | null | null |
tests/components/nexia/test_scene.py
|
Fred-Ch/core
|
4ac4a5ada957622d8a602f9b88d13596c79f305b
|
[
"Apache-2.0"
] | null | null | null |
"""The lock tests for the august platform."""
from .util import async_init_integration
async def test_automation_scenees(hass):
"""Test creation automation scenees."""
await async_init_integration(hass)
state = hass.states.get("scene.away_short")
expected_attributes = {
"attribution": "Data provided by mynexia.com",
"description": "When IFTTT activates the automation Upstairs "
"West Wing will permanently hold the heat to 63.0 "
"and cool to 80.0 AND Downstairs East Wing will "
"permanently hold the heat to 63.0 and cool to "
"79.0 AND Downstairs West Wing will permanently "
"hold the heat to 63.0 and cool to 79.0 AND "
"Upstairs West Wing will permanently hold the "
"heat to 63.0 and cool to 81.0 AND Upstairs West "
"Wing will change Fan Mode to Auto AND Downstairs "
"East Wing will change Fan Mode to Auto AND "
"Downstairs West Wing will change Fan Mode to "
"Auto AND Activate the mode named 'Away Short' "
"AND Master Suite will permanently hold the heat "
"to 63.0 and cool to 79.0 AND Master Suite will "
"change Fan Mode to Auto",
"friendly_name": "Away Short",
"icon": "mdi:script-text-outline",
}
# Only test for a subset of attributes in case
# HA changes the implementation and a new one appears
assert all(
state.attributes[key] == expected_attributes[key] for key in expected_attributes
)
state = hass.states.get("scene.power_outage")
expected_attributes = {
"attribution": "Data provided by mynexia.com",
"description": "When IFTTT activates the automation Upstairs "
"West Wing will permanently hold the heat to 55.0 "
"and cool to 90.0 AND Downstairs East Wing will "
"permanently hold the heat to 55.0 and cool to "
"90.0 AND Downstairs West Wing will permanently "
"hold the heat to 55.0 and cool to 90.0 AND "
"Activate the mode named 'Power Outage'",
"friendly_name": "Power Outage",
"icon": "mdi:script-text-outline",
}
# Only test for a subset of attributes in case
# HA changes the implementation and a new one appears
assert all(
state.attributes[key] == expected_attributes[key] for key in expected_attributes
)
state = hass.states.get("scene.power_restored")
expected_attributes = {
"attribution": "Data provided by mynexia.com",
"description": "When IFTTT activates the automation Upstairs "
"West Wing will Run Schedule AND Downstairs East "
"Wing will Run Schedule AND Downstairs West Wing "
"will Run Schedule AND Activate the mode named "
"'Home'",
"friendly_name": "Power Restored",
"icon": "mdi:script-text-outline",
}
# Only test for a subset of attributes in case
# HA changes the implementation and a new one appears
assert all(
state.attributes[key] == expected_attributes[key] for key in expected_attributes
)
| 42.068493
| 88
| 0.658092
| 423
| 3,071
| 4.728132
| 0.217494
| 0.032
| 0.054
| 0.088
| 0.849
| 0.8035
| 0.745
| 0.745
| 0.745
| 0.686
| 0
| 0.02123
| 0.263758
| 3,071
| 72
| 89
| 42.652778
| 0.863335
| 0.107782
| 0
| 0.315789
| 0
| 0
| 0.572119
| 0.025651
| 0
| 0
| 0
| 0
| 0.052632
| 1
| 0
| false
| 0
| 0.017544
| 0
| 0.017544
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
e6d1e5e08a71720790416b729cada9206ecf0929
| 7,918
|
py
|
Python
|
tarifa.py
|
anthuand/UNE_telegram_bot
|
d8bedbc2d30c27af641ee4b1a42bb0a8fb0f31d8
|
[
"MIT"
] | null | null | null |
tarifa.py
|
anthuand/UNE_telegram_bot
|
d8bedbc2d30c27af641ee4b1a42bb0a8fb0f31d8
|
[
"MIT"
] | null | null | null |
tarifa.py
|
anthuand/UNE_telegram_bot
|
d8bedbc2d30c27af641ee4b1a42bb0a8fb0f31d8
|
[
"MIT"
] | null | null | null |
# Rango en kWh Precio (Cup)
# 0-100 0.33
# 101-150 1.07
# 151-200 1.43
# 201-250 2.46
# 251-300 3.00
# 301-350 4.00
# 351-400 5.00
# 401-450 6.00
# 451-500 7.00
# 501-600 9.20
# 601-700 9.45
# 701-1000 9.85
# 1001-1800 10.80
# 1801-2600 11.80
# 2601-3400 12.90
# 3401-4200 13.95
# 4201-5000 15.00
# Más de 5000 20.00
def calcularTarifa(consumo):
saldo = 0
l_inf=0
l_sup=100
tarifa=0.33
if consumo >l_sup:
saldo += (l_sup-l_inf)*tarifa
l_inf=l_sup
l_sup=150
tarifa=1.07
if consumo >l_sup:
saldo += (l_sup-l_inf)*tarifa
l_inf=l_sup
l_sup=200
tarifa=1.43
if consumo >l_sup:
saldo += (l_sup-l_inf)*tarifa
l_inf=l_sup
l_sup=250
tarifa=2.46
if consumo >l_sup:
saldo += (l_sup-l_inf)*tarifa
l_inf=l_sup
l_sup=300
tarifa=3.00
if consumo >l_sup:
saldo += (l_sup-l_inf)*tarifa
l_inf=l_sup
l_sup=350
tarifa=4.00
if consumo >l_sup:
saldo += (l_sup-l_inf)*tarifa
l_inf=l_sup
l_sup=400
tarifa=5.00
if consumo >l_sup:
saldo += (l_sup-l_inf)*tarifa
l_inf=l_sup
l_sup=450
tarifa=6.00
if consumo >l_sup:
saldo += (l_sup-l_inf)*tarifa
l_inf=l_sup
l_sup=500
tarifa=7.00
if consumo >l_sup:
saldo += (l_sup-l_inf)*tarifa
l_inf=l_sup
l_sup=600
tarifa=9.20
if consumo >l_sup:
saldo += (l_sup-l_inf)*tarifa
l_inf=l_sup
l_sup=700
tarifa=9.45
if consumo >l_sup:
saldo += (l_sup-l_inf)*tarifa
l_inf=l_sup
l_sup=1000
tarifa=9.85
if consumo >l_sup:
saldo += (l_sup-l_inf)*tarifa
l_inf=l_sup
l_sup=1800
tarifa=10.80
if consumo >l_sup:
saldo += (l_sup-l_inf)*tarifa
l_inf=l_sup
l_sup=2600
tarifa=11.80
if consumo >l_sup:
saldo += (l_sup-l_inf)*tarifa
l_inf=l_sup
l_sup=3400
tarifa=12.90
if consumo >l_sup:
saldo += (l_sup-l_inf)*tarifa
l_inf=l_sup
l_sup=4200
tarifa=13.95
if consumo >l_sup:
saldo += (l_sup-l_inf)*tarifa
l_inf=l_sup
l_sup=5000
tarifa=15.00
if consumo >l_inf & consumo<l_sup:
saldo += (l_sup-l_inf)*tarifa
l_inf=l_sup
tarifa=20.00
if consumo >l_inf:
saldo += (l_sup-l_inf)*tarifa
l_inf=l_sup
tarifa=20.00
else :
saldo +=(consumo-l_inf)*tarifa
else :
saldo +=(consumo-l_inf)*tarifa
else :
saldo +=(consumo-l_inf)*tarifa
else :
saldo +=(consumo-l_inf)*tarifa
else :
saldo +=(consumo-l_inf)*tarifa
else :
saldo +=(consumo-l_inf)*tarifa
else :
saldo +=(consumo-l_inf)*tarifa
else :
saldo +=(consumo-l_inf)*tarifa
else :
saldo +=(consumo-l_inf)*tarifa
else :
saldo +=(consumo-l_inf)*tarifa
else :
saldo +=(consumo-l_inf)*tarifa
else :
saldo +=(consumo-l_inf)*tarifa
else :
saldo +=(consumo-l_inf)*tarifa
else :
saldo +=(consumo-l_inf)*tarifa
else :
saldo +=(consumo-l_inf)*tarifa
else :
saldo +=(consumo-l_inf)*tarifa
else :
saldo = consumo*tarifa
print("Importe de la tarifa electrica: {} cup".format(saldo))
return saldo
| 45.505747
| 105
| 0.238318
| 560
| 7,918
| 3.146429
| 0.144643
| 0.15891
| 0.096481
| 0.102157
| 0.716799
| 0.700908
| 0.700908
| 0.700908
| 0.700908
| 0.700908
| 0
| 0.130017
| 0.710533
| 7,918
| 173
| 106
| 45.768786
| 0.638743
| 0.058474
| 0
| 0.674419
| 0
| 0
| 0.005115
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.007752
| false
| 0
| 0.007752
| 0
| 0.023256
| 0.007752
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 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
| 6
|
e6e4f839d795bc11a666bc08eb08a4a992a9209b
| 814
|
py
|
Python
|
models/locochatlog.py
|
jujinesy/Empier_PythonKakaoBot
|
80d2951955002b1a0b5d77b5c2830bc8def63ea3
|
[
"MIT"
] | 3
|
2017-03-30T15:20:18.000Z
|
2018-01-04T12:46:05.000Z
|
models/locochatlog.py
|
skdltmxn/kakaobot
|
e738b4a8d994fc4125bbd471bd48378a11a8d371
|
[
"MIT"
] | 1
|
2020-08-06T08:13:22.000Z
|
2020-08-06T08:13:22.000Z
|
models/locochatlog.py
|
skdltmxn/kakaobot
|
e738b4a8d994fc4125bbd471bd48378a11a8d371
|
[
"MIT"
] | 5
|
2020-08-06T08:18:02.000Z
|
2021-02-28T03:59:45.000Z
|
# -*- coding: utf-8 -*-
class LocoChatLog(object):
def __init__(self, data):
self._data = data
def msg_id(self):
return self._data["msgId"]
def send_at(self):
return self._data["sendAt"]
def log_id(self):
return self._data["logId"]
def author_id(self):
return self._data["authorId"]
def attachment(self):
return self._data["attachment"]
def message(self, encode=True):
if encode:
return self._data["message"].encode("utf8")
else:
return self._data["message"]
def type(self):
return self._data["type"]
def prev_id(self):
return self._data["prevId"]
def chat_id(self):
return self._data["chatId"]
| 22
| 55
| 0.535627
| 93
| 814
| 4.462366
| 0.354839
| 0.231325
| 0.337349
| 0.346988
| 0.240964
| 0
| 0
| 0
| 0
| 0
| 0
| 0.003704
| 0.336609
| 814
| 36
| 56
| 22.611111
| 0.764815
| 0.025799
| 0
| 0
| 0
| 0
| 0.085967
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.416667
| false
| 0
| 0
| 0.333333
| 0.875
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 6
|
e6f86347bfe0cfe563bd3c385da3dd5d2a310847
| 33
|
py
|
Python
|
_/0349_10_Code/36.py
|
paullewallencom/javascript-978-1-8495-1034-9
|
7e539d042c644931a9ef2418f66d260a1c6892eb
|
[
"Apache-2.0"
] | null | null | null |
_/0349_10_Code/36.py
|
paullewallencom/javascript-978-1-8495-1034-9
|
7e539d042c644931a9ef2418f66d260a1c6892eb
|
[
"Apache-2.0"
] | null | null | null |
_/0349_10_Code/36.py
|
paullewallencom/javascript-978-1-8495-1034-9
|
7e539d042c644931a9ef2418f66d260a1c6892eb
|
[
"Apache-2.0"
] | null | null | null |
import django.contrib.auth.views
| 16.5
| 32
| 0.848485
| 5
| 33
| 5.6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.060606
| 33
| 1
| 33
| 33
| 0.903226
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 6
|
e6fbeb03b1eceb0210171bfd130d4870373da6b9
| 77
|
py
|
Python
|
cytofpy/model/post_proc/__init__.py
|
luiarthur/CytoPy
|
049360ec6ac9d8505d86498a67faddc866caebca
|
[
"MIT"
] | 1
|
2019-09-01T19:52:30.000Z
|
2019-09-01T19:52:30.000Z
|
cytofpy/model/post_proc/__init__.py
|
luiarthur/CytofPy
|
049360ec6ac9d8505d86498a67faddc866caebca
|
[
"MIT"
] | 8
|
2019-02-20T02:07:02.000Z
|
2019-09-25T23:09:38.000Z
|
cytofpy/model/post_proc/__init__.py
|
luiarthur/CytoPy
|
049360ec6ac9d8505d86498a67faddc866caebca
|
[
"MIT"
] | 1
|
2019-09-01T19:52:34.000Z
|
2019-09-01T19:52:34.000Z
|
from .sample_params import *
from .lam_post import *
from .gam_post import *
| 19.25
| 28
| 0.766234
| 12
| 77
| 4.666667
| 0.583333
| 0.357143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.155844
| 77
| 3
| 29
| 25.666667
| 0.861538
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 6
|
e6fd2d96a1c6236410d0fbb06538b3fdbb9ce35e
| 128
|
py
|
Python
|
BitTorrent-5.2.2/BTL/urlparse25.py
|
jpabb7/p2pScrapper
|
0fd57049606864223eb45f956a58adda1231af88
|
[
"MIT"
] | 4
|
2016-04-26T03:43:54.000Z
|
2016-11-17T08:09:04.000Z
|
BitTorrent-5.2.2/BTL/urlparse25.py
|
jpabb7/p2pScrapper
|
0fd57049606864223eb45f956a58adda1231af88
|
[
"MIT"
] | 17
|
2015-01-05T21:06:22.000Z
|
2015-12-07T20:45:44.000Z
|
BitTorrent-5.2.2/BTL/urlparse25.py
|
jpabb7/p2pScrapper
|
0fd57049606864223eb45f956a58adda1231af88
|
[
"MIT"
] | 7
|
2015-07-28T09:17:17.000Z
|
2021-11-07T02:29:41.000Z
|
try:
from urlparse import ParseResult
except ImportError, e:
from _urlparse25 import *
else:
from urlparse import *
| 18.285714
| 36
| 0.726563
| 15
| 128
| 6.133333
| 0.666667
| 0.26087
| 0.391304
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.020202
| 0.226563
| 128
| 6
| 37
| 21.333333
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.666667
| null | null | 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
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 6
|
fc1646961a45eaa5e0d48931f5085efb0aa3d0be
| 11,338
|
py
|
Python
|
tests/test_ec2/test_vpc_peering.py
|
jonnangle/moto-1
|
40b4e299abb732aad7f56cc0f680c0a272a46594
|
[
"Apache-2.0"
] | 1
|
2020-01-13T21:45:21.000Z
|
2020-01-13T21:45:21.000Z
|
tests/test_ec2/test_vpc_peering.py
|
jonnangle/moto-1
|
40b4e299abb732aad7f56cc0f680c0a272a46594
|
[
"Apache-2.0"
] | 17
|
2020-08-28T12:53:56.000Z
|
2020-11-10T01:04:46.000Z
|
tests/test_ec2/test_vpc_peering.py
|
jonnangle/moto-1
|
40b4e299abb732aad7f56cc0f680c0a272a46594
|
[
"Apache-2.0"
] | 2
|
2017-03-02T05:59:52.000Z
|
2020-09-03T13:25:44.000Z
|
from __future__ import unicode_literals
# Ensure 'assert_raises' context manager support for Python 2.6
import tests.backport_assert_raises
from nose.tools import assert_raises
from moto.ec2.exceptions import EC2ClientError
from botocore.exceptions import ClientError
import boto3
import boto
from boto.exception import EC2ResponseError
import sure # noqa
from moto import mock_ec2, mock_ec2_deprecated
from tests.helpers import requires_boto_gte
@requires_boto_gte("2.32.0")
@mock_ec2_deprecated
def test_vpc_peering_connections():
conn = boto.connect_vpc("the_key", "the_secret")
vpc = conn.create_vpc("10.0.0.0/16")
peer_vpc = conn.create_vpc("11.0.0.0/16")
vpc_pcx = conn.create_vpc_peering_connection(vpc.id, peer_vpc.id)
vpc_pcx._status.code.should.equal("initiating-request")
return vpc_pcx
@requires_boto_gte("2.32.0")
@mock_ec2_deprecated
def test_vpc_peering_connections_get_all():
conn = boto.connect_vpc("the_key", "the_secret")
vpc_pcx = test_vpc_peering_connections()
vpc_pcx._status.code.should.equal("initiating-request")
all_vpc_pcxs = conn.get_all_vpc_peering_connections()
all_vpc_pcxs.should.have.length_of(1)
all_vpc_pcxs[0]._status.code.should.equal("pending-acceptance")
@requires_boto_gte("2.32.0")
@mock_ec2_deprecated
def test_vpc_peering_connections_accept():
conn = boto.connect_vpc("the_key", "the_secret")
vpc_pcx = test_vpc_peering_connections()
vpc_pcx = conn.accept_vpc_peering_connection(vpc_pcx.id)
vpc_pcx._status.code.should.equal("active")
with assert_raises(EC2ResponseError) as cm:
conn.reject_vpc_peering_connection(vpc_pcx.id)
cm.exception.code.should.equal("InvalidStateTransition")
cm.exception.status.should.equal(400)
cm.exception.request_id.should_not.be.none
all_vpc_pcxs = conn.get_all_vpc_peering_connections()
all_vpc_pcxs.should.have.length_of(1)
all_vpc_pcxs[0]._status.code.should.equal("active")
@requires_boto_gte("2.32.0")
@mock_ec2_deprecated
def test_vpc_peering_connections_reject():
conn = boto.connect_vpc("the_key", "the_secret")
vpc_pcx = test_vpc_peering_connections()
verdict = conn.reject_vpc_peering_connection(vpc_pcx.id)
verdict.should.equal(True)
with assert_raises(EC2ResponseError) as cm:
conn.accept_vpc_peering_connection(vpc_pcx.id)
cm.exception.code.should.equal("InvalidStateTransition")
cm.exception.status.should.equal(400)
cm.exception.request_id.should_not.be.none
all_vpc_pcxs = conn.get_all_vpc_peering_connections()
all_vpc_pcxs.should.have.length_of(1)
all_vpc_pcxs[0]._status.code.should.equal("rejected")
@requires_boto_gte("2.32.1")
@mock_ec2_deprecated
def test_vpc_peering_connections_delete():
conn = boto.connect_vpc("the_key", "the_secret")
vpc_pcx = test_vpc_peering_connections()
verdict = vpc_pcx.delete()
verdict.should.equal(True)
all_vpc_pcxs = conn.get_all_vpc_peering_connections()
all_vpc_pcxs.should.have.length_of(1)
all_vpc_pcxs[0]._status.code.should.equal("deleted")
with assert_raises(EC2ResponseError) as cm:
conn.delete_vpc_peering_connection("pcx-1234abcd")
cm.exception.code.should.equal("InvalidVpcPeeringConnectionId.NotFound")
cm.exception.status.should.equal(400)
cm.exception.request_id.should_not.be.none
@mock_ec2
def test_vpc_peering_connections_cross_region():
# create vpc in us-west-1 and ap-northeast-1
ec2_usw1 = boto3.resource("ec2", region_name="us-west-1")
vpc_usw1 = ec2_usw1.create_vpc(CidrBlock="10.90.0.0/16")
ec2_apn1 = boto3.resource("ec2", region_name="ap-northeast-1")
vpc_apn1 = ec2_apn1.create_vpc(CidrBlock="10.20.0.0/16")
# create peering
vpc_pcx_usw1 = ec2_usw1.create_vpc_peering_connection(
VpcId=vpc_usw1.id, PeerVpcId=vpc_apn1.id, PeerRegion="ap-northeast-1"
)
vpc_pcx_usw1.status["Code"].should.equal("initiating-request")
vpc_pcx_usw1.requester_vpc.id.should.equal(vpc_usw1.id)
vpc_pcx_usw1.accepter_vpc.id.should.equal(vpc_apn1.id)
# test cross region vpc peering connection exist
vpc_pcx_apn1 = ec2_apn1.VpcPeeringConnection(vpc_pcx_usw1.id)
vpc_pcx_apn1.id.should.equal(vpc_pcx_usw1.id)
vpc_pcx_apn1.requester_vpc.id.should.equal(vpc_usw1.id)
vpc_pcx_apn1.accepter_vpc.id.should.equal(vpc_apn1.id)
@mock_ec2
def test_vpc_peering_connections_cross_region_fail():
# create vpc in us-west-1 and ap-northeast-1
ec2_usw1 = boto3.resource("ec2", region_name="us-west-1")
vpc_usw1 = ec2_usw1.create_vpc(CidrBlock="10.90.0.0/16")
ec2_apn1 = boto3.resource("ec2", region_name="ap-northeast-1")
vpc_apn1 = ec2_apn1.create_vpc(CidrBlock="10.20.0.0/16")
# create peering wrong region with no vpc
with assert_raises(ClientError) as cm:
ec2_usw1.create_vpc_peering_connection(
VpcId=vpc_usw1.id, PeerVpcId=vpc_apn1.id, PeerRegion="ap-northeast-2"
)
cm.exception.response["Error"]["Code"].should.equal("InvalidVpcID.NotFound")
@mock_ec2
def test_vpc_peering_connections_cross_region_accept():
# create vpc in us-west-1 and ap-northeast-1
ec2_usw1 = boto3.resource("ec2", region_name="us-west-1")
vpc_usw1 = ec2_usw1.create_vpc(CidrBlock="10.90.0.0/16")
ec2_apn1 = boto3.resource("ec2", region_name="ap-northeast-1")
vpc_apn1 = ec2_apn1.create_vpc(CidrBlock="10.20.0.0/16")
# create peering
vpc_pcx_usw1 = ec2_usw1.create_vpc_peering_connection(
VpcId=vpc_usw1.id, PeerVpcId=vpc_apn1.id, PeerRegion="ap-northeast-1"
)
# accept peering from ap-northeast-1
ec2_apn1 = boto3.client("ec2", region_name="ap-northeast-1")
ec2_usw1 = boto3.client("ec2", region_name="us-west-1")
acp_pcx_apn1 = ec2_apn1.accept_vpc_peering_connection(
VpcPeeringConnectionId=vpc_pcx_usw1.id
)
des_pcx_apn1 = ec2_usw1.describe_vpc_peering_connections(
VpcPeeringConnectionIds=[vpc_pcx_usw1.id]
)
des_pcx_usw1 = ec2_usw1.describe_vpc_peering_connections(
VpcPeeringConnectionIds=[vpc_pcx_usw1.id]
)
acp_pcx_apn1["VpcPeeringConnection"]["Status"]["Code"].should.equal("active")
des_pcx_apn1["VpcPeeringConnections"][0]["Status"]["Code"].should.equal("active")
des_pcx_usw1["VpcPeeringConnections"][0]["Status"]["Code"].should.equal("active")
@mock_ec2
def test_vpc_peering_connections_cross_region_reject():
# create vpc in us-west-1 and ap-northeast-1
ec2_usw1 = boto3.resource("ec2", region_name="us-west-1")
vpc_usw1 = ec2_usw1.create_vpc(CidrBlock="10.90.0.0/16")
ec2_apn1 = boto3.resource("ec2", region_name="ap-northeast-1")
vpc_apn1 = ec2_apn1.create_vpc(CidrBlock="10.20.0.0/16")
# create peering
vpc_pcx_usw1 = ec2_usw1.create_vpc_peering_connection(
VpcId=vpc_usw1.id, PeerVpcId=vpc_apn1.id, PeerRegion="ap-northeast-1"
)
# reject peering from ap-northeast-1
ec2_apn1 = boto3.client("ec2", region_name="ap-northeast-1")
ec2_usw1 = boto3.client("ec2", region_name="us-west-1")
rej_pcx_apn1 = ec2_apn1.reject_vpc_peering_connection(
VpcPeeringConnectionId=vpc_pcx_usw1.id
)
des_pcx_apn1 = ec2_usw1.describe_vpc_peering_connections(
VpcPeeringConnectionIds=[vpc_pcx_usw1.id]
)
des_pcx_usw1 = ec2_usw1.describe_vpc_peering_connections(
VpcPeeringConnectionIds=[vpc_pcx_usw1.id]
)
rej_pcx_apn1["Return"].should.equal(True)
des_pcx_apn1["VpcPeeringConnections"][0]["Status"]["Code"].should.equal("rejected")
des_pcx_usw1["VpcPeeringConnections"][0]["Status"]["Code"].should.equal("rejected")
@mock_ec2
def test_vpc_peering_connections_cross_region_delete():
# create vpc in us-west-1 and ap-northeast-1
ec2_usw1 = boto3.resource("ec2", region_name="us-west-1")
vpc_usw1 = ec2_usw1.create_vpc(CidrBlock="10.90.0.0/16")
ec2_apn1 = boto3.resource("ec2", region_name="ap-northeast-1")
vpc_apn1 = ec2_apn1.create_vpc(CidrBlock="10.20.0.0/16")
# create peering
vpc_pcx_usw1 = ec2_usw1.create_vpc_peering_connection(
VpcId=vpc_usw1.id, PeerVpcId=vpc_apn1.id, PeerRegion="ap-northeast-1"
)
# reject peering from ap-northeast-1
ec2_apn1 = boto3.client("ec2", region_name="ap-northeast-1")
ec2_usw1 = boto3.client("ec2", region_name="us-west-1")
del_pcx_apn1 = ec2_apn1.delete_vpc_peering_connection(
VpcPeeringConnectionId=vpc_pcx_usw1.id
)
des_pcx_apn1 = ec2_usw1.describe_vpc_peering_connections(
VpcPeeringConnectionIds=[vpc_pcx_usw1.id]
)
des_pcx_usw1 = ec2_usw1.describe_vpc_peering_connections(
VpcPeeringConnectionIds=[vpc_pcx_usw1.id]
)
del_pcx_apn1["Return"].should.equal(True)
des_pcx_apn1["VpcPeeringConnections"][0]["Status"]["Code"].should.equal("deleted")
des_pcx_usw1["VpcPeeringConnections"][0]["Status"]["Code"].should.equal("deleted")
@mock_ec2
def test_vpc_peering_connections_cross_region_accept_wrong_region():
# create vpc in us-west-1 and ap-northeast-1
ec2_usw1 = boto3.resource("ec2", region_name="us-west-1")
vpc_usw1 = ec2_usw1.create_vpc(CidrBlock="10.90.0.0/16")
ec2_apn1 = boto3.resource("ec2", region_name="ap-northeast-1")
vpc_apn1 = ec2_apn1.create_vpc(CidrBlock="10.20.0.0/16")
# create peering
vpc_pcx_usw1 = ec2_usw1.create_vpc_peering_connection(
VpcId=vpc_usw1.id, PeerVpcId=vpc_apn1.id, PeerRegion="ap-northeast-1"
)
# accept wrong peering from us-west-1 which will raise error
ec2_apn1 = boto3.client("ec2", region_name="ap-northeast-1")
ec2_usw1 = boto3.client("ec2", region_name="us-west-1")
with assert_raises(ClientError) as cm:
ec2_usw1.accept_vpc_peering_connection(VpcPeeringConnectionId=vpc_pcx_usw1.id)
cm.exception.response["Error"]["Code"].should.equal("OperationNotPermitted")
exp_msg = (
"Incorrect region ({0}) specified for this request.VPC "
"peering connection {1} must be "
"accepted in region {2}".format("us-west-1", vpc_pcx_usw1.id, "ap-northeast-1")
)
cm.exception.response["Error"]["Message"].should.equal(exp_msg)
@mock_ec2
def test_vpc_peering_connections_cross_region_reject_wrong_region():
# create vpc in us-west-1 and ap-northeast-1
ec2_usw1 = boto3.resource("ec2", region_name="us-west-1")
vpc_usw1 = ec2_usw1.create_vpc(CidrBlock="10.90.0.0/16")
ec2_apn1 = boto3.resource("ec2", region_name="ap-northeast-1")
vpc_apn1 = ec2_apn1.create_vpc(CidrBlock="10.20.0.0/16")
# create peering
vpc_pcx_usw1 = ec2_usw1.create_vpc_peering_connection(
VpcId=vpc_usw1.id, PeerVpcId=vpc_apn1.id, PeerRegion="ap-northeast-1"
)
# reject wrong peering from us-west-1 which will raise error
ec2_apn1 = boto3.client("ec2", region_name="ap-northeast-1")
ec2_usw1 = boto3.client("ec2", region_name="us-west-1")
with assert_raises(ClientError) as cm:
ec2_usw1.reject_vpc_peering_connection(VpcPeeringConnectionId=vpc_pcx_usw1.id)
cm.exception.response["Error"]["Code"].should.equal("OperationNotPermitted")
exp_msg = (
"Incorrect region ({0}) specified for this request.VPC "
"peering connection {1} must be accepted or "
"rejected in region {2}".format("us-west-1", vpc_pcx_usw1.id, "ap-northeast-1")
)
cm.exception.response["Error"]["Message"].should.equal(exp_msg)
| 41.683824
| 87
| 0.738225
| 1,686
| 11,338
| 4.659549
| 0.084223
| 0.059827
| 0.045825
| 0.050917
| 0.883019
| 0.876146
| 0.868635
| 0.831339
| 0.790606
| 0.73918
| 0
| 0.050659
| 0.136444
| 11,338
| 271
| 88
| 41.837638
| 0.751711
| 0.067649
| 0
| 0.590476
| 0
| 0
| 0.152636
| 0.025692
| 0
| 0
| 0
| 0
| 0.038095
| 1
| 0.057143
| false
| 0
| 0.052381
| 0
| 0.114286
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
fc336df80a0d3db3a172e923fa3a858badc29d61
| 124
|
py
|
Python
|
backend/dakje/users/models.py
|
Anan1218/tibetan-spellchecker
|
fc45de55631ecf52a35cf4be5912c864e6f28b82
|
[
"MIT"
] | null | null | null |
backend/dakje/users/models.py
|
Anan1218/tibetan-spellchecker
|
fc45de55631ecf52a35cf4be5912c864e6f28b82
|
[
"MIT"
] | null | null | null |
backend/dakje/users/models.py
|
Anan1218/tibetan-spellchecker
|
fc45de55631ecf52a35cf4be5912c864e6f28b82
|
[
"MIT"
] | null | null | null |
from django.contrib.auth.models import AbstractUser
class User(AbstractUser):
"""Default user for dakje."""
pass
| 15.5
| 51
| 0.717742
| 15
| 124
| 5.933333
| 0.866667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.177419
| 124
| 7
| 52
| 17.714286
| 0.872549
| 0.185484
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.333333
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 6
|
fc85f0fa70dcbe6f33a06fe0e46a055598c48f33
| 11,341
|
py
|
Python
|
tests/test_add_customer_to_registry.py
|
GermainPereira/YourAppointment
|
09c212442be7719dac15184a7460c52cea2f6bce
|
[
"MIT"
] | 1
|
2020-04-06T02:32:31.000Z
|
2020-04-06T02:32:31.000Z
|
tests/test_add_customer_to_registry.py
|
GermainPereira/ClassesManager
|
09c212442be7719dac15184a7460c52cea2f6bce
|
[
"MIT"
] | 4
|
2020-04-22T14:47:32.000Z
|
2020-04-24T18:30:21.000Z
|
tests/test_add_customer_to_registry.py
|
GermainPereira/YourAppointment
|
09c212442be7719dac15184a7460c52cea2f6bce
|
[
"MIT"
] | null | null | null |
import set_test_path
import unittest
from unittest import mock
from io import StringIO
from datetime import datetime
from data_manager import DataManager as Dm
from testing_resources import TestingShortcuts
class TestAddCustomerToRegistry(TestingShortcuts, unittest.TestCase):
def setUp(self):
self.dm_instance = Dm()
self.shortcut_test_if_num_of_customers_in_registry_equals(0)
def test_add_custumer_id_1_to_registry_passes(self):
self.shortcut_test_add_customer_to_registry(
inputs=self.RIGHT_INPUTS_CUSTOMER_ID_1,
expected_return=self.RIGHT_RETURN_CUSTOMER_ID_1
)
def test_add_custumer_id_2_to_registry_passes(self):
self.shortcut_test_add_customer_to_registry(
inputs=self.RIGHT_INPUTS_CUSTOMER_ID_2,
expected_return=self.RIGHT_RETURN_CUSTOMER_ID_2
)
def test_add_2_customers_registry_passes(self):
self.test_add_custumer_id_1_to_registry_passes()
self.test_add_custumer_id_2_to_registry_passes()
self.shortcut_test_if_registry_contain_customers_list(
list_with_expected_customers=
[self.RIGHT_RETURN_CUSTOMER_ID_1, self.RIGHT_RETURN_CUSTOMER_ID_2]
)
def test_add_1_customer_fails_forename_value_error(self):
wrong_forename_input = "João2"
expected_exception = "Invalid input. " \
"The customer's forename may only contain letter or spaces.\n"
self.shortcut_test_add_customer_handles_value_error(
right_inputs=self.RIGHT_INPUTS_CUSTOMER_ID_1,
expected_return=self.RIGHT_RETURN_CUSTOMER_ID_1,
index_to_insert_the_wrong_input=self.INDEX_OF_FORENAME,
wrong_input=wrong_forename_input,
expected_exception=expected_exception
)
def test_add_1_customer_fails_surname_value_error(self):
wrong_surname_input = "da Silva2"
expected_exception = "Invalid input. " \
"The customer's surname may only contain letter or spaces.\n"
self.shortcut_test_add_customer_handles_value_error(
right_inputs=self.RIGHT_INPUTS_CUSTOMER_ID_1,
expected_return=self.RIGHT_RETURN_CUSTOMER_ID_1,
index_to_insert_the_wrong_input=self.INDEX_OF_SURNAME,
wrong_input=wrong_surname_input,
expected_exception=expected_exception
)
def test_add_1_customer_fails_birthdate(self):
wrong_birthdate_input = "24011978"
expected_exception = "Invalid input. " \
"The customer's birthdate muss comply to the required format\n"
self.shortcut_test_add_customer_handles_value_error(
right_inputs=self.RIGHT_INPUTS_CUSTOMER_ID_1,
expected_return=self.RIGHT_RETURN_CUSTOMER_ID_1,
index_to_insert_the_wrong_input=self.INDEX_OF_BIRTHDATE,
wrong_input=wrong_birthdate_input,
expected_exception=expected_exception
)
def test_add_1_customer_fails_customer_id(self):
wrong_personal_id_input = "24011978"
expected_exception = "Invalid input. " \
"The customer's personal id muss have 11 digits and " \
"comply to the required format\n"
self.shortcut_test_add_customer_handles_value_error(
right_inputs=self.RIGHT_INPUTS_CUSTOMER_ID_1,
expected_return=self.RIGHT_RETURN_CUSTOMER_ID_1,
index_to_insert_the_wrong_input=self.INDEX_OF_PERSONAL_ID,
wrong_input=wrong_personal_id_input,
expected_exception=expected_exception
)
def test_add_1_customer_fails_customer_id2(self):
wrong_personal_id_input = "1234567891!"
expected_exception = "Invalid input. " \
"The customer's personal id may only have numbers, points and dashes\n"
self.shortcut_test_add_customer_handles_value_error(
right_inputs=self.RIGHT_INPUTS_CUSTOMER_ID_1,
expected_return=self.RIGHT_RETURN_CUSTOMER_ID_1,
index_to_insert_the_wrong_input=self.INDEX_OF_PERSONAL_ID,
wrong_input=wrong_personal_id_input,
expected_exception=expected_exception
)
def test_add_1_customer_fails_address_street_and_number(self):
wrong_address_street_and_number_input = "XX Street !"
expected_exception = "Invalid input. " \
"The customer's street and number may not contain special caracters.\n"
self.shortcut_test_add_customer_handles_value_error(
right_inputs=self.RIGHT_INPUTS_CUSTOMER_ID_1,
expected_return=self.RIGHT_RETURN_CUSTOMER_ID_1,
index_to_insert_the_wrong_input=self.INDEX_OF_ADDRESS_STREET_AND_NUMBER,
wrong_input=wrong_address_street_and_number_input,
expected_exception=expected_exception
)
def test_add_1_customer_fails_address_street_and_number2(self):
wrong_address_street_and_number_input = "testing too long adress lalalalala"
expected_exception = "Invalid input. " \
"The customer's street and number may not be longer than 30 characters.\n"
self.shortcut_test_add_customer_handles_value_error(
right_inputs=self.RIGHT_INPUTS_CUSTOMER_ID_1,
expected_return=self.RIGHT_RETURN_CUSTOMER_ID_1,
index_to_insert_the_wrong_input=self.INDEX_OF_ADDRESS_STREET_AND_NUMBER,
wrong_input=wrong_address_street_and_number_input,
expected_exception=expected_exception
)
def test_add_1_customer_fails_address_other(self):
wrong_address_others_input = "Apartment 101!"
expected_exception = "Invalid input. " \
"The customer's address (other) may not contain special caracters.\n"
self.shortcut_test_add_customer_handles_value_error(
right_inputs=self.RIGHT_INPUTS_CUSTOMER_ID_1,
expected_return=self.RIGHT_RETURN_CUSTOMER_ID_1,
index_to_insert_the_wrong_input=self.INDEX_OF_ADDRESS_OTHER,
wrong_input=wrong_address_others_input,
expected_exception=expected_exception
)
def test_add_1_customer_fails_address_other2(self):
wrong_address_others_input = "testing too long adress lalalalala"
expected_exception = "Invalid input. " \
"The customer's address (other) may not be longer than 25 characters.\n"
self.shortcut_test_add_customer_handles_value_error(
right_inputs=self.RIGHT_INPUTS_CUSTOMER_ID_1,
expected_return=self.RIGHT_RETURN_CUSTOMER_ID_1,
index_to_insert_the_wrong_input=self.INDEX_OF_ADDRESS_OTHER,
wrong_input=wrong_address_others_input,
expected_exception=expected_exception
)
def test_add_1_customer_fails_address_city(self):
wrong_address_city_input = "New York 101"
expected_exception = "Invalid input. " \
"The customer's city name may only contain letter or spaces.\n"
self.shortcut_test_add_customer_handles_value_error(
right_inputs=self.RIGHT_INPUTS_CUSTOMER_ID_1,
expected_return=self.RIGHT_RETURN_CUSTOMER_ID_1,
index_to_insert_the_wrong_input=self.INDEX_OF_ADDRESS_CITY,
wrong_input=wrong_address_city_input,
expected_exception=expected_exception
)
def test_add_1_customer_fails_address_city2(self):
wrong_address_city_input = "testing too long city lalalalalalala"
expected_exception = "Invalid input. " \
"The customer's city name may not be longer than 25 characters.\n"
self.shortcut_test_add_customer_handles_value_error(
right_inputs=self.RIGHT_INPUTS_CUSTOMER_ID_1,
expected_return=self.RIGHT_RETURN_CUSTOMER_ID_1,
index_to_insert_the_wrong_input=self.INDEX_OF_ADDRESS_CITY,
wrong_input=wrong_address_city_input,
expected_exception=expected_exception
)
def test_add_1_customer_fails_address_state(self):
wrong_address_state_input = "Florida 101"
expected_exception = "Invalid input. " \
"The customer's state name may only contain letter or spaces.\n"
self.shortcut_test_add_customer_handles_value_error(
right_inputs=self.RIGHT_INPUTS_CUSTOMER_ID_1,
expected_return=self.RIGHT_RETURN_CUSTOMER_ID_1,
index_to_insert_the_wrong_input=self.INDEX_OF_ADDRESS_STATE,
wrong_input=wrong_address_state_input,
expected_exception=expected_exception
)
def test_add_1_customer_fails_address_state2(self):
wrong_address_state_input = "testing too long state lalalalalalala"
expected_exception = "Invalid input. " \
"The customer's state name may not be longer than 25 characters.\n"
self.shortcut_test_add_customer_handles_value_error(
right_inputs=self.RIGHT_INPUTS_CUSTOMER_ID_1,
expected_return=self.RIGHT_RETURN_CUSTOMER_ID_1,
index_to_insert_the_wrong_input=self.INDEX_OF_ADDRESS_STATE,
wrong_input=wrong_address_state_input,
expected_exception=expected_exception
)
def test_add_1_customer_fails_type_error(self):
wrong_customer_name_input = 2
self.shortcut_test_add_customer_raises_type_error(
right_inputs=self.RIGHT_INPUTS_CUSTOMER_ID_1,
index_to_insert_the_wrong_input=self.INDEX_OF_FORENAME,
wrong_input=wrong_customer_name_input
)
def test_add_1_customer_fails_type_error2(self):
wrong_personal_id_input = 2
self.shortcut_test_add_customer_raises_type_error(
right_inputs=self.RIGHT_INPUTS_CUSTOMER_ID_1,
index_to_insert_the_wrong_input=self.INDEX_OF_PERSONAL_ID,
wrong_input=wrong_personal_id_input
)
def test_add_1_customer_fails_type_error3(self):
wrong_address_other_input = True
self.shortcut_test_add_customer_raises_type_error(
right_inputs=self.RIGHT_INPUTS_CUSTOMER_ID_1,
index_to_insert_the_wrong_input=self.INDEX_OF_ADDRESS_OTHER,
wrong_input=wrong_address_other_input
)
def test_add_1_customer_fails_type_error4(self):
wrong_address_street_and_number_input = 3
self.shortcut_test_add_customer_raises_type_error(
right_inputs=self.RIGHT_INPUTS_CUSTOMER_ID_1,
index_to_insert_the_wrong_input=self.INDEX_OF_ADDRESS_STREET_AND_NUMBER,
wrong_input=wrong_address_street_and_number_input
)
def test_add_1_customer_fails_type_error5(self):
wrong_address_state_input = 3
self.shortcut_test_add_customer_raises_type_error(
right_inputs=self.RIGHT_INPUTS_CUSTOMER_ID_1,
index_to_insert_the_wrong_input=self.INDEX_OF_ADDRESS_STREET_AND_NUMBER,
wrong_input=wrong_address_state_input
)
def tearDown(self):
self.dm_instance = None
if __name__ == "__main__":
unittest.main()
| 46.101626
| 103
| 0.707962
| 1,432
| 11,341
| 5.051676
| 0.09148
| 0.041609
| 0.0517
| 0.05253
| 0.867155
| 0.831767
| 0.824855
| 0.797484
| 0.775505
| 0.726707
| 0
| 0.014106
| 0.243629
| 11,341
| 246
| 104
| 46.101626
| 0.829214
| 0
| 0
| 0.488152
| 0
| 0
| 0.114089
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.109005
| false
| 0.023697
| 0.033175
| 0
| 0.146919
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
5d9cc1946478d5b804f964937a41a173267302a7
| 13,779
|
py
|
Python
|
apps/plea/tests/test_income.py
|
uk-gov-mirror/ministryofjustice.manchester_traffic_offences_pleas
|
4c625b13fa2826bdde083a0270dcea1791f6dc18
|
[
"MIT"
] | 3
|
2015-12-22T16:37:14.000Z
|
2018-01-22T18:44:38.000Z
|
apps/plea/tests/test_income.py
|
uk-gov-mirror/ministryofjustice.manchester_traffic_offences_pleas
|
4c625b13fa2826bdde083a0270dcea1791f6dc18
|
[
"MIT"
] | 145
|
2015-03-04T11:17:50.000Z
|
2022-03-21T12:10:13.000Z
|
apps/plea/tests/test_income.py
|
uk-gov-mirror/ministryofjustice.manchester_traffic_offences_pleas
|
4c625b13fa2826bdde083a0270dcea1791f6dc18
|
[
"MIT"
] | 3
|
2015-12-29T14:59:12.000Z
|
2021-04-11T06:24:11.000Z
|
from collections import OrderedDict
from django.test import TestCase
from mock import Mock
from django.test.client import RequestFactory
from django.template.context import RequestContext
from ..views import PleaOnlineForms
from ..stages import calculate_weekly_amount, YourBenefitsStage
class TestCalculations(TestCase):
def test_calculate_weekly_amount(self):
amount = calculate_weekly_amount(130, "Weekly")
self.assertEqual(amount, 130)
def test_calculate_fortnightly_amount(self):
amount = calculate_weekly_amount(130, "Fortnightly")
self.assertEqual(amount, 65)
def test_calculate_monthly_amount(self):
amount = calculate_weekly_amount(130, "Monthly")
self.assertEqual(amount, 30)
class TestIncomeBaseStage(TestCase):
def setUp(self):
self.urls = OrderedDict((("your_benefits", "your_benefits"),))
def test_add_income_source(self):
test_stage = YourBenefitsStage(self.urls, {"your_income": {}})
test_stage.add_income_source("Label", "Weekly", 130)
self.assertEqual(len(test_stage.all_data["your_income"]["sources"]), 1)
self.assertEqual(test_stage.all_data["your_income"]["sources"]["your_benefits"]["label"], "Label")
self.assertEqual(test_stage.all_data["your_income"]["sources"]["your_benefits"]["pay_period"], "Weekly")
self.assertEqual(test_stage.all_data["your_income"]["sources"]["your_benefits"]["pay_amount"], 130)
self.assertEqual(test_stage.all_data["your_income"]["weekly_total"], 130)
def test_remove_income_source(self):
test_stage = YourBenefitsStage(self.urls, {"your_income": {"sources": {"your_employment": {}}}})
test_stage.remove_income_sources(["your_employment"])
self.assertEqual(len(test_stage.all_data["your_income"]["sources"]), 0)
class TestYourIncomeStages(TestCase):
def get_request_mock(self, url="/", url_name="", url_kwargs=None):
request_factory = RequestFactory()
if not url_kwargs:
url_kwargs = {}
request = request_factory.get(url)
request.resolver_match = Mock()
request.resolver_match.url_name = url_name
request.resolver_match.kwargs = url_kwargs
return request
def setUp(self):
self.fake_session = {"notice_type": {"complete": True},
"case": {"complete": True},
"your_details": {"complete": True},
"plea": {"complete": True}}
self.fake_request = self.get_request_mock("/plea/your_status/")
self.request_context = RequestContext(self.fake_request)
def test_your_income_employed_weekly(self):
self.fake_session.update({"your_status": {"you_are": "Employed",
"complete": True}})
form = PleaOnlineForms(self.fake_session, "your_employment")
form.load(self.request_context)
form.save({"pay_period": "Weekly",
"pay_amount": 130},
self.request_context)
self.assertEqual(len(self.fake_session["your_income"]["sources"]), 1)
self.assertEqual(self.fake_session["your_income"]["sources"]["your_employment"]["label"], "Employment")
self.assertEqual(self.fake_session["your_income"]["sources"]["your_employment"]["pay_period"], "Weekly")
self.assertEqual(self.fake_session["your_income"]["sources"]["your_employment"]["pay_amount"], 130)
self.assertEqual(self.fake_session["your_income"]["weekly_total"], 130)
def test_your_income_employed_fortnightly(self):
self.fake_session.update({"your_status": {"you_are": "Employed",
"complete": True}})
form = PleaOnlineForms(self.fake_session, "your_employment")
form.load(self.request_context)
form.save({"pay_period": "Fortnightly",
"pay_amount": 130},
self.request_context)
self.assertEqual(len(self.fake_session["your_income"]["sources"]), 1)
self.assertEqual(self.fake_session["your_income"]["sources"]["your_employment"]["label"], "Employment")
self.assertEqual(self.fake_session["your_income"]["sources"]["your_employment"]["pay_period"], "Fortnightly")
self.assertEqual(self.fake_session["your_income"]["sources"]["your_employment"]["pay_amount"], 130)
self.assertEqual(self.fake_session["your_income"]["weekly_total"], 65)
def test_your_income_employed_monthly(self):
self.fake_session.update({"your_status": {"you_are": "Employed",
"complete": True}})
form = PleaOnlineForms(self.fake_session, "your_employment")
form.load(self.request_context)
form.save({"pay_period": "Monthly",
"pay_amount": 130},
self.request_context)
self.assertEqual(len(self.fake_session["your_income"]["sources"]), 1)
self.assertEqual(self.fake_session["your_income"]["sources"]["your_employment"]["label"], "Employment")
self.assertEqual(self.fake_session["your_income"]["sources"]["your_employment"]["pay_period"], "Monthly")
self.assertEqual(self.fake_session["your_income"]["sources"]["your_employment"]["pay_amount"], 130)
self.assertEqual(self.fake_session["your_income"]["weekly_total"], 30)
def test_your_income_self_employed_other(self):
self.fake_session.update({"your_status": {"you_are": "Self-employed",
"complete": True}})
form = PleaOnlineForms(self.fake_session, "your_self_employment")
form.load(self.request_context)
form.save({"pay_period": "Other",
"pay_amount": 130},
self.request_context)
self.assertEqual(len(self.fake_session["your_income"]["sources"]), 1)
self.assertEqual(self.fake_session["your_income"]["sources"]["your_self_employment"]["label"], "Self-employment")
self.assertEqual(self.fake_session["your_income"]["sources"]["your_self_employment"]["pay_period"], "Weekly")
self.assertEqual(self.fake_session["your_income"]["sources"]["your_self_employment"]["pay_amount"], 130)
self.assertEqual(self.fake_session["your_income"]["weekly_total"], 130)
def test_your_income_employed_with_benefits_weekly(self):
self.fake_session.update({"your_status": {"you_are": "Employed and also receiving benefits",
"complete": True},
"your_income": {"sources": {"your_employment": {"pay_period": "Weekly",
"pay_amount": 130}}}})
form = PleaOnlineForms(self.fake_session, "your_benefits")
form.load(self.request_context)
form.save({"benefit_type": "Income Support",
"pay_period": "Weekly",
"pay_amount": 130},
self.request_context)
self.assertEqual(len(self.fake_session["your_income"]["sources"]), 2)
self.assertEqual(self.fake_session["your_income"]["sources"]["your_benefits"]["label"], "Benefits")
self.assertEqual(self.fake_session["your_income"]["sources"]["your_benefits"]["benefit_type"], "Income Support")
self.assertEqual(self.fake_session["your_income"]["sources"]["your_benefits"]["pay_period"], "Weekly")
self.assertEqual(self.fake_session["your_income"]["sources"]["your_benefits"]["pay_amount"], 130)
self.assertEqual(self.fake_session["your_income"]["weekly_total"], 260)
def test_your_income_employed_with_benefits_fortnightly(self):
self.fake_session.update({"your_status": {"you_are": "Employed and also receiving benefits",
"complete": True},
"your_income": {"sources": {"your_employment": {"pay_period": "Weekly",
"pay_amount": 130}}}})
form = PleaOnlineForms(self.fake_session, "your_benefits")
form.load(self.request_context)
form.save({"benefit_type": "Income Support",
"pay_period": "Fortnightly",
"pay_amount": 130},
self.request_context)
self.assertEqual(len(self.fake_session["your_income"]["sources"]), 2)
self.assertEqual(self.fake_session["your_income"]["sources"]["your_benefits"]["label"], "Benefits")
self.assertEqual(self.fake_session["your_income"]["sources"]["your_benefits"]["benefit_type"], "Income Support")
self.assertEqual(self.fake_session["your_income"]["sources"]["your_benefits"]["pay_period"], "Fortnightly")
self.assertEqual(self.fake_session["your_income"]["sources"]["your_benefits"]["pay_amount"], 130)
self.assertEqual(self.fake_session["your_income"]["weekly_total"], 195)
def test_your_income_employed_with_benefits_monthly(self):
self.fake_session.update({"your_status": {"you_are": "Employed and also receiving benefits",
"complete": True},
"your_income": {"sources": {"your_employment": {"pay_period": "Weekly",
"pay_amount": 130}}}})
form = PleaOnlineForms(self.fake_session, "your_benefits")
form.load(self.request_context)
form.save({"benefit_type": "Income Support",
"pay_period": "Monthly",
"pay_amount": 130},
self.request_context)
self.assertEqual(len(self.fake_session["your_income"]["sources"]), 2)
self.assertEqual(self.fake_session["your_income"]["sources"]["your_benefits"]["label"], "Benefits")
self.assertEqual(self.fake_session["your_income"]["sources"]["your_benefits"]["benefit_type"], "Income Support")
self.assertEqual(self.fake_session["your_income"]["sources"]["your_benefits"]["pay_period"], "Monthly")
self.assertEqual(self.fake_session["your_income"]["sources"]["your_benefits"]["pay_amount"], 130)
self.assertEqual(self.fake_session["your_income"]["weekly_total"], 160)
def test_your_income_benefits_weekly(self):
self.fake_session.update({"your_status": {"you_are": "Receiving out of work benefits",
"complete": True}})
form = PleaOnlineForms(self.fake_session, "your_out_of_work_benefits")
form.load(self.request_context)
form.save({"benefit_type": "Contributory Jobseeker's Allowance",
"pay_period": "Weekly",
"pay_amount": 130},
self.request_context)
self.assertEqual(len(self.fake_session["your_income"]["sources"]), 1)
self.assertEqual(self.fake_session["your_income"]["sources"]["your_out_of_work_benefits"]["label"], "Benefits")
self.assertEqual(self.fake_session["your_income"]["sources"]["your_out_of_work_benefits"]["benefit_type"], "Contributory Jobseeker's Allowance")
self.assertEqual(self.fake_session["your_income"]["sources"]["your_out_of_work_benefits"]["pay_period"], "Weekly")
self.assertEqual(self.fake_session["your_income"]["sources"]["your_out_of_work_benefits"]["pay_amount"], 130)
self.assertEqual(self.fake_session["your_income"]["weekly_total"], 130)
def test_your_income_other_weekly(self):
self.fake_session.update({"your_status": {"you_are": "Other",
"complete": True}})
form = PleaOnlineForms(self.fake_session, "about_your_income")
form.load(self.request_context)
form.save({"income_source": "Student loan",
"pay_period": "Weekly",
"pay_amount": 130,
"pension_credit": False},
self.request_context)
self.assertEqual(len(self.fake_session["your_income"]["sources"]), 1)
self.assertEqual(self.fake_session["your_income"]["sources"]["about_your_income"]["label"], "Student loan")
self.assertEqual(self.fake_session["your_income"]["sources"]["about_your_income"]["pay_period"], "Weekly")
self.assertEqual(self.fake_session["your_income"]["sources"]["about_your_income"]["pay_amount"], 130)
self.assertEqual(self.fake_session["your_income"]["weekly_total"], 130)
def test_your_income_other_with_pension_credit_weekly(self):
self.fake_session.update({"your_status": {"you_are": "Other",
"complete": True,
"your_income": {"sources": {"about_your_income": {"pay_period": "Weekly",
"pay_amount": 130}}}}})
form = PleaOnlineForms(self.fake_session, "your_pension_credit")
form.load(self.request_context)
form.save({"pay_period": "Weekly",
"pay_amount": 130},
self.request_context)
self.assertEqual(len(self.fake_session["your_income"]["sources"]), 1)
self.assertEqual(self.fake_session["your_income"]["sources"]["your_pension_credit"]["label"], "Pension Credit")
self.assertEqual(self.fake_session["your_income"]["sources"]["your_pension_credit"]["pay_period"], "Weekly")
self.assertEqual(self.fake_session["your_income"]["sources"]["your_pension_credit"]["pay_amount"], 130)
self.assertEqual(self.fake_session["your_income"]["weekly_total"], 130)
| 53.200772
| 152
| 0.625735
| 1,477
| 13,779
| 5.532837
| 0.07109
| 0.099119
| 0.137665
| 0.146476
| 0.838228
| 0.828439
| 0.815467
| 0.780348
| 0.771047
| 0.755017
| 0
| 0.012882
| 0.228173
| 13,779
| 258
| 153
| 53.406977
| 0.755524
| 0
| 0
| 0.497462
| 0
| 0
| 0.275927
| 0.009072
| 0
| 0
| 0
| 0
| 0.319797
| 1
| 0.091371
| false
| 0
| 0.035533
| 0
| 0.147208
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
5dade73dd4d13fe9de28e4bf2be55fdb9764fa65
| 21,919
|
py
|
Python
|
dlcv/object_detection/tensorflow_detect/builders/box_predictor_builder_test.py
|
Loonride/deeplens-cv
|
9e5b31c1a269d364e4912ba8266415fa04277e11
|
[
"MIT"
] | 11
|
2019-10-07T22:06:30.000Z
|
2020-08-26T22:10:53.000Z
|
dlcv/object_detection/tensorflow_detect/builders/box_predictor_builder_test.py
|
Loonride/deeplens-cv
|
9e5b31c1a269d364e4912ba8266415fa04277e11
|
[
"MIT"
] | 16
|
2019-11-02T00:32:00.000Z
|
2022-02-10T00:23:32.000Z
|
dlcv/object_detection/tensorflow_detect/builders/box_predictor_builder_test.py
|
Loonride/deeplens-cv
|
9e5b31c1a269d364e4912ba8266415fa04277e11
|
[
"MIT"
] | 9
|
2019-10-07T13:33:13.000Z
|
2020-09-27T09:50:58.000Z
|
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Tests for box_predictor_builder."""
import mock
import tensorflow as tf
from google.protobuf import text_format
from object_detection.tensorflow_detect.builders import hyperparams_builder, \
box_predictor_builder
from object_detection.tensorflow_detect.predictors import \
mask_rcnn_box_predictor
from object_detection.tensorflow_detect.protos import box_predictor_pb2
from object_detection.tensorflow_detect.protos import hyperparams_pb2
class ConvolutionalBoxPredictorBuilderTest(tf.test.TestCase):
def test_box_predictor_calls_conv_argscope_fn(self):
conv_hyperparams_text_proto = """
regularizer {
l1_regularizer {
weight: 0.0003
}
}
initializer {
truncated_normal_initializer {
mean: 0.0
stddev: 0.3
}
}
activation: RELU_6
"""
hyperparams_proto = hyperparams_pb2.Hyperparams()
text_format.Merge(conv_hyperparams_text_proto, hyperparams_proto)
def mock_conv_argscope_builder(conv_hyperparams_arg, is_training):
return (conv_hyperparams_arg, is_training)
box_predictor_proto = box_predictor_pb2.BoxPredictor()
box_predictor_proto.convolutional_box_predictor.conv_hyperparams.CopyFrom(
hyperparams_proto)
box_predictor = box_predictor_builder.build(
argscope_fn=mock_conv_argscope_builder,
box_predictor_config=box_predictor_proto,
is_training=False,
num_classes=10)
(conv_hyperparams_actual, is_training) = box_predictor._conv_hyperparams_fn
self.assertAlmostEqual((hyperparams_proto.regularizer.
l1_regularizer.weight),
(conv_hyperparams_actual.regularizer.l1_regularizer.
weight))
self.assertAlmostEqual((hyperparams_proto.initializer.
truncated_normal_initializer.stddev),
(conv_hyperparams_actual.initializer.
truncated_normal_initializer.stddev))
self.assertAlmostEqual((hyperparams_proto.initializer.
truncated_normal_initializer.mean),
(conv_hyperparams_actual.initializer.
truncated_normal_initializer.mean))
self.assertEqual(hyperparams_proto.activation,
conv_hyperparams_actual.activation)
self.assertFalse(is_training)
def test_construct_non_default_conv_box_predictor(self):
box_predictor_text_proto = """
convolutional_box_predictor {
min_depth: 2
max_depth: 16
num_layers_before_predictor: 2
use_dropout: false
dropout_keep_probability: 0.4
kernel_size: 3
box_code_size: 3
apply_sigmoid_to_scores: true
class_prediction_bias_init: 4.0
use_depthwise: true
}
"""
conv_hyperparams_text_proto = """
regularizer {
l1_regularizer {
}
}
initializer {
truncated_normal_initializer {
}
}
"""
hyperparams_proto = hyperparams_pb2.Hyperparams()
text_format.Merge(conv_hyperparams_text_proto, hyperparams_proto)
def mock_conv_argscope_builder(conv_hyperparams_arg, is_training):
return (conv_hyperparams_arg, is_training)
box_predictor_proto = box_predictor_pb2.BoxPredictor()
text_format.Merge(box_predictor_text_proto, box_predictor_proto)
box_predictor_proto.convolutional_box_predictor.conv_hyperparams.CopyFrom(
hyperparams_proto)
box_predictor = box_predictor_builder.build(
argscope_fn=mock_conv_argscope_builder,
box_predictor_config=box_predictor_proto,
is_training=False,
num_classes=10)
self.assertEqual(box_predictor._min_depth, 2)
self.assertEqual(box_predictor._max_depth, 16)
self.assertEqual(box_predictor._num_layers_before_predictor, 2)
self.assertFalse(box_predictor._use_dropout)
self.assertAlmostEqual(box_predictor._dropout_keep_prob, 0.4)
self.assertTrue(box_predictor._apply_sigmoid_to_scores)
self.assertAlmostEqual(box_predictor._class_prediction_bias_init, 4.0)
self.assertEqual(box_predictor.num_classes, 10)
self.assertFalse(box_predictor._is_training)
self.assertTrue(box_predictor._use_depthwise)
def test_construct_default_conv_box_predictor(self):
box_predictor_text_proto = """
convolutional_box_predictor {
conv_hyperparams {
regularizer {
l1_regularizer {
}
}
initializer {
truncated_normal_initializer {
}
}
}
}"""
box_predictor_proto = box_predictor_pb2.BoxPredictor()
text_format.Merge(box_predictor_text_proto, box_predictor_proto)
box_predictor = box_predictor_builder.build(
argscope_fn=hyperparams_builder.build,
box_predictor_config=box_predictor_proto,
is_training=True,
num_classes=90)
self.assertEqual(box_predictor._min_depth, 0)
self.assertEqual(box_predictor._max_depth, 0)
self.assertEqual(box_predictor._num_layers_before_predictor, 0)
self.assertTrue(box_predictor._use_dropout)
self.assertAlmostEqual(box_predictor._dropout_keep_prob, 0.8)
self.assertFalse(box_predictor._apply_sigmoid_to_scores)
self.assertEqual(box_predictor.num_classes, 90)
self.assertTrue(box_predictor._is_training)
self.assertFalse(box_predictor._use_depthwise)
class WeightSharedConvolutionalBoxPredictorBuilderTest(tf.test.TestCase):
def test_box_predictor_calls_conv_argscope_fn(self):
conv_hyperparams_text_proto = """
regularizer {
l1_regularizer {
weight: 0.0003
}
}
initializer {
truncated_normal_initializer {
mean: 0.0
stddev: 0.3
}
}
activation: RELU_6
"""
hyperparams_proto = hyperparams_pb2.Hyperparams()
text_format.Merge(conv_hyperparams_text_proto, hyperparams_proto)
def mock_conv_argscope_builder(conv_hyperparams_arg, is_training):
return (conv_hyperparams_arg, is_training)
box_predictor_proto = box_predictor_pb2.BoxPredictor()
(box_predictor_proto.weight_shared_convolutional_box_predictor
.conv_hyperparams.CopyFrom(hyperparams_proto))
box_predictor = box_predictor_builder.build(
argscope_fn=mock_conv_argscope_builder,
box_predictor_config=box_predictor_proto,
is_training=False,
num_classes=10)
(conv_hyperparams_actual, is_training) = box_predictor._conv_hyperparams_fn
self.assertAlmostEqual((hyperparams_proto.regularizer.
l1_regularizer.weight),
(conv_hyperparams_actual.regularizer.l1_regularizer.
weight))
self.assertAlmostEqual((hyperparams_proto.initializer.
truncated_normal_initializer.stddev),
(conv_hyperparams_actual.initializer.
truncated_normal_initializer.stddev))
self.assertAlmostEqual((hyperparams_proto.initializer.
truncated_normal_initializer.mean),
(conv_hyperparams_actual.initializer.
truncated_normal_initializer.mean))
self.assertEqual(hyperparams_proto.activation,
conv_hyperparams_actual.activation)
self.assertFalse(is_training)
def test_construct_non_default_conv_box_predictor(self):
box_predictor_text_proto = """
weight_shared_convolutional_box_predictor {
depth: 2
num_layers_before_predictor: 2
kernel_size: 7
box_code_size: 3
class_prediction_bias_init: 4.0
}
"""
conv_hyperparams_text_proto = """
regularizer {
l1_regularizer {
}
}
initializer {
truncated_normal_initializer {
}
}
"""
hyperparams_proto = hyperparams_pb2.Hyperparams()
text_format.Merge(conv_hyperparams_text_proto, hyperparams_proto)
def mock_conv_argscope_builder(conv_hyperparams_arg, is_training):
return (conv_hyperparams_arg, is_training)
box_predictor_proto = box_predictor_pb2.BoxPredictor()
text_format.Merge(box_predictor_text_proto, box_predictor_proto)
(box_predictor_proto.weight_shared_convolutional_box_predictor.
conv_hyperparams.CopyFrom(hyperparams_proto))
box_predictor = box_predictor_builder.build(
argscope_fn=mock_conv_argscope_builder,
box_predictor_config=box_predictor_proto,
is_training=False,
num_classes=10)
self.assertEqual(box_predictor._depth, 2)
self.assertEqual(box_predictor._num_layers_before_predictor, 2)
self.assertAlmostEqual(box_predictor._class_prediction_bias_init, 4.0)
self.assertEqual(box_predictor.num_classes, 10)
self.assertFalse(box_predictor._is_training)
self.assertEqual(box_predictor._apply_batch_norm, False)
def test_construct_default_conv_box_predictor(self):
box_predictor_text_proto = """
weight_shared_convolutional_box_predictor {
conv_hyperparams {
regularizer {
l1_regularizer {
}
}
initializer {
truncated_normal_initializer {
}
}
}
}"""
box_predictor_proto = box_predictor_pb2.BoxPredictor()
text_format.Merge(box_predictor_text_proto, box_predictor_proto)
box_predictor = box_predictor_builder.build(
argscope_fn=hyperparams_builder.build,
box_predictor_config=box_predictor_proto,
is_training=True,
num_classes=90)
self.assertEqual(box_predictor._depth, 0)
self.assertEqual(box_predictor._num_layers_before_predictor, 0)
self.assertEqual(box_predictor.num_classes, 90)
self.assertTrue(box_predictor._is_training)
self.assertEqual(box_predictor._apply_batch_norm, False)
def test_construct_default_conv_box_predictor_with_batch_norm(self):
box_predictor_text_proto = """
weight_shared_convolutional_box_predictor {
conv_hyperparams {
regularizer {
l1_regularizer {
}
}
batch_norm {
train: true
}
initializer {
truncated_normal_initializer {
}
}
}
}"""
box_predictor_proto = box_predictor_pb2.BoxPredictor()
text_format.Merge(box_predictor_text_proto, box_predictor_proto)
box_predictor = box_predictor_builder.build(
argscope_fn=hyperparams_builder.build,
box_predictor_config=box_predictor_proto,
is_training=True,
num_classes=90)
self.assertEqual(box_predictor._depth, 0)
self.assertEqual(box_predictor._num_layers_before_predictor, 0)
self.assertEqual(box_predictor.num_classes, 90)
self.assertTrue(box_predictor._is_training)
self.assertEqual(box_predictor._apply_batch_norm, True)
class MaskRCNNBoxPredictorBuilderTest(tf.test.TestCase):
def test_box_predictor_builder_calls_fc_argscope_fn(self):
fc_hyperparams_text_proto = """
regularizer {
l1_regularizer {
weight: 0.0003
}
}
initializer {
truncated_normal_initializer {
mean: 0.0
stddev: 0.3
}
}
activation: RELU_6
op: FC
"""
hyperparams_proto = hyperparams_pb2.Hyperparams()
text_format.Merge(fc_hyperparams_text_proto, hyperparams_proto)
box_predictor_proto = box_predictor_pb2.BoxPredictor()
box_predictor_proto.mask_rcnn_box_predictor.fc_hyperparams.CopyFrom(
hyperparams_proto)
mock_argscope_fn = mock.Mock(return_value='arg_scope')
box_predictor = box_predictor_builder.build(
argscope_fn=mock_argscope_fn,
box_predictor_config=box_predictor_proto,
is_training=False,
num_classes=10)
mock_argscope_fn.assert_called_with(hyperparams_proto, False)
self.assertEqual(box_predictor._box_prediction_head._fc_hyperparams_fn,
'arg_scope')
self.assertEqual(box_predictor._class_prediction_head._fc_hyperparams_fn,
'arg_scope')
def test_non_default_mask_rcnn_box_predictor(self):
fc_hyperparams_text_proto = """
regularizer {
l1_regularizer {
}
}
initializer {
truncated_normal_initializer {
}
}
activation: RELU_6
op: FC
"""
box_predictor_text_proto = """
mask_rcnn_box_predictor {
use_dropout: true
dropout_keep_probability: 0.8
box_code_size: 3
share_box_across_classes: true
}
"""
hyperparams_proto = hyperparams_pb2.Hyperparams()
text_format.Merge(fc_hyperparams_text_proto, hyperparams_proto)
def mock_fc_argscope_builder(fc_hyperparams_arg, is_training):
return (fc_hyperparams_arg, is_training)
box_predictor_proto = box_predictor_pb2.BoxPredictor()
text_format.Merge(box_predictor_text_proto, box_predictor_proto)
box_predictor_proto.mask_rcnn_box_predictor.fc_hyperparams.CopyFrom(
hyperparams_proto)
box_predictor = box_predictor_builder.build(
argscope_fn=mock_fc_argscope_builder,
box_predictor_config=box_predictor_proto,
is_training=True,
num_classes=90)
box_head = box_predictor._box_prediction_head
class_head = box_predictor._class_prediction_head
self.assertTrue(box_head._use_dropout)
self.assertTrue(class_head._use_dropout)
self.assertAlmostEqual(box_head._dropout_keep_prob, 0.8)
self.assertAlmostEqual(class_head._dropout_keep_prob, 0.8)
self.assertEqual(box_predictor.num_classes, 90)
self.assertTrue(box_predictor._is_training)
self.assertEqual(box_head._box_code_size, 3)
self.assertEqual(box_head._share_box_across_classes, True)
def test_build_default_mask_rcnn_box_predictor(self):
box_predictor_proto = box_predictor_pb2.BoxPredictor()
box_predictor_proto.mask_rcnn_box_predictor.fc_hyperparams.op = (
hyperparams_pb2.Hyperparams.FC)
box_predictor = box_predictor_builder.build(
argscope_fn=mock.Mock(return_value='arg_scope'),
box_predictor_config=box_predictor_proto,
is_training=True,
num_classes=90)
box_head = box_predictor._box_prediction_head
class_head = box_predictor._class_prediction_head
self.assertFalse(box_head._use_dropout)
self.assertFalse(class_head._use_dropout)
self.assertAlmostEqual(box_head._dropout_keep_prob, 0.5)
self.assertEqual(box_predictor.num_classes, 90)
self.assertTrue(box_predictor._is_training)
self.assertEqual(box_head._box_code_size, 4)
self.assertEqual(len(box_predictor._third_stage_heads.keys()), 0)
def test_build_box_predictor_with_mask_branch(self):
box_predictor_proto = box_predictor_pb2.BoxPredictor()
box_predictor_proto.mask_rcnn_box_predictor.fc_hyperparams.op = (
hyperparams_pb2.Hyperparams.FC)
box_predictor_proto.mask_rcnn_box_predictor.conv_hyperparams.op = (
hyperparams_pb2.Hyperparams.CONV)
box_predictor_proto.mask_rcnn_box_predictor.predict_instance_masks = True
box_predictor_proto.mask_rcnn_box_predictor.mask_prediction_conv_depth = 512
box_predictor_proto.mask_rcnn_box_predictor.mask_height = 16
box_predictor_proto.mask_rcnn_box_predictor.mask_width = 16
mock_argscope_fn = mock.Mock(return_value='arg_scope')
box_predictor = box_predictor_builder.build(
argscope_fn=mock_argscope_fn,
box_predictor_config=box_predictor_proto,
is_training=True,
num_classes=90)
mock_argscope_fn.assert_has_calls(
[mock.call(box_predictor_proto.mask_rcnn_box_predictor.fc_hyperparams,
True),
mock.call(box_predictor_proto.mask_rcnn_box_predictor.conv_hyperparams,
True)], any_order=True)
box_head = box_predictor._box_prediction_head
class_head = box_predictor._class_prediction_head
third_stage_heads = box_predictor._third_stage_heads
self.assertFalse(box_head._use_dropout)
self.assertFalse(class_head._use_dropout)
self.assertAlmostEqual(box_head._dropout_keep_prob, 0.5)
self.assertAlmostEqual(class_head._dropout_keep_prob, 0.5)
self.assertEqual(box_predictor.num_classes, 90)
self.assertTrue(box_predictor._is_training)
self.assertEqual(box_head._box_code_size, 4)
self.assertTrue(
mask_rcnn_box_predictor.MASK_PREDICTIONS in third_stage_heads)
self.assertEqual(
third_stage_heads[mask_rcnn_box_predictor.MASK_PREDICTIONS]
._mask_prediction_conv_depth, 512)
class RfcnBoxPredictorBuilderTest(tf.test.TestCase):
def test_box_predictor_calls_fc_argscope_fn(self):
conv_hyperparams_text_proto = """
regularizer {
l1_regularizer {
weight: 0.0003
}
}
initializer {
truncated_normal_initializer {
mean: 0.0
stddev: 0.3
}
}
activation: RELU_6
"""
hyperparams_proto = hyperparams_pb2.Hyperparams()
text_format.Merge(conv_hyperparams_text_proto, hyperparams_proto)
def mock_conv_argscope_builder(conv_hyperparams_arg, is_training):
return (conv_hyperparams_arg, is_training)
box_predictor_proto = box_predictor_pb2.BoxPredictor()
box_predictor_proto.rfcn_box_predictor.conv_hyperparams.CopyFrom(
hyperparams_proto)
box_predictor = box_predictor_builder.build(
argscope_fn=mock_conv_argscope_builder,
box_predictor_config=box_predictor_proto,
is_training=False,
num_classes=10)
(conv_hyperparams_actual, is_training) = box_predictor._conv_hyperparams_fn
self.assertAlmostEqual((hyperparams_proto.regularizer.
l1_regularizer.weight),
(conv_hyperparams_actual.regularizer.l1_regularizer.
weight))
self.assertAlmostEqual((hyperparams_proto.initializer.
truncated_normal_initializer.stddev),
(conv_hyperparams_actual.initializer.
truncated_normal_initializer.stddev))
self.assertAlmostEqual((hyperparams_proto.initializer.
truncated_normal_initializer.mean),
(conv_hyperparams_actual.initializer.
truncated_normal_initializer.mean))
self.assertEqual(hyperparams_proto.activation,
conv_hyperparams_actual.activation)
self.assertFalse(is_training)
def test_non_default_rfcn_box_predictor(self):
conv_hyperparams_text_proto = """
regularizer {
l1_regularizer {
}
}
initializer {
truncated_normal_initializer {
}
}
activation: RELU_6
"""
box_predictor_text_proto = """
rfcn_box_predictor {
num_spatial_bins_height: 4
num_spatial_bins_width: 4
depth: 4
box_code_size: 3
crop_height: 16
crop_width: 16
}
"""
hyperparams_proto = hyperparams_pb2.Hyperparams()
text_format.Merge(conv_hyperparams_text_proto, hyperparams_proto)
def mock_conv_argscope_builder(conv_hyperparams_arg, is_training):
return (conv_hyperparams_arg, is_training)
box_predictor_proto = box_predictor_pb2.BoxPredictor()
text_format.Merge(box_predictor_text_proto, box_predictor_proto)
box_predictor_proto.rfcn_box_predictor.conv_hyperparams.CopyFrom(
hyperparams_proto)
box_predictor = box_predictor_builder.build(
argscope_fn=mock_conv_argscope_builder,
box_predictor_config=box_predictor_proto,
is_training=True,
num_classes=90)
self.assertEqual(box_predictor.num_classes, 90)
self.assertTrue(box_predictor._is_training)
self.assertEqual(box_predictor._box_code_size, 3)
self.assertEqual(box_predictor._num_spatial_bins, [4, 4])
self.assertEqual(box_predictor._crop_size, [16, 16])
def test_default_rfcn_box_predictor(self):
conv_hyperparams_text_proto = """
regularizer {
l1_regularizer {
}
}
initializer {
truncated_normal_initializer {
}
}
activation: RELU_6
"""
hyperparams_proto = hyperparams_pb2.Hyperparams()
text_format.Merge(conv_hyperparams_text_proto, hyperparams_proto)
def mock_conv_argscope_builder(conv_hyperparams_arg, is_training):
return (conv_hyperparams_arg, is_training)
box_predictor_proto = box_predictor_pb2.BoxPredictor()
box_predictor_proto.rfcn_box_predictor.conv_hyperparams.CopyFrom(
hyperparams_proto)
box_predictor = box_predictor_builder.build(
argscope_fn=mock_conv_argscope_builder,
box_predictor_config=box_predictor_proto,
is_training=True,
num_classes=90)
self.assertEqual(box_predictor.num_classes, 90)
self.assertTrue(box_predictor._is_training)
self.assertEqual(box_predictor._box_code_size, 4)
self.assertEqual(box_predictor._num_spatial_bins, [3, 3])
self.assertEqual(box_predictor._crop_size, [12, 12])
if __name__ == '__main__':
tf.test.main()
| 38.79469
| 80
| 0.713217
| 2,469
| 21,919
| 5.846092
| 0.080599
| 0.192878
| 0.062422
| 0.061729
| 0.888943
| 0.850007
| 0.825759
| 0.797146
| 0.780449
| 0.76784
| 0
| 0.013445
| 0.21616
| 21,919
| 564
| 81
| 38.863475
| 0.826669
| 0.031662
| 0
| 0.697087
| 0
| 0
| 0.16981
| 0.037348
| 0
| 0
| 0
| 0
| 0.170874
| 1
| 0.042718
| false
| 0
| 0.013592
| 0.015534
| 0.079612
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
b906714dd32fe985f8f73a4390736a67263146db
| 52
|
py
|
Python
|
harvester/core/tests/mocks/__init__.py
|
surfedushare/search-portal
|
708a0d05eee13c696ca9abd7e84ab620d3900fbe
|
[
"MIT"
] | 2
|
2021-08-19T09:40:59.000Z
|
2021-12-14T11:08:20.000Z
|
harvester/core/tests/mocks/__init__.py
|
surfedushare/search-portal
|
f5486d6b07b7b04a46ce707cee5174db4f8da222
|
[
"MIT"
] | 159
|
2020-05-14T14:17:34.000Z
|
2022-03-23T10:28:13.000Z
|
harvester/core/tests/mocks/__init__.py
|
nppo/search-portal
|
aedf21e334f178c049f9d6cf37cafd6efc07bc0d
|
[
"MIT"
] | 1
|
2021-11-11T13:37:22.000Z
|
2021-11-11T13:37:22.000Z
|
from .elastic_client import get_elastic_client_mock
| 26
| 51
| 0.903846
| 8
| 52
| 5.375
| 0.75
| 0.604651
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.076923
| 52
| 1
| 52
| 52
| 0.895833
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 6
|
5d636104a8d0d3e6f41760e7f647e407f8c7545e
| 2,669
|
py
|
Python
|
CIFAR-100/load_settings.py
|
nuguziii/overhaul-distillation
|
f5b9929f5b29806540ecaf5b83435ad594071d17
|
[
"MIT"
] | 365
|
2019-09-10T03:43:36.000Z
|
2022-03-28T18:26:42.000Z
|
CIFAR-100/load_settings.py
|
shashank3959/overhaul-distillation
|
9c571f6d4cbb8eb7a26a28cc3485a1314f37be77
|
[
"MIT"
] | 35
|
2019-09-14T03:24:49.000Z
|
2021-09-08T12:13:20.000Z
|
CIFAR-100/load_settings.py
|
shashank3959/overhaul-distillation
|
9c571f6d4cbb8eb7a26a28cc3485a1314f37be77
|
[
"MIT"
] | 72
|
2019-09-10T23:57:20.000Z
|
2022-03-25T12:39:51.000Z
|
import torch
import os
import models.WideResNet as WRN
import models.PyramidNet as PYN
import models.ResNet as RN
def load_paper_settings(args):
WRN_path = os.path.join(args.data_path, 'WRN28-4_21.09.pt')
Pyramid_path = os.path.join(args.data_path, 'pyramid200_mixup_15.6.tar')
if args.paper_setting == 'a':
teacher = WRN.WideResNet(depth=28, widen_factor=4, num_classes=100)
state = torch.load(WRN_path, map_location={'cuda:0': 'cpu'})['model']
teacher.load_state_dict(state)
student = WRN.WideResNet(depth=16, widen_factor=4, num_classes=100)
elif args.paper_setting == 'b':
teacher = WRN.WideResNet(depth=28, widen_factor=4, num_classes=100)
state = torch.load(WRN_path, map_location={'cuda:0': 'cpu'})['model']
teacher.load_state_dict(state)
student = WRN.WideResNet(depth=28, widen_factor=2, num_classes=100)
elif args.paper_setting == 'c':
teacher = WRN.WideResNet(depth=28, widen_factor=4, num_classes=100)
state = torch.load(WRN_path, map_location={'cuda:0': 'cpu'})['model']
teacher.load_state_dict(state)
student = WRN.WideResNet(depth=16, widen_factor=2, num_classes=100)
elif args.paper_setting == 'd':
teacher = WRN.WideResNet(depth=28, widen_factor=4, num_classes=100)
state = torch.load(WRN_path, map_location={'cuda:0': 'cpu'})['model']
teacher.load_state_dict(state)
student = RN.ResNet(depth=56, num_classes=100)
elif args.paper_setting == 'e':
teacher = PYN.PyramidNet(depth=200, alpha=240, num_classes=100, bottleneck=True)
state = torch.load(Pyramid_path, map_location={'cuda:0': 'cpu'})['state_dict']
from collections import OrderedDict
new_state = OrderedDict()
for k, v in state.items():
name = k[7:] # remove 'module.' of dataparallel
new_state[name] = v
teacher.load_state_dict(new_state)
student = WRN.WideResNet(depth=28, widen_factor=4, num_classes=100)
elif args.paper_setting == 'f':
teacher = PYN.PyramidNet(depth=200, alpha=240, num_classes=100, bottleneck=True)
state = torch.load(Pyramid_path, map_location={'cuda:0': 'cpu'})['state_dict']
from collections import OrderedDict
new_state = OrderedDict()
for k, v in state.items():
name = k[7:] # remove 'module.' of dataparallel
new_state[name] = v
teacher.load_state_dict(new_state)
student = PYN.PyramidNet(depth=110, alpha=84, num_classes=100, bottleneck=False)
else:
print('Undefined setting name !!!')
return teacher, student, args
| 42.365079
| 88
| 0.661671
| 369
| 2,669
| 4.604336
| 0.233062
| 0.07063
| 0.091819
| 0.07063
| 0.81754
| 0.81754
| 0.81754
| 0.76751
| 0.766333
| 0.766333
| 0
| 0.047237
| 0.206819
| 2,669
| 63
| 89
| 42.365079
| 0.755314
| 0.024354
| 0
| 0.54902
| 0
| 0
| 0.064206
| 0.009612
| 0
| 0
| 0
| 0
| 0
| 1
| 0.019608
| false
| 0
| 0.137255
| 0
| 0.176471
| 0.019608
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
53ac0c1065466c7f0f8392ac3d6d5a338310acd0
| 11,787
|
py
|
Python
|
deslib/tests/des/test_des_knn.py
|
luccaportes/DESlib
|
7d2399e6772e485fccd11c11f3e1730826df11ee
|
[
"BSD-3-Clause"
] | 1
|
2018-10-19T19:48:31.000Z
|
2018-10-19T19:48:31.000Z
|
deslib/tests/des/test_des_knn.py
|
luccaportes/DESlib
|
7d2399e6772e485fccd11c11f3e1730826df11ee
|
[
"BSD-3-Clause"
] | null | null | null |
deslib/tests/des/test_des_knn.py
|
luccaportes/DESlib
|
7d2399e6772e485fccd11c11f3e1730826df11ee
|
[
"BSD-3-Clause"
] | null | null | null |
from unittest.mock import MagicMock
import numpy as np
import pytest
from sklearn.linear_model import Perceptron
from deslib.des.des_knn import DESKNN
from sklearn.utils.estimator_checks import check_estimator
def test_check_estimator():
check_estimator(DESKNN)
def test_estimate_competence():
"""
Test case:
Correct labels: 0000111
classifier 1: 1010000 (2/7 correct)
classifier 2: 1000100 (4/7 correct)
classifier 2: 0010110 (5/7 correct)
Diversity: compute number of common errors (on both classifiers) and
divide by 7:
clf1 x clf2: 3/7
clf1 x clf3: 2/7
clf2 x clf3: 1/7
clf1 diversity = (3+2)/7 = -5/7 (negative because we use the negative of
double error)
clf2 diversity = (3+1)/7 = -4/7
clf3 diversity = (2+1)/7 = -3/7
"""
query = np.ones((1, 2))
x = np.array([0, 1, 2, 3, 4, 5, 6]).reshape(-1, 1)
y = np.array([0, 0, 0, 0, 1, 1, 1])
clf1 = create_base_classifier(np.array([1, 0, 1, 0, 0, 0, 0]))
clf2 = create_base_classifier(np.array([1, 0, 0, 0, 1, 0, 0]))
clf3 = create_base_classifier(np.array([0, 0, 1, 0, 1, 1, 0]))
pool_classifiers = [clf1, clf2, clf3]
target = DESKNN(pool_classifiers, k=7, pct_accuracy=1, pct_diversity=1)
target.fit(x, y)
neighbors = np.array([[0, 1, 2, 3, 4, 5, 6]])
competences, diversity = target.estimate_competence(query, neighbors)
assert np.allclose(competences, [2. / 7, 4. / 7, 5. / 7])
assert np.allclose(diversity, [-5. / 7, -4. / 7, -3. / 7])
def test_estimate_competence_batch():
"""
Test case:
Correct labels: 0000111
classifier 1: 1010000 (2/7 correct)
classifier 2: 1000100 (4/7 correct)
classifier 2: 0010110 (5/7 correct)
Diversity: compute number of common errors (on both classifiers) and
divide by 7:
clf1 x clf2: 3/7
clf1 x clf3: 2/7
clf2 x clf3: 1/7
clf1 diversity = (3+2)/7 = -5/7 (negative because we use the negative of
double error)
clf2 diversity = (3+1)/7 = -4/7
clf3 diversity = (2+1)/7 = -3/7
"""
n_samples = 10
query = np.ones((n_samples, 2))
x = np.array([0, 1, 2, 3, 4, 5, 6]).reshape(-1, 1)
y = np.array([0, 0, 0, 0, 1, 1, 1])
clf1 = create_base_classifier(np.array([1, 0, 1, 0, 0, 0, 0]))
clf2 = create_base_classifier(np.array([1, 0, 0, 0, 1, 0, 0]))
clf3 = create_base_classifier(np.array([0, 0, 1, 0, 1, 1, 0]))
pool_classifiers = [clf1, clf2, clf3]
target = DESKNN(pool_classifiers, k=7, pct_accuracy=1, pct_diversity=1)
target.fit(x, y)
neighbors = np.tile([0, 1, 2, 3, 4, 5, 6], (10, 1))
competences, diversity = target.estimate_competence(query, neighbors)
assert np.allclose(competences, [2. / 7, 4. / 7, 5. / 7])
assert np.allclose(diversity, [-5. / 7, -4. / 7, -3. / 7])
def test_estimate_competence_Q():
query = np.ones((1, 2))
x = np.array([0, 1, 2, 3, 4, 5, 6]).reshape(-1, 1)
y = np.array([0, 0, 0, 0, 1, 1, 1])
clf1 = create_base_classifier(np.array([1, 0, 1, 0, 0, 0, 0]))
clf2 = create_base_classifier(np.array([1, 0, 0, 0, 1, 0, 0]))
clf3 = create_base_classifier(np.array([0, 0, 1, 0, 1, 1, 0]))
pool_classifiers = [clf1, clf2, clf3]
target = DESKNN(pool_classifiers, k=7, pct_accuracy=1, pct_diversity=1,
metric='Q')
target.fit(x, y)
neighbors = np.array([[0, 1, 2, 3, 4, 5, 6]])
competences, diversity = target.estimate_competence(query, neighbors)
assert np.allclose(competences, [2. / 7, 4. / 7, 5. / 7])
assert np.allclose(diversity, [2, 1.2, 1.2])
def test_estimate_competence_Q_batch():
n_samples = 10
query = np.ones((n_samples, 2))
x = np.array([0, 1, 2, 3, 4, 5, 6]).reshape(-1, 1)
y = np.array([0, 0, 0, 0, 1, 1, 1])
clf1 = create_base_classifier(np.array([1, 0, 1, 0, 0, 0, 0]))
clf2 = create_base_classifier(np.array([1, 0, 0, 0, 1, 0, 0]))
clf3 = create_base_classifier(np.array([0, 0, 1, 0, 1, 1, 0]))
pool_classifiers = [clf1, clf2, clf3]
target = DESKNN(pool_classifiers, k=7, pct_accuracy=1, pct_diversity=1,
metric='Q')
target.fit(x, y)
neighbors = np.tile([0, 1, 2, 3, 4, 5, 6], (n_samples, 1))
competences, diversity = target.estimate_competence(query, neighbors)
assert np.allclose(competences, [2. / 7, 4. / 7, 5. / 7])
assert np.allclose(diversity, [2, 1.2, 1.2])
def test_estimate_competence_ratio():
query = np.ones((1, 2))
x = np.array([0, 1, 2, 3, 4, 5, 6]).reshape(-1, 1)
y = np.array([0, 0, 0, 0, 1, 1, 1])
clf1 = create_base_classifier(np.array([1, 0, 1, 0, 0, 0, 0]))
clf2 = create_base_classifier(np.array([1, 0, 0, 0, 1, 0, 0]))
clf3 = create_base_classifier(np.array([0, 0, 1, 0, 1, 1, 0]))
pool_classifiers = [clf1, clf2, clf3]
target = DESKNN(pool_classifiers, k=7, pct_accuracy=1, pct_diversity=1,
metric='ratio')
target.fit(x, y)
neighbors = np.array([[0, 1, 2, 3, 4, 5, 6]])
competences, diversity = target.estimate_competence(query, neighbors)
assert np.allclose(competences, [2. / 7, 4. / 7, 5. / 7])
assert np.allclose(diversity, [2.166, 3.666, 4.500], atol=0.01)
def test_estimate_competence_ratio_batch():
n_samples = 10
query = np.ones((n_samples, 2))
x = np.array([0, 1, 2, 3, 4, 5, 6]).reshape(-1, 1)
y = np.array([0, 0, 0, 0, 1, 1, 1])
clf1 = create_base_classifier(np.array([1, 0, 1, 0, 0, 0, 0]))
clf2 = create_base_classifier(np.array([1, 0, 0, 0, 1, 0, 0]))
clf3 = create_base_classifier(np.array([0, 0, 1, 0, 1, 1, 0]))
pool_classifiers = [clf1, clf2, clf3]
target = DESKNN(pool_classifiers, k=7, pct_accuracy=1, pct_diversity=1,
metric='ratio')
target.fit(x, y)
neighbors = np.tile([0, 1, 2, 3, 4, 5, 6], (n_samples, 1))
competences, diversity = target.estimate_competence(query, neighbors)
assert np.allclose(competences, [2. / 7, 4. / 7, 5. / 7])
assert np.allclose(diversity, [2.166, 3.666, 4.500], atol=0.01)
def test_select():
"""
Test case: 10 base classifiers; select 5 based on accuracy,
then the 3 most diverse
accuracies (/10): 4 6 1 2 9 8 7 9 3 2
(should select indices_ 1, 4, 5, 6, 7)
diversity: 0 8 0 0 1 6 7 2 0 0
(should select indices_ 1, 5, 6 as most diverse)
"""
pool_classifiers = [create_base_classifier(1) for _ in range(10)]
accuracies = np.array([4, 6, 1, 2, 9, 8, 7, 9, 3, 2]) / 10.
diversity = np.array([0, 8, 0, 0, 1, 6, 7, 2, 0, 0])
target = DESKNN(pool_classifiers, k=7, pct_accuracy=5. / 10,
pct_diversity=3. / 10)
target.N_ = 5
target.J_ = 3
selected_classifiers = target.select(accuracies, diversity)
expected = np.array([[1, 5, 6]])
assert np.array_equal(np.unique(selected_classifiers), np.unique(expected))
def test_select_batch():
"""
Test case: 10 base classifiers; select 5 based on accuracy,
then the 3 most diverse.
accuracies (/10): 4 6 1 2 9 8 7 9 3 2
(should select indices_ 1, 4, 5, 6, 7)
diversity: 0 8 0 0 1 6 7 2 0 0
(should select indices_ 1, 5, 6 as most diverse)
"""
n_samples = 10
pool_classifiers = [create_base_classifier(1) for _ in range(10)]
accuracies = np.tile([4, 6, 1, 2, 9, 8, 7, 9, 3, 2], (n_samples, 1)) / 10.
diversity = np.tile([0, 8, 0, 0, 1, 6, 7, 2, 0, 0], (n_samples, 1))
target = DESKNN(pool_classifiers, k=7, pct_accuracy=5. / 10,
pct_diversity=3. / 10)
target.N_ = 5
target.J_ = 3
selected_classifiers = target.select(accuracies, diversity)
expected = np.tile([1, 5, 6], (n_samples, 1))
assert np.array_equal(np.unique(selected_classifiers), np.unique(expected))
def test_select_less_diverse():
"""
Test case: 10 base classifiers; select 5 based on accuracy,
then the 3 less diverse
accuracies (/10): 4 6 1 2 9 8 7 9 3 2
(should select indices_ 1, 4, 5, 6, 7)
diversity: 0 8 0 0 1 6 7 2 0 0
(should select indices_ 4, 5, 7 as most diverse)
"""
pool_classifiers = [create_base_classifier(1) for _ in range(10)]
accuracies = np.array([[4, 6, 1, 2, 9, 8, 7, 9, 3, 2]]) / 10.
diversity = np.array([[0, 8, 0, 0, 1, 6, 7, 2, 0, 0]])
target = DESKNN(pool_classifiers, k=7, pct_accuracy=5. / 10,
pct_diversity=3. / 10, more_diverse=False)
target.N_ = 5
target.J_ = 3
selected_classifiers = target.select(accuracies, diversity)
expected = np.array([[4, 5, 7]])
assert np.array_equal(np.unique(selected_classifiers), np.unique(expected))
def test_input_diversity_parameter():
X = np.random.rand(10, 2)
y = np.ones(10)
with pytest.raises(ValueError):
desknn = DESKNN([create_base_classifier(1)] * 100, metric='abc')
desknn.fit(X, y)
def test_J_N_values():
X = np.random.rand(10, 2)
y = np.ones(10)
with pytest.raises(ValueError):
desknn = DESKNN([create_base_classifier(1)] * 100, pct_accuracy=0.5,
pct_diversity=0)
desknn.fit(X, y)
def test_J_higher_than_N():
X = np.random.rand(10, 2)
y = np.ones(10)
with pytest.raises(ValueError):
desknn = DESKNN([create_base_classifier(1)] * 100, pct_accuracy=0.3,
pct_diversity=0.5)
desknn.fit(X, y)
def create_base_classifier(value):
classifier = MagicMock()
classifier.predict.return_value = value
classifier.predict_proba.return_value = value
return classifier
# Test if the class is raising an error when the base classifiers do not
# implements the predict_proba method.
# In this case the test should not raise an error since this class does not
# require base classifiers that can estimate probabilities
def test_predict_proba():
X = np.random.randn(15, 5)
y = np.array([0, 1, 0, 0, 0] * 3)
clf1 = Perceptron()
clf1.fit(X, y)
DESKNN([clf1, clf1, clf1]).fit(X, y)
def test_classify_with_ds_single_sample():
query = np.ones(2)
predictions = np.array([0, 1, 0])
clf1 = create_base_classifier(np.array([1, 0, 1, 0, 0, 0, 0]))
clf2 = create_base_classifier(np.array([1, 0, 0, 0, 1, 0, 0]))
clf3 = create_base_classifier(np.array([0, 0, 1, 0, 1, 1, 0]))
pool_classifiers = [clf1, clf2, clf3]
desknn_test = DESKNN(pool_classifiers)
desknn_test.estimate_competence = MagicMock(
return_value=(np.ones(3), np.ones(3)))
desknn_test.select = MagicMock(return_value=np.array([[0, 2]]))
result = desknn_test.classify_with_ds(query, predictions)
assert np.allclose(result, 0)
def test_classify_with_ds_diff_sizes():
query = np.ones((10, 2))
predictions = np.ones((5, 3))
clf1 = create_base_classifier(np.array([1, 0, 1, 0, 0, 0, 0]))
clf2 = create_base_classifier(np.array([1, 0, 0, 0, 1, 0, 0]))
clf3 = create_base_classifier(np.array([0, 0, 1, 0, 1, 1, 0]))
pool_classifiers = [clf1, clf2, clf3]
desknn_test = DESKNN(pool_classifiers)
with pytest.raises(ValueError):
desknn_test.classify_with_ds(query, predictions)
def test_proba_with_ds_diff_sizes():
query = np.ones((10, 2))
predictions = np.ones((5, 3))
probabilities = np.ones((5, 3, 2))
clf1 = create_base_classifier(np.array([1, 0, 1, 0, 0, 0, 0]))
clf2 = create_base_classifier(np.array([1, 0, 0, 0, 1, 0, 0]))
clf3 = create_base_classifier(np.array([0, 0, 1, 0, 1, 1, 0]))
pool_classifiers = [clf1, clf2, clf3]
desknn_test = DESKNN(pool_classifiers)
with pytest.raises(ValueError):
desknn_test.predict_proba_with_ds(query, predictions, probabilities)
| 33.202817
| 79
| 0.611776
| 1,911
| 11,787
| 3.648875
| 0.083203
| 0.027248
| 0.017209
| 0.085186
| 0.843109
| 0.826187
| 0.826187
| 0.810698
| 0.810698
| 0.810698
| 0
| 0.103479
| 0.236701
| 11,787
| 354
| 80
| 33.29661
| 0.671557
| 0.166115
| 0
| 0.69697
| 0
| 0
| 0.001566
| 0
| 0
| 0
| 0
| 0
| 0.080808
| 1
| 0.090909
| false
| 0
| 0.030303
| 0
| 0.126263
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
53af6664f61b551d24165230366d47bfb70f90e4
| 143
|
py
|
Python
|
gym_mo/envs/gridworlds/__init__.py
|
FMalerba/gym-mo
|
4637bfea8984ad821785150061f1da28a2f5a5b0
|
[
"BSD-3-Clause"
] | null | null | null |
gym_mo/envs/gridworlds/__init__.py
|
FMalerba/gym-mo
|
4637bfea8984ad821785150061f1da28a2f5a5b0
|
[
"BSD-3-Clause"
] | null | null | null |
gym_mo/envs/gridworlds/__init__.py
|
FMalerba/gym-mo
|
4637bfea8984ad821785150061f1da28a2f5a5b0
|
[
"BSD-3-Clause"
] | null | null | null |
from gym_mo.envs.gridworlds.mo_traffic_env import MOTrafficEnv
from gym_mo.envs.gridworlds.mo_deep_sea_treasure_env import MODeepSeaTresureEnv
| 47.666667
| 79
| 0.902098
| 22
| 143
| 5.5
| 0.590909
| 0.115702
| 0.14876
| 0.214876
| 0.413223
| 0.413223
| 0
| 0
| 0
| 0
| 0
| 0
| 0.055944
| 143
| 2
| 80
| 71.5
| 0.896296
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 6
|
53de0b41e2bc8dbd34d7bf9cf4e5f77643c1c7be
| 62
|
py
|
Python
|
calculate.py
|
cu-swe4s-fall-2020/version-control-mad232
|
6d40887deb637976bc68b2c085ba606aa6c44d8d
|
[
"MIT"
] | null | null | null |
calculate.py
|
cu-swe4s-fall-2020/version-control-mad232
|
6d40887deb637976bc68b2c085ba606aa6c44d8d
|
[
"MIT"
] | null | null | null |
calculate.py
|
cu-swe4s-fall-2020/version-control-mad232
|
6d40887deb637976bc68b2c085ba606aa6c44d8d
|
[
"MIT"
] | null | null | null |
import math_lib as ml
print(ml.div(4,2))
print(ml.add(3,4))
| 10.333333
| 21
| 0.677419
| 15
| 62
| 2.733333
| 0.733333
| 0.341463
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.074074
| 0.129032
| 62
| 5
| 22
| 12.4
| 0.685185
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0.666667
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
|
0
| 6
|
53febf74240c1201d411fa0194622dbbe765d62f
| 25
|
py
|
Python
|
permute/__init__.py
|
tixxit/permute
|
731f82916ad764fcc85e8fe887638db8541a1d0c
|
[
"0BSD"
] | 3
|
2015-01-27T13:37:55.000Z
|
2018-05-18T14:36:11.000Z
|
permute/__init__.py
|
tixxit/permute
|
731f82916ad764fcc85e8fe887638db8541a1d0c
|
[
"0BSD"
] | null | null | null |
permute/__init__.py
|
tixxit/permute
|
731f82916ad764fcc85e8fe887638db8541a1d0c
|
[
"0BSD"
] | null | null | null |
from iterators import *
| 8.333333
| 23
| 0.76
| 3
| 25
| 6.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 25
| 2
| 24
| 12.5
| 0.95
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 6
|
070567f4cc77a8aec36671e6da53130689263081
| 1,675
|
py
|
Python
|
tests/test_card_block.py
|
nickmoreton/wagtail-nhsuk-frontend
|
7941787954c739e29ae6bbf35a62840b661372e0
|
[
"MIT"
] | null | null | null |
tests/test_card_block.py
|
nickmoreton/wagtail-nhsuk-frontend
|
7941787954c739e29ae6bbf35a62840b661372e0
|
[
"MIT"
] | null | null | null |
tests/test_card_block.py
|
nickmoreton/wagtail-nhsuk-frontend
|
7941787954c739e29ae6bbf35a62840b661372e0
|
[
"MIT"
] | null | null | null |
from bs4 import BeautifulSoup
from django.test import Client
import pytest
@pytest.mark.django_db
def test_card_clickable_block_external_url(db, django_db_setup, client: Client):
response = client.get('/promo-hub/')
soup = BeautifulSoup(response.content, 'html.parser')
a_tag = soup.select_one('.block-card_clickable:nth-of-type(2) a')
assert a_tag['href'] == 'https://example.com/'
@pytest.mark.django_db
def test_card_clickable_block_internal_page(db, django_db_setup, client: Client):
response = client.get('/promo-hub/')
soup = BeautifulSoup(response.content, 'html.parser')
a_tag = soup.select_one('.block-card_clickable:nth-of-type(3) a')
assert a_tag['href'] == '/page-1/'
@pytest.mark.django_db
def test_card_image_block_external_url(db, django_db_setup, client: Client):
response = client.get('/promo-hub/')
soup = BeautifulSoup(response.content, 'html.parser')
block = soup.select('.block-card_image')[0]
a_tag = block.find('a')
assert a_tag['href'] == 'https://example.com/'
@pytest.mark.django_db
def test_card_image_block_internal_page(db, django_db_setup, client: Client):
response = client.get('/promo-hub/')
soup = BeautifulSoup(response.content, 'html.parser')
block = soup.select('.block-card_image')[1]
a_tag = block.find('a')
assert a_tag['href'] == '/page-1/'
@pytest.mark.django_db
def test_card_image_block_no_internal_link_or_url(db, django_db_setup, client: Client):
response = client.get('/promo-hub/')
soup = BeautifulSoup(response.content, 'html.parser')
block = soup.select('.block-card_image')[2]
a_tag = block.find('a')
assert not a_tag
| 32.211538
| 87
| 0.713433
| 246
| 1,675
| 4.613821
| 0.199187
| 0.070485
| 0.070485
| 0.079295
| 0.918943
| 0.918943
| 0.901322
| 0.901322
| 0.901322
| 0.832599
| 0
| 0.005525
| 0.135522
| 1,675
| 51
| 88
| 32.843137
| 0.778315
| 0
| 0
| 0.611111
| 0
| 0
| 0.186269
| 0.042985
| 0
| 0
| 0
| 0
| 0.138889
| 1
| 0.138889
| false
| 0
| 0.083333
| 0
| 0.222222
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
071ffc3d40b7ce039336048e1235f8830bda6206
| 148
|
py
|
Python
|
transcrypt/development/automated_tests/transcrypt/modules/mod4.py
|
JMCanning78/Transcrypt
|
8a8dabe831240414fdf1d5027fa2b0d71ab45d05
|
[
"Apache-2.0"
] | 1
|
2017-08-11T01:51:51.000Z
|
2017-08-11T01:51:51.000Z
|
transcrypt/development/automated_tests/transcrypt/modules/mod4.py
|
JMCanning78/Transcrypt
|
8a8dabe831240414fdf1d5027fa2b0d71ab45d05
|
[
"Apache-2.0"
] | 2
|
2021-03-11T07:09:19.000Z
|
2021-05-12T11:26:23.000Z
|
transcrypt/development/automated_tests/transcrypt/modules/mod4.py
|
JMCanning78/Transcrypt
|
8a8dabe831240414fdf1d5027fa2b0d71ab45d05
|
[
"Apache-2.0"
] | 1
|
2021-02-07T00:22:12.000Z
|
2021-02-07T00:22:12.000Z
|
from modules.mod5 import mod5Add2
def mod4Add2FromMod5 (variable):
return mod5Add2 (variable)
def mod4Add1(variable):
return variable + 1
| 18.5
| 33
| 0.756757
| 17
| 148
| 6.588235
| 0.647059
| 0.25
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.090164
| 0.175676
| 148
| 7
| 34
| 21.142857
| 0.827869
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 6
|
072cf87f18645f4025bb861b710b53a90211bdbd
| 31
|
py
|
Python
|
djcolour/__init__.py
|
jansegre/djcolour
|
532903f0edc20af2ecb6c06e6e7363b1ef9a03a2
|
[
"MIT"
] | null | null | null |
djcolour/__init__.py
|
jansegre/djcolour
|
532903f0edc20af2ecb6c06e6e7363b1ef9a03a2
|
[
"MIT"
] | null | null | null |
djcolour/__init__.py
|
jansegre/djcolour
|
532903f0edc20af2ecb6c06e6e7363b1ef9a03a2
|
[
"MIT"
] | null | null | null |
from .fields import ColorField
| 15.5
| 30
| 0.83871
| 4
| 31
| 6.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.129032
| 31
| 1
| 31
| 31
| 0.962963
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 6
|
ab46072aac6fff5c6b5909a540c7b9401695825b
| 15,883
|
py
|
Python
|
custom_helper_op/python/ops/op_tests/sparse_conv_fast_op_test.py
|
zhuimeng999/custom_helper_op
|
439c01a9112160ab0a1589454393139d213dcc63
|
[
"Apache-2.0"
] | null | null | null |
custom_helper_op/python/ops/op_tests/sparse_conv_fast_op_test.py
|
zhuimeng999/custom_helper_op
|
439c01a9112160ab0a1589454393139d213dcc63
|
[
"Apache-2.0"
] | null | null | null |
custom_helper_op/python/ops/op_tests/sparse_conv_fast_op_test.py
|
zhuimeng999/custom_helper_op
|
439c01a9112160ab0a1589454393139d213dcc63
|
[
"Apache-2.0"
] | null | null | null |
import os
# os.environ['TF_XLA_FLAGS'] = '--tf_xla_enable_xla_devices --tf_xla_auto_jit=2 --tf_xla_cpu_global_jit'
# os.environ['TF_GPU_THREAD_MODE'] = 'gpu_private'
# os.environ['OMP_NUM_THREADS'] = '1'
os.environ['TF_DISABLE_MKL'] = '1'
import tensorflow as tf
gpus = tf.config.experimental.get_visible_devices('GPU')
for x in gpus:
tf.config.experimental.set_memory_growth(x, True)
# tf.config.experimental.enable_mlir_graph_optimization()
from tensorflow.python.platform import test
from absl.testing import parameterized
from custom_helper_op import sparse_conv3d_fast, sparse_conv3d_transpose_fast
import numpy as np
from tensorflow.python.ops import gradient_checker_v2
import time
class SparseConv3DFastTest(test.TestCase, parameterized.TestCase):
@parameterized.parameters(
(1, 6, 1, 1, 1, 1, (1, 1, 1), (1, 1, 1)),
(1, 33, 68, 8, 32, 4, (1, 1, 1), (1, 1, 1)),
(2, 32, 40, 16, 32, 32, (2, 3, 8), (1, 1, 1)),
(2, 64, 80, 16, 32, 32, (3, 3, 3), (1, 1, 1)),
)
def testForward(self, BATCH_SIZE, IMAGE_HEIGHT, IMAGE_WIDTH, IMAGE_DEPTH, IN_CHANNELS, OUT_CHANNELS, KERNEL_SIZE, DILATIONS_SIZE):
depth_factor = 2
out_depth = IMAGE_DEPTH*depth_factor
# tf.random.set_seed(np.random.randint(0, tf.int64.max))
test_strides = (2, 2, 2)
# test_strides = (1, 1, 1)
in_shape = np.array((IMAGE_HEIGHT, IMAGE_WIDTH, IMAGE_DEPTH))
out_shape = (in_shape + np.array(test_strides) - 1)//np.array(test_strides)
full_in_shape = np.array((IMAGE_HEIGHT, IMAGE_WIDTH, out_depth))
full_out_shape = (full_in_shape + np.array(test_strides) - 1)//np.array(test_strides)
images_all = tf.random.uniform([BATCH_SIZE, *full_in_shape, IN_CHANNELS], dtype=tf.float64)
filters = tf.random.uniform([*KERNEL_SIZE, IN_CHANNELS, OUT_CHANNELS], dtype=images_all.dtype)
base_plane = tf.random.uniform([BATCH_SIZE, in_shape[0], in_shape[1], 1], minval=0, maxval=(full_in_shape[2] - in_shape[2] + 1), dtype=tf.int32)
default_value = tf.random.uniform([], dtype=images_all.dtype)
gather_indice = base_plane + np.arange(0, IMAGE_DEPTH, dtype=np.int32)[None, None, None, :]
images = tf.gather_nd(images_all, gather_indice[..., None], batch_dims=3)
mask = tf.one_hot(gather_indice, out_depth, on_value=True, off_value=False, dtype=tf.bool)
mask = tf.reduce_any(mask, axis=-2)
images_all = tf.where(mask[..., None], images_all, default_value)
start = time.time()
res = sparse_conv3d_fast(images, filters, default_value, base_plane, dilations=DILATIONS_SIZE, strides=test_strides)
my_time = time.time() - start
partial = (full_out_shape - 1) * test_strides + 1 - full_in_shape
pad_left = np.multiply(np.array(KERNEL_SIZE)//2,np.array(DILATIONS_SIZE))
pad_right = np.maximum((np.array(KERNEL_SIZE) - 1)*np.array(DILATIONS_SIZE) - pad_left + partial, np.array([0, 0, 0]))
pad_size = np.stack([pad_left, pad_right], axis=-1)
pad_size = np.concatenate([np.zeros((1, 2)), pad_size, np.zeros((1, 2))], axis=0)
images_nn = tf.pad(images_all, pad_size, mode="CONSTANT", constant_values=default_value)
# images_nn = images_all
# print(pad_left, pad_right, pad_size)
start = time.time()
res_nn = tf.nn.conv3d(images_nn, filters, strides=(1, *test_strides, 1), padding="VALID", dilations=(1, *DILATIONS_SIZE, 1))
nn_time = time.time() - start
# print(res_nn)
strided_base_plane = base_plane[:, 0::test_strides[0], 0::test_strides[1], :]
strided_base_plane = (strided_base_plane + test_strides[2] - 1)//test_strides[2]
gather_indice = strided_base_plane + np.arange(0, (IMAGE_DEPTH + test_strides[2] - 1)//test_strides[2], dtype=np.int32)[None, None, None, :]
res_nn = tf.gather_nd(res_nn, gather_indice[..., None], batch_dims=3)
# print(gather_indice)
# print(res, res_nn)
# print(images_all, base_plane, filters)
# print("my ", my_time/1000, " nn ", nn_time/1000)
# test_out = tf.reduce_sum(images[:, None, :KERNEL_SIZE[0], :KERNEL_SIZE[1], :KERNEL_SIZE[2], :]*filters[None, ...], axis=(2, 3, 4, 5))
# print(test_out, base_plane[:, :KERNEL_SIZE[0], :KERNEL_SIZE[1]])
# print(res[:, half_kernel[0], half_kernel[1], half_kernel[2], :])
# print(res_nn[:, half_kernel[0], half_kernel[1], half_kernel[2], :])
# print(res_nn, res, images_all, (base_plane[:, ::2, ::2, :] + 1)//2 )
self.assertShapeEqual(res.numpy(), res_nn)
self.assertAllClose(res, res_nn, rtol=1e-5)
@parameterized.parameters(
(1, 6, 7, 1, 1, 1, 1, (2, 2, 1), (1, 1, 1)),
(1, 8, 13, 6, 15, 3, 4, (3, 3, 3), (1, 1, 1)),
(2, 4, 6, 5, 8, 2, 1, (5, 3, 3), (2, 2, 2)),
(3, 4, 6, 4, 8, 2, 3, (2, 2, 1), (2, 2, 2)),
)
def testGradientFloat64(self, BATCH_SIZE, IMAGE_HEIGHT, IMAGE_WIDTH, IMAGE_DEPTH, VIRTUAL_DEPTH, IN_CHANNELS, OUT_CHANNELS, KERNEL_SIZE, DILATIONS_SIZE):
test_strides = (2, 2, 2)
tf.random.set_seed(np.random.randint(0, tf.int64.max))
images_all = tf.random.uniform([BATCH_SIZE, IMAGE_HEIGHT, IMAGE_WIDTH, VIRTUAL_DEPTH, IN_CHANNELS], dtype=tf.float64)
# images_all = tf.ones([BATCH_SIZE, IMAGE_HEIGHT, IMAGE_WIDTH, VIRTUAL_DEPTH, IN_CHANNELS], dtype=tf.float64)
# images_all = np.zeros([BATCH_SIZE, IMAGE_HEIGHT, IMAGE_WIDTH, VIRTUAL_DEPTH, IN_CHANNELS], dtype=np.float64)
# images_all[0, 5, 5, 0, 2] = 1.
# images_all = tf.constant(images_all)
filters = tf.random.uniform([KERNEL_SIZE[0], KERNEL_SIZE[1], KERNEL_SIZE[2], IN_CHANNELS, OUT_CHANNELS], dtype=images_all.dtype)
base_plane = tf.random.uniform([BATCH_SIZE, IMAGE_HEIGHT, IMAGE_WIDTH, 1], minval=0, maxval=(VIRTUAL_DEPTH - IMAGE_DEPTH + 1), dtype=tf.int32)
# test_start_d = 0
# base_plane = tf.ones([BATCH_SIZE, IMAGE_HEIGHT, IMAGE_WIDTH, 1], dtype=tf.int32) * test_start_d
default_value = tf.random.uniform([], dtype=images_all.dtype)
# default_value = tf.constant(0, dtype=images_all.dtype)
half_kernel = np.array(KERNEL_SIZE)//2
gather_indice = base_plane + np.arange(0, IMAGE_DEPTH, dtype=np.int32)[None, None, None, :]
images = tf.gather_nd(images_all, gather_indice[..., None], batch_dims=3)
# mask = tf.one_hot(gather_indice, VIRTUAL_DEPTH, on_value=True, off_value=False, dtype=tf.bool)
# mask = tf.reduce_any(mask, axis=-2)
# images_all = tf.where(mask[..., None], images_all, default_value)
# images_nn = tf.pad(images_all, [[0, 0], [half_kernel[0], half_kernel[0]], [half_kernel[1], half_kernel[1]], [half_kernel[2], half_kernel[2]], [0, 0]],
# mode="CONSTANT", constant_values=default_value)
cost_grad_perturbation = tf.random.uniform([BATCH_SIZE, IMAGE_HEIGHT//test_strides[0], (IMAGE_WIDTH + test_strides[1] - 1)//test_strides[1], (IMAGE_DEPTH + test_strides[2] - 1)//test_strides[2], OUT_CHANNELS], dtype=images_all.dtype)
# cost_grad_perturbation = tf.ones([BATCH_SIZE, IMAGE_HEIGHT//test_strides[0], (IMAGE_WIDTH + test_strides[1] - 1)//test_strides[1], (IMAGE_DEPTH + test_strides[2] - 1)//test_strides[2], OUT_CHANNELS], dtype=images_all.dtype)
@tf.function
def test_check(*args):
cost = sparse_conv3d_fast(*args, base_plane, dilations=DILATIONS_SIZE, dynamic_default=True, strides=test_strides)
return tf.reduce_sum(cost*cost_grad_perturbation)
with self.cached_session():
# res = sparse_conv2d(images, filters, base_plane, default_value, offsets)
theoretical, numerical = gradient_checker_v2.compute_gradient(test_check, [images, filters, default_value])
# err = gradient_checker_v2.max_error(theoretical, numerical)
# print(images_all, filters)
self.assertAllClose(theoretical[0], numerical[0])
self.assertAllClose(theoretical[1], numerical[1])
self.assertAllClose(theoretical[2], numerical[2])
# self.assertAllClose(theoretical[3], numerical[3])
@parameterized.parameters(
(1, 5, 1, 1, 1, 1, (1, 1, 1), (1, 1, 1)),
(2, 64, 80, 16, 32, 32, (3, 3, 3), (1, 1, 1)),
(2, 64, 80, 16, 20, 32, (3, 3, 3), (1, 1, 1)),
)
def testTransposeForward(self, BATCH_SIZE, IMAGE_HEIGHT, IMAGE_WIDTH, IMAGE_DEPTH, IN_CHANNELS, OUT_CHANNELS, KERNEL_SIZE, DILATIONS_SIZE):
depth_factor = 2
out_depth = IMAGE_DEPTH*depth_factor
# tf.random.set_seed(np.random.randint(0, tf.int64.max))
test_strides = (1, 1, 1)
in_shape = np.array((IMAGE_HEIGHT, IMAGE_WIDTH, IMAGE_DEPTH))
out_shape = (in_shape + np.array(test_strides) - 1)//np.array(test_strides)
full_in_shape = np.array((IMAGE_HEIGHT, IMAGE_WIDTH, out_depth))
full_out_shape = (full_in_shape + np.array(test_strides) - 1)//np.array(test_strides)
images_all = tf.random.uniform([BATCH_SIZE, *full_out_shape, OUT_CHANNELS], dtype=tf.float32)
filters = tf.random.uniform([*KERNEL_SIZE, IN_CHANNELS, OUT_CHANNELS], dtype=images_all.dtype)
base_plane = tf.random.uniform([BATCH_SIZE, in_shape[0], in_shape[1], 1], minval=0, maxval=(full_in_shape[2] - in_shape[2] + 1), dtype=tf.int32)
default_value = tf.zeros([], dtype=images_all.dtype)
strided_base_plane = base_plane[:, 0::test_strides[0], 0::test_strides[1], :]
strided_base_plane = (strided_base_plane + test_strides[2] - 1)//test_strides[2]
gather_indice = strided_base_plane + np.arange(0, (IMAGE_DEPTH + test_strides[2] - 1)//test_strides[2], dtype=np.int32)[None, None, None, :]
images = tf.gather_nd(images_all, gather_indice[..., None], batch_dims=3)
mask = tf.one_hot(gather_indice, full_out_shape[2], on_value=True, off_value=False, dtype=tf.bool)
mask = tf.reduce_any(mask, axis=-2)
images_all = tf.where(mask[..., None], images_all, default_value)
start = time.time()
res = sparse_conv3d_transpose_fast(images, filters, default_value, base_plane, in_shape.astype(np.int32), dilations=DILATIONS_SIZE, strides=test_strides)
my_time = time.time() - start
partial = (full_out_shape - 1) * test_strides + 1 - full_in_shape
pad_left = np.multiply(np.array(KERNEL_SIZE)//2,np.array(DILATIONS_SIZE))
pad_right = np.maximum((np.array(KERNEL_SIZE) - 1)*np.array(DILATIONS_SIZE) - pad_left + partial, np.array([0, 0, 0]))
pad_size = np.stack([pad_left, pad_right], axis=-1)
# pad_size = np.concatenate([np.zeros((1, 2)), pad_size, np.zeros((1, 2))], axis=0)
# images_nn = tf.pad(images_all, pad_size, mode="CONSTANT", constant_values=default_value)
images_nn = images_all
# print(pad_left, pad_right, pad_size)
start = time.time()
res_nn = tf.nn.conv3d_transpose(images_nn, filters, np.concatenate([[BATCH_SIZE,], full_in_shape + np.sum(pad_size, axis=1), [IN_CHANNELS,]], axis=0), strides=(1, *test_strides, 1), padding='VALID', dilations=(1, *DILATIONS_SIZE, 1))
nn_time = time.time() - start
gather_indice = base_plane + np.arange(0, IMAGE_DEPTH, dtype=np.int32)[None, None, None, :]
# print(tf.shape(res_nn), tf.shape(gather_indice))
res_nn = res_nn[:, pad_size[0, 0]:pad_size[0, 0] + full_in_shape[0], pad_size[1, 0]:pad_size[1, 0] + full_in_shape[1], pad_size[2, 0]:pad_size[2, 0] + full_in_shape[2], :]
res_nn = tf.gather_nd(res_nn, gather_indice[..., None], batch_dims=3)
# # print(tf.shape(res), tf.shape(res_nn), tf.shape(gather_indice))
# # print(res, res_nn)
# # print(images_all, base_plane, filters)
# # print("my ", my_time/1000, " nn ", nn_time/1000)
# # test_out = tf.reduce_sum(images[:, None, :KERNEL_SIZE[0], :KERNEL_SIZE[1], :KERNEL_SIZE[2], :]*filters[None, ...], axis=(2, 3, 4, 5))
# # print(test_out, base_plane[:, :KERNEL_SIZE[0], :KERNEL_SIZE[1]])
# # print(res[:, half_kernel[0], half_kernel[1], half_kernel[2], :])
# # print(res_nn[:, half_kernel[0], half_kernel[1], half_kernel[2], :])
# # print(res_nn, res, images_all, (base_plane[:, ::2, ::2, :] + 1)//2 )
# print(images, filters)
# print(res, res_nn)
self.assertShapeEqual(res.numpy(), res_nn)
self.assertAllClose(res, res_nn, rtol=1e-5)
@parameterized.parameters(
(1, 6, 1, 1, 1, 1, (3, 1, 1), (1, 1, 1)),
(1, 8, 13, 6, 3, 4, (3, 3, 3), (1, 1, 1)),
(2, 4, 6, 5, 2, 1, (5, 3, 3), (2, 2, 2)),
(3, 4, 6, 4, 2, 3, (2, 2, 1), (2, 2, 2)),
)
def testTransposeGradientFloat64(self, BATCH_SIZE, IMAGE_HEIGHT, IMAGE_WIDTH, IMAGE_DEPTH, IN_CHANNELS, OUT_CHANNELS, KERNEL_SIZE, DILATIONS_SIZE):
depth_factor = 2
out_depth = IMAGE_DEPTH*depth_factor
# tf.random.set_seed(np.random.randint(0, tf.int64.max))
test_strides = (1, 1, 1)
in_shape = np.array((IMAGE_HEIGHT, IMAGE_WIDTH, IMAGE_DEPTH))
out_shape = (in_shape + np.array(test_strides) - 1)//np.array(test_strides)
full_in_shape = np.array((IMAGE_HEIGHT, IMAGE_WIDTH, out_depth))
full_out_shape = (full_in_shape + np.array(test_strides) - 1)//np.array(test_strides)
# images_all = tf.random.uniform([BATCH_SIZE, *full_out_shape, OUT_CHANNELS], dtype=tf.float64)
# filters = tf.random.uniform([*KERNEL_SIZE, IN_CHANNELS, OUT_CHANNELS], dtype=images_all.dtype)
# base_plane = tf.random.uniform([BATCH_SIZE, in_shape[0], in_shape[1], 1], minval=0, maxval=(full_in_shape[2] - in_shape[2] + 1), dtype=tf.int32)
images_all = tf.ones([BATCH_SIZE, *full_out_shape, OUT_CHANNELS], dtype=tf.float64)
filters = tf.zeros([*KERNEL_SIZE, IN_CHANNELS, OUT_CHANNELS], dtype=images_all.dtype)
base_plane = tf.zeros([BATCH_SIZE, in_shape[0], in_shape[1], 1], dtype=tf.int32)
default_value = tf.zeros([], dtype=images_all.dtype)
strided_base_plane = base_plane[:, 0::test_strides[0], 0::test_strides[1], :]
strided_base_plane = (strided_base_plane + test_strides[2] - 1)//test_strides[2]
gather_indice = strided_base_plane + np.arange(0, (IMAGE_DEPTH + test_strides[2] - 1)//test_strides[2], dtype=np.int32)[None, None, None, :]
images = tf.gather_nd(images_all, gather_indice[..., None], batch_dims=3)
mask = tf.one_hot(gather_indice, full_out_shape[2], on_value=True, off_value=False, dtype=tf.bool)
mask = tf.reduce_any(mask, axis=-2)
images_all = tf.where(mask[..., None], images_all, default_value)
# cost_grad_perturbation = tf.random.uniform([BATCH_SIZE, *in_shape, IN_CHANNELS], dtype=images_all.dtype)
cost_grad_perturbation = tf.ones([BATCH_SIZE, *in_shape, IN_CHANNELS], dtype=images_all.dtype)
@tf.function
def test_check(*args):
cost = sparse_conv3d_transpose_fast(*args, default_value, base_plane, in_shape.astype(np.int32), dilations=DILATIONS_SIZE, dynamic_default=True, strides=test_strides)
return tf.reduce_sum(cost*cost_grad_perturbation)
with self.cached_session():
# res = sparse_conv2d(images, filters, base_plane, default_value, offsets)
theoretical, numerical = gradient_checker_v2.compute_gradient(test_check, [images, filters])
# err = gradient_checker_v2.max_error(theoretical, numerical)
# print(cost_grad_perturbation, images)
# print(theoretical[1], numerical[1])
self.assertAllClose(theoretical[0], numerical[0])
self.assertAllClose(theoretical[1], numerical[1])
# self.assertAllClose(theoretical[2], numerical[2])
# self.assertAllClose(theoretical[3], numerical[3])
if __name__ == "__main__":
test.main()
| 63.027778
| 241
| 0.657432
| 2,369
| 15,883
| 4.13339
| 0.080203
| 0.012868
| 0.012561
| 0.010212
| 0.872038
| 0.862132
| 0.850899
| 0.835886
| 0.816993
| 0.776859
| 0
| 0.042712
| 0.189259
| 15,883
| 252
| 242
| 63.027778
| 0.717714
| 0.251527
| 0
| 0.602564
| 0
| 0
| 0.003723
| 0
| 0
| 0
| 0
| 0
| 0.057692
| 1
| 0.038462
| false
| 0
| 0.051282
| 0
| 0.108974
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
ab6210646aeab375c008704e3fe6bf9aebed99a2
| 209
|
py
|
Python
|
features/tests/conftest.py
|
City-of-Helsinki/ah
|
1a00df3f68a59e067af1f030c381ec9b809074da
|
[
"MIT"
] | null | null | null |
features/tests/conftest.py
|
City-of-Helsinki/ah
|
1a00df3f68a59e067af1f030c381ec9b809074da
|
[
"MIT"
] | 50
|
2019-11-20T15:05:58.000Z
|
2021-09-22T18:05:07.000Z
|
features/tests/conftest.py
|
City-of-Helsinki/ahti
|
1a00df3f68a59e067af1f030c381ec9b809074da
|
[
"MIT"
] | null | null | null |
import pytest
from graphene.test import Client
from ahti.schema import schema
@pytest.fixture
def api_client():
return Client(schema=schema)
@pytest.fixture(autouse=True)
def autouse_db(db):
pass
| 13.933333
| 32
| 0.760766
| 30
| 209
| 5.233333
| 0.533333
| 0.152866
| 0.242038
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15311
| 209
| 14
| 33
| 14.928571
| 0.887006
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.222222
| false
| 0.111111
| 0.333333
| 0.111111
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 1
| 1
| 1
| 0
|
0
| 6
|
dbaa00feeead8303cbb5f13af453f8ae1291ec1b
| 95,942
|
py
|
Python
|
tests/examples/minlplib/catmix200.py
|
ouyang-w-19/decogo
|
52546480e49776251d4d27856e18a46f40c824a1
|
[
"MIT"
] | 2
|
2021-07-03T13:19:10.000Z
|
2022-02-06T10:48:13.000Z
|
tests/examples/minlplib/catmix200.py
|
ouyang-w-19/decogo
|
52546480e49776251d4d27856e18a46f40c824a1
|
[
"MIT"
] | 1
|
2021-07-04T14:52:14.000Z
|
2021-07-15T10:17:11.000Z
|
tests/examples/minlplib/catmix200.py
|
ouyang-w-19/decogo
|
52546480e49776251d4d27856e18a46f40c824a1
|
[
"MIT"
] | null | null | null |
# NLP written by GAMS Convert at 04/21/18 13:51:13
#
# Equation counts
# Total E G L N X C B
# 401 401 0 0 0 0 0 0
#
# Variable counts
# x b i s1s s2s sc si
# Total cont binary integer sos1 sos2 scont sint
# 604 604 0 0 0 0 0 0
# FX 2 2 0 0 0 0 0 0
#
# Nonzero counts
# Total const NL DLL
# 2403 3 2400 0
#
# Reformulation has removed 1 variable and 1 equation
from pyomo.environ import *
model = m = ConcreteModel()
m.x1 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x2 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x3 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x4 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x5 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x6 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x7 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x8 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x9 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x10 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x11 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x12 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x13 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x14 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x15 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x16 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x17 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x18 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x19 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x20 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x21 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x22 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x23 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x24 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x25 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x26 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x27 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x28 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x29 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x30 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x31 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x32 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x33 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x34 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x35 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x36 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x37 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x38 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x39 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x40 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x41 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x42 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x43 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x44 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x45 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x46 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x47 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x48 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x49 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x50 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x51 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x52 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x53 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x54 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x55 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x56 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x57 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x58 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x59 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x60 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x61 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x62 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x63 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x64 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x65 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x66 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x67 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x68 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x69 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x70 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x71 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x72 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x73 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x74 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x75 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x76 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x77 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x78 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x79 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x80 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x81 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x82 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x83 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x84 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x85 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x86 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x87 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x88 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x89 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x90 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x91 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x92 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x93 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x94 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x95 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x96 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x97 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x98 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x99 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x100 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x101 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x102 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x103 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x104 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x105 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x106 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x107 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x108 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x109 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x110 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x111 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x112 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x113 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x114 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x115 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x116 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x117 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x118 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x119 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x120 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x121 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x122 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x123 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x124 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x125 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x126 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x127 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x128 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x129 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x130 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x131 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x132 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x133 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x134 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x135 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x136 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x137 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x138 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x139 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x140 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x141 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x142 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x143 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x144 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x145 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x146 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x147 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x148 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x149 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x150 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x151 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x152 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x153 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x154 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x155 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x156 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x157 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x158 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x159 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x160 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x161 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x162 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x163 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x164 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x165 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x166 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x167 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x168 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x169 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x170 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x171 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x172 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x173 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x174 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x175 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x176 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x177 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x178 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x179 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x180 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x181 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x182 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x183 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x184 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x185 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x186 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x187 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x188 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x189 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x190 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x191 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x192 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x193 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x194 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x195 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x196 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x197 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x198 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x199 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x200 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x201 = Var(within=Reals,bounds=(0,1),initialize=0)
m.x202 = Var(within=Reals,bounds=(1,1),initialize=1)
m.x203 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x204 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x205 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x206 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x207 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x208 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x209 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x210 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x211 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x212 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x213 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x214 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x215 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x216 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x217 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x218 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x219 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x220 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x221 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x222 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x223 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x224 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x225 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x226 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x227 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x228 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x229 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x230 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x231 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x232 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x233 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x234 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x235 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x236 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x237 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x238 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x239 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x240 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x241 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x242 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x243 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x244 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x245 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x246 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x247 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x248 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x249 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x250 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x251 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x252 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x253 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x254 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x255 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x256 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x257 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x258 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x259 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x260 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x261 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x262 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x263 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x264 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x265 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x266 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x267 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x268 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x269 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x270 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x271 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x272 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x273 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x274 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x275 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x276 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x277 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x278 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x279 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x280 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x281 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x282 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x283 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x284 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x285 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x286 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x287 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x288 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x289 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x290 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x291 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x292 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x293 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x294 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x295 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x296 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x297 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x298 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x299 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x300 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x301 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x302 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x303 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x304 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x305 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x306 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x307 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x308 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x309 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x310 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x311 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x312 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x313 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x314 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x315 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x316 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x317 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x318 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x319 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x320 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x321 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x322 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x323 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x324 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x325 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x326 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x327 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x328 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x329 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x330 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x331 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x332 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x333 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x334 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x335 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x336 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x337 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x338 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x339 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x340 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x341 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x342 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x343 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x344 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x345 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x346 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x347 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x348 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x349 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x350 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x351 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x352 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x353 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x354 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x355 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x356 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x357 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x358 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x359 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x360 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x361 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x362 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x363 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x364 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x365 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x366 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x367 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x368 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x369 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x370 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x371 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x372 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x373 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x374 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x375 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x376 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x377 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x378 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x379 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x380 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x381 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x382 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x383 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x384 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x385 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x386 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x387 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x388 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x389 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x390 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x391 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x392 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x393 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x394 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x395 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x396 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x397 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x398 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x399 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x400 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x401 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x402 = Var(within=Reals,bounds=(None,None),initialize=1)
m.x403 = Var(within=Reals,bounds=(0,0),initialize=0)
m.x404 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x405 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x406 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x407 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x408 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x409 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x410 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x411 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x412 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x413 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x414 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x415 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x416 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x417 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x418 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x419 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x420 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x421 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x422 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x423 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x424 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x425 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x426 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x427 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x428 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x429 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x430 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x431 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x432 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x433 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x434 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x435 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x436 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x437 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x438 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x439 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x440 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x441 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x442 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x443 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x444 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x445 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x446 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x447 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x448 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x449 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x450 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x451 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x452 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x453 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x454 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x455 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x456 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x457 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x458 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x459 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x460 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x461 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x462 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x463 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x464 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x465 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x466 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x467 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x468 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x469 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x470 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x471 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x472 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x473 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x474 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x475 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x476 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x477 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x478 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x479 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x480 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x481 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x482 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x483 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x484 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x485 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x486 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x487 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x488 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x489 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x490 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x491 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x492 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x493 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x494 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x495 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x496 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x497 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x498 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x499 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x500 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x501 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x502 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x503 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x504 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x505 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x506 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x507 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x508 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x509 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x510 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x511 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x512 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x513 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x514 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x515 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x516 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x517 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x518 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x519 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x520 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x521 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x522 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x523 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x524 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x525 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x526 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x527 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x528 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x529 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x530 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x531 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x532 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x533 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x534 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x535 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x536 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x537 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x538 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x539 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x540 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x541 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x542 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x543 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x544 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x545 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x546 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x547 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x548 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x549 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x550 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x551 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x552 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x553 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x554 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x555 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x556 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x557 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x558 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x559 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x560 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x561 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x562 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x563 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x564 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x565 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x566 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x567 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x568 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x569 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x570 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x571 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x572 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x573 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x574 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x575 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x576 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x577 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x578 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x579 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x580 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x581 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x582 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x583 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x584 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x585 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x586 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x587 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x588 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x589 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x590 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x591 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x592 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x593 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x594 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x595 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x596 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x597 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x598 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x599 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x600 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x601 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x602 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x603 = Var(within=Reals,bounds=(None,None),initialize=0)
m.obj = Objective(expr= m.x402 + m.x603 - 1, sense=minimize)
m.c2 = Constraint(expr=m.x203 - (0.0025*(m.x1*(10*m.x403 - m.x202) + m.x2*(10*m.x404 - m.x203)) + m.x202) == 0)
m.c3 = Constraint(expr=m.x204 - (0.0025*(m.x2*(10*m.x404 - m.x203) + m.x3*(10*m.x405 - m.x204)) + m.x203) == 0)
m.c4 = Constraint(expr=m.x205 - (0.0025*(m.x3*(10*m.x405 - m.x204) + m.x4*(10*m.x406 - m.x205)) + m.x204) == 0)
m.c5 = Constraint(expr=m.x206 - (0.0025*(m.x4*(10*m.x406 - m.x205) + m.x5*(10*m.x407 - m.x206)) + m.x205) == 0)
m.c6 = Constraint(expr=m.x207 - (0.0025*(m.x5*(10*m.x407 - m.x206) + m.x6*(10*m.x408 - m.x207)) + m.x206) == 0)
m.c7 = Constraint(expr=m.x208 - (0.0025*(m.x6*(10*m.x408 - m.x207) + m.x7*(10*m.x409 - m.x208)) + m.x207) == 0)
m.c8 = Constraint(expr=m.x209 - (0.0025*(m.x7*(10*m.x409 - m.x208) + m.x8*(10*m.x410 - m.x209)) + m.x208) == 0)
m.c9 = Constraint(expr=m.x210 - (0.0025*(m.x8*(10*m.x410 - m.x209) + m.x9*(10*m.x411 - m.x210)) + m.x209) == 0)
m.c10 = Constraint(expr=m.x211 - (0.0025*(m.x9*(10*m.x411 - m.x210) + m.x10*(10*m.x412 - m.x211)) + m.x210) == 0)
m.c11 = Constraint(expr=m.x212 - (0.0025*(m.x10*(10*m.x412 - m.x211) + m.x11*(10*m.x413 - m.x212)) + m.x211) == 0)
m.c12 = Constraint(expr=m.x213 - (0.0025*(m.x11*(10*m.x413 - m.x212) + m.x12*(10*m.x414 - m.x213)) + m.x212) == 0)
m.c13 = Constraint(expr=m.x214 - (0.0025*(m.x12*(10*m.x414 - m.x213) + m.x13*(10*m.x415 - m.x214)) + m.x213) == 0)
m.c14 = Constraint(expr=m.x215 - (0.0025*(m.x13*(10*m.x415 - m.x214) + m.x14*(10*m.x416 - m.x215)) + m.x214) == 0)
m.c15 = Constraint(expr=m.x216 - (0.0025*(m.x14*(10*m.x416 - m.x215) + m.x15*(10*m.x417 - m.x216)) + m.x215) == 0)
m.c16 = Constraint(expr=m.x217 - (0.0025*(m.x15*(10*m.x417 - m.x216) + m.x16*(10*m.x418 - m.x217)) + m.x216) == 0)
m.c17 = Constraint(expr=m.x218 - (0.0025*(m.x16*(10*m.x418 - m.x217) + m.x17*(10*m.x419 - m.x218)) + m.x217) == 0)
m.c18 = Constraint(expr=m.x219 - (0.0025*(m.x17*(10*m.x419 - m.x218) + m.x18*(10*m.x420 - m.x219)) + m.x218) == 0)
m.c19 = Constraint(expr=m.x220 - (0.0025*(m.x18*(10*m.x420 - m.x219) + m.x19*(10*m.x421 - m.x220)) + m.x219) == 0)
m.c20 = Constraint(expr=m.x221 - (0.0025*(m.x19*(10*m.x421 - m.x220) + m.x20*(10*m.x422 - m.x221)) + m.x220) == 0)
m.c21 = Constraint(expr=m.x222 - (0.0025*(m.x20*(10*m.x422 - m.x221) + m.x21*(10*m.x423 - m.x222)) + m.x221) == 0)
m.c22 = Constraint(expr=m.x223 - (0.0025*(m.x21*(10*m.x423 - m.x222) + m.x22*(10*m.x424 - m.x223)) + m.x222) == 0)
m.c23 = Constraint(expr=m.x224 - (0.0025*(m.x22*(10*m.x424 - m.x223) + m.x23*(10*m.x425 - m.x224)) + m.x223) == 0)
m.c24 = Constraint(expr=m.x225 - (0.0025*(m.x23*(10*m.x425 - m.x224) + m.x24*(10*m.x426 - m.x225)) + m.x224) == 0)
m.c25 = Constraint(expr=m.x226 - (0.0025*(m.x24*(10*m.x426 - m.x225) + m.x25*(10*m.x427 - m.x226)) + m.x225) == 0)
m.c26 = Constraint(expr=m.x227 - (0.0025*(m.x25*(10*m.x427 - m.x226) + m.x26*(10*m.x428 - m.x227)) + m.x226) == 0)
m.c27 = Constraint(expr=m.x228 - (0.0025*(m.x26*(10*m.x428 - m.x227) + m.x27*(10*m.x429 - m.x228)) + m.x227) == 0)
m.c28 = Constraint(expr=m.x229 - (0.0025*(m.x27*(10*m.x429 - m.x228) + m.x28*(10*m.x430 - m.x229)) + m.x228) == 0)
m.c29 = Constraint(expr=m.x230 - (0.0025*(m.x28*(10*m.x430 - m.x229) + m.x29*(10*m.x431 - m.x230)) + m.x229) == 0)
m.c30 = Constraint(expr=m.x231 - (0.0025*(m.x29*(10*m.x431 - m.x230) + m.x30*(10*m.x432 - m.x231)) + m.x230) == 0)
m.c31 = Constraint(expr=m.x232 - (0.0025*(m.x30*(10*m.x432 - m.x231) + m.x31*(10*m.x433 - m.x232)) + m.x231) == 0)
m.c32 = Constraint(expr=m.x233 - (0.0025*(m.x31*(10*m.x433 - m.x232) + m.x32*(10*m.x434 - m.x233)) + m.x232) == 0)
m.c33 = Constraint(expr=m.x234 - (0.0025*(m.x32*(10*m.x434 - m.x233) + m.x33*(10*m.x435 - m.x234)) + m.x233) == 0)
m.c34 = Constraint(expr=m.x235 - (0.0025*(m.x33*(10*m.x435 - m.x234) + m.x34*(10*m.x436 - m.x235)) + m.x234) == 0)
m.c35 = Constraint(expr=m.x236 - (0.0025*(m.x34*(10*m.x436 - m.x235) + m.x35*(10*m.x437 - m.x236)) + m.x235) == 0)
m.c36 = Constraint(expr=m.x237 - (0.0025*(m.x35*(10*m.x437 - m.x236) + m.x36*(10*m.x438 - m.x237)) + m.x236) == 0)
m.c37 = Constraint(expr=m.x238 - (0.0025*(m.x36*(10*m.x438 - m.x237) + m.x37*(10*m.x439 - m.x238)) + m.x237) == 0)
m.c38 = Constraint(expr=m.x239 - (0.0025*(m.x37*(10*m.x439 - m.x238) + m.x38*(10*m.x440 - m.x239)) + m.x238) == 0)
m.c39 = Constraint(expr=m.x240 - (0.0025*(m.x38*(10*m.x440 - m.x239) + m.x39*(10*m.x441 - m.x240)) + m.x239) == 0)
m.c40 = Constraint(expr=m.x241 - (0.0025*(m.x39*(10*m.x441 - m.x240) + m.x40*(10*m.x442 - m.x241)) + m.x240) == 0)
m.c41 = Constraint(expr=m.x242 - (0.0025*(m.x40*(10*m.x442 - m.x241) + m.x41*(10*m.x443 - m.x242)) + m.x241) == 0)
m.c42 = Constraint(expr=m.x243 - (0.0025*(m.x41*(10*m.x443 - m.x242) + m.x42*(10*m.x444 - m.x243)) + m.x242) == 0)
m.c43 = Constraint(expr=m.x244 - (0.0025*(m.x42*(10*m.x444 - m.x243) + m.x43*(10*m.x445 - m.x244)) + m.x243) == 0)
m.c44 = Constraint(expr=m.x245 - (0.0025*(m.x43*(10*m.x445 - m.x244) + m.x44*(10*m.x446 - m.x245)) + m.x244) == 0)
m.c45 = Constraint(expr=m.x246 - (0.0025*(m.x44*(10*m.x446 - m.x245) + m.x45*(10*m.x447 - m.x246)) + m.x245) == 0)
m.c46 = Constraint(expr=m.x247 - (0.0025*(m.x45*(10*m.x447 - m.x246) + m.x46*(10*m.x448 - m.x247)) + m.x246) == 0)
m.c47 = Constraint(expr=m.x248 - (0.0025*(m.x46*(10*m.x448 - m.x247) + m.x47*(10*m.x449 - m.x248)) + m.x247) == 0)
m.c48 = Constraint(expr=m.x249 - (0.0025*(m.x47*(10*m.x449 - m.x248) + m.x48*(10*m.x450 - m.x249)) + m.x248) == 0)
m.c49 = Constraint(expr=m.x250 - (0.0025*(m.x48*(10*m.x450 - m.x249) + m.x49*(10*m.x451 - m.x250)) + m.x249) == 0)
m.c50 = Constraint(expr=m.x251 - (0.0025*(m.x49*(10*m.x451 - m.x250) + m.x50*(10*m.x452 - m.x251)) + m.x250) == 0)
m.c51 = Constraint(expr=m.x252 - (0.0025*(m.x50*(10*m.x452 - m.x251) + m.x51*(10*m.x453 - m.x252)) + m.x251) == 0)
m.c52 = Constraint(expr=m.x253 - (0.0025*(m.x51*(10*m.x453 - m.x252) + m.x52*(10*m.x454 - m.x253)) + m.x252) == 0)
m.c53 = Constraint(expr=m.x254 - (0.0025*(m.x52*(10*m.x454 - m.x253) + m.x53*(10*m.x455 - m.x254)) + m.x253) == 0)
m.c54 = Constraint(expr=m.x255 - (0.0025*(m.x53*(10*m.x455 - m.x254) + m.x54*(10*m.x456 - m.x255)) + m.x254) == 0)
m.c55 = Constraint(expr=m.x256 - (0.0025*(m.x54*(10*m.x456 - m.x255) + m.x55*(10*m.x457 - m.x256)) + m.x255) == 0)
m.c56 = Constraint(expr=m.x257 - (0.0025*(m.x55*(10*m.x457 - m.x256) + m.x56*(10*m.x458 - m.x257)) + m.x256) == 0)
m.c57 = Constraint(expr=m.x258 - (0.0025*(m.x56*(10*m.x458 - m.x257) + m.x57*(10*m.x459 - m.x258)) + m.x257) == 0)
m.c58 = Constraint(expr=m.x259 - (0.0025*(m.x57*(10*m.x459 - m.x258) + m.x58*(10*m.x460 - m.x259)) + m.x258) == 0)
m.c59 = Constraint(expr=m.x260 - (0.0025*(m.x58*(10*m.x460 - m.x259) + m.x59*(10*m.x461 - m.x260)) + m.x259) == 0)
m.c60 = Constraint(expr=m.x261 - (0.0025*(m.x59*(10*m.x461 - m.x260) + m.x60*(10*m.x462 - m.x261)) + m.x260) == 0)
m.c61 = Constraint(expr=m.x262 - (0.0025*(m.x60*(10*m.x462 - m.x261) + m.x61*(10*m.x463 - m.x262)) + m.x261) == 0)
m.c62 = Constraint(expr=m.x263 - (0.0025*(m.x61*(10*m.x463 - m.x262) + m.x62*(10*m.x464 - m.x263)) + m.x262) == 0)
m.c63 = Constraint(expr=m.x264 - (0.0025*(m.x62*(10*m.x464 - m.x263) + m.x63*(10*m.x465 - m.x264)) + m.x263) == 0)
m.c64 = Constraint(expr=m.x265 - (0.0025*(m.x63*(10*m.x465 - m.x264) + m.x64*(10*m.x466 - m.x265)) + m.x264) == 0)
m.c65 = Constraint(expr=m.x266 - (0.0025*(m.x64*(10*m.x466 - m.x265) + m.x65*(10*m.x467 - m.x266)) + m.x265) == 0)
m.c66 = Constraint(expr=m.x267 - (0.0025*(m.x65*(10*m.x467 - m.x266) + m.x66*(10*m.x468 - m.x267)) + m.x266) == 0)
m.c67 = Constraint(expr=m.x268 - (0.0025*(m.x66*(10*m.x468 - m.x267) + m.x67*(10*m.x469 - m.x268)) + m.x267) == 0)
m.c68 = Constraint(expr=m.x269 - (0.0025*(m.x67*(10*m.x469 - m.x268) + m.x68*(10*m.x470 - m.x269)) + m.x268) == 0)
m.c69 = Constraint(expr=m.x270 - (0.0025*(m.x68*(10*m.x470 - m.x269) + m.x69*(10*m.x471 - m.x270)) + m.x269) == 0)
m.c70 = Constraint(expr=m.x271 - (0.0025*(m.x69*(10*m.x471 - m.x270) + m.x70*(10*m.x472 - m.x271)) + m.x270) == 0)
m.c71 = Constraint(expr=m.x272 - (0.0025*(m.x70*(10*m.x472 - m.x271) + m.x71*(10*m.x473 - m.x272)) + m.x271) == 0)
m.c72 = Constraint(expr=m.x273 - (0.0025*(m.x71*(10*m.x473 - m.x272) + m.x72*(10*m.x474 - m.x273)) + m.x272) == 0)
m.c73 = Constraint(expr=m.x274 - (0.0025*(m.x72*(10*m.x474 - m.x273) + m.x73*(10*m.x475 - m.x274)) + m.x273) == 0)
m.c74 = Constraint(expr=m.x275 - (0.0025*(m.x73*(10*m.x475 - m.x274) + m.x74*(10*m.x476 - m.x275)) + m.x274) == 0)
m.c75 = Constraint(expr=m.x276 - (0.0025*(m.x74*(10*m.x476 - m.x275) + m.x75*(10*m.x477 - m.x276)) + m.x275) == 0)
m.c76 = Constraint(expr=m.x277 - (0.0025*(m.x75*(10*m.x477 - m.x276) + m.x76*(10*m.x478 - m.x277)) + m.x276) == 0)
m.c77 = Constraint(expr=m.x278 - (0.0025*(m.x76*(10*m.x478 - m.x277) + m.x77*(10*m.x479 - m.x278)) + m.x277) == 0)
m.c78 = Constraint(expr=m.x279 - (0.0025*(m.x77*(10*m.x479 - m.x278) + m.x78*(10*m.x480 - m.x279)) + m.x278) == 0)
m.c79 = Constraint(expr=m.x280 - (0.0025*(m.x78*(10*m.x480 - m.x279) + m.x79*(10*m.x481 - m.x280)) + m.x279) == 0)
m.c80 = Constraint(expr=m.x281 - (0.0025*(m.x79*(10*m.x481 - m.x280) + m.x80*(10*m.x482 - m.x281)) + m.x280) == 0)
m.c81 = Constraint(expr=m.x282 - (0.0025*(m.x80*(10*m.x482 - m.x281) + m.x81*(10*m.x483 - m.x282)) + m.x281) == 0)
m.c82 = Constraint(expr=m.x283 - (0.0025*(m.x81*(10*m.x483 - m.x282) + m.x82*(10*m.x484 - m.x283)) + m.x282) == 0)
m.c83 = Constraint(expr=m.x284 - (0.0025*(m.x82*(10*m.x484 - m.x283) + m.x83*(10*m.x485 - m.x284)) + m.x283) == 0)
m.c84 = Constraint(expr=m.x285 - (0.0025*(m.x83*(10*m.x485 - m.x284) + m.x84*(10*m.x486 - m.x285)) + m.x284) == 0)
m.c85 = Constraint(expr=m.x286 - (0.0025*(m.x84*(10*m.x486 - m.x285) + m.x85*(10*m.x487 - m.x286)) + m.x285) == 0)
m.c86 = Constraint(expr=m.x287 - (0.0025*(m.x85*(10*m.x487 - m.x286) + m.x86*(10*m.x488 - m.x287)) + m.x286) == 0)
m.c87 = Constraint(expr=m.x288 - (0.0025*(m.x86*(10*m.x488 - m.x287) + m.x87*(10*m.x489 - m.x288)) + m.x287) == 0)
m.c88 = Constraint(expr=m.x289 - (0.0025*(m.x87*(10*m.x489 - m.x288) + m.x88*(10*m.x490 - m.x289)) + m.x288) == 0)
m.c89 = Constraint(expr=m.x290 - (0.0025*(m.x88*(10*m.x490 - m.x289) + m.x89*(10*m.x491 - m.x290)) + m.x289) == 0)
m.c90 = Constraint(expr=m.x291 - (0.0025*(m.x89*(10*m.x491 - m.x290) + m.x90*(10*m.x492 - m.x291)) + m.x290) == 0)
m.c91 = Constraint(expr=m.x292 - (0.0025*(m.x90*(10*m.x492 - m.x291) + m.x91*(10*m.x493 - m.x292)) + m.x291) == 0)
m.c92 = Constraint(expr=m.x293 - (0.0025*(m.x91*(10*m.x493 - m.x292) + m.x92*(10*m.x494 - m.x293)) + m.x292) == 0)
m.c93 = Constraint(expr=m.x294 - (0.0025*(m.x92*(10*m.x494 - m.x293) + m.x93*(10*m.x495 - m.x294)) + m.x293) == 0)
m.c94 = Constraint(expr=m.x295 - (0.0025*(m.x93*(10*m.x495 - m.x294) + m.x94*(10*m.x496 - m.x295)) + m.x294) == 0)
m.c95 = Constraint(expr=m.x296 - (0.0025*(m.x94*(10*m.x496 - m.x295) + m.x95*(10*m.x497 - m.x296)) + m.x295) == 0)
m.c96 = Constraint(expr=m.x297 - (0.0025*(m.x95*(10*m.x497 - m.x296) + m.x96*(10*m.x498 - m.x297)) + m.x296) == 0)
m.c97 = Constraint(expr=m.x298 - (0.0025*(m.x96*(10*m.x498 - m.x297) + m.x97*(10*m.x499 - m.x298)) + m.x297) == 0)
m.c98 = Constraint(expr=m.x299 - (0.0025*(m.x97*(10*m.x499 - m.x298) + m.x98*(10*m.x500 - m.x299)) + m.x298) == 0)
m.c99 = Constraint(expr=m.x300 - (0.0025*(m.x98*(10*m.x500 - m.x299) + m.x99*(10*m.x501 - m.x300)) + m.x299) == 0)
m.c100 = Constraint(expr=m.x301 - (0.0025*(m.x99*(10*m.x501 - m.x300) + m.x100*(10*m.x502 - m.x301)) + m.x300) == 0)
m.c101 = Constraint(expr=m.x302 - (0.0025*(m.x100*(10*m.x502 - m.x301) + m.x101*(10*m.x503 - m.x302)) + m.x301) == 0)
m.c102 = Constraint(expr=m.x303 - (0.0025*(m.x101*(10*m.x503 - m.x302) + m.x102*(10*m.x504 - m.x303)) + m.x302) == 0)
m.c103 = Constraint(expr=m.x304 - (0.0025*(m.x102*(10*m.x504 - m.x303) + m.x103*(10*m.x505 - m.x304)) + m.x303) == 0)
m.c104 = Constraint(expr=m.x305 - (0.0025*(m.x103*(10*m.x505 - m.x304) + m.x104*(10*m.x506 - m.x305)) + m.x304) == 0)
m.c105 = Constraint(expr=m.x306 - (0.0025*(m.x104*(10*m.x506 - m.x305) + m.x105*(10*m.x507 - m.x306)) + m.x305) == 0)
m.c106 = Constraint(expr=m.x307 - (0.0025*(m.x105*(10*m.x507 - m.x306) + m.x106*(10*m.x508 - m.x307)) + m.x306) == 0)
m.c107 = Constraint(expr=m.x308 - (0.0025*(m.x106*(10*m.x508 - m.x307) + m.x107*(10*m.x509 - m.x308)) + m.x307) == 0)
m.c108 = Constraint(expr=m.x309 - (0.0025*(m.x107*(10*m.x509 - m.x308) + m.x108*(10*m.x510 - m.x309)) + m.x308) == 0)
m.c109 = Constraint(expr=m.x310 - (0.0025*(m.x108*(10*m.x510 - m.x309) + m.x109*(10*m.x511 - m.x310)) + m.x309) == 0)
m.c110 = Constraint(expr=m.x311 - (0.0025*(m.x109*(10*m.x511 - m.x310) + m.x110*(10*m.x512 - m.x311)) + m.x310) == 0)
m.c111 = Constraint(expr=m.x312 - (0.0025*(m.x110*(10*m.x512 - m.x311) + m.x111*(10*m.x513 - m.x312)) + m.x311) == 0)
m.c112 = Constraint(expr=m.x313 - (0.0025*(m.x111*(10*m.x513 - m.x312) + m.x112*(10*m.x514 - m.x313)) + m.x312) == 0)
m.c113 = Constraint(expr=m.x314 - (0.0025*(m.x112*(10*m.x514 - m.x313) + m.x113*(10*m.x515 - m.x314)) + m.x313) == 0)
m.c114 = Constraint(expr=m.x315 - (0.0025*(m.x113*(10*m.x515 - m.x314) + m.x114*(10*m.x516 - m.x315)) + m.x314) == 0)
m.c115 = Constraint(expr=m.x316 - (0.0025*(m.x114*(10*m.x516 - m.x315) + m.x115*(10*m.x517 - m.x316)) + m.x315) == 0)
m.c116 = Constraint(expr=m.x317 - (0.0025*(m.x115*(10*m.x517 - m.x316) + m.x116*(10*m.x518 - m.x317)) + m.x316) == 0)
m.c117 = Constraint(expr=m.x318 - (0.0025*(m.x116*(10*m.x518 - m.x317) + m.x117*(10*m.x519 - m.x318)) + m.x317) == 0)
m.c118 = Constraint(expr=m.x319 - (0.0025*(m.x117*(10*m.x519 - m.x318) + m.x118*(10*m.x520 - m.x319)) + m.x318) == 0)
m.c119 = Constraint(expr=m.x320 - (0.0025*(m.x118*(10*m.x520 - m.x319) + m.x119*(10*m.x521 - m.x320)) + m.x319) == 0)
m.c120 = Constraint(expr=m.x321 - (0.0025*(m.x119*(10*m.x521 - m.x320) + m.x120*(10*m.x522 - m.x321)) + m.x320) == 0)
m.c121 = Constraint(expr=m.x322 - (0.0025*(m.x120*(10*m.x522 - m.x321) + m.x121*(10*m.x523 - m.x322)) + m.x321) == 0)
m.c122 = Constraint(expr=m.x323 - (0.0025*(m.x121*(10*m.x523 - m.x322) + m.x122*(10*m.x524 - m.x323)) + m.x322) == 0)
m.c123 = Constraint(expr=m.x324 - (0.0025*(m.x122*(10*m.x524 - m.x323) + m.x123*(10*m.x525 - m.x324)) + m.x323) == 0)
m.c124 = Constraint(expr=m.x325 - (0.0025*(m.x123*(10*m.x525 - m.x324) + m.x124*(10*m.x526 - m.x325)) + m.x324) == 0)
m.c125 = Constraint(expr=m.x326 - (0.0025*(m.x124*(10*m.x526 - m.x325) + m.x125*(10*m.x527 - m.x326)) + m.x325) == 0)
m.c126 = Constraint(expr=m.x327 - (0.0025*(m.x125*(10*m.x527 - m.x326) + m.x126*(10*m.x528 - m.x327)) + m.x326) == 0)
m.c127 = Constraint(expr=m.x328 - (0.0025*(m.x126*(10*m.x528 - m.x327) + m.x127*(10*m.x529 - m.x328)) + m.x327) == 0)
m.c128 = Constraint(expr=m.x329 - (0.0025*(m.x127*(10*m.x529 - m.x328) + m.x128*(10*m.x530 - m.x329)) + m.x328) == 0)
m.c129 = Constraint(expr=m.x330 - (0.0025*(m.x128*(10*m.x530 - m.x329) + m.x129*(10*m.x531 - m.x330)) + m.x329) == 0)
m.c130 = Constraint(expr=m.x331 - (0.0025*(m.x129*(10*m.x531 - m.x330) + m.x130*(10*m.x532 - m.x331)) + m.x330) == 0)
m.c131 = Constraint(expr=m.x332 - (0.0025*(m.x130*(10*m.x532 - m.x331) + m.x131*(10*m.x533 - m.x332)) + m.x331) == 0)
m.c132 = Constraint(expr=m.x333 - (0.0025*(m.x131*(10*m.x533 - m.x332) + m.x132*(10*m.x534 - m.x333)) + m.x332) == 0)
m.c133 = Constraint(expr=m.x334 - (0.0025*(m.x132*(10*m.x534 - m.x333) + m.x133*(10*m.x535 - m.x334)) + m.x333) == 0)
m.c134 = Constraint(expr=m.x335 - (0.0025*(m.x133*(10*m.x535 - m.x334) + m.x134*(10*m.x536 - m.x335)) + m.x334) == 0)
m.c135 = Constraint(expr=m.x336 - (0.0025*(m.x134*(10*m.x536 - m.x335) + m.x135*(10*m.x537 - m.x336)) + m.x335) == 0)
m.c136 = Constraint(expr=m.x337 - (0.0025*(m.x135*(10*m.x537 - m.x336) + m.x136*(10*m.x538 - m.x337)) + m.x336) == 0)
m.c137 = Constraint(expr=m.x338 - (0.0025*(m.x136*(10*m.x538 - m.x337) + m.x137*(10*m.x539 - m.x338)) + m.x337) == 0)
m.c138 = Constraint(expr=m.x339 - (0.0025*(m.x137*(10*m.x539 - m.x338) + m.x138*(10*m.x540 - m.x339)) + m.x338) == 0)
m.c139 = Constraint(expr=m.x340 - (0.0025*(m.x138*(10*m.x540 - m.x339) + m.x139*(10*m.x541 - m.x340)) + m.x339) == 0)
m.c140 = Constraint(expr=m.x341 - (0.0025*(m.x139*(10*m.x541 - m.x340) + m.x140*(10*m.x542 - m.x341)) + m.x340) == 0)
m.c141 = Constraint(expr=m.x342 - (0.0025*(m.x140*(10*m.x542 - m.x341) + m.x141*(10*m.x543 - m.x342)) + m.x341) == 0)
m.c142 = Constraint(expr=m.x343 - (0.0025*(m.x141*(10*m.x543 - m.x342) + m.x142*(10*m.x544 - m.x343)) + m.x342) == 0)
m.c143 = Constraint(expr=m.x344 - (0.0025*(m.x142*(10*m.x544 - m.x343) + m.x143*(10*m.x545 - m.x344)) + m.x343) == 0)
m.c144 = Constraint(expr=m.x345 - (0.0025*(m.x143*(10*m.x545 - m.x344) + m.x144*(10*m.x546 - m.x345)) + m.x344) == 0)
m.c145 = Constraint(expr=m.x346 - (0.0025*(m.x144*(10*m.x546 - m.x345) + m.x145*(10*m.x547 - m.x346)) + m.x345) == 0)
m.c146 = Constraint(expr=m.x347 - (0.0025*(m.x145*(10*m.x547 - m.x346) + m.x146*(10*m.x548 - m.x347)) + m.x346) == 0)
m.c147 = Constraint(expr=m.x348 - (0.0025*(m.x146*(10*m.x548 - m.x347) + m.x147*(10*m.x549 - m.x348)) + m.x347) == 0)
m.c148 = Constraint(expr=m.x349 - (0.0025*(m.x147*(10*m.x549 - m.x348) + m.x148*(10*m.x550 - m.x349)) + m.x348) == 0)
m.c149 = Constraint(expr=m.x350 - (0.0025*(m.x148*(10*m.x550 - m.x349) + m.x149*(10*m.x551 - m.x350)) + m.x349) == 0)
m.c150 = Constraint(expr=m.x351 - (0.0025*(m.x149*(10*m.x551 - m.x350) + m.x150*(10*m.x552 - m.x351)) + m.x350) == 0)
m.c151 = Constraint(expr=m.x352 - (0.0025*(m.x150*(10*m.x552 - m.x351) + m.x151*(10*m.x553 - m.x352)) + m.x351) == 0)
m.c152 = Constraint(expr=m.x353 - (0.0025*(m.x151*(10*m.x553 - m.x352) + m.x152*(10*m.x554 - m.x353)) + m.x352) == 0)
m.c153 = Constraint(expr=m.x354 - (0.0025*(m.x152*(10*m.x554 - m.x353) + m.x153*(10*m.x555 - m.x354)) + m.x353) == 0)
m.c154 = Constraint(expr=m.x355 - (0.0025*(m.x153*(10*m.x555 - m.x354) + m.x154*(10*m.x556 - m.x355)) + m.x354) == 0)
m.c155 = Constraint(expr=m.x356 - (0.0025*(m.x154*(10*m.x556 - m.x355) + m.x155*(10*m.x557 - m.x356)) + m.x355) == 0)
m.c156 = Constraint(expr=m.x357 - (0.0025*(m.x155*(10*m.x557 - m.x356) + m.x156*(10*m.x558 - m.x357)) + m.x356) == 0)
m.c157 = Constraint(expr=m.x358 - (0.0025*(m.x156*(10*m.x558 - m.x357) + m.x157*(10*m.x559 - m.x358)) + m.x357) == 0)
m.c158 = Constraint(expr=m.x359 - (0.0025*(m.x157*(10*m.x559 - m.x358) + m.x158*(10*m.x560 - m.x359)) + m.x358) == 0)
m.c159 = Constraint(expr=m.x360 - (0.0025*(m.x158*(10*m.x560 - m.x359) + m.x159*(10*m.x561 - m.x360)) + m.x359) == 0)
m.c160 = Constraint(expr=m.x361 - (0.0025*(m.x159*(10*m.x561 - m.x360) + m.x160*(10*m.x562 - m.x361)) + m.x360) == 0)
m.c161 = Constraint(expr=m.x362 - (0.0025*(m.x160*(10*m.x562 - m.x361) + m.x161*(10*m.x563 - m.x362)) + m.x361) == 0)
m.c162 = Constraint(expr=m.x363 - (0.0025*(m.x161*(10*m.x563 - m.x362) + m.x162*(10*m.x564 - m.x363)) + m.x362) == 0)
m.c163 = Constraint(expr=m.x364 - (0.0025*(m.x162*(10*m.x564 - m.x363) + m.x163*(10*m.x565 - m.x364)) + m.x363) == 0)
m.c164 = Constraint(expr=m.x365 - (0.0025*(m.x163*(10*m.x565 - m.x364) + m.x164*(10*m.x566 - m.x365)) + m.x364) == 0)
m.c165 = Constraint(expr=m.x366 - (0.0025*(m.x164*(10*m.x566 - m.x365) + m.x165*(10*m.x567 - m.x366)) + m.x365) == 0)
m.c166 = Constraint(expr=m.x367 - (0.0025*(m.x165*(10*m.x567 - m.x366) + m.x166*(10*m.x568 - m.x367)) + m.x366) == 0)
m.c167 = Constraint(expr=m.x368 - (0.0025*(m.x166*(10*m.x568 - m.x367) + m.x167*(10*m.x569 - m.x368)) + m.x367) == 0)
m.c168 = Constraint(expr=m.x369 - (0.0025*(m.x167*(10*m.x569 - m.x368) + m.x168*(10*m.x570 - m.x369)) + m.x368) == 0)
m.c169 = Constraint(expr=m.x370 - (0.0025*(m.x168*(10*m.x570 - m.x369) + m.x169*(10*m.x571 - m.x370)) + m.x369) == 0)
m.c170 = Constraint(expr=m.x371 - (0.0025*(m.x169*(10*m.x571 - m.x370) + m.x170*(10*m.x572 - m.x371)) + m.x370) == 0)
m.c171 = Constraint(expr=m.x372 - (0.0025*(m.x170*(10*m.x572 - m.x371) + m.x171*(10*m.x573 - m.x372)) + m.x371) == 0)
m.c172 = Constraint(expr=m.x373 - (0.0025*(m.x171*(10*m.x573 - m.x372) + m.x172*(10*m.x574 - m.x373)) + m.x372) == 0)
m.c173 = Constraint(expr=m.x374 - (0.0025*(m.x172*(10*m.x574 - m.x373) + m.x173*(10*m.x575 - m.x374)) + m.x373) == 0)
m.c174 = Constraint(expr=m.x375 - (0.0025*(m.x173*(10*m.x575 - m.x374) + m.x174*(10*m.x576 - m.x375)) + m.x374) == 0)
m.c175 = Constraint(expr=m.x376 - (0.0025*(m.x174*(10*m.x576 - m.x375) + m.x175*(10*m.x577 - m.x376)) + m.x375) == 0)
m.c176 = Constraint(expr=m.x377 - (0.0025*(m.x175*(10*m.x577 - m.x376) + m.x176*(10*m.x578 - m.x377)) + m.x376) == 0)
m.c177 = Constraint(expr=m.x378 - (0.0025*(m.x176*(10*m.x578 - m.x377) + m.x177*(10*m.x579 - m.x378)) + m.x377) == 0)
m.c178 = Constraint(expr=m.x379 - (0.0025*(m.x177*(10*m.x579 - m.x378) + m.x178*(10*m.x580 - m.x379)) + m.x378) == 0)
m.c179 = Constraint(expr=m.x380 - (0.0025*(m.x178*(10*m.x580 - m.x379) + m.x179*(10*m.x581 - m.x380)) + m.x379) == 0)
m.c180 = Constraint(expr=m.x381 - (0.0025*(m.x179*(10*m.x581 - m.x380) + m.x180*(10*m.x582 - m.x381)) + m.x380) == 0)
m.c181 = Constraint(expr=m.x382 - (0.0025*(m.x180*(10*m.x582 - m.x381) + m.x181*(10*m.x583 - m.x382)) + m.x381) == 0)
m.c182 = Constraint(expr=m.x383 - (0.0025*(m.x181*(10*m.x583 - m.x382) + m.x182*(10*m.x584 - m.x383)) + m.x382) == 0)
m.c183 = Constraint(expr=m.x384 - (0.0025*(m.x182*(10*m.x584 - m.x383) + m.x183*(10*m.x585 - m.x384)) + m.x383) == 0)
m.c184 = Constraint(expr=m.x385 - (0.0025*(m.x183*(10*m.x585 - m.x384) + m.x184*(10*m.x586 - m.x385)) + m.x384) == 0)
m.c185 = Constraint(expr=m.x386 - (0.0025*(m.x184*(10*m.x586 - m.x385) + m.x185*(10*m.x587 - m.x386)) + m.x385) == 0)
m.c186 = Constraint(expr=m.x387 - (0.0025*(m.x185*(10*m.x587 - m.x386) + m.x186*(10*m.x588 - m.x387)) + m.x386) == 0)
m.c187 = Constraint(expr=m.x388 - (0.0025*(m.x186*(10*m.x588 - m.x387) + m.x187*(10*m.x589 - m.x388)) + m.x387) == 0)
m.c188 = Constraint(expr=m.x389 - (0.0025*(m.x187*(10*m.x589 - m.x388) + m.x188*(10*m.x590 - m.x389)) + m.x388) == 0)
m.c189 = Constraint(expr=m.x390 - (0.0025*(m.x188*(10*m.x590 - m.x389) + m.x189*(10*m.x591 - m.x390)) + m.x389) == 0)
m.c190 = Constraint(expr=m.x391 - (0.0025*(m.x189*(10*m.x591 - m.x390) + m.x190*(10*m.x592 - m.x391)) + m.x390) == 0)
m.c191 = Constraint(expr=m.x392 - (0.0025*(m.x190*(10*m.x592 - m.x391) + m.x191*(10*m.x593 - m.x392)) + m.x391) == 0)
m.c192 = Constraint(expr=m.x393 - (0.0025*(m.x191*(10*m.x593 - m.x392) + m.x192*(10*m.x594 - m.x393)) + m.x392) == 0)
m.c193 = Constraint(expr=m.x394 - (0.0025*(m.x192*(10*m.x594 - m.x393) + m.x193*(10*m.x595 - m.x394)) + m.x393) == 0)
m.c194 = Constraint(expr=m.x395 - (0.0025*(m.x193*(10*m.x595 - m.x394) + m.x194*(10*m.x596 - m.x395)) + m.x394) == 0)
m.c195 = Constraint(expr=m.x396 - (0.0025*(m.x194*(10*m.x596 - m.x395) + m.x195*(10*m.x597 - m.x396)) + m.x395) == 0)
m.c196 = Constraint(expr=m.x397 - (0.0025*(m.x195*(10*m.x597 - m.x396) + m.x196*(10*m.x598 - m.x397)) + m.x396) == 0)
m.c197 = Constraint(expr=m.x398 - (0.0025*(m.x196*(10*m.x598 - m.x397) + m.x197*(10*m.x599 - m.x398)) + m.x397) == 0)
m.c198 = Constraint(expr=m.x399 - (0.0025*(m.x197*(10*m.x599 - m.x398) + m.x198*(10*m.x600 - m.x399)) + m.x398) == 0)
m.c199 = Constraint(expr=m.x400 - (0.0025*(m.x198*(10*m.x600 - m.x399) + m.x199*(10*m.x601 - m.x400)) + m.x399) == 0)
m.c200 = Constraint(expr=m.x401 - (0.0025*(m.x199*(10*m.x601 - m.x400) + m.x200*(10*m.x602 - m.x401)) + m.x400) == 0)
m.c201 = Constraint(expr=m.x402 - (0.0025*(m.x200*(10*m.x602 - m.x401) + m.x201*(10*m.x603 - m.x402)) + m.x401) == 0)
m.c202 = Constraint(expr=m.x404 - (0.0025*(m.x1*(m.x202 - 10*m.x403) - (1 - m.x1)*m.x403 + m.x2*(m.x203 - 10*m.x404) - (
1 - m.x2)*m.x404) + m.x403) == 0)
m.c203 = Constraint(expr=m.x405 - (0.0025*(m.x2*(m.x203 - 10*m.x404) - (1 - m.x2)*m.x404 + m.x3*(m.x204 - 10*m.x405) - (
1 - m.x3)*m.x405) + m.x404) == 0)
m.c204 = Constraint(expr=m.x406 - (0.0025*(m.x3*(m.x204 - 10*m.x405) - (1 - m.x3)*m.x405 + m.x4*(m.x205 - 10*m.x406) - (
1 - m.x4)*m.x406) + m.x405) == 0)
m.c205 = Constraint(expr=m.x407 - (0.0025*(m.x4*(m.x205 - 10*m.x406) - (1 - m.x4)*m.x406 + m.x5*(m.x206 - 10*m.x407) - (
1 - m.x5)*m.x407) + m.x406) == 0)
m.c206 = Constraint(expr=m.x408 - (0.0025*(m.x5*(m.x206 - 10*m.x407) - (1 - m.x5)*m.x407 + m.x6*(m.x207 - 10*m.x408) - (
1 - m.x6)*m.x408) + m.x407) == 0)
m.c207 = Constraint(expr=m.x409 - (0.0025*(m.x6*(m.x207 - 10*m.x408) - (1 - m.x6)*m.x408 + m.x7*(m.x208 - 10*m.x409) - (
1 - m.x7)*m.x409) + m.x408) == 0)
m.c208 = Constraint(expr=m.x410 - (0.0025*(m.x7*(m.x208 - 10*m.x409) - (1 - m.x7)*m.x409 + m.x8*(m.x209 - 10*m.x410) - (
1 - m.x8)*m.x410) + m.x409) == 0)
m.c209 = Constraint(expr=m.x411 - (0.0025*(m.x8*(m.x209 - 10*m.x410) - (1 - m.x8)*m.x410 + m.x9*(m.x210 - 10*m.x411) - (
1 - m.x9)*m.x411) + m.x410) == 0)
m.c210 = Constraint(expr=m.x412 - (0.0025*(m.x9*(m.x210 - 10*m.x411) - (1 - m.x9)*m.x411 + m.x10*(m.x211 - 10*m.x412) -
(1 - m.x10)*m.x412) + m.x411) == 0)
m.c211 = Constraint(expr=m.x413 - (0.0025*(m.x10*(m.x211 - 10*m.x412) - (1 - m.x10)*m.x412 + m.x11*(m.x212 - 10*m.x413)
- (1 - m.x11)*m.x413) + m.x412) == 0)
m.c212 = Constraint(expr=m.x414 - (0.0025*(m.x11*(m.x212 - 10*m.x413) - (1 - m.x11)*m.x413 + m.x12*(m.x213 - 10*m.x414)
- (1 - m.x12)*m.x414) + m.x413) == 0)
m.c213 = Constraint(expr=m.x415 - (0.0025*(m.x12*(m.x213 - 10*m.x414) - (1 - m.x12)*m.x414 + m.x13*(m.x214 - 10*m.x415)
- (1 - m.x13)*m.x415) + m.x414) == 0)
m.c214 = Constraint(expr=m.x416 - (0.0025*(m.x13*(m.x214 - 10*m.x415) - (1 - m.x13)*m.x415 + m.x14*(m.x215 - 10*m.x416)
- (1 - m.x14)*m.x416) + m.x415) == 0)
m.c215 = Constraint(expr=m.x417 - (0.0025*(m.x14*(m.x215 - 10*m.x416) - (1 - m.x14)*m.x416 + m.x15*(m.x216 - 10*m.x417)
- (1 - m.x15)*m.x417) + m.x416) == 0)
m.c216 = Constraint(expr=m.x418 - (0.0025*(m.x15*(m.x216 - 10*m.x417) - (1 - m.x15)*m.x417 + m.x16*(m.x217 - 10*m.x418)
- (1 - m.x16)*m.x418) + m.x417) == 0)
m.c217 = Constraint(expr=m.x419 - (0.0025*(m.x16*(m.x217 - 10*m.x418) - (1 - m.x16)*m.x418 + m.x17*(m.x218 - 10*m.x419)
- (1 - m.x17)*m.x419) + m.x418) == 0)
m.c218 = Constraint(expr=m.x420 - (0.0025*(m.x17*(m.x218 - 10*m.x419) - (1 - m.x17)*m.x419 + m.x18*(m.x219 - 10*m.x420)
- (1 - m.x18)*m.x420) + m.x419) == 0)
m.c219 = Constraint(expr=m.x421 - (0.0025*(m.x18*(m.x219 - 10*m.x420) - (1 - m.x18)*m.x420 + m.x19*(m.x220 - 10*m.x421)
- (1 - m.x19)*m.x421) + m.x420) == 0)
m.c220 = Constraint(expr=m.x422 - (0.0025*(m.x19*(m.x220 - 10*m.x421) - (1 - m.x19)*m.x421 + m.x20*(m.x221 - 10*m.x422)
- (1 - m.x20)*m.x422) + m.x421) == 0)
m.c221 = Constraint(expr=m.x423 - (0.0025*(m.x20*(m.x221 - 10*m.x422) - (1 - m.x20)*m.x422 + m.x21*(m.x222 - 10*m.x423)
- (1 - m.x21)*m.x423) + m.x422) == 0)
m.c222 = Constraint(expr=m.x424 - (0.0025*(m.x21*(m.x222 - 10*m.x423) - (1 - m.x21)*m.x423 + m.x22*(m.x223 - 10*m.x424)
- (1 - m.x22)*m.x424) + m.x423) == 0)
m.c223 = Constraint(expr=m.x425 - (0.0025*(m.x22*(m.x223 - 10*m.x424) - (1 - m.x22)*m.x424 + m.x23*(m.x224 - 10*m.x425)
- (1 - m.x23)*m.x425) + m.x424) == 0)
m.c224 = Constraint(expr=m.x426 - (0.0025*(m.x23*(m.x224 - 10*m.x425) - (1 - m.x23)*m.x425 + m.x24*(m.x225 - 10*m.x426)
- (1 - m.x24)*m.x426) + m.x425) == 0)
m.c225 = Constraint(expr=m.x427 - (0.0025*(m.x24*(m.x225 - 10*m.x426) - (1 - m.x24)*m.x426 + m.x25*(m.x226 - 10*m.x427)
- (1 - m.x25)*m.x427) + m.x426) == 0)
m.c226 = Constraint(expr=m.x428 - (0.0025*(m.x25*(m.x226 - 10*m.x427) - (1 - m.x25)*m.x427 + m.x26*(m.x227 - 10*m.x428)
- (1 - m.x26)*m.x428) + m.x427) == 0)
m.c227 = Constraint(expr=m.x429 - (0.0025*(m.x26*(m.x227 - 10*m.x428) - (1 - m.x26)*m.x428 + m.x27*(m.x228 - 10*m.x429)
- (1 - m.x27)*m.x429) + m.x428) == 0)
m.c228 = Constraint(expr=m.x430 - (0.0025*(m.x27*(m.x228 - 10*m.x429) - (1 - m.x27)*m.x429 + m.x28*(m.x229 - 10*m.x430)
- (1 - m.x28)*m.x430) + m.x429) == 0)
m.c229 = Constraint(expr=m.x431 - (0.0025*(m.x28*(m.x229 - 10*m.x430) - (1 - m.x28)*m.x430 + m.x29*(m.x230 - 10*m.x431)
- (1 - m.x29)*m.x431) + m.x430) == 0)
m.c230 = Constraint(expr=m.x432 - (0.0025*(m.x29*(m.x230 - 10*m.x431) - (1 - m.x29)*m.x431 + m.x30*(m.x231 - 10*m.x432)
- (1 - m.x30)*m.x432) + m.x431) == 0)
m.c231 = Constraint(expr=m.x433 - (0.0025*(m.x30*(m.x231 - 10*m.x432) - (1 - m.x30)*m.x432 + m.x31*(m.x232 - 10*m.x433)
- (1 - m.x31)*m.x433) + m.x432) == 0)
m.c232 = Constraint(expr=m.x434 - (0.0025*(m.x31*(m.x232 - 10*m.x433) - (1 - m.x31)*m.x433 + m.x32*(m.x233 - 10*m.x434)
- (1 - m.x32)*m.x434) + m.x433) == 0)
m.c233 = Constraint(expr=m.x435 - (0.0025*(m.x32*(m.x233 - 10*m.x434) - (1 - m.x32)*m.x434 + m.x33*(m.x234 - 10*m.x435)
- (1 - m.x33)*m.x435) + m.x434) == 0)
m.c234 = Constraint(expr=m.x436 - (0.0025*(m.x33*(m.x234 - 10*m.x435) - (1 - m.x33)*m.x435 + m.x34*(m.x235 - 10*m.x436)
- (1 - m.x34)*m.x436) + m.x435) == 0)
m.c235 = Constraint(expr=m.x437 - (0.0025*(m.x34*(m.x235 - 10*m.x436) - (1 - m.x34)*m.x436 + m.x35*(m.x236 - 10*m.x437)
- (1 - m.x35)*m.x437) + m.x436) == 0)
m.c236 = Constraint(expr=m.x438 - (0.0025*(m.x35*(m.x236 - 10*m.x437) - (1 - m.x35)*m.x437 + m.x36*(m.x237 - 10*m.x438)
- (1 - m.x36)*m.x438) + m.x437) == 0)
m.c237 = Constraint(expr=m.x439 - (0.0025*(m.x36*(m.x237 - 10*m.x438) - (1 - m.x36)*m.x438 + m.x37*(m.x238 - 10*m.x439)
- (1 - m.x37)*m.x439) + m.x438) == 0)
m.c238 = Constraint(expr=m.x440 - (0.0025*(m.x37*(m.x238 - 10*m.x439) - (1 - m.x37)*m.x439 + m.x38*(m.x239 - 10*m.x440)
- (1 - m.x38)*m.x440) + m.x439) == 0)
m.c239 = Constraint(expr=m.x441 - (0.0025*(m.x38*(m.x239 - 10*m.x440) - (1 - m.x38)*m.x440 + m.x39*(m.x240 - 10*m.x441)
- (1 - m.x39)*m.x441) + m.x440) == 0)
m.c240 = Constraint(expr=m.x442 - (0.0025*(m.x39*(m.x240 - 10*m.x441) - (1 - m.x39)*m.x441 + m.x40*(m.x241 - 10*m.x442)
- (1 - m.x40)*m.x442) + m.x441) == 0)
m.c241 = Constraint(expr=m.x443 - (0.0025*(m.x40*(m.x241 - 10*m.x442) - (1 - m.x40)*m.x442 + m.x41*(m.x242 - 10*m.x443)
- (1 - m.x41)*m.x443) + m.x442) == 0)
m.c242 = Constraint(expr=m.x444 - (0.0025*(m.x41*(m.x242 - 10*m.x443) - (1 - m.x41)*m.x443 + m.x42*(m.x243 - 10*m.x444)
- (1 - m.x42)*m.x444) + m.x443) == 0)
m.c243 = Constraint(expr=m.x445 - (0.0025*(m.x42*(m.x243 - 10*m.x444) - (1 - m.x42)*m.x444 + m.x43*(m.x244 - 10*m.x445)
- (1 - m.x43)*m.x445) + m.x444) == 0)
m.c244 = Constraint(expr=m.x446 - (0.0025*(m.x43*(m.x244 - 10*m.x445) - (1 - m.x43)*m.x445 + m.x44*(m.x245 - 10*m.x446)
- (1 - m.x44)*m.x446) + m.x445) == 0)
m.c245 = Constraint(expr=m.x447 - (0.0025*(m.x44*(m.x245 - 10*m.x446) - (1 - m.x44)*m.x446 + m.x45*(m.x246 - 10*m.x447)
- (1 - m.x45)*m.x447) + m.x446) == 0)
m.c246 = Constraint(expr=m.x448 - (0.0025*(m.x45*(m.x246 - 10*m.x447) - (1 - m.x45)*m.x447 + m.x46*(m.x247 - 10*m.x448)
- (1 - m.x46)*m.x448) + m.x447) == 0)
m.c247 = Constraint(expr=m.x449 - (0.0025*(m.x46*(m.x247 - 10*m.x448) - (1 - m.x46)*m.x448 + m.x47*(m.x248 - 10*m.x449)
- (1 - m.x47)*m.x449) + m.x448) == 0)
m.c248 = Constraint(expr=m.x450 - (0.0025*(m.x47*(m.x248 - 10*m.x449) - (1 - m.x47)*m.x449 + m.x48*(m.x249 - 10*m.x450)
- (1 - m.x48)*m.x450) + m.x449) == 0)
m.c249 = Constraint(expr=m.x451 - (0.0025*(m.x48*(m.x249 - 10*m.x450) - (1 - m.x48)*m.x450 + m.x49*(m.x250 - 10*m.x451)
- (1 - m.x49)*m.x451) + m.x450) == 0)
m.c250 = Constraint(expr=m.x452 - (0.0025*(m.x49*(m.x250 - 10*m.x451) - (1 - m.x49)*m.x451 + m.x50*(m.x251 - 10*m.x452)
- (1 - m.x50)*m.x452) + m.x451) == 0)
m.c251 = Constraint(expr=m.x453 - (0.0025*(m.x50*(m.x251 - 10*m.x452) - (1 - m.x50)*m.x452 + m.x51*(m.x252 - 10*m.x453)
- (1 - m.x51)*m.x453) + m.x452) == 0)
m.c252 = Constraint(expr=m.x454 - (0.0025*(m.x51*(m.x252 - 10*m.x453) - (1 - m.x51)*m.x453 + m.x52*(m.x253 - 10*m.x454)
- (1 - m.x52)*m.x454) + m.x453) == 0)
m.c253 = Constraint(expr=m.x455 - (0.0025*(m.x52*(m.x253 - 10*m.x454) - (1 - m.x52)*m.x454 + m.x53*(m.x254 - 10*m.x455)
- (1 - m.x53)*m.x455) + m.x454) == 0)
m.c254 = Constraint(expr=m.x456 - (0.0025*(m.x53*(m.x254 - 10*m.x455) - (1 - m.x53)*m.x455 + m.x54*(m.x255 - 10*m.x456)
- (1 - m.x54)*m.x456) + m.x455) == 0)
m.c255 = Constraint(expr=m.x457 - (0.0025*(m.x54*(m.x255 - 10*m.x456) - (1 - m.x54)*m.x456 + m.x55*(m.x256 - 10*m.x457)
- (1 - m.x55)*m.x457) + m.x456) == 0)
m.c256 = Constraint(expr=m.x458 - (0.0025*(m.x55*(m.x256 - 10*m.x457) - (1 - m.x55)*m.x457 + m.x56*(m.x257 - 10*m.x458)
- (1 - m.x56)*m.x458) + m.x457) == 0)
m.c257 = Constraint(expr=m.x459 - (0.0025*(m.x56*(m.x257 - 10*m.x458) - (1 - m.x56)*m.x458 + m.x57*(m.x258 - 10*m.x459)
- (1 - m.x57)*m.x459) + m.x458) == 0)
m.c258 = Constraint(expr=m.x460 - (0.0025*(m.x57*(m.x258 - 10*m.x459) - (1 - m.x57)*m.x459 + m.x58*(m.x259 - 10*m.x460)
- (1 - m.x58)*m.x460) + m.x459) == 0)
m.c259 = Constraint(expr=m.x461 - (0.0025*(m.x58*(m.x259 - 10*m.x460) - (1 - m.x58)*m.x460 + m.x59*(m.x260 - 10*m.x461)
- (1 - m.x59)*m.x461) + m.x460) == 0)
m.c260 = Constraint(expr=m.x462 - (0.0025*(m.x59*(m.x260 - 10*m.x461) - (1 - m.x59)*m.x461 + m.x60*(m.x261 - 10*m.x462)
- (1 - m.x60)*m.x462) + m.x461) == 0)
m.c261 = Constraint(expr=m.x463 - (0.0025*(m.x60*(m.x261 - 10*m.x462) - (1 - m.x60)*m.x462 + m.x61*(m.x262 - 10*m.x463)
- (1 - m.x61)*m.x463) + m.x462) == 0)
m.c262 = Constraint(expr=m.x464 - (0.0025*(m.x61*(m.x262 - 10*m.x463) - (1 - m.x61)*m.x463 + m.x62*(m.x263 - 10*m.x464)
- (1 - m.x62)*m.x464) + m.x463) == 0)
m.c263 = Constraint(expr=m.x465 - (0.0025*(m.x62*(m.x263 - 10*m.x464) - (1 - m.x62)*m.x464 + m.x63*(m.x264 - 10*m.x465)
- (1 - m.x63)*m.x465) + m.x464) == 0)
m.c264 = Constraint(expr=m.x466 - (0.0025*(m.x63*(m.x264 - 10*m.x465) - (1 - m.x63)*m.x465 + m.x64*(m.x265 - 10*m.x466)
- (1 - m.x64)*m.x466) + m.x465) == 0)
m.c265 = Constraint(expr=m.x467 - (0.0025*(m.x64*(m.x265 - 10*m.x466) - (1 - m.x64)*m.x466 + m.x65*(m.x266 - 10*m.x467)
- (1 - m.x65)*m.x467) + m.x466) == 0)
m.c266 = Constraint(expr=m.x468 - (0.0025*(m.x65*(m.x266 - 10*m.x467) - (1 - m.x65)*m.x467 + m.x66*(m.x267 - 10*m.x468)
- (1 - m.x66)*m.x468) + m.x467) == 0)
m.c267 = Constraint(expr=m.x469 - (0.0025*(m.x66*(m.x267 - 10*m.x468) - (1 - m.x66)*m.x468 + m.x67*(m.x268 - 10*m.x469)
- (1 - m.x67)*m.x469) + m.x468) == 0)
m.c268 = Constraint(expr=m.x470 - (0.0025*(m.x67*(m.x268 - 10*m.x469) - (1 - m.x67)*m.x469 + m.x68*(m.x269 - 10*m.x470)
- (1 - m.x68)*m.x470) + m.x469) == 0)
m.c269 = Constraint(expr=m.x471 - (0.0025*(m.x68*(m.x269 - 10*m.x470) - (1 - m.x68)*m.x470 + m.x69*(m.x270 - 10*m.x471)
- (1 - m.x69)*m.x471) + m.x470) == 0)
m.c270 = Constraint(expr=m.x472 - (0.0025*(m.x69*(m.x270 - 10*m.x471) - (1 - m.x69)*m.x471 + m.x70*(m.x271 - 10*m.x472)
- (1 - m.x70)*m.x472) + m.x471) == 0)
m.c271 = Constraint(expr=m.x473 - (0.0025*(m.x70*(m.x271 - 10*m.x472) - (1 - m.x70)*m.x472 + m.x71*(m.x272 - 10*m.x473)
- (1 - m.x71)*m.x473) + m.x472) == 0)
m.c272 = Constraint(expr=m.x474 - (0.0025*(m.x71*(m.x272 - 10*m.x473) - (1 - m.x71)*m.x473 + m.x72*(m.x273 - 10*m.x474)
- (1 - m.x72)*m.x474) + m.x473) == 0)
m.c273 = Constraint(expr=m.x475 - (0.0025*(m.x72*(m.x273 - 10*m.x474) - (1 - m.x72)*m.x474 + m.x73*(m.x274 - 10*m.x475)
- (1 - m.x73)*m.x475) + m.x474) == 0)
m.c274 = Constraint(expr=m.x476 - (0.0025*(m.x73*(m.x274 - 10*m.x475) - (1 - m.x73)*m.x475 + m.x74*(m.x275 - 10*m.x476)
- (1 - m.x74)*m.x476) + m.x475) == 0)
m.c275 = Constraint(expr=m.x477 - (0.0025*(m.x74*(m.x275 - 10*m.x476) - (1 - m.x74)*m.x476 + m.x75*(m.x276 - 10*m.x477)
- (1 - m.x75)*m.x477) + m.x476) == 0)
m.c276 = Constraint(expr=m.x478 - (0.0025*(m.x75*(m.x276 - 10*m.x477) - (1 - m.x75)*m.x477 + m.x76*(m.x277 - 10*m.x478)
- (1 - m.x76)*m.x478) + m.x477) == 0)
m.c277 = Constraint(expr=m.x479 - (0.0025*(m.x76*(m.x277 - 10*m.x478) - (1 - m.x76)*m.x478 + m.x77*(m.x278 - 10*m.x479)
- (1 - m.x77)*m.x479) + m.x478) == 0)
m.c278 = Constraint(expr=m.x480 - (0.0025*(m.x77*(m.x278 - 10*m.x479) - (1 - m.x77)*m.x479 + m.x78*(m.x279 - 10*m.x480)
- (1 - m.x78)*m.x480) + m.x479) == 0)
m.c279 = Constraint(expr=m.x481 - (0.0025*(m.x78*(m.x279 - 10*m.x480) - (1 - m.x78)*m.x480 + m.x79*(m.x280 - 10*m.x481)
- (1 - m.x79)*m.x481) + m.x480) == 0)
m.c280 = Constraint(expr=m.x482 - (0.0025*(m.x79*(m.x280 - 10*m.x481) - (1 - m.x79)*m.x481 + m.x80*(m.x281 - 10*m.x482)
- (1 - m.x80)*m.x482) + m.x481) == 0)
m.c281 = Constraint(expr=m.x483 - (0.0025*(m.x80*(m.x281 - 10*m.x482) - (1 - m.x80)*m.x482 + m.x81*(m.x282 - 10*m.x483)
- (1 - m.x81)*m.x483) + m.x482) == 0)
m.c282 = Constraint(expr=m.x484 - (0.0025*(m.x81*(m.x282 - 10*m.x483) - (1 - m.x81)*m.x483 + m.x82*(m.x283 - 10*m.x484)
- (1 - m.x82)*m.x484) + m.x483) == 0)
m.c283 = Constraint(expr=m.x485 - (0.0025*(m.x82*(m.x283 - 10*m.x484) - (1 - m.x82)*m.x484 + m.x83*(m.x284 - 10*m.x485)
- (1 - m.x83)*m.x485) + m.x484) == 0)
m.c284 = Constraint(expr=m.x486 - (0.0025*(m.x83*(m.x284 - 10*m.x485) - (1 - m.x83)*m.x485 + m.x84*(m.x285 - 10*m.x486)
- (1 - m.x84)*m.x486) + m.x485) == 0)
m.c285 = Constraint(expr=m.x487 - (0.0025*(m.x84*(m.x285 - 10*m.x486) - (1 - m.x84)*m.x486 + m.x85*(m.x286 - 10*m.x487)
- (1 - m.x85)*m.x487) + m.x486) == 0)
m.c286 = Constraint(expr=m.x488 - (0.0025*(m.x85*(m.x286 - 10*m.x487) - (1 - m.x85)*m.x487 + m.x86*(m.x287 - 10*m.x488)
- (1 - m.x86)*m.x488) + m.x487) == 0)
m.c287 = Constraint(expr=m.x489 - (0.0025*(m.x86*(m.x287 - 10*m.x488) - (1 - m.x86)*m.x488 + m.x87*(m.x288 - 10*m.x489)
- (1 - m.x87)*m.x489) + m.x488) == 0)
m.c288 = Constraint(expr=m.x490 - (0.0025*(m.x87*(m.x288 - 10*m.x489) - (1 - m.x87)*m.x489 + m.x88*(m.x289 - 10*m.x490)
- (1 - m.x88)*m.x490) + m.x489) == 0)
m.c289 = Constraint(expr=m.x491 - (0.0025*(m.x88*(m.x289 - 10*m.x490) - (1 - m.x88)*m.x490 + m.x89*(m.x290 - 10*m.x491)
- (1 - m.x89)*m.x491) + m.x490) == 0)
m.c290 = Constraint(expr=m.x492 - (0.0025*(m.x89*(m.x290 - 10*m.x491) - (1 - m.x89)*m.x491 + m.x90*(m.x291 - 10*m.x492)
- (1 - m.x90)*m.x492) + m.x491) == 0)
m.c291 = Constraint(expr=m.x493 - (0.0025*(m.x90*(m.x291 - 10*m.x492) - (1 - m.x90)*m.x492 + m.x91*(m.x292 - 10*m.x493)
- (1 - m.x91)*m.x493) + m.x492) == 0)
m.c292 = Constraint(expr=m.x494 - (0.0025*(m.x91*(m.x292 - 10*m.x493) - (1 - m.x91)*m.x493 + m.x92*(m.x293 - 10*m.x494)
- (1 - m.x92)*m.x494) + m.x493) == 0)
m.c293 = Constraint(expr=m.x495 - (0.0025*(m.x92*(m.x293 - 10*m.x494) - (1 - m.x92)*m.x494 + m.x93*(m.x294 - 10*m.x495)
- (1 - m.x93)*m.x495) + m.x494) == 0)
m.c294 = Constraint(expr=m.x496 - (0.0025*(m.x93*(m.x294 - 10*m.x495) - (1 - m.x93)*m.x495 + m.x94*(m.x295 - 10*m.x496)
- (1 - m.x94)*m.x496) + m.x495) == 0)
m.c295 = Constraint(expr=m.x497 - (0.0025*(m.x94*(m.x295 - 10*m.x496) - (1 - m.x94)*m.x496 + m.x95*(m.x296 - 10*m.x497)
- (1 - m.x95)*m.x497) + m.x496) == 0)
m.c296 = Constraint(expr=m.x498 - (0.0025*(m.x95*(m.x296 - 10*m.x497) - (1 - m.x95)*m.x497 + m.x96*(m.x297 - 10*m.x498)
- (1 - m.x96)*m.x498) + m.x497) == 0)
m.c297 = Constraint(expr=m.x499 - (0.0025*(m.x96*(m.x297 - 10*m.x498) - (1 - m.x96)*m.x498 + m.x97*(m.x298 - 10*m.x499)
- (1 - m.x97)*m.x499) + m.x498) == 0)
m.c298 = Constraint(expr=m.x500 - (0.0025*(m.x97*(m.x298 - 10*m.x499) - (1 - m.x97)*m.x499 + m.x98*(m.x299 - 10*m.x500)
- (1 - m.x98)*m.x500) + m.x499) == 0)
m.c299 = Constraint(expr=m.x501 - (0.0025*(m.x98*(m.x299 - 10*m.x500) - (1 - m.x98)*m.x500 + m.x99*(m.x300 - 10*m.x501)
- (1 - m.x99)*m.x501) + m.x500) == 0)
m.c300 = Constraint(expr=m.x502 - (0.0025*(m.x99*(m.x300 - 10*m.x501) - (1 - m.x99)*m.x501 + m.x100*(m.x301 - 10*m.x502)
- (1 - m.x100)*m.x502) + m.x501) == 0)
m.c301 = Constraint(expr=m.x503 - (0.0025*(m.x100*(m.x301 - 10*m.x502) - (1 - m.x100)*m.x502 + m.x101*(m.x302 - 10*
m.x503) - (1 - m.x101)*m.x503) + m.x502) == 0)
m.c302 = Constraint(expr=m.x504 - (0.0025*(m.x101*(m.x302 - 10*m.x503) - (1 - m.x101)*m.x503 + m.x102*(m.x303 - 10*
m.x504) - (1 - m.x102)*m.x504) + m.x503) == 0)
m.c303 = Constraint(expr=m.x505 - (0.0025*(m.x102*(m.x303 - 10*m.x504) - (1 - m.x102)*m.x504 + m.x103*(m.x304 - 10*
m.x505) - (1 - m.x103)*m.x505) + m.x504) == 0)
m.c304 = Constraint(expr=m.x506 - (0.0025*(m.x103*(m.x304 - 10*m.x505) - (1 - m.x103)*m.x505 + m.x104*(m.x305 - 10*
m.x506) - (1 - m.x104)*m.x506) + m.x505) == 0)
m.c305 = Constraint(expr=m.x507 - (0.0025*(m.x104*(m.x305 - 10*m.x506) - (1 - m.x104)*m.x506 + m.x105*(m.x306 - 10*
m.x507) - (1 - m.x105)*m.x507) + m.x506) == 0)
m.c306 = Constraint(expr=m.x508 - (0.0025*(m.x105*(m.x306 - 10*m.x507) - (1 - m.x105)*m.x507 + m.x106*(m.x307 - 10*
m.x508) - (1 - m.x106)*m.x508) + m.x507) == 0)
m.c307 = Constraint(expr=m.x509 - (0.0025*(m.x106*(m.x307 - 10*m.x508) - (1 - m.x106)*m.x508 + m.x107*(m.x308 - 10*
m.x509) - (1 - m.x107)*m.x509) + m.x508) == 0)
m.c308 = Constraint(expr=m.x510 - (0.0025*(m.x107*(m.x308 - 10*m.x509) - (1 - m.x107)*m.x509 + m.x108*(m.x309 - 10*
m.x510) - (1 - m.x108)*m.x510) + m.x509) == 0)
m.c309 = Constraint(expr=m.x511 - (0.0025*(m.x108*(m.x309 - 10*m.x510) - (1 - m.x108)*m.x510 + m.x109*(m.x310 - 10*
m.x511) - (1 - m.x109)*m.x511) + m.x510) == 0)
m.c310 = Constraint(expr=m.x512 - (0.0025*(m.x109*(m.x310 - 10*m.x511) - (1 - m.x109)*m.x511 + m.x110*(m.x311 - 10*
m.x512) - (1 - m.x110)*m.x512) + m.x511) == 0)
m.c311 = Constraint(expr=m.x513 - (0.0025*(m.x110*(m.x311 - 10*m.x512) - (1 - m.x110)*m.x512 + m.x111*(m.x312 - 10*
m.x513) - (1 - m.x111)*m.x513) + m.x512) == 0)
m.c312 = Constraint(expr=m.x514 - (0.0025*(m.x111*(m.x312 - 10*m.x513) - (1 - m.x111)*m.x513 + m.x112*(m.x313 - 10*
m.x514) - (1 - m.x112)*m.x514) + m.x513) == 0)
m.c313 = Constraint(expr=m.x515 - (0.0025*(m.x112*(m.x313 - 10*m.x514) - (1 - m.x112)*m.x514 + m.x113*(m.x314 - 10*
m.x515) - (1 - m.x113)*m.x515) + m.x514) == 0)
m.c314 = Constraint(expr=m.x516 - (0.0025*(m.x113*(m.x314 - 10*m.x515) - (1 - m.x113)*m.x515 + m.x114*(m.x315 - 10*
m.x516) - (1 - m.x114)*m.x516) + m.x515) == 0)
m.c315 = Constraint(expr=m.x517 - (0.0025*(m.x114*(m.x315 - 10*m.x516) - (1 - m.x114)*m.x516 + m.x115*(m.x316 - 10*
m.x517) - (1 - m.x115)*m.x517) + m.x516) == 0)
m.c316 = Constraint(expr=m.x518 - (0.0025*(m.x115*(m.x316 - 10*m.x517) - (1 - m.x115)*m.x517 + m.x116*(m.x317 - 10*
m.x518) - (1 - m.x116)*m.x518) + m.x517) == 0)
m.c317 = Constraint(expr=m.x519 - (0.0025*(m.x116*(m.x317 - 10*m.x518) - (1 - m.x116)*m.x518 + m.x117*(m.x318 - 10*
m.x519) - (1 - m.x117)*m.x519) + m.x518) == 0)
m.c318 = Constraint(expr=m.x520 - (0.0025*(m.x117*(m.x318 - 10*m.x519) - (1 - m.x117)*m.x519 + m.x118*(m.x319 - 10*
m.x520) - (1 - m.x118)*m.x520) + m.x519) == 0)
m.c319 = Constraint(expr=m.x521 - (0.0025*(m.x118*(m.x319 - 10*m.x520) - (1 - m.x118)*m.x520 + m.x119*(m.x320 - 10*
m.x521) - (1 - m.x119)*m.x521) + m.x520) == 0)
m.c320 = Constraint(expr=m.x522 - (0.0025*(m.x119*(m.x320 - 10*m.x521) - (1 - m.x119)*m.x521 + m.x120*(m.x321 - 10*
m.x522) - (1 - m.x120)*m.x522) + m.x521) == 0)
m.c321 = Constraint(expr=m.x523 - (0.0025*(m.x120*(m.x321 - 10*m.x522) - (1 - m.x120)*m.x522 + m.x121*(m.x322 - 10*
m.x523) - (1 - m.x121)*m.x523) + m.x522) == 0)
m.c322 = Constraint(expr=m.x524 - (0.0025*(m.x121*(m.x322 - 10*m.x523) - (1 - m.x121)*m.x523 + m.x122*(m.x323 - 10*
m.x524) - (1 - m.x122)*m.x524) + m.x523) == 0)
m.c323 = Constraint(expr=m.x525 - (0.0025*(m.x122*(m.x323 - 10*m.x524) - (1 - m.x122)*m.x524 + m.x123*(m.x324 - 10*
m.x525) - (1 - m.x123)*m.x525) + m.x524) == 0)
m.c324 = Constraint(expr=m.x526 - (0.0025*(m.x123*(m.x324 - 10*m.x525) - (1 - m.x123)*m.x525 + m.x124*(m.x325 - 10*
m.x526) - (1 - m.x124)*m.x526) + m.x525) == 0)
m.c325 = Constraint(expr=m.x527 - (0.0025*(m.x124*(m.x325 - 10*m.x526) - (1 - m.x124)*m.x526 + m.x125*(m.x326 - 10*
m.x527) - (1 - m.x125)*m.x527) + m.x526) == 0)
m.c326 = Constraint(expr=m.x528 - (0.0025*(m.x125*(m.x326 - 10*m.x527) - (1 - m.x125)*m.x527 + m.x126*(m.x327 - 10*
m.x528) - (1 - m.x126)*m.x528) + m.x527) == 0)
m.c327 = Constraint(expr=m.x529 - (0.0025*(m.x126*(m.x327 - 10*m.x528) - (1 - m.x126)*m.x528 + m.x127*(m.x328 - 10*
m.x529) - (1 - m.x127)*m.x529) + m.x528) == 0)
m.c328 = Constraint(expr=m.x530 - (0.0025*(m.x127*(m.x328 - 10*m.x529) - (1 - m.x127)*m.x529 + m.x128*(m.x329 - 10*
m.x530) - (1 - m.x128)*m.x530) + m.x529) == 0)
m.c329 = Constraint(expr=m.x531 - (0.0025*(m.x128*(m.x329 - 10*m.x530) - (1 - m.x128)*m.x530 + m.x129*(m.x330 - 10*
m.x531) - (1 - m.x129)*m.x531) + m.x530) == 0)
m.c330 = Constraint(expr=m.x532 - (0.0025*(m.x129*(m.x330 - 10*m.x531) - (1 - m.x129)*m.x531 + m.x130*(m.x331 - 10*
m.x532) - (1 - m.x130)*m.x532) + m.x531) == 0)
m.c331 = Constraint(expr=m.x533 - (0.0025*(m.x130*(m.x331 - 10*m.x532) - (1 - m.x130)*m.x532 + m.x131*(m.x332 - 10*
m.x533) - (1 - m.x131)*m.x533) + m.x532) == 0)
m.c332 = Constraint(expr=m.x534 - (0.0025*(m.x131*(m.x332 - 10*m.x533) - (1 - m.x131)*m.x533 + m.x132*(m.x333 - 10*
m.x534) - (1 - m.x132)*m.x534) + m.x533) == 0)
m.c333 = Constraint(expr=m.x535 - (0.0025*(m.x132*(m.x333 - 10*m.x534) - (1 - m.x132)*m.x534 + m.x133*(m.x334 - 10*
m.x535) - (1 - m.x133)*m.x535) + m.x534) == 0)
m.c334 = Constraint(expr=m.x536 - (0.0025*(m.x133*(m.x334 - 10*m.x535) - (1 - m.x133)*m.x535 + m.x134*(m.x335 - 10*
m.x536) - (1 - m.x134)*m.x536) + m.x535) == 0)
m.c335 = Constraint(expr=m.x537 - (0.0025*(m.x134*(m.x335 - 10*m.x536) - (1 - m.x134)*m.x536 + m.x135*(m.x336 - 10*
m.x537) - (1 - m.x135)*m.x537) + m.x536) == 0)
m.c336 = Constraint(expr=m.x538 - (0.0025*(m.x135*(m.x336 - 10*m.x537) - (1 - m.x135)*m.x537 + m.x136*(m.x337 - 10*
m.x538) - (1 - m.x136)*m.x538) + m.x537) == 0)
m.c337 = Constraint(expr=m.x539 - (0.0025*(m.x136*(m.x337 - 10*m.x538) - (1 - m.x136)*m.x538 + m.x137*(m.x338 - 10*
m.x539) - (1 - m.x137)*m.x539) + m.x538) == 0)
m.c338 = Constraint(expr=m.x540 - (0.0025*(m.x137*(m.x338 - 10*m.x539) - (1 - m.x137)*m.x539 + m.x138*(m.x339 - 10*
m.x540) - (1 - m.x138)*m.x540) + m.x539) == 0)
m.c339 = Constraint(expr=m.x541 - (0.0025*(m.x138*(m.x339 - 10*m.x540) - (1 - m.x138)*m.x540 + m.x139*(m.x340 - 10*
m.x541) - (1 - m.x139)*m.x541) + m.x540) == 0)
m.c340 = Constraint(expr=m.x542 - (0.0025*(m.x139*(m.x340 - 10*m.x541) - (1 - m.x139)*m.x541 + m.x140*(m.x341 - 10*
m.x542) - (1 - m.x140)*m.x542) + m.x541) == 0)
m.c341 = Constraint(expr=m.x543 - (0.0025*(m.x140*(m.x341 - 10*m.x542) - (1 - m.x140)*m.x542 + m.x141*(m.x342 - 10*
m.x543) - (1 - m.x141)*m.x543) + m.x542) == 0)
m.c342 = Constraint(expr=m.x544 - (0.0025*(m.x141*(m.x342 - 10*m.x543) - (1 - m.x141)*m.x543 + m.x142*(m.x343 - 10*
m.x544) - (1 - m.x142)*m.x544) + m.x543) == 0)
m.c343 = Constraint(expr=m.x545 - (0.0025*(m.x142*(m.x343 - 10*m.x544) - (1 - m.x142)*m.x544 + m.x143*(m.x344 - 10*
m.x545) - (1 - m.x143)*m.x545) + m.x544) == 0)
m.c344 = Constraint(expr=m.x546 - (0.0025*(m.x143*(m.x344 - 10*m.x545) - (1 - m.x143)*m.x545 + m.x144*(m.x345 - 10*
m.x546) - (1 - m.x144)*m.x546) + m.x545) == 0)
m.c345 = Constraint(expr=m.x547 - (0.0025*(m.x144*(m.x345 - 10*m.x546) - (1 - m.x144)*m.x546 + m.x145*(m.x346 - 10*
m.x547) - (1 - m.x145)*m.x547) + m.x546) == 0)
m.c346 = Constraint(expr=m.x548 - (0.0025*(m.x145*(m.x346 - 10*m.x547) - (1 - m.x145)*m.x547 + m.x146*(m.x347 - 10*
m.x548) - (1 - m.x146)*m.x548) + m.x547) == 0)
m.c347 = Constraint(expr=m.x549 - (0.0025*(m.x146*(m.x347 - 10*m.x548) - (1 - m.x146)*m.x548 + m.x147*(m.x348 - 10*
m.x549) - (1 - m.x147)*m.x549) + m.x548) == 0)
m.c348 = Constraint(expr=m.x550 - (0.0025*(m.x147*(m.x348 - 10*m.x549) - (1 - m.x147)*m.x549 + m.x148*(m.x349 - 10*
m.x550) - (1 - m.x148)*m.x550) + m.x549) == 0)
m.c349 = Constraint(expr=m.x551 - (0.0025*(m.x148*(m.x349 - 10*m.x550) - (1 - m.x148)*m.x550 + m.x149*(m.x350 - 10*
m.x551) - (1 - m.x149)*m.x551) + m.x550) == 0)
m.c350 = Constraint(expr=m.x552 - (0.0025*(m.x149*(m.x350 - 10*m.x551) - (1 - m.x149)*m.x551 + m.x150*(m.x351 - 10*
m.x552) - (1 - m.x150)*m.x552) + m.x551) == 0)
m.c351 = Constraint(expr=m.x553 - (0.0025*(m.x150*(m.x351 - 10*m.x552) - (1 - m.x150)*m.x552 + m.x151*(m.x352 - 10*
m.x553) - (1 - m.x151)*m.x553) + m.x552) == 0)
m.c352 = Constraint(expr=m.x554 - (0.0025*(m.x151*(m.x352 - 10*m.x553) - (1 - m.x151)*m.x553 + m.x152*(m.x353 - 10*
m.x554) - (1 - m.x152)*m.x554) + m.x553) == 0)
m.c353 = Constraint(expr=m.x555 - (0.0025*(m.x152*(m.x353 - 10*m.x554) - (1 - m.x152)*m.x554 + m.x153*(m.x354 - 10*
m.x555) - (1 - m.x153)*m.x555) + m.x554) == 0)
m.c354 = Constraint(expr=m.x556 - (0.0025*(m.x153*(m.x354 - 10*m.x555) - (1 - m.x153)*m.x555 + m.x154*(m.x355 - 10*
m.x556) - (1 - m.x154)*m.x556) + m.x555) == 0)
m.c355 = Constraint(expr=m.x557 - (0.0025*(m.x154*(m.x355 - 10*m.x556) - (1 - m.x154)*m.x556 + m.x155*(m.x356 - 10*
m.x557) - (1 - m.x155)*m.x557) + m.x556) == 0)
m.c356 = Constraint(expr=m.x558 - (0.0025*(m.x155*(m.x356 - 10*m.x557) - (1 - m.x155)*m.x557 + m.x156*(m.x357 - 10*
m.x558) - (1 - m.x156)*m.x558) + m.x557) == 0)
m.c357 = Constraint(expr=m.x559 - (0.0025*(m.x156*(m.x357 - 10*m.x558) - (1 - m.x156)*m.x558 + m.x157*(m.x358 - 10*
m.x559) - (1 - m.x157)*m.x559) + m.x558) == 0)
m.c358 = Constraint(expr=m.x560 - (0.0025*(m.x157*(m.x358 - 10*m.x559) - (1 - m.x157)*m.x559 + m.x158*(m.x359 - 10*
m.x560) - (1 - m.x158)*m.x560) + m.x559) == 0)
m.c359 = Constraint(expr=m.x561 - (0.0025*(m.x158*(m.x359 - 10*m.x560) - (1 - m.x158)*m.x560 + m.x159*(m.x360 - 10*
m.x561) - (1 - m.x159)*m.x561) + m.x560) == 0)
m.c360 = Constraint(expr=m.x562 - (0.0025*(m.x159*(m.x360 - 10*m.x561) - (1 - m.x159)*m.x561 + m.x160*(m.x361 - 10*
m.x562) - (1 - m.x160)*m.x562) + m.x561) == 0)
m.c361 = Constraint(expr=m.x563 - (0.0025*(m.x160*(m.x361 - 10*m.x562) - (1 - m.x160)*m.x562 + m.x161*(m.x362 - 10*
m.x563) - (1 - m.x161)*m.x563) + m.x562) == 0)
m.c362 = Constraint(expr=m.x564 - (0.0025*(m.x161*(m.x362 - 10*m.x563) - (1 - m.x161)*m.x563 + m.x162*(m.x363 - 10*
m.x564) - (1 - m.x162)*m.x564) + m.x563) == 0)
m.c363 = Constraint(expr=m.x565 - (0.0025*(m.x162*(m.x363 - 10*m.x564) - (1 - m.x162)*m.x564 + m.x163*(m.x364 - 10*
m.x565) - (1 - m.x163)*m.x565) + m.x564) == 0)
m.c364 = Constraint(expr=m.x566 - (0.0025*(m.x163*(m.x364 - 10*m.x565) - (1 - m.x163)*m.x565 + m.x164*(m.x365 - 10*
m.x566) - (1 - m.x164)*m.x566) + m.x565) == 0)
m.c365 = Constraint(expr=m.x567 - (0.0025*(m.x164*(m.x365 - 10*m.x566) - (1 - m.x164)*m.x566 + m.x165*(m.x366 - 10*
m.x567) - (1 - m.x165)*m.x567) + m.x566) == 0)
m.c366 = Constraint(expr=m.x568 - (0.0025*(m.x165*(m.x366 - 10*m.x567) - (1 - m.x165)*m.x567 + m.x166*(m.x367 - 10*
m.x568) - (1 - m.x166)*m.x568) + m.x567) == 0)
m.c367 = Constraint(expr=m.x569 - (0.0025*(m.x166*(m.x367 - 10*m.x568) - (1 - m.x166)*m.x568 + m.x167*(m.x368 - 10*
m.x569) - (1 - m.x167)*m.x569) + m.x568) == 0)
m.c368 = Constraint(expr=m.x570 - (0.0025*(m.x167*(m.x368 - 10*m.x569) - (1 - m.x167)*m.x569 + m.x168*(m.x369 - 10*
m.x570) - (1 - m.x168)*m.x570) + m.x569) == 0)
m.c369 = Constraint(expr=m.x571 - (0.0025*(m.x168*(m.x369 - 10*m.x570) - (1 - m.x168)*m.x570 + m.x169*(m.x370 - 10*
m.x571) - (1 - m.x169)*m.x571) + m.x570) == 0)
m.c370 = Constraint(expr=m.x572 - (0.0025*(m.x169*(m.x370 - 10*m.x571) - (1 - m.x169)*m.x571 + m.x170*(m.x371 - 10*
m.x572) - (1 - m.x170)*m.x572) + m.x571) == 0)
m.c371 = Constraint(expr=m.x573 - (0.0025*(m.x170*(m.x371 - 10*m.x572) - (1 - m.x170)*m.x572 + m.x171*(m.x372 - 10*
m.x573) - (1 - m.x171)*m.x573) + m.x572) == 0)
m.c372 = Constraint(expr=m.x574 - (0.0025*(m.x171*(m.x372 - 10*m.x573) - (1 - m.x171)*m.x573 + m.x172*(m.x373 - 10*
m.x574) - (1 - m.x172)*m.x574) + m.x573) == 0)
m.c373 = Constraint(expr=m.x575 - (0.0025*(m.x172*(m.x373 - 10*m.x574) - (1 - m.x172)*m.x574 + m.x173*(m.x374 - 10*
m.x575) - (1 - m.x173)*m.x575) + m.x574) == 0)
m.c374 = Constraint(expr=m.x576 - (0.0025*(m.x173*(m.x374 - 10*m.x575) - (1 - m.x173)*m.x575 + m.x174*(m.x375 - 10*
m.x576) - (1 - m.x174)*m.x576) + m.x575) == 0)
m.c375 = Constraint(expr=m.x577 - (0.0025*(m.x174*(m.x375 - 10*m.x576) - (1 - m.x174)*m.x576 + m.x175*(m.x376 - 10*
m.x577) - (1 - m.x175)*m.x577) + m.x576) == 0)
m.c376 = Constraint(expr=m.x578 - (0.0025*(m.x175*(m.x376 - 10*m.x577) - (1 - m.x175)*m.x577 + m.x176*(m.x377 - 10*
m.x578) - (1 - m.x176)*m.x578) + m.x577) == 0)
m.c377 = Constraint(expr=m.x579 - (0.0025*(m.x176*(m.x377 - 10*m.x578) - (1 - m.x176)*m.x578 + m.x177*(m.x378 - 10*
m.x579) - (1 - m.x177)*m.x579) + m.x578) == 0)
m.c378 = Constraint(expr=m.x580 - (0.0025*(m.x177*(m.x378 - 10*m.x579) - (1 - m.x177)*m.x579 + m.x178*(m.x379 - 10*
m.x580) - (1 - m.x178)*m.x580) + m.x579) == 0)
m.c379 = Constraint(expr=m.x581 - (0.0025*(m.x178*(m.x379 - 10*m.x580) - (1 - m.x178)*m.x580 + m.x179*(m.x380 - 10*
m.x581) - (1 - m.x179)*m.x581) + m.x580) == 0)
m.c380 = Constraint(expr=m.x582 - (0.0025*(m.x179*(m.x380 - 10*m.x581) - (1 - m.x179)*m.x581 + m.x180*(m.x381 - 10*
m.x582) - (1 - m.x180)*m.x582) + m.x581) == 0)
m.c381 = Constraint(expr=m.x583 - (0.0025*(m.x180*(m.x381 - 10*m.x582) - (1 - m.x180)*m.x582 + m.x181*(m.x382 - 10*
m.x583) - (1 - m.x181)*m.x583) + m.x582) == 0)
m.c382 = Constraint(expr=m.x584 - (0.0025*(m.x181*(m.x382 - 10*m.x583) - (1 - m.x181)*m.x583 + m.x182*(m.x383 - 10*
m.x584) - (1 - m.x182)*m.x584) + m.x583) == 0)
m.c383 = Constraint(expr=m.x585 - (0.0025*(m.x182*(m.x383 - 10*m.x584) - (1 - m.x182)*m.x584 + m.x183*(m.x384 - 10*
m.x585) - (1 - m.x183)*m.x585) + m.x584) == 0)
m.c384 = Constraint(expr=m.x586 - (0.0025*(m.x183*(m.x384 - 10*m.x585) - (1 - m.x183)*m.x585 + m.x184*(m.x385 - 10*
m.x586) - (1 - m.x184)*m.x586) + m.x585) == 0)
m.c385 = Constraint(expr=m.x587 - (0.0025*(m.x184*(m.x385 - 10*m.x586) - (1 - m.x184)*m.x586 + m.x185*(m.x386 - 10*
m.x587) - (1 - m.x185)*m.x587) + m.x586) == 0)
m.c386 = Constraint(expr=m.x588 - (0.0025*(m.x185*(m.x386 - 10*m.x587) - (1 - m.x185)*m.x587 + m.x186*(m.x387 - 10*
m.x588) - (1 - m.x186)*m.x588) + m.x587) == 0)
m.c387 = Constraint(expr=m.x589 - (0.0025*(m.x186*(m.x387 - 10*m.x588) - (1 - m.x186)*m.x588 + m.x187*(m.x388 - 10*
m.x589) - (1 - m.x187)*m.x589) + m.x588) == 0)
m.c388 = Constraint(expr=m.x590 - (0.0025*(m.x187*(m.x388 - 10*m.x589) - (1 - m.x187)*m.x589 + m.x188*(m.x389 - 10*
m.x590) - (1 - m.x188)*m.x590) + m.x589) == 0)
m.c389 = Constraint(expr=m.x591 - (0.0025*(m.x188*(m.x389 - 10*m.x590) - (1 - m.x188)*m.x590 + m.x189*(m.x390 - 10*
m.x591) - (1 - m.x189)*m.x591) + m.x590) == 0)
m.c390 = Constraint(expr=m.x592 - (0.0025*(m.x189*(m.x390 - 10*m.x591) - (1 - m.x189)*m.x591 + m.x190*(m.x391 - 10*
m.x592) - (1 - m.x190)*m.x592) + m.x591) == 0)
m.c391 = Constraint(expr=m.x593 - (0.0025*(m.x190*(m.x391 - 10*m.x592) - (1 - m.x190)*m.x592 + m.x191*(m.x392 - 10*
m.x593) - (1 - m.x191)*m.x593) + m.x592) == 0)
m.c392 = Constraint(expr=m.x594 - (0.0025*(m.x191*(m.x392 - 10*m.x593) - (1 - m.x191)*m.x593 + m.x192*(m.x393 - 10*
m.x594) - (1 - m.x192)*m.x594) + m.x593) == 0)
m.c393 = Constraint(expr=m.x595 - (0.0025*(m.x192*(m.x393 - 10*m.x594) - (1 - m.x192)*m.x594 + m.x193*(m.x394 - 10*
m.x595) - (1 - m.x193)*m.x595) + m.x594) == 0)
m.c394 = Constraint(expr=m.x596 - (0.0025*(m.x193*(m.x394 - 10*m.x595) - (1 - m.x193)*m.x595 + m.x194*(m.x395 - 10*
m.x596) - (1 - m.x194)*m.x596) + m.x595) == 0)
m.c395 = Constraint(expr=m.x597 - (0.0025*(m.x194*(m.x395 - 10*m.x596) - (1 - m.x194)*m.x596 + m.x195*(m.x396 - 10*
m.x597) - (1 - m.x195)*m.x597) + m.x596) == 0)
m.c396 = Constraint(expr=m.x598 - (0.0025*(m.x195*(m.x396 - 10*m.x597) - (1 - m.x195)*m.x597 + m.x196*(m.x397 - 10*
m.x598) - (1 - m.x196)*m.x598) + m.x597) == 0)
m.c397 = Constraint(expr=m.x599 - (0.0025*(m.x196*(m.x397 - 10*m.x598) - (1 - m.x196)*m.x598 + m.x197*(m.x398 - 10*
m.x599) - (1 - m.x197)*m.x599) + m.x598) == 0)
m.c398 = Constraint(expr=m.x600 - (0.0025*(m.x197*(m.x398 - 10*m.x599) - (1 - m.x197)*m.x599 + m.x198*(m.x399 - 10*
m.x600) - (1 - m.x198)*m.x600) + m.x599) == 0)
m.c399 = Constraint(expr=m.x601 - (0.0025*(m.x198*(m.x399 - 10*m.x600) - (1 - m.x198)*m.x600 + m.x199*(m.x400 - 10*
m.x601) - (1 - m.x199)*m.x601) + m.x600) == 0)
m.c400 = Constraint(expr=m.x602 - (0.0025*(m.x199*(m.x400 - 10*m.x601) - (1 - m.x199)*m.x601 + m.x200*(m.x401 - 10*
m.x602) - (1 - m.x200)*m.x602) + m.x601) == 0)
m.c401 = Constraint(expr=m.x603 - (0.0025*(m.x200*(m.x401 - 10*m.x602) - (1 - m.x200)*m.x602 + m.x201*(m.x402 - 10*
m.x603) - (1 - m.x201)*m.x603) + m.x602) == 0)
| 58.860123
| 120
| 0.591868
| 18,130
| 95,942
| 3.132101
| 0.059294
| 0.028212
| 0.148666
| 0.21238
| 0.714044
| 0.713674
| 0.713357
| 0.713357
| 0.594418
| 0.192304
| 0
| 0.243963
| 0.161379
| 95,942
| 1,629
| 121
| 58.896255
| 0.4618
| 0.007067
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.000829
| 0
| 0.000829
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
dbac5d91f0e3d701f46b76233a8884d353a0a332
| 40,585
|
py
|
Python
|
src/azure-cli/azure/cli/command_modules/servicebus/tests/latest/test_servicebus_commands.py
|
psignoret/azure-cli
|
1a4a043750315f9a7f2894b4287126089978b615
|
[
"MIT"
] | 2
|
2020-08-08T11:00:25.000Z
|
2020-08-08T11:00:30.000Z
|
src/azure-cli/azure/cli/command_modules/servicebus/tests/latest/test_servicebus_commands.py
|
psignoret/azure-cli
|
1a4a043750315f9a7f2894b4287126089978b615
|
[
"MIT"
] | 2
|
2021-01-15T09:24:07.000Z
|
2021-01-15T09:30:10.000Z
|
src/azure-cli/azure/cli/command_modules/servicebus/tests/latest/test_servicebus_commands.py
|
psignoret/azure-cli
|
1a4a043750315f9a7f2894b4287126089978b615
|
[
"MIT"
] | 1
|
2020-12-14T15:30:14.000Z
|
2020-12-14T15:30:14.000Z
|
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# AZURE CLI SERVICEBUS - CURD TEST DEFINITIONS
import time
from azure.cli.testsdk import (ScenarioTest, ResourceGroupPreparer, live_only)
from knack.util import CLIError
# pylint: disable=line-too-long
# pylint: disable=too-many-lines
class SBNamespaceCURDScenarioTest(ScenarioTest):
from azure_devtools.scenario_tests import AllowLargeResponse
@AllowLargeResponse()
@ResourceGroupPreparer(name_prefix='cli_test_sb_namespace')
def test_sb_namespace(self, resource_group):
self.kwargs.update({
'namespacename': self.create_random_name(prefix='sb-nscli', length=20),
'tags': {'tag1=value1'},
'tags2': {'tag2=value2'},
'sku': 'Standard',
'tier': 'Standard',
'authoname': self.create_random_name(prefix='cliAutho', length=20),
'defaultauthorizationrule': 'RootManageSharedAccessKey',
'accessrights': 'Send',
'accessrights1': 'Listen',
'primary': 'PrimaryKey',
'secondary': 'SecondaryKey'
})
# Check for the NameSpace name Availability
self.cmd('servicebus namespace exists --name {namespacename}',
checks=[self.check('nameAvailable', True)])
# Create Namespace
self.cmd(
'servicebus namespace create --resource-group {rg} --name {namespacename} --tags {tags} --sku {sku}',
checks=[self.check('sku.name', '{sku}')])
# Get Created Namespace
self.cmd('servicebus namespace show --resource-group {rg} --name {namespacename}',
checks=[self.check('sku.name', '{sku}')])
# Update Namespace
self.cmd(
'servicebus namespace update --resource-group {rg} --name {namespacename} --tags {tags}',
checks=[self.check('sku.name', '{sku}')])
# Get Created Namespace list by subscription
listnamespaceresult = self.cmd('servicebus namespace list').output
self.assertGreater(len(listnamespaceresult), 0)
# Get Created Namespace list by ResourceGroup
listnamespacebyresourcegroupresult = self.cmd('servicebus namespace list --resource-group {rg}').output
self.assertGreater(len(listnamespacebyresourcegroupresult), 0)
# Create Authoriazation Rule
self.cmd(
'servicebus namespace authorization-rule create --resource-group {rg} --namespace-name {namespacename} --name {authoname} --rights {accessrights}',
checks=[self.check('name', '{authoname}')])
# Get Authorization Rule
self.cmd(
'servicebus namespace authorization-rule show --resource-group {rg} --namespace-name {namespacename} --name {authoname}',
checks=[self.check('name', '{authoname}')])
# Update Authoriazation Rule
self.cmd(
'servicebus namespace authorization-rule create --resource-group {rg} --namespace-name {namespacename} --name {authoname} --rights {accessrights1}',
checks=[self.check('name', '{authoname}')])
# Get Default Authorization Rule
self.cmd(
'servicebus namespace authorization-rule show --resource-group {rg} --namespace-name {namespacename} --name {defaultauthorizationrule}',
checks=[self.check('name', self.kwargs['defaultauthorizationrule'])])
# Get Authorization Rule Listkeys
self.cmd(
'servicebus namespace authorization-rule keys list --resource-group {rg} --namespace-name {namespacename} --name {authoname}')
# Regeneratekeys - Primary
self.cmd(
'servicebus namespace authorization-rule keys renew --resource-group {rg} --namespace-name {namespacename} --name {authoname} --key {primary}')
# Regeneratekeys - Secondary
self.cmd(
'servicebus namespace authorization-rule keys renew --resource-group {rg} --namespace-name {namespacename} --name {authoname} --key {secondary}')
# Delete Authorization Rule
self.cmd(
'servicebus namespace authorization-rule delete --resource-group {rg} --namespace-name {namespacename} --name {authoname}')
# Delete Namespace list by ResourceGroup
self.cmd('servicebus namespace delete --resource-group {rg} --name {namespacename}')
@ResourceGroupPreparer(name_prefix='cli_test_sb_queue')
def test_sb_queue(self, resource_group):
self.kwargs.update({
'namespacename': self.create_random_name(prefix='sb-nscli', length=20),
'tags': {'tag1=value1', 'tag2=value2'},
'sku': 'Standard',
'tier': 'Standard',
'authoname': self.create_random_name(prefix='cliAutho', length=20),
'defaultauthorizationrule': 'RootManageSharedAccessKey',
'accessrights': 'Listen',
'accessrights1': 'Send',
'primary': 'PrimaryKey',
'secondary': 'SecondaryKey',
'queuename': self.create_random_name(prefix='sb-queuecli', length=25),
'queueauthoname': self.create_random_name(prefix='cliQueueAutho', length=25),
'lockduration': 'PT10M',
'lockduration1': 'PT11M'
})
# Create Namespace
self.cmd(
'servicebus namespace create --resource-group {rg} --name {namespacename} --tags {tags} --sku {sku}',
checks=[self.check('sku.name', '{sku}')])
# Get Created Namespace
self.cmd('servicebus namespace show --resource-group {rg} --name {namespacename}',
checks=[self.check('sku.name', '{sku}')])
# Create Queue
self.cmd(
'servicebus queue create --resource-group {rg} --namespace-name {namespacename} --name {queuename} --auto-delete-on-idle {lockduration} --max-size 1024 ',
checks=[self.check('name', '{queuename}')])
# Get Queue
self.cmd('servicebus queue show --resource-group {rg} --namespace-name {namespacename} --name {queuename}',
checks=[self.check('name', '{queuename}')])
# Update Queue
self.cmd(
'servicebus queue update --resource-group {rg} --namespace-name {namespacename} --name {queuename} --auto-delete-on-idle {lockduration1} ',
checks=[self.check('name', '{queuename}')])
# Queue List
self.cmd('servicebus queue list --resource-group {rg} --namespace-name {namespacename}')
# Create Authoriazation Rule
self.cmd(
'servicebus queue authorization-rule create --resource-group {rg} --namespace-name {namespacename} --queue-name {queuename} --name {authoname} --rights {accessrights}',
checks=[self.check('name', '{authoname}')])
# Get Create Authorization Rule
self.cmd(
'servicebus queue authorization-rule show --resource-group {rg} --namespace-name {namespacename} --queue-name {queuename} --name {authoname}',
checks=[self.check('name', '{authoname}')])
# Update Authoriazation Rule
self.cmd(
'servicebus queue authorization-rule update --resource-group {rg} --namespace-name {namespacename} --queue-name {queuename} --name {authoname} --rights {accessrights1}',
checks=[self.check('name', '{authoname}')])
# Get Authorization Rule Listkeys
self.cmd(
'servicebus queue authorization-rule keys list --resource-group {rg} --namespace-name {namespacename} --queue-name {queuename} --name {authoname}')
# Regeneratekeys - Primary
regenrateprimarykeyresult = self.cmd(
'servicebus queue authorization-rule keys renew --resource-group {rg} --namespace-name {namespacename} --queue-name {queuename} --name {authoname} --key {primary}')
self.assertIsNotNone(regenrateprimarykeyresult)
# Regeneratekeys - Secondary
regenratesecondarykeyresult = self.cmd(
'servicebus queue authorization-rule keys renew --resource-group {rg} --namespace-name {namespacename} --queue-name {queuename} --name {authoname} --key {secondary}')
self.assertIsNotNone(regenratesecondarykeyresult)
# Delete Queue Authorization Rule
self.cmd(
'servicebus queue authorization-rule delete --resource-group {rg} --namespace-name {namespacename} --queue-name {queuename} --name {authoname}')
# Delete Queue
self.cmd('servicebus queue delete --resource-group {rg} --namespace-name {namespacename} --name {queuename}')
# Delete Namespace
self.cmd('servicebus namespace delete --resource-group {rg} --name {namespacename}')
@ResourceGroupPreparer(name_prefix='cli_test_sb_topic')
def test_sb_topic(self, resource_group):
self.kwargs.update({
'namespacename': self.create_random_name(prefix='sb-nscli', length=20),
'tags': {'tag1: value1', 'tag2: value2'},
'sku': 'Premium',
'tier': 'Premium',
'authoname': self.create_random_name(prefix='cliAutho', length=20),
'defaultauthorizationrule': 'RootManageSharedAccessKey',
'accessrights': 'Send',
'accessrights1': 'Listen',
'primary': 'PrimaryKey',
'secondary': 'SecondaryKey',
'topicname': self.create_random_name(prefix='sb-topiccli', length=25),
'topicauthoname': self.create_random_name(prefix='cliTopicAutho', length=25)
})
# Create Namespace
self.cmd(
'servicebus namespace create --resource-group {rg} --name {namespacename} --tags {tags} --sku {sku}',
checks=[self.check('sku.name', '{sku}')])
# Get Created Namespace
self.cmd('servicebus namespace show --resource-group {rg} --name {namespacename}',
checks=[self.check('sku.name', '{sku}')])
# Create Topic
self.cmd(
'servicebus topic create --resource-group {rg} --namespace-name {namespacename} --name {topicname}',
checks=[self.check('name', '{topicname}')])
# Get Topic
self.cmd(
'servicebus topic show --resource-group {rg} --namespace-name {namespacename} --name {topicname}',
checks=[self.check('name', '{topicname}')])
# update Topic
self.cmd(
'servicebus topic update --resource-group {rg} --namespace-name {namespacename} --name {topicname} --enable-ordering True',
checks=[self.check('name', '{topicname}')])
# Topic List
self.cmd('servicebus topic list --resource-group {rg} --namespace-name {namespacename}')
# Create Authoriazation Rule
self.cmd(
'servicebus topic authorization-rule create --resource-group {rg} --namespace-name {namespacename} --topic-name {topicname} --name {authoname} --rights {accessrights}',
checks=[self.check('name', '{authoname}')])
# Get Create Authorization Rule
self.cmd(
'servicebus topic authorization-rule show --resource-group {rg} --namespace-name {namespacename} --topic-name {topicname} --name {authoname}',
checks=[self.check('name', '{authoname}')])
# Update Authoriazation Rule
self.cmd(
'servicebus topic authorization-rule update --resource-group {rg} --namespace-name {namespacename} --topic-name {topicname} --name {authoname} --rights {accessrights1}',
checks=[self.check('name', '{authoname}')])
# Get Authorization Rule Listkeys
self.cmd(
'servicebus topic authorization-rule keys list --resource-group {rg} --namespace-name {namespacename} --topic-name {topicname} --name {authoname}')
# Regeneratekeys - Primary
self.cmd(
'servicebus topic authorization-rule keys renew --resource-group {rg} --namespace-name {namespacename} --topic-name {topicname} --name {authoname} --key {primary}')
# Regeneratekeys - Secondary
self.cmd(
'servicebus topic authorization-rule keys renew --resource-group {rg} --namespace-name {namespacename} --topic-name {topicname} --name {authoname} --key {secondary}')
# Delete Topic Authorization Rule
self.cmd(
'servicebus topic authorization-rule delete --resource-group {rg} --namespace-name {namespacename} --topic-name {topicname} --name {authoname}')
# Delete Topic
self.cmd('servicebus topic delete --resource-group {rg} --namespace-name {namespacename} --name {topicname}')
@ResourceGroupPreparer(name_prefix='cli_test_sb_subscription')
def test_sb_subscription(self, resource_group):
self.kwargs.update({
'namespacename': self.create_random_name(prefix='sb-nscli', length=20),
'tags': {'tag1: value1', 'tag2: value2'},
'sku': 'Standard',
'tier': 'Standard',
'authoname': self.create_random_name(prefix='cliAutho', length=20),
'defaultauthorizationrule': 'RootManageSharedAccessKey',
'accessrights': 'Send, Listen',
'primary': 'PrimaryKey',
'secondary': 'SecondaryKey',
'topicname': self.create_random_name(prefix='sb-topiccli', length=25),
'topicauthoname': self.create_random_name(prefix='cliTopicAutho', length=25),
'subscriptionname': self.create_random_name(prefix='sb-subscli', length=25),
'lockduration': 'PT3M'
})
# Create Namespace
self.cmd(
'servicebus namespace create --resource-group {rg} --name {namespacename} --tags {tags} --sku {sku}',
checks=[self.check('sku.name', '{sku}')])
# Get Created Namespace
self.cmd('servicebus namespace show --resource-group {rg} --name {namespacename}',
checks=[self.check('sku.name', '{sku}')])
# Create Topic
self.cmd('servicebus topic create --resource-group {rg} --namespace-name {namespacename} --name {topicname}',
checks=[self.check('name', '{topicname}')])
# Get Topic
self.cmd('servicebus topic show --resource-group {rg} --namespace-name {namespacename} --name {topicname}',
checks=[self.check('name', '{topicname}')])
# Create Subscription
self.cmd(
'servicebus topic subscription create --resource-group {rg} --namespace-name {namespacename} --topic-name {topicname} --name {subscriptionname}',
checks=[self.check('name', '{subscriptionname}')])
# Get Create Subscription
self.cmd(
'servicebus topic subscription show --resource-group {rg} --namespace-name {namespacename} --topic-name {topicname} --name {subscriptionname}',
checks=[self.check('name', '{subscriptionname}')])
# Get list of Subscription+
self.cmd(
'servicebus topic subscription list --resource-group {rg} --namespace-name {namespacename} --topic-name {topicname}')
# update Subscription
self.cmd(
'servicebus topic subscription update --resource-group {rg} --namespace-name {namespacename} --topic-name {topicname} --name {subscriptionname} --lock-duration {lockduration}',
checks=[self.check('name', '{subscriptionname}')])
# Delete Subscription
self.cmd(
'servicebus topic subscription delete --resource-group {rg} --namespace-name {namespacename} --topic-name {topicname} --name {subscriptionname}')
# Delete Topic
self.cmd('servicebus topic delete --resource-group {rg} --namespace-name {namespacename} --name {topicname}')
# Delete Namespace
self.cmd('servicebus namespace delete --resource-group {rg} --name {namespacename}')
@ResourceGroupPreparer(name_prefix='cli_test_sb_rules')
def test_sb_rules(self, resource_group):
self.kwargs.update({
'namespacename': self.create_random_name(prefix='sb-nscli', length=20),
'tags': {'tag1: value1', 'tag2: value2'},
'sku': 'Standard',
'tier': 'Standard',
'authoname': self.create_random_name(prefix='cliAutho', length=20),
'defaultauthorizationrule': 'RootManageSharedAccessKey',
'accessrights': 'Listen',
'primary': 'PrimaryKey',
'secondary': 'SecondaryKey',
'topicname': self.create_random_name(prefix='sb-topiccli', length=25),
'topicauthoname': self.create_random_name(prefix='cliTopicAutho', length=25),
'subscriptionname': self.create_random_name(prefix='sb-subscli', length=25),
'rulename': self.create_random_name(prefix='sb-rulecli', length=25),
'sqlexpression': 'test=test',
'sqlexpression1': 'test1=test1'
})
# Create Namespace
self.cmd(
'servicebus namespace create --resource-group {rg} --name {namespacename} --tags {tags} --sku {sku}',
checks=[self.check('sku.name', '{sku}')])
# Get Created Namespace
self.cmd('servicebus namespace show --resource-group {rg} --name {namespacename}',
checks=[self.check('sku.name', '{sku}')])
# Create Topic
self.cmd('servicebus topic create --resource-group {rg} --namespace-name {namespacename} --name {topicname} ',
checks=[self.check('name', '{topicname}')])
# Get Topic
self.cmd('servicebus topic show --resource-group {rg} --namespace-name {namespacename} --name {topicname} ',
checks=[self.check('name', '{topicname}')])
# Create Subscription
self.cmd(
'servicebus topic subscription create --resource-group {rg} --namespace-name {namespacename} --topic-name {topicname} --name {subscriptionname}',
checks=[self.check('name', '{subscriptionname}')])
# Get Create Subscription
self.cmd(
'servicebus topic subscription show --resource-group {rg} --namespace-name {namespacename} --topic-name {topicname} --name {subscriptionname}',
checks=[self.check('name', '{subscriptionname}')])
# Create Rules
self.cmd(
'servicebus topic subscription rule create --resource-group {rg} --namespace-name {namespacename} --topic-name {topicname} --subscription-name {subscriptionname} --name {rulename} --filter-sql-expression {sqlexpression}',
checks=[self.check('name', '{rulename}')])
# Get Created Rules
self.cmd(
'servicebus topic subscription rule show --resource-group {rg} --namespace-name {namespacename} --topic-name {topicname} --subscription-name {subscriptionname} --name {rulename}',
checks=[self.check('name', '{rulename}')])
# Update Rules
self.cmd(
'servicebus topic subscription rule update --resource-group {rg} --namespace-name {namespacename} --topic-name {topicname} --subscription-name {subscriptionname} --name {rulename} --filter-sql-expression {sqlexpression1}',
checks=[self.check('name', '{rulename}')])
# Get Rules List By Subscription
self.cmd(
'servicebus topic subscription rule list --resource-group {rg} --namespace-name {namespacename} --topic-name {topicname} --subscription-name {subscriptionname}')
# Delete create rule
self.cmd(
'servicebus topic subscription rule delete --resource-group {rg} --namespace-name {namespacename} --topic-name {topicname} --subscription-name {subscriptionname} --name {rulename}')
# Delete create Subscription
self.cmd(
'servicebus topic subscription delete --resource-group {rg} --namespace-name {namespacename} --topic-name {topicname} --name {subscriptionname}')
# Delete Topic
self.cmd('servicebus topic delete --resource-group {rg} --namespace-name {namespacename} --name {topicname}')
# Delete Namespace
self.cmd('servicebus namespace delete --resource-group {rg} --name {namespacename}')
@ResourceGroupPreparer(name_prefix='cli_test_sb_alias')
def test_sb_alias(self, resource_group):
from azure.mgmt.servicebus.models import ProvisioningStateDR
self.kwargs.update({
'loc_south': 'SouthCentralUS',
'loc_north': 'NorthCentralUS',
'namespacenameprimary': self.create_random_name(prefix='sb-nscli', length=20),
'namespacenamesecondary': self.create_random_name(prefix='sb-nscli', length=20),
'tags': {'tag1: value1', 'tag2: value2'},
'sku': 'Premium',
'tier': 'Premium',
'authoname': self.create_random_name(prefix='cliAutho', length=20),
'defaultauthorizationrule': 'RootManageSharedAccessKey',
'accessrights': 'Send',
'primary': 'PrimaryKey',
'secondary': 'SecondaryKey',
'aliasname': self.create_random_name(prefix='cliAlias', length=20),
'alternatename': self.create_random_name(prefix='cliAlter', length=20),
'id': '',
'test': ''
})
self.cmd('servicebus namespace exists --name {namespacenameprimary}',
checks=[self.check('nameAvailable', True)])
# Create Namespace - Primary
self.cmd(
'servicebus namespace create --resource-group {rg} --name {namespacenameprimary} --location {loc_south} --tags {tags} --sku {sku}',
checks=[self.check('sku.name', '{sku}')])
# Get Created Namespace - Primary
self.cmd('servicebus namespace show --resource-group {rg} --name {namespacenameprimary}',
checks=[self.check('sku.name', '{sku}')])
# Create Namespace - Secondary
self.cmd(
'servicebus namespace create --resource-group {rg} --name {namespacenamesecondary} --location {loc_north} --tags {tags} --sku {sku}',
checks=[self.check('sku.name', '{sku}')])
# Get Created Namespace - Secondary
getnamespace2result = self.cmd(
'servicebus namespace show --resource-group {rg} --name {namespacenamesecondary}',
checks=[self.check('sku.name', '{sku}')]).get_output_in_json()
# Create Authoriazation Rule
self.cmd(
'servicebus namespace authorization-rule create --resource-group {rg} --namespace-name {namespacenameprimary} --name {authoname} --rights {accessrights}',
checks=[self.check('name', '{authoname}')])
partnernamespaceid = getnamespace2result['id']
self.kwargs.update({'id': partnernamespaceid})
# Get Create Authorization Rule
self.cmd(
'servicebus namespace authorization-rule show --resource-group {rg} --namespace-name {namespacenameprimary} --name {authoname}',
checks=[self.check('name', '{authoname}')])
# CheckNameAvailability - Alias
self.cmd(
'servicebus georecovery-alias exists --resource-group {rg} --namespace-name {namespacenameprimary} --alias {aliasname}',
checks=[self.check('nameAvailable', True)])
# Create alias
self.cmd(
'servicebus georecovery-alias set --resource-group {rg} --namespace-name {namespacenameprimary} -a {aliasname} --partner-namespace {namespacenamesecondary}')
# get alias - Primary
self.cmd(
'servicebus georecovery-alias show --resource-group {rg} --namespace-name {namespacenameprimary} --alias {aliasname}')
# get alias - Secondary
self.cmd(
'servicebus georecovery-alias show --resource-group {rg} --namespace-name {namespacenamesecondary} --alias {aliasname}')
getaliasprimarynamespace = self.cmd(
'servicebus georecovery-alias show --resource-group {rg} --namespace-name {namespacenameprimary} --alias {aliasname}').get_output_in_json()
# check for the Alias Provisioning succeeded
while getaliasprimarynamespace['provisioningState'] != ProvisioningStateDR.succeeded.value:
time.sleep(30)
getaliasprimarynamespace = self.cmd(
'servicebus georecovery-alias show --resource-group {rg} --namespace-name {namespacenameprimary} --alias {aliasname}').get_output_in_json()
# Get Authorization Rule
self.cmd(
'servicebus georecovery-alias authorization-rule show --resource-group {rg} --namespace-name {namespacenameprimary} --alias {aliasname} --name {authoname}',
checks=[self.check('name', '{authoname}')])
# Get Authorization Rule Keys
self.cmd(
'servicebus georecovery-alias authorization-rule keys list --resource-group {rg} --namespace-name {namespacenameprimary} --alias {aliasname} --name {authoname}')
# Get available Authorization Rules
self.cmd(
'servicebus georecovery-alias authorization-rule list --resource-group {rg} --namespace-name {namespacenameprimary} --alias {aliasname}')
# Break Pairing
self.cmd(
'servicebus georecovery-alias break-pair --resource-group {rg} --namespace-name {namespacenameprimary} --alias {aliasname}')
getaliasafterbreak = self.cmd(
'servicebus georecovery-alias show --resource-group {rg} --namespace-name {namespacenameprimary} --alias {aliasname}').get_output_in_json()
# check for the Alias Provisioning succeeded
while getaliasafterbreak['provisioningState'] != ProvisioningStateDR.succeeded.value:
time.sleep(30)
getaliasafterbreak = self.cmd(
'servicebus georecovery-alias show --resource-group {rg} --namespace-name {namespacenameprimary} --alias {aliasname}').get_output_in_json()
# Create alias
self.cmd(
'servicebus georecovery-alias set --resource-group {rg} --namespace-name {namespacenameprimary} --alias {aliasname} --partner-namespace {id}')
getaliasaftercreate = self.cmd(
'servicebus georecovery-alias show --resource-group {rg} --namespace-name {namespacenameprimary} --alias {aliasname}').get_output_in_json()
# check for the Alias Provisioning succeeded
while getaliasaftercreate['provisioningState'] != ProvisioningStateDR.succeeded.value:
time.sleep(30)
getaliasaftercreate = self.cmd(
'servicebus georecovery-alias show --resource-group {rg} --namespace-name {namespacenameprimary} --alias {aliasname}').get_output_in_json()
# FailOver
self.cmd(
'servicebus georecovery-alias fail-over --resource-group {rg} --namespace-name {namespacenamesecondary} --alias {aliasname}')
getaliasafterfail = self.cmd(
'servicebus georecovery-alias show --resource-group {rg} --namespace-name {namespacenamesecondary} --alias {aliasname}').get_output_in_json()
# check for the Alias Provisioning succeeded
while getaliasafterfail['provisioningState'] != ProvisioningStateDR.succeeded.value:
time.sleep(30)
getaliasafterfail = self.cmd(
'servicebus georecovery-alias show --resource-group {rg} --namespace-name {namespacenamesecondary} --alias {aliasname}').get_output_in_json()
# Delete Alias
self.cmd(
'servicebus georecovery-alias delete --resource-group {rg} --namespace-name {namespacenamesecondary} --alias {aliasname}')
time.sleep(30)
# Delete Namespace - primary
self.cmd('servicebus namespace delete --resource-group {rg} --name {namespacenameprimary}')
# Delete Namespace - secondary
self.cmd('servicebus namespace delete --resource-group {rg} --name {namespacenamesecondary}')
# Test playback fails and the live-only flag will be removed once it is addressed
@live_only()
@ResourceGroupPreparer(name_prefix='cli_test_sb_migration')
def test_sb_migration(self, resource_group):
from azure.mgmt.servicebus.models import ProvisioningStateDR
self.kwargs.update({
'loc_south': 'SouthCentralUS',
'loc_north': 'NorthCentralUS',
'namespacenamestandard': self.create_random_name(prefix='sb-std-nscli', length=20),
'namespacenamepremium': self.create_random_name(prefix='sb-pre-nscli', length=20),
'tags': {'tag1: value1', 'tag2: value2'},
'sku': 'Premium',
'sku_std': 'Standard',
'authoname': self.create_random_name(prefix='cliAutho', length=20),
'defaultauthorizationrule': 'RootManageSharedAccessKey',
'accessrights': 'Send',
'primary': 'PrimaryKey',
'secondary': 'SecondaryKey',
'postmigrationname': self.create_random_name(prefix='clipostmigration', length=20),
'alternatename': self.create_random_name(prefix='cliAlter', length=20),
'id': '',
'test': '',
'queuename': '',
'topicname': '',
'partnernamespaceid': ''
})
self.cmd('servicebus namespace exists --name {namespacenamestandard}',
checks=[self.check('nameAvailable', True)])
# Create Namespace - Standard
self.cmd(
'servicebus namespace create --resource-group {rg} --name {namespacenamestandard} --location {loc_south} --tags {tags} --sku {sku_std}',
checks=[self.check('sku.name', '{sku_std}')])
# Get Created Namespace - Standard
self.cmd('servicebus namespace show --resource-group {rg} --name {namespacenamestandard}',
checks=[self.check('sku.name', '{sku_std}')])
# Create Namespace - Primary
self.cmd(
'servicebus namespace create --resource-group {rg} --name {namespacenamepremium} --location {loc_north} --tags {tags} --sku {sku}',
checks=[self.check('sku.name', '{sku}')])
# Get Created Namespace - Primary
getnamespace2result = self.cmd(
'servicebus namespace show --resource-group {rg} --name {namespacenamepremium}',
checks=[self.check('sku.name', '{sku}')]).get_output_in_json()
# Create Authoriazation Rule
self.cmd(
'servicebus namespace authorization-rule create --resource-group {rg} --namespace-name {namespacenamestandard} --name {authoname} --rights {accessrights}',
checks=[self.check('name', '{authoname}')])
partnernamespaceid = getnamespace2result['id']
self.kwargs.update({'id': partnernamespaceid})
# Get Create Authorization Rule
self.cmd(
'servicebus namespace authorization-rule show --resource-group {rg} --namespace-name {namespacenamestandard} --name {authoname}',
checks=[self.check('name', '{authoname}')])
# Create Queues under Standrad namespace
for x in range(0, 10):
queuenamestr = 'queue' + repr(x)
self.kwargs.update({'queuename': queuenamestr})
self.cmd(
'servicebus queue create --resource-group {rg} --namespace-name {namespacenamestandard} --name {queuename}',
checks=[self.check('name', '{queuename}')])
# Create Topics under Standrad namespace
for x in range(0, 10):
topicnamestr = 'topic' + repr(x)
self.kwargs.update({'topicname': topicnamestr})
self.cmd(
'servicebus topic create --resource-group {rg} --namespace-name {namespacenamestandard} --name {topicname}',
checks=[self.check('name', '{topicname}')])
time.sleep(10)
# Create Migration
self.cmd(
'servicebus migration start --resource-group {rg} --name {namespacenamestandard} --target-namespace {id} --post-migration-name {postmigrationname}')
# get Migration
getmigration = self.cmd(
'servicebus migration show --resource-group {rg} --name {namespacenamestandard}').get_output_in_json()
# Complete Migration
self.cmd(
'servicebus migration complete --resource-group {rg} --name {namespacenamestandard}')
# get Migration
getmigration = self.cmd(
'servicebus migration show --resource-group {rg} --name {namespacenamestandard}').get_output_in_json()
# check for the migration provisioning succeeded
while getmigration['provisioningState'] != ProvisioningStateDR.succeeded.value:
time.sleep(30)
getmigration = self.cmd(
'servicebus migration show --resource-group {rg} --name {namespacenamestandard}').get_output_in_json()
# check for the migration PendingReplicationOperationsCount is 0 or null
while getmigration['migrationState'] != 'Active':
time.sleep(30)
getmigration = self.cmd(
'servicebus migration show --resource-group {rg} --name {namespacenamestandard}').get_output_in_json()
# Get Authorization Rule - Premium
self.cmd(
'servicebus namespace authorization-rule show --resource-group {rg} --namespace-name {namespacenamepremium} --name {authoname}',
checks=[self.check('name', '{authoname}')])
# Get all queues from Premium namespace
listqueues1 = self.cmd(
'servicebus queue list --resource-group {rg} --namespace-name {namespacenamepremium}').get_output_in_json()
self.assertIsNotNone(listqueues1)
self.assertGreaterEqual(len(listqueues1), 10, 'Premium - get all queues count not 10')
# Get all queues from Premium namespace
listtopics = self.cmd(
'servicebus topic list --resource-group {rg} --namespace-name {namespacenamepremium}').get_output_in_json()
self.assertIsNotNone(listtopics)
self.assertGreaterEqual(len(listtopics), 10, 'Premium - get all topics count not 10')
time.sleep(30)
# get namespace
getnamespace = self.cmd(
'servicebus namespace show --resource-group {rg} --name {namespacenamestandard}').get_output_in_json()
# check for the namespace provisioning succeeded
while getnamespace['provisioningState'] != ProvisioningStateDR.succeeded.value:
time.sleep(30)
getnamespace = self.cmd(
'servicebus namespace show --resource-group {rg} --name {namespacenamestandard}').get_output_in_json()
# Delete Namespace - Standard
self.cmd('servicebus namespace delete --resource-group {rg} --name {namespacenamestandard}')
# get namespace
getnamespace = self.cmd(
'servicebus namespace show --resource-group {rg} --name {namespacenamepremium}').get_output_in_json()
# check for the namespace provisioning succeeded
while getnamespace['provisioningState'] != ProvisioningStateDR.succeeded.value:
time.sleep(30)
getnamespace = self.cmd(
'servicebus namespace show --resource-group {rg} --name {namespacenamepremium}').get_output_in_json()
# Delete Namespace - Premium
self.cmd('servicebus namespace delete --resource-group {rg} --name {namespacenamepremium}')
@ResourceGroupPreparer(name_prefix='cli_test_sb_network')
def test_sb_network(self, resource_group):
self.kwargs.update({
'namespacename': self.create_random_name(prefix='servicebus-cli', length=20),
'namespacenamekafka': self.create_random_name(prefix='servicebus-cli1', length=20),
'tags': {'tag1=value1'},
'tags2': {'tag2=value2'},
'sku': 'Premium',
'tier': 'Premium',
'authoname': self.create_random_name(prefix='cliAutho', length=20),
'defaultauthorizationrule': 'RootManageSharedAccessKey',
'accessrights': 'Send',
'namevnet': 'sbehvnettest1',
'namevnet1': 'sbehvnettest2',
'namesubnet1': 'default',
'namesubnet2': 'secondvnet',
'isautoinflateenabled': 'True',
'maximumthroughputunits': 4,
'maximumthroughputunits_update': 5,
'varfalse': 'false',
'ipmask1': '1.1.1.1',
'ipmask2': '2.2.2.2'
})
self.cmd('network vnet create --resource-group {rg} --name {namevnet}')
self.cmd('network vnet create --resource-group {rg} --name {namevnet1}')
created_subnet1 = self.cmd(
'network vnet subnet create --resource-group {rg} --name {namesubnet1} --vnet-name {namevnet} --address-prefixes 10.0.0.0/24').get_output_in_json()
created_subnet2 = self.cmd(
'network vnet subnet create --resource-group {rg} --name {namesubnet2} --vnet-name {namevnet1} --address-prefixes 10.0.0.0/24').get_output_in_json()
# Check for the NameSpace name Availability
self.cmd('servicebus namespace exists --name {namespacename}',
checks=[self.check('nameAvailable', True)])
# Create Namespace
self.cmd(
'servicebus namespace create --resource-group {rg} --name {namespacename} --tags {tags} --sku {sku} --default-action Allow',
checks=[self.check('sku.name', '{sku}')])
# Get Created Namespace
self.cmd('servicebus namespace show --resource-group {rg} --name {namespacename}',
checks=[self.check('sku.name', '{sku}')])
# Update Namespace
self.cmd(
'servicebus namespace update --resource-group {rg} --name {namespacename} --tags {tags} --default-action Deny',
checks=[self.check('sku.name', '{sku}')])
# Get NetworkRule
self.cmd(
'servicebus namespace network-rule list --resource-group {rg} --name {namespacename}').get_output_in_json()
# add IP Rule
iprule = self.cmd(
'servicebus namespace network-rule add --resource-group {rg} --name {namespacename} --ip-address {ipmask1} --action Allow').get_output_in_json()
self.assertEqual(len(iprule['ipRules']), 1)
# add IP Rule
iprule = self.cmd(
'servicebus namespace network-rule add --resource-group {rg} --name {namespacename} --ip-address {ipmask2} --action Allow').get_output_in_json()
self.assertEqual(len(iprule['ipRules']), 2)
self.assertTrue(iprule['ipRules'][0]['ipMask'] == '1.1.1.1')
self.assertTrue(iprule['ipRules'][1]['ipMask'] == '2.2.2.2')
# Get list of IP rule
iprule = self.cmd(
'servicebus namespace network-rule list --resource-group {rg} --name {namespacename}').get_output_in_json()
self.assertEqual(len(iprule['ipRules']), 2)
# Remove IPRule
iprule = self.cmd(
'servicebus namespace network-rule remove --resource-group {rg} --name {namespacename} --ip-address {ipmask2}').get_output_in_json()
self.assertEqual(len(iprule['ipRules']), 1)
self.assertTrue(iprule['ipRules'][0]['ipMask'] == '1.1.1.1')
# add vnetrule
vnetrule = self.cmd(
'servicebus namespace network-rule add --resource-group {rg} --name {namespacename} --subnet ' +
created_subnet1['id'] + ' --ignore-missing-endpoint True').get_output_in_json()
self.assertEqual(len(vnetrule['virtualNetworkRules']), 1)
# add vnetrule2
vnetrule = self.cmd(
'servicebus namespace network-rule add --resource-group {rg} --name {namespacename} --subnet ' +
created_subnet2['id'] + ' --ignore-missing-endpoint True').get_output_in_json()
self.assertEqual(len(vnetrule['virtualNetworkRules']), 2)
# list Vnetrules
self.cmd(
'servicebus namespace network-rule list --resource-group {rg} --name {namespacename}')
# remove Vnetrule
vnetrule = self.cmd(
'servicebus namespace network-rule remove --resource-group {rg} --name {namespacename} --subnet ' +
created_subnet2['id']).get_output_in_json()
self.assertEqual(len(vnetrule['virtualNetworkRules']), 1)
# Delete Namespace list by ResourceGroup
self.cmd('servicebus namespace delete --resource-group {rg} --name {namespacename}')
| 50.043157
| 234
| 0.628779
| 3,912
| 40,585
| 6.462935
| 0.074387
| 0.073013
| 0.090772
| 0.074991
| 0.879524
| 0.84009
| 0.800815
| 0.757821
| 0.722066
| 0.679785
| 0
| 0.007567
| 0.231539
| 40,585
| 810
| 235
| 50.104938
| 0.803097
| 0.090083
| 0
| 0.652427
| 0
| 0.178641
| 0.530619
| 0.053301
| 0
| 0
| 0
| 0
| 0.034951
| 1
| 0.015534
| false
| 0
| 0.01165
| 0
| 0.029126
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
dbca39f7c730ca6ebd3a93437ad70b0e84d19335
| 15,826
|
py
|
Python
|
api_tests/registrations/views/test_registration_list.py
|
sf2ne/Playground
|
95b2d222d7ac43baca0249acbfc34e043d6a95b3
|
[
"Apache-2.0"
] | null | null | null |
api_tests/registrations/views/test_registration_list.py
|
sf2ne/Playground
|
95b2d222d7ac43baca0249acbfc34e043d6a95b3
|
[
"Apache-2.0"
] | 13
|
2020-03-24T15:29:41.000Z
|
2022-03-11T23:15:28.000Z
|
api_tests/registrations/views/test_registration_list.py
|
sf2ne/Playground
|
95b2d222d7ac43baca0249acbfc34e043d6a95b3
|
[
"Apache-2.0"
] | null | null | null |
from urlparse import urlparse
from nose.tools import * # flake8: noqa
from website.models import Node
from framework.auth.core import Auth
from api.base.settings.defaults import API_BASE
from tests.base import ApiTestCase
from tests.factories import (
ProjectFactory,
RegistrationFactory,
AuthUserFactory,
FolderFactory,
DashboardFactory
)
class TestRegistrationList(ApiTestCase):
def setUp(self):
super(TestRegistrationList, self).setUp()
self.user = AuthUserFactory()
self.project = ProjectFactory(is_public=False, creator=self.user)
self.registration_project = RegistrationFactory(creator=self.user, project=self.project)
self.url = '/{}registrations/'.format(API_BASE)
self.public_project = ProjectFactory(is_public=True, creator=self.user)
self.public_registration_project = RegistrationFactory(creator=self.user, project=self.public_project, is_public=True)
self.user_two = AuthUserFactory()
def tearDown(self):
super(TestRegistrationList, self).tearDown()
Node.remove()
def test_return_public_registrations_logged_out(self):
res = self.app.get(self.url)
assert_equal(len(res.json['data']), 1)
assert_equal(res.status_code, 200)
assert_equal(res.status_code, 200)
assert_equal(res.content_type, 'application/vnd.api+json')
url = res.json['data'][0]['relationships']['registered_from']['links']['related']['href']
assert_equal(urlparse(url).path, '/{}nodes/{}/'.format(API_BASE, self.public_project._id))
def test_return_registrations_logged_in_contributor(self):
res = self.app.get(self.url, auth=self.user.auth)
assert_equal(len(res.json['data']), 2)
assert_equal(res.status_code, 200)
registered_from_one = urlparse(res.json['data'][0]['relationships']['registered_from']['links']['related']['href']).path
registered_from_two = urlparse(res.json['data'][1]['relationships']['registered_from']['links']['related']['href']).path
assert_equal(res.content_type, 'application/vnd.api+json')
assert_items_equal([registered_from_one, registered_from_two],
['/{}nodes/{}/'.format(API_BASE, self.public_project._id),
'/{}nodes/{}/'.format(API_BASE, self.project._id)])
def test_return_registrations_logged_in_non_contributor(self):
res = self.app.get(self.url, auth=self.user_two.auth)
assert_equal(len(res.json['data']), 1)
assert_equal(res.status_code, 200)
registered_from = urlparse(res.json['data'][0]['relationships']['registered_from']['links']['related']['href']).path
assert_equal(res.content_type, 'application/vnd.api+json')
assert_equal(registered_from, '/{}nodes/{}/'.format(API_BASE, self.public_project._id))
def test_exclude_nodes_from_registrations_endpoint(self):
res = self.app.get(self.url, auth=self.user.auth)
ids = [each['id'] for each in res.json['data']]
assert_in(self.registration_project._id, ids)
assert_in(self.public_registration_project._id, ids)
assert_not_in(self.public_project._id, ids)
assert_not_in(self.project._id, ids)
class TestRegistrationFiltering(ApiTestCase):
def setUp(self):
super(TestRegistrationFiltering, self).setUp()
self.user_one = AuthUserFactory()
self.user_two = AuthUserFactory()
self.project_one = ProjectFactory(title="Project One", description='Two', is_public=True, creator=self.user_one, category='hypothesis')
self.project_two = ProjectFactory(title="Project Two", description="One Three", is_public=True, creator=self.user_one)
self.project_three = ProjectFactory(title="Three", is_public=True, creator=self.user_two)
self.private_project_user_one = ProjectFactory(title="Private Project User One",
is_public=False,
creator=self.user_one)
self.private_project_user_two = ProjectFactory(title="Private Project User Two",
is_public=False,
creator=self.user_two)
self.project_one.add_tag('tag1', Auth(self.project_one.creator), save=False)
self.project_one.add_tag('tag2', Auth(self.project_one.creator), save=False)
self.project_one.save()
self.project_two.add_tag('tag1', Auth(self.project_two.creator), save=True)
self.project_two.save()
self.project_one_reg = RegistrationFactory(creator=self.user_one, project=self.project_one, is_public=True)
self.project_two_reg = RegistrationFactory(creator=self.user_one, project=self.project_two, is_public=True)
self.project_three_reg = RegistrationFactory(creator=self.user_two, project=self.project_three, is_public=True)
self.private_project_user_one_reg = RegistrationFactory(creator=self.user_one, project=self.private_project_user_one, is_public=False)
self.private_project_user_two_reg = RegistrationFactory(creator=self.user_two, project=self.private_project_user_two, is_public=False)
self.folder = FolderFactory()
self.dashboard = DashboardFactory()
self.url = "/{}registrations/".format(API_BASE)
def tearDown(self):
super(TestRegistrationFiltering, self).tearDown()
Node.remove()
def test_filtering_by_category(self):
url = '/{}registrations/?filter[category]=hypothesis'.format(API_BASE)
res = self.app.get(url, auth=self.user_one.auth)
registration_json = res.json['data']
ids = [each['id'] for each in registration_json]
assert_in(self.project_one_reg._id, ids)
assert_not_in(self.project_two_reg._id, ids)
assert_not_in(self.project_three_reg._id, ids)
assert_not_in(self.private_project_user_one_reg._id, ids)
assert_not_in(self.private_project_user_two_reg._id, ids)
def test_filtering_by_public(self):
url = '/{}registrations/?filter[public]=false'.format(API_BASE)
res = self.app.get(url, auth=self.user_one.auth)
reg_json = res.json['data']
# No public projects returned
assert_false(
any([each['attributes']['public'] for each in reg_json])
)
ids = [each['id'] for each in reg_json]
assert_not_in(self.project_one_reg._id, ids)
assert_not_in(self.project_two_reg._id, ids)
url = '/{}registrations/?filter[public]=true'.format(API_BASE)
res = self.app.get(url, auth=self.user_one.auth)
reg_json = res.json['data']
# No private projects returned
assert_true(
all([each['attributes']['public'] for each in reg_json])
)
ids = [each['id'] for each in reg_json]
assert_in(self.project_one_reg._id, ids)
assert_in(self.project_two_reg._id, ids)
assert_in(self.project_three_reg._id, ids)
assert_not_in(self.private_project_user_one_reg._id, ids)
assert_not_in(self.private_project_user_two_reg._id, ids)
def test_filtering_tags(self):
# both project_one and project_two have tag1
url = '/{}registrations/?filter[tags]={}'.format(API_BASE, 'tag1')
res = self.app.get(url, auth=self.project_one.creator.auth)
reg_json = res.json['data']
ids = [each['id'] for each in reg_json]
assert_in(self.project_one_reg._id, ids)
assert_in(self.project_two_reg._id, ids)
assert_not_in(self.project_three_reg._id, ids)
assert_not_in(self.private_project_user_one_reg._id, ids)
assert_not_in(self.private_project_user_two_reg._id, ids)
# filtering two tags
# project_one has both tags; project_two only has one
url = '/{}registrations/?filter[tags]={}&filter[tags]={}'.format(API_BASE, 'tag1', 'tag2')
res = self.app.get(url, auth=self.project_one.creator.auth)
reg_json = res.json['data']
ids = [each['id'] for each in reg_json]
assert_in(self.project_one_reg._id, ids)
assert_not_in(self.project_two_reg._id, ids)
assert_not_in(self.project_three_reg._id, ids)
assert_not_in(self.private_project_user_one_reg._id, ids)
assert_not_in(self.private_project_user_two_reg._id, ids)
def test_get_all_registrations_with_no_filter_logged_in(self):
res = self.app.get(self.url, auth=self.user_one.auth)
reg_json = res.json['data']
ids = [each['id'] for each in reg_json]
assert_in(self.project_one_reg._id, ids)
assert_in(self.project_two_reg._id, ids)
assert_in(self.project_three_reg._id, ids)
assert_in(self.private_project_user_one_reg._id, ids)
assert_not_in(self.private_project_user_two_reg._id, ids)
assert_not_in(self.project_one._id, ids)
assert_not_in(self.project_two._id, ids)
assert_not_in(self.project_three._id, ids)
assert_not_in(self.private_project_user_one._id, ids)
assert_not_in(self.private_project_user_two._id, ids)
assert_not_in(self.folder._id, ids)
assert_not_in(self.dashboard._id, ids)
def test_get_all_registrations_with_no_filter_not_logged_in(self):
res = self.app.get(self.url)
reg_json = res.json['data']
ids = [each['id'] for each in reg_json]
assert_in(self.project_one_reg._id, ids)
assert_in(self.project_two_reg._id, ids)
assert_in(self.project_three_reg._id, ids)
assert_not_in(self.private_project_user_one_reg._id, ids)
assert_not_in(self.private_project_user_two_reg._id, ids)
assert_not_in(self.project_one._id, ids)
assert_not_in(self.project_two._id, ids)
assert_not_in(self.project_three._id, ids)
assert_not_in(self.private_project_user_one._id, ids)
assert_not_in(self.private_project_user_two._id, ids)
assert_not_in(self.folder._id, ids)
assert_not_in(self.dashboard._id, ids)
def test_get_one_registration_with_exact_filter_logged_in(self):
url = "/{}registrations/?filter[title]=Project%20One".format(API_BASE)
res = self.app.get(url, auth=self.user_one.auth)
reg_json = res.json['data']
ids = [each['id'] for each in reg_json]
assert_in(self.project_one_reg._id, ids)
assert_not_in(self.project_two_reg._id, ids)
assert_not_in(self.project_three_reg._id, ids)
assert_not_in(self.private_project_user_one_reg._id, ids)
assert_not_in(self.private_project_user_two_reg._id, ids)
assert_not_in(self.folder._id, ids)
assert_not_in(self.dashboard._id, ids)
def test_get_one_registration_with_exact_filter_not_logged_in(self):
url = "/{}registrations/?filter[title]=Private%20Project%20User%20One".format(API_BASE)
res = self.app.get(url)
reg_json = res.json['data']
ids = [each['id'] for each in reg_json]
assert_not_in(self.project_one_reg._id, ids)
assert_not_in(self.project_two_reg._id, ids)
assert_not_in(self.project_three_reg._id, ids)
assert_not_in(self.private_project_user_one_reg._id, ids)
assert_not_in(self.private_project_user_two_reg._id, ids)
assert_not_in(self.folder._id, ids)
assert_not_in(self.dashboard._id, ids)
def test_get_some_registrations_with_substring_logged_in(self):
url = "/{}registrations/?filter[title]=Two".format(API_BASE)
res = self.app.get(url, auth=self.user_one.auth)
reg_json = res.json['data']
ids = [each['id'] for each in reg_json]
assert_not_in(self.project_one_reg._id, ids)
assert_in(self.project_two_reg._id, ids)
assert_not_in(self.project_three_reg._id, ids)
assert_not_in(self.private_project_user_one_reg._id, ids)
assert_not_in(self.private_project_user_two_reg._id, ids)
assert_not_in(self.folder._id, ids)
assert_not_in(self.dashboard._id, ids)
def test_get_some_registrations_with_substring_not_logged_in(self):
url = "/{}registrations/?filter[title]=One".format(API_BASE)
res = self.app.get(url)
reg_json = res.json['data']
ids = [each['id'] for each in reg_json]
assert_in(self.project_one_reg._id, ids)
assert_not_in(self.project_two_reg._id, ids)
assert_not_in(self.project_three_reg._id, ids)
assert_not_in(self.private_project_user_one_reg._id, ids)
assert_not_in(self.private_project_user_two_reg._id, ids)
assert_not_in(self.folder._id, ids)
assert_not_in(self.dashboard._id, ids)
def test_get_only_public_or_my_registrations_with_filter_logged_in(self):
url = "/{}registrations/?filter[title]=Project".format(API_BASE)
res = self.app.get(url, auth=self.user_one.auth)
reg_json = res.json['data']
ids = [each['id'] for each in reg_json]
assert_in(self.project_one_reg._id, ids)
assert_in(self.project_two_reg._id, ids)
assert_not_in(self.project_three_reg._id, ids)
assert_in(self.private_project_user_one_reg._id, ids)
assert_not_in(self.private_project_user_two_reg._id, ids)
assert_not_in(self.folder._id, ids)
assert_not_in(self.dashboard._id, ids)
def test_get_only_public_registrations_with_filter_not_logged_in(self):
url = "/{}registrations/?filter[title]=Project".format(API_BASE)
res = self.app.get(url)
reg_json = res.json['data']
ids = [each['id'] for each in reg_json]
assert_in(self.project_one_reg._id, ids)
assert_in(self.project_two_reg._id, ids)
assert_not_in(self.project_three_reg._id, ids)
assert_not_in(self.private_project_user_one_reg._id, ids)
assert_not_in(self.private_project_user_two_reg._id, ids)
assert_not_in(self.folder._id, ids)
assert_not_in(self.dashboard._id, ids)
def test_alternate_filtering_field_logged_in(self):
url = "/{}registrations/?filter[description]=Three".format(API_BASE)
res = self.app.get(url, auth=self.user_one.auth)
reg_json = res.json['data']
ids = [each['id'] for each in reg_json]
assert_not_in(self.project_one_reg._id, ids)
assert_in(self.project_two_reg._id, ids)
assert_not_in(self.project_three_reg._id, ids)
assert_not_in(self.private_project_user_one_reg._id, ids)
assert_not_in(self.private_project_user_two_reg._id, ids)
assert_not_in(self.folder._id, ids)
assert_not_in(self.dashboard._id, ids)
def test_alternate_filtering_field_not_logged_in(self):
url = "/{}registrations/?filter[description]=Two".format(API_BASE)
res = self.app.get(url)
reg_json = res.json['data']
ids = [each['id'] for each in reg_json]
assert_in(self.project_one_reg._id, ids)
assert_not_in(self.project_two_reg._id, ids)
assert_not_in(self.project_three_reg._id, ids)
assert_not_in(self.private_project_user_one_reg._id, ids)
assert_not_in(self.private_project_user_two_reg._id, ids)
assert_not_in(self.folder._id, ids)
assert_not_in(self.dashboard._id, ids)
def test_incorrect_filtering_field_not_logged_in(self):
url = '/{}registrations/?filter[notafield]=bogus'.format(API_BASE)
res = self.app.get(url, expect_errors=True)
assert_equal(res.status_code, 400)
errors = res.json['errors']
assert_equal(len(errors), 1)
assert_equal(errors[0]['detail'], "'notafield' is not a valid field for this endpoint.")
| 43.478022
| 143
| 0.68438
| 2,236
| 15,826
| 4.477639
| 0.06127
| 0.070116
| 0.098881
| 0.119856
| 0.81642
| 0.784459
| 0.746205
| 0.702058
| 0.655813
| 0.606872
| 0
| 0.00316
| 0.200051
| 15,826
| 363
| 144
| 43.597796
| 0.787678
| 0.011563
| 0
| 0.613139
| 0
| 0
| 0.080077
| 0.041829
| 0
| 0
| 0
| 0
| 0.452555
| 1
| 0.080292
| false
| 0
| 0.025547
| 0
| 0.113139
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
917a50addb8fd850484fc0029563524dcfb9a0e9
| 1,904
|
py
|
Python
|
tests/query_parser_test.py
|
Allread/ada
|
4b42881a8e9b493d03098b6b392774fadcfeae17
|
[
"MIT"
] | 14
|
2020-06-18T19:38:05.000Z
|
2022-02-09T13:53:24.000Z
|
tests/query_parser_test.py
|
Allread/ada
|
4b42881a8e9b493d03098b6b392774fadcfeae17
|
[
"MIT"
] | 65
|
2020-03-12T19:13:38.000Z
|
2020-03-25T06:25:14.000Z
|
tests/query_parser_test.py
|
Allread/ada
|
4b42881a8e9b493d03098b6b392774fadcfeae17
|
[
"MIT"
] | 4
|
2020-07-30T19:52:09.000Z
|
2021-08-16T13:28:08.000Z
|
from query_parser import QueryParser
from db import DB
if __name__ == "__main__":
db = DB()
parser = QueryParser(db)
tests_queries = [
"produce 60 iron rods from ? iron ore",
"produce 60 iron plate",
"produce 60 iron plate from ? resources",
"produce ? power from 240 crude oil",
"produce ? power and _ plastic from 240 crude oil",
"produce 60 iron plate from ? weighted resources",
"produce 60 iron plate without alternate recipes",
"produce 60 iron plate without refineries",
"produce ? power from 60 crude oil with only fuel generators",
"produce 60 iron plates from only iron ore",
"produce 60 modular frames from ? resources and 30 iron rods",
"iron rods",
"iron.*",
"iron rod recipe",
"recipe iron rod",
"iron rod recipes",
"recipe for iron rod",
"recipes for iron rod",
"recipes from iron rod",
"recipes for iron.*",
"steel rod",
"recipe: steel rod",
"recipe: alternate: steel rod"
]
for query in tests_queries:
print(parser.parse(query))
# parser.grammar().runTests("""
# produce 60 iron rods from ? iron ore
# produce 60 iron plate
# produce 60 iron plate from ? resources
# produce ? power from 240 crude oil
# produce ? power and _ plastic from 240 crude oil
# produce 60 iron plate using ? space
# produce 60 iron plate from ? weighted resources
# produce 60 iron plate without alternate recipes
# produce 60 iron plate with no alternate recipes
# produce 60 iron plate without refineries
# produce ? power from 60 crude oil with only fuel generators
# produce 60 iron plates from only iron ore
# produce 60 modular frames from ? resources and 30 iron rods
# """)
| 36.615385
| 70
| 0.614496
| 239
| 1,904
| 4.841004
| 0.205021
| 0.140017
| 0.179775
| 0.18669
| 0.748487
| 0.712187
| 0.712187
| 0.712187
| 0.712187
| 0.712187
| 0
| 0.042846
| 0.31355
| 1,904
| 51
| 71
| 37.333333
| 0.842387
| 0.341912
| 0
| 0
| 0
| 0
| 0.542441
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.0625
| 0
| 0.0625
| 0.03125
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
9182b92ef1e41acfbb779094794fc4882d6095fb
| 100
|
py
|
Python
|
dataweb/admin/__init__.py
|
rob-metalinkage/django-dataweb
|
ea5bfa1c532afe300053a7bfa603a502e558c07b
|
[
"Apache-2.0"
] | 1
|
2020-05-29T00:39:50.000Z
|
2020-05-29T00:39:50.000Z
|
dataweb/admin/__init__.py
|
rob-metalinkage/django-dataweb
|
ea5bfa1c532afe300053a7bfa603a502e558c07b
|
[
"Apache-2.0"
] | null | null | null |
dataweb/admin/__init__.py
|
rob-metalinkage/django-dataweb
|
ea5bfa1c532afe300053a7bfa603a502e558c07b
|
[
"Apache-2.0"
] | 2
|
2019-12-17T11:57:33.000Z
|
2021-07-16T18:40:30.000Z
|
import dataweb.admin.void
import dataweb.admin.rdfqb
import dataweb.admin.profiles
#import profiles
| 20
| 29
| 0.85
| 14
| 100
| 6.071429
| 0.428571
| 0.458824
| 0.635294
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.08
| 100
| 4
| 30
| 25
| 0.923913
| 0.15
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 6
|
918d0691bdfc1aa270ad5634195f7c1eeec09974
| 759
|
py
|
Python
|
shiftschema/validators/__init__.py
|
projectshift/shift-validate
|
c598d1af5df40fae65cf3878b8f67accbcd059b7
|
[
"MIT"
] | 1
|
2018-07-12T17:41:43.000Z
|
2018-07-12T17:41:43.000Z
|
shiftschema/validators/__init__.py
|
projectshift/shift-validate
|
c598d1af5df40fae65cf3878b8f67accbcd059b7
|
[
"MIT"
] | 22
|
2015-02-05T06:32:27.000Z
|
2020-12-30T18:12:09.000Z
|
shiftschema/validators/__init__.py
|
projectshift/shift-validate
|
c598d1af5df40fae65cf3878b8f67accbcd059b7
|
[
"MIT"
] | null | null | null |
from shiftschema.validators.abstract_validator import AbstractValidator
from shiftschema.validators.choice import Choice
from shiftschema.validators.multichoice import MultiChoice
from shiftschema.validators.digits import Digits
from shiftschema.validators.length import Length
from shiftschema.validators.email import Email
from shiftschema.validators.required import Required
from shiftschema.validators.not_empty import NotEmpty
from shiftschema.validators.url import Url
from shiftschema.validators.ip import Ip
# todo: implement these validators:
# credit_card.py
# date_range.py
# datetime.py
# equals.py
# file_exists.py
# file_size.py
# hostname.py
# ip.py
# iban.py
# image size.py
# is_image.py
# is_instance.py
# isbn.py
# range.py
# regex.py
| 23.71875
| 71
| 0.823452
| 103
| 759
| 5.990291
| 0.368932
| 0.243112
| 0.405186
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.106719
| 759
| 31
| 72
| 24.483871
| 0.91003
| 0.270092
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.032258
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 6
|
91900683e5fa61026b563dabb4593f17bdf4d3f2
| 21
|
py
|
Python
|
djmapnik/__init__.py
|
springmeyer/djmapnik
|
8d736a73470b3b3c480503fe55f6f77340b6b7e5
|
[
"BSD-3-Clause"
] | 3
|
2015-05-08T02:25:02.000Z
|
2021-09-10T18:12:56.000Z
|
djmapnik/__init__.py
|
springmeyer/djmapnik
|
8d736a73470b3b3c480503fe55f6f77340b6b7e5
|
[
"BSD-3-Clause"
] | null | null | null |
djmapnik/__init__.py
|
springmeyer/djmapnik
|
8d736a73470b3b3c480503fe55f6f77340b6b7e5
|
[
"BSD-3-Clause"
] | 1
|
2018-03-22T20:58:07.000Z
|
2018-03-22T20:58:07.000Z
|
from adapter import *
| 21
| 21
| 0.809524
| 3
| 21
| 5.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 21
| 1
| 21
| 21
| 0.944444
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 6
|
91a2bc2ebdbadb6637b89186388cfe04cdb63708
| 38
|
py
|
Python
|
test.py
|
amoeba04/AutoML_tutorial
|
7dc2162031e3d245b423074795af8464741c98cf
|
[
"MIT"
] | 1
|
2019-07-25T14:59:57.000Z
|
2019-07-25T14:59:57.000Z
|
tmp.py
|
tinve/kaggle_salt
|
eba74e818cafbb2e50f9fa0ef7fb9f68a584e5c7
|
[
"MIT"
] | 2
|
2019-07-22T09:18:22.000Z
|
2019-07-24T15:54:04.000Z
|
examples/packages.py
|
deecamp-chuangxin/DeepInvest
|
58f6235fa2f55b0a0ceacb13a8b3e30ab7e291f4
|
[
"MIT"
] | null | null | null |
import torch
print(torch.__version__)
| 12.666667
| 24
| 0.842105
| 5
| 38
| 5.6
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.078947
| 38
| 3
| 24
| 12.666667
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0.5
| 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
| 0
| 1
|
0
| 6
|
91a9c822ed3eb9a4cd4ec059c472a68f4ceb62f2
| 112
|
py
|
Python
|
week16/classwork/snake_to_pascal.py
|
YAtOff/python0
|
b5af5004131d64dd52d42746eddb72b6c43a13c7
|
[
"Apache-2.0"
] | 6
|
2017-11-08T14:04:39.000Z
|
2019-03-24T22:11:04.000Z
|
archive/2016/week16/homework/snake_to_pascal.py
|
YAtOff/python0
|
b5af5004131d64dd52d42746eddb72b6c43a13c7
|
[
"Apache-2.0"
] | null | null | null |
archive/2016/week16/homework/snake_to_pascal.py
|
YAtOff/python0
|
b5af5004131d64dd52d42746eddb72b6c43a13c7
|
[
"Apache-2.0"
] | 7
|
2015-10-27T09:04:58.000Z
|
2019-03-03T14:18:26.000Z
|
def snake_to_pascal(s):
"""
>>> snake_to_pascal('snake_to_pascal')
'SnakeToPascal'
"""
pass
| 16
| 42
| 0.589286
| 13
| 112
| 4.615385
| 0.538462
| 0.35
| 0.65
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.25
| 112
| 6
| 43
| 18.666667
| 0.714286
| 0.482143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 6
|
91c5152159f05d35a02c11e1e44232905e99e326
| 50
|
py
|
Python
|
menu/__init__.py
|
psxzz/dls-nst-bot
|
4886f3520e78cf657bb065647f8ae87d160523d5
|
[
"MIT"
] | null | null | null |
menu/__init__.py
|
psxzz/dls-nst-bot
|
4886f3520e78cf657bb065647f8ae87d160523d5
|
[
"MIT"
] | null | null | null |
menu/__init__.py
|
psxzz/dls-nst-bot
|
4886f3520e78cf657bb065647f8ae87d160523d5
|
[
"MIT"
] | null | null | null |
from menu import markups
from menu import replies
| 25
| 25
| 0.84
| 8
| 50
| 5.25
| 0.625
| 0.380952
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.16
| 50
| 2
| 25
| 25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 6
|
91d4de92358a281e7eb5c0fa8fc65a4879efb622
| 224
|
py
|
Python
|
examples/ecomm_api/views/__init__.py
|
inkmonk/flask-sqlalchemy-plus
|
c60cba605630a0a2dc43e3b7b23bdda572b11561
|
[
"MIT"
] | 5
|
2015-12-30T09:08:47.000Z
|
2018-04-20T09:12:23.000Z
|
examples/ecomm_api/views/__init__.py
|
inkmonk/flask-sqlalchemy-plus
|
c60cba605630a0a2dc43e3b7b23bdda572b11561
|
[
"MIT"
] | 12
|
2015-06-20T09:58:37.000Z
|
2017-02-23T14:38:02.000Z
|
examples/ecomm_api/views/__init__.py
|
inkmonk/flask-sqlalchemy-plus
|
c60cba605630a0a2dc43e3b7b23bdda572b11561
|
[
"MIT"
] | 2
|
2020-04-12T15:05:05.000Z
|
2021-08-11T04:11:14.000Z
|
from .main_api import main_api_bp, main_api_entities
from .orders_manager_api import orders_manager_api_bp, orders_manager_api_entities
from .products_manager_api import products_manager_api_bp, products_manager_api_entities
| 74.666667
| 88
| 0.910714
| 36
| 224
| 5.083333
| 0.25
| 0.327869
| 0.262295
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.0625
| 224
| 3
| 88
| 74.666667
| 0.871429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 6
|
91e6f084973025ea4158f456ca38b7076a4213dd
| 4,224
|
py
|
Python
|
skills/dff_bot_persona_skill/dialogflows/flows/shared.py
|
deepmipt/assistant-base
|
ab2dcbdc4c31cd52ca336022003bf69fa80c9189
|
[
"Apache-2.0"
] | 7
|
2020-12-07T19:59:16.000Z
|
2020-12-24T16:20:47.000Z
|
skills/dff_bot_persona_skill/dialogflows/flows/shared.py
|
deepmipt/assistant-base
|
ab2dcbdc4c31cd52ca336022003bf69fa80c9189
|
[
"Apache-2.0"
] | null | null | null |
skills/dff_bot_persona_skill/dialogflows/flows/shared.py
|
deepmipt/assistant-base
|
ab2dcbdc4c31cd52ca336022003bf69fa80c9189
|
[
"Apache-2.0"
] | null | null | null |
# %%
import os
import logging
import requests
import sentry_sdk
sentry_sdk.init(dsn=os.getenv("SENTRY_DSN"))
ENTITY_LINKING_URL = os.getenv("DP_ENTITY_LINKING_URL")
WIKIDATA_URL = os.getenv("DP_WIKIDATA_URL")
assert ENTITY_LINKING_URL, ENTITY_LINKING_URL
assert WIKIDATA_URL, WIKIDATA_URL
logger = logging.getLogger(__name__)
TOP_NUMBER = 3
def get_genre_top_wiki_parser(category, genre):
top = []
wp_output = []
wp_output = requests.post(
WIKIDATA_URL,
json={"parser_info": ["find_topic_info"], "query": [{"category": category, "genre": genre}]},
).json()
if wp_output:
top = wp_output[:TOP_NUMBER]
return top
def get_team_players_top_wiki_parser(team, utterance):
top = []
entity_id = ""
wp_output = []
try:
el_output = requests.post(
ENTITY_LINKING_URL,
json={"entity_substr": [[team]], "template": [""], "context": [utterance]},
timeout=0.8,
).json()
entity_info = el_output and el_output[0] and el_output[0][0]
if isinstance(entity_info, list) and entity_info and entity_info[0]:
entity_ids = entity_info[0]
entity_id = entity_ids[0]
wp_output = requests.post(
WIKIDATA_URL,
json={"parser_info": ["find_object"], "query": [(entity_id, "P54", "backw")]},
timeout=0.8,
).json()
elif isinstance(entity_info, dict):
entity_ids = entity_info.get("entity_ids", [])
entity_id = entity_ids and entity_ids[0]
wp_output = (
entity_id
and requests.post(
WIKIDATA_URL,
json={"parser_info": ["find_object"], "query": [(entity_id, "P54", "backw")]},
timeout=0.8,
).json()
)
logger.info(
f"get_team_players_top_wiki_parser: wp_input: entity_substr: {team},"
f"subject: {entity_id}, wp_output = {wp_output}"
)
top = [i[1] for i in wp_output[0][0][:TOP_NUMBER]] if wp_output[0] else []
except Exception as exc:
msg = f"request_team_players_el_wp_entities exception: {exc}"
logger.warning(msg)
sentry_sdk.capture_message(msg)
return top
def get_object_top_wiki_parser(item, objects, category, utterance):
top = []
entity_id = ""
wp_output = []
try:
el_output = requests.post(
ENTITY_LINKING_URL,
json={"entity_substr": [[item]], "template": [""], "context": [utterance]},
timeout=0.8,
).json()
entity_info = el_output and el_output[0] and el_output[0][0]
if isinstance(entity_info, list) and entity_info and entity_info[0]:
entity_ids = entity_info[0]
entity_id = entity_ids[0]
wp_output = requests.post(
WIKIDATA_URL,
json={
"parser_info": ["find_topic_info"],
"query": [{"what_to_find": objects, "category": category, "subject": entity_id}],
},
timeout=0.8,
).json()
elif isinstance(entity_info, dict):
entity_ids = entity_info.get("entity_ids", [])
entity_id = entity_ids and entity_ids[0]
wp_output = (
entity_id
and requests.post(
WIKIDATA_URL,
json={
"parser_info": ["find_topic_info"],
"query": [{"what_to_find": objects, "category": category, "subject": entity_id}],
},
timeout=0.8,
).json()
)
logger.info(
f"get_object_top_wiki_parser: wp_input: what_to_find: {objects},"
f"category: {category}, subject: {entity_id}, wp_output = {wp_output}"
)
top = [i[1] for i in wp_output[0][0][:TOP_NUMBER]] if wp_output[0] else []
except Exception as exc:
msg = f"request_el_wp_entities exception: {exc}"
logger.warning(msg)
sentry_sdk.capture_message(msg)
return top
| 33
| 105
| 0.551136
| 492
| 4,224
| 4.410569
| 0.162602
| 0.066359
| 0.04424
| 0.035945
| 0.788479
| 0.75576
| 0.732258
| 0.732258
| 0.719355
| 0.719355
| 0
| 0.013723
| 0.327178
| 4,224
| 127
| 106
| 33.259843
| 0.749824
| 0.000473
| 0
| 0.71028
| 0
| 0
| 0.161848
| 0.032701
| 0
| 0
| 0
| 0
| 0.018692
| 1
| 0.028037
| false
| 0
| 0.037383
| 0
| 0.093458
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
91ea0108d9fb0930202e2dcd207df87692f37a37
| 44
|
py
|
Python
|
src/data_augmentation.py
|
koriavinash1/Fetal-Brain-Segmentation
|
01b89f769e445ad883a60e404aa6aeddc42fb592
|
[
"MIT"
] | 10
|
2018-07-29T10:59:47.000Z
|
2021-04-01T16:24:21.000Z
|
src/data_augmentation.py
|
koriavinash1/Fetal-Brain-Segmentation
|
01b89f769e445ad883a60e404aa6aeddc42fb592
|
[
"MIT"
] | 4
|
2019-04-24T06:38:18.000Z
|
2020-07-19T16:22:25.000Z
|
src/data_augmentation.py
|
koriavinash1/Fetal-Brain-Segmentation
|
01b89f769e445ad883a60e404aa6aeddc42fb592
|
[
"MIT"
] | 4
|
2018-12-04T14:10:56.000Z
|
2021-12-16T13:27:03.000Z
|
# TODO: add all augmentation functions.....
| 22
| 43
| 0.704545
| 5
| 44
| 6.2
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.136364
| 44
| 1
| 44
| 44
| 0.815789
| 0.931818
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 1
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
91eb84492da917b6ef85ea14852a80b226886f76
| 6,427
|
py
|
Python
|
tests/pytests/unit/beacons/test_diskusage.py
|
babs/salt
|
c536ea716d5308880b244e7980f4b659d86fc104
|
[
"Apache-2.0"
] | 1
|
2021-02-11T16:55:00.000Z
|
2021-02-11T16:55:00.000Z
|
tests/pytests/unit/beacons/test_diskusage.py
|
babs/salt
|
c536ea716d5308880b244e7980f4b659d86fc104
|
[
"Apache-2.0"
] | 9
|
2021-03-31T20:25:25.000Z
|
2021-07-04T05:33:46.000Z
|
tests/pytests/unit/beacons/test_diskusage.py
|
babs/salt
|
c536ea716d5308880b244e7980f4b659d86fc104
|
[
"Apache-2.0"
] | 1
|
2020-06-02T14:15:24.000Z
|
2020-06-02T14:15:24.000Z
|
"""
tests.pytests.unit.beacons.test_diskusage
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Disk usage beacon test cases
"""
from collections import namedtuple
import pytest
import salt.beacons.diskusage as diskusage
from tests.support.mock import MagicMock, Mock, patch
@pytest.fixture
def configure_loader_modules():
return {}
@pytest.fixture
def stub_disk_partition():
return [
namedtuple("partition", "device mountpoint fstype, opts")(
"tmpfs", "/mnt/tmp", "tmpfs", "rw,nosuid,nodev,relatime,size=10240k"
),
namedtuple("partition", "device mountpoint fstype, opts")(
"/dev/disk0s2", "/", "hfs", "rw,local,rootfs,dovolfs,journaled,multilabel"
),
]
@pytest.fixture
def windows_stub_disk_partition():
return [
namedtuple("partition", "device mountpoint fstype, opts")(
"C:\\", "C:\\", "NTFS", "rw,fixed"
),
namedtuple("partition", "device mountpoint fstype, opts")(
"D:\\", "D:\\", "CDFS", "ro,cdrom"
),
]
@pytest.fixture
def stub_disk_usage():
return [
namedtuple("usage", "total used free percent")(1000, 500, 500, 50),
namedtuple("usage", "total used free percent")(100, 75, 25, 25),
]
@pytest.fixture
def windows_stub_disk_usage():
return namedtuple("usage", "total used free percent")(1000, 500, 500, 50)
def test_non_list_config():
config = {}
ret = diskusage.validate(config)
assert ret == (False, "Configuration for diskusage beacon must be a list.")
def test_empty_config():
config = [{}]
ret = diskusage.validate(config)
assert ret == (True, "Valid beacon configuration")
def test_diskusage_match(stub_disk_usage, stub_disk_partition):
disk_usage_mock = Mock(side_effect=stub_disk_usage)
with patch("salt.utils.platform.is_windows", MagicMock(return_value=False)), patch(
"psutil.disk_partitions", MagicMock(return_value=stub_disk_partition)
), patch("psutil.disk_usage", disk_usage_mock):
config = [{"/": "50%"}]
ret = diskusage.validate(config)
assert ret == (True, "Valid beacon configuration")
ret = diskusage.beacon(config)
assert ret == [{"diskusage": 50, "mount": "/"}]
def test_diskusage_nomatch(stub_disk_usage, stub_disk_partition):
disk_usage_mock = Mock(side_effect=stub_disk_usage)
with patch("salt.utils.platform.is_windows", MagicMock(return_value=False)), patch(
"psutil.disk_partitions", MagicMock(return_value=stub_disk_partition)
), patch("psutil.disk_usage", disk_usage_mock):
config = [{"/": "70%"}]
ret = diskusage.validate(config)
assert ret == (True, "Valid beacon configuration")
ret = diskusage.beacon(config)
assert ret != [{"diskusage": 50, "mount": "/"}]
def test_diskusage_match_regex(stub_disk_usage, stub_disk_partition):
disk_usage_mock = Mock(side_effect=stub_disk_usage)
with patch("salt.utils.platform.is_windows", MagicMock(return_value=False)), patch(
"psutil.disk_partitions", MagicMock(return_value=stub_disk_partition)
), patch("psutil.disk_usage", disk_usage_mock):
config = [{"/": "50%"}]
ret = diskusage.validate(config)
assert ret == (True, "Valid beacon configuration")
ret = diskusage.beacon(config)
assert ret == [{"diskusage": 50, "mount": "/"}]
def test_diskusage_windows_single_slash(
windows_stub_disk_usage, windows_stub_disk_partition
):
r"""
This tests new behavior (C:\)
"""
disk_usage_mock = Mock(return_value=windows_stub_disk_usage)
with patch("salt.utils.platform.is_windows", MagicMock(return_value=True)):
with patch(
"psutil.disk_partitions",
MagicMock(return_value=windows_stub_disk_partition),
), patch("psutil.disk_usage", disk_usage_mock):
config = [{"C:\\": "50%"}]
ret = diskusage.validate(config)
assert ret == (True, "Valid beacon configuration")
ret = diskusage.beacon(config)
assert ret == [{"diskusage": 50, "mount": "C:\\"}]
def test_diskusage_windows_double_slash(
windows_stub_disk_usage, windows_stub_disk_partition
):
"""
This tests original behavior (C:\\)
"""
disk_usage_mock = Mock(return_value=windows_stub_disk_usage)
with patch("salt.utils.platform.is_windows", MagicMock(return_value=True)):
with patch(
"psutil.disk_partitions",
MagicMock(return_value=windows_stub_disk_partition),
), patch("psutil.disk_usage", disk_usage_mock):
config = [{"C:\\\\": "50%"}]
ret = diskusage.validate(config)
assert ret == (True, "Valid beacon configuration")
ret = diskusage.beacon(config)
assert ret == [{"diskusage": 50, "mount": "C:\\"}]
def test_diskusage_windows_lowercase(
windows_stub_disk_usage, windows_stub_disk_partition
):
r"""
This tests lowercase drive letter (c:\)
"""
disk_usage_mock = Mock(return_value=windows_stub_disk_usage)
with patch("salt.utils.platform.is_windows", MagicMock(return_value=True)):
with patch(
"psutil.disk_partitions",
MagicMock(return_value=windows_stub_disk_partition),
), patch("psutil.disk_usage", disk_usage_mock):
config = [{"c:\\": "50%"}]
ret = diskusage.validate(config)
assert ret == (True, "Valid beacon configuration")
ret = diskusage.beacon(config)
assert ret == [{"diskusage": 50, "mount": "C:\\"}]
def test_diskusage_windows_match_regex(
windows_stub_disk_usage, windows_stub_disk_partition
):
disk_usage_mock = Mock(return_value=windows_stub_disk_usage)
with patch("salt.utils.platform.is_windows", MagicMock(return_value=True)):
with patch(
"psutil.disk_partitions",
MagicMock(return_value=windows_stub_disk_partition),
), patch("psutil.disk_usage", disk_usage_mock):
config = [{"^[a-zA-Z]:\\": "50%"}]
ret = diskusage.validate(config)
assert ret == (True, "Valid beacon configuration")
ret = diskusage.beacon(config)
_expected = [
{"diskusage": 50, "mount": "C:\\"},
{"diskusage": 50, "mount": "D:\\"},
]
assert ret == _expected
| 32.958974
| 87
| 0.634977
| 725
| 6,427
| 5.375172
| 0.153103
| 0.08776
| 0.069284
| 0.055427
| 0.84193
| 0.833718
| 0.789838
| 0.789838
| 0.763408
| 0.749551
| 0
| 0.014006
| 0.222343
| 6,427
| 194
| 88
| 33.128866
| 0.765706
| 0.033919
| 0
| 0.669118
| 0
| 0
| 0.214879
| 0.072277
| 0
| 0
| 0
| 0
| 0.117647
| 1
| 0.102941
| false
| 0
| 0.029412
| 0.036765
| 0.169118
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
53611ff98b169766ddb64be7976b8ca7f11b0fd0
| 1,238
|
py
|
Python
|
networkx/algorithms/community/__init__.py
|
rakschahsa/networkx
|
6cac55b1064c3c346665f9281680fa3b66442ad0
|
[
"BSD-3-Clause"
] | 445
|
2019-01-26T13:50:26.000Z
|
2022-03-18T05:17:38.000Z
|
SLpackage/private/thirdparty/pythonpkgs/networkx/networkx_2.2/lib/python2.7/site-packages/networkx/algorithms/community/__init__.py
|
fanglab/6mASCOPE
|
3f1fdcb7693ff152f17623ce549526ec272698b1
|
[
"BSD-3-Clause"
] | 242
|
2019-01-29T15:48:27.000Z
|
2022-03-31T22:09:21.000Z
|
SLpackage/private/thirdparty/pythonpkgs/networkx/networkx_2.2/lib/python2.7/site-packages/networkx/algorithms/community/__init__.py
|
fanglab/6mASCOPE
|
3f1fdcb7693ff152f17623ce549526ec272698b1
|
[
"BSD-3-Clause"
] | 31
|
2019-03-10T09:51:27.000Z
|
2022-02-14T23:11:12.000Z
|
"""Functions for computing and measuring community structure.
The functions in this class are not imported into the top-level
:mod:`networkx` namespace. You can access these functions by importing
the :mod:`networkx.algorithms.community` module, then accessing the
functions as attributes of ``community``. For example::
>>> import networkx as nx
>>> from networkx.algorithms import community
>>> G = nx.barbell_graph(5, 1)
>>> communities_generator = community.girvan_newman(G)
>>> top_level_communities = next(communities_generator)
>>> next_level_communities = next(communities_generator)
>>> sorted(map(sorted, next_level_communities))
[[0, 1, 2, 3, 4], [5], [6, 7, 8, 9, 10]]
"""
from networkx.algorithms.community.asyn_fluid import *
from networkx.algorithms.community.centrality import *
from networkx.algorithms.community.community_generators import *
from networkx.algorithms.community.kclique import *
from networkx.algorithms.community.kernighan_lin import *
from networkx.algorithms.community.label_propagation import *
from networkx.algorithms.community.modularity_max import *
from networkx.algorithms.community.quality import *
from networkx.algorithms.community.community_utils import *
| 45.851852
| 70
| 0.77706
| 155
| 1,238
| 6.096774
| 0.458065
| 0.209524
| 0.285714
| 0.295238
| 0.416931
| 0.097355
| 0
| 0
| 0
| 0
| 0
| 0.012903
| 0.123586
| 1,238
| 26
| 71
| 47.615385
| 0.858065
| 0.574313
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 6
|
536989836bdf817b4555fbcf482001f8bc0a9416
| 62,058
|
py
|
Python
|
mdnc/modules/conv.py
|
cainmagi/MDNC
|
ce5e88b4c4880e8ecdbd82ee1da48335bad20b53
|
[
"MIT"
] | null | null | null |
mdnc/modules/conv.py
|
cainmagi/MDNC
|
ce5e88b4c4880e8ecdbd82ee1da48335bad20b53
|
[
"MIT"
] | null | null | null |
mdnc/modules/conv.py
|
cainmagi/MDNC
|
ce5e88b4c4880e8ecdbd82ee1da48335bad20b53
|
[
"MIT"
] | null | null | null |
#!python
# -*- coding: UTF-8 -*-
'''
################################################################
# Modules - convolutional network
# @ Modern Deep Network Toolkits for pyTorch
# Yuchen Jin @ [email protected]
# Requirements: (Pay attention to version)
# python 3.5+
# pyTorch 1.0.0+
# This module is the definition of the convolutional network.
# The network could be initialized here and used for training
# and processing.
################################################################
'''
import functools
import torch
import torch.nn as nn
from .utils import get_convnd, get_normalizer, get_upscaler, get_activator, get_adaptive_pooling, check_is_stride, cal_kernel_padding, cal_scaled_shapes
__all__ = ['ConvModern1d', 'ConvModern2d', 'ConvModern3d',
'UNet1d', 'UNet2d', 'UNet3d', 'unet12', 'unet16', 'unet17', 'unet23', 'unet29',
'AE1d', 'AE2d', 'AE3d', 'ae12', 'ae16', 'ae17', 'ae23', 'ae29',
'EncoderNet1d', 'EncoderNet2d', 'EncoderNet3d', 'encnet12', 'encnet15', 'encnet17', 'encnet22',
'DecoderNet1d', 'DecoderNet2d', 'DecoderNet3d', 'decnet13', 'decnet16', 'decnet18', 'decnet23']
class _ConvModernNd(nn.Module):
'''N-D Modern convolutional layer
The implementation for the modern convolutional layer. The modern
convolutional layer is a stack of convolution, normalization and
activation.
In the following paper, a new op composition order is proposed
for building residual block:
https://arxiv.org/abs/1603.05027
We also support this implementation.
'''
def __init__(self, order, in_planes, out_planes, kernel_size=3, stride=1, padding=1, output_size=None,
normalizer='pinst', activator='prelu', layer_order='new', scaler='down'):
'''Initialization.
Arguments:
order: the block dimension. For example, when order=2, the
nn.Conv2d would be used.
in_planes: the channel number of the input data.
out_planes: the channel number of the output data.
Arguments (optional):
kernel_size: the kernel size of this layer.
stride: the stride size of this layer.
padding: the padding size of the convolutional layer.
output_size: the size of the output data. This option is only used
when "scaler=up". When setting this value, the size
of the up-sampling would be given explicitly and
the option "stride" would not be used.
normalizer: the normalization method, could be:
- "batch": Batch normalization.
- "inst": Instance normalization.
- "pinst": Instance normalization with tunable
rescaling parameters.
- "null": Without normalization, would falls back to
the "convolution + activation" form.
activator: activation method, could be:
- "prelu", - "relu", - "null".
layer_order: the sub-layer composition order, could be:
- "new": norm + activ + conv
- "old": conv + norm + activ
scaler: scaling method. Could be "down" or "up". When using "down",
the argument "stride" would be used for down-sampling; when
using "up", "stride" would be used for up-sampling
(equivalent to transposed convolution).
'''
super().__init__()
ConvNd = get_convnd(order=order)
is_stride = check_is_stride(stride, output_size=output_size, scaler=scaler)
seq = []
if normalizer == 'null':
if (not is_stride) or scaler == 'down':
seq.append(
ConvNd(in_planes, out_planes, kernel_size=kernel_size, stride=stride, padding=padding, bias=True)
)
elif is_stride and scaler == 'up':
seq.extend((
get_upscaler(stride=stride, output_size=output_size, order=order),
ConvNd(in_planes, out_planes, kernel_size=kernel_size, stride=1, padding=padding, bias=True)
))
else:
raise ValueError('modules.conv: The arguments "stride" and "scaler" should be valid.')
new_activator = get_activator(activator, in_planes=out_planes)
if new_activator is not None:
seq.append(
new_activator()
)
elif normalizer in ('batch', 'inst', 'pinst'):
normalizer_op = get_normalizer(normalizer, order=order)
if layer_order == 'new':
seq.append(
normalizer_op(in_planes)
)
new_activator = get_activator(activator, in_planes=in_planes)
if new_activator is not None:
seq.append(
new_activator()
)
if (not is_stride) or scaler == 'down':
seq.append(
ConvNd(in_planes, out_planes, kernel_size=kernel_size, stride=stride, padding=padding, bias=False)
)
elif is_stride and scaler == 'up':
seq.extend((
get_upscaler(stride=stride, output_size=output_size, order=order),
ConvNd(in_planes, out_planes, kernel_size=kernel_size, stride=1, padding=padding, bias=False)
))
else:
raise ValueError('modules.conv: The arguments "stride" and "scaler" should be valid.')
if layer_order == 'old':
seq.append(
normalizer_op(out_planes)
)
new_activator = get_activator(activator, in_planes=out_planes)
if new_activator is not None:
seq.append(
new_activator()
)
else:
raise ValueError('modules.conv: The arguments "normalizer" should be valid.')
self.mconv = nn.Sequential(*seq)
def forward(self, x):
x = self.mconv(x)
return x
class _BlockConvStkNd(nn.Module):
'''Create the N-D stacked modern convolutional block.
Each block contains several stacked convolutional layers.
When providing 'ex_planes', there would be a skip connection input
for the first layer.
This module is used for building UNetNd, AENd and Enc/DecoderNetNd,
should not be used by users.
'''
def __init__(self, order, in_planes, out_planes, hidden_planes=None,
kernel_size=3, padding=1, stride=1, stack_level=3, ex_planes=0,
scaler='down', export_hidden=False):
'''Initialization
Arguments:
order: the block dimension. For example, when order=2, the
nn.Conv2d would be used.
in_planes: the channel number of the input data.
out_planes: the channel number of the output data.
Arguments (optional):
hidden_planes: the channel number of the first hidden layer, would
also used as the base of the following channels. If
not set, would use "out_planes" as the default
value.
kernel_size: the kernel size of the convolutional layers.
padding: the padding size of the convolutional layers.
stride: the stride size of the convolutional layers.
stack_level: the number of convolutional layers in this block,
requiring to be >= 1.
ex_planes: the channel number of the second input data. This value
is =0 in most time, but >0 during the decoding phase
of the U-Net. the extra input would be concatenated
with the input data.
scaler: scaling method. Could be "down" or "up". When using "down",
the argument "stride" would be used for down-sampling; when
using "up", "stride" would be used for up-sampling
(equivalent to transposed convolution).
export_hidden: whether to export the hidden layer as the second
output. This option is only used during the encoding
phase of the U-Net.
'''
super().__init__()
if stack_level < 1:
raise ValueError('modules.conv: The argument "stack_level" should be at least one.')
# The first layer performs the scaling.
self.with_exinput = isinstance(ex_planes, int) and ex_planes > 0
self.export_hidden = export_hidden
hidden_planes = hidden_planes if (isinstance(hidden_planes, int) and hidden_planes > 0) else out_planes
self.conv_list = nn.ModuleList()
for i in range(stack_level - 1):
self.conv_list.append(
_ConvModernNd(order, (in_planes + ex_planes) if i == 0 else hidden_planes, hidden_planes,
kernel_size=kernel_size, padding=padding, stride=1, scaler='down')
)
self.conv_scale = _ConvModernNd(order, hidden_planes if stack_level > 1 else (in_planes + ex_planes), out_planes,
kernel_size=kernel_size, padding=padding, stride=stride, scaler=scaler)
@staticmethod
def cropping(x0, x1):
x0_size = x0.shape[2:]
x1_size = x1.shape[2:]
x0_slice = [Ellipsis]
x1_slice = [Ellipsis]
for i in range(len(x0_size)):
get_size = min(x0_size[i], x1_size[i])
x0_shift = (x0_size[i] - get_size) // 2
x1_shift = (x1_size[i] - get_size) // 2
x0_slice.append(slice(x0_shift, x0_shift + get_size))
x1_slice.append(slice(x1_shift, x1_shift + get_size))
return torch.cat((x0[tuple(x0_slice)],
x1[tuple(x1_slice)]), dim=1) # Middle cropping
def forward(self, *x):
if self.with_exinput:
x = self.cropping(x[0], x[1])
else:
x = x[0]
for layer in self.conv_list:
x = layer(x)
res = self.conv_scale(x)
if self.export_hidden:
return res, x
else:
return res
class _UNetNd(nn.Module):
'''N-D convolutional network based U-Net
This moule is a built-in model for convolutional U-Net. The network is
inspired by:
https://github.com/milesial/Pytorch-UNet
The network would down-sample and up-sample the input data according to
the network depth. The depth is given by the length of the argument
"layers".
'''
def __init__(self, order, channel, layers, kernel_size=3, in_planes=1, out_planes=1):
'''Initialization
Arguments:
order: the network dimension. For example, when order=2, the
nn.Conv2d would be used.
channel: the channel number of the first layer, would also used
as the base of the following channels.
layers: a list of layer numbers. Each number represents the number
of convolutional layers of a stage. The stage numer, i.e.
the depth of the network is the length of this list.
Arguments (optional):
kernel_size: the kernel size of each block.
in_planes: the channel number of the input data.
out_planes: the channel number of the output data.
'''
super().__init__()
if len(layers) < 2:
raise ValueError('modules.conv: The argument "layers" should contain at least 2 values, but provide "{0}"'.format(layers))
self.__layers = layers
ConvNd = get_convnd(order=order)
ksize_e, psize_e, _ = cal_kernel_padding(kernel_size, ksize_plus=2)
self.conv_first = ConvNd(in_planes, channel, kernel_size=ksize_e, stride=1, padding=psize_e, bias=False)
self.conv_down_list = nn.ModuleList()
self.conv_up_list = nn.ModuleList()
ksize, psize, stride = cal_kernel_padding(kernel_size)
# Down scaling route
self.conv_down_list.append(
_BlockConvStkNd(order, channel, channel, kernel_size=ksize, padding=psize,
stride=stride, stack_level=layers[0], ex_planes=0, scaler='down', export_hidden=True))
for n_l in layers[1:-1]:
self.conv_down_list.append(
_BlockConvStkNd(order, channel, channel * 2, kernel_size=ksize, padding=psize,
stride=stride, stack_level=n_l, ex_planes=0, scaler='down', export_hidden=True))
channel = channel * 2
# Middle block
self.conv_middle_up = _BlockConvStkNd(order, channel, channel, hidden_planes=channel * 2, kernel_size=ksize, padding=psize,
stride=stride, stack_level=layers[-1], ex_planes=0, scaler='up')
# Up scaling route
for n_l in layers[-2:0:-1]:
self.conv_up_list.append(
_BlockConvStkNd(order, channel, channel // 2, hidden_planes=channel, kernel_size=ksize, padding=psize,
stride=stride, stack_level=n_l, ex_planes=channel, scaler='up'))
channel = channel // 2
self.conv_up_list.append(
_BlockConvStkNd(order, channel, channel, hidden_planes=channel, kernel_size=ksize, padding=psize,
stride=1, stack_level=layers[0], ex_planes=channel, scaler='down'))
self.conv_final = ConvNd(channel, out_planes, kernel_size=ksize_e, stride=1, padding=psize_e, bias=True)
@property
def nlayers(self):
'''Return number of convolutional layers along the depth.
'''
if len(self.__layers) == 0:
return 0
n_layers = functools.reduce(lambda x, y: x + 2 * y, self.__layers[:-1], self.__layers[-1]) + 2
return n_layers
def forward(self, x):
x = self.conv_first(x)
x_down_route = list()
for layer in self.conv_down_list:
x, x_sk = layer(x)
x_down_route.append(x_sk)
x = self.conv_middle_up(x)
x_down_route.reverse()
for layer, x_sk in zip(self.conv_up_list, x_down_route):
x = layer(x, x_sk)
x = self.conv_final(x)
return x
class _AENd(nn.Module):
'''N-D convolutional auto-encoder.
This moule is a built-in model for convolutional auto-encoder.
The network would down-sample and up-sample and the input data according
to the network depth. The depth is given by the length of the argument
"layers".
'''
def __init__(self, order, channel, layers, kernel_size=3, in_planes=1, out_planes=1):
'''Initialization
Arguments:
order: the network dimension. For example, when order=2, the
nn.Conv2d would be used.
channel: the channel number of the first layer, would also used
as the base of the following channels.
layers: a list of layer numbers. Each number represents the number
of convolutional layers of a stage. The stage numer, i.e.
the depth of the network is the length of this list.
Arguments (optional):
kernel_size: the kernel size of each block.
in_planes: the channel number of the input data.
out_planes: the channel number of the output data.
'''
super().__init__()
if len(layers) < 2:
raise ValueError('modules.conv: The argument "layers" should contain at least 2 values, but provide "{0}"'.format(layers))
self.__layers = layers
ConvNd = get_convnd(order=order)
ksize_e, psize_e, _ = cal_kernel_padding(kernel_size, ksize_plus=2)
self.conv_first = ConvNd(in_planes, channel, kernel_size=ksize_e, stride=1, padding=psize_e, bias=False)
self.conv_down_list = nn.ModuleList()
self.conv_up_list = nn.ModuleList()
ksize, psize, stride = cal_kernel_padding(kernel_size)
# Down scaling route
self.conv_down_list.append(
_BlockConvStkNd(order, channel, channel, kernel_size=ksize, padding=psize,
stride=stride, stack_level=layers[0], ex_planes=0, scaler='down'))
for n_l in layers[1:-1]:
self.conv_down_list.append(
_BlockConvStkNd(order, channel, channel * 2, kernel_size=ksize, padding=psize,
stride=stride, stack_level=n_l, ex_planes=0, scaler='down'))
channel = channel * 2
# Middle block
self.conv_middle_up = _BlockConvStkNd(order, channel, channel, hidden_planes=channel * 2, kernel_size=ksize, padding=psize,
stride=stride, stack_level=layers[-1], scaler='up')
# Up scaling route
for n_l in layers[-2:0:-1]:
self.conv_up_list.append(
_BlockConvStkNd(order, channel, channel // 2, hidden_planes=channel, kernel_size=ksize, padding=psize,
stride=stride, stack_level=n_l, scaler='up'))
channel = channel // 2
self.conv_up_list.append(
_BlockConvStkNd(order, channel, channel, hidden_planes=channel, kernel_size=ksize, padding=psize,
stride=1, stack_level=layers[0], scaler='down'))
self.conv_final = ConvNd(channel, out_planes, kernel_size=ksize_e, stride=1, padding=psize_e, bias=True)
@property
def nlayers(self):
'''Return number of convolutional layers along the depth.
'''
if len(self.__layers) == 0:
return 0
n_layers = functools.reduce(lambda x, y: x + 2 * y, self.__layers[:-1], self.__layers[-1]) + 2
return n_layers
@staticmethod
def cropping(x, x_ref_s):
x_size = x.shape[2:]
x_ref_size = x_ref_s[2:]
x_slice = [Ellipsis]
for i in range(len(x_size)):
get_size = min(x_size[i], x_ref_size[i])
x_shift = (x_size[i] - get_size) // 2
x_slice.append(slice(x_shift, x_shift + get_size))
return x[tuple(x_slice)] # Middle cropping
def forward(self, x):
x = self.conv_first(x)
x_down_route = list()
for layer in self.conv_down_list:
x_down_route.append(x.shape)
x = layer(x)
x = self.conv_middle_up(x)
x_down_route.reverse()
for layer, x_ref_s in zip(self.conv_up_list, x_down_route):
x = self.cropping(x, x_ref_s)
x = layer(x)
x = self.conv_final(x)
return x
class _EncoderNetNd(nn.Module):
'''N-D convolutional down-scale (encoder) network.
This moule is a built-in model for convolutional network. The network
could be used for down-scaling or classification.
The network would down-sample and the input data according to the network
depth. The depth is given by the length of the argument "layers".
'''
def __init__(self, order, channel, layers, kernel_size=3, in_planes=1, out_length=2):
'''Initialization
Arguments:
order: the network dimension. For example, when order=2, the
nn.Conv2d would be used.
channel: the channel number of the first layer, would also used
as the base of the following channels.
layers: a list of layer numbers. Each number represents the number
of convolutional layers of a stage. The stage numer, i.e.
the depth of the network is the length of this list.
Arguments (optional):
kernel_size: the kernel size of each block.
in_planes: the channel number of the input data.
out_length: the length of the output vector, if not set, the
output would not be flattened.
'''
super().__init__()
if len(layers) < 2:
raise ValueError('modules.conv: The argument "layers" should contain at least 2 values, but provide "{0}"'.format(layers))
self.__layers = layers
ConvNd = get_convnd(order=order)
ksize_e, psize_e, _ = cal_kernel_padding(kernel_size, ksize_plus=2)
ksize, psize, stride = cal_kernel_padding(kernel_size)
# Down scaling route
netbody = nn.ModuleList([
ConvNd(in_planes, channel, kernel_size=ksize_e, stride=1, padding=psize_e, bias=False),
_BlockConvStkNd(order, channel, channel, kernel_size=ksize, padding=psize,
stride=stride, stack_level=layers[0], scaler='down')])
for layer in layers[1:]:
netbody.append(
_BlockConvStkNd(order, channel, channel * 2, kernel_size=ksize, padding=psize,
stride=stride, stack_level=layer, scaler='down'))
channel = channel * 2
netbody.append(
ConvNd(channel, channel, kernel_size=ksize, stride=1, padding=psize, bias=True))
self.is_out_vector = (out_length is not None and out_length > 0)
if self.is_out_vector:
netbody.append(get_adaptive_pooling(order=order, out_size=1))
self.netbody = netbody
if self.is_out_vector:
self.fc = nn.Linear(channel, out_length, bias=True)
@property
def nlayers(self):
'''Return number of convolutional layers along the depth.
'''
if len(self.__layers) == 0:
return 0
n_layers = functools.reduce(lambda x, y: x + y, self.__layers, 0) + 2
return n_layers
def forward(self, x):
for layer in self.netbody:
x = layer(x)
if self.is_out_vector:
x = torch.flatten(x, 1)
return self.fc(x)
else:
return x
class _DecoderNetNd(nn.Module):
'''N-D convolutional up-scale (decoder) network.
This moule is a built-in model for convolutional network. The network
could be used for up-scaling or generating samples.
The network would up-sample and the input data according to the network
depth. The depth is given by the length of the argument "layers".
Different from the encoder network, this module requires the output
shape, and the input shape is inferred from the given output shape.
'''
def __init__(self, order, channel, layers, out_size, kernel_size=3, in_length=2, out_planes=1):
'''Initialization
Arguments:
order: the network dimension. For example, when order=2, the
nn.Conv2d would be used.
channel: the channel number of the first layer, would also used
as the base of the following channels.
layers: a list of layer numbers. Each number represents the number
of convolutional layers of a stage. The stage numer, i.e.
the depth of the network is the length of this list.
out_size: the shape of the output data (without the sample and
channel dimension). This argument is required, because
the shape of the first layer is inferred from it.
Arguments (optional):
kernel_size: the kernel size of each block.
in_length: the length of the input vector, if not set, the
input requires to be a specific shape tensor. Use
the self.in_shape property to get it.
out_planes: the channel number of the output data.
'''
super().__init__()
if len(layers) < 2:
raise ValueError('modules.conv: The argument "layers" should contain at least 2 values, but provide "{0}"'.format(layers))
self.__layers = layers
self.__in_length = in_length
ConvNd = get_convnd(order=order)
ksize_e, psize_e, _ = cal_kernel_padding(kernel_size, ksize_plus=2)
ksize, psize, stride = cal_kernel_padding(kernel_size)
self.__order = order
if isinstance(out_size, int):
out_size = (out_size, ) * order
self.shapes = cal_scaled_shapes(out_size, level=len(layers), stride=stride)
channels = tuple(map(lambda n: channel * (2 ** n), range(len(layers) - 1, -1, -1)))
self.__in_channel = channels[0]
# Require to convert the vector into channels
self.is_in_vector = (in_length is not None and in_length > 0)
if self.is_in_vector:
in_shapes = self.shapes[-1]
in_pad = tuple(s - 1 for s in in_shapes)
self.conv_in = ConvNd(in_length, channels[0], kernel_size=in_shapes, padding=in_pad, bias=True)
# Up scaling route
self.conv_first = ConvNd(channels[0], channels[0], kernel_size=ksize, stride=1, padding=psize, bias=False)
netbody = nn.ModuleList()
for i, layer in enumerate(layers[:-1]):
netbody.append(
_BlockConvStkNd(order, channels[i], channels[i + 1], kernel_size=ksize, padding=psize,
stride=stride, stack_level=layer, scaler='up'))
netbody.append(
_BlockConvStkNd(order, channels[-1], channels[-1], kernel_size=ksize, padding=psize,
stride=stride, stack_level=layers[-1], scaler='up'))
self.netbody = netbody
self.conv_last = ConvNd(channels[-1], out_planes, kernel_size=ksize_e, stride=1, padding=psize_e, bias=True)
@property
def input_size(self):
if self.is_in_vector:
return (self.__in_length, )
else:
return (self.__in_channel, *self.shapes[-1])
@property
def nlayers(self):
'''Return number of convolutional layers along the depth.
'''
if len(self.__layers) == 0:
return 0
n_layers = functools.reduce(lambda x, y: x + y, self.__layers, 0) + (3 if self.is_in_vector else 2)
return n_layers
@staticmethod
def cropping(x, x_ref_s):
x_size = x.shape[2:]
x_ref_size = x_ref_s
x_slice = [Ellipsis]
for i in range(len(x_size)):
get_size = min(x_size[i], x_ref_size[i])
x_shift = (x_size[i] - get_size) // 2
x_slice.append(slice(x_shift, x_shift + get_size))
return x[tuple(x_slice)] # Middle cropping
def forward(self, x):
if self.is_in_vector:
x = x[(Ellipsis, *((None,) * self.__order))]
x = self.conv_in(x)
x = self.cropping(x, self.shapes[-1])
x = self.conv_first(x)
for layer, xs in zip(self.netbody, self.shapes[-2::-1]):
x = layer(x)
x = self.cropping(x, xs)
x = self.conv_last(x)
return x
class ConvModern1d(_ConvModernNd):
'''1D Modern convolutional layer
The implementation for the modern convolutional layer. The modern
convolutional layer is a stack of convolution, normalization and
activation.
In the following paper, a new op composition order is proposed
for building residual block:
https://arxiv.org/abs/1603.05027
We also support this implementation.
'''
def __init__(self, in_planes, out_planes, kernel_size=3, stride=1, padding=1, output_size=None,
normalizer='pinst', activator='prelu', layer_order='new', scaler='down'):
'''Initialization.
Arguments:
in_planes: the channel number of the input data.
out_planes: the channel number of the output data.
Arguments (optional):
kernel_size: the kernel size of this layer.
stride: the stride size of this layer.
padding: the padding size of the convolutional layer.
output_size: the size of the output data. This option is only used
when "scaler=up". When setting this value, the size
of the up-sampling would be given explicitly and
the option "stride" would not be used.
normalizer: the normalization method, could be:
- "batch": Batch normalization.
- "inst": Instance normalization.
- "pinst": Instance normalization with tunable
rescaling parameters.
- "null": Without normalization, would falls back to
the "convolution + activation" form.
activator: activation method, could be:
- "prelu", - "relu", - "null".
layer_order: the sub-layer composition order, could be:
- "new": norm + activ + conv
- "old": conv + norm + activ
scaler: scaling method. Could be "down" or "up". When using "down",
the argument "stride" would be used for down-sampling; when
using "up", "stride" would be used for up-sampling
(equivalent to transposed convolution).
'''
super().__init__(1, in_planes=in_planes, out_planes=out_planes,
kernel_size=kernel_size, stride=stride, padding=padding, output_size=output_size,
normalizer=normalizer, activator=activator,
layer_order=layer_order, scaler=scaler)
class ConvModern2d(_ConvModernNd):
'''2D Modern convolutional layer
The implementation for the modern convolutional layer. The modern
convolutional layer is a stack of convolution, normalization and
activation.
In the following paper, a new op composition order is proposed
for building residual block:
https://arxiv.org/abs/1603.05027
We also support this implementation.
'''
def __init__(self, in_planes, out_planes, kernel_size=3, stride=1, padding=1, output_size=None,
normalizer='pinst', activator='prelu', layer_order='new', scaler='down'):
'''Initialization.
Arguments:
in_planes: the channel number of the input data.
out_planes: the channel number of the output data.
Arguments (optional):
kernel_size: the kernel size of this layer.
stride: the stride size of this layer.
padding: the padding size of the convolutional layer.
output_size: the size of the output data. This option is only used
when "scaler=up". When setting this value, the size
of the up-sampling would be given explicitly and
the option "stride" would not be used.
normalizer: the normalization method, could be:
- "batch": Batch normalization.
- "inst": Instance normalization.
- "pinst": Instance normalization with tunable
rescaling parameters.
- "null": Without normalization, would falls back to
the "convolution + activation" form.
activator: activation method, could be:
- "prelu", - "relu", - "null".
layer_order: the sub-layer composition order, could be:
- "new": norm + activ + conv
- "old": conv + norm + activ
scaler: scaling method. Could be "down" or "up". When using "down",
the argument "stride" would be used for down-sampling; when
using "up", "stride" would be used for up-sampling
(equivalent to transposed convolution).
'''
super().__init__(2, in_planes=in_planes, out_planes=out_planes,
kernel_size=kernel_size, stride=stride, padding=padding, output_size=output_size,
normalizer=normalizer, activator=activator,
layer_order=layer_order, scaler=scaler)
class ConvModern3d(_ConvModernNd):
'''3D Modern convolutional layer
The implementation for the modern convolutional layer. The modern
convolutional layer is a stack of convolution, normalization and
activation.
In the following paper, a new op composition order is proposed
for building residual block:
https://arxiv.org/abs/1603.05027
We also support this implementation.
'''
def __init__(self, in_planes, out_planes, kernel_size=3, stride=1, padding=1, output_size=None,
normalizer='pinst', activator='prelu', layer_order='new', scaler='down'):
'''Initialization.
Arguments:
in_planes: the channel number of the input data.
out_planes: the channel number of the output data.
Arguments (optional):
kernel_size: the kernel size of this layer.
stride: the stride size of this layer.
padding: the padding size of the convolutional layer.
output_size: the size of the output data. This option is only used
when "scaler=up". When setting this value, the size
of the up-sampling would be given explicitly and
the option "stride" would not be used.
normalizer: the normalization method, could be:
- "batch": Batch normalization.
- "inst": Instance normalization.
- "pinst": Instance normalization with tunable
rescaling parameters.
- "null": Without normalization, would falls back to
the "convolution + activation" form.
activator: activation method, could be:
- "prelu", - "relu", - "null".
layer_order: the sub-layer composition order, could be:
- "new": norm + activ + conv
- "old": conv + norm + activ
scaler: scaling method. Could be "down" or "up". When using "down",
the argument "stride" would be used for down-sampling; when
using "up", "stride" would be used for up-sampling
(equivalent to transposed convolution).
'''
super().__init__(3, in_planes=in_planes, out_planes=out_planes,
kernel_size=kernel_size, stride=stride, padding=padding, output_size=output_size,
normalizer=normalizer, activator=activator,
layer_order=layer_order, scaler=scaler)
class UNet1d(_UNetNd):
'''1D convolutional network based U-Net
This moule is a built-in model for convolutional U-Net. The network is
inspired by:
https://github.com/milesial/Pytorch-UNet
The network would down-sample and up-sample the input data according to
the network depth. The depth is given by the length of the argument
"layers".
'''
def __init__(self, channel, layers, kernel_size=3, in_planes=1, out_planes=1):
'''Initialization
Arguments:
channel: the channel number of the first layer, would also used
as the base of the following channels.
layers: a list of layer numbers. Each number represents the number
of convolutional layers of a stage. The stage numer, i.e.
the depth of the network is the length of this list.
Arguments (optional):
kernel_size: the kernel size of each block.
in_planes: the channel number of the input data.
out_planes: the channel number of the output data.
'''
super().__init__(1, channel=channel, layers=layers, kernel_size=kernel_size,
in_planes=in_planes, out_planes=out_planes)
class UNet2d(_UNetNd):
'''2D convolutional network based U-Net
This moule is a built-in model for convolutional U-Net. The network is
inspired by:
https://github.com/milesial/Pytorch-UNet
The network would down-sample and up-sample the input data according to
the network depth. The depth is given by the length of the argument
"layers".
'''
def __init__(self, channel, layers, kernel_size=3, in_planes=1, out_planes=1):
'''Initialization
Arguments:
channel: the channel number of the first layer, would also used
as the base of the following channels.
layers: a list of layer numbers. Each number represents the number
of convolutional layers of a stage. The stage numer, i.e.
the depth of the network is the length of this list.
Arguments (optional):
kernel_size: the kernel size of each block.
in_planes: the channel number of the input data.
out_planes: the channel number of the output data.
'''
super().__init__(order=2, channel=channel, layers=layers, kernel_size=kernel_size,
in_planes=in_planes, out_planes=out_planes)
class UNet3d(_UNetNd):
'''3D convolutional network based U-Net
This moule is a built-in model for convolutional U-Net. The network is
inspired by:
https://github.com/milesial/Pytorch-UNet
The network would down-sample and up-sample the input data according to
the network depth. The depth is given by the length of the argument
"layers".
'''
def __init__(self, channel, layers, kernel_size=3, in_planes=1, out_planes=1):
'''Initialization
Arguments:
channel: the channel number of the first layer, would also used
as the base of the following channels.
layers: a list of layer numbers. Each number represents the number
of convolutional layers of a stage. The stage numer, i.e.
the depth of the network is the length of this list.
Arguments (optional):
kernel_size: the kernel size of each block.
in_planes: the channel number of the input data.
out_planes: the channel number of the output data.
'''
super().__init__(order=3, channel=channel, layers=layers, kernel_size=kernel_size,
in_planes=in_planes, out_planes=out_planes)
class AE1d(_AENd):
'''1D convolutional auto-encoder.
This moule is a built-in model for convolutional auto-encoder.
The network would down-sample and up-sample and the input data according
to the network depth. The depth is given by the length of the argument
"layers".
'''
def __init__(self, channel, layers, kernel_size=3, in_planes=1, out_planes=1):
'''Initialization
Arguments:
channel: the channel number of the first layer, would also used
as the base of the following channels.
layers: a list of layer numbers. Each number represents the number
of convolutional layers of a stage. The stage numer, i.e.
the depth of the network is the length of this list.
Arguments (optional):
kernel_size: the kernel size of each block.
in_planes: the channel number of the input data.
out_planes: the channel number of the output data.
'''
super().__init__(1, channel=channel, layers=layers, kernel_size=kernel_size,
in_planes=in_planes, out_planes=out_planes)
class AE2d(_AENd):
'''2D convolutional auto-encoder.
This moule is a built-in model for convolutional auto-encoder.
The network would down-sample and up-sample and the input data according
to the network depth. The depth is given by the length of the argument
"layers".
'''
def __init__(self, channel, layers, kernel_size=3, in_planes=1, out_planes=1):
'''Initialization
Arguments:
channel: the channel number of the first layer, would also used
as the base of the following channels.
layers: a list of layer numbers. Each number represents the number
of convolutional layers of a stage. The stage numer, i.e.
the depth of the network is the length of this list.
Arguments (optional):
kernel_size: the kernel size of each block.
in_planes: the channel number of the input data.
out_planes: the channel number of the output data.
'''
super().__init__(2, channel=channel, layers=layers, kernel_size=kernel_size,
in_planes=in_planes, out_planes=out_planes)
class AE3d(_AENd):
'''3D convolutional auto-encoder.
This moule is a built-in model for convolutional auto-encoder.
The network would down-sample and up-sample and the input data according
to the network depth. The depth is given by the length of the argument
"layers".
'''
def __init__(self, channel, layers, kernel_size=3, in_planes=1, out_planes=1):
'''Initialization
Arguments:
channel: the channel number of the first layer, would also used
as the base of the following channels.
layers: a list of layer numbers. Each number represents the number
of convolutional layers of a stage. The stage numer, i.e.
the depth of the network is the length of this list.
Arguments (optional):
kernel_size: the kernel size of each block.
in_planes: the channel number of the input data.
out_planes: the channel number of the output data.
'''
super().__init__(3, channel=channel, layers=layers, kernel_size=kernel_size,
in_planes=in_planes, out_planes=out_planes)
class EncoderNet1d(_EncoderNetNd):
'''1D convolutional down-scale (encoder) network.
This moule is a built-in model for convolutional network. The network
could be used for down-scaling or classification.
The network would down-sample and the input data according to the network
depth. The depth is given by the length of the argument "layers".
'''
def __init__(self, channel, layers, kernel_size=3, in_planes=1, out_length=2):
'''Initialization
Arguments:
channel: the channel number of the first layer, would also used
as the base of the following channels.
layers: a list of layer numbers. Each number represents the number
of convolutional layers of a stage. The stage numer, i.e.
the depth of the network is the length of this list.
Arguments (optional):
kernel_size: the kernel size of each block.
in_planes: the channel number of the input data.
out_length: the length of the output vector, if not set, the
output would not be flattened.
'''
super().__init__(1, channel=channel, layers=layers, kernel_size=kernel_size,
in_planes=in_planes, out_length=out_length)
class EncoderNet2d(_EncoderNetNd):
'''2D convolutional down-scale (encoder) network.
This moule is a built-in model for convolutional network. The network
could be used for down-scaling or classification.
The network would down-sample and the input data according to the network
depth. The depth is given by the length of the argument "layers".
'''
def __init__(self, channel, layers, kernel_size=3, in_planes=1, out_length=2):
'''Initialization
Arguments:
channel: the channel number of the first layer, would also used
as the base of the following channels.
layers: a list of layer numbers. Each number represents the number
of convolutional layers of a stage. The stage numer, i.e.
the depth of the network is the length of this list.
Arguments (optional):
kernel_size: the kernel size of each block.
in_planes: the channel number of the input data.
out_length: the length of the output vector, if not set, the
output would not be flattened.
'''
super().__init__(2, channel=channel, layers=layers, kernel_size=kernel_size,
in_planes=in_planes, out_length=out_length)
class EncoderNet3d(_EncoderNetNd):
'''3D convolutional down-scale (encoder) network.
This moule is a built-in model for convolutional network. The network
could be used for down-scaling or classification.
The network would down-sample and the input data according to the network
depth. The depth is given by the length of the argument "layers".
'''
def __init__(self, channel, layers, kernel_size=3, in_planes=1, out_length=2):
'''Initialization
Arguments:
channel: the channel number of the first layer, would also used
as the base of the following channels.
layers: a list of layer numbers. Each number represents the number
of convolutional layers of a stage. The stage numer, i.e.
the depth of the network is the length of this list.
Arguments (optional):
kernel_size: the kernel size of each block.
in_planes: the channel number of the input data.
out_length: the length of the output vector, if not set, the
output would not be flattened.
'''
super().__init__(3, channel=channel, layers=layers, kernel_size=kernel_size,
in_planes=in_planes, out_length=out_length)
class DecoderNet1d(_DecoderNetNd):
'''1D convolutional up-scale (decoder) network.
This moule is a built-in model for convolutional network. The network
could be used for up-scaling or generating samples.
The network would up-sample and the input data according to the network
depth. The depth is given by the length of the argument "layers".
Different from the encoder network, this module requires the output
shape, and the input shape is inferred from the given output shape.
'''
def __init__(self, channel, layers, out_size, kernel_size=3, in_length=2, out_planes=1):
'''Initialization
Arguments:
channel: the channel number of the first layer, would also used
as the base of the following channels.
layers: a list of layer numbers. Each number represents the number
of convolutional layers of a stage. The stage numer, i.e.
the depth of the network is the length of this list.
out_size: the shape of the output data (without the sample and
channel dimension). This argument is required, because
the shape of the first layer is inferred from it.
Arguments (optional):
kernel_size: the kernel size of each block.
in_length: the length of the input vector, if not set, the
input requires to be a specific shape tensor. Use
the self.in_shape property to get it.
out_planes: the channel number of the output data.
'''
super().__init__(1, channel=channel, layers=layers, out_size=out_size,
kernel_size=kernel_size, in_length=in_length, out_planes=out_planes)
class DecoderNet2d(_DecoderNetNd):
'''2D convolutional up-scale (decoder) network.
This moule is a built-in model for convolutional network. The network
could be used for up-scaling or generating samples.
The network would up-sample and the input data according to the network
depth. The depth is given by the length of the argument "layers".
Different from the encoder network, this module requires the output
shape, and the input shape is inferred from the given output shape.
'''
def __init__(self, channel, layers, out_size, kernel_size=3, in_length=2, out_planes=1):
'''Initialization
Arguments:
channel: the channel number of the first layer, would also used
as the base of the following channels.
layers: a list of layer numbers. Each number represents the number
of convolutional layers of a stage. The stage numer, i.e.
the depth of the network is the length of this list.
out_size: the shape of the output data (without the sample and
channel dimension). This argument is required, because
the shape of the first layer is inferred from it.
Arguments (optional):
kernel_size: the kernel size of each block.
in_length: the length of the input vector, if not set, the
input requires to be a specific shape tensor. Use
the self.in_shape property to get it.
out_planes: the channel number of the output data.
'''
super().__init__(2, channel=channel, layers=layers, out_size=out_size,
kernel_size=kernel_size, in_length=in_length, out_planes=out_planes)
class DecoderNet3d(_DecoderNetNd):
'''3D convolutional up-scale (decoder) network.
This moule is a built-in model for convolutional network. The network
could be used for up-scaling or generating samples.
The network would up-sample and the input data according to the network
depth. The depth is given by the length of the argument "layers".
Different from the encoder network, this module requires the output
shape, and the input shape is inferred from the given output shape.
'''
def __init__(self, channel, layers, out_size, kernel_size=3, in_length=2, out_planes=1):
'''Initialization
Arguments:
channel: the channel number of the first layer, would also used
as the base of the following channels.
layers: a list of layer numbers. Each number represents the number
of convolutional layers of a stage. The stage numer, i.e.
the depth of the network is the length of this list.
out_size: the shape of the output data (without the sample and
channel dimension). This argument is required, because
the shape of the first layer is inferred from it.
Arguments (optional):
kernel_size: the kernel size of each block.
in_length: the length of the input vector, if not set, the
input requires to be a specific shape tensor. Use
the self.in_shape property to get it.
out_planes: the channel number of the output data.
'''
super().__init__(3, channel=channel, layers=layers, out_size=out_size,
kernel_size=kernel_size, in_length=in_length, out_planes=out_planes)
def __get_unet_nd(order):
if order == 3:
return UNet3d
elif order == 2:
return UNet2d
elif order == 1:
return UNet1d
else:
raise ValueError('modules.conv: The argument "order" could only be 1, 2, or 3.')
def __get_ae_nd(order):
if order == 3:
return AE3d
elif order == 2:
return AE2d
elif order == 1:
return AE1d
else:
raise ValueError('modules.conv: The argument "order" could only be 1, 2, or 3.')
def __get_encnet_nd(order):
if order == 3:
return EncoderNet3d
elif order == 2:
return EncoderNet2d
elif order == 1:
return EncoderNet1d
else:
raise ValueError('modules.conv: The argument "order" could only be 1, 2, or 3.')
def __get_decnet_nd(order):
if order == 3:
return DecoderNet3d
elif order == 2:
return DecoderNet2d
elif order == 1:
return DecoderNet1d
else:
raise ValueError('modules.conv: The argument "order" could only be 1, 2, or 3.')
# unet
def unet12(order=2, **kwargs):
'''Constructs a conv.UNet-12 model.
Configurations:
Network depth: 3
Stage details: [2, 2, 2]
First channel number: 64
Arguments:
order: the dimension of the network. For example, when
order=2, the nn.Conv2d would be used.
Other Arguments (see mdnc.modules.conv.UNet*d):
in_planes, out_planes, kernel_size
'''
model = __get_unet_nd(order)(64, [2, 2, 2], **kwargs)
return model
def unet16(order=2, **kwargs):
'''Constructs a conv.UNet-16 model.
Configurations:
Network depth: 4
Stage details: [2, 2, 2, 2]
First channel number: 64
Arguments:
order: the dimension of the network. For example, when
order=2, the nn.Conv2d would be used.
Other Arguments (see mdnc.modules.conv.UNet*d):
in_planes, out_planes, kernel_size
'''
model = __get_unet_nd(order)(64, [2, 2, 2, 2], **kwargs)
return model
def unet17(order=2, **kwargs):
'''Constructs a conv.UNet-17 model.
Configurations:
Network depth: 3
Stage details: [3, 3, 3]
First channel number: 64
Arguments:
order: the dimension of the network. For example, when
order=2, the nn.Conv2d would be used.
Other Arguments (see mdnc.modules.conv.UNet*d):
in_planes, out_planes, kernel_size
'''
model = __get_unet_nd(order)(64, [3, 3, 3], **kwargs)
return model
def unet23(order=2, **kwargs):
'''Constructs a conv.UNet-23 model.
Configurations:
Network depth: 4
Stage details: [3, 3, 3, 3]
First channel number: 64
Arguments:
order: the dimension of the network. For example, when
order=2, the nn.Conv2d would be used.
Other Arguments (see mdnc.modules.conv.UNet*d):
in_planes, out_planes, kernel_size
'''
model = __get_unet_nd(order)(64, [3, 3, 3, 3], **kwargs)
return model
def unet29(order=2, **kwargs):
'''Constructs a conv.UNet-29 model.
This model is equivalent to
https://github.com/milesial/Pytorch-UNet
Configurations:
Network depth: 5
Stage details: [3, 3, 3, 3, 3]
First channel number: 64
Arguments:
order: the dimension of the network. For example, when
order=2, the nn.Conv2d would be used.
Other Arguments (see mdnc.modules.conv.UNet*d):
in_planes, out_planes, kernel_size
'''
model = __get_unet_nd(order)(64, [3, 3, 3, 3, 3], **kwargs)
return model
# ae
def ae12(order=2, **kwargs):
'''Constructs a conv.AE-12 model.
Configurations:
Network depth: 3
Stage details: [2, 2, 2]
First channel number: 64
Arguments:
order: the dimension of the network. For example, when
order=2, the nn.Conv2d would be used.
Other Arguments (see mdnc.modules.conv.AE*d):
in_planes, out_planes, kernel_size
'''
model = __get_ae_nd(order)(64, [2, 2, 2], **kwargs)
return model
def ae16(order=2, **kwargs):
'''Constructs a conv.AE-16 model.
Configurations:
Network depth: 4
Stage details: [2, 2, 2, 2]
First channel number: 64
Arguments:
order: the dimension of the network. For example, when
order=2, the nn.Conv2d would be used.
Other Arguments (see mdnc.modules.conv.AE*d):
in_planes, out_planes, kernel_size
'''
model = __get_ae_nd(order)(64, [2, 2, 2, 2], **kwargs)
return model
def ae17(order=2, **kwargs):
'''Constructs a conv.AE-17 model.
Configurations:
Network depth: 3
Stage details: [3, 3, 3]
First channel number: 64
Arguments:
order: the dimension of the network. For example, when
order=2, the nn.Conv2d would be used.
Other Arguments (see mdnc.modules.conv.AE*d):
in_planes, out_planes, kernel_size
'''
model = __get_ae_nd(order)(64, [3, 3, 3], **kwargs)
return model
def ae23(order=2, **kwargs):
'''Constructs a conv.AE-23 model.
Configurations:
Network depth: 4
Stage details: [3, 3, 3, 3]
First channel number: 64
Arguments:
order: the dimension of the network. For example, when
order=2, the nn.Conv2d would be used.
Other Arguments (see mdnc.modules.conv.AE*d):
in_planes, out_planes, kernel_size
'''
model = __get_ae_nd(order)(64, [3, 3, 3, 3], **kwargs)
return model
def ae29(order=2, **kwargs):
'''Constructs a conv.AE-29 model.
Configurations:
Network depth: 5
Stage details: [3, 3, 3, 3, 3]
First channel number: 64
Arguments:
order: the dimension of the network. For example, when
order=2, the nn.Conv2d would be used.
Other Arguments (see mdnc.modules.conv.AE*d):
in_planes, out_planes, kernel_size
'''
model = __get_ae_nd(order)(64, [3, 3, 3, 3, 3], **kwargs)
return model
# encnet
def encnet12(order=2, **kwargs):
'''Constructs a conv.EncoderNet-12 model.
Configurations:
Network depth: 5
Stage details: [2, 2, 2, 2, 2]
First channel number: 64
Arguments:
order: the dimension of the network. For example, when
order=2, the nn.Conv2d would be used.
Other Arguments (see mdnc.modules.conv.EncoderNet*d):
in_planes, out_length, kernel_size
'''
model = __get_encnet_nd(order)(64, [2, 2, 2, 2, 2], **kwargs)
return model
def encnet15(order=2, **kwargs):
'''Constructs a conv.EncoderNet-15 model.
Configurations:
Network depth: 5
Stage details: [2, 2, 3, 3, 3]
First channel number: 64
Arguments:
order: the dimension of the network. For example, when
order=2, the nn.Conv2d would be used.
Other Arguments (see mdnc.modules.conv.EncoderNet*d):
in_planes, out_length, kernel_size
'''
model = __get_encnet_nd(order)(64, [2, 2, 3, 3, 3], **kwargs)
return model
def encnet17(order=2, **kwargs):
'''Constructs a conv.EncoderNet-17 model.
Configurations:
Network depth: 5
Stage details: [3, 3, 3, 3, 3]
First channel number: 64
Arguments:
order: the dimension of the network. For example, when
order=2, the nn.Conv2d would be used.
Other Arguments (see mdnc.modules.conv.EncoderNet*d):
in_planes, out_length, kernel_size
'''
model = __get_encnet_nd(order)(64, [3, 3, 3, 3, 3], **kwargs)
return model
def encnet22(order=2, **kwargs):
'''Constructs a conv.EncoderNet-22 model.
Configurations:
Network depth: 5
Stage details: [4, 4, 4, 4, 4]
First channel number: 64
Arguments:
order: the dimension of the network. For example, when
order=2, the nn.Conv2d would be used.
Other Arguments (see mdnc.modules.conv.EncoderNet*d):
in_planes, out_length, kernel_size
'''
model = __get_encnet_nd(order)(64, [4, 4, 4, 4, 4], **kwargs)
return model
# decnet
def decnet13(out_size, order=2, **kwargs):
'''Constructs a conv.DecoderNet-13 model.
Configurations:
Network depth: 5
Stage details: [2, 2, 2, 2, 2]
First channel number: 64
Arguments:
out_size: the output shape of the network.
order: the dimension of the network. For example, when
order=2, the nn.Conv2d would be used.
Other Arguments (see mdnc.modules.conv.DecoderNet*d):
in_length, out_planes, kernel_size
'''
model = __get_decnet_nd(order)(64, [2, 2, 2, 2, 2], out_size=out_size, **kwargs)
return model
def decnet16(out_size, order=2, **kwargs):
'''Constructs a conv.DecoderNet-16 model.
Configurations:
Network depth: 5
Stage details: [3, 3, 2, 2, 2]
First channel number: 64
Arguments:
out_size: the output shape of the network.
order: the dimension of the network. For example, when
order=2, the nn.Conv2d would be used.
Other Arguments (see mdnc.modules.conv.DecoderNet*d):
in_length, out_planes, kernel_size
'''
model = __get_decnet_nd(order)(64, [3, 3, 2, 2, 2], out_size=out_size, **kwargs)
return model
def decnet18(out_size, order=2, **kwargs):
'''Constructs a conv.DecoderNet-18 model.
Configurations:
Network depth: 5
Stage details: [3, 3, 3, 3, 3]
First channel number: 64
Arguments:
out_size: the output shape of the network.
order: the dimension of the network. For example, when
order=2, the nn.Conv2d would be used.
Other Arguments (see mdnc.modules.conv.DecoderNet*d):
in_length, out_planes, kernel_size
'''
model = __get_decnet_nd(order)(64, [3, 3, 3, 3, 3], out_size=out_size, **kwargs)
return model
def decnet23(out_size, order=2, **kwargs):
'''Constructs a conv.DecoderNet-23 model.
Configurations:
Network depth: 5
Stage details: [4, 4, 4, 4, 4]
First channel number: 64
Arguments:
out_size: the output shape of the network.
order: the dimension of the network. For example, when
order=2, the nn.Conv2d would be used.
Other Arguments (see mdnc.modules.conv.DecoderNet*d):
in_length, out_planes, kernel_size
'''
model = __get_decnet_nd(order)(64, [4, 4, 4, 4, 4], out_size=out_size, **kwargs)
return model
| 45.29781
| 152
| 0.608834
| 8,027
| 62,058
| 4.569951
| 0.045596
| 0.0214
| 0.022681
| 0.025516
| 0.88676
| 0.870049
| 0.858299
| 0.84058
| 0.827222
| 0.819917
| 0
| 0.018122
| 0.307309
| 62,058
| 1,369
| 153
| 45.330898
| 0.835229
| 0.518644
| 0
| 0.556468
| 0
| 0.008214
| 0.049224
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.117043
| false
| 0
| 0.008214
| 0
| 0.273101
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
727b92fadb33cf85096ba2b5ce08e93b3a6e5b08
| 11,005
|
py
|
Python
|
test/test_multi_ofed.py
|
janciesko/hpc-container-maker
|
95526f76e3c0ca70df275ffd8ad7070fb50adf0b
|
[
"Apache-2.0"
] | null | null | null |
test/test_multi_ofed.py
|
janciesko/hpc-container-maker
|
95526f76e3c0ca70df275ffd8ad7070fb50adf0b
|
[
"Apache-2.0"
] | null | null | null |
test/test_multi_ofed.py
|
janciesko/hpc-container-maker
|
95526f76e3c0ca70df275ffd8ad7070fb50adf0b
|
[
"Apache-2.0"
] | null | null | null |
# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
#
# 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.
# pylint: disable=invalid-name, too-few-public-methods, bad-continuation
"""Test cases for the multi_ofed module"""
from __future__ import unicode_literals
from __future__ import print_function
import logging # pylint: disable=unused-import
import unittest
from helpers import centos, centos8, docker, ubuntu, ubuntu18, x86_64
from hpccm.building_blocks.multi_ofed import multi_ofed
class Test_multi_ofed(unittest.TestCase):
def setUp(self):
"""Disable logging output messages"""
logging.disable(logging.ERROR)
@x86_64
@ubuntu18
@docker
def test_versions_ubuntu18(self):
"""mlnx_version parameter"""
# Reduced set of versions to limit gold output
ofed = multi_ofed(mlnx_versions=['4.5-1.0.1.0', '4.6-1.0.1.1'])
self.assertEqual(str(ofed),
r'''# Mellanox OFED version 4.5-1.0.1.0
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ca-certificates \
gnupg \
libnl-3-200 \
libnl-route-3-200 \
libnuma1 \
wget && \
rm -rf /var/lib/apt/lists/*
RUN wget -qO - https://www.mellanox.com/downloads/ofed/RPM-GPG-KEY-Mellanox | apt-key add - && \
mkdir -p /etc/apt/sources.list.d && wget -q -nc --no-check-certificate -P /etc/apt/sources.list.d https://linux.mellanox.com/public/repo/mlnx_ofed/4.5-1.0.1.0/ubuntu18.04/mellanox_mlnx_ofed.list && \
apt-get update -y && \
mkdir -m 777 -p /var/tmp/packages_download && cd /var/tmp/packages_download && \
DEBIAN_FRONTEND=noninteractive apt-get download -y --no-install-recommends \
ibverbs-utils \
libibmad \
libibmad-devel \
libibumad \
libibumad-devel \
libibverbs-dev \
libibverbs1 \
libmlx4-1 \
libmlx4-dev \
libmlx5-1 \
libmlx5-dev \
librdmacm-dev \
librdmacm1 && \
mkdir -p /usr/local/ofed/4.5-1.0.1.0 && \
find /var/tmp/packages_download -regextype posix-extended -type f -regex "/var/tmp/packages_download/(ibverbs-utils|libibmad|libibmad-devel|libibumad|libibumad-devel|libibverbs-dev|libibverbs1|libmlx4-1|libmlx4-dev|libmlx5-1|libmlx5-dev|librdmacm-dev|librdmacm1).*deb" -exec dpkg --extract {} /usr/local/ofed/4.5-1.0.1.0 \; && \
rm -rf /var/tmp/packages_download && \
rm -f /etc/apt/sources.list.d/mellanox_mlnx_ofed.list && \
rm -rf /var/lib/apt/lists/*
RUN mkdir -p /etc/libibverbs.d
# Mellanox OFED version 4.6-1.0.1.1
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ca-certificates \
gnupg \
libnl-3-200 \
libnl-route-3-200 \
libnuma1 \
wget && \
rm -rf /var/lib/apt/lists/*
RUN wget -qO - https://www.mellanox.com/downloads/ofed/RPM-GPG-KEY-Mellanox | apt-key add - && \
mkdir -p /etc/apt/sources.list.d && wget -q -nc --no-check-certificate -P /etc/apt/sources.list.d https://linux.mellanox.com/public/repo/mlnx_ofed/4.6-1.0.1.1/ubuntu18.04/mellanox_mlnx_ofed.list && \
apt-get update -y && \
mkdir -m 777 -p /var/tmp/packages_download && cd /var/tmp/packages_download && \
DEBIAN_FRONTEND=noninteractive apt-get download -y --no-install-recommends \
ibverbs-utils \
libibmad \
libibmad-devel \
libibumad \
libibumad-devel \
libibverbs-dev \
libibverbs1 \
libmlx4-1 \
libmlx4-dev \
libmlx5-1 \
libmlx5-dev \
librdmacm-dev \
librdmacm1 && \
mkdir -p /usr/local/ofed/4.6-1.0.1.1 && \
find /var/tmp/packages_download -regextype posix-extended -type f -regex "/var/tmp/packages_download/(ibverbs-utils|libibmad|libibmad-devel|libibumad|libibumad-devel|libibverbs-dev|libibverbs1|libmlx4-1|libmlx4-dev|libmlx5-1|libmlx5-dev|librdmacm-dev|librdmacm1).*deb" -exec dpkg --extract {} /usr/local/ofed/4.6-1.0.1.1 \; && \
rm -rf /var/tmp/packages_download && \
rm -f /etc/apt/sources.list.d/mellanox_mlnx_ofed.list && \
rm -rf /var/lib/apt/lists/*
RUN mkdir -p /etc/libibverbs.d
# OFED
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
libnl-3-200 \
libnl-route-3-200 \
libnuma1 && \
rm -rf /var/lib/apt/lists/*
RUN apt-get update -y && \
mkdir -m 777 -p /var/tmp/packages_download && cd /var/tmp/packages_download && \
DEBIAN_FRONTEND=noninteractive apt-get download -y --no-install-recommends -t bionic \
dapl2-utils \
ibutils \
ibverbs-providers \
ibverbs-utils \
infiniband-diags \
libdapl-dev \
libdapl2 \
libibmad-dev \
libibmad5 \
libibverbs-dev \
libibverbs1 \
librdmacm-dev \
librdmacm1 \
rdmacm-utils && \
mkdir -p /usr/local/ofed/inbox && \
find /var/tmp/packages_download -regextype posix-extended -type f -regex "/var/tmp/packages_download/(dapl2-utils|ibutils|ibverbs-providers|ibverbs-utils|infiniband-diags|libdapl-dev|libdapl2|libibmad-dev|libibmad5|libibverbs-dev|libibverbs1|librdmacm-dev|librdmacm1|rdmacm-utils).*deb" -exec dpkg --extract {} /usr/local/ofed/inbox \; && \
rm -rf /var/tmp/packages_download && \
rm -rf /var/lib/apt/lists/*
RUN mkdir -p /etc/libibverbs.d
RUN ln -s /usr/local/ofed/inbox /usr/local/ofed/5.0-0''')
@x86_64
@centos8
@docker
def test_versions_centos8(self):
"""mlnx_version parameter"""
# Reduced set of versions to limit gold output
ofed = multi_ofed(mlnx_versions=['4.5-1.0.1.0', '4.6-1.0.1.1'])
self.assertEqual(str(ofed),
r'''# Mellanox OFED version 4.5-1.0.1.0
RUN yum install -y \
ca-certificates \
gnupg \
libnl3 \
numactl-libs \
wget && \
rm -rf /var/cache/yum/*
RUN rpm --import https://www.mellanox.com/downloads/ofed/RPM-GPG-KEY-Mellanox && \
yum install -y dnf-utils && \
yum-config-manager --add-repo https://linux.mellanox.com/public/repo/mlnx_ofed/4.5-1.0.1.0/rhel8.0/mellanox_mlnx_ofed.repo && \
yum install -y yum-utils && \
mkdir -p /var/tmp/packages_download && \
yumdownloader --destdir=/var/tmp/packages_download -x \*i?86 --archlist=x86_64 \
libibmad \
libibmad-devel \
libibumad \
libibumad-devel \
libibverbs \
libibverbs-devel \
libibverbs-utils \
libmlx4 \
libmlx4-devel \
libmlx5 \
libmlx5-devel \
librdmacm \
librdmacm-devel && \
mkdir -p /usr/local/ofed/4.5-1.0.1.0 && cd /usr/local/ofed/4.5-1.0.1.0 && \
find /var/tmp/packages_download -regextype posix-extended -type f -regex "/var/tmp/packages_download/(libibmad|libibmad-devel|libibumad|libibumad-devel|libibverbs|libibverbs-devel|libibverbs-utils|libmlx4|libmlx4-devel|libmlx5|libmlx5-devel|librdmacm|librdmacm-devel).*rpm" -exec sh -c "rpm2cpio {} | cpio -idm" \; && \
rm -rf /var/tmp/packages_download && \
rm -rf /var/cache/yum/*
RUN mkdir -p /etc/libibverbs.d
# Mellanox OFED version 4.6-1.0.1.1
RUN yum install -y \
ca-certificates \
gnupg \
libnl3 \
numactl-libs \
wget && \
rm -rf /var/cache/yum/*
RUN rpm --import https://www.mellanox.com/downloads/ofed/RPM-GPG-KEY-Mellanox && \
yum install -y dnf-utils && \
yum-config-manager --add-repo https://linux.mellanox.com/public/repo/mlnx_ofed/4.6-1.0.1.1/rhel8.0/mellanox_mlnx_ofed.repo && \
yum install -y yum-utils && \
mkdir -p /var/tmp/packages_download && \
yumdownloader --destdir=/var/tmp/packages_download -x \*i?86 --archlist=x86_64 \
libibmad \
libibmad-devel \
libibumad \
libibumad-devel \
libibverbs \
libibverbs-devel \
libibverbs-utils \
libmlx4 \
libmlx4-devel \
libmlx5 \
libmlx5-devel \
librdmacm \
librdmacm-devel && \
mkdir -p /usr/local/ofed/4.6-1.0.1.1 && cd /usr/local/ofed/4.6-1.0.1.1 && \
find /var/tmp/packages_download -regextype posix-extended -type f -regex "/var/tmp/packages_download/(libibmad|libibmad-devel|libibumad|libibumad-devel|libibverbs|libibverbs-devel|libibverbs-utils|libmlx4|libmlx4-devel|libmlx5|libmlx5-devel|librdmacm|librdmacm-devel).*rpm" -exec sh -c "rpm2cpio {} | cpio -idm" \; && \
rm -rf /var/tmp/packages_download && \
rm -rf /var/cache/yum/*
RUN mkdir -p /etc/libibverbs.d
# OFED
RUN yum install -y \
libnl3 \
numactl-libs && \
rm -rf /var/cache/yum/*
RUN yum install -y dnf-utils && \
yum-config-manager --set-enabled PowerTools && \
yum install -y yum-utils && \
mkdir -p /var/tmp/packages_download && \
yumdownloader --destdir=/var/tmp/packages_download -x \*i?86 --archlist=x86_64 --disablerepo=mlnx\* \
libibmad \
libibmad-devel \
libibumad \
libibverbs \
libibverbs-utils \
libmlx5 \
librdmacm \
rdma-core \
rdma-core-devel && \
mkdir -p /usr/local/ofed/inbox && cd /usr/local/ofed/inbox && \
find /var/tmp/packages_download -regextype posix-extended -type f -regex "/var/tmp/packages_download/(libibmad|libibmad-devel|libibumad|libibverbs|libibverbs-utils|libmlx5|librdmacm|rdma-core|rdma-core-devel).*rpm" -exec sh -c "rpm2cpio {} | cpio -idm" \; && \
rm -rf /var/tmp/packages_download && \
rm -rf /var/cache/yum/*
RUN mkdir -p /etc/libibverbs.d
RUN ln -s /usr/local/ofed/inbox /usr/local/ofed/5.0-0''')
@x86_64
@centos
@docker
def test_runtime_centos(self):
"""Runtime"""
ofed = multi_ofed()
r = ofed.runtime()
self.assertEqual(r,
r'''# OFED
RUN yum install -y \
libnl \
libnl3 \
numactl-libs && \
rm -rf /var/cache/yum/*
RUN mkdir -p /etc/libibverbs.d
COPY --from=0 /usr/local/ofed /usr/local/ofed''')
@x86_64
@ubuntu18
@docker
def test_runtime_ubuntu18(self):
"""Runtime"""
ofed = multi_ofed()
r = ofed.runtime()
self.assertEqual(r,
r'''# OFED
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
libnl-3-200 \
libnl-route-3-200 \
libnuma1 && \
rm -rf /var/lib/apt/lists/*
RUN mkdir -p /etc/libibverbs.d
COPY --from=0 /usr/local/ofed /usr/local/ofed''')
| 40.311355
| 344
| 0.643526
| 1,524
| 11,005
| 4.585958
| 0.158793
| 0.008585
| 0.060094
| 0.094434
| 0.854343
| 0.850622
| 0.839033
| 0.83474
| 0.828731
| 0.81614
| 0
| 0.036012
| 0.215266
| 11,005
| 272
| 345
| 40.459559
| 0.773275
| 0.082326
| 0
| 0.615385
| 0
| 0
| 0.039391
| 0
| 0
| 0
| 0
| 0
| 0.102564
| 1
| 0.128205
| false
| 0
| 0.153846
| 0
| 0.307692
| 0.025641
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
72a35c069e43e41bc2e79c8e6456ac4046aa88a7
| 6,371
|
py
|
Python
|
tests/contracts/KT1LiGjQW3RZeurKpuuaMJyFG1P7Yje1BCb1/test_michelson_coding_KT1LiG.py
|
juztin/pytezos-1
|
7e608ff599d934bdcf129e47db43dbdb8fef9027
|
[
"MIT"
] | 1
|
2021-05-20T16:52:08.000Z
|
2021-05-20T16:52:08.000Z
|
tests/contracts/KT1LiGjQW3RZeurKpuuaMJyFG1P7Yje1BCb1/test_michelson_coding_KT1LiG.py
|
juztin/pytezos-1
|
7e608ff599d934bdcf129e47db43dbdb8fef9027
|
[
"MIT"
] | 1
|
2020-12-30T16:44:56.000Z
|
2020-12-30T16:44:56.000Z
|
tests/contracts/KT1LiGjQW3RZeurKpuuaMJyFG1P7Yje1BCb1/test_michelson_coding_KT1LiG.py
|
tqtezos/pytezos
|
a4ac0b022d35d4c9f3062609d8ce09d584b5faa8
|
[
"MIT"
] | 1
|
2022-03-20T19:01:00.000Z
|
2022-03-20T19:01:00.000Z
|
from unittest import TestCase
from tests import get_data
from pytezos.michelson.micheline import michelson_to_micheline
from pytezos.michelson.formatter import micheline_to_michelson
class MichelsonCodingTestKT1LiG(TestCase):
def setUp(self):
self.maxDiff = None
def test_michelson_parse_code_KT1LiG(self):
expected = get_data(
path='contracts/KT1LiGjQW3RZeurKpuuaMJyFG1P7Yje1BCb1/code_KT1LiG.json')
actual = michelson_to_micheline(get_data(
path='contracts/KT1LiGjQW3RZeurKpuuaMJyFG1P7Yje1BCb1/code_KT1LiG.tz'))
self.assertEqual(expected, actual)
def test_michelson_format_code_KT1LiG(self):
expected = get_data(
path='contracts/KT1LiGjQW3RZeurKpuuaMJyFG1P7Yje1BCb1/code_KT1LiG.tz')
actual = micheline_to_michelson(get_data(
path='contracts/KT1LiGjQW3RZeurKpuuaMJyFG1P7Yje1BCb1/code_KT1LiG.json'),
inline=True)
self.assertEqual(expected, actual)
def test_michelson_inverse_code_KT1LiG(self):
expected = get_data(
path='contracts/KT1LiGjQW3RZeurKpuuaMJyFG1P7Yje1BCb1/code_KT1LiG.json')
actual = michelson_to_micheline(micheline_to_michelson(expected))
self.assertEqual(expected, actual)
def test_michelson_parse_storage_KT1LiG(self):
expected = get_data(
path='contracts/KT1LiGjQW3RZeurKpuuaMJyFG1P7Yje1BCb1/storage_KT1LiG.json')
actual = michelson_to_micheline(get_data(
path='contracts/KT1LiGjQW3RZeurKpuuaMJyFG1P7Yje1BCb1/storage_KT1LiG.tz'))
self.assertEqual(expected, actual)
def test_michelson_format_storage_KT1LiG(self):
expected = get_data(
path='contracts/KT1LiGjQW3RZeurKpuuaMJyFG1P7Yje1BCb1/storage_KT1LiG.tz')
actual = micheline_to_michelson(get_data(
path='contracts/KT1LiGjQW3RZeurKpuuaMJyFG1P7Yje1BCb1/storage_KT1LiG.json'),
inline=True)
self.assertEqual(expected, actual)
def test_michelson_inverse_storage_KT1LiG(self):
expected = get_data(
path='contracts/KT1LiGjQW3RZeurKpuuaMJyFG1P7Yje1BCb1/storage_KT1LiG.json')
actual = michelson_to_micheline(micheline_to_michelson(expected))
self.assertEqual(expected, actual)
def test_michelson_parse_parameter_oobdt2(self):
expected = get_data(
path='contracts/KT1LiGjQW3RZeurKpuuaMJyFG1P7Yje1BCb1/parameter_oobdt2.json')
actual = michelson_to_micheline(get_data(
path='contracts/KT1LiGjQW3RZeurKpuuaMJyFG1P7Yje1BCb1/parameter_oobdt2.tz'))
self.assertEqual(expected, actual)
def test_michelson_format_parameter_oobdt2(self):
expected = get_data(
path='contracts/KT1LiGjQW3RZeurKpuuaMJyFG1P7Yje1BCb1/parameter_oobdt2.tz')
actual = micheline_to_michelson(get_data(
path='contracts/KT1LiGjQW3RZeurKpuuaMJyFG1P7Yje1BCb1/parameter_oobdt2.json'),
inline=True)
self.assertEqual(expected, actual)
def test_michelson_inverse_parameter_oobdt2(self):
expected = get_data(
path='contracts/KT1LiGjQW3RZeurKpuuaMJyFG1P7Yje1BCb1/parameter_oobdt2.json')
actual = michelson_to_micheline(micheline_to_michelson(expected))
self.assertEqual(expected, actual)
def test_michelson_parse_parameter_op4Zwd(self):
expected = get_data(
path='contracts/KT1LiGjQW3RZeurKpuuaMJyFG1P7Yje1BCb1/parameter_op4Zwd.json')
actual = michelson_to_micheline(get_data(
path='contracts/KT1LiGjQW3RZeurKpuuaMJyFG1P7Yje1BCb1/parameter_op4Zwd.tz'))
self.assertEqual(expected, actual)
def test_michelson_format_parameter_op4Zwd(self):
expected = get_data(
path='contracts/KT1LiGjQW3RZeurKpuuaMJyFG1P7Yje1BCb1/parameter_op4Zwd.tz')
actual = micheline_to_michelson(get_data(
path='contracts/KT1LiGjQW3RZeurKpuuaMJyFG1P7Yje1BCb1/parameter_op4Zwd.json'),
inline=True)
self.assertEqual(expected, actual)
def test_michelson_inverse_parameter_op4Zwd(self):
expected = get_data(
path='contracts/KT1LiGjQW3RZeurKpuuaMJyFG1P7Yje1BCb1/parameter_op4Zwd.json')
actual = michelson_to_micheline(micheline_to_michelson(expected))
self.assertEqual(expected, actual)
def test_michelson_parse_parameter_oneikC(self):
expected = get_data(
path='contracts/KT1LiGjQW3RZeurKpuuaMJyFG1P7Yje1BCb1/parameter_oneikC.json')
actual = michelson_to_micheline(get_data(
path='contracts/KT1LiGjQW3RZeurKpuuaMJyFG1P7Yje1BCb1/parameter_oneikC.tz'))
self.assertEqual(expected, actual)
def test_michelson_format_parameter_oneikC(self):
expected = get_data(
path='contracts/KT1LiGjQW3RZeurKpuuaMJyFG1P7Yje1BCb1/parameter_oneikC.tz')
actual = micheline_to_michelson(get_data(
path='contracts/KT1LiGjQW3RZeurKpuuaMJyFG1P7Yje1BCb1/parameter_oneikC.json'),
inline=True)
self.assertEqual(expected, actual)
def test_michelson_inverse_parameter_oneikC(self):
expected = get_data(
path='contracts/KT1LiGjQW3RZeurKpuuaMJyFG1P7Yje1BCb1/parameter_oneikC.json')
actual = michelson_to_micheline(micheline_to_michelson(expected))
self.assertEqual(expected, actual)
def test_michelson_parse_parameter_onrRt3(self):
expected = get_data(
path='contracts/KT1LiGjQW3RZeurKpuuaMJyFG1P7Yje1BCb1/parameter_onrRt3.json')
actual = michelson_to_micheline(get_data(
path='contracts/KT1LiGjQW3RZeurKpuuaMJyFG1P7Yje1BCb1/parameter_onrRt3.tz'))
self.assertEqual(expected, actual)
def test_michelson_format_parameter_onrRt3(self):
expected = get_data(
path='contracts/KT1LiGjQW3RZeurKpuuaMJyFG1P7Yje1BCb1/parameter_onrRt3.tz')
actual = micheline_to_michelson(get_data(
path='contracts/KT1LiGjQW3RZeurKpuuaMJyFG1P7Yje1BCb1/parameter_onrRt3.json'),
inline=True)
self.assertEqual(expected, actual)
def test_michelson_inverse_parameter_onrRt3(self):
expected = get_data(
path='contracts/KT1LiGjQW3RZeurKpuuaMJyFG1P7Yje1BCb1/parameter_onrRt3.json')
actual = michelson_to_micheline(micheline_to_michelson(expected))
self.assertEqual(expected, actual)
| 46.166667
| 90
| 0.734265
| 598
| 6,371
| 7.513378
| 0.068562
| 0.048297
| 0.073448
| 0.133541
| 0.945693
| 0.945693
| 0.945693
| 0.945693
| 0.930114
| 0.930114
| 0
| 0.042896
| 0.191336
| 6,371
| 137
| 91
| 46.50365
| 0.829193
| 0
| 0
| 0.626087
| 0
| 0
| 0.31094
| 0.31094
| 0
| 0
| 0
| 0
| 0.156522
| 1
| 0.165217
| false
| 0
| 0.034783
| 0
| 0.208696
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
f423e3d5ee50ed0175537daef862a75d4483e404
| 12,579
|
py
|
Python
|
sdk/python/pulumi_azure/network/nat_gateway_public_ip_prefix_association.py
|
henriktao/pulumi-azure
|
f1cbcf100b42b916da36d8fe28be3a159abaf022
|
[
"ECL-2.0",
"Apache-2.0"
] | 109
|
2018-06-18T00:19:44.000Z
|
2022-02-20T05:32:57.000Z
|
sdk/python/pulumi_azure/network/nat_gateway_public_ip_prefix_association.py
|
henriktao/pulumi-azure
|
f1cbcf100b42b916da36d8fe28be3a159abaf022
|
[
"ECL-2.0",
"Apache-2.0"
] | 663
|
2018-06-18T21:08:46.000Z
|
2022-03-31T20:10:11.000Z
|
sdk/python/pulumi_azure/network/nat_gateway_public_ip_prefix_association.py
|
henriktao/pulumi-azure
|
f1cbcf100b42b916da36d8fe28be3a159abaf022
|
[
"ECL-2.0",
"Apache-2.0"
] | 41
|
2018-07-19T22:37:38.000Z
|
2022-03-14T10:56:26.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__ = ['NatGatewayPublicIpPrefixAssociationArgs', 'NatGatewayPublicIpPrefixAssociation']
@pulumi.input_type
class NatGatewayPublicIpPrefixAssociationArgs:
def __init__(__self__, *,
nat_gateway_id: pulumi.Input[str],
public_ip_prefix_id: pulumi.Input[str]):
"""
The set of arguments for constructing a NatGatewayPublicIpPrefixAssociation resource.
:param pulumi.Input[str] nat_gateway_id: The ID of the Nat Gateway. Changing this forces a new resource to be created.
:param pulumi.Input[str] public_ip_prefix_id: The ID of the Public IP Prefix which this Nat Gateway which should be connected to. Changing this forces a new resource to be created.
"""
pulumi.set(__self__, "nat_gateway_id", nat_gateway_id)
pulumi.set(__self__, "public_ip_prefix_id", public_ip_prefix_id)
@property
@pulumi.getter(name="natGatewayId")
def nat_gateway_id(self) -> pulumi.Input[str]:
"""
The ID of the Nat Gateway. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "nat_gateway_id")
@nat_gateway_id.setter
def nat_gateway_id(self, value: pulumi.Input[str]):
pulumi.set(self, "nat_gateway_id", value)
@property
@pulumi.getter(name="publicIpPrefixId")
def public_ip_prefix_id(self) -> pulumi.Input[str]:
"""
The ID of the Public IP Prefix which this Nat Gateway which should be connected to. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "public_ip_prefix_id")
@public_ip_prefix_id.setter
def public_ip_prefix_id(self, value: pulumi.Input[str]):
pulumi.set(self, "public_ip_prefix_id", value)
@pulumi.input_type
class _NatGatewayPublicIpPrefixAssociationState:
def __init__(__self__, *,
nat_gateway_id: Optional[pulumi.Input[str]] = None,
public_ip_prefix_id: Optional[pulumi.Input[str]] = None):
"""
Input properties used for looking up and filtering NatGatewayPublicIpPrefixAssociation resources.
:param pulumi.Input[str] nat_gateway_id: The ID of the Nat Gateway. Changing this forces a new resource to be created.
:param pulumi.Input[str] public_ip_prefix_id: The ID of the Public IP Prefix which this Nat Gateway which should be connected to. Changing this forces a new resource to be created.
"""
if nat_gateway_id is not None:
pulumi.set(__self__, "nat_gateway_id", nat_gateway_id)
if public_ip_prefix_id is not None:
pulumi.set(__self__, "public_ip_prefix_id", public_ip_prefix_id)
@property
@pulumi.getter(name="natGatewayId")
def nat_gateway_id(self) -> Optional[pulumi.Input[str]]:
"""
The ID of the Nat Gateway. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "nat_gateway_id")
@nat_gateway_id.setter
def nat_gateway_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "nat_gateway_id", value)
@property
@pulumi.getter(name="publicIpPrefixId")
def public_ip_prefix_id(self) -> Optional[pulumi.Input[str]]:
"""
The ID of the Public IP Prefix which this Nat Gateway which should be connected to. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "public_ip_prefix_id")
@public_ip_prefix_id.setter
def public_ip_prefix_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "public_ip_prefix_id", value)
class NatGatewayPublicIpPrefixAssociation(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
nat_gateway_id: Optional[pulumi.Input[str]] = None,
public_ip_prefix_id: Optional[pulumi.Input[str]] = None,
__props__=None):
"""
Manages the association between a Nat Gateway and a Public IP Prefix.
## Example Usage
```python
import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_public_ip_prefix = azure.network.PublicIpPrefix("examplePublicIpPrefix",
location=example_resource_group.location,
resource_group_name=example_resource_group.name,
prefix_length=30,
zones=["1"])
example_nat_gateway = azure.network.NatGateway("exampleNatGateway",
location=example_resource_group.location,
resource_group_name=example_resource_group.name,
sku_name="Standard")
example_nat_gateway_public_ip_prefix_association = azure.network.NatGatewayPublicIpPrefixAssociation("exampleNatGatewayPublicIpPrefixAssociation",
nat_gateway_id=example_nat_gateway.id,
public_ip_prefix_id=example_public_ip_prefix.id)
```
## Import
Associations between Nat Gateway and Public IP Prefixes can be imported using the `resource id`, e.g.
```sh
$ pulumi import azure:network/natGatewayPublicIpPrefixAssociation:NatGatewayPublicIpPrefixAssociation example "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/natGateways/gateway1|/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/publicIPPrefixes/myPublicIpPrefix1"
```
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] nat_gateway_id: The ID of the Nat Gateway. Changing this forces a new resource to be created.
:param pulumi.Input[str] public_ip_prefix_id: The ID of the Public IP Prefix which this Nat Gateway which should be connected to. Changing this forces a new resource to be created.
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: NatGatewayPublicIpPrefixAssociationArgs,
opts: Optional[pulumi.ResourceOptions] = None):
"""
Manages the association between a Nat Gateway and a Public IP Prefix.
## Example Usage
```python
import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_public_ip_prefix = azure.network.PublicIpPrefix("examplePublicIpPrefix",
location=example_resource_group.location,
resource_group_name=example_resource_group.name,
prefix_length=30,
zones=["1"])
example_nat_gateway = azure.network.NatGateway("exampleNatGateway",
location=example_resource_group.location,
resource_group_name=example_resource_group.name,
sku_name="Standard")
example_nat_gateway_public_ip_prefix_association = azure.network.NatGatewayPublicIpPrefixAssociation("exampleNatGatewayPublicIpPrefixAssociation",
nat_gateway_id=example_nat_gateway.id,
public_ip_prefix_id=example_public_ip_prefix.id)
```
## Import
Associations between Nat Gateway and Public IP Prefixes can be imported using the `resource id`, e.g.
```sh
$ pulumi import azure:network/natGatewayPublicIpPrefixAssociation:NatGatewayPublicIpPrefixAssociation example "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/natGateways/gateway1|/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/publicIPPrefixes/myPublicIpPrefix1"
```
:param str resource_name: The name of the resource.
:param NatGatewayPublicIpPrefixAssociationArgs 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(NatGatewayPublicIpPrefixAssociationArgs, 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,
nat_gateway_id: Optional[pulumi.Input[str]] = None,
public_ip_prefix_id: Optional[pulumi.Input[str]] = None,
__props__=None):
if opts is None:
opts = pulumi.ResourceOptions()
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.version is None:
opts.version = _utilities.get_version()
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = NatGatewayPublicIpPrefixAssociationArgs.__new__(NatGatewayPublicIpPrefixAssociationArgs)
if nat_gateway_id is None and not opts.urn:
raise TypeError("Missing required property 'nat_gateway_id'")
__props__.__dict__["nat_gateway_id"] = nat_gateway_id
if public_ip_prefix_id is None and not opts.urn:
raise TypeError("Missing required property 'public_ip_prefix_id'")
__props__.__dict__["public_ip_prefix_id"] = public_ip_prefix_id
super(NatGatewayPublicIpPrefixAssociation, __self__).__init__(
'azure:network/natGatewayPublicIpPrefixAssociation:NatGatewayPublicIpPrefixAssociation',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None,
nat_gateway_id: Optional[pulumi.Input[str]] = None,
public_ip_prefix_id: Optional[pulumi.Input[str]] = None) -> 'NatGatewayPublicIpPrefixAssociation':
"""
Get an existing NatGatewayPublicIpPrefixAssociation 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] nat_gateway_id: The ID of the Nat Gateway. Changing this forces a new resource to be created.
:param pulumi.Input[str] public_ip_prefix_id: The ID of the Public IP Prefix which this Nat Gateway which should be connected to. Changing this forces a new resource to be created.
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _NatGatewayPublicIpPrefixAssociationState.__new__(_NatGatewayPublicIpPrefixAssociationState)
__props__.__dict__["nat_gateway_id"] = nat_gateway_id
__props__.__dict__["public_ip_prefix_id"] = public_ip_prefix_id
return NatGatewayPublicIpPrefixAssociation(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter(name="natGatewayId")
def nat_gateway_id(self) -> pulumi.Output[str]:
"""
The ID of the Nat Gateway. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "nat_gateway_id")
@property
@pulumi.getter(name="publicIpPrefixId")
def public_ip_prefix_id(self) -> pulumi.Output[str]:
"""
The ID of the Public IP Prefix which this Nat Gateway which should be connected to. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "public_ip_prefix_id")
| 49.329412
| 382
| 0.697194
| 1,476
| 12,579
| 5.651084
| 0.123984
| 0.069536
| 0.082244
| 0.069056
| 0.754466
| 0.733485
| 0.729409
| 0.714183
| 0.703273
| 0.69584
| 0
| 0.014652
| 0.224104
| 12,579
| 254
| 383
| 49.523622
| 0.839959
| 0.453613
| 0
| 0.495727
| 1
| 0
| 0.134326
| 0.035177
| 0
| 0
| 0
| 0
| 0
| 1
| 0.145299
| false
| 0.008547
| 0.042735
| 0
| 0.273504
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
f444e0ba7dc7d139cec99ebb6183293cfb4604d3
| 39
|
py
|
Python
|
apps/status/__init__.py
|
cr0mbly/TTGO-esp32-micropython-watch
|
3378ea3b15e19f6bab405b6fc07759f17dd6213d
|
[
"MIT"
] | 6
|
2020-09-10T20:04:49.000Z
|
2021-10-10T06:26:05.000Z
|
apps/status/__init__.py
|
cr0mbly/TTGO-esp32-micropython-watch
|
3378ea3b15e19f6bab405b6fc07759f17dd6213d
|
[
"MIT"
] | null | null | null |
apps/status/__init__.py
|
cr0mbly/TTGO-esp32-micropython-watch
|
3378ea3b15e19f6bab405b6fc07759f17dd6213d
|
[
"MIT"
] | null | null | null |
from apps.status.main import StatusApp
| 19.5
| 38
| 0.846154
| 6
| 39
| 5.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.102564
| 39
| 1
| 39
| 39
| 0.942857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 6
|
f44872f77cb979e051d54f43b7e75e904dfa83f0
| 47
|
py
|
Python
|
m3o_plugin/stream.py
|
JustIceQAQ/play_m3o_in_python
|
140b1f07cb574d1f0a2890503ae9e73ce3907f2b
|
[
"MIT"
] | null | null | null |
m3o_plugin/stream.py
|
JustIceQAQ/play_m3o_in_python
|
140b1f07cb574d1f0a2890503ae9e73ce3907f2b
|
[
"MIT"
] | null | null | null |
m3o_plugin/stream.py
|
JustIceQAQ/play_m3o_in_python
|
140b1f07cb574d1f0a2890503ae9e73ce3907f2b
|
[
"MIT"
] | null | null | null |
# TODO Stream: https://m3o.com/stream/overview
| 23.5
| 46
| 0.744681
| 7
| 47
| 5
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.023256
| 0.085106
| 47
| 1
| 47
| 47
| 0.790698
| 0.93617
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 1
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
f44e0a40aad75a39d64d6ee78ea7883326105dc0
| 1,841
|
py
|
Python
|
tests/test_full.py
|
raifthenerd/bayesian-coresets
|
6fc31ba4f2c46a3a1d4b04f035a38f9b852c50bb
|
[
"MIT"
] | 1
|
2019-03-30T15:56:34.000Z
|
2019-03-30T15:56:34.000Z
|
tests/test_full.py
|
raifthenerd/bayesian-coresets
|
6fc31ba4f2c46a3a1d4b04f035a38f9b852c50bb
|
[
"MIT"
] | null | null | null |
tests/test_full.py
|
raifthenerd/bayesian-coresets
|
6fc31ba4f2c46a3a1d4b04f035a38f9b852c50bb
|
[
"MIT"
] | null | null | null |
import bayesiancoresets as bc
import numpy as np
import warnings
warnings.filterwarnings('ignore', category=UserWarning) #tests will generate warnings (due to pathological data design for testing), just ignore them
np.seterr(all='raise')
np.set_printoptions(linewidth=500)
np.random.seed(100)
tol = 1e-9
def test_empty():
x = np.random.randn(0, 0)
fd = bc.FullDataset(x)
for m in [1, 10, 100]:
fd.run(m)
assert fd.error() < tol, "full wts failed: error not 0"
assert np.all(fd.weights() == np.ones(x.shape[0])), "full wts failed: weights not ones"
#check reset
fd.reset()
assert fd.M == 0 and np.all(np.fabs(fd.weights()) == 0.) and np.fabs(fd.error() - np.sqrt((fd.snorm**2).sum())) < tol and not fd.reached_numeric_limit, "FullDataset failed: reset() did not properly reset"
def test_one():
x = np.random.randn(1, 3)
fd = bc.FullDataset(x)
for m in [1, 10, 100]:
fd.run(m)
assert fd.error() < tol, "full wts failed: error not 0"
assert np.all(fd.weights() == np.ones(x.shape[0])), "full wts failed: weights not ones: "+str(fd.weights())
#check reset
fd.reset()
assert fd.M == 0 and np.all(np.fabs(fd.weights()) == 0.) and np.fabs(fd.error() - np.sqrt((fd.snorm**2).sum())) < tol and not fd.reached_numeric_limit, "FullDataset failed: reset() did not properly reset"
def test_many():
x = np.random.randn(10, 3)
fd = bc.FullDataset(x)
for m in [1, 10, 100]:
fd.run(m)
assert fd.error() < tol, "full wts failed: error not 0"
assert np.all(fd.weights() == np.ones(x.shape[0])), "full wts failed: weights not ones "+str(fd.weights())
#check reset
fd.reset()
assert fd.M == 0 and np.all(np.fabs(fd.weights()) == 0.) and np.fabs(fd.error() - np.sqrt((fd.snorm**2).sum())) < tol and not fd.reached_numeric_limit, "FullDataset failed: reset() did not properly reset"
| 38.354167
| 206
| 0.663227
| 318
| 1,841
| 3.808176
| 0.235849
| 0.059455
| 0.06441
| 0.034682
| 0.744013
| 0.744013
| 0.744013
| 0.744013
| 0.744013
| 0.744013
| 0
| 0.03123
| 0.165128
| 1,841
| 47
| 207
| 39.170213
| 0.756669
| 0.067898
| 0
| 0.514286
| 1
| 0
| 0.202924
| 0
| 0
| 0
| 0
| 0
| 0.257143
| 1
| 0.085714
| false
| 0
| 0.085714
| 0
| 0.171429
| 0.028571
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
f462746ebd2e6be5502850b1a2c26c1ef62014a3
| 29,803
|
py
|
Python
|
tests/test_modules/test_ims.py
|
ardangelo/craycli
|
a943ff2d069aadd319ad4ea3ed344c791797fd53
|
[
"MIT"
] | null | null | null |
tests/test_modules/test_ims.py
|
ardangelo/craycli
|
a943ff2d069aadd319ad4ea3ed344c791797fd53
|
[
"MIT"
] | null | null | null |
tests/test_modules/test_ims.py
|
ardangelo/craycli
|
a943ff2d069aadd319ad4ea3ed344c791797fd53
|
[
"MIT"
] | null | null | null |
"""
Tests for Image Management Service (IMS) CLI subcommand (`cray ims`)
and options.
MIT License
(C) Copyright [2020] Hewlett Packard Enterprise Development LP
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
"""
# pylint: disable=invalid-name
# pylint: disable=too-many-arguments
# pylint: disable=unused-argument
import json
import os
from ..utils.runner import cli_runner # pylint: disable=unused-import
from ..utils.rest import rest_mock # pylint: disable=unused-import
from ..utils.utils import new_random_string
def compare_output(expected, cli_output):
"""
Function helper to test if the expected values can
be found in the output text.
"""
found = False
actual = [elem.strip() for elem in cli_output.splitlines()]
for i, e in reversed(list(enumerate(actual))):
if ':' in e:
found = True
del actual[0:i+1]
break
assert found
assert set(expected) == set(actual)
# pylint: disable=redefined-outer-name
def test_cray_ims_base(cli_runner, rest_mock):
""" Test cray ims base command """
runner, cli, _ = cli_runner
result = runner.invoke(cli, ['ims'])
assert result.exit_code == 0
outputs = [
"deleted",
"public-keys",
"recipes",
"images",
"jobs"
]
compare_output(outputs, result.output)
# pylint: disable=redefined-outer-name
def test_cray_ims_deleted_base(cli_runner, rest_mock):
""" Test cray ims base command """
runner, cli, _ = cli_runner
result = runner.invoke(cli, ['ims', 'deleted'])
assert result.exit_code == 0
outputs = [
"public-keys",
"recipes",
"images",
]
compare_output(outputs, result.output)
# pylint: disable=redefined-outer-name
def test_cray_ims_public_keys_base(cli_runner, rest_mock):
""" Test cray ims public-keys base command """
runner, cli, _ = cli_runner
result = runner.invoke(cli, ['ims', 'public-keys'])
assert result.exit_code == 0
outputs = [
"create",
"delete",
"deleteall",
"describe",
"list",
]
compare_output(outputs, result.output)
# pylint: disable=redefined-outer-name
def test_cray_ims_public_keys_delete(cli_runner, rest_mock):
""" Test cray ims public_keys delete ... """
runner, cli, config = cli_runner
result = runner.invoke(cli, ['ims', 'public-keys', 'delete', 'foo'])
assert result.exit_code == 0
data = json.loads(result.output)
assert data['method'] == 'DELETE'
assert data['url'] == '{}/apis/ims/v3/public-keys/foo'.format(
config['default']['hostname']
)
# pylint: disable=redefined-outer-name
def test_cray_ims_public_keys_delete_all(cli_runner, rest_mock):
""" Test cray ims public_keys delete ... """
runner, cli, config = cli_runner
result = runner.invoke(cli, ['ims', 'public-keys', 'deleteall'])
assert result.exit_code == 0
data = json.loads(result.output)
assert data['method'] == 'DELETE'
assert data['url'] == '{}/apis/ims/v3/public-keys'.format(
config['default']['hostname']
)
# pylint: disable=redefined-outer-name
def test_cray_ims_public_keys_list(cli_runner, rest_mock):
""" Test cray ims public_keys list """
runner, cli, config = cli_runner
result = runner.invoke(cli, ['ims', 'public-keys', 'list'])
assert result.exit_code == 0
data = json.loads(result.output)
assert data['method'] == 'GET'
assert data['url'] == '{}/apis/ims/v3/public-keys'.format(
config['default']['hostname']
)
# pylint: disable=redefined-outer-name
def test_cray_ims_public_keys_describe(cli_runner, rest_mock):
""" Test cray ims public_keys describe """
runner, cli, config = cli_runner
result = runner.invoke(cli, ['ims', 'public-keys', 'describe', 'foo'])
assert result.exit_code == 0
data = json.loads(result.output)
assert data['method'] == 'GET'
assert data['url'] == '{}/apis/ims/v3/public-keys/foo'.format(
config['default']['hostname']
)
# pylint: disable=redefined-outer-name
def test_cray_ims_public_keys_create(cli_runner, rest_mock):
""" Test cray ims public_keys create ... happy path """
runner, cli, config = cli_runner
usersshpubkeyfile = os.path.join(
os.path.dirname(__file__),
'../files/text.txt'
)
result = runner.invoke(
cli,
['ims', 'public-keys', 'create', '--name', 'foo',
'--public-key', usersshpubkeyfile]
)
with open(usersshpubkeyfile, encoding='utf-8') as inf:
pubkeydata = inf.read()
assert result.exit_code == 0
data = json.loads(result.output)
assert data['method'] == 'POST'
assert data['url'] == '{}/apis/ims/v3/public-keys'.format(
config['default']['hostname']
)
assert data['body'] == {
'name': 'foo',
'public_key': pubkeydata
}
# pylint: disable=redefined-outer-name
def test_cray_ims_public_keys_create_missing_required(cli_runner, rest_mock):
"""Test cray ims public_keys create ... when a required parameter is
missing
"""
runner, cli, _ = cli_runner
result = runner.invoke(
cli,
['ims', 'public-keys', 'create', '--name', 'foo']
)
assert result.exit_code == 2
assert '--public-key' in result.output
# pylint: disable=redefined-outer-name
def test_cray_ims_deleted_public_keys_base(cli_runner, rest_mock):
""" Test cray ims public-keys base command """
runner, cli, _ = cli_runner
result = runner.invoke(cli, ['ims', 'deleted', 'public-keys'])
assert result.exit_code == 0
outputs = [
"update",
"delete",
"deleteall",
"describe",
"list",
]
compare_output(outputs, result.output)
# pylint: disable=redefined-outer-name
def test_cray_ims_deleted_public_keys_delete(cli_runner, rest_mock):
""" Test cray ims public_keys delete ... """
runner, cli, config = cli_runner
result = runner.invoke(cli, ['ims', 'deleted', 'public-keys', 'delete', 'foo'])
assert result.exit_code == 0
data = json.loads(result.output)
assert data['method'] == 'DELETE'
assert data['url'] == '{}/apis/ims/v3/deleted/public-keys/foo'.format(
config['default']['hostname']
)
# pylint: disable=redefined-outer-name
def test_cray_ims_deleted_public_keys_delete_all(cli_runner, rest_mock):
""" Test cray ims public_keys delete ... """
runner, cli, config = cli_runner
result = runner.invoke(cli, ['ims', 'deleted', 'public-keys', 'deleteall'])
assert result.exit_code == 0
data = json.loads(result.output)
assert data['method'] == 'DELETE'
assert data['url'] == '{}/apis/ims/v3/deleted/public-keys'.format(
config['default']['hostname']
)
# pylint: disable=redefined-outer-name
def test_cray_ims_deleted_public_keys_update(cli_runner, rest_mock):
""" Test cray ims deleted public_keys update ... """
runner, cli, config = cli_runner
result = runner.invoke(cli, ['ims', 'deleted', 'public-keys', 'update', 'foo',
'--operation', 'undelete'])
assert result.exit_code == 0
data = json.loads(result.output)
assert data['method'] == 'PATCH'
assert data['url'] == '{}/apis/ims/v3/deleted/public-keys/foo'.format(
config['default']['hostname']
)
assert data['body'] == {
'operation': 'undelete'
}
# pylint: disable=redefined-outer-name
def test_cray_ims_deleted_public_keys_list(cli_runner, rest_mock):
""" Test cray ims deleted public_keys list """
runner, cli, config = cli_runner
result = runner.invoke(cli, ['ims', 'deleted', 'public-keys', 'list'])
assert result.exit_code == 0
data = json.loads(result.output)
assert data['method'] == 'GET'
assert data['url'] == '{}/apis/ims/v3/deleted/public-keys'.format(
config['default']['hostname']
)
# pylint: disable=redefined-outer-name
def test_cray_ims_deleted_public_keys_describe(cli_runner, rest_mock):
""" Test cray ims deleted public_keys describe """
runner, cli, config = cli_runner
result = runner.invoke(cli, ['ims', 'deleted', 'public-keys', 'describe', 'foo'])
assert result.exit_code == 0
data = json.loads(result.output)
assert data['method'] == 'GET'
assert data['url'] == '{}/apis/ims/v3/deleted/public-keys/foo'.format(
config['default']['hostname']
)
# pylint: disable=redefined-outer-name
def test_cray_ims_recipes_base(cli_runner, rest_mock):
""" Test cray ims recipes base command """
runner, cli, _ = cli_runner
result = runner.invoke(cli, ['ims', 'recipes'])
assert result.exit_code == 0
outputs = [
"create",
"delete",
"deleteall",
"describe",
"list",
"update"
]
compare_output(outputs, result.output)
# pylint: disable=redefined-outer-name
def test_cray_ims_recipes_delete(cli_runner, rest_mock):
""" Test cray ims recipes delete ... """
runner, cli, config = cli_runner
result = runner.invoke(cli, ['ims', 'recipes', 'delete', 'foo'])
assert result.exit_code == 0
data = json.loads(result.output)
assert data['method'] == 'DELETE'
assert data['url'] == '{}/apis/ims/v3/recipes/foo'.format(
config['default']['hostname']
)
# pylint: disable=redefined-outer-name
def test_cray_ims_recipes_delete_all(cli_runner, rest_mock):
""" Test cray ims recipes delete ... """
runner, cli, config = cli_runner
result = runner.invoke(cli, ['ims', 'recipes', 'deleteall'])
assert result.exit_code == 0
data = json.loads(result.output)
assert data['method'] == 'DELETE'
assert data['url'] == '{}/apis/ims/v3/recipes'.format(
config['default']['hostname']
)
# pylint: disable=redefined-outer-name
def test_cray_ims_recipes_list(cli_runner, rest_mock):
""" Test cray ims recipes list """
runner, cli, config = cli_runner
result = runner.invoke(cli, ['ims', 'recipes', 'list'])
assert result.exit_code == 0
data = json.loads(result.output)
assert data['method'] == 'GET'
assert data['url'] == '{}/apis/ims/v3/recipes'.format(
config['default']['hostname']
)
# pylint: disable=redefined-outer-name
def test_cray_ims_recipes_describe(cli_runner, rest_mock):
""" Test cray ims recipes describe """
runner, cli, config = cli_runner
result = runner.invoke(cli, ['ims', 'recipes', 'describe', 'foo'])
assert result.exit_code == 0
data = json.loads(result.output)
assert data['method'] == 'GET'
assert data['url'] == '{}/apis/ims/v3/recipes/foo'.format(
config['default']['hostname']
)
# pylint: disable=redefined-outer-name
def test_cray_ims_recipes_create(cli_runner, rest_mock):
""" Test cray ims recipes create ... happy path """
runner, cli, config = cli_runner
s3_link_path = new_random_string()
s3_link_etag = new_random_string()
result = runner.invoke(cli, ['ims', 'recipes', 'create',
'--name', 'foo',
'--linux-distribution', 'sles15',
'--recipe-type', 'kiwi-ng',
'--link-type', 's3',
'--link-path', s3_link_path,
'--link-etag', s3_link_etag])
assert result.exit_code == 0
data = json.loads(result.output)
assert data['method'] == 'POST'
assert data['url'] == '{}/apis/ims/v3/recipes'.format(
config['default']['hostname']
)
assert data['body'].get('name', None) == 'foo'
assert data['body'].get('linux_distribution', None) == 'sles15'
assert data['body'].get('recipe_type', None) == 'kiwi-ng'
assert 'link' in data['body']
assert data['body']['link'].get('type', None) == 's3'
assert data['body']['link'].get('path', None) == s3_link_path
assert data['body']['link'].get('etag', None) == s3_link_etag
# pylint: disable=redefined-outer-name
def test_cray_ims_recipes_create_missing_required(cli_runner, rest_mock):
"""Test cray ims recipes create ... when a required parameter is
missing
"""
runner, cli, _ = cli_runner
result = runner.invoke(
cli,
['ims', 'recipes', 'create',
'--name', 'foo',
'--recipe-type', 'kiwi-ng']
)
assert result.exit_code == 2
assert '--linux-distribution' in result.output
# pylint: disable=redefined-outer-name
def test_cray_ims_deleted_recipes_base(cli_runner, rest_mock):
""" Test cray ims recipes base command """
runner, cli, _ = cli_runner
result = runner.invoke(cli, ['ims', 'deleted', 'recipes'])
assert result.exit_code == 0
outputs = [
"update",
"delete",
"deleteall",
"describe",
"list",
]
compare_output(outputs, result.output)
# pylint: disable=redefined-outer-name
def test_cray_ims_deleted_recipes_delete(cli_runner, rest_mock):
""" Test cray ims recipes delete ... """
runner, cli, config = cli_runner
result = runner.invoke(cli, ['ims', 'deleted', 'recipes', 'delete', 'foo'])
assert result.exit_code == 0
data = json.loads(result.output)
assert data['method'] == 'DELETE'
assert data['url'] == '{}/apis/ims/v3/deleted/recipes/foo'.format(
config['default']['hostname']
)
# pylint: disable=redefined-outer-name
def test_cray_ims_deleted_recipes_delete_all(cli_runner, rest_mock):
""" Test cray ims recipes delete ... """
runner, cli, config = cli_runner
result = runner.invoke(cli, ['ims', 'deleted', 'recipes', 'deleteall'])
assert result.exit_code == 0
data = json.loads(result.output)
assert data['method'] == 'DELETE'
assert data['url'] == '{}/apis/ims/v3/deleted/recipes'.format(
config['default']['hostname']
)
# pylint: disable=redefined-outer-name
def test_cray_ims_deleted_recipes_update(cli_runner, rest_mock):
""" Test cray ims deleted recipes update ... """
runner, cli, config = cli_runner
result = runner.invoke(cli, ['ims', 'deleted', 'recipes', 'update', 'foo'])
assert result.exit_code == 0
data = json.loads(result.output)
assert data['method'] == 'PATCH'
assert data['url'] == '{}/apis/ims/v3/deleted/recipes/foo'.format(
config['default']['hostname']
)
# pylint: disable=redefined-outer-name
def test_cray_ims_deleted_recipes_list(cli_runner, rest_mock):
""" Test cray ims deleted recipes list """
runner, cli, config = cli_runner
result = runner.invoke(cli, ['ims', 'deleted', 'recipes', 'list'])
assert result.exit_code == 0
data = json.loads(result.output)
assert data['method'] == 'GET'
assert data['url'] == '{}/apis/ims/v3/deleted/recipes'.format(
config['default']['hostname']
)
# pylint: disable=redefined-outer-name
def test_cray_ims_deleted_recipes_describe(cli_runner, rest_mock):
""" Test cray ims deleted recipes describe """
runner, cli, config = cli_runner
result = runner.invoke(cli, ['ims', 'deleted', 'recipes', 'describe', 'foo'])
assert result.exit_code == 0
data = json.loads(result.output)
assert data['method'] == 'GET'
assert data['url'] == '{}/apis/ims/v3/deleted/recipes/foo'.format(
config['default']['hostname']
)
# pylint: disable=redefined-outer-name
def test_cray_ims_images_base(cli_runner, rest_mock):
""" Test cray ims images base command """
runner, cli, _ = cli_runner
result = runner.invoke(cli, ['ims', 'images'])
assert result.exit_code == 0
outputs = [
"create",
"delete",
"deleteall",
"describe",
"list",
"update"
]
compare_output(outputs, result.output)
# pylint: disable=redefined-outer-name
def test_cray_ims_images_delete(cli_runner, rest_mock):
""" Test cray ims images delete ... """
runner, cli, config = cli_runner
result = runner.invoke(cli, ['ims', 'images', 'delete', 'foo'])
assert result.exit_code == 0
data = json.loads(result.output)
assert data['method'] == 'DELETE'
assert data['url'] == '{}/apis/ims/v3/images/foo'.format(
config['default']['hostname']
)
# pylint: disable=redefined-outer-name
def test_cray_ims_images_delete_all(cli_runner, rest_mock):
""" Test cray ims images delete ... """
runner, cli, config = cli_runner
result = runner.invoke(cli, ['ims', 'images', 'deleteall'])
assert result.exit_code == 0
data = json.loads(result.output)
assert data['method'] == 'DELETE'
assert data['url'] == '{}/apis/ims/v3/images'.format(
config['default']['hostname']
)
# pylint: disable=redefined-outer-name
def test_cray_ims_images_list(cli_runner, rest_mock):
""" Test cray ims images list """
runner, cli, config = cli_runner
result = runner.invoke(cli, ['ims', 'images', 'list'])
assert result.exit_code == 0
data = json.loads(result.output)
assert data['method'] == 'GET'
assert data['url'] == '{}/apis/ims/v3/images'.format(
config['default']['hostname']
)
# pylint: disable=redefined-outer-name
def test_cray_ims_images_describe(cli_runner, rest_mock):
""" Test cray ims images describe """
runner, cli, config = cli_runner
result = runner.invoke(cli, ['ims', 'images', 'describe', 'foo'])
assert result.exit_code == 0
data = json.loads(result.output)
assert data['method'] == 'GET'
assert data['url'] == '{}/apis/ims/v3/images/foo'.format(
config['default']['hostname']
)
# pylint: disable=redefined-outer-name
def test_cray_ims_images_create(cli_runner, rest_mock):
""" Test cray ims images create ... happy path """
runner, cli, config = cli_runner
s3_link_path = new_random_string()
s3_link_etag = new_random_string()
result = runner.invoke(cli, ['ims', 'images', 'create',
'--name', 'foo',
'--link-type', 's3',
'--link-path', s3_link_path,
'--link-etag', s3_link_etag])
assert result.exit_code == 0
data = json.loads(result.output)
assert data['method'] == 'POST'
assert data['url'] == '{}/apis/ims/v3/images'.format(
config['default']['hostname']
)
assert 'name' in data['body'] and data['body']['name'] == 'foo'
assert 'link' in data['body']
assert data['body']['link'].get('type', None) == 's3'
assert data['body']['link'].get('path', None) == s3_link_path
assert data['body']['link'].get('etag', None) == s3_link_etag
# pylint: disable=redefined-outer-name
def test_cray_ims_images_create_missing_required(cli_runner, rest_mock):
""" Test cray ims images create ... happy path """
runner, cli, _ = cli_runner
result = runner.invoke(cli, ['ims', 'images', 'create'])
assert result.exit_code == 2
assert '--name' in result.output
# pylint: disable=redefined-outer-name
def test_cray_ims_images_update(cli_runner, rest_mock):
""" Test cray ims images update ... """
runner, cli, config = cli_runner
test_link_type = 's3'
test_link_etag = new_random_string()
test_link_path = new_random_string()
result = runner.invoke(cli, ['ims', 'images', 'update', 'foo',
'--link-type', test_link_type,
'--link-etag', test_link_etag,
'--link-path', test_link_path])
assert result.exit_code == 0
data = json.loads(result.output)
assert data['method'] == 'PATCH'
assert data['url'] == '{}/apis/ims/v3/images/foo'.format(
config['default']['hostname']
)
assert data['body'] == {
'link': {
'type': test_link_type,
'etag': test_link_etag,
'path': test_link_path
}
}
# pylint: disable=redefined-outer-name
def test_cray_ims_deleted_images_base(cli_runner, rest_mock):
""" Test cray ims images base command """
runner, cli, _ = cli_runner
result = runner.invoke(cli, ['ims', 'deleted', 'images'])
assert result.exit_code == 0
outputs = [
"update",
"delete",
"deleteall",
"describe",
"list",
]
compare_output(outputs, result.output)
# pylint: disable=redefined-outer-name
def test_cray_ims_deleted_images_delete(cli_runner, rest_mock):
""" Test cray ims images delete ... """
runner, cli, config = cli_runner
result = runner.invoke(cli, ['ims', 'deleted', 'images', 'delete', 'foo'])
assert result.exit_code == 0
data = json.loads(result.output)
assert data['method'] == 'DELETE'
assert data['url'] == '{}/apis/ims/v3/deleted/images/foo'.format(
config['default']['hostname']
)
# pylint: disable=redefined-outer-name
def test_cray_ims_deleted_images_delete_all(cli_runner, rest_mock):
""" Test cray ims images delete ... """
runner, cli, config = cli_runner
result = runner.invoke(cli, ['ims', 'deleted', 'images', 'deleteall'])
assert result.exit_code == 0
data = json.loads(result.output)
assert data['method'] == 'DELETE'
assert data['url'] == '{}/apis/ims/v3/deleted/images'.format(
config['default']['hostname']
)
# pylint: disable=redefined-outer-name
def test_cray_ims_deleted_images_update(cli_runner, rest_mock):
""" Test cray ims deleted images update ... """
runner, cli, config = cli_runner
result = runner.invoke(cli, ['ims', 'deleted', 'images', 'update', 'foo'])
assert result.exit_code == 0
data = json.loads(result.output)
assert data['method'] == 'PATCH'
assert data['url'] == '{}/apis/ims/v3/deleted/images/foo'.format(
config['default']['hostname']
)
# pylint: disable=redefined-outer-name
def test_cray_ims_deleted_images_list(cli_runner, rest_mock):
""" Test cray ims deleted images list """
runner, cli, config = cli_runner
result = runner.invoke(cli, ['ims', 'deleted', 'images', 'list'])
assert result.exit_code == 0
data = json.loads(result.output)
assert data['method'] == 'GET'
assert data['url'] == '{}/apis/ims/v3/deleted/images'.format(
config['default']['hostname']
)
# pylint: disable=redefined-outer-name
def test_cray_ims_deleted_images_describe(cli_runner, rest_mock):
""" Test cray ims deleted images describe """
runner, cli, config = cli_runner
result = runner.invoke(cli, ['ims', 'deleted', 'images', 'describe', 'foo'])
assert result.exit_code == 0
data = json.loads(result.output)
assert data['method'] == 'GET'
assert data['url'] == '{}/apis/ims/v3/deleted/images/foo'.format(
config['default']['hostname']
)
# pylint: disable=redefined-outer-name
def test_cray_ims_jobs_base(cli_runner, rest_mock):
""" Test cray ims jobs base command """
runner, cli, _ = cli_runner
result = runner.invoke(cli, ['ims', 'jobs'])
assert result.exit_code == 0
outputs = [
"create",
"delete",
"deleteall",
"describe",
"list",
]
compare_output(outputs, result.output)
# pylint: disable=redefined-outer-name
def test_cray_ims_jobs_delete(cli_runner, rest_mock):
""" Test cray ims jobs delete ... """
runner, cli, config = cli_runner
result = runner.invoke(cli, ['ims', 'jobs', 'delete', 'foo'])
assert result.exit_code == 0
data = json.loads(result.output)
assert data['method'] == 'DELETE'
assert data['url'] == '{}/apis/ims/v3/jobs/foo'.format(
config['default']['hostname']
)
# pylint: disable=redefined-outer-name
def test_cray_ims_jobs_delete_all(cli_runner, rest_mock):
""" Test cray ims jobs delete ... """
runner, cli, config = cli_runner
result = runner.invoke(cli, ['ims', 'jobs', 'deleteall'])
assert result.exit_code == 0
data = json.loads(result.output)
assert data['method'] == 'DELETE'
assert data['url'] == '{}/apis/ims/v3/jobs'.format(
config['default']['hostname']
)
# pylint: disable=redefined-outer-name
def test_cray_ims_jobs_list(cli_runner, rest_mock):
""" Test cray ims jobs list """
runner, cli, config = cli_runner
result = runner.invoke(cli, ['ims', 'jobs', 'list'])
assert result.exit_code == 0
data = json.loads(result.output)
assert data['method'] == 'GET'
assert data['url'] == '{}/apis/ims/v3/jobs'.format(
config['default']['hostname']
)
# pylint: disable=redefined-outer-name
def test_cray_ims_jobs_describe(cli_runner, rest_mock):
""" Test cray ims jobs describe """
runner, cli, config = cli_runner
result = runner.invoke(cli, ['ims', 'jobs', 'describe', 'foo'])
assert result.exit_code == 0
data = json.loads(result.output)
assert data['method'] == 'GET'
assert data['url'] == '{}/apis/ims/v3/jobs/foo'.format(
config['default']['hostname']
)
# pylint: disable=redefined-outer-name
def test_cray_ims_jobs_create_create(cli_runner, rest_mock):
""" Test cray ims jobs create ... happy path """
runner, cli, config = cli_runner
test_build_env_size = '15'
test_enable_debug = 'True'
test_public_key = new_random_string()
test_artifact_id = new_random_string()
test_initrd_file_name = new_random_string()
test_kernel_file_name = new_random_string()
test_image_root_archive_name = new_random_string()
test_job_type = "create"
result = runner.invoke(
cli,
['ims', 'jobs', 'create',
'--build-env-size', test_build_env_size,
'--enable-debug', test_enable_debug,
'--public-key-id', test_public_key,
'--artifact-id', test_artifact_id,
'--initrd-file-name', test_initrd_file_name,
'--kernel-file-name', test_kernel_file_name,
'--image-root-archive-name', test_image_root_archive_name,
'--job-type', test_job_type]
)
assert result.exit_code == 0
data = json.loads(result.output)
assert data['method'] == 'POST'
assert data['url'] == '{}/apis/ims/v3/jobs'.format(
config['default']['hostname']
)
assert data['body'] == {
'build_env_size': int(test_build_env_size),
'enable_debug': True,
'public_key_id': test_public_key,
'artifact_id': test_artifact_id,
'initrd_file_name': test_initrd_file_name,
'kernel_file_name': test_kernel_file_name,
'image_root_archive_name': test_image_root_archive_name,
'job_type': test_job_type
}
# pylint: disable=redefined-outer-name
def test_cray_ims_jobs_create_customize(cli_runner, rest_mock):
""" Test cray ims jobs create ... happy path """
runner, cli, config = cli_runner
test_build_env_size = '15'
test_enable_debug = 'True'
test_public_key = new_random_string()
test_artifact_id = new_random_string()
test_initrd_file_name = new_random_string()
test_kernel_file_name = new_random_string()
test_image_root_archive_name = new_random_string()
test_job_type = "customize"
result = runner.invoke(
cli,
['ims', 'jobs', 'create',
'--build-env-size', test_build_env_size,
'--enable-debug', test_enable_debug,
'--public-key-id', test_public_key,
'--artifact-id', test_artifact_id,
'--initrd-file-name', test_initrd_file_name,
'--kernel-file-name', test_kernel_file_name,
'--image-root-archive-name', test_image_root_archive_name,
'--job-type', test_job_type]
)
assert result.exit_code == 0
data = json.loads(result.output)
assert data['method'] == 'POST'
assert data['url'] == '{}/apis/ims/v3/jobs'.format(
config['default']['hostname']
)
assert data['body'] == {
'build_env_size': int(test_build_env_size),
'enable_debug': True,
'public_key_id': test_public_key,
'artifact_id': test_artifact_id,
'initrd_file_name': test_initrd_file_name,
'kernel_file_name': test_kernel_file_name,
'image_root_archive_name': test_image_root_archive_name,
'job_type': test_job_type,
}
# pylint: disable=redefined-outer-name
def test_cray_ims_jobs_create_missing_required(cli_runner, rest_mock):
"""Test cray ims jobs create ... when a required parameter is
missing
"""
runner, cli, _ = cli_runner
test_public_key = new_random_string()
test_artifact_id = new_random_string()
test_job_type = "customize"
result = runner.invoke(
cli,
['ims', 'jobs', 'create',
'--public-key-id', test_public_key,
'--artifact-id', test_artifact_id,
'--job-type', test_job_type]
)
assert result.exit_code == 2
assert '--image-root-archive-name' in result.output
| 34.374856
| 85
| 0.638761
| 3,770
| 29,803
| 4.854907
| 0.06366
| 0.038628
| 0.060099
| 0.073758
| 0.890619
| 0.886084
| 0.874283
| 0.870458
| 0.860132
| 0.823854
| 0
| 0.00506
| 0.210818
| 29,803
| 866
| 86
| 34.41455
| 0.773129
| 0.17364
| 0
| 0.659539
| 0
| 0
| 0.184145
| 0.043848
| 0
| 0
| 0
| 0
| 0.241776
| 1
| 0.083882
| false
| 0
| 0.008224
| 0
| 0.092105
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
f462b92d61e15bbb6b97df708b1cdcda1069c314
| 11,969
|
py
|
Python
|
landlab/utils/tests/test_flow__distance.py
|
joeljgeo/landlab
|
1d2651c76a8a36a7a132f139638192df1823f8fb
|
[
"MIT"
] | null | null | null |
landlab/utils/tests/test_flow__distance.py
|
joeljgeo/landlab
|
1d2651c76a8a36a7a132f139638192df1823f8fb
|
[
"MIT"
] | null | null | null |
landlab/utils/tests/test_flow__distance.py
|
joeljgeo/landlab
|
1d2651c76a8a36a7a132f139638192df1823f8fb
|
[
"MIT"
] | null | null | null |
import pytest
import numpy as np
import math
from numpy.testing import assert_array_equal, assert_almost_equal
from landlab import RasterModelGrid, FieldError, HexModelGrid
from landlab.components import FlowAccumulator, FlowDirectorSteepest
from landlab.utils.flow__distance import calculate_flow__distance
def test_no_flow_recievers():
"""Test that correct error is raised when no flow recievers are
on the grid."""
# instantiate a model grid, do not run flow accumulation on it
mg = RasterModelGrid((30, 70))
# test that the flow distance utility will fail because of a ValueError
with pytest.raises(FieldError):
calculate_flow__distance(mg)
def test_no_upstream_array():
"""Test that correct error is raised when no flow__upstream_node_order."""
# instantiate a model grid, do not run flow accumulation on it
mg = RasterModelGrid(30, 70)
#Add a field called topographic__elevation to mg
z = mg.add_ones('node','topographic__elevation')
#Run the FlowDirectorSteepest component
fd = FlowDirectorSteepest(mg)
fd.run_one_step()
# test that the flow distance utility will fail because of a ValueError
with pytest.raises(FieldError):
calculate_flow__distance(mg)
def test_flow__distance_regular_grid_d8():
"""Test to demonstrate that flow__distance utility works as expected with
regular grids"""
# instantiate a model grid
mg = RasterModelGrid((5, 4), spacing=(1, 1))
# instantiate an elevation array
z = np.array([[0, 0, 0, 0], [0, 21, 10, 0], [0, 31, 20, 0], [0, 32, 30, 0],
[0, 0, 0, 0]], dtype='float64')
# add the elevation field to the grid
mg.add_field('node', 'topographic__elevation', z)
# instantiate the expected flow__distance array
# considering flow directions calculated with D8 algorithm
flow__distance_expected = np.array([[0, 0, 0, 0], [0, 1, 0, 0],
[0, math.sqrt(2), 1, 0],
[0, 1+math.sqrt(2), 2, 0], [0, 0, 0, 0]],
dtype='float64')
flow__distance_expected = np.reshape(flow__distance_expected,
mg.number_of_node_rows *
mg.number_of_node_columns)
#setting boundary conditions
mg.set_closed_boundaries_at_grid_edges(bottom_is_closed=True,
left_is_closed=True,
right_is_closed=True,
top_is_closed=True)
# calculating flow directions with FlowAccumulator component
fr = FlowAccumulator(mg, flow_director='D8')
fr.run_one_step()
# calculating flow distance map
flow__distance = calculate_flow__distance(mg, add_to_grid=True,
noclobber=False)
flow__distance = np.reshape(flow__distance, mg.number_of_node_rows *
mg.number_of_node_columns)
# modifying the flow distance map because boundary and outlet nodes should
# not have flow__distance value different from 0
flow__distance[mg.boundary_nodes] = 0
outlet_id = 6
flow__distance[outlet_id] = 0
# test that the flow distance utility works as expected
assert_array_equal(flow__distance_expected, flow__distance)
def test_flow__distance_regular_grid_d4():
"""Test to demonstrate that flow__distance utility works as expected with
regular grids"""
# instantiate a model grid
mg = RasterModelGrid((5, 4), spacing=(1, 1))
# instantiate an elevation array
z = np.array([[0, 0, 0, 0], [0, 21, 10, 0], [0, 31, 20, 0], [0, 32, 30, 0],
[0, 0, 0, 0]], dtype='float64')
# add the elevation field to the grid
mg.add_field('node', 'topographic__elevation', z)
# instantiate the expected flow__distance array
# considering flow directions calculated with D4 algorithm
flow__distance_expected = np.array([[0, 0, 0, 0], [0, 1, 0, 0], [0, 2, 1, 0],
[0, 3, 2, 0], [0, 0, 0, 0]],
dtype='float64')
flow__distance_expected = np.reshape(flow__distance_expected,
mg.number_of_node_rows *
mg.number_of_node_columns)
#setting boundary conditions
mg.set_closed_boundaries_at_grid_edges(bottom_is_closed=True,
left_is_closed=True,
right_is_closed=True,
top_is_closed=True)
# calculating flow directions with FlowAccumulator component
fr = FlowAccumulator(mg, flow_director='D4')
fr.run_one_step()
# calculating flow distance map
flow__distance = calculate_flow__distance(mg, add_to_grid=True,
noclobber=False)
flow__distance = np.reshape(flow__distance,mg.number_of_node_rows *
mg.number_of_node_columns)
# modifying the flow distance map because boundary and outlet nodes
# should not have flow__distance value different from 0
flow__distance[mg.boundary_nodes] = 0
outlet_id = 6
flow__distance[outlet_id] = 0
# test that the flow__distance utility works as expected
assert_array_equal(flow__distance_expected, flow__distance)
def test_flow__distance_irregular_grid_d4():
"""Test to demonstrate that flow__distance utility works as expected with irregular grids"""
# instantiate a model grid
dx = 1.0
hmg = HexModelGrid(5, 3, dx)
# instantiate and add the elevation field
hmg.add_field('topographic__elevation', hmg.node_x + np.round(hmg.node_y),
at='node')
# instantiate the expected flow__distance array
flow__distance_expected = np.array([0., 0., 0.,
0., 0., dx, 0.,
0., dx, dx, 2.*dx, 0.,
0., 2.*dx, 2.*dx, 0.,
0., 0., 0.])
#setting boundary conditions
hmg.set_closed_nodes(hmg.boundary_nodes)
# calculating flow directions with FlowAccumulator component: D4 algorithm
fr = FlowAccumulator(hmg, flow_director = 'D4')
fr.run_one_step()
# calculating flow distance map
flow__distance = calculate_flow__distance(hmg, add_to_grid=True,
noclobber=False)
# test that the flow__distance utility works as expected
assert_almost_equal(flow__distance_expected, flow__distance, decimal=10)
def test_flow__distance_raster_MFD_diagonals_true():
"""Test of flow__distance utility with a raster grid and MFD."""
# instantiate a model grid
mg = RasterModelGrid((5, 4), spacing=(1, 1))
# instantiate an elevation array
z = np.array([[0 ,0, 0, 0], [0, 21, 10, 0], [0, 31, 20, 0], [0, 32, 30, 0],
[0, 0, 0, 0]], dtype='float64')
# add the elevation field to the grid
mg.add_field('node', 'topographic__elevation', z)
# instantiate the expected flow__distance array
# considering flow directions calculated with MFD algorithm
flow__distance_expected = np.array([[0, 0, 0, 0], [0, 1, 0, 0],
[0, math.sqrt(2), 1, 0],
[0, 1+math.sqrt(2), 2, 0], [0, 0, 0, 0]],
dtype='float64')
flow__distance_expected = np.reshape(flow__distance_expected,
mg.number_of_node_rows *
mg.number_of_node_columns)
#setting boundary conditions
mg.set_closed_boundaries_at_grid_edges(bottom_is_closed=True,
left_is_closed=True,
right_is_closed=True,
top_is_closed=True)
# calculating flow directions with FlowAccumulator component
fa = FlowAccumulator(mg, 'topographic__elevation', flow_director='MFD',
diagonals=True)
fa.run_one_step()
# calculating flow distance map
flow__distance = calculate_flow__distance(mg, add_to_grid=True,
noclobber=False)
# test that the flow__distance utility works as expected
assert_array_equal(flow__distance_expected, flow__distance)
def test_flow__distance_raster_MFD_diagonals_false():
"""Test of flow__distance utility with a raster grid and MFD."""
# instantiate a model grid
mg = RasterModelGrid((5, 4), spacing=(1, 1))
# instantiate an elevation array
z = np.array([[0, 0, 0, 0], [0, 21, 10, 0], [0, 31, 20, 0], [0, 32, 30, 0],
[0, 0, 0, 0]], dtype='float64')
# add the elevation field to the grid
mg.add_field('node', 'topographic__elevation', z)
# instantiate the expected flow__distance array
# considering flow directions calculated with MFD algorithm
flow__distance_expected = np.array([[0, 0, 0, 0], [0, 1, 0, 0], [0, 2, 1, 0],
[0, 3, 2, 0], [0, 0, 0, 0]],
dtype='float64')
flow__distance_expected = np.reshape(flow__distance_expected,
mg.number_of_node_rows *
mg.number_of_node_columns)
#setting boundary conditions
mg.set_closed_boundaries_at_grid_edges(bottom_is_closed=True,
left_is_closed=True,
right_is_closed=True,
top_is_closed=True)
# calculating flow directions with FlowAccumulator component
fa = FlowAccumulator(mg, 'topographic__elevation', flow_director='MFD',
diagonals=False)
fa.run_one_step()
# calculating flow distance map
flow__distance = calculate_flow__distance(mg, add_to_grid=True,
noclobber=False)
# test that the flow__distance utility works as expected
assert_array_equal(flow__distance_expected, flow__distance)
def test_flow__distance_raster_D_infinity():
"""Test of flow__distance utility with a raster grid and D infinity."""
mg = RasterModelGrid((5, 4), spacing=(1, 1))
# instantiate an elevation array
z = mg.x_of_node + 3.0 * mg.y_of_node
# add the elevation field to the grid
mg.add_field('node', 'topographic__elevation', z)
# instantiate the expected flow_length array
flow__distance_expected = np.array([[0, 0, 0, 0],
[0, 0, 1, 0],
[0, 1, 0+math.sqrt(2.), 0],
[0, 2, 1+math.sqrt(2.), 0],
[0, 0, 0, 0]], dtype='float64')
#setting boundary conditions
mg.set_closed_boundaries_at_grid_edges(bottom_is_closed=True,
left_is_closed=True,
right_is_closed=True,
top_is_closed=True)
# calculating flow directions with FlowAccumulator component
fa = FlowAccumulator(mg, 'topographic__elevation', flow_director='DINF')
fa.run_one_step()
# calculating flow distance map
flow__distance = calculate_flow__distance(mg,
add_to_grid=True,
noclobber=False).reshape(mg.shape)
# test that the flow__distance utility works as expected
assert_array_equal(flow__distance_expected, flow__distance)
| 34.895044
| 96
| 0.588604
| 1,436
| 11,969
| 4.622563
| 0.102368
| 0.031335
| 0.028924
| 0.024104
| 0.875716
| 0.866827
| 0.843628
| 0.836246
| 0.832932
| 0.821482
| 0
| 0.036719
| 0.328766
| 11,969
| 342
| 97
| 34.997076
| 0.78952
| 0.268443
| 0
| 0.687075
| 0
| 0
| 0.03783
| 0.025451
| 0
| 0
| 0
| 0
| 0.047619
| 1
| 0.054422
| false
| 0
| 0.047619
| 0
| 0.102041
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
f472996b6b7cfbb3ab8a0a0da08de8c5b2bc95d9
| 29
|
py
|
Python
|
mpu6050/__init__.py
|
jtkDvlp/mpu6050
|
c30432e61de60e6c227c33c0bcfe3bad92061076
|
[
"MIT"
] | 134
|
2016-08-06T23:06:10.000Z
|
2020-01-07T00:28:20.000Z
|
mpu6050/__init__.py
|
ynx0/mpu6050
|
536f214d86c7f6803e6ee71cc30d32370a831717
|
[
"MIT"
] | 21
|
2016-08-02T09:25:38.000Z
|
2019-11-26T01:25:13.000Z
|
mpu6050/__init__.py
|
ynx0/mpu6050
|
536f214d86c7f6803e6ee71cc30d32370a831717
|
[
"MIT"
] | 86
|
2016-08-16T11:36:01.000Z
|
2020-01-02T09:46:08.000Z
|
from .mpu6050 import mpu6050
| 14.5
| 28
| 0.827586
| 4
| 29
| 6
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.32
| 0.137931
| 29
| 1
| 29
| 29
| 0.64
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 6
|
be513833fb3d4f90f3494f0dd87c8ef1fac4de90
| 32
|
py
|
Python
|
src/constants/__init__.py
|
ArneRustad/Master-thesis-cf
|
23b993b2877ff1506896c4181c4151578091b602
|
[
"MIT"
] | null | null | null |
src/constants/__init__.py
|
ArneRustad/Master-thesis-cf
|
23b993b2877ff1506896c4181c4151578091b602
|
[
"MIT"
] | null | null | null |
src/constants/__init__.py
|
ArneRustad/Master-thesis-cf
|
23b993b2877ff1506896c4181c4151578091b602
|
[
"MIT"
] | null | null | null |
from . import directories as dir
| 32
| 32
| 0.8125
| 5
| 32
| 5.2
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15625
| 32
| 1
| 32
| 32
| 0.962963
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 6
|
be860f75b9605e96fb1bef560759c16f213c5b59
| 133
|
py
|
Python
|
fastats/utilities/arrays.py
|
AaronCritchley/fastats
|
3c8e50fffc08ee0dd44c615f4ed93adc47c08ffe
|
[
"MIT"
] | 26
|
2017-07-17T09:19:53.000Z
|
2021-11-30T01:36:56.000Z
|
fastats/utilities/arrays.py
|
AaronCritchley/fastats
|
3c8e50fffc08ee0dd44c615f4ed93adc47c08ffe
|
[
"MIT"
] | 320
|
2017-09-02T16:26:25.000Z
|
2021-07-28T05:19:49.000Z
|
fastats/utilities/arrays.py
|
AaronCritchley/fastats
|
3c8e50fffc08ee0dd44c615f4ed93adc47c08ffe
|
[
"MIT"
] | 13
|
2017-07-06T19:02:29.000Z
|
2020-01-22T11:36:34.000Z
|
def is_2d(n):
return len(n.shape) == 2
def is_square(n):
square = n.shape[0] == n.shape[1]
return is_2d(n) and square
| 14.777778
| 37
| 0.593985
| 26
| 133
| 2.923077
| 0.461538
| 0.236842
| 0.131579
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.049505
| 0.240602
| 133
| 8
| 38
| 16.625
| 0.70297
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0
| 0
| 0.2
| 0.8
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 6
|
be883560814eca27196de3156057864d977c28fe
| 38
|
py
|
Python
|
demos/database/__init__.py
|
megahard25/tmux_class
|
4514622d46762e53c52fa9263ef3a4c78c5b6a4e
|
[
"MIT"
] | null | null | null |
demos/database/__init__.py
|
megahard25/tmux_class
|
4514622d46762e53c52fa9263ef3a4c78c5b6a4e
|
[
"MIT"
] | null | null | null |
demos/database/__init__.py
|
megahard25/tmux_class
|
4514622d46762e53c52fa9263ef3a4c78c5b6a4e
|
[
"MIT"
] | null | null | null |
from .jsondatabase import JSONDatabase
| 38
| 38
| 0.894737
| 4
| 38
| 8.5
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.078947
| 38
| 1
| 38
| 38
| 0.971429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 6
|
be88809223a656a25dad6489e38089a97e2c2137
| 178
|
py
|
Python
|
thefuck/exceptions.py
|
juzim/thefuck
|
a3b2e6872b9e75b8a259375b9440246fdd181565
|
[
"MIT"
] | 5
|
2016-04-12T21:59:07.000Z
|
2016-06-21T17:56:19.000Z
|
thefuck/exceptions.py
|
juzim/thefuck
|
a3b2e6872b9e75b8a259375b9440246fdd181565
|
[
"MIT"
] | 4
|
2020-12-23T15:44:08.000Z
|
2020-12-23T16:48:59.000Z
|
thefuck/exceptions.py
|
juzim/thefuck
|
a3b2e6872b9e75b8a259375b9440246fdd181565
|
[
"MIT"
] | 2
|
2018-04-05T00:01:28.000Z
|
2018-04-17T21:39:53.000Z
|
class EmptyCommand(Exception):
"""Raised when empty command passed to `thefuck`."""
class NoRuleMatched(Exception):
"""Raised when no rule matched for some command."""
| 25.428571
| 56
| 0.713483
| 21
| 178
| 6.047619
| 0.761905
| 0.23622
| 0.299213
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.162921
| 178
| 6
| 57
| 29.666667
| 0.852349
| 0.516854
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 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
| 0
| 0
| 1
| 0
|
0
| 6
|
be95b706e7434aae1b55801b99a967189d3980f6
| 6,901
|
py
|
Python
|
datadog/dogshell/comment.py
|
ahmed-mez/datadogpy
|
12758de2331696a68860a59931d94fe8a2ecc99e
|
[
"BSD-3-Clause"
] | null | null | null |
datadog/dogshell/comment.py
|
ahmed-mez/datadogpy
|
12758de2331696a68860a59931d94fe8a2ecc99e
|
[
"BSD-3-Clause"
] | null | null | null |
datadog/dogshell/comment.py
|
ahmed-mez/datadogpy
|
12758de2331696a68860a59931d94fe8a2ecc99e
|
[
"BSD-3-Clause"
] | null | null | null |
# stdlib
import json
import sys
# datadog
from datadog import api
from datadog.dogshell.common import report_errors, report_warnings
class CommentClient(object):
@classmethod
def setup_parser(cls, subparsers):
parser = subparsers.add_parser('comment', help="Post, update, and delete comments.")
verb_parsers = parser.add_subparsers(title='Verbs', dest='verb')
verb_parsers.required = True
post_parser = verb_parsers.add_parser('post', help="Post comments.")
post_parser.add_argument('handle', help="handle to post as.")
post_parser.add_argument('comment', help="comment message to post. if unset,"
" reads from stdin.", nargs='?')
post_parser.set_defaults(func=cls._post)
update_parser = verb_parsers.add_parser('update', help="Update existing comments.")
update_parser.add_argument('comment_id', help="comment to update (by id)")
update_parser.add_argument('handle', help="handle to post as.")
update_parser.add_argument('comment', help="comment message to post."
" if unset, reads from stdin.", nargs="?")
update_parser.set_defaults(func=cls._update)
reply_parser = verb_parsers.add_parser('reply', help="Reply to existing comments.")
reply_parser.add_argument('comment_id', help="comment to reply to (by id)")
reply_parser.add_argument('handle', help="handle to post as.")
reply_parser.add_argument('comment', help="comment message to post."
" if unset, reads from stdin.", nargs="?")
reply_parser.set_defaults(func=cls._reply)
show_parser = verb_parsers.add_parser('show', help="Show comment details.")
show_parser.add_argument('comment_id', help="comment to show")
show_parser.set_defaults(func=cls._show)
delete_parser = verb_parsers.add_parser('delete', help="Delete comments.")
delete_parser.add_argument('comment_id', help="comment to delete (by id)")
delete_parser.set_defaults(func=cls._delete)
@classmethod
def _post(cls, args):
api._timeout = args.timeout
handle = args.handle
comment = args.comment
format = args.format
if comment is None:
comment = sys.stdin.read()
res = api.Comment.create(handle=handle, message=comment)
report_warnings(res)
report_errors(res)
if format == 'pretty':
message = res['comment']['message']
lines = message.split('\n')
message = '\n'.join([' ' + line for line in lines])
print('id\t\t' + str(res['comment']['id']))
print('url\t\t' + res['comment']['url'])
print('resource\t' + res['comment']['resource'])
print('handle\t\t' + res['comment']['handle'])
print('message\n' + message)
elif format == 'raw':
print(json.dumps(res))
else:
print('id\t\t' + str(res['comment']['id']))
print('url\t\t' + res['comment']['url'])
print('resource\t' + res['comment']['resource'])
print('handle\t\t' + res['comment']['handle'])
print('message\t\t' + res['comment']['message'].__repr__())
@classmethod
def _update(cls, args):
handle = args.handle
comment = args.comment
id = args.comment_id
format = args.format
if comment is None:
comment = sys.stdin.read()
res = api.Comment.update(id, handle=handle, message=comment)
report_warnings(res)
report_errors(res)
if format == 'pretty':
message = res['comment']['message']
lines = message.split('\n')
message = '\n'.join([' ' + line for line in lines])
print('id\t\t' + str(res['comment']['id']))
print('url\t\t' + res['comment']['url'])
print('resource\t' + res['comment']['resource'])
print('handle\t\t' + res['comment']['handle'])
print('message\n' + message)
elif format == 'raw':
print(json.dumps(res))
else:
print('id\t\t' + str(res['comment']['id']))
print('url\t\t' + res['comment']['url'])
print('resource\t' + res['comment']['resource'])
print('handle\t\t' + res['comment']['handle'])
print('message\t\t' + res['comment']['message'].__repr__())
@classmethod
def _reply(cls, args):
api._timeout = args.timeout
handle = args.handle
comment = args.comment
id = args.comment_id
format = args.format
if comment is None:
comment = sys.stdin.read()
res = api.Comment.create(handle=handle, message=comment, related_event_id=id)
report_warnings(res)
report_errors(res)
if format == 'pretty':
message = res['comment']['message']
lines = message.split('\n')
message = '\n'.join([' ' + line for line in lines])
print('id\t\t' + str(res['comment']['id']))
print('url\t\t' + res['comment']['url'])
print('resource\t' + res['comment']['resource'])
print('handle\t\t' + res['comment']['handle'])
print('message\n' + message)
elif format == 'raw':
print(json.dumps(res))
else:
print('id\t\t' + str(res['comment']['id']))
print('url\t\t' + res['comment']['url'])
print('resource\t' + res['comment']['resource'])
print('handle\t\t' + res['comment']['handle'])
print('message\t\t' + res['comment']['message'].__repr__())
@classmethod
def _show(cls, args):
api._timeout = args.timeout
id = args.comment_id
format = args.format
res = api.Event.get(id)
report_warnings(res)
report_errors(res)
if format == 'pretty':
message = res['event']['text']
lines = message.split('\n')
message = '\n'.join([' ' + line for line in lines])
print('id\t\t' + str(res['event']['id']))
print('url\t\t' + res['event']['url'])
print('resource\t' + res['event']['resource'])
print('message\n' + message)
elif format == 'raw':
print(json.dumps(res))
else:
print('id\t\t' + str(res['event']['id']))
print('url\t\t' + res['event']['url'])
print('resource\t' + res['event']['resource'])
print('message\t\t' + res['event']['text'].__repr__())
@classmethod
def _delete(cls, args):
api._timeout = args.timeout
id = args.comment_id
res = api.Comment.delete(id)
if res is not None:
report_warnings(res)
report_errors(res)
| 41.323353
| 92
| 0.556876
| 817
| 6,901
| 4.578947
| 0.105263
| 0.080192
| 0.061748
| 0.048115
| 0.804598
| 0.730553
| 0.721999
| 0.717723
| 0.676022
| 0.643144
| 0
| 0
| 0.280974
| 6,901
| 166
| 93
| 41.572289
| 0.75393
| 0.002029
| 0
| 0.711409
| 0
| 0
| 0.202499
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.040268
| false
| 0
| 0.026846
| 0
| 0.073826
| 0.281879
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
bec26003e65d72a830551722131d9c15df057500
| 4,929
|
py
|
Python
|
models/UNet_Hollow_Kernels_A2_Congig1.py
|
cviaai/LORCK
|
41a62c74b400d9e2cfbd088f25e76d00902c9160
|
[
"Apache-2.0"
] | 2
|
2021-03-16T03:18:54.000Z
|
2022-02-21T14:54:36.000Z
|
models/UNet_Hollow_Kernels_A2_Congig1.py
|
cviaai/LEARNABLE-HOLLOW-KERNELS
|
41a62c74b400d9e2cfbd088f25e76d00902c9160
|
[
"Apache-2.0"
] | null | null | null |
models/UNet_Hollow_Kernels_A2_Congig1.py
|
cviaai/LEARNABLE-HOLLOW-KERNELS
|
41a62c74b400d9e2cfbd088f25e76d00902c9160
|
[
"Apache-2.0"
] | null | null | null |
import sys
import torch
import torch.nn as nn
import torch.nn.functional as F
from UNet_PD import UNet_Dilated
def double_conv(in_channels, out_channels, bias=True, kernel=[3, 3], padding=[1, 1], dilation=[1, 1]):
return nn.Sequential(
nn.Conv2d(in_channels, out_channels, kernel[0], padding=padding[0], dilation=dilation[0], bias=bias),
nn.PReLU(),
nn.Conv2d(out_channels, out_channels, kernel[1], padding=padding[1], dilation=dilation[1]),
nn.PReLU()
)
class UNet_config1(nn.Module):
def __init__(self, n_class, kernel_size=20):
super().__init__()
self.dconv_down1 = double_conv(1, 32, bias=False, kernel=[kernel_size, 4],
padding=[int(kernel_size/2)-1, 2])
self.bn1 = nn.BatchNorm2d(num_features=32)
self.dconv_down2 = double_conv(32, 128)
self.bn2 = nn.BatchNorm2d(num_features=128)
self.dconv_down3 = double_conv(128, 256)
self.bn3 = nn.BatchNorm2d(num_features=256)
self.dconv_down4 = double_conv(256, 512)
self.bn4 = nn.BatchNorm2d(num_features=512)
self.maxpool = nn.MaxPool2d(2)
self.upsample = nn.Upsample(scale_factor=2, mode='bilinear', align_corners=True)
self.dconv_up3 = double_conv(256 + 512, 256)
self.dconv_up2 = double_conv(128 + 256, 128)
self.dconv_up1 = double_conv(128 + 32, 32)
self.conv_last = nn.Conv2d(32, n_class, 1)
def forward(self, x):
conv1 = self.dconv_down1(x)
conv1 = self.bn1(conv1)
x = self.maxpool(conv1)
conv2 = self.dconv_down2(x)
conv2 = self.bn2(conv2)
x = self.maxpool(conv2)
conv3 = self.dconv_down3(x)
conv3 = self.bn3(conv3)
x = self.maxpool(conv3)
x = self.dconv_down4(x)
x = self.bn4(x)
x = self.upsample(x)
x = torch.cat([x, conv3], dim=1)
x = self.dconv_up3(x)
x = self.upsample(x)
x = torch.cat([x, conv2], dim=1)
x = self.dconv_up2(x)
x = self.upsample(x)
x = torch.cat([x, conv1], dim=1)
x = self.dconv_up1(x)
out = self.conv_last(x)
return out
class UNet_config1_dilated(nn.Module):
def __init__(self, n_class, kernel_size=20):
super().__init__()
self.dconv_down1 = double_conv(1, 32, bias=False,
kernel=[kernel_size, 4],
padding=[int(kernel_size/2)-1, 5],
dilation=[1, 3])
self.bn1 = nn.BatchNorm2d(num_features=32)
self.dconv_down2 = double_conv(32, 128)
self.bn2 = nn.BatchNorm2d(num_features=128)
self.dconv_down3 = double_conv(128, 256)
self.bn3 = nn.BatchNorm2d(num_features=256)
self.dconv_down4 = double_conv(256, 512)
self.bn4 = nn.BatchNorm2d(num_features=512)
self.maxpool = nn.MaxPool2d(2)
self.upsample = nn.Upsample(scale_factor=2, mode='bilinear', align_corners=True)
self.dconv_up3 = double_conv(256 + 512, 256)
self.dconv_up2 = double_conv(128 + 256, 128)
self.dconv_up1 = double_conv(128 + 32, 32)
self.conv_last = nn.Conv2d(32, n_class, 1)
def forward(self, x):
conv1 = self.dconv_down1(x)
conv1 = self.bn1(conv1)
x = self.maxpool(conv1)
conv2 = self.dconv_down2(x)
conv2 = self.bn2(conv2)
x = self.maxpool(conv2)
conv3 = self.dconv_down3(x)
conv3 = self.bn3(conv3)
x = self.maxpool(conv3)
x = self.dconv_down4(x)
x = self.bn4(x)
x = self.upsample(x)
x = torch.cat([x, conv3], dim=1)
x = self.dconv_up3(x)
x = self.upsample(x)
x = torch.cat([x, conv2], dim=1)
x = self.dconv_up2(x)
x = self.upsample(x)
x = torch.cat([x, conv1], dim=1)
x = self.dconv_up1(x)
out = self.conv_last(x)
return out
class UNet_Dilated_config1(nn.Module):
def __init__(self, n_class, kernel_size=20):
super().__init__()
self.model = UNet_Dilated(1, n_class)
self.model.model.conv_down[0].conv_layers = nn.ModuleList(
[nn.Conv2d(1, 32, kernel_size,
padding=int(kernel_size/2)-1,
dilation=1, bias=False),
nn.Conv2d(32, 32, 4, padding=5, dilation=3)])
def forward(self, x):
out = self.model(x)
return out
| 31.196203
| 109
| 0.528708
| 630
| 4,929
| 3.955556
| 0.131746
| 0.101124
| 0.051364
| 0.077047
| 0.778491
| 0.778491
| 0.769663
| 0.769663
| 0.769663
| 0.769663
| 0
| 0.082915
| 0.354027
| 4,929
| 158
| 110
| 31.196203
| 0.699749
| 0
| 0
| 0.740741
| 0
| 0
| 0.003245
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.064815
| false
| 0
| 0.046296
| 0.009259
| 0.175926
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
bec447bf5bc29cb8171bdf8a7e360c90ed28643c
| 11,196
|
py
|
Python
|
src/app/test/db/mongo/util_test.py
|
hazmat345/beer-garden
|
a5fd3eee303d80b6a16d93c89fe8ff42fe39bfbd
|
[
"MIT"
] | null | null | null |
src/app/test/db/mongo/util_test.py
|
hazmat345/beer-garden
|
a5fd3eee303d80b6a16d93c89fe8ff42fe39bfbd
|
[
"MIT"
] | null | null | null |
src/app/test/db/mongo/util_test.py
|
hazmat345/beer-garden
|
a5fd3eee303d80b6a16d93c89fe8ff42fe39bfbd
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
import pytest
from mock import MagicMock, Mock, patch
from mongoengine import DoesNotExist, NotUniqueError
import beer_garden.db.mongo.models
import beer_garden.db.mongo.util
@pytest.fixture
def model_mocks(monkeypatch):
request_mock = Mock()
system_mock = Mock()
role_mock = Mock()
job_mock = Mock()
principal_mock = Mock()
request_mock.__name__ = "Request"
system_mock.__name__ = "System"
role_mock.__name__ = "Role"
job_mock.__name__ = "Job"
principal_mock.__name__ = "Principal"
monkeypatch.setattr(beer_garden.db.mongo.models, "Request", request_mock)
monkeypatch.setattr(beer_garden.db.mongo.models, "System", system_mock)
monkeypatch.setattr(beer_garden.db.mongo.models, "Role", role_mock)
monkeypatch.setattr(beer_garden.db.mongo.models, "Job", job_mock)
monkeypatch.setattr(beer_garden.db.mongo.models, "Principal", principal_mock)
return {
"request": request_mock,
"system": system_mock,
"role": role_mock,
"job": job_mock,
"principal": principal_mock,
}
class TestEnsureRoles(object):
def test_ensure_roles(self, model_mocks):
beer_garden.db.mongo.util.ensure_roles()
assert 3 == model_mocks["role"].objects.get.call_count
def test_new_install(self, model_mocks):
model_mocks["role"].objects.count.return_value = 0
model_mocks["role"].objects.get.side_effect = DoesNotExist
beer_garden.db.mongo.util.ensure_roles()
assert 5 == model_mocks["role"].objects.get.call_count
def test_new_install_race_convenience(self, model_mocks):
"""Race condition where another process created a convenience role"""
model_mocks["role"].objects.count.return_value = 0
model_mocks["role"].objects.get.side_effect = [NotUniqueError] + [
DoesNotExist for _ in range(4)
]
beer_garden.db.mongo.util.ensure_roles()
assert 5 == model_mocks["role"].objects.get.call_count
def test_new_install_race_mandatory(self, model_mocks):
"""Race condition where another process created a mandatory role"""
model_mocks["role"].objects.count.return_value = 0
model_mocks["role"].objects.get.side_effect = [
DoesNotExist for _ in range(4)
] + [NotUniqueError]
with pytest.raises(NotUniqueError):
beer_garden.db.mongo.util.ensure_roles()
class TestEnsureUsers(object):
def test_already_exists(self, model_mocks):
principal = model_mocks["principal"]
principal.objects.get = Mock()
beer_garden.db.mongo.util.ensure_users(False)
principal.assert_not_called()
def test_others_exist(self, model_mocks):
principal = model_mocks["principal"]
principal.objects.count = Mock(return_value=2)
principal.objects.get = Mock(side_effect=DoesNotExist)
beer_garden.db.mongo.util.ensure_users(False)
principal.assert_not_called()
def test_only_anon_exists(self, model_mocks):
principal = model_mocks["principal"]
principal.objects.count = Mock(return_value=1)
mock_anon = Mock(username="anonymous")
principal.objects.get = Mock(
side_effect=[DoesNotExist, [mock_anon], DoesNotExist]
)
beer_garden.db.mongo.util.ensure_users(False)
principal.assert_called_once()
@patch("passlib.apps.custom_app_context.hash")
def test_create(self, hash_mock, model_mocks):
principal = model_mocks["principal"]
principal.objects.count = Mock(return_value=0)
principal.objects.get = Mock(side_effect=DoesNotExist)
beer_garden.db.mongo.util.ensure_users(False)
principal.assert_called_once()
hash_mock.assert_called_with("password")
@patch("passlib.apps.custom_app_context.hash")
def test_create_env_password(self, hash_mock, model_mocks):
principal = model_mocks["principal"]
principal.objects.count = Mock(return_value=0)
principal.objects.get = Mock(side_effect=DoesNotExist)
with patch.dict("os.environ", {"BG_DEFAULT_ADMIN_PASSWORD": "foo"}):
beer_garden.db.mongo.util.ensure_users(False)
principal.assert_called_once()
hash_mock.assert_called_with("foo")
def test_guest_login_enabled(self, model_mocks):
principal = model_mocks["principal"]
principal.objects.count = Mock(return_value=0)
principal.objects.get = Mock(side_effect=DoesNotExist)
beer_garden.db.mongo.util.ensure_users(True)
assert principal.call_count == 2
def test_remove_anonymous_user(self, model_mocks):
principal = model_mocks["principal"]
anon_user = Mock()
principal.objects.count = Mock(return_value=0)
principal.objects.get = Mock(return_value=anon_user)
beer_garden.db.mongo.util.ensure_users(False)
assert anon_user.delete.call_count == 1
def test_remove_anonymous_user_guest_login_none(self, model_mocks):
principal = model_mocks["principal"]
anon_user = Mock()
principal.objects.get = Mock(return_value=anon_user)
beer_garden.db.mongo.util.ensure_users(None)
assert anon_user.delete.call_count == 0
class TestCheckIndexes(object):
@patch("mongoengine.connect", Mock())
@patch("mongoengine.register_connection", Mock())
def test_same_indexes(self, model_mocks):
for model_mock in model_mocks.values():
model_mock.list_indexes = Mock(return_value=["index1"])
model_mock._get_collection = Mock(
return_value=Mock(index_information=Mock(return_value={"index1": {}}))
)
[beer_garden.db.mongo.util.check_indexes(doc) for doc in model_mocks.values()]
for model_mock in model_mocks.values():
assert model_mock.ensure_indexes.call_count == 1
@patch("mongoengine.connect", Mock())
@patch("mongoengine.register_connection", Mock())
def test_missing_index(self, model_mocks):
for model_mock in model_mocks.values():
model_mock.list_indexes = Mock(return_value=["index1", "index2"])
model_mock._get_collection = Mock(
return_value=Mock(index_information=Mock(return_value={"index1": {}}))
)
[beer_garden.db.mongo.util.check_indexes(doc) for doc in model_mocks.values()]
for model_mock in model_mocks.values():
assert model_mock.ensure_indexes.call_count == 1
@patch("mongoengine.connection.get_db")
@patch("mongoengine.connect", Mock())
@patch("mongoengine.register_connection", Mock())
def test_successful_index_rebuild(self, get_db_mock, model_mocks):
from pymongo.errors import OperationFailure
# 'normal' return values
for model_mock in model_mocks.values():
model_mock.list_indexes = Mock(return_value=["index1"])
model_mock._get_collection = Mock(
return_value=MagicMock(
index_information=Mock(return_value={"index1": {}})
)
)
# ... except for this one
model_mocks["request"].list_indexes.side_effect = OperationFailure("")
db_mock = MagicMock()
get_db_mock.return_value = db_mock
[beer_garden.db.mongo.util.check_indexes(doc) for doc in model_mocks.values()]
assert db_mock["request"].drop_indexes.call_count == 1
assert model_mocks["request"].ensure_indexes.called is True
@patch("mongoengine.connect", Mock())
@patch("mongoengine.connection.get_db")
def test_unsuccessful_index_drop(self, get_db_mock, model_mocks):
from pymongo.errors import OperationFailure
for model_mock in model_mocks.values():
model_mock.list_indexes = Mock(return_value=["index1"])
model_mock._get_collection = Mock(
return_value=Mock(index_information=Mock(return_value={"index1": {}}))
)
model_mock.ensure_indexes.side_effect = OperationFailure("")
get_db_mock.side_effect = OperationFailure("")
for doc in model_mocks.values():
with pytest.raises(OperationFailure):
beer_garden.db.mongo.util.check_indexes(doc)
@patch("mongoengine.connect", Mock())
@patch("mongoengine.connection.get_db", MagicMock())
def test_unsuccessful_index_rebuild(self, model_mocks):
from pymongo.errors import OperationFailure
for model_mock in model_mocks.values():
model_mock.list_indexes = Mock(return_value=["index1"])
model_mock._get_collection = Mock(
return_value=MagicMock(
index_information=Mock(return_value={"index1": {}})
)
)
model_mock.ensure_indexes.side_effect = OperationFailure("")
for doc in model_mocks.values():
with pytest.raises(OperationFailure):
beer_garden.db.mongo.util.check_indexes(doc)
@patch("mongoengine.connection.get_db")
@patch("mongoengine.connect", Mock())
@patch("mongoengine.register_connection", Mock())
def test_old_request_index(self, get_db_mock, model_mocks, monkeypatch):
# 'normal' return values
for model_mock in model_mocks.values():
model_mock.list_indexes = Mock(return_value=["index1"])
model_mock._get_collection = Mock(
return_value=MagicMock(
index_information=Mock(return_value={"index1": {}})
)
)
# ... except for this one
model_mocks[
"request"
]._get_collection.return_value.index_information.return_value = {
"index1": {},
"parent_instance_index": {},
}
# Mock out request model update methods
update_parent_field_type_mock = Mock()
update_has_parent_mock = Mock()
monkeypatch.setattr(
beer_garden.db.mongo.util,
"_update_request_parent_field_type",
update_parent_field_type_mock,
)
monkeypatch.setattr(
beer_garden.db.mongo.util,
"_update_request_has_parent_model",
update_has_parent_mock,
)
db_mock = MagicMock()
get_db_mock.return_value = db_mock
[beer_garden.db.mongo.util.check_indexes(doc) for doc in model_mocks.values()]
assert db_mock["request"].drop_indexes.call_count == 1
assert model_mocks["request"].ensure_indexes.called is True
assert update_parent_field_type_mock.called is True
assert update_has_parent_mock.called is True
class TestCreateRole(object):
def test_exists(self, model_mocks):
role = Mock()
model_mocks["role"].objects.get.return_value = role
beer_garden.db.mongo.util._create_role(role)
assert role.save.called is False
def test_missing(self, model_mocks):
role = Mock()
model_mocks["role"].objects.get.side_effect = DoesNotExist
beer_garden.db.mongo.util._create_role(role)
assert role.save.called is True
| 37.69697
| 86
| 0.666577
| 1,336
| 11,196
| 5.276946
| 0.108533
| 0.08227
| 0.049362
| 0.069929
| 0.806099
| 0.771631
| 0.759574
| 0.742837
| 0.711206
| 0.697021
| 0
| 0.004161
| 0.227224
| 11,196
| 296
| 87
| 37.824324
| 0.81068
| 0.025009
| 0
| 0.530973
| 0
| 0
| 0.082477
| 0.038807
| 0
| 0
| 0
| 0
| 0.10177
| 1
| 0.09292
| false
| 0.022124
| 0.035398
| 0
| 0.150442
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
fe48ca477718c44e86b02a6d28bea1523d8cdea6
| 89
|
py
|
Python
|
shopify/resources/application_credit.py
|
GhostApps/shopify_python_api
|
70645a9d0c77a092437f8076036c5fa01108a406
|
[
"MIT"
] | null | null | null |
shopify/resources/application_credit.py
|
GhostApps/shopify_python_api
|
70645a9d0c77a092437f8076036c5fa01108a406
|
[
"MIT"
] | 3
|
2021-09-01T19:25:11.000Z
|
2021-11-02T14:34:31.000Z
|
shopify/resources/application_credit.py
|
GhostApps/shopify_python_api
|
70645a9d0c77a092437f8076036c5fa01108a406
|
[
"MIT"
] | null | null | null |
from ..base import ShopifyResource
class ApplicationCredit(ShopifyResource):
pass
| 14.833333
| 41
| 0.786517
| 8
| 89
| 8.75
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.157303
| 89
| 5
| 42
| 17.8
| 0.933333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.333333
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 6
|
fe7b18f36a0325e8a65293b400c9687e076597bf
| 46
|
py
|
Python
|
cride/maps/serializers/__init__.py
|
albertoaldanar/serecsinAPI
|
ca0f72d42b2e23d4a28cafccef9892055f922bfc
|
[
"MIT"
] | null | null | null |
cride/maps/serializers/__init__.py
|
albertoaldanar/serecsinAPI
|
ca0f72d42b2e23d4a28cafccef9892055f922bfc
|
[
"MIT"
] | 8
|
2020-06-05T21:51:05.000Z
|
2022-01-13T01:25:00.000Z
|
cride/maps/views/__init__.py
|
albertoaldanar/serecsinAPI
|
ca0f72d42b2e23d4a28cafccef9892055f922bfc
|
[
"MIT"
] | null | null | null |
from .busroutes import *
from .stops import *
| 15.333333
| 24
| 0.73913
| 6
| 46
| 5.666667
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.173913
| 46
| 2
| 25
| 23
| 0.894737
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 6
|
2289da198009fb87b8cd9eacce471042f1d7578a
| 209
|
py
|
Python
|
orders/urls.py
|
tahasama/books
|
9400183077e8708a5f9365ce2b4622a2086427a0
|
[
"MIT"
] | null | null | null |
orders/urls.py
|
tahasama/books
|
9400183077e8708a5f9365ce2b4622a2086427a0
|
[
"MIT"
] | null | null | null |
orders/urls.py
|
tahasama/books
|
9400183077e8708a5f9365ce2b4622a2086427a0
|
[
"MIT"
] | null | null | null |
from django.urls import path
from .views import OrdersPageView
urlpatterns = [
path('charge/', OrdersPageView.as_view(), name='charge'),
path('', OrdersPageView.as_view(), name='orders'),
]
| 23.222222
| 63
| 0.669856
| 23
| 209
| 6
| 0.565217
| 0.231884
| 0.289855
| 0.347826
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.177033
| 209
| 8
| 64
| 26.125
| 0.802326
| 0
| 0
| 0
| 0
| 0
| 0.094527
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 6
|
22d153a42249bc2dcde9f6491717be9cacf7031a
| 485
|
py
|
Python
|
gestion_usuarios/utils.py
|
Infinityloopsistemas/SIVA
|
92b6c82f018d39ef405989639974d1f2757476ed
|
[
"BSD-3-Clause"
] | null | null | null |
gestion_usuarios/utils.py
|
Infinityloopsistemas/SIVA
|
92b6c82f018d39ef405989639974d1f2757476ed
|
[
"BSD-3-Clause"
] | 1
|
2018-09-27T12:07:19.000Z
|
2018-10-08T15:56:30.000Z
|
gestion_usuarios/utils.py
|
Infinityloopsistemas/SIVA
|
92b6c82f018d39ef405989639974d1f2757476ed
|
[
"BSD-3-Clause"
] | 1
|
2018-10-12T13:41:20.000Z
|
2018-10-12T13:41:20.000Z
|
def is_allowed_edit(user):
if user:
return (user.groups.filter(name='administradores').count() > 0) or (user.groups.filter(name='veterinarios').count() > 0)
return False
def is_allowed_see(user):
if user:
return (user.groups.filter(name='administradores').count() > 0) or (user.groups.filter(name='veterinarios').count() > 0) or (user.groups.filter(name='responsables').count() > 0) or (user.groups.filter(name='coordinadores').count() > 0)
return False
| 60.625
| 243
| 0.684536
| 66
| 485
| 4.969697
| 0.287879
| 0.182927
| 0.292683
| 0.365854
| 0.743902
| 0.743902
| 0.743902
| 0.591463
| 0.591463
| 0.591463
| 0
| 0.014354
| 0.138144
| 485
| 8
| 244
| 60.625
| 0.770335
| 0
| 0
| 0.5
| 0
| 0
| 0.162551
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0
| 0.75
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
22dbdb854442d33141aeba2da039331424a6ab68
| 338,382
|
py
|
Python
|
test/augmenters/test_meta.py
|
18001178267/Image_augment
|
563b000a3c5c14ac8f18030e975109d66577fe7d
|
[
"MIT"
] | null | null | null |
test/augmenters/test_meta.py
|
18001178267/Image_augment
|
563b000a3c5c14ac8f18030e975109d66577fe7d
|
[
"MIT"
] | null | null | null |
test/augmenters/test_meta.py
|
18001178267/Image_augment
|
563b000a3c5c14ac8f18030e975109d66577fe7d
|
[
"MIT"
] | null | null | null |
from __future__ import print_function, division, absolute_import
import os
import warnings
import sys
import itertools
import copy
from abc import ABCMeta, abstractmethod
# unittest only added in 3.4 self.subTest()
if sys.version_info[0] < 3 or sys.version_info[1] < 4:
import unittest2 as unittest
else:
import unittest
# unittest.mock is not available in 2.7 (though unittest2 might contain it?)
try:
import unittest.mock as mock
except ImportError:
import mock
try:
import cPickle as pickle
except ImportError:
import pickle
import numpy as np
import six
import six.moves as sm
import cv2
import PIL.Image
import imageio
import imgaug as ia
from imgaug import augmenters as iaa
from imgaug import parameters as iap
from imgaug import dtypes as iadt
from imgaug import random as iarandom
from imgaug.testutils import (create_random_images, create_random_keypoints,
array_equal_lists, keypoints_equal, reseed,
assert_cbaois_equal,
runtest_pickleable_uint8_img,
TemporaryDirectory)
from imgaug.augmentables.heatmaps import HeatmapsOnImage
from imgaug.augmentables.segmaps import SegmentationMapsOnImage
from imgaug.augmentables.lines import LineString, LineStringsOnImage
from imgaug.augmentables.polys import _ConcavePolygonRecoverer
from imgaug.augmentables.batches import _BatchInAugmentation
IS_PY36_OR_HIGHER = (sys.version_info[0] == 3 and sys.version_info[1] >= 6)
class _InplaceDummyAugmenterImgsArray(iaa.meta.Augmenter):
def __init__(self, addval):
super(_InplaceDummyAugmenterImgsArray, self).__init__()
self.addval = addval
def _augment_batch_(self, batch, random_state, parents, hooks):
batch.images += self.addval
return batch
def get_parameters(self):
return []
class _InplaceDummyAugmenterImgsList(iaa.meta.Augmenter):
def __init__(self, addval):
super(_InplaceDummyAugmenterImgsList, self).__init__()
self.addval = addval
def _augment_batch_(self, batch, random_state, parents, hooks):
assert len(batch.images) > 0
for i in range(len(batch.images)):
batch.images[i] += self.addval
return batch
def get_parameters(self):
return []
class _InplaceDummyAugmenterSegMaps(iaa.meta.Augmenter):
def __init__(self, addval):
super(_InplaceDummyAugmenterSegMaps, self).__init__()
self.addval = addval
def _augment_batch_(self, batch, random_state, parents, hooks):
assert len(batch.segmentation_maps) > 0
for i in range(len(batch.segmentation_maps)):
batch.segmentation_maps[i].arr += self.addval
return batch
def get_parameters(self):
return []
class _InplaceDummyAugmenterKeypoints(iaa.meta.Augmenter):
def __init__(self, x, y):
super(_InplaceDummyAugmenterKeypoints, self).__init__()
self.x = x
self.y = y
def _augment_batch_(self, batch, random_state, parents, hooks):
assert len(batch.keypoints) > 0
for i in range(len(batch.keypoints)):
kpsoi = batch.keypoints[i]
for j in range(len(kpsoi)):
batch.keypoints[i].keypoints[j].x += self.x
batch.keypoints[i].keypoints[j].y += self.y
return batch
def get_parameters(self):
return []
class TestIdentity(unittest.TestCase):
def setUp(self):
reseed()
def test_images(self):
aug = iaa.Identity()
images = create_random_images((16, 70, 50, 3))
observed = aug.augment_images(images)
expected = images
assert np.array_equal(observed, expected)
def test_images_deterministic(self):
aug_det = iaa.Identity().to_deterministic()
images = create_random_images((16, 70, 50, 3))
observed = aug_det.augment_images(images)
expected = images
assert np.array_equal(observed, expected)
def test_heatmaps(self):
aug = iaa.Identity()
heatmaps_arr = np.linspace(0.0, 1.0, 2*2, dtype="float32")\
.reshape((2, 2, 1))
heatmaps = ia.HeatmapsOnImage(heatmaps_arr, shape=(2, 2, 3))
observed = aug.augment_heatmaps(heatmaps)
assert np.allclose(observed.arr_0to1, heatmaps.arr_0to1)
def test_heatmaps_deterministic(self):
aug_det = iaa.Identity().to_deterministic()
heatmaps_arr = np.linspace(0.0, 1.0, 2*2, dtype="float32")\
.reshape((2, 2, 1))
heatmaps = ia.HeatmapsOnImage(heatmaps_arr, shape=(2, 2, 3))
observed = aug_det.augment_heatmaps(heatmaps)
assert np.allclose(observed.arr_0to1, heatmaps.arr_0to1)
def test_segmentation_maps(self):
aug = iaa.Identity()
segmaps_arr = np.arange(2*2).reshape((2, 2, 1)).astype(np.int32)
segmaps = SegmentationMapsOnImage(segmaps_arr, shape=(2, 2, 3))
observed = aug.augment_segmentation_maps(segmaps)
assert np.array_equal(observed.arr, segmaps.arr)
def test_segmentation_maps_deterministic(self):
aug_det = iaa.Identity().to_deterministic()
segmaps_arr = np.arange(2*2).reshape((2, 2, 1)).astype(np.int32)
segmaps = SegmentationMapsOnImage(segmaps_arr, shape=(2, 2, 3))
observed = aug_det.augment_segmentation_maps(segmaps)
assert np.array_equal(observed.arr, segmaps.arr)
def test_keypoints(self):
aug = iaa.Identity()
keypoints = create_random_keypoints((16, 70, 50, 3), 4)
observed = aug.augment_keypoints(keypoints)
assert_cbaois_equal(observed, keypoints)
def test_keypoints_deterministic(self):
aug_det = iaa.Identity().to_deterministic()
keypoints = create_random_keypoints((16, 70, 50, 3), 4)
observed = aug_det.augment_keypoints(keypoints)
assert_cbaois_equal(observed, keypoints)
def test_polygons(self):
aug = iaa.Identity()
polygon = ia.Polygon([(10, 10), (30, 10), (30, 50), (10, 50)])
psoi = ia.PolygonsOnImage([polygon], shape=(100, 75, 3))
observed = aug.augment_polygons(psoi)
assert_cbaois_equal(observed, psoi)
def test_polygons_deterministic(self):
aug_det = iaa.Identity().to_deterministic()
polygon = ia.Polygon([(10, 10), (30, 10), (30, 50), (10, 50)])
psoi = ia.PolygonsOnImage([polygon], shape=(100, 75, 3))
observed = aug_det.augment_polygons(psoi)
assert_cbaois_equal(observed, psoi)
def test_line_strings(self):
aug = iaa.Identity()
ls = LineString([(10, 10), (30, 10), (30, 50), (10, 50)])
lsoi = LineStringsOnImage([ls], shape=(100, 75, 3))
observed = aug.augment_line_strings(lsoi)
assert_cbaois_equal(observed, lsoi)
def test_line_strings_deterministic(self):
aug_det = iaa.Identity().to_deterministic()
ls = LineString([(10, 10), (30, 10), (30, 50), (10, 50)])
lsoi = LineStringsOnImage([ls], shape=(100, 75, 3))
observed = aug_det.augment_line_strings(lsoi)
assert_cbaois_equal(observed, lsoi)
def test_bounding_boxes(self):
aug = iaa.Identity()
bbs = ia.BoundingBox(x1=10, y1=10, x2=30, y2=50)
bbsoi = ia.BoundingBoxesOnImage([bbs], shape=(100, 75, 3))
observed = aug.augment_bounding_boxes(bbsoi)
assert_cbaois_equal(observed, bbsoi)
def test_bounding_boxes_deterministic(self):
aug_det = iaa.Identity().to_deterministic()
bbs = ia.BoundingBox(x1=10, y1=10, x2=30, y2=50)
bbsoi = ia.BoundingBoxesOnImage([bbs], shape=(100, 75, 3))
observed = aug_det.augment_bounding_boxes(bbsoi)
assert_cbaois_equal(observed, bbsoi)
def test_keypoints_empty(self):
aug = iaa.Identity()
kpsoi = ia.KeypointsOnImage([], shape=(4, 5, 3))
observed = aug.augment_keypoints(kpsoi)
assert_cbaois_equal(observed, kpsoi)
def test_polygons_empty(self):
aug = iaa.Identity()
psoi = ia.PolygonsOnImage([], shape=(4, 5, 3))
observed = aug.augment_polygons(psoi)
assert_cbaois_equal(observed, psoi)
def test_line_strings_empty(self):
aug = iaa.Identity()
lsoi = ia.LineStringsOnImage([], shape=(4, 5, 3))
observed = aug.augment_line_strings(lsoi)
assert_cbaois_equal(observed, lsoi)
def test_bounding_boxes_empty(self):
aug = iaa.Identity()
bbsoi = ia.BoundingBoxesOnImage([], shape=(4, 5, 3))
observed = aug.augment_bounding_boxes(bbsoi)
assert_cbaois_equal(observed, bbsoi)
def test_get_parameters(self):
assert iaa.Identity().get_parameters() == []
def test_other_dtypes_bool(self):
aug = iaa.Identity()
image = np.zeros((3, 3), dtype=bool)
image[0, 0] = True
image_aug = aug.augment_image(image)
assert image_aug.dtype.type == image.dtype.type
assert np.all(image_aug == image)
def test_other_dtypes_uint_int(self):
aug = iaa.Identity()
dtypes = ["uint8", "uint16", "uint32", "uint64",
"int8", "int32", "int64"]
for dtype in dtypes:
with self.subTest(dtype=dtype):
min_value, center_value, max_value = \
iadt.get_value_range_of_dtype(dtype)
value = max_value
image = np.zeros((3, 3), dtype=dtype)
image[0, 0] = value
image_aug = aug.augment_image(image)
assert image_aug.dtype.name == dtype
assert np.array_equal(image_aug, image)
def test_other_dtypes_float(self):
aug = iaa.Identity()
dtypes = ["float16", "float32", "float64", "float128"]
values = [5000, 1000 ** 2, 1000 ** 3, 1000 ** 4]
for dtype, value in zip(dtypes, values):
with self.subTest(dtype=dtype):
image = np.zeros((3, 3), dtype=dtype)
image[0, 0] = value
image_aug = aug.augment_image(image)
assert image_aug.dtype.name == dtype
assert np.all(image_aug == image)
def test_pickleable(self):
aug = iaa.Noop()
runtest_pickleable_uint8_img(aug, iterations=2)
class TestNoop(unittest.TestCase):
def setUp(self):
reseed()
def test___init__(self):
aug = iaa.Noop()
assert isinstance(aug, iaa.Identity)
def test_images(self):
image = np.mod(np.arange(10*10*3), 255)
image = image.astype(np.uint8).reshape((10, 10, 3))
image_aug = iaa.Noop()(image=image)
assert np.array_equal(image, image_aug)
# TODO add tests for line strings
class TestLambda(unittest.TestCase):
def setUp(self):
reseed()
@property
def base_img(self):
base_img = np.array([[0, 0, 1],
[0, 0, 1],
[0, 1, 1]], dtype=np.uint8)
base_img = base_img[:, :, np.newaxis]
return base_img
@property
def heatmaps(self):
heatmaps_arr = np.float32([[0.0, 0.0, 1.0],
[0.0, 0.0, 1.0],
[0.0, 1.0, 1.0]])
heatmaps = ia.HeatmapsOnImage(heatmaps_arr, shape=(3, 3, 3))
return heatmaps
@property
def heatmaps_aug(self):
heatmaps_arr_aug = np.float32([[0.5, 0.0, 1.0],
[0.0, 0.0, 1.0],
[0.0, 1.0, 1.0]])
heatmaps = ia.HeatmapsOnImage(heatmaps_arr_aug, shape=(3, 3, 3))
return heatmaps
@property
def segmentation_maps(self):
segmaps_arr = np.int32([[0, 0, 1],
[0, 0, 1],
[0, 1, 1]])
segmaps = SegmentationMapsOnImage(segmaps_arr, shape=(3, 3, 3))
return segmaps
@property
def segmentation_maps_aug(self):
segmaps_arr_aug = np.int32([[1, 1, 2],
[1, 1, 2],
[1, 2, 2]])
segmaps = SegmentationMapsOnImage(segmaps_arr_aug, shape=(3, 3, 3))
return segmaps
@property
def keypoints(self):
kps = [ia.Keypoint(x=0, y=0), ia.Keypoint(x=1, y=1),
ia.Keypoint(x=2, y=2)]
kpsoi = [ia.KeypointsOnImage(kps, shape=(3, 3, 3))]
return kpsoi
@property
def keypoints_aug(self):
expected_kps = [ia.Keypoint(x=1, y=0), ia.Keypoint(x=2, y=1),
ia.Keypoint(x=0, y=2)]
expected = [ia.KeypointsOnImage(expected_kps, shape=(3, 3, 3))]
return expected
@property
def polygons(self):
poly = ia.Polygon([(0, 0), (2, 0), (2, 2), (0, 2)])
psois = [ia.PolygonsOnImage([poly], shape=(3, 3, 3))]
return psois
@property
def polygons_aug(self):
expected_poly = ia.Polygon([(1, 2), (3, 2), (3, 4), (1, 4)])
expected_psoi = [ia.PolygonsOnImage([expected_poly], shape=(3, 3, 3))]
return expected_psoi
@property
def lsoi(self):
ls = ia.LineString([(0, 0), (2, 0), (2, 2), (0, 2)])
lsois = [ia.LineStringsOnImage([ls], shape=(3, 3, 3))]
return lsois
@property
def lsoi_aug(self):
ls = ia.LineString([(1, 2), (3, 2), (3, 4), (1, 4)])
lsois = [ia.LineStringsOnImage([ls], shape=(3, 3, 3))]
return lsois
@property
def bbsoi(self):
bb = ia.BoundingBox(x1=0, y1=1, x2=3, y2=4)
bbsois = [ia.BoundingBoxesOnImage([bb], shape=(3, 3, 3))]
return bbsois
@property
def bbsoi_aug(self):
bb = ia.BoundingBox(x1=0+1, y1=1+2, x2=3+1, y2=4+2)
bbsois = [ia.BoundingBoxesOnImage([bb], shape=(3, 3, 3))]
return bbsois
@classmethod
def func_images(cls, images, random_state, parents, hooks):
if isinstance(images, list):
images = [image + 1 for image in images]
else:
images = images + 1
return images
@classmethod
def func_heatmaps(cls, heatmaps, random_state, parents, hooks):
heatmaps[0].arr_0to1[0, 0] += 0.5
return heatmaps
@classmethod
def func_segmaps(cls, segmaps, random_state, parents, hooks):
segmaps[0].arr += 1
return segmaps
@classmethod
def func_keypoints(cls, keypoints_on_images, random_state, parents, hooks):
for keypoints_on_image in keypoints_on_images:
for kp in keypoints_on_image.keypoints:
kp.x = (kp.x + 1) % 3
return keypoints_on_images
@classmethod
def func_polygons(cls, polygons_on_images, random_state, parents, hooks):
if len(polygons_on_images[0].polygons) == 0:
return [ia.PolygonsOnImage([], shape=polygons_on_images[0].shape)]
new_exterior = np.copy(polygons_on_images[0].polygons[0].exterior)
new_exterior[:, 0] += 1
new_exterior[:, 1] += 2
return [
ia.PolygonsOnImage([ia.Polygon(new_exterior)],
shape=polygons_on_images[0].shape)
]
@classmethod
def func_line_strings(cls, line_strings_on_images, random_state, parents,
hooks):
if line_strings_on_images[0].empty:
return [ia.LineStringsOnImage(
[], shape=line_strings_on_images[0].shape)]
new_coords = np.copy(line_strings_on_images[0].items[0].coords)
new_coords[:, 0] += 1
new_coords[:, 1] += 2
return [
ia.LineStringsOnImage(
[ia.LineString(new_coords)],
shape=line_strings_on_images[0].shape)
]
@classmethod
def func_bbs(cls, bounding_boxes_on_images, random_state, parents, hooks):
if bounding_boxes_on_images[0].empty:
return [
ia.BoundingBoxesOnImage(
[], shape=bounding_boxes_on_images[0].shape)
]
new_coords = np.copy(bounding_boxes_on_images[0].items[0].coords)
new_coords[:, 0] += 1
new_coords[:, 1] += 2
return [
ia.BoundingBoxesOnImage(
[ia.BoundingBox(x1=new_coords[0][0], y1=new_coords[0][1],
x2=new_coords[1][0], y2=new_coords[1][1])],
shape=bounding_boxes_on_images[0].shape)
]
def test_images(self):
image = self.base_img
expected = image + 1
aug = iaa.Lambda(func_images=self.func_images)
for _ in sm.xrange(3):
observed = aug.augment_image(image)
assert np.array_equal(observed, expected)
def test_images_deterministic(self):
image = self.base_img
expected = image + 1
aug_det = iaa.Lambda(func_images=self.func_images).to_deterministic()
for _ in sm.xrange(3):
observed = aug_det.augment_image(image)
assert np.array_equal(observed, expected)
def test_images_list(self):
image = self.base_img
expected = [image + 1]
aug = iaa.Lambda(func_images=self.func_images)
observed = aug.augment_images([image])
assert array_equal_lists(observed, expected)
def test_images_list_deterministic(self):
image = self.base_img
expected = [image + 1]
aug_det = iaa.Lambda(func_images=self.func_images).to_deterministic()
observed = aug_det.augment_images([image])
assert array_equal_lists(observed, expected)
def test_heatmaps(self):
heatmaps = self.heatmaps
heatmaps_arr_aug = self.heatmaps_aug.get_arr()
aug = iaa.Lambda(func_heatmaps=self.func_heatmaps)
for _ in sm.xrange(3):
observed = aug.augment_heatmaps(heatmaps)
assert observed.shape == (3, 3, 3)
assert 0 - 1e-6 < observed.min_value < 0 + 1e-6
assert 1 - 1e-6 < observed.max_value < 1 + 1e-6
assert np.allclose(observed.get_arr(), heatmaps_arr_aug)
def test_heatmaps_deterministic(self):
heatmaps = self.heatmaps
heatmaps_arr_aug = self.heatmaps_aug.get_arr()
aug_det = iaa.Lambda(func_heatmaps=self.func_heatmaps)\
.to_deterministic()
for _ in sm.xrange(3):
observed = aug_det.augment_heatmaps(heatmaps)
assert observed.shape == (3, 3, 3)
assert 0 - 1e-6 < observed.min_value < 0 + 1e-6
assert 1 - 1e-6 < observed.max_value < 1 + 1e-6
assert np.allclose(observed.get_arr(), heatmaps_arr_aug)
def test_segmentation_maps(self):
segmaps = self.segmentation_maps
segmaps_arr_aug = self.segmentation_maps_aug.get_arr()
aug = iaa.Lambda(func_segmentation_maps=self.func_segmaps)
for _ in sm.xrange(3):
observed = aug.augment_segmentation_maps(segmaps)
assert observed.shape == (3, 3, 3)
assert np.array_equal(observed.get_arr(), segmaps_arr_aug)
def test_segmentation_maps_deterministic(self):
segmaps = self.segmentation_maps
segmaps_arr_aug = self.segmentation_maps_aug.get_arr()
aug_det = iaa.Lambda(func_segmentation_maps=self.func_segmaps)\
.to_deterministic()
for _ in sm.xrange(3):
observed = aug_det.augment_segmentation_maps(segmaps)
assert observed.shape == (3, 3, 3)
assert np.array_equal(observed.get_arr(), segmaps_arr_aug)
def test_keypoints(self):
kpsoi = self.keypoints
aug = iaa.Lambda(func_keypoints=self.func_keypoints)
for _ in sm.xrange(3):
observed = aug.augment_keypoints(kpsoi)
expected = self.keypoints_aug
assert_cbaois_equal(observed, expected)
def test_keypoints_deterministic(self):
kpsoi = self.keypoints
aug = iaa.Lambda(func_keypoints=self.func_keypoints)
aug = aug.to_deterministic()
for _ in sm.xrange(3):
observed = aug.augment_keypoints(kpsoi)
expected = self.keypoints_aug
assert_cbaois_equal(observed, expected)
def test_polygons(self):
psois = self.polygons
aug = iaa.Lambda(func_polygons=self.func_polygons)
for _ in sm.xrange(3):
observed = aug.augment_polygons(psois)
expected_psoi = self.polygons_aug
assert_cbaois_equal(observed, expected_psoi)
def test_polygons_deterministic(self):
psois = self.polygons
aug = iaa.Lambda(func_polygons=self.func_polygons)
aug = aug.to_deterministic()
for _ in sm.xrange(3):
observed = aug.augment_polygons(psois)
expected_psoi = self.polygons_aug
assert_cbaois_equal(observed, expected_psoi)
def test_line_strings(self):
lsois = self.lsoi
aug = iaa.Lambda(func_line_strings=self.func_line_strings)
for _ in sm.xrange(3):
observed = aug.augment_line_strings(lsois)
expected_lsoi = self.lsoi_aug
assert_cbaois_equal(observed, expected_lsoi)
def test_line_strings_deterministic(self):
lsois = self.lsoi
aug = iaa.Lambda(func_line_strings=self.func_line_strings)
aug = aug.to_deterministic()
for _ in sm.xrange(3):
observed = aug.augment_line_strings(lsois)
expected_lsoi = self.lsoi_aug
assert_cbaois_equal(observed, expected_lsoi)
def test_bounding_boxes(self):
bbsoi = self.bbsoi
aug = iaa.Lambda(func_bounding_boxes=self.func_bbs)
for _ in sm.xrange(3):
observed = aug.augment_bounding_boxes(bbsoi)
expected = self.bbsoi_aug
assert_cbaois_equal(observed, expected)
def test_bounding_boxes_deterministic(self):
bbsoi = self.bbsoi
aug = iaa.Lambda(func_bounding_boxes=self.func_bbs)
aug = aug.to_deterministic()
for _ in sm.xrange(3):
observed = aug.augment_bounding_boxes(bbsoi)
expected = self.bbsoi_aug
assert_cbaois_equal(observed, expected)
def test_bounding_boxes_x1_x2_coords_can_get_flipped(self):
# Verify that if any augmented BB ends up with x1 > x2 that the
# x-coordinates will be flipped to ensure that x1 is always below x2
bbsoi = ia.BoundingBoxesOnImage([
ia.BoundingBox(x1=0, y1=1, x2=2, y2=3)
], shape=(10, 10, 3))
def _func_bbs(bounding_boxes_on_images, random_state, parents, hooks):
bounding_boxes_on_images[0].bounding_boxes[0].x1 += 10
return bounding_boxes_on_images
aug = iaa.Lambda(func_bounding_boxes=_func_bbs)
for _ in sm.xrange(3):
observed = aug.augment_bounding_boxes(bbsoi)
assert np.allclose(
observed.bounding_boxes[0].coords,
[(2, 1), (0+10, 3)]
)
def test_bounding_boxes_y1_y2_coords_can_get_flipped(self):
# Verify that if any augmented BB ends up with y1 > y2 that the
# x-coordinates will be flipped to ensure that y1 is always below y2
bbsoi = ia.BoundingBoxesOnImage([
ia.BoundingBox(x1=0, y1=1, x2=2, y2=3)
], shape=(10, 10, 3))
def _func_bbs(bounding_boxes_on_images, random_state, parents, hooks):
bounding_boxes_on_images[0].bounding_boxes[0].y1 += 10
return bounding_boxes_on_images
aug = iaa.Lambda(func_bounding_boxes=_func_bbs)
for _ in sm.xrange(3):
observed = aug.augment_bounding_boxes(bbsoi)
assert np.allclose(
observed.bounding_boxes[0].coords,
[(0, 3), (2, 1+10)]
)
def test_keypoints_empty(self):
kpsoi = ia.KeypointsOnImage([], shape=(1, 2, 3))
aug = iaa.Lambda(func_keypoints=self.func_keypoints)
observed = aug.augment_keypoints(kpsoi)
assert_cbaois_equal(observed, kpsoi)
def test_polygons_empty(self):
psoi = ia.PolygonsOnImage([], shape=(1, 2, 3))
aug = iaa.Lambda(func_polygons=self.func_polygons)
observed = aug.augment_polygons(psoi)
assert_cbaois_equal(observed, psoi)
def test_line_strings_empty(self):
lsoi = ia.LineStringsOnImage([], shape=(1, 2, 3))
aug = iaa.Lambda(func_line_strings=self.func_line_strings)
observed = aug.augment_line_strings(lsoi)
assert_cbaois_equal(observed, lsoi)
def test_bounding_boxes_empty(self):
bbsoi = ia.BoundingBoxesOnImage([], shape=(1, 2, 3))
aug = iaa.Lambda(func_bounding_boxes=self.func_bbs)
observed = aug.augment_bounding_boxes(bbsoi)
assert_cbaois_equal(observed, bbsoi)
# TODO add tests when funcs are not set in Lambda
def test_other_dtypes_bool(self):
def func_images(images, random_state, parents, hooks):
aug = iaa.Flipud(1.0) # flipud is know to work with all dtypes
return aug.augment_images(images)
aug = iaa.Lambda(func_images=func_images)
image = np.zeros((3, 3), dtype=bool)
image[0, 0] = True
expected = np.zeros((3, 3), dtype=bool)
expected[2, 0] = True
image_aug = aug.augment_image(image)
assert image_aug.dtype.name == "bool"
assert np.all(image_aug == expected)
def test_other_dtypes_uint_int(self):
def func_images(images, random_state, parents, hooks):
aug = iaa.Flipud(1.0) # flipud is know to work with all dtypes
return aug.augment_images(images)
aug = iaa.Lambda(func_images=func_images)
dtypes = ["uint8", "uint16", "uint32", "uint64",
"int8", "int32", "int64"]
for dtype in dtypes:
with self.subTest(dtype=dtype):
min_value, center_value, max_value = \
iadt.get_value_range_of_dtype(dtype)
value = max_value
image = np.zeros((3, 3), dtype=dtype)
image[0, 0] = value
expected = np.zeros((3, 3), dtype=dtype)
expected[2, 0] = value
image_aug = aug.augment_image(image)
assert image_aug.dtype.name == dtype
assert np.array_equal(image_aug, expected)
def test_other_dtypes_float(self):
def func_images(images, random_state, parents, hooks):
aug = iaa.Flipud(1.0) # flipud is know to work with all dtypes
return aug.augment_images(images)
aug = iaa.Lambda(func_images=func_images)
dtypes = ["float16", "float32", "float64", "float128"]
values = [5000, 1000 ** 2, 1000 ** 3, 1000 ** 4]
for dtype, value in zip(dtypes, values):
with self.subTest(dtype=dtype):
image = np.zeros((3, 3), dtype=dtype)
image[0, 0] = value
expected = np.zeros((3, 3), dtype=dtype)
expected[2, 0] = value
image_aug = aug.augment_image(image)
assert image_aug.dtype.name == dtype
assert np.all(image_aug == expected)
def test_pickleable(self):
aug = iaa.Lambda(
func_images=_lambda_pickleable_callback_images,
seed=1)
runtest_pickleable_uint8_img(aug)
def _lambda_pickleable_callback_images(images, random_state, parents, hooks):
aug = iaa.Flipud(0.5, seed=random_state)
return aug.augment_images(images)
class TestAssertLambda(unittest.TestCase):
DTYPES_UINT = ["uint8", "uint16", "uint32", "uint64"]
DTYPES_INT = ["int8", "int32", "int64"]
DTYPES_FLOAT = ["float16", "float32", "float64", "float128"]
def setUp(self):
reseed()
@property
def image(self):
base_img = np.array([[0, 0, 1],
[0, 0, 1],
[0, 1, 1]], dtype=np.uint8)
return np.atleast_3d(base_img)
@property
def images(self):
return np.array([self.image])
@property
def heatmaps(self):
heatmaps_arr = np.float32([[0.0, 0.0, 1.0],
[0.0, 0.0, 1.0],
[0.0, 1.0, 1.0]])
return ia.HeatmapsOnImage(heatmaps_arr, shape=(3, 3, 3))
@property
def segmaps(self):
segmaps_arr = np.int32([[0, 0, 1],
[0, 0, 1],
[0, 1, 1]])
return SegmentationMapsOnImage(segmaps_arr, shape=(3, 3, 3))
@property
def kpsoi(self):
kps = [ia.Keypoint(x=0, y=0), ia.Keypoint(x=1, y=1),
ia.Keypoint(x=2, y=2)]
return ia.KeypointsOnImage(kps, shape=self.image.shape)
@property
def psoi(self):
polygons = [ia.Polygon([(0, 0), (2, 0), (2, 2), (0, 2)])]
return ia.PolygonsOnImage(polygons, shape=self.image.shape)
@property
def lsoi(self):
lss = [ia.LineString([(0, 0), (2, 0), (2, 2), (0, 2)])]
return ia.LineStringsOnImage(lss, shape=self.image.shape)
@property
def bbsoi(self):
bb = ia.BoundingBox(x1=0, y1=0, x2=2, y2=2)
return ia.BoundingBoxesOnImage([bb], shape=self.image.shape)
@property
def aug_succeeds(self):
def _func_images_succeeds(images, random_state, parents, hooks):
return images[0][0, 0] == 0 and images[0][2, 2] == 1
def _func_heatmaps_succeeds(heatmaps, random_state, parents, hooks):
return heatmaps[0].arr_0to1[0, 0] < 0 + 1e-6
def _func_segmaps_succeeds(segmaps, random_state, parents, hooks):
return segmaps[0].arr[0, 0] == 0
def _func_keypoints_succeeds(keypoints_on_images, random_state, parents,
hooks):
return (
keypoints_on_images[0].keypoints[0].x == 0
and keypoints_on_images[0].keypoints[2].x == 2
)
def _func_bounding_boxes_succeeds(bounding_boxes_on_images,
random_state, parents, hooks):
return (bounding_boxes_on_images[0].items[0].x1 == 0
and bounding_boxes_on_images[0].items[0].x2 == 2)
def _func_polygons_succeeds(polygons_on_images, random_state, parents,
hooks):
return (polygons_on_images[0].polygons[0].exterior[0][0] == 0
and polygons_on_images[0].polygons[0].exterior[2][1] == 2)
def _func_line_strings_succeeds(line_strings_on_image, random_state,
parents, hooks):
return (line_strings_on_image[0].items[0].coords[0][0] == 0
and line_strings_on_image[0].items[0].coords[2][1] == 2)
return iaa.AssertLambda(
func_images=_func_images_succeeds,
func_heatmaps=_func_heatmaps_succeeds,
func_segmentation_maps=_func_segmaps_succeeds,
func_keypoints=_func_keypoints_succeeds,
func_bounding_boxes=_func_bounding_boxes_succeeds,
func_polygons=_func_polygons_succeeds,
func_line_strings=_func_line_strings_succeeds)
@property
def aug_fails(self):
def _func_images_fails(images, random_state, parents, hooks):
return images[0][0, 0] == 1
def _func_heatmaps_fails(heatmaps, random_state, parents, hooks):
return heatmaps[0].arr_0to1[0, 0] > 0 + 1e-6
def _func_segmaps_fails(segmaps, random_state, parents, hooks):
return segmaps[0].arr[0, 0] == 1
def _func_keypoints_fails(keypoints_on_images, random_state, parents,
hooks):
return keypoints_on_images[0].keypoints[0].x == 2
def _func_bounding_boxes_fails(bounding_boxes_on_images, random_state,
parents, hooks):
return bounding_boxes_on_images[0].items[0].x1 == 2
def _func_polygons_fails(polygons_on_images, random_state, parents,
hooks):
return polygons_on_images[0].polygons[0].exterior[0][0] == 2
def _func_line_strings_fails(line_strings_on_images, random_state,
parents, hooks):
return line_strings_on_images[0].items[0].coords[0][0] == 2
return iaa.AssertLambda(
func_images=_func_images_fails,
func_heatmaps=_func_heatmaps_fails,
func_segmentation_maps=_func_segmaps_fails,
func_keypoints=_func_keypoints_fails,
func_bounding_boxes=_func_bounding_boxes_fails,
func_polygons=_func_polygons_fails,
func_line_strings=_func_line_strings_fails)
def test_images_as_array_with_assert_that_succeeds(self):
observed = self.aug_succeeds.augment_images(self.images)
expected = self.images
assert np.array_equal(observed, expected)
def test_images_as_array_with_assert_that_fails(self):
with self.assertRaises(AssertionError):
_ = self.aug_fails.augment_images(self.images)
def test_images_as_array_with_assert_that_succeeds__deterministic(self):
aug_succeeds_det = self.aug_succeeds.to_deterministic()
observed = aug_succeeds_det.augment_images(self.images)
expected = self.images
assert np.array_equal(observed, expected)
def test_images_as_array_with_assert_that_fails__deterministic(self):
with self.assertRaises(AssertionError):
_ = self.aug_fails.augment_images(self.images)
def test_images_as_list_with_assert_that_succeeds(self):
observed = self.aug_succeeds.augment_images([self.images[0]])
expected = [self.images[0]]
assert array_equal_lists(observed, expected)
def test_images_as_list_with_assert_that_fails(self):
with self.assertRaises(AssertionError):
_ = self.aug_fails.augment_images([self.images[0]])
def test_images_as_list_with_assert_that_succeeds__deterministic(self):
aug_succeeds_det = self.aug_succeeds.to_deterministic()
observed = aug_succeeds_det.augment_images([self.images[0]])
expected = [self.images[0]]
assert array_equal_lists(observed, expected)
def test_images_as_list_with_assert_that_fails__deterministic(self):
with self.assertRaises(AssertionError):
_ = self.aug_fails.augment_images([self.images[0]])
def test_heatmaps_with_assert_that_succeeds(self):
observed = self.aug_succeeds.augment_heatmaps(self.heatmaps)
assert observed.shape == (3, 3, 3)
assert 0 - 1e-6 < observed.min_value < 0 + 1e-6
assert 1 - 1e-6 < observed.max_value < 1 + 1e-6
assert np.allclose(observed.get_arr(), self.heatmaps.get_arr())
def test_heatmaps_with_assert_that_fails(self):
with self.assertRaises(AssertionError):
_ = self.aug_fails.augment_heatmaps(self.heatmaps)
def test_heatmaps_with_assert_that_succeeds__deterministic(self):
aug_succeeds_det = self.aug_succeeds.to_deterministic()
observed = aug_succeeds_det.augment_heatmaps(self.heatmaps)
assert observed.shape == (3, 3, 3)
assert 0 - 1e-6 < observed.min_value < 0 + 1e-6
assert 1 - 1e-6 < observed.max_value < 1 + 1e-6
assert np.allclose(observed.get_arr(), self.heatmaps.get_arr())
def test_heatmaps_with_assert_that_fails__deterministic(self):
with self.assertRaises(AssertionError):
_ = self.aug_fails.augment_heatmaps(self.heatmaps)
def test_segmaps_with_assert_that_succeeds(self):
observed = self.aug_succeeds.augment_segmentation_maps(self.segmaps)
assert observed.shape == (3, 3, 3)
assert np.array_equal(observed.get_arr(), self.segmaps.get_arr())
def test_segmaps_with_assert_that_fails(self):
with self.assertRaises(AssertionError):
_ = self.aug_fails.augment_segmentation_maps(self.segmaps)
def test_segmaps_with_assert_that_succeeds__deterministic(self):
aug_succeeds_det = self.aug_succeeds.to_deterministic()
observed = aug_succeeds_det.augment_segmentation_maps(self.segmaps)
assert observed.shape == (3, 3, 3)
assert np.array_equal(observed.get_arr(), self.segmaps.get_arr())
def test_segmaps_with_assert_that_fails__deterministic(self):
with self.assertRaises(AssertionError):
_ = self.aug_fails.augment_segmentation_maps(self.segmaps)
def test_keypoints_with_assert_that_succeeds(self):
observed = self.aug_succeeds.augment_keypoints(self.kpsoi)
assert_cbaois_equal(observed, self.kpsoi)
def test_keypoints_with_assert_that_fails(self):
with self.assertRaises(AssertionError):
_ = self.aug_fails.augment_keypoints(self.kpsoi)
def test_keypoints_with_assert_that_succeeds__deterministic(self):
aug_succeeds_det = self.aug_succeeds.to_deterministic()
observed = aug_succeeds_det.augment_keypoints(self.kpsoi)
assert_cbaois_equal(observed, self.kpsoi)
def test_keypoints_with_assert_that_fails__deterministic(self):
with self.assertRaises(AssertionError):
_ = self.aug_fails.augment_keypoints(self.kpsoi)
def test_polygons_with_assert_that_succeeds(self):
observed = self.aug_succeeds.augment_polygons(self.psoi)
assert_cbaois_equal(observed, self.psoi)
def test_polygons_with_assert_that_fails(self):
with self.assertRaises(AssertionError):
_ = self.aug_fails.augment_polygons(self.psoi)
def test_polygons_with_assert_that_succeeds__deterministic(self):
aug_succeeds_det = self.aug_succeeds.to_deterministic()
observed = aug_succeeds_det.augment_polygons(self.psoi)
assert_cbaois_equal(observed, self.psoi)
def test_polygons_with_assert_that_fails__deterministic(self):
with self.assertRaises(AssertionError):
_ = self.aug_fails.augment_polygons(self.psoi)
def test_line_strings_with_assert_that_succeeds(self):
observed = self.aug_succeeds.augment_line_strings(self.lsoi)
assert_cbaois_equal(observed, self.lsoi)
def test_line_strings_with_assert_that_fails(self):
with self.assertRaises(AssertionError):
_ = self.aug_fails.augment_line_strings(self.lsoi)
def test_line_strings_with_assert_that_succeeds__deterministic(self):
aug_succeeds_det = self.aug_succeeds.to_deterministic()
observed = aug_succeeds_det.augment_line_strings(self.lsoi)
assert_cbaois_equal(observed, self.lsoi)
def test_line_strings_with_assert_that_fails__deterministic(self):
with self.assertRaises(AssertionError):
_ = self.aug_fails.augment_line_strings(self.lsoi)
def test_bounding_boxes_with_assert_that_succeeds(self):
observed = self.aug_succeeds.augment_bounding_boxes(self.bbsoi)
assert_cbaois_equal(observed, self.bbsoi)
def test_bounding_boxes_with_assert_that_fails(self):
with self.assertRaises(AssertionError):
_ = self.aug_fails.augment_bounding_boxes(self.bbsoi)
def test_bounding_boxes_with_assert_that_succeeds__deterministic(self):
aug_succeeds_det = self.aug_succeeds.to_deterministic()
observed = aug_succeeds_det.augment_bounding_boxes(self.bbsoi)
assert_cbaois_equal(observed, self.bbsoi)
def test_bounding_boxes_with_assert_that_fails__deterministic(self):
with self.assertRaises(AssertionError):
_ = self.aug_fails.augment_bounding_boxes(self.bbsoi)
def test_other_dtypes_bool__with_assert_that_succeeds(self):
def func_images_succeeds(images, random_state, parents, hooks):
return np.allclose(images[0][0, 0], 1, rtol=0, atol=1e-6)
aug = iaa.AssertLambda(func_images=func_images_succeeds)
image = np.zeros((3, 3), dtype=bool)
image[0, 0] = True
image_aug = aug.augment_image(image)
assert image_aug.dtype.name == image.dtype.name
assert np.all(image_aug == image)
def test_other_dtypes_uint_int__with_assert_that_succeeds(self):
def func_images_succeeds(images, random_state, parents, hooks):
return np.allclose(images[0][0, 0], 1, rtol=0, atol=1e-6)
aug = iaa.AssertLambda(func_images=func_images_succeeds)
dtypes = self.DTYPES_UINT + self.DTYPES_INT
for dtype in dtypes:
with self.subTest(dtype=dtype):
image = np.zeros((3, 3), dtype=dtype)
image[0, 0] = 1
image_aug = aug.augment_image(image)
assert image_aug.dtype.name == dtype
assert np.array_equal(image_aug, image)
def test_other_dtypes_float__with_assert_that_succeeds(self):
def func_images_succeeds(images, random_state, parents, hooks):
return np.allclose(images[0][0, 0], 1, rtol=0, atol=1e-6)
aug = iaa.AssertLambda(func_images=func_images_succeeds)
dtypes = self.DTYPES_FLOAT
for dtype in dtypes:
with self.subTest(dtype=dtype):
image = np.zeros((3, 3), dtype=dtype)
image[0, 0] = 1
image_aug = aug.augment_image(image)
assert image_aug.dtype.name == dtype
assert np.all(image_aug == image)
def test_other_dtypes_bool__with_assert_that_fails(self):
def func_images_fails(images, random_state, parents, hooks):
return np.allclose(images[0][0, 1], 1, rtol=0, atol=1e-6)
aug = iaa.AssertLambda(func_images=func_images_fails)
image = np.zeros((3, 3), dtype=bool)
image[0, 0] = True
with self.assertRaises(AssertionError):
_ = aug.augment_image(image)
def test_other_dtypes_uint_int__with_assert_that_fails(self):
def func_images_fails(images, random_state, parents, hooks):
return np.allclose(images[0][0, 1], 1, rtol=0, atol=1e-6)
aug = iaa.AssertLambda(func_images=func_images_fails)
dtypes = self.DTYPES_UINT + self.DTYPES_INT
for dtype in dtypes:
with self.subTest(dtype=dtype):
image = np.zeros((3, 3), dtype=dtype)
image[0, 0] = 1
with self.assertRaises(AssertionError):
_ = aug.augment_image(image)
def test_other_dtypes_float__with_assert_that_fails(self):
def func_images_fails(images, random_state, parents, hooks):
return np.allclose(images[0][0, 1], 1, rtol=0, atol=1e-6)
aug = iaa.AssertLambda(func_images=func_images_fails)
dtypes = self.DTYPES_FLOAT
for dtype in dtypes:
with self.subTest(dtype=dtype):
image = np.zeros((3, 3), dtype=dtype)
image[0, 0] = 1
with self.assertRaises(AssertionError):
_ = aug.augment_image(image)
def test_pickleable(self):
aug = iaa.AssertLambda(
func_images=_assertlambda_pickleable_callback_images,
seed=1)
runtest_pickleable_uint8_img(aug, iterations=2)
# in py3+, this could be a classmethod of TestAssertLambda,
# but in py2.7 such classmethods are not pickle-able and would cause an error
def _assertlambda_pickleable_callback_images(images, random_state,
parents, hooks):
return np.any(images[0] > 0)
class TestAssertShape(unittest.TestCase):
DTYPES_UINT = ["uint8", "uint16", "uint32", "uint64"]
DTYPES_INT = ["int8", "int32", "int64"]
DTYPES_FLOAT = ["float16", "float32", "float64", "float128"]
def setUp(self):
reseed()
@property
def image(self):
base_img = np.array([[0, 0, 1, 0],
[0, 0, 1, 0],
[0, 1, 1, 0]], dtype=np.uint8)
return np.atleast_3d(base_img)
@property
def images(self):
return np.array([self.image])
@property
def heatmaps(self):
heatmaps_arr = np.float32([[0.0, 0.0, 1.0, 0.0],
[0.0, 0.0, 1.0, 0.0],
[0.0, 1.0, 1.0, 0.0]])
return ia.HeatmapsOnImage(heatmaps_arr, shape=(3, 4, 3))
@property
def segmaps(self):
segmaps_arr = np.int32([[0, 0, 1, 0],
[0, 0, 1, 0],
[0, 1, 1, 0]])
return SegmentationMapsOnImage(segmaps_arr, shape=(3, 4, 3))
@property
def kpsoi(self):
kps = [ia.Keypoint(x=0, y=0), ia.Keypoint(x=1, y=1),
ia.Keypoint(x=2, y=2)]
return ia.KeypointsOnImage(kps, shape=self.image.shape)
@property
def psoi(self):
polygons = [ia.Polygon([(0, 0), (2, 0), (2, 2), (0, 2)])]
return ia.PolygonsOnImage(polygons, shape=self.image.shape)
@property
def lsoi(self):
lss = [ia.LineString([(0, 0), (2, 0), (2, 2), (0, 2)])]
return ia.LineStringsOnImage(lss, shape=self.image.shape)
@property
def bbsoi(self):
bb = ia.BoundingBox(x1=0, y1=0, x2=2, y2=2)
return ia.BoundingBoxesOnImage([bb], shape=self.image.shape)
@property
def image_h4(self):
base_img_h4 = np.array([[0, 0, 1, 0],
[0, 0, 1, 0],
[0, 1, 1, 0],
[1, 0, 1, 0]], dtype=np.uint8)
return np.atleast_3d(base_img_h4)
@property
def images_h4(self):
return np.array([self.image_h4])
@property
def heatmaps_h4(self):
heatmaps_arr_h4 = np.float32([[0.0, 0.0, 1.0, 0.0],
[0.0, 0.0, 1.0, 0.0],
[0.0, 1.0, 1.0, 0.0],
[1.0, 0.0, 1.0, 0.0]])
return ia.HeatmapsOnImage(heatmaps_arr_h4, shape=(4, 4, 3))
@property
def segmaps_h4(self):
segmaps_arr_h4 = np.int32([[0, 0, 1, 0],
[0, 0, 1, 0],
[0, 1, 1, 0],
[1, 0, 1, 0]])
return SegmentationMapsOnImage(segmaps_arr_h4, shape=(4, 4, 3))
@property
def kpsoi_h4(self):
kps = [ia.Keypoint(x=0, y=0), ia.Keypoint(x=1, y=1),
ia.Keypoint(x=2, y=2)]
return ia.KeypointsOnImage(kps, shape=self.image_h4.shape)
@property
def psoi_h4(self):
polygons = [ia.Polygon([(0, 0), (2, 0), (2, 2), (0, 2)])]
return ia.PolygonsOnImage(polygons, shape=self.image_h4.shape)
@property
def lsoi_h4(self):
lss = [ia.LineString([(0, 0), (2, 0), (2, 2), (0, 2)])]
return ia.LineStringsOnImage(lss, shape=self.image_h4.shape)
@property
def bbsoi_h4(self):
bb = ia.BoundingBox(x1=0, y1=0, x2=2, y2=2)
return ia.BoundingBoxesOnImage([bb], shape=self.image_h4.shape)
@property
def aug_exact_shape(self):
return iaa.AssertShape((1, 3, 4, 1))
@property
def aug_none_in_shape(self):
return iaa.AssertShape((None, 3, 4, 1))
@property
def aug_list_in_shape(self):
return iaa.AssertShape((1, [1, 3, 5], 4, 1))
@property
def aug_tuple_in_shape(self):
return iaa.AssertShape((1, (1, 4), 4, 1))
def test_images_with_exact_shape__succeeds(self):
aug = self.aug_exact_shape
observed = aug.augment_images(self.images)
expected = self.images
assert np.array_equal(observed, expected)
def test_images_with_exact_shape__succeeds__deterministic(self):
aug_det = self.aug_exact_shape.to_deterministic()
observed = aug_det.augment_images(self.images)
expected = self.images
assert np.array_equal(observed, expected)
def test_images_with_exact_shape__succeeds__list(self):
aug = self.aug_exact_shape
observed = aug.augment_images([self.images[0]])
expected = [self.images[0]]
assert array_equal_lists(observed, expected)
def test_images_with_exact_shape__succeeds__deterministic__list(self):
aug_det = self.aug_exact_shape.to_deterministic()
observed = aug_det.augment_images([self.images[0]])
expected = [self.images[0]]
assert array_equal_lists(observed, expected)
def test_heatmaps_with_exact_shape__succeeds(self):
aug = self.aug_exact_shape
observed = aug.augment_heatmaps(self.heatmaps)
assert observed.shape == (3, 4, 3)
assert 0 - 1e-6 < observed.min_value < 0 + 1e-6
assert 1 - 1e-6 < observed.max_value < 1 + 1e-6
assert np.allclose(observed.get_arr(), self.heatmaps.get_arr())
def test_heatmaps_with_exact_shape__succeeds__deterministic(self):
aug_det = self.aug_exact_shape.to_deterministic()
observed = aug_det.augment_heatmaps(self.heatmaps)
assert observed.shape == (3, 4, 3)
assert 0 - 1e-6 < observed.min_value < 0 + 1e-6
assert 1 - 1e-6 < observed.max_value < 1 + 1e-6
assert np.allclose(observed.get_arr(), self.heatmaps.get_arr())
def test_segmaps_with_exact_shape__succeeds(self):
aug = self.aug_exact_shape
observed = aug.augment_segmentation_maps(self.segmaps)
assert observed.shape == (3, 4, 3)
assert np.array_equal(observed.get_arr(), self.segmaps.get_arr())
def test_segmaps_with_exact_shape__succeeds__deterministic(self):
aug_det = self.aug_exact_shape.to_deterministic()
observed = aug_det.augment_segmentation_maps(self.segmaps)
assert observed.shape == (3, 4, 3)
assert np.array_equal(observed.get_arr(), self.segmaps.get_arr())
def test_keypoints_with_exact_shape__succeeds(self):
aug = self.aug_exact_shape
observed = aug.augment_keypoints(self.kpsoi)
assert_cbaois_equal(observed, self.kpsoi)
def test_keypoints_with_exact_shape__succeeds__deterministic(self):
aug_det = self.aug_exact_shape.to_deterministic()
observed = aug_det.augment_keypoints(self.kpsoi)
assert_cbaois_equal(observed, self.kpsoi)
def test_polygons_with_exact_shape__succeeds(self):
aug = self.aug_exact_shape
observed = aug.augment_polygons(self.psoi)
assert_cbaois_equal(observed, self.psoi)
def test_polygons_with_exact_shape__succeeds__deterministic(self):
aug_det = self.aug_exact_shape.to_deterministic()
observed = aug_det.augment_polygons(self.psoi)
assert_cbaois_equal(observed, self.psoi)
def test_line_strings_with_exact_shape__succeeds(self):
aug = self.aug_exact_shape
observed = aug.augment_line_strings(self.lsoi)
assert_cbaois_equal(observed, self.lsoi)
def test_line_strings_with_exact_shape__succeeds__deterministic(self):
aug_det = self.aug_exact_shape.to_deterministic()
observed = aug_det.augment_line_strings(self.lsoi)
assert_cbaois_equal(observed, self.lsoi)
def test_bounding_boxes_with_exact_shape__succeeds(self):
aug = self.aug_exact_shape
observed = aug.augment_bounding_boxes(self.bbsoi)
assert_cbaois_equal(observed, self.bbsoi)
def test_bounding_boxes_with_exact_shape__succeeds__deterministic(self):
aug_det = self.aug_exact_shape.to_deterministic()
observed = aug_det.augment_bounding_boxes(self.bbsoi)
assert_cbaois_equal(observed, self.bbsoi)
def test_images_with_exact_shape__fails(self):
aug = self.aug_exact_shape
with self.assertRaises(AssertionError):
_ = aug.augment_images(self.images_h4)
def test_heatmaps_with_exact_shape__fails(self):
aug = self.aug_exact_shape
with self.assertRaises(AssertionError):
_ = aug.augment_heatmaps(self.heatmaps_h4)
def test_keypoints_with_exact_shape__fails(self):
aug = self.aug_exact_shape
with self.assertRaises(AssertionError):
_ = aug.augment_keypoints(self.kpsoi_h4)
def test_polygons_with_exact_shape__fails(self):
aug = self.aug_exact_shape
with self.assertRaises(AssertionError):
_ = aug.augment_polygons(self.psoi_h4)
def test_line_strings_with_exact_shape__fails(self):
aug = self.aug_exact_shape
with self.assertRaises(AssertionError):
_ = aug.augment_line_strings(self.lsoi_h4)
def test_bounding_boxes_with_exact_shape__fails(self):
aug = self.aug_exact_shape
with self.assertRaises(AssertionError):
_ = aug.augment_bounding_boxes(self.bbsoi_h4)
def test_images_with_none_in_shape__succeeds(self):
aug = self.aug_none_in_shape
observed = aug.augment_images(self.images)
expected = self.images
assert np.array_equal(observed, expected)
def test_images_with_none_in_shape__succeeds__deterministic(self):
aug_det = self.aug_none_in_shape.to_deterministic()
observed = aug_det.augment_images(self.images)
expected = self.images
assert np.array_equal(observed, expected)
def test_heatmaps_with_none_in_shape__succeeds(self):
aug = self.aug_none_in_shape
observed = aug.augment_heatmaps(self.heatmaps)
assert observed.shape == (3, 4, 3)
assert 0 - 1e-6 < observed.min_value < 0 + 1e-6
assert 1 - 1e-6 < observed.max_value < 1 + 1e-6
assert np.allclose(observed.get_arr(), self.heatmaps.get_arr())
def test_heatmaps_with_none_in_shape__succeeds__deterministic(self):
aug_det = self.aug_none_in_shape.to_deterministic()
observed = aug_det.augment_heatmaps(self.heatmaps)
assert observed.shape == (3, 4, 3)
assert 0 - 1e-6 < observed.min_value < 0 + 1e-6
assert 1 - 1e-6 < observed.max_value < 1 + 1e-6
assert np.allclose(observed.get_arr(), self.heatmaps.get_arr())
def test_segmaps_with_none_in_shape__succeeds(self):
aug = self.aug_none_in_shape
observed = aug.augment_segmentation_maps(self.segmaps)
assert observed.shape == (3, 4, 3)
assert np.array_equal(observed.get_arr(), self.heatmaps.get_arr())
def test_segmaps_with_none_in_shape__succeeds__deterministic(self):
aug_det = self.aug_none_in_shape.to_deterministic()
observed = aug_det.augment_segmentation_maps(self.segmaps)
assert observed.shape == (3, 4, 3)
assert np.array_equal(observed.get_arr(), self.segmaps.get_arr())
def test_keypoints_with_none_in_shape__succeeds(self):
aug = self.aug_none_in_shape
observed = aug.augment_keypoints(self.kpsoi)
assert_cbaois_equal(observed, self.kpsoi)
def test_keypoints_with_none_in_shape__succeeds__deterministic(self):
aug_det = self.aug_none_in_shape.to_deterministic()
observed = aug_det.augment_keypoints(self.kpsoi)
assert_cbaois_equal(observed, self.kpsoi)
def test_polygons_with_none_in_shape__succeeds(self):
aug = self.aug_none_in_shape
observed = aug.augment_polygons(self.psoi)
assert_cbaois_equal(observed, self.psoi)
def test_polygons_with_none_in_shape__succeeds__deterministic(self):
aug_det = self.aug_none_in_shape.to_deterministic()
observed = aug_det.augment_polygons(self.psoi)
assert_cbaois_equal(observed, self.psoi)
def test_line_strings_with_none_in_shape__succeeds(self):
aug = self.aug_none_in_shape
observed = aug.augment_line_strings(self.lsoi)
assert_cbaois_equal(observed, self.lsoi)
def test_line_strings_with_none_in_shape__succeeds__deterministic(self):
aug_det = self.aug_none_in_shape.to_deterministic()
observed = aug_det.augment_line_strings(self.lsoi)
assert_cbaois_equal(observed, self.lsoi)
def test_bounding_boxes_with_none_in_shape__succeeds(self):
aug = self.aug_none_in_shape
observed = aug.augment_bounding_boxes(self.bbsoi)
assert_cbaois_equal(observed, self.bbsoi)
def test_bounding_boxes_with_none_in_shape__succeeds__deterministic(self):
aug_det = self.aug_none_in_shape.to_deterministic()
observed = aug_det.augment_bounding_boxes(self.bbsoi)
assert_cbaois_equal(observed, self.bbsoi)
def test_images_with_none_in_shape__fails(self):
aug = self.aug_none_in_shape
with self.assertRaises(AssertionError):
_ = aug.augment_images(self.images_h4)
def test_heatmaps_with_none_in_shape__fails(self):
aug = self.aug_none_in_shape
with self.assertRaises(AssertionError):
_ = aug.augment_heatmaps(self.heatmaps_h4)
def test_keypoints_with_none_in_shape__fails(self):
aug = self.aug_none_in_shape
with self.assertRaises(AssertionError):
_ = aug.augment_keypoints(self.kpsoi_h4)
def test_polygons_with_none_in_shape__fails(self):
aug = self.aug_none_in_shape
with self.assertRaises(AssertionError):
_ = aug.augment_polygons(self.psoi_h4)
def test_line_strings_with_none_in_shape__fails(self):
aug = self.aug_none_in_shape
with self.assertRaises(AssertionError):
_ = aug.augment_line_strings(self.lsoi_h4)
def test_bounding_boxes_with_none_in_shape__fails(self):
aug = self.aug_none_in_shape
with self.assertRaises(AssertionError):
_ = aug.augment_bounding_boxes(self.bbsoi_h4)
def test_images_with_list_in_shape__succeeds(self):
aug = self.aug_list_in_shape
observed = aug.augment_images(self.images)
expected = self.images
assert np.array_equal(observed, expected)
def test_images_with_list_in_shape__succeeds__deterministic(self):
aug_det = self.aug_list_in_shape.to_deterministic()
observed = aug_det.augment_images(self.images)
expected = self.images
assert np.array_equal(observed, expected)
def test_heatmaps_with_list_in_shape__succeeds(self):
aug = self.aug_list_in_shape
observed = aug.augment_heatmaps(self.heatmaps)
assert observed.shape == (3, 4, 3)
assert 0 - 1e-6 < observed.min_value < 0 + 1e-6
assert 1 - 1e-6 < observed.max_value < 1 + 1e-6
assert np.allclose(observed.get_arr(), self.heatmaps.get_arr())
def test_heatmaps_with_list_in_shape__succeeds__deterministic(self):
aug_det = self.aug_list_in_shape.to_deterministic()
observed = aug_det.augment_heatmaps(self.heatmaps)
assert observed.shape == (3, 4, 3)
assert 0 - 1e-6 < observed.min_value < 0 + 1e-6
assert 1 - 1e-6 < observed.max_value < 1 + 1e-6
assert np.allclose(observed.get_arr(), self.heatmaps.get_arr())
def test_segmaps_with_list_in_shape__succeeds(self):
aug = self.aug_list_in_shape
observed = aug.augment_segmentation_maps(self.segmaps)
assert observed.shape == (3, 4, 3)
assert np.array_equal(observed.get_arr(), self.segmaps.get_arr())
def test_segmaps_with_list_in_shape__succeeds__deterministic(self):
aug_det = self.aug_list_in_shape.to_deterministic()
observed = aug_det.augment_segmentation_maps(self.segmaps)
assert observed.shape == (3, 4, 3)
assert np.array_equal(observed.get_arr(), self.segmaps.get_arr())
def test_keypoints_with_list_in_shape__succeeds(self):
aug = self.aug_list_in_shape
observed = aug.augment_keypoints(self.kpsoi)
assert_cbaois_equal(observed, self.kpsoi)
def test_keypoints_with_list_in_shape__succeeds__deterministic(self):
aug_det = self.aug_list_in_shape.to_deterministic()
observed = aug_det.augment_keypoints(self.kpsoi)
assert_cbaois_equal(observed, self.kpsoi)
def test_polygons_with_list_in_shape__succeeds(self):
aug = self.aug_list_in_shape
observed = aug.augment_polygons(self.psoi)
assert_cbaois_equal(observed, self.psoi)
def test_polygons_with_list_in_shape__succeeds__deterministic(self):
aug_det = self.aug_list_in_shape.to_deterministic()
observed = aug_det.augment_polygons(self.psoi)
assert_cbaois_equal(observed, self.psoi)
def test_line_strings_with_list_in_shape__succeeds(self):
aug = self.aug_list_in_shape
observed = aug.augment_line_strings(self.lsoi)
assert_cbaois_equal(observed, self.lsoi)
def test_line_strings_with_list_in_shape__succeeds__deterministic(self):
aug_det = self.aug_list_in_shape.to_deterministic()
observed = aug_det.augment_line_strings(self.lsoi)
assert_cbaois_equal(observed, self.lsoi)
def test_bounding_boxes_with_list_in_shape__succeeds(self):
aug = self.aug_list_in_shape
observed = aug.augment_bounding_boxes(self.bbsoi)
assert_cbaois_equal(observed, self.bbsoi)
def test_bounding_boxes_with_list_in_shape__succeeds__deterministic(self):
aug_det = self.aug_list_in_shape.to_deterministic()
observed = aug_det.augment_bounding_boxes(self.bbsoi)
assert_cbaois_equal(observed, self.bbsoi)
def test_images_with_list_in_shape__fails(self):
aug = self.aug_list_in_shape
with self.assertRaises(AssertionError):
_ = aug.augment_images(self.images_h4)
def test_heatmaps_with_list_in_shape__fails(self):
aug = self.aug_list_in_shape
with self.assertRaises(AssertionError):
_ = aug.augment_heatmaps(self.heatmaps_h4)
def test_segmaps_with_list_in_shape__fails(self):
aug = self.aug_list_in_shape
with self.assertRaises(AssertionError):
_ = aug.augment_segmentation_maps(self.segmaps_h4)
def test_keypoints_with_list_in_shape__fails(self):
aug = self.aug_list_in_shape
with self.assertRaises(AssertionError):
_ = aug.augment_keypoints(self.kpsoi_h4)
def test_polygons_with_list_in_shape__fails(self):
aug = self.aug_list_in_shape
with self.assertRaises(AssertionError):
_ = aug.augment_polygons(self.psoi_h4)
def test_line_strings_with_list_in_shape__fails(self):
aug = self.aug_list_in_shape
with self.assertRaises(AssertionError):
_ = aug.augment_line_strings(self.lsoi_h4)
def test_bounding_boxes_with_list_in_shape__fails(self):
aug = self.aug_list_in_shape
with self.assertRaises(AssertionError):
_ = aug.augment_bounding_boxes(self.bbsoi_h4)
def test_images_with_tuple_in_shape__succeeds(self):
aug = self.aug_tuple_in_shape
observed = aug.augment_images(self.images)
expected = self.images
assert np.array_equal(observed, expected)
def test_images_with_tuple_in_shape__succeeds__deterministic(self):
aug_det = self.aug_tuple_in_shape.to_deterministic()
observed = aug_det.augment_images(self.images)
expected = self.images
assert np.array_equal(observed, expected)
def test_heatmaps_with_tuple_in_shape__succeeds(self):
aug = self.aug_tuple_in_shape
observed = aug.augment_heatmaps(self.heatmaps)
assert observed.shape == (3, 4, 3)
assert 0 - 1e-6 < observed.min_value < 0 + 1e-6
assert 1 - 1e-6 < observed.max_value < 1 + 1e-6
assert np.allclose(observed.get_arr(), self.heatmaps.get_arr())
def test_heatmaps_with_tuple_in_shape__succeeds__deterministic(self):
aug_det = self.aug_tuple_in_shape.to_deterministic()
observed = aug_det.augment_heatmaps(self.heatmaps)
assert observed.shape == (3, 4, 3)
assert 0 - 1e-6 < observed.min_value < 0 + 1e-6
assert 1 - 1e-6 < observed.max_value < 1 + 1e-6
assert np.allclose(observed.get_arr(), self.heatmaps.get_arr())
def test_segmaps_with_tuple_in_shape__succeeds(self):
aug = self.aug_tuple_in_shape
observed = aug.augment_segmentation_maps(self.segmaps)
assert observed.shape == (3, 4, 3)
assert np.array_equal(observed.get_arr(), self.heatmaps.get_arr())
def test_segmaps_with_tuple_in_shape__succeeds__deterministic(self):
aug_det = self.aug_tuple_in_shape.to_deterministic()
observed = aug_det.augment_segmentation_maps(self.segmaps)
assert observed.shape == (3, 4, 3)
assert np.array_equal(observed.get_arr(), self.heatmaps.get_arr())
def test_keypoints_with_tuple_in_shape__succeeds(self):
aug = self.aug_tuple_in_shape
observed = aug.augment_keypoints(self.kpsoi)
assert_cbaois_equal(observed, self.kpsoi)
def test_keypoints_with_tuple_in_shape__succeeds__deterministic(self):
aug_det = self.aug_tuple_in_shape.to_deterministic()
observed = aug_det.augment_keypoints(self.kpsoi)
assert_cbaois_equal(observed, self.kpsoi)
def test_polygons_with_tuple_in_shape__succeeds(self):
aug = self.aug_tuple_in_shape
observed = aug.augment_polygons(self.psoi)
assert_cbaois_equal(observed, self.psoi)
def test_polygons_with_tuple_in_shape__succeeds__deterministic(self):
aug_det = self.aug_tuple_in_shape.to_deterministic()
observed = aug_det.augment_polygons(self.psoi)
assert_cbaois_equal(observed, self.psoi)
def test_line_strings_with_tuple_in_shape__succeeds(self):
aug = self.aug_tuple_in_shape
observed = aug.augment_line_strings(self.lsoi)
assert_cbaois_equal(observed, self.lsoi)
def test_line_strings_with_tuple_in_shape__succeeds__deterministic(self):
aug_det = self.aug_tuple_in_shape.to_deterministic()
observed = aug_det.augment_line_strings(self.lsoi)
assert_cbaois_equal(observed, self.lsoi)
def test_bounding_boxes_with_tuple_in_shape__succeeds(self):
aug = self.aug_tuple_in_shape
observed = aug.augment_bounding_boxes(self.bbsoi)
assert_cbaois_equal(observed, self.bbsoi)
def test_bounding_boxes_with_tuple_in_shape__succeeds__deterministic(self):
aug_det = self.aug_tuple_in_shape.to_deterministic()
observed = aug_det.augment_bounding_boxes(self.bbsoi)
assert_cbaois_equal(observed, self.bbsoi)
def test_images_with_tuple_in_shape__fails(self):
aug = self.aug_tuple_in_shape
with self.assertRaises(AssertionError):
_ = aug.augment_images(self.images_h4)
def test_heatmaps_with_tuple_in_shape__fails(self):
aug = self.aug_tuple_in_shape
with self.assertRaises(AssertionError):
_ = aug.augment_heatmaps(self.heatmaps_h4)
def test_segmaps_with_tuple_in_shape__fails(self):
aug = self.aug_tuple_in_shape
with self.assertRaises(AssertionError):
_ = aug.augment_segmentation_maps(self.segmaps_h4)
def test_keypoints_with_tuple_in_shape__fails(self):
aug = self.aug_tuple_in_shape
with self.assertRaises(AssertionError):
_ = aug.augment_keypoints(self.kpsoi_h4)
def test_polygons_with_tuple_in_shape__fails(self):
aug = self.aug_tuple_in_shape
with self.assertRaises(AssertionError):
_ = aug.augment_polygons(self.psoi_h4)
def test_line_strings_with_tuple_in_shape__fails(self):
aug = self.aug_tuple_in_shape
with self.assertRaises(AssertionError):
_ = aug.augment_line_strings(self.lsoi_h4)
def test_bounding_boxes_with_tuple_in_shape__fails(self):
aug = self.aug_tuple_in_shape
with self.assertRaises(AssertionError):
_ = aug.augment_bounding_boxes(self.bbsoi_h4)
def test_fails_if_shape_contains_invalid_datatype(self):
got_exception = False
try:
aug = iaa.AssertShape((1, False, 4, 1))
_ = aug.augment_images(np.zeros((1, 2, 2, 1), dtype=np.uint8))
except Exception as exc:
assert "Invalid datatype " in str(exc)
got_exception = True
assert got_exception
def test_other_dtypes_bool__succeeds(self):
aug = iaa.AssertShape((None, 3, 3, 1))
image = np.zeros((3, 3, 1), dtype=bool)
image[0, 0, 0] = True
image_aug = aug.augment_image(image)
assert image_aug.dtype.type == image.dtype.type
assert np.all(image_aug == image)
def test_other_dtypes_uint_int__succeeds(self):
aug = iaa.AssertShape((None, 3, 3, 1))
for dtype in self.DTYPES_UINT + self.DTYPES_INT:
with self.subTest(dtype=dtype):
min_value, center_value, max_value = \
iadt.get_value_range_of_dtype(dtype)
value = max_value
image = np.zeros((3, 3, 1), dtype=dtype)
image[0, 0, 0] = value
image_aug = aug.augment_image(image)
assert image_aug.dtype.name == dtype
assert np.array_equal(image_aug, image)
def test_other_dtypes_float__succeeds(self):
aug = iaa.AssertShape((None, 3, 3, 1))
values = [5000, 1000 ** 2, 1000 ** 3, 1000 ** 4]
for dtype, value in zip(self.DTYPES_FLOAT, values):
with self.subTest(dtype=dtype):
image = np.zeros((3, 3, 1), dtype=dtype)
image[0, 0, 0] = 1
image_aug = aug.augment_image(image)
assert image_aug.dtype.name == dtype
assert np.all(image_aug == image)
def test_other_dtypes_bool__fails(self):
aug = iaa.AssertShape((None, 3, 4, 1))
image = np.zeros((3, 3, 1), dtype=bool)
image[0, 0, 0] = True
with self.assertRaises(AssertionError):
_ = aug.augment_image(image)
def test_other_dtypes_uint_int__fails(self):
aug = iaa.AssertShape((None, 3, 4, 1))
for dtype in self.DTYPES_UINT + self.DTYPES_INT:
min_value, center_value, max_value = \
iadt.get_value_range_of_dtype(dtype)
value = max_value
image = np.zeros((3, 3, 1), dtype=dtype)
image[0, 0, 0] = value
with self.assertRaises(AssertionError):
_ = aug.augment_image(image)
def test_other_dtypes_float__fails(self):
aug = iaa.AssertShape((None, 3, 4, 1))
values = [5000, 1000 ** 2, 1000 ** 3, 1000 ** 4]
for dtype, value in zip(self.DTYPES_FLOAT, values):
image = np.zeros((3, 3, 1), dtype=dtype)
image[0, 0, 0] = value
with self.assertRaises(AssertionError):
_ = aug.augment_image(image)
def test_pickleable(self):
aug = iaa.AssertShape(
shape=(None, 15, 15, None), check_images=True,
seed=1)
runtest_pickleable_uint8_img(aug, iterations=2, shape=(15, 15, 1))
def test_clip_augmented_image_():
warnings.resetwarnings()
with warnings.catch_warnings(record=True) as caught_warnings:
warnings.simplefilter("always")
image = np.zeros((1, 3), dtype=np.uint8)
image[0, 0] = 10
image[0, 1] = 20
image[0, 2] = 30
image_clipped = iaa.clip_augmented_image_(image,
min_value=15, max_value=25)
assert image_clipped[0, 0] == 15
assert image_clipped[0, 1] == 20
assert image_clipped[0, 2] == 25
assert len(caught_warnings) >= 1
assert "deprecated" in str(caught_warnings[-1].message)
def test_clip_augmented_image():
warnings.resetwarnings()
with warnings.catch_warnings(record=True) as caught_warnings:
warnings.simplefilter("always")
image = np.zeros((1, 3), dtype=np.uint8)
image[0, 0] = 10
image[0, 1] = 20
image[0, 2] = 30
image_clipped = iaa.clip_augmented_image(image,
min_value=15, max_value=25)
assert image_clipped[0, 0] == 15
assert image_clipped[0, 1] == 20
assert image_clipped[0, 2] == 25
assert len(caught_warnings) >= 1
assert "deprecated" in str(caught_warnings[-1].message)
def test_clip_augmented_images_():
warnings.resetwarnings()
with warnings.catch_warnings(record=True) as caught_warnings:
warnings.simplefilter("always")
images = np.zeros((2, 1, 3), dtype=np.uint8)
images[:, 0, 0] = 10
images[:, 0, 1] = 20
images[:, 0, 2] = 30
imgs_clipped = iaa.clip_augmented_images_(images,
min_value=15, max_value=25)
assert np.all(imgs_clipped[:, 0, 0] == 15)
assert np.all(imgs_clipped[:, 0, 1] == 20)
assert np.all(imgs_clipped[:, 0, 2] == 25)
images = [np.zeros((1, 3), dtype=np.uint8) for _ in sm.xrange(2)]
for i in sm.xrange(len(images)):
images[i][0, 0] = 10
images[i][0, 1] = 20
images[i][0, 2] = 30
imgs_clipped = iaa.clip_augmented_images_(images,
min_value=15, max_value=25)
assert isinstance(imgs_clipped, list)
assert np.all([imgs_clipped[i][0, 0] == 15
for i in sm.xrange(len(images))])
assert np.all([imgs_clipped[i][0, 1] == 20
for i in sm.xrange(len(images))])
assert np.all([imgs_clipped[i][0, 2] == 25
for i in sm.xrange(len(images))])
assert len(caught_warnings) >= 1
assert "deprecated" in str(caught_warnings[-1].message)
def test_clip_augmented_images():
warnings.resetwarnings()
with warnings.catch_warnings(record=True) as caught_warnings:
warnings.simplefilter("always")
images = np.zeros((2, 1, 3), dtype=np.uint8)
images[:, 0, 0] = 10
images[:, 0, 1] = 20
images[:, 0, 2] = 30
imgs_clipped = iaa.clip_augmented_images(images,
min_value=15, max_value=25)
assert np.all(imgs_clipped[:, 0, 0] == 15)
assert np.all(imgs_clipped[:, 0, 1] == 20)
assert np.all(imgs_clipped[:, 0, 2] == 25)
images = [np.zeros((1, 3), dtype=np.uint8) for _ in sm.xrange(2)]
for i in sm.xrange(len(images)):
images[i][0, 0] = 10
images[i][0, 1] = 20
images[i][0, 2] = 30
imgs_clipped = iaa.clip_augmented_images(images,
min_value=15, max_value=25)
assert isinstance(imgs_clipped, list)
assert np.all([imgs_clipped[i][0, 0] == 15
for i in sm.xrange(len(images))])
assert np.all([imgs_clipped[i][0, 1] == 20
for i in sm.xrange(len(images))])
assert np.all([imgs_clipped[i][0, 2] ==
25 for i in sm.xrange(len(images))])
assert len(caught_warnings) >= 1
assert "deprecated" in str(caught_warnings[-1].message)
def test_reduce_to_nonempty():
kpsois = [
ia.KeypointsOnImage([ia.Keypoint(x=0, y=1)], shape=(4, 4, 3)),
ia.KeypointsOnImage([ia.Keypoint(x=0, y=1), ia.Keypoint(x=1, y=0)],
shape=(4, 4, 3)),
ia.KeypointsOnImage([], shape=(4, 4, 3)),
ia.KeypointsOnImage([ia.Keypoint(x=2, y=2)], shape=(4, 4, 3)),
ia.KeypointsOnImage([], shape=(4, 4, 3))
]
kpsois_reduced, ids = iaa.reduce_to_nonempty(kpsois)
assert kpsois_reduced == [kpsois[0], kpsois[1], kpsois[3]]
assert ids == [0, 1, 3]
kpsois = [
ia.KeypointsOnImage([], shape=(4, 4, 3)),
ia.KeypointsOnImage([], shape=(4, 4, 3))
]
kpsois_reduced, ids = iaa.reduce_to_nonempty(kpsois)
assert kpsois_reduced == []
assert ids == []
kpsois = [
ia.KeypointsOnImage([ia.Keypoint(x=0, y=1)], shape=(4, 4, 3))
]
kpsois_reduced, ids = iaa.reduce_to_nonempty(kpsois)
assert kpsois_reduced == [kpsois[0]]
assert ids == [0]
kpsois = []
kpsois_reduced, ids = iaa.reduce_to_nonempty(kpsois)
assert kpsois_reduced == []
assert ids == []
def test_invert_reduce_to_nonempty():
kpsois = [
ia.KeypointsOnImage([ia.Keypoint(x=0, y=1)], shape=(4, 4, 3)),
ia.KeypointsOnImage([ia.Keypoint(x=0, y=1),
ia.Keypoint(x=1, y=0)], shape=(4, 4, 3)),
ia.KeypointsOnImage([ia.Keypoint(x=2, y=2)], shape=(4, 4, 3)),
]
kpsois_recovered = iaa.invert_reduce_to_nonempty(
kpsois, [0, 1, 2], ["foo1", "foo2", "foo3"])
assert kpsois_recovered == ["foo1", "foo2", "foo3"]
kpsois_recovered = iaa.invert_reduce_to_nonempty(kpsois, [1], ["foo1"])
assert np.all([
isinstance(kpsoi, ia.KeypointsOnImage)
for kpsoi
in kpsois]) # assert original list not changed
assert kpsois_recovered == [kpsois[0], "foo1", kpsois[2]]
kpsois_recovered = iaa.invert_reduce_to_nonempty(kpsois, [], [])
assert kpsois_recovered == [kpsois[0], kpsois[1], kpsois[2]]
kpsois_recovered = iaa.invert_reduce_to_nonempty([], [], [])
assert kpsois_recovered == []
class _DummyAugmenter(iaa.Augmenter):
def _augment_images(self, images, random_state, parents, hooks):
return images
def get_parameters(self):
return []
class _DummyAugmenterBBs(iaa.Augmenter):
def _augment_images(self, images, random_state, parents, hooks):
return images
def _augment_bounding_boxes(self, bounding_boxes_on_images, random_state,
parents, hooks):
return [bbsoi.shift(x=1)
for bbsoi
in bounding_boxes_on_images]
def get_parameters(self):
return []
# TODO remove _augment_heatmaps() and _augment_keypoints() here once they are
# no longer abstract methods but default to noop
class _DummyAugmenterCallsParent(iaa.Augmenter):
def _augment_images(self, images, random_state, parents, hooks):
return super(_DummyAugmenterCallsParent, self)\
._augment_images(images, random_state, parents, hooks)
def get_parameters(self):
return super(_DummyAugmenterCallsParent, self)\
.get_parameters()
def _same_rs(rs1, rs2):
return rs1.equals(rs2)
# TODO the test in here do not check everything, but instead only the cases
# that were not yet indirectly tested via other tests
class TestAugmenter(unittest.TestCase):
def setUp(self):
reseed()
def test___init___global_rng(self):
aug = _DummyAugmenter()
assert not aug.deterministic
assert aug.random_state.is_global_rng()
def test___init___deterministic(self):
with warnings.catch_warnings(record=True) as caught_warnings:
warnings.simplefilter("always")
aug = _DummyAugmenter(deterministic=True)
assert aug.deterministic
assert not aug.random_state.is_global_rng()
assert len(caught_warnings) == 1
assert (
"is deprecated"
in str(caught_warnings[-1].message))
# old name for parameter `seed`
def test___init___random_state_is_rng(self):
rs = iarandom.RNG(123)
aug = _DummyAugmenter(seed=rs)
assert aug.random_state.generator is rs.generator
# old name for parameter `seed`
def test___init___random_state_is_seed(self):
aug = _DummyAugmenter(seed=123)
assert aug.random_state.equals(iarandom.RNG(123))
def test___init___seed_is_random_state(self):
rs = iarandom.RNG(123)
aug = _DummyAugmenter(seed=rs)
assert aug.random_state.generator is rs.generator
def test___init___seed_is_seed(self):
aug = _DummyAugmenter(seed=123)
assert aug.random_state.equals(iarandom.RNG(123))
def test_augment_images_called_probably_with_single_image(self):
aug = _DummyAugmenter()
with warnings.catch_warnings(record=True) as caught_warnings:
warnings.simplefilter("always")
_ = aug.augment_images(np.zeros((16, 32, 3), dtype=np.uint8))
assert len(caught_warnings) == 1
assert (
"indicates that you provided a single image with shape (H, W, C)"
in str(caught_warnings[-1].message)
)
def test_augment_images_array_in_list_out(self):
self._test_augment_images_array_in_list_out_varying_channels(
[3] * 20)
def test_augment_images_array_in_list_out_single_channel(self):
self._test_augment_images_array_in_list_out_varying_channels(
[1] * 20)
def test_augment_images_array_in_list_out_no_channels(self):
self._test_augment_images_array_in_list_out_varying_channels(
[None] * 20)
def test_augment_images_array_in_list_out_varying_channels(self):
self._test_augment_images_array_in_list_out_varying_channels(
["random"] * 20)
@classmethod
def _test_augment_images_array_in_list_out_varying_channels(cls,
nb_channels):
assert len(nb_channels) == 20
aug = iaa.Crop(((1, 8), (1, 8), (1, 8), (1, 8)), keep_size=False)
seen = [0, 0]
for nb_channels_i in nb_channels:
if nb_channels_i == "random":
channels = np.random.choice([None, 1, 3, 4, 9], size=(16,))
elif nb_channels_i is None:
channels = np.random.choice([None], size=(16,))
else:
channels = np.random.choice([nb_channels_i], size=(16,))
images = [np.zeros((64, 64), dtype=np.uint8)
if c is None
else np.zeros((64, 64, c), dtype=np.uint8)
for c in channels]
if nb_channels_i != "random":
images = np.array(images)
observed = aug.augment_images(images)
if ia.is_np_array(observed):
seen[0] += 1
else:
seen[1] += 1
for image, c in zip(observed, channels):
if c is None:
assert image.ndim == 2
else:
assert image.ndim == 3
assert image.shape[2] == c
assert 48 <= image.shape[0] <= 62
assert 48 <= image.shape[1] <= 62
assert seen[0] <= 3
assert seen[1] >= 17
def test_augment_images_with_2d_inputs(self):
base_img1 = np.array([[0, 0, 1, 1],
[0, 0, 1, 1],
[0, 1, 1, 1]], dtype=np.uint8)
base_img2 = np.array([[0, 0, 1, 1],
[0, 1, 1, 1],
[0, 1, 0, 0]], dtype=np.uint8)
base_img1_flipped = np.array([[1, 1, 0, 0],
[1, 1, 0, 0],
[1, 1, 1, 0]], dtype=np.uint8)
base_img2_flipped = np.array([[1, 1, 0, 0],
[1, 1, 1, 0],
[0, 0, 1, 0]], dtype=np.uint8)
images = np.array([base_img1, base_img2])
images_flipped = np.array([base_img1_flipped, base_img2_flipped])
images_list = [base_img1, base_img2]
images_flipped_list = [base_img1_flipped, base_img2_flipped]
images_list2d3d = [base_img1, base_img2[:, :, np.newaxis]]
images_flipped_list2d3d = [
base_img1_flipped,
base_img2_flipped[:, :, np.newaxis]]
aug = iaa.Fliplr(1.0)
noaug = iaa.Fliplr(0.0)
# one numpy array as input
observed = aug.augment_images(images)
assert np.array_equal(observed, images_flipped)
observed = noaug.augment_images(images)
assert np.array_equal(observed, images)
# list of 2d images
observed = aug.augment_images(images_list)
assert array_equal_lists(observed, images_flipped_list)
observed = noaug.augment_images(images_list)
assert array_equal_lists(observed, images_list)
# list of images, one 2d and one 3d
observed = aug.augment_images(images_list2d3d)
assert array_equal_lists(observed, images_flipped_list2d3d)
observed = noaug.augment_images(images_list2d3d)
assert array_equal_lists(observed, images_list2d3d)
def test_augment_keypoints_single_instance(self):
kpsoi = ia.KeypointsOnImage([ia.Keypoint(10, 10)], shape=(32, 32, 3))
aug = iaa.Affine(translate_px={"x": 1})
kpsoi_aug = aug.augment_keypoints(kpsoi)
assert len(kpsoi_aug.keypoints) == 1
assert kpsoi_aug.keypoints[0].x == 11
def test_augment_keypoints_single_instance_rot90(self):
kps = [ia.Keypoint(x=1, y=2), ia.Keypoint(x=2, y=5),
ia.Keypoint(x=3, y=3)]
kpsoi = ia.KeypointsOnImage(kps, shape=(5, 10, 3))
aug = iaa.Rot90(1, keep_size=False)
kpsoi_aug = aug.augment_keypoints(kpsoi)
# set offset to -1 if Rot90 uses int-based coordinate transformation
kp_offset = 0
assert np.allclose(kpsoi_aug.keypoints[0].x, 5 - 2 + kp_offset)
assert np.allclose(kpsoi_aug.keypoints[0].y, 1)
assert np.allclose(kpsoi_aug.keypoints[1].x, 5 - 5 + kp_offset)
assert np.allclose(kpsoi_aug.keypoints[1].y, 2)
assert np.allclose(kpsoi_aug.keypoints[2].x, 5 - 3 + kp_offset)
assert np.allclose(kpsoi_aug.keypoints[2].y, 3)
def test_augment_keypoints_many_instances_rot90(self):
kps = [ia.Keypoint(x=1, y=2), ia.Keypoint(x=2, y=5),
ia.Keypoint(x=3, y=3)]
kpsoi = ia.KeypointsOnImage(kps, shape=(5, 10, 3))
aug = iaa.Rot90(1, keep_size=False)
kpsoi_aug = aug.augment_keypoints([kpsoi, kpsoi, kpsoi])
# set offset to -1 if Rot90 uses int-based coordinate transformation
kp_offset = 0
for i in range(3):
assert np.allclose(kpsoi_aug[i].keypoints[0].x, 5 - 2 + kp_offset)
assert np.allclose(kpsoi_aug[i].keypoints[0].y, 1)
assert np.allclose(kpsoi_aug[i].keypoints[1].x, 5 - 5 + kp_offset)
assert np.allclose(kpsoi_aug[i].keypoints[1].y, 2)
assert np.allclose(kpsoi_aug[i].keypoints[2].x, 5 - 3 + kp_offset)
assert np.allclose(kpsoi_aug[i].keypoints[2].y, 3)
def test_augment_keypoints_empty_instance(self):
# test empty KeypointsOnImage objects
kpsoi = ia.KeypointsOnImage([], shape=(32, 32, 3))
aug = iaa.Affine(translate_px={"x": 1})
kpsoi_aug = aug.augment_keypoints([kpsoi])
assert len(kpsoi_aug) == 1
assert len(kpsoi_aug[0].keypoints) == 0
def test_augment_keypoints_mixed_filled_and_empty_instances(self):
kpsoi1 = ia.KeypointsOnImage([], shape=(32, 32, 3))
kpsoi2 = ia.KeypointsOnImage([ia.Keypoint(10, 10)], shape=(32, 32, 3))
aug = iaa.Affine(translate_px={"x": 1})
kpsoi_aug = aug.augment_keypoints([kpsoi1, kpsoi2])
assert len(kpsoi_aug) == 2
assert len(kpsoi_aug[0].keypoints) == 0
assert len(kpsoi_aug[1].keypoints) == 1
assert kpsoi_aug[1].keypoints[0].x == 11
def test_augment_keypoints_aligned_despite_empty_instance(self):
# Test if augmenting lists of KeypointsOnImage is still aligned with
# image augmentation when one KeypointsOnImage instance is empty
# (no keypoints)
kpsoi_lst = [
ia.KeypointsOnImage([ia.Keypoint(x=0, y=0)], shape=(1, 10)),
ia.KeypointsOnImage([ia.Keypoint(x=0, y=0)], shape=(1, 10)),
ia.KeypointsOnImage([ia.Keypoint(x=1, y=0)], shape=(1, 10)),
ia.KeypointsOnImage([ia.Keypoint(x=0, y=0)], shape=(1, 10)),
ia.KeypointsOnImage([ia.Keypoint(x=0, y=0)], shape=(1, 10)),
ia.KeypointsOnImage([], shape=(1, 8)),
ia.KeypointsOnImage([ia.Keypoint(x=0, y=0)], shape=(1, 10)),
ia.KeypointsOnImage([ia.Keypoint(x=0, y=0)], shape=(1, 10)),
ia.KeypointsOnImage([ia.Keypoint(x=1, y=0)], shape=(1, 10)),
ia.KeypointsOnImage([ia.Keypoint(x=0, y=0)], shape=(1, 10)),
ia.KeypointsOnImage([ia.Keypoint(x=0, y=0)], shape=(1, 10))
]
image = np.zeros((1, 10), dtype=np.uint8)
image[0, 0] = 255
images = np.tile(image[np.newaxis, :, :], (len(kpsoi_lst), 1, 1))
aug = iaa.Affine(translate_px={"x": (0, 8)}, order=0, mode="constant",
cval=0)
for i in sm.xrange(10):
for is_list in [False, True]:
with self.subTest(i=i, is_list=is_list):
aug_det = aug.to_deterministic()
if is_list:
images_aug = aug_det.augment_images(list(images))
else:
images_aug = aug_det.augment_images(images)
kpsoi_lst_aug = aug_det.augment_keypoints(kpsoi_lst)
if is_list:
images_aug = np.array(images_aug, dtype=np.uint8)
translations_imgs = np.argmax(images_aug[:, 0, :], axis=1)
translations_kps = [
kpsoi.keypoints[0].x
if len(kpsoi.keypoints) > 0
else None
for kpsoi
in kpsoi_lst_aug]
assert len([kpresult
for kpresult
in translations_kps
if kpresult is None]) == 1
assert translations_kps[5] is None
translations_imgs = np.concatenate(
[translations_imgs[0:5], translations_imgs[6:]])
translations_kps = np.array(
translations_kps[0:5] + translations_kps[6:],
dtype=translations_imgs.dtype)
translations_kps[2] -= 1
translations_kps[8-1] -= 1
assert np.array_equal(translations_imgs, translations_kps)
def test_augment_keypoints_aligned_despite_nongeometric_image_ops(self):
# Verify for keypoints that adding augmentations that only
# affect images doesn't lead to misalignments between image
# and keypoint transformations
augs = iaa.Sequential([
iaa.Fliplr(0.5),
iaa.AdditiveGaussianNoise(scale=(0.01, 0.1)),
iaa.Affine(translate_px={"x": (-10, 10), "y": (-10, 10)},
order=0, mode="constant", cval=0),
iaa.AddElementwise((0, 1)),
iaa.Flipud(0.5)
], random_order=True)
kps = [ia.Keypoint(x=15.5, y=12.5), ia.Keypoint(x=23.5, y=20.5),
ia.Keypoint(x=61.5, y=36.5), ia.Keypoint(x=47.5, y=32.5)]
kpsoi = ia.KeypointsOnImage(kps, shape=(50, 80, 4))
image = kpsoi.to_keypoint_image(size=1)
images = np.tile(image[np.newaxis, ...], (20, 1, 1, 1))
for _ in sm.xrange(50):
images_aug, kpsois_aug = augs(images=images,
keypoints=[kpsoi]*len(images))
for image_aug, kpsoi_aug in zip(images_aug, kpsois_aug):
kpsoi_recovered = ia.KeypointsOnImage.from_keypoint_image(
image_aug, nb_channels=4, threshold=100
)
for kp, kp_image in zip(kpsoi_aug.keypoints,
kpsoi_recovered.keypoints):
distance = np.sqrt((kp.x - kp_image.x)**2
+ (kp.y - kp_image.y)**2)
assert distance <= 1
def test_augment_bounding_boxes(self):
aug = _DummyAugmenterBBs()
bb = ia.BoundingBox(x1=1, y1=4, x2=2, y2=5)
bbs = [bb]
bbsois = [ia.BoundingBoxesOnImage(bbs, shape=(10, 10, 3))]
bbsois_aug = aug.augment_bounding_boxes(bbsois)
bb_aug = bbsois_aug[0].bounding_boxes[0]
assert bb_aug.x1 == 1+1
assert bb_aug.y1 == 4
assert bb_aug.x2 == 2+1
assert bb_aug.y2 == 5
def test_augment_bounding_boxes_empty_bboi(self):
aug = _DummyAugmenterBBs()
bbsois = [ia.BoundingBoxesOnImage([], shape=(10, 10, 3))]
bbsois_aug = aug.augment_bounding_boxes(bbsois)
assert len(bbsois_aug) == 1
assert bbsois_aug[0].bounding_boxes == []
def test_augment_bounding_boxes_empty_list(self):
aug = _DummyAugmenterBBs()
bbsois_aug = aug.augment_bounding_boxes([])
assert bbsois_aug == []
def test_augment_bounding_boxes_single_instance(self):
bbsoi = ia.BoundingBoxesOnImage([
ia.BoundingBox(x1=1, x2=3, y1=4, y2=5),
ia.BoundingBox(x1=2.5, x2=3, y1=0, y2=2)
], shape=(5, 10, 3))
aug = iaa.Identity()
bbsoi_aug = aug.augment_bounding_boxes(bbsoi)
for bb_aug, bb in zip(bbsoi_aug.bounding_boxes, bbsoi.bounding_boxes):
assert np.allclose(bb_aug.x1, bb.x1)
assert np.allclose(bb_aug.x2, bb.x2)
assert np.allclose(bb_aug.y1, bb.y1)
assert np.allclose(bb_aug.y2, bb.y2)
def test_augment_bounding_boxes_single_instance_rot90(self):
bbsoi = ia.BoundingBoxesOnImage([
ia.BoundingBox(x1=1, x2=3, y1=4, y2=5),
ia.BoundingBox(x1=2.5, x2=3, y1=0, y2=2)
], shape=(5, 10, 3))
aug = iaa.Rot90(1, keep_size=False)
bbsoi_aug = aug.augment_bounding_boxes(bbsoi)
# set offset to -1 if Rot90 uses int-based coordinate transformation
kp_offset = 0
# Note here that the new coordinates are minima/maxima of the BB, so
# not as straight forward to compute the new coords as for keypoint
# augmentation
bb0 = bbsoi_aug.bounding_boxes[0]
bb1 = bbsoi_aug.bounding_boxes[1]
assert np.allclose(bb0.x1, 5 - 5 + kp_offset)
assert np.allclose(bb0.x2, 5 - 4 + kp_offset)
assert np.allclose(bb0.y1, 1)
assert np.allclose(bb0.y2, 3)
assert np.allclose(bb1.x1, 5 - 2 + kp_offset)
assert np.allclose(bb1.x2, 5 - 0 + kp_offset)
assert np.allclose(bb1.y1, 2.5)
assert np.allclose(bb1.y2, 3)
def test_augment_bounding_box_list_of_many_instances(self):
bbsoi = ia.BoundingBoxesOnImage([
ia.BoundingBox(x1=1, x2=3, y1=4, y2=5),
ia.BoundingBox(x1=2.5, x2=3, y1=0, y2=2)
], shape=(5, 10, 3))
aug = iaa.Rot90(1, keep_size=False)
bbsoi_aug = aug.augment_bounding_boxes([bbsoi, bbsoi, bbsoi])
# set offset to -1 if Rot90 uses int-based coordinate transformation
kp_offset = 0
for i in range(3):
bb0 = bbsoi_aug[i].bounding_boxes[0]
bb1 = bbsoi_aug[i].bounding_boxes[1]
assert np.allclose(bb0.x1, 5 - 5 + kp_offset)
assert np.allclose(bb0.x2, 5 - 4 + kp_offset)
assert np.allclose(bb0.y1, 1)
assert np.allclose(bb0.y2, 3)
assert np.allclose(bb1.x1, 5 - 2 + kp_offset)
assert np.allclose(bb1.x2, 5 - 0 + kp_offset)
assert np.allclose(bb1.y1, 2.5)
assert np.allclose(bb1.y2, 3)
def test_augment_heatmaps_noop_single_heatmap(self):
heatmap_arr = np.linspace(0.0, 1.0, num=4*4).reshape((4, 4, 1))
heatmap = ia.HeatmapsOnImage(heatmap_arr.astype(np.float32),
shape=(4, 4, 3))
aug = iaa.Identity()
heatmap_aug = aug.augment_heatmaps(heatmap)
assert np.allclose(heatmap_aug.arr_0to1, heatmap.arr_0to1)
def test_augment_heatmaps_rot90_single_heatmap(self):
heatmap_arr = np.linspace(0.0, 1.0, num=4*4).reshape((4, 4, 1))
heatmap = ia.HeatmapsOnImage(heatmap_arr.astype(np.float32),
shape=(4, 4, 3))
aug = iaa.Rot90(1, keep_size=False)
heatmap_aug = aug.augment_heatmaps(heatmap)
assert np.allclose(heatmap_aug.arr_0to1, np.rot90(heatmap.arr_0to1, -1))
def test_augment_heatmaps_rot90_list_of_many_heatmaps(self):
heatmap_arr = np.linspace(0.0, 1.0, num=4*4).reshape((4, 4, 1))
heatmap = ia.HeatmapsOnImage(heatmap_arr.astype(np.float32),
shape=(4, 4, 3))
aug = iaa.Rot90(1, keep_size=False)
heatmaps_aug = aug.augment_heatmaps([heatmap] * 3)
for hm in heatmaps_aug:
assert np.allclose(hm.arr_0to1, np.rot90(heatmap.arr_0to1, -1))
def test_legacy_fallback_to_kp_aug_for_cbaois(self):
class _LegacyAugmenter(iaa.Augmenter):
def _augment_keypoints(self, keypoints_on_images, random_state,
parents, hooks):
return [kpsoi.shift(x=1) for kpsoi in keypoints_on_images]
def get_parameters(self):
return []
bbsoi = ia.BoundingBoxesOnImage([
ia.BoundingBox(x1=1, y1=2, x2=3, y2=4)
], shape=(4, 5, 3))
psoi = ia.PolygonsOnImage([
ia.Polygon([(0, 0), (1, 0), (1, 1)])
], shape=(4, 5, 3))
lsoi = ia.LineStringsOnImage([
ia.LineString([(0, 0), (1, 0), (1, 1)])
], shape=(4, 5, 3))
aug = _LegacyAugmenter()
bbsoi_aug = aug.augment_bounding_boxes(bbsoi)
psoi_aug = aug.augment_polygons(psoi)
lsoi_aug = aug.augment_line_strings(lsoi)
assert bbsoi_aug[0].coords_almost_equals(bbsoi[0].shift(x=1))
assert psoi_aug[0].coords_almost_equals(psoi[0].shift(x=1))
assert lsoi_aug[0].coords_almost_equals(lsoi[0].shift(x=1))
def test_localize_random_state(self):
aug = _DummyAugmenter()
aug_localized = aug.localize_random_state()
assert aug_localized is not aug
assert aug.random_state.is_global_rng()
assert not aug_localized.random_state.is_global_rng()
def test_seed_(self):
aug1 = _DummyAugmenter()
aug2 = _DummyAugmenter().to_deterministic()
aug0 = iaa.Sequential([aug1, aug2])
aug0_copy = aug0.deepcopy()
assert _same_rs(aug0.random_state, aug0_copy.random_state)
assert _same_rs(aug0[0].random_state, aug0_copy[0].random_state)
assert _same_rs(aug0[1].random_state, aug0_copy[1].random_state)
aug0_copy.seed_()
assert not _same_rs(aug0.random_state, aug0_copy.random_state)
assert not _same_rs(aug0[0].random_state, aug0_copy[0].random_state)
assert _same_rs(aug0[1].random_state, aug0_copy[1].random_state)
def test_seed__deterministic_too(self):
aug1 = _DummyAugmenter()
aug2 = _DummyAugmenter().to_deterministic()
aug0 = iaa.Sequential([aug1, aug2])
aug0_copy = aug0.deepcopy()
assert _same_rs(aug0.random_state, aug0_copy.random_state)
assert _same_rs(aug0[0].random_state, aug0_copy[0].random_state)
assert _same_rs(aug0[1].random_state, aug0_copy[1].random_state)
aug0_copy.seed_(deterministic_too=True)
assert not _same_rs(aug0.random_state, aug0_copy.random_state)
assert not _same_rs(aug0[0].random_state, aug0_copy[0].random_state)
assert not _same_rs(aug0[1].random_state, aug0_copy[1].random_state)
def test_seed__with_integer(self):
aug1 = _DummyAugmenter()
aug2 = _DummyAugmenter().to_deterministic()
aug0 = iaa.Sequential([aug1, aug2])
aug0_copy = aug0.deepcopy()
assert _same_rs(aug0.random_state, aug0_copy.random_state)
assert _same_rs(aug0[0].random_state, aug0_copy[0].random_state)
assert _same_rs(aug0[1].random_state, aug0_copy[1].random_state)
aug0_copy.seed_(123)
assert not _same_rs(aug0.random_state, aug0_copy.random_state)
assert not _same_rs(aug0[0].random_state, aug0_copy[0].random_state)
assert _same_rs(aug0_copy.random_state, iarandom.RNG(123))
expected = iarandom.RNG(123).derive_rng_()
assert _same_rs(aug0_copy[0].random_state, expected)
def test_seed__with_rng(self):
aug1 = _DummyAugmenter()
aug2 = _DummyAugmenter().to_deterministic()
aug0 = iaa.Sequential([aug1, aug2])
aug0_copy = aug0.deepcopy()
assert _same_rs(aug0.random_state, aug0_copy.random_state)
assert _same_rs(aug0[0].random_state, aug0_copy[0].random_state)
assert _same_rs(aug0[1].random_state, aug0_copy[1].random_state)
aug0_copy.seed_(iarandom.RNG(123))
assert not _same_rs(aug0.random_state, aug0_copy.random_state)
assert not _same_rs(aug0[0].random_state, aug0_copy[0].random_state)
assert _same_rs(aug0[1].random_state, aug0_copy[1].random_state)
assert _same_rs(aug0_copy.random_state,
iarandom.RNG(123))
expected = iarandom.RNG(123).derive_rng_()
assert _same_rs(aug0_copy[0].random_state, expected)
def test_get_parameters(self):
# test for "raise NotImplementedError"
aug = _DummyAugmenterCallsParent()
with self.assertRaises(NotImplementedError):
aug.get_parameters()
def test_get_all_children_flat(self):
aug1 = _DummyAugmenter()
aug21 = _DummyAugmenter()
aug2 = iaa.Sequential([aug21])
aug0 = iaa.Sequential([aug1, aug2])
children = aug0.get_all_children(flat=True)
assert isinstance(children, list)
assert children[0] == aug1
assert children[1] == aug2
assert children[2] == aug21
def test_get_all_children_not_flat(self):
aug1 = _DummyAugmenter()
aug21 = _DummyAugmenter()
aug2 = iaa.Sequential([aug21])
aug0 = iaa.Sequential([aug1, aug2])
children = aug0.get_all_children(flat=False)
assert isinstance(children, list)
assert children[0] == aug1
assert children[1] == aug2
assert isinstance(children[2], list)
assert children[2][0] == aug21
def test___repr___and___str__(self):
class DummyAugmenterRepr(iaa.Augmenter):
def _augment_images(self, images, random_state, parents, hooks):
return images
def _augment_heatmaps(self, heatmaps, random_state, parents, hooks):
return heatmaps
def _augment_keypoints(self, keypoints_on_images, random_state,
parents, hooks):
return keypoints_on_images
def get_parameters(self):
return ["A", "B", "C"]
aug1 = DummyAugmenterRepr(name="Example")
aug2 = DummyAugmenterRepr(name="Example").to_deterministic()
expected1 = (
"DummyAugmenterRepr("
"name=Example, parameters=[A, B, C], deterministic=False"
")")
expected2 = (
"DummyAugmenterRepr("
"name=Example, parameters=[A, B, C], deterministic=True"
")")
assert aug1.__repr__() == aug1.__str__() == expected1
assert aug2.__repr__() == aug2.__str__() == expected2
# -----------
# lambda functions used in Test TestAugmenter_augment_batches
# in test method test_augment_batches_with_many_different_augmenters().
# They are here instead of in the test method, because otherwise there were
# issues with spawn mode not being able to pickle functions,
# see issue #414.
def _augment_batches__lambda_func_images(
images, random_state, parents, hooks):
return images
def _augment_batches__lambda_func_keypoints(
keypoints_on_images, random_state, parents, hooks):
return keypoints_on_images
def _augment_batches__assertlambda_func_images(
images, random_state, parents, hooks):
return True
def _augment_batches__assertlambda_func_keypoints(
keypoints_on_images, random_state, parents, hooks):
return True
# -----------
class TestAugmenter_augment_batches(unittest.TestCase):
def setUp(self):
reseed()
def test_augment_batches_list_of_empty_list_deprecated(self):
with warnings.catch_warnings(record=True) as caught_warnings:
aug = _DummyAugmenter()
batches_aug = list(aug.augment_batches([[]]))
assert isinstance(batches_aug, list)
assert len(batches_aug) == 1
assert isinstance(batches_aug[0], list)
assert len(caught_warnings) == 1
assert "deprecated" in str(caught_warnings[-1].message)
def test_augment_batches_list_of_arrays_deprecated(self):
with warnings.catch_warnings(record=True) as caught_warnings:
aug = _DummyAugmenter()
image_batches = [np.zeros((1, 2, 2, 3), dtype=np.uint8)]
batches_aug = list(aug.augment_batches(image_batches))
assert isinstance(batches_aug, list)
assert len(batches_aug) == 1
assert array_equal_lists(batches_aug, image_batches)
assert len(caught_warnings) == 1
assert "deprecated" in str(caught_warnings[-1].message)
def test_augment_batches_list_of_list_of_arrays_deprecated(self):
with warnings.catch_warnings(record=True) as caught_warnings:
aug = _DummyAugmenter()
image_batches = [[np.zeros((2, 2, 3), dtype=np.uint8),
np.zeros((2, 3, 3))]]
batches_aug = list(aug.augment_batches(image_batches))
assert isinstance(batches_aug, list)
assert len(batches_aug) == 1
assert array_equal_lists(batches_aug[0], image_batches[0])
assert len(caught_warnings) == 1
assert "deprecated" in str(caught_warnings[-1].message)
def test_augment_batches_invalid_datatype(self):
aug = _DummyAugmenter()
with self.assertRaises(Exception):
_ = list(aug.augment_batches(None))
def test_augment_batches_list_of_invalid_datatype(self):
aug = _DummyAugmenter()
got_exception = False
try:
_ = list(aug.augment_batches([None]))
except Exception as exc:
got_exception = True
assert "Unknown datatype of batch" in str(exc)
assert got_exception
def test_augment_batches_list_of_list_of_invalid_datatype(self):
aug = _DummyAugmenter()
got_exception = False
try:
_ = list(aug.augment_batches([[None]]))
except Exception as exc:
got_exception = True
assert "Unknown datatype in batch[0]" in str(exc)
assert got_exception
def test_augment_batches_batch_with_list_of_images(self):
image = np.array([[0, 0, 1, 1, 1],
[0, 0, 1, 1, 1],
[0, 1, 1, 1, 1]], dtype=np.uint8)
image_flipped = np.fliplr(image)
keypoint = ia.Keypoint(x=2, y=1)
keypoints = [ia.KeypointsOnImage([keypoint], shape=image.shape + (1,))]
kp_flipped = ia.Keypoint(
x=image.shape[1]-keypoint.x,
y=keypoint.y
)
# basic functionality test (images as list)
for bg in [True, False]:
seq = iaa.Fliplr(1.0)
batches = [ia.Batch(images=[np.copy(image)], keypoints=keypoints)]
batches_aug = list(seq.augment_batches(batches, background=bg))
baug0 = batches_aug[0]
assert np.array_equal(baug0.images_aug[0], image_flipped)
assert baug0.keypoints_aug[0].keypoints[0].x == kp_flipped.x
assert baug0.keypoints_aug[0].keypoints[0].y == kp_flipped.y
assert np.array_equal(baug0.images_unaug[0], image)
assert baug0.keypoints_unaug[0].keypoints[0].x == keypoint.x
assert baug0.keypoints_unaug[0].keypoints[0].y == keypoint.y
def test_augment_batches_batch_with_array_of_images(self):
image = np.array([[0, 0, 1, 1, 1],
[0, 0, 1, 1, 1],
[0, 1, 1, 1, 1]], dtype=np.uint8)
image_flipped = np.fliplr(image)
keypoint = ia.Keypoint(x=2, y=1)
keypoints = [ia.KeypointsOnImage([keypoint], shape=image.shape + (1,))]
kp_flipped = ia.Keypoint(
x=image.shape[1]-keypoint.x,
y=keypoint.y
)
# basic functionality test (images as array)
for bg in [True, False]:
seq = iaa.Fliplr(1.0)
batches = [ia.Batch(images=np.uint8([np.copy(image)]),
keypoints=keypoints)]
batches_aug = list(seq.augment_batches(batches, background=bg))
baug0 = batches_aug[0]
assert np.array_equal(baug0.images_aug, np.uint8([image_flipped]))
assert baug0.keypoints_aug[0].keypoints[0].x == kp_flipped.x
assert baug0.keypoints_aug[0].keypoints[0].y == kp_flipped.y
assert np.array_equal(baug0.images_unaug, np.uint8([image]))
assert baug0.keypoints_unaug[0].keypoints[0].x == keypoint.x
assert baug0.keypoints_unaug[0].keypoints[0].y == keypoint.y
def test_augment_batches_background(self):
image = np.array([[0, 0, 1, 1, 1],
[0, 0, 1, 1, 1],
[0, 1, 1, 1, 1]], dtype=np.uint8)
image_flipped = np.fliplr(image)
kps = ia.Keypoint(x=2, y=1)
kpsoi = ia.KeypointsOnImage([kps], shape=image.shape + (1,))
kp_flipped = ia.Keypoint(
x=image.shape[1]-kps.x,
y=kps.y
)
seq = iaa.Fliplr(0.5)
for bg, as_array in itertools.product([False, True], [False, True]):
# with images as list
nb_flipped_images = 0
nb_flipped_keypoints = 0
nb_iterations = 1000
images = (
np.uint8([np.copy(image)])
if as_array
else [np.copy(image)])
batches = [
ia.Batch(images=images,
keypoints=[kpsoi.deepcopy()])
for _ in sm.xrange(nb_iterations)
]
batches_aug = list(seq.augment_batches(batches, background=bg))
for batch_aug in batches_aug:
image_aug = batch_aug.images_aug[0]
keypoint_aug = batch_aug.keypoints_aug[0].keypoints[0]
img_matches_unflipped = np.array_equal(image_aug, image)
img_matches_flipped = np.array_equal(image_aug, image_flipped)
assert img_matches_unflipped or img_matches_flipped
if img_matches_flipped:
nb_flipped_images += 1
kp_matches_unflipped = (
np.isclose(keypoint_aug.x, kps.x)
and np.isclose(keypoint_aug.y, kps.y))
kp_matches_flipped = (
np.isclose(keypoint_aug.x, kp_flipped.x)
and np.isclose(keypoint_aug.y, kp_flipped.y))
assert kp_matches_flipped or kp_matches_unflipped
if kp_matches_flipped:
nb_flipped_keypoints += 1
assert 0.4*nb_iterations <= nb_flipped_images <= 0.6*nb_iterations
assert nb_flipped_images == nb_flipped_keypoints
def test_augment_batches_with_many_different_augmenters(self):
image = np.array([[0, 0, 1, 1, 1],
[0, 0, 1, 1, 1],
[0, 1, 1, 1, 1]], dtype=np.uint8)
keypoint = ia.Keypoint(x=2, y=1)
keypoints = [ia.KeypointsOnImage([keypoint], shape=image.shape + (1,))]
augs = [
iaa.Sequential([iaa.Fliplr(1.0), iaa.Flipud(1.0)]),
iaa.SomeOf(1, [iaa.Fliplr(1.0), iaa.Flipud(1.0)]),
iaa.OneOf([iaa.Fliplr(1.0), iaa.Flipud(1.0)]),
iaa.Sometimes(1.0, iaa.Fliplr(1)),
iaa.WithColorspace("HSV", children=iaa.Add((-50, 50))),
iaa.WithChannels([0], iaa.Add((-50, 50))),
iaa.Identity(name="Identity-nochange"),
iaa.Lambda(
func_images=_augment_batches__lambda_func_images,
func_keypoints=_augment_batches__lambda_func_keypoints,
name="Lambda-nochange"
),
iaa.AssertLambda(
func_images=_augment_batches__assertlambda_func_images,
func_keypoints=_augment_batches__assertlambda_func_keypoints,
name="AssertLambda-nochange"
),
iaa.AssertShape(
(None, 64, 64, 3),
check_keypoints=False,
name="AssertShape-nochange"
),
iaa.Resize((0.5, 0.9)),
iaa.CropAndPad(px=(-50, 50)),
iaa.Pad(px=(1, 50)),
iaa.Crop(px=(1, 50)),
iaa.Fliplr(1.0),
iaa.Flipud(1.0),
iaa.Superpixels(p_replace=(0.25, 1.0), n_segments=(16, 128)),
iaa.ChangeColorspace(to_colorspace="GRAY"),
iaa.Grayscale(alpha=(0.1, 1.0)),
iaa.GaussianBlur(1.0),
iaa.AverageBlur(5),
iaa.MedianBlur(5),
iaa.Convolve(np.array([[0, 1, 0],
[1, -4, 1],
[0, 1, 0]])),
iaa.Sharpen(alpha=(0.1, 1.0), lightness=(0.8, 1.2)),
iaa.Emboss(alpha=(0.1, 1.0), strength=(0.8, 1.2)),
iaa.EdgeDetect(alpha=(0.1, 1.0)),
iaa.DirectedEdgeDetect(alpha=(0.1, 1.0), direction=(0.0, 1.0)),
iaa.Add((-50, 50)),
iaa.AddElementwise((-50, 50)),
iaa.AdditiveGaussianNoise(scale=(0.1, 1.0)),
iaa.Multiply((0.6, 1.4)),
iaa.MultiplyElementwise((0.6, 1.4)),
iaa.Dropout((0.3, 0.5)),
iaa.CoarseDropout((0.3, 0.5), size_percent=(0.05, 0.2)),
iaa.Invert(0.5),
iaa.Affine(
scale=(0.7, 1.3),
translate_percent=(-0.1, 0.1),
rotate=(-20, 20),
shear=(-20, 20),
order=ia.ALL,
mode=ia.ALL,
cval=(0, 255)),
iaa.PiecewiseAffine(scale=(0.1, 0.3)),
iaa.ElasticTransformation(alpha=2.0)
]
nb_iterations = 100
image = ia.quokka(size=(64, 64))
batches = [ia.Batch(images=[np.copy(image)],
keypoints=[keypoints[0].deepcopy()])
for _ in sm.xrange(nb_iterations)]
for aug in augs:
nb_changed = 0
batches_aug = list(aug.augment_batches(batches, background=True))
for batch_aug in batches_aug:
image_aug = batch_aug.images_aug[0]
if (image.shape != image_aug.shape
or not np.array_equal(image, image_aug)):
nb_changed += 1
if nb_changed > 10:
break
if "-nochange" not in aug.name:
assert nb_changed > 0
else:
assert nb_changed == 0
class TestAugmenter_augment_batch(unittest.TestCase):
def test_deprecation(self):
with warnings.catch_warnings(record=True) as caught_warnings:
warnings.simplefilter("always")
aug = _InplaceDummyAugmenterImgsArray(1)
batch = ia.UnnormalizedBatch(
images=np.zeros((1, 1, 1, 3), dtype=np.uint8))
_batch_aug = aug.augment_batch(batch)
assert len(caught_warnings) == 1
assert "is deprecated" in str(caught_warnings[0].message)
def test_augments_correctly_images(self):
with warnings.catch_warnings(record=True) as caught_warnings:
warnings.simplefilter("always")
image = np.arange(10*20).astype(np.uint8).reshape((10, 20, 1))
image = np.tile(image, (1, 1, 3))
image[:, :, 0] += 0
image[:, :, 1] += 1
image[:, :, 2] += 2
images = image[np.newaxis, :, :, :]
image_cp = np.copy(image)
aug = _InplaceDummyAugmenterImgsArray(1)
batch = ia.UnnormalizedBatch(images=images)
batch_aug = aug.augment_batch(batch)
image_unaug = batch_aug.images_unaug[0, :, :, :]
image_aug = batch_aug.images_aug[0, :, :, :]
assert batch_aug is batch
assert batch_aug.images_aug is not batch.images_unaug
assert batch_aug.images_aug is not batch_aug.images_unaug
assert np.array_equal(image, image_cp)
assert np.array_equal(image_unaug, image_cp)
assert np.array_equal(image_aug, image_cp + 1)
class TestAugmenter_augment_batch_(unittest.TestCase):
def setUp(self):
reseed()
def test_verify_inplace_aug__imgs__unnormalized_batch(self):
image = np.arange(10*20).astype(np.uint8).reshape((10, 20, 1))
image = np.tile(image, (1, 1, 3))
image[:, :, 0] += 0
image[:, :, 1] += 1
image[:, :, 2] += 2
images = image[np.newaxis, :, :, :]
image_cp = np.copy(image)
aug = _InplaceDummyAugmenterImgsArray(1)
batch = ia.UnnormalizedBatch(images=images)
batch_aug = aug.augment_batch_(batch)
image_unaug = batch_aug.images_unaug[0, :, :, :]
image_aug = batch_aug.images_aug[0, :, :, :]
assert batch_aug is batch
assert batch_aug.images_aug is not batch.images_unaug
assert batch_aug.images_aug is not batch_aug.images_unaug
assert np.array_equal(image, image_cp)
assert np.array_equal(image_unaug, image_cp)
assert np.array_equal(image_aug, image_cp + 1)
def test_verify_inplace_aug__imgs__normalized_batch(self):
image = np.arange(10*20).astype(np.uint8).reshape((10, 20, 1))
image = np.tile(image, (1, 1, 3))
image[:, :, 0] += 0
image[:, :, 1] += 1
image[:, :, 2] += 2
images = image[np.newaxis, :, :, :]
image_cp = np.copy(image)
aug = _InplaceDummyAugmenterImgsArray(1)
batch = ia.Batch(images=images)
batch_aug = aug.augment_batch_(batch)
image_unaug = batch_aug.images_unaug[0, :, :, :]
image_aug = batch_aug.images_aug[0, :, :, :]
assert batch_aug is batch
assert batch_aug.images_aug is not batch.images_unaug
assert batch_aug.images_aug is not batch_aug.images_unaug
assert np.array_equal(image, image_cp)
assert np.array_equal(image_unaug, image_cp)
assert np.array_equal(image_aug, image_cp + 1)
def test_verify_inplace_aug__imgs__batchinaug(self):
image = np.arange(10*20).astype(np.uint8).reshape((10, 20, 1))
image = np.tile(image, (1, 1, 3))
image[:, :, 0] += 0
image[:, :, 1] += 1
image[:, :, 2] += 2
images = image[np.newaxis, :, :, :]
image_cp = np.copy(image)
aug = _InplaceDummyAugmenterImgsArray(1)
batch = _BatchInAugmentation(images=images)
batch_aug = aug.augment_batch_(batch)
image_aug = batch_aug.images[0, :, :, :]
assert batch_aug is batch
assert batch_aug.images is batch.images
assert not np.array_equal(image, image_cp)
assert np.array_equal(image_aug, image_cp + 1)
def test_verify_inplace_aug__segmaps__normalized_batch(self):
segmap_arr = np.zeros((10, 20, 3), dtype=np.int32)
segmap_arr[3:6, 3:9] = 1
segmap = ia.SegmentationMapsOnImage(segmap_arr, shape=(10, 20, 3))
segmap_cp = ia.SegmentationMapsOnImage(np.copy(segmap_arr),
shape=(10, 20, 3))
aug = _InplaceDummyAugmenterSegMaps(1)
batch = ia.Batch(segmentation_maps=[segmap])
batch_aug = aug.augment_batch_(batch)
segmap_unaug = batch_aug.segmentation_maps_unaug[0]
segmap_aug = batch_aug.segmentation_maps_aug[0]
assert batch_aug is batch
assert (batch_aug.segmentation_maps_aug
is not batch.segmentation_maps_unaug)
assert (batch_aug.segmentation_maps_aug
is not batch_aug.segmentation_maps_unaug)
assert np.array_equal(segmap.get_arr(), segmap_cp.get_arr())
assert np.array_equal(segmap_unaug.get_arr(), segmap_cp.get_arr())
assert np.array_equal(segmap_aug.get_arr(), segmap_cp.get_arr() + 1)
def test_verify_inplace_aug__keypoints_normalized_batch(self):
kpsoi = ia.KeypointsOnImage([ia.Keypoint(x=1, y=2)],
shape=(10, 20, 3))
kpsoi_cp = ia.KeypointsOnImage([ia.Keypoint(x=1, y=2)],
shape=(10, 20, 3))
aug = _InplaceDummyAugmenterKeypoints(x=1, y=3)
batch = ia.Batch(keypoints=[kpsoi])
batch_aug = aug.augment_batch_(batch)
kpsoi_unaug = batch_aug.keypoints_unaug[0]
kpsoi_aug = batch_aug.keypoints_aug[0]
assert batch_aug is batch
assert (batch_aug.keypoints_aug
is not batch.keypoints_unaug)
assert (batch_aug.keypoints_aug
is not batch_aug.keypoints_unaug)
assert np.allclose(kpsoi.to_xy_array(), kpsoi_cp.to_xy_array())
assert np.allclose(kpsoi_unaug.to_xy_array(), kpsoi_cp.to_xy_array())
assert np.allclose(kpsoi_aug.to_xy_array()[:, 0],
kpsoi_cp.to_xy_array()[:, 0] + 1)
assert np.allclose(kpsoi_aug.to_xy_array()[:, 1],
kpsoi_cp.to_xy_array()[:, 1] + 3)
def test_call_changes_global_rng_state(self):
state_before = copy.deepcopy(iarandom.get_global_rng().state)
aug = iaa.Rot90(k=(0, 3))
image = np.arange(4*4).astype(np.uint8).reshape((4, 4))
batch = ia.UnnormalizedBatch(images=[image])
_batch_aug = aug.augment_batch_(batch)
state_after = iarandom.get_global_rng().state
assert repr(state_before) != repr(state_after)
def test_multiple_calls_produce_not_the_same_results(self):
aug = iaa.Rot90(k=(0, 3))
image = np.arange(4*4).astype(np.uint8).reshape((4, 4))
nb_images = 1000
batch1 = ia.UnnormalizedBatch(images=[image] * nb_images)
batch2 = ia.UnnormalizedBatch(images=[image] * nb_images)
batch3 = ia.UnnormalizedBatch(images=[image] * nb_images)
batch_aug1 = aug.augment_batch_(batch1)
batch_aug2 = aug.augment_batch_(batch2)
batch_aug3 = aug.augment_batch_(batch3)
assert batch_aug1 is not batch_aug2
assert batch_aug1 is not batch_aug2
assert batch_aug2 is not batch_aug3
nb_equal = [0, 0, 0]
for image_aug1, image_aug2, image_aug3 in zip(batch_aug1.images_aug,
batch_aug2.images_aug,
batch_aug3.images_aug):
nb_equal[0] += int(np.array_equal(image_aug1, image_aug2))
nb_equal[1] += int(np.array_equal(image_aug1, image_aug3))
nb_equal[2] += int(np.array_equal(image_aug2, image_aug3))
assert nb_equal[0] < (0.25 + 0.1) * nb_images
assert nb_equal[1] < (0.25 + 0.1) * nb_images
assert nb_equal[2] < (0.25 + 0.1) * nb_images
def test_calls_affect_other_augmenters_with_global_rng(self):
# with calling aug1
iarandom.seed(1)
aug1 = iaa.Rot90(k=(0, 3))
aug2 = iaa.Add((0, 255))
image = np.arange(4*4).astype(np.uint8).reshape((4, 4))
nb_images = 50
batch1 = ia.UnnormalizedBatch(images=[image] * 1)
batch2 = ia.UnnormalizedBatch(images=[image] * nb_images)
batch_aug11 = aug1.augment_batch_(batch1)
batch_aug12 = aug2.augment_batch_(batch2)
# with calling aug1, repetition (to see that seed() works)
iarandom.seed(1)
aug1 = iaa.Rot90(k=(0, 3))
aug2 = iaa.Add((0, 255))
image = np.arange(4*4).astype(np.uint8).reshape((4, 4))
nb_images = 50
batch1 = ia.UnnormalizedBatch(images=[image] * 1)
batch2 = ia.UnnormalizedBatch(images=[image] * nb_images)
batch_aug21 = aug1.augment_batch_(batch1)
batch_aug22 = aug2.augment_batch_(batch2)
# without calling aug1
iarandom.seed(1)
aug2 = iaa.Add((0, 255))
image = np.arange(4*4).astype(np.uint8).reshape((4, 4))
nb_images = 50
batch2 = ia.UnnormalizedBatch(images=[image] * nb_images)
batch_aug32 = aug2.augment_batch_(batch2)
# comparison
assert np.array_equal(
np.array(batch_aug12.images_aug, dtype=np.uint8),
np.array(batch_aug22.images_aug, dtype=np.uint8)
)
assert not np.array_equal(
np.array(batch_aug12.images_aug, dtype=np.uint8),
np.array(batch_aug32.images_aug, dtype=np.uint8)
)
class TestAugmenter_augment_segmentation_maps(unittest.TestCase):
def setUp(self):
reseed()
def test_augment_segmentation_maps_single_instance(self):
arr = np.int32([
[0, 1, 1],
[0, 1, 1],
[0, 1, 1]
])
segmap = ia.SegmentationMapsOnImage(arr, shape=(3, 3))
aug = iaa.Identity()
segmap_aug = aug.augment_segmentation_maps(segmap)
assert np.array_equal(segmap_aug.arr, segmap.arr)
def test_augment_segmentation_maps_list_of_single_instance(self):
arr = np.int32([
[0, 1, 1],
[0, 1, 1],
[0, 1, 1]
])
segmap = ia.SegmentationMapsOnImage(arr, shape=(3, 3))
aug = iaa.Identity()
segmap_aug = aug.augment_segmentation_maps([segmap])[0]
assert np.array_equal(segmap_aug.arr, segmap.arr)
def test_augment_segmentation_maps_affine(self):
arr = np.int32([
[0, 1, 1],
[0, 1, 1],
[0, 1, 1]
])
segmap = ia.SegmentationMapsOnImage(arr, shape=(3, 3))
aug = iaa.Affine(translate_px={"x": 1})
segmap_aug = aug.augment_segmentation_maps(segmap)
expected = np.int32([
[0, 0, 1],
[0, 0, 1],
[0, 0, 1]
])
expected = expected[:, :, np.newaxis]
assert np.array_equal(segmap_aug.arr, expected)
def test_augment_segmentation_maps_pad(self):
arr = np.int32([
[0, 1, 1],
[0, 1, 1],
[0, 1, 1]
])
segmap = ia.SegmentationMapsOnImage(arr, shape=(3, 3))
aug = iaa.Pad(px=(1, 0, 0, 0), keep_size=False)
segmap_aug = aug.augment_segmentation_maps(segmap)
expected = np.int32([
[0, 0, 0],
[0, 1, 1],
[0, 1, 1],
[0, 1, 1]
])
expected = expected[:, :, np.newaxis]
assert np.array_equal(segmap_aug.arr, expected)
def test_augment_segmentation_maps_pad_some_classes_not_provided(self):
# only classes 0 and 3
arr = np.int32([
[0, 3, 3],
[0, 3, 3],
[0, 3, 3]
])
segmap = ia.SegmentationMapsOnImage(arr, shape=(3, 3))
aug = iaa.Pad(px=(1, 0, 0, 0), keep_size=False)
segmap_aug = aug.augment_segmentation_maps(segmap)
expected = np.int32([
[0, 0, 0],
[0, 3, 3],
[0, 3, 3],
[0, 3, 3]
])
expected = expected[:, :, np.newaxis]
assert np.array_equal(segmap_aug.arr, expected)
def test_augment_segmentation_maps_pad_only_background_class(self):
# only class 0
arr = np.int32([
[0, 0, 0],
[0, 0, 0],
[0, 0, 0]
])
segmap = ia.SegmentationMapsOnImage(arr, shape=(3, 3))
aug = iaa.Pad(px=(1, 0, 0, 0), keep_size=False)
segmap_aug = aug.augment_segmentation_maps(segmap)
expected = np.int32([
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0]
])
expected = expected[:, :, np.newaxis]
assert np.array_equal(segmap_aug.arr, expected)
def test_augment_segmentation_maps_multichannel_rot90(self):
segmap = ia.SegmentationMapsOnImage(
np.arange(0, 4*4).reshape((4, 4, 1)).astype(np.int32),
shape=(4, 4, 3)
)
aug = iaa.Rot90(1, keep_size=False)
segmaps_aug = aug.augment_segmentation_maps([segmap, segmap, segmap])
for i in range(3):
assert np.allclose(segmaps_aug[i].arr, np.rot90(segmap.arr, -1))
class TestAugmenter_draw_grid(unittest.TestCase):
def setUp(self):
reseed()
def test_draw_grid_list_of_3d_arrays(self):
# list, shape (3, 3, 3)
aug = _DummyAugmenter()
image = np.zeros((3, 3, 3), dtype=np.uint8)
image[0, 0, :] = 10
image[0, 1, :] = 50
image[1, 1, :] = 255
grid = aug.draw_grid([image], rows=2, cols=2)
grid_expected = np.vstack([
np.hstack([image, image]),
np.hstack([image, image])
])
assert np.array_equal(grid, grid_expected)
def test_draw_grid_list_of_2d_arrays(self):
# list, shape (3, 3)
aug = _DummyAugmenter()
image = np.zeros((3, 3, 3), dtype=np.uint8)
image[0, 0, :] = 10
image[0, 1, :] = 50
image[1, 1, :] = 255
grid = aug.draw_grid([image[..., 0]], rows=2, cols=2)
grid_expected = np.vstack([
np.hstack([image[..., 0:1], image[..., 0:1]]),
np.hstack([image[..., 0:1], image[..., 0:1]])
])
grid_expected = np.tile(grid_expected, (1, 1, 3))
assert np.array_equal(grid, grid_expected)
def test_draw_grid_list_of_1d_arrays_fails(self):
# list, shape (2,)
aug = _DummyAugmenter()
with self.assertRaises(Exception):
_ = aug.draw_grid([np.zeros((2,), dtype=np.uint8)], rows=2, cols=2)
def test_draw_grid_4d_array(self):
# array, shape (1, 3, 3, 3)
aug = _DummyAugmenter()
image = np.zeros((3, 3, 3), dtype=np.uint8)
image[0, 0, :] = 10
image[0, 1, :] = 50
image[1, 1, :] = 255
grid = aug.draw_grid(np.uint8([image]), rows=2, cols=2)
grid_expected = np.vstack([
np.hstack([image, image]),
np.hstack([image, image])
])
assert np.array_equal(grid, grid_expected)
def test_draw_grid_3d_array(self):
# array, shape (3, 3, 3)
aug = _DummyAugmenter()
image = np.zeros((3, 3, 3), dtype=np.uint8)
image[0, 0, :] = 10
image[0, 1, :] = 50
image[1, 1, :] = 255
grid = aug.draw_grid(image, rows=2, cols=2)
grid_expected = np.vstack([
np.hstack([image, image]),
np.hstack([image, image])
])
assert np.array_equal(grid, grid_expected)
def test_draw_grid_2d_array(self):
# array, shape (3, 3)
aug = _DummyAugmenter()
image = np.zeros((3, 3, 3), dtype=np.uint8)
image[0, 0, :] = 10
image[0, 1, :] = 50
image[1, 1, :] = 255
grid = aug.draw_grid(image[..., 0], rows=2, cols=2)
grid_expected = np.vstack([
np.hstack([image[..., 0:1], image[..., 0:1]]),
np.hstack([image[..., 0:1], image[..., 0:1]])
])
grid_expected = np.tile(grid_expected, (1, 1, 3))
assert np.array_equal(grid, grid_expected)
def test_draw_grid_1d_array(self):
# array, shape (2,)
aug = _DummyAugmenter()
with self.assertRaises(Exception):
_ = aug.draw_grid(np.zeros((2,), dtype=np.uint8), rows=2, cols=2)
@six.add_metaclass(ABCMeta)
class _TestAugmenter_augment_cbaois(object):
"""Class that is used to test augment_polygons() and augment_line_strings().
Originally this was only used for polygons and then made more flexible.
This is why some descriptions are still geared towards polygons.
Abbreviations:
cba = coordinate based augmentable, e.g. Polygon
cbaoi = coordinate based augmentable on image, e.g. PolygonsOnImage
"""
def setUp(self):
reseed()
@abstractmethod
def _augfunc(self, augmenter, *args, **kwargs):
"""Return augmenter.augment_*(...)."""
@property
@abstractmethod
def _ObjClass(self):
"""Return Polygon, LineString or similar class."""
@property
@abstractmethod
def _ObjOnImageClass(self):
"""Return PolygonsOnImage, LineStringsOnImage or similar class."""
def _Obj(self, *args, **kwargs):
return self._ObjClass(*args, **kwargs)
def _ObjOnImage(self, *args, **kwargs):
return self._ObjOnImageClass(*args, **kwargs)
def _compare_coords_of_cba(self, observed, expected, atol=1e-4, rtol=0):
return np.allclose(observed, expected, atol=atol, rtol=rtol)
def test_single_empty_instance(self):
# single instance of PolygonsOnImage with 0 polygons
aug = iaa.Rot90(1, keep_size=False)
cbaoi = self._ObjOnImage([], shape=(10, 11, 3))
cbaoi_aug = self._augfunc(aug, cbaoi)
assert isinstance(cbaoi_aug, self._ObjOnImageClass)
assert cbaoi_aug.empty
assert cbaoi_aug.shape == (11, 10, 3)
def test_list_of_single_empty_instance(self):
# list of PolygonsOnImage with 0 polygons
aug = iaa.Rot90(1, keep_size=False)
cbaoi = self._ObjOnImage([], shape=(10, 11, 3))
cbaois_aug = self._augfunc(aug, [cbaoi])
assert isinstance(cbaois_aug, list)
assert isinstance(cbaois_aug[0], self._ObjOnImageClass)
assert cbaois_aug[0].empty
assert cbaois_aug[0].shape == (11, 10, 3)
def test_two_cbaois_each_two_cbas(self):
# 2 PolygonsOnImage, each 2 polygons
aug = iaa.Rot90(1, keep_size=False)
cbaois = [
self._ObjOnImage(
[self._Obj([(0, 0), (5, 0), (5, 5)]),
self._Obj([(1, 1), (6, 1), (6, 6)])],
shape=(10, 10, 3)),
self._ObjOnImage(
[self._Obj([(2, 2), (7, 2), (7, 7)]),
self._Obj([(3, 3), (8, 3), (8, 8)])],
shape=(10, 10, 3)),
]
cbaois_aug = self._augfunc(aug, cbaois)
assert isinstance(cbaois_aug, list)
assert isinstance(cbaois_aug[0], self._ObjOnImageClass)
assert isinstance(cbaois_aug[0], self._ObjOnImageClass)
assert len(cbaois_aug[0].items) == 2
assert len(cbaois_aug[1].items) == 2
kp_offset = 0
assert self._compare_coords_of_cba(
cbaois_aug[0].items[0].coords,
[(10-0+kp_offset, 0), (10-0+kp_offset, 5), (10-5+kp_offset, 5)],
atol=1e-4, rtol=0
)
assert self._compare_coords_of_cba(
cbaois_aug[0].items[1].coords,
[(10-1+kp_offset, 1), (10-1+kp_offset, 6), (10-6+kp_offset, 6)],
atol=1e-4, rtol=0
)
assert self._compare_coords_of_cba(
cbaois_aug[1].items[0].coords,
[(10-2+kp_offset, 2), (10-2+kp_offset, 7), (10-7+kp_offset, 7)],
atol=1e-4, rtol=0
)
assert self._compare_coords_of_cba(
cbaois_aug[1].items[1].coords,
[(10-3+kp_offset, 3), (10-3+kp_offset, 8), (10-8+kp_offset, 8)],
atol=1e-4, rtol=0
)
assert cbaois_aug[0].shape == (10, 10, 3)
assert cbaois_aug[1].shape == (10, 10, 3)
def test_randomness_between_and_within_batches(self):
# test whether there is randomness within each batch and between
# batches
aug = iaa.Rot90((0, 3), keep_size=False)
cba = self._Obj([(0, 0), (5, 0), (5, 5)])
cbaoi = self._ObjOnImage(
[cba.deepcopy() for _ in sm.xrange(1)],
shape=(10, 11, 3)
)
cbaois = [cbaoi.deepcopy() for _ in sm.xrange(100)]
cbaois_aug1 = self._augfunc(aug, cbaois)
cbaois_aug2 = self._augfunc(aug, cbaois)
# --> different between runs
cbas1 = [cba
for cbaoi in cbaois_aug1
for cba in cbaoi.items]
cbas2 = [cba
for cbaoi in cbaois_aug2
for cba in cbaoi.items]
assert len(cbas1) == len(cbas2)
same = []
for cba1, cba2 in zip(cbas1, cbas2):
points1 = np.float32(cba1.coords)
points2 = np.float32(cba2.coords)
same.append(self._compare_coords_of_cba(points1, points2,
atol=1e-2, rtol=0))
assert not np.all(same)
# --> different between PolygonOnImages
same = []
points1 = np.float32([cba.coords
for cba
in cbaois_aug1[0].items])
for cba in cbaois_aug1[1:]:
points2 = np.float32([cba.coords
for cba
in cba.items])
same.append(self._compare_coords_of_cba(points1, points2,
atol=1e-2, rtol=0))
assert not np.all(same)
# --> different between polygons
points1 = set()
for cba in cbaois_aug1[0].items:
for point in cba.coords:
points1.add(tuple(
[int(point[0]*10), int(point[1]*10)]
))
assert len(points1) > 1
def test_determinism(self):
aug = iaa.Rot90((0, 3), keep_size=False)
aug_det = aug.to_deterministic()
cba = self._Obj([(0, 0), (5, 0), (5, 5)])
cbaoi = self._ObjOnImage(
[cba.deepcopy() for _ in sm.xrange(1)],
shape=(10, 11, 3)
)
cbaois = [cbaoi.deepcopy() for _ in sm.xrange(100)]
cbaois_aug1 = self._augfunc(aug_det, cbaois)
cbaois_aug2 = self._augfunc(aug_det, cbaois)
# --> different between PolygonsOnImages
same = []
points1 = np.float32([cba.coords
for cba
in cbaois_aug1[0].items])
for cbaoi in cbaois_aug1[1:]:
points2 = np.float32([cba.coords
for cba
in cbaoi.items])
same.append(self._compare_coords_of_cba(points1, points2,
atol=1e-2, rtol=0))
assert not np.all(same)
# --> similar between augmentation runs
cbas1 = [cba
for cbaoi in cbaois_aug1
for cba in cbaoi.items]
cbas2 = [cba
for cbaoi in cbaois_aug2
for cba in cbaoi.items]
assert len(cbas1) == len(cbas2)
for cba1, cba2 in zip(cbas1, cbas2):
points1 = np.float32(cba1.coords)
points2 = np.float32(cba2.coords)
assert self._compare_coords_of_cba(points1, points2,
atol=1e-2, rtol=0)
def test_aligned_with_images(self):
aug = iaa.Rot90((0, 3), keep_size=False)
aug_det = aug.to_deterministic()
image = np.zeros((10, 20), dtype=np.uint8)
image[5, :] = 255
image[2:5, 10] = 255
image_rots = [iaa.Rot90(k, keep_size=False).augment_image(image)
for k in [0, 1, 2, 3]]
cba = self._Obj([(0, 0), (10, 0), (10, 20)])
kp_offs = 0 # offset
cbas_rots = [
[(0, 0), (10, 0), (10, 20)],
[(10-0+kp_offs, 0), (10-0+kp_offs, 10), (10-20+kp_offs, 10)],
[(20-0+kp_offs, 10), (20-10+kp_offs, 10), (20-10+kp_offs, -10)],
[(10-10+kp_offs, 20), (10-10+kp_offs, 10), (10-(-10)+kp_offs, 10)]
]
cbaois = [self._ObjOnImage([cba], shape=image.shape)
for _ in sm.xrange(50)]
images_aug = aug_det.augment_images([image] * 50)
cbaois_aug = self._augfunc(aug_det, cbaois)
seen = set()
for image_aug, cbaoi_aug in zip(images_aug, cbaois_aug):
found_image = False
for img_rot_idx, img_rot in enumerate(image_rots):
if (image_aug.shape == img_rot.shape
and np.allclose(image_aug, img_rot)):
found_image = True
break
found_cba = False
for poly_rot_idx, cba_rot in enumerate(cbas_rots):
coords_observed = cbaoi_aug.items[0].coords
if self._compare_coords_of_cba(coords_observed, cba_rot):
found_cba = True
break
assert found_image
assert found_cba
assert img_rot_idx == poly_rot_idx
seen.add((img_rot_idx, poly_rot_idx))
assert 2 <= len(seen) <= 4 # assert not always the same rot
def test_aligned_with_images_despite_empty_instances(self):
# Test if augmenting lists of e.g. PolygonsOnImage is still aligned
# with image augmentation when one e.g. PolygonsOnImage instance is
# empty (e.g. contains no polygons)
cba = self._Obj([(0, 0), (5, 0), (5, 5), (0, 5)])
cbaoi_lst = [
self._ObjOnImage([cba.deepcopy()], shape=(10, 20)),
self._ObjOnImage([cba.deepcopy()], shape=(10, 20)),
self._ObjOnImage([cba.shift(x=1)], shape=(10, 20)),
self._ObjOnImage([cba.deepcopy()], shape=(10, 20)),
self._ObjOnImage([cba.deepcopy()], shape=(10, 20)),
self._ObjOnImage([], shape=(1, 8)),
self._ObjOnImage([cba.deepcopy()], shape=(10, 20)),
self._ObjOnImage([cba.deepcopy()], shape=(10, 20)),
self._ObjOnImage([cba.shift(x=1)], shape=(10, 20)),
self._ObjOnImage([cba.deepcopy()], shape=(10, 20)),
self._ObjOnImage([cba.deepcopy()], shape=(10, 20))
]
image = np.zeros((10, 20), dtype=np.uint8)
image[0, 0] = 255
image[0, 5] = 255
image[5, 5] = 255
image[5, 0] = 255
images = np.tile(image[np.newaxis, :, :], (len(cbaoi_lst), 1, 1))
aug = iaa.Affine(translate_px={"x": (0, 8)}, order=0, mode="constant",
cval=0)
for _ in sm.xrange(10):
for is_list in [False, True]:
aug_det = aug.to_deterministic()
inputs = images
if is_list:
inputs = list(inputs)
images_aug = aug_det.augment_images(inputs)
cbaoi_aug_lst = self._augfunc(aug_det, cbaoi_lst)
if is_list:
images_aug = np.array(images_aug, dtype=np.uint8)
translations_imgs = np.argmax(images_aug[:, 0, :], axis=1)
translations_points = [
(cbaoi.items[0].coords[0][0] if not cbaoi.empty else None)
for cbaoi
in cbaoi_aug_lst]
assert len([
pointresult for
pointresult
in translations_points
if pointresult is None
]) == 1
assert translations_points[5] is None
translations_imgs = np.concatenate(
[translations_imgs[0:5], translations_imgs[6:]])
translations_points = np.array(
translations_points[0:5] + translations_points[6:],
dtype=translations_imgs.dtype)
translations_points[2] -= 1
translations_points[8-1] -= 1
assert np.array_equal(translations_imgs, translations_points)
# This is the same as _ConcavePolygonRecoverer, but we make sure that we
# always sample random values. This is to advance the state of random_state
# and ensure that this breaks not alignment.
class _DummyRecoverer(_ConcavePolygonRecoverer):
def recover_from(self, new_exterior, old_polygon, random_state=0):
# sample lots of values to ensure that the RNG is advanced
_ = random_state.integers(0, 2**30, 100)
return super(_DummyRecoverer, self).recover_from(
new_exterior, old_polygon, random_state=random_state)
class _DummyAugmenterWithRecoverer(iaa.Augmenter):
def __init__(self, use_recoverer=True):
super(_DummyAugmenterWithRecoverer, self).__init__()
self.random_samples_images = []
self.random_samples_kps = []
if use_recoverer:
self.recoverer = _DummyRecoverer()
else:
self.recoverer = None
def _augment_images(self, images, random_state, parents, hooks):
sample = random_state.integers(0, 2**30)
self.random_samples_images.append(sample)
return images
def _augment_polygons(self, polygons_on_images, random_state, parents,
hooks):
return self._augment_polygons_as_keypoints(
polygons_on_images, random_state, parents, hooks,
recoverer=self.recoverer)
def _augment_keypoints(self, keypoints_on_images, random_state, parents,
hooks):
sample = random_state.integers(0, 2**30)
self.random_samples_kps.append(sample)
assert len(keypoints_on_images) in [1, 2]
assert len(keypoints_on_images[0].keypoints) == 7
result = []
for _ in keypoints_on_images:
# every second call of _augment_polygons()...
if len(self.random_samples_kps) % 2 == 1:
# not concave
kpsoi = ia.KeypointsOnImage([
ia.Keypoint(x=0, y=0),
ia.Keypoint(x=10, y=0),
ia.Keypoint(x=10, y=4),
ia.Keypoint(x=-1, y=5),
ia.Keypoint(x=10, y=6),
ia.Keypoint(x=10, y=10),
ia.Keypoint(x=0, y=10)
], shape=(10, 10, 3))
else:
# concave
kpsoi = ia.KeypointsOnImage([
ia.Keypoint(x=0, y=0),
ia.Keypoint(x=10, y=0),
ia.Keypoint(x=10, y=4),
ia.Keypoint(x=10, y=5),
ia.Keypoint(x=10, y=6),
ia.Keypoint(x=10, y=10),
ia.Keypoint(x=0, y=10)
], shape=(10, 10, 3))
result.append(kpsoi)
return result
def get_parameters(self):
return []
class TestAugmenter_augment_polygons(_TestAugmenter_augment_cbaois,
unittest.TestCase):
def _augfunc(self, augmenter, *args, **kwargs):
return augmenter.augment_polygons(*args, **kwargs)
@property
def _ObjClass(self):
return ia.Polygon
@property
def _ObjOnImageClass(self):
return ia.PolygonsOnImage
def _coords(self, obj):
return obj.exterior
def _entities(self, obj_on_image):
return obj_on_image.polygons
def test_polygon_recoverer(self):
# This is mostly a dummy polygon. The augmenter always returns the
# same non-concave polygon.
poly = ia.Polygon([(0, 0), (10, 0),
(10, 4), (10, 5), (10, 6),
(10, 10), (0, 10)])
psoi = ia.PolygonsOnImage([poly], shape=(10, 10, 3))
aug = _DummyAugmenterWithRecoverer()
psoi_aug = aug.augment_polygons(psoi)
poly_aug = psoi_aug.polygons[0]
bb = ia.BoundingBox(x1=0, y1=0, x2=10, y2=10)
bb_aug = ia.BoundingBox(
x1=np.min(poly_aug.exterior[:, 0]),
y1=np.min(poly_aug.exterior[:, 1]),
x2=np.max(poly_aug.exterior[:, 0]),
y2=np.max(poly_aug.exterior[:, 1])
)
assert bb.iou(bb_aug) > 0.9
assert psoi_aug.polygons[0].is_valid
def test_polygon_aligned_without_recoverer(self):
# This is mostly a dummy polygon. The augmenter always returns the
# same non-concave polygon.
poly = ia.Polygon([(0, 0), (10, 0),
(10, 4), (10, 5), (10, 6),
(10, 10), (0, 10)])
psoi = ia.PolygonsOnImage([poly], shape=(10, 10, 3))
image = np.zeros((10, 10, 3))
aug = _DummyAugmenterWithRecoverer(use_recoverer=False)
images_aug1, psois_aug1 = aug(images=[image, image],
polygons=[psoi, psoi])
images_aug2, psois_aug2 = aug(images=[image, image],
polygons=[psoi, psoi])
images_aug3, psois_aug3 = aug(images=[image, image],
polygons=[psoi, psoi])
images_aug4, psois_aug4 = aug(images=[image, image],
polygons=[psoi, psoi])
assert not psois_aug1[0].polygons[0].is_valid
assert not psois_aug1[1].polygons[0].is_valid
assert psois_aug2[0].polygons[0].is_valid
assert psois_aug2[1].polygons[0].is_valid
assert not psois_aug3[0].polygons[0].is_valid
assert not psois_aug3[1].polygons[0].is_valid
assert psois_aug4[0].polygons[0].is_valid
assert psois_aug4[1].polygons[0].is_valid
assert aug.random_samples_images == aug.random_samples_kps
def test_polygon_aligned_with_recoverer(self):
# This is mostly a dummy polygon. The augmenter always returns the
# same non-concave polygon.
poly = ia.Polygon([(0, 0), (10, 0),
(10, 4), (10, 5), (10, 6),
(10, 10), (0, 10)])
psoi = ia.PolygonsOnImage([poly], shape=(10, 10, 3))
image = np.zeros((10, 10, 3))
aug = _DummyAugmenterWithRecoverer(use_recoverer=True)
images_aug1, psois_aug1 = aug(images=[image, image],
polygons=[psoi, psoi])
images_aug2, psois_aug2 = aug(images=[image, image],
polygons=[psoi, psoi])
images_aug3, psois_aug3 = aug(images=[image, image],
polygons=[psoi, psoi])
images_aug4, psois_aug4 = aug(images=[image, image],
polygons=[psoi, psoi])
assert psois_aug1[0].polygons[0].is_valid
assert psois_aug1[1].polygons[0].is_valid
assert psois_aug2[0].polygons[0].is_valid
assert psois_aug2[1].polygons[0].is_valid
assert psois_aug3[0].polygons[0].is_valid
assert psois_aug3[1].polygons[0].is_valid
assert psois_aug4[0].polygons[0].is_valid
assert psois_aug4[1].polygons[0].is_valid
assert aug.random_samples_images == aug.random_samples_kps
class TestAugmenter_augment_line_strings(_TestAugmenter_augment_cbaois,
unittest.TestCase):
def _augfunc(self, augmenter, *args, **kwargs):
return augmenter.augment_line_strings(*args, **kwargs)
@property
def _ObjClass(self):
return ia.LineString
@property
def _ObjOnImageClass(self):
return ia.LineStringsOnImage
class TestAugmenter_augment_bounding_boxes(_TestAugmenter_augment_cbaois,
unittest.TestCase):
def _augfunc(self, augmenter, *args, **kwargs):
return augmenter.augment_bounding_boxes(*args, **kwargs)
@property
def _ObjClass(self):
return ia.BoundingBox
@property
def _ObjOnImageClass(self):
return ia.BoundingBoxesOnImage
def _Obj(self, *args, **kwargs):
assert len(args) == 1
coords = np.float32(args[0]).reshape((-1, 2))
x1 = np.min(coords[:, 0])
y1 = np.min(coords[:, 1])
x2 = np.max(coords[:, 0])
y2 = np.max(coords[:, 1])
return self._ObjClass(x1=x1, y1=y1, x2=x2, y2=y2, **kwargs)
def _compare_coords_of_cba(self, observed, expected, atol=1e-4, rtol=0):
observed = np.float32(observed).reshape((-1, 2))
expected = np.float32(expected).reshape((-1, 2))
assert observed.shape[0] == 2
assert expected.shape[1] == 2
obs_x1 = np.min(observed[:, 0])
obs_y1 = np.min(observed[:, 1])
obs_x2 = np.max(observed[:, 0])
obs_y2 = np.max(observed[:, 1])
exp_x1 = np.min(expected[:, 0])
exp_y1 = np.min(expected[:, 1])
exp_x2 = np.max(expected[:, 0])
exp_y2 = np.max(expected[:, 1])
return np.allclose(
[obs_x1, obs_y1, obs_x2, obs_y2],
[exp_x1, exp_y1, exp_x2, exp_y2],
atol=atol, rtol=rtol)
# the method is mostly tested indirectly, so very few tests here
class TestAugmenter_augment_bounding_boxes_by_keypoints(unittest.TestCase):
def test_x_min_max(self):
# ensure that min() and max() are applied to augmented x-coordinates
# when they are converted back to BBs
class _ShiftingXCoordAugmenter(iaa.Augmenter):
def _augment_images(self, images, random_state, parents, hooks):
return images
def _augment_bounding_boxes(self, bounding_boxes_on_images,
random_state, parents, hooks):
return self._augment_bounding_boxes_as_keypoints(
bounding_boxes_on_images, random_state, parents, hooks)
def _augment_keypoints(self, keypoints_on_images, random_state,
parents, hooks):
keypoints_on_images[0].keypoints[0].x += 10
keypoints_on_images[0].keypoints[1].x -= 10
return keypoints_on_images
def get_parameters(self):
return []
aug = _ShiftingXCoordAugmenter()
bbsoi = ia.BoundingBoxesOnImage([
ia.BoundingBox(x1=0, y1=1, x2=2, y2=3)], shape=(10, 10, 3))
observed = aug(bounding_boxes=bbsoi)
assert np.allclose(
observed.bounding_boxes[0].coords,
[(2-10, 1), (0+10, 3)]
)
def test_y_min_max(self):
# ensure that min() and max() are applied to augmented y-coordinates
# when they are converted back to BBs
class _ShiftingYCoordAugmenter(iaa.Augmenter):
def _augment_images(self, images, random_state, parents, hooks):
return images
def _augment_bounding_boxes(self, bounding_boxes_on_images,
random_state, parents, hooks):
return self._augment_bounding_boxes_as_keypoints(
bounding_boxes_on_images, random_state, parents, hooks)
def _augment_keypoints(self, keypoints_on_images, random_state,
parents, hooks):
keypoints_on_images[0].keypoints[0].y += 10
keypoints_on_images[0].keypoints[1].y -= 10
return keypoints_on_images
def get_parameters(self):
return []
aug = _ShiftingYCoordAugmenter()
bbsoi = ia.BoundingBoxesOnImage([
ia.BoundingBox(x1=0, y1=1, x2=2, y2=3)], shape=(10, 10, 3))
observed = aug(bounding_boxes=bbsoi)
assert np.allclose(
observed.bounding_boxes[0].coords,
[(0, 1-10), (2, 1+10)]
)
def test_x1_x2_can_get_flipped(self):
# ensure that augmented x-coordinates where x1>x2 are flipped
# before creating BBs from them
class _FlippingX1X2Augmenter(iaa.Augmenter):
def _augment_images(self, images, random_state, parents, hooks):
return images
def _augment_bounding_boxes(self, bounding_boxes_on_images,
random_state, parents, hooks):
return self._augment_bounding_boxes_as_keypoints(
bounding_boxes_on_images, random_state, parents, hooks)
def _augment_keypoints(self, keypoints_on_images, random_state,
parents, hooks):
keypoints_on_images[0].keypoints[0].x += 10 # top left
keypoints_on_images[0].keypoints[3].x += 10 # bottom left
return keypoints_on_images
def get_parameters(self):
return []
aug = _FlippingX1X2Augmenter()
bbsoi = ia.BoundingBoxesOnImage([
ia.BoundingBox(x1=0, y1=1, x2=2, y2=3)], shape=(10, 10, 3))
observed = aug(bounding_boxes=bbsoi)
assert np.allclose(
observed.bounding_boxes[0].coords,
[(2, 1), (0+10, 3)]
)
def test_y1_y2_can_get_flipped(self):
# ensure that augmented y-coordinates where y1>y2 are flipped
# before creating BBs from them
class _FlippingY1Y2Augmenter(iaa.Augmenter):
def _augment_images(self, images, random_state, parents, hooks):
return images
def _augment_bounding_boxes(self, bounding_boxes_on_images,
random_state, parents, hooks):
return self._augment_bounding_boxes_as_keypoints(
bounding_boxes_on_images, random_state, parents, hooks)
def _augment_keypoints(self, keypoints_on_images, random_state,
parents, hooks):
keypoints_on_images[0].keypoints[0].y += 10 # top left
keypoints_on_images[0].keypoints[1].y += 10 # top right
return keypoints_on_images
def get_parameters(self):
return []
aug = _FlippingY1Y2Augmenter()
bbsoi = ia.BoundingBoxesOnImage([
ia.BoundingBox(x1=0, y1=1, x2=2, y2=3)], shape=(10, 10, 3))
observed = aug(bounding_boxes=bbsoi)
assert np.allclose(
observed.bounding_boxes[0].coords,
[(0, 3), (2, 1+10)]
)
class TestAugmenter_augment(unittest.TestCase):
def setUp(self):
reseed()
def test_image(self):
aug = iaa.Identity()
image = ia.quokka((128, 128), extract="square")
image_aug = aug.augment(image=image)
assert image_aug.shape == image.shape
assert np.array_equal(image_aug, image)
def test_images_list(self):
aug = iaa.Identity()
image = ia.quokka((128, 128), extract="square")
images_aug = aug.augment(images=[image])
assert images_aug[0].shape == image.shape
assert np.array_equal(images_aug[0], image)
def test_images_and_heatmaps(self):
aug = iaa.Identity()
image = ia.quokka((128, 128), extract="square")
heatmaps = ia.quokka_heatmap((128, 128), extract="square")
images_aug, heatmaps_aug = aug.augment(images=[image],
heatmaps=[heatmaps])
assert np.array_equal(images_aug[0], image)
assert np.allclose(heatmaps_aug[0].arr_0to1, heatmaps.arr_0to1)
def test_images_and_segmentation_maps(self):
aug = iaa.Identity()
image = ia.quokka((128, 128), extract="square")
segmaps = ia.quokka_segmentation_map((128, 128), extract="square")
images_aug, segmaps_aug = aug.augment(images=[image],
segmentation_maps=[segmaps])
assert np.array_equal(images_aug[0], image)
assert np.allclose(segmaps_aug[0].arr, segmaps.arr)
def test_images_and_keypoints(self):
aug = iaa.Identity()
image = ia.quokka((128, 128), extract="square")
keypoints = ia.quokka_keypoints((128, 128), extract="square")
images_aug, keypoints_aug = aug.augment(images=[image],
keypoints=[keypoints])
assert np.array_equal(images_aug[0], image)
assert_cbaois_equal(keypoints_aug[0], keypoints)
def test_images_and_polygons(self):
aug = iaa.Identity()
image = ia.quokka((128, 128), extract="square")
polygons = ia.quokka_polygons((128, 128), extract="square")
images_aug, polygons_aug = aug.augment(images=[image],
polygons=[polygons])
assert np.array_equal(images_aug[0], image)
assert_cbaois_equal(polygons_aug[0], polygons)
def test_images_and_line_strings(self):
aug = iaa.Identity()
image = ia.quokka((128, 128), extract="square")
psoi = ia.quokka_polygons((128, 128), extract="square")
lsoi = ia.LineStringsOnImage([
psoi.polygons[0].to_line_string(closed=False)
], shape=psoi.shape)
images_aug, lsoi_aug = aug.augment(images=[image],
line_strings=[lsoi])
assert np.array_equal(images_aug[0], image)
assert_cbaois_equal(lsoi_aug[0], lsoi)
def test_images_and_bounding_boxes(self):
aug = iaa.Identity()
image = ia.quokka((128, 128), extract="square")
bbs = ia.quokka_bounding_boxes((128, 128), extract="square")
images_aug, bbs_aug = aug.augment(images=[image], bounding_boxes=[bbs])
assert np.array_equal(images_aug[0], image)
assert_cbaois_equal(bbs_aug[0], bbs)
def test_image_return_batch(self):
aug = iaa.Identity()
image = ia.quokka((128, 128), extract="square")
batch = aug.augment(image=image, return_batch=True)
image_aug = batch.images_aug[0]
assert np.array_equal(image, image_aug)
def test_images_and_heatmaps_return_batch(self):
aug = iaa.Identity()
image = ia.quokka((128, 128), extract="square")
heatmaps = ia.quokka_heatmap((128, 128), extract="square")
batch = aug.augment(images=[image], heatmaps=[heatmaps],
return_batch=True)
images_aug = batch.images_aug
heatmaps_aug = batch.heatmaps_aug
assert np.array_equal(images_aug[0], image)
assert np.allclose(heatmaps_aug[0].arr_0to1, heatmaps.arr_0to1)
def test_images_and_segmentation_maps_return_batch(self):
aug = iaa.Identity()
image = ia.quokka((128, 128), extract="square")
segmaps = ia.quokka_segmentation_map((128, 128), extract="square")
batch = aug.augment(images=[image], segmentation_maps=[segmaps],
return_batch=True)
images_aug = batch.images_aug
segmaps_aug = batch.segmentation_maps_aug
assert np.array_equal(images_aug[0], image)
assert np.allclose(segmaps_aug[0].arr, segmaps.arr)
def test_images_and_keypoints_return_batch(self):
aug = iaa.Identity()
image = ia.quokka((128, 128), extract="square")
keypoints = ia.quokka_keypoints((128, 128), extract="square")
batch = aug.augment(images=[image], keypoints=[keypoints],
return_batch=True)
images_aug = batch.images_aug
keypoints_aug = batch.keypoints_aug
assert np.array_equal(images_aug[0], image)
assert_cbaois_equal(keypoints_aug[0], keypoints)
def test_images_and_polygons_return_batch(self):
aug = iaa.Identity()
image = ia.quokka((128, 128), extract="square")
polygons = ia.quokka_polygons((128, 128), extract="square")
batch = aug.augment(images=[image], polygons=[polygons],
return_batch=True)
images_aug = batch.images_aug
polygons_aug = batch.polygons_aug
assert np.array_equal(images_aug[0], image)
assert_cbaois_equal(polygons_aug[0], polygons)
def test_images_and_line_strings_return_batch(self):
aug = iaa.Identity()
image = ia.quokka((128, 128), extract="square")
psoi = ia.quokka_polygons((128, 128), extract="square")
lsoi = ia.LineStringsOnImage([
psoi.polygons[0].to_line_string(closed=False)
], shape=psoi.shape)
batch = aug.augment(images=[image], line_strings=[lsoi],
return_batch=True)
images_aug = batch.images_aug
lsoi_aug = batch.line_strings_aug
assert np.array_equal(images_aug[0], image)
assert_cbaois_equal(lsoi_aug[0], lsoi)
def test_images_and_bounding_boxes_return_batch(self):
aug = iaa.Identity()
image = ia.quokka((128, 128), extract="square")
bbs = ia.quokka_bounding_boxes((128, 128), extract="square")
batch = aug.augment(images=[image], bounding_boxes=[bbs],
return_batch=True)
images_aug = batch.images_aug
bbs_aug = batch.bounding_boxes_aug
assert np.array_equal(images_aug[0], image)
assert_cbaois_equal(bbs_aug[0], bbs)
def test_non_image_data(self):
aug = iaa.Identity()
segmaps = ia.quokka_segmentation_map((128, 128), extract="square")
keypoints = ia.quokka_keypoints((128, 128), extract="square")
polygons = ia.quokka_polygons((128, 128), extract="square")
batch = aug.augment(segmentation_maps=[segmaps], keypoints=[keypoints],
polygons=[polygons], return_batch=True)
segmaps_aug = batch.segmentation_maps_aug
keypoints_aug = batch.keypoints_aug
polygons_aug = batch.polygons_aug
assert np.allclose(segmaps_aug[0].arr, segmaps.arr)
assert_cbaois_equal(keypoints_aug[0], keypoints)
assert_cbaois_equal(polygons_aug[0], polygons)
def test_non_image_data_unexpected_args_order(self):
aug = iaa.Identity()
segmaps = ia.quokka_segmentation_map((128, 128), extract="square")
keypoints = ia.quokka_keypoints((128, 128), extract="square")
polygons = ia.quokka_polygons((128, 128), extract="square")
batch = aug.augment(polygons=[polygons], segmentation_maps=[segmaps],
keypoints=[keypoints], return_batch=True)
segmaps_aug = batch.segmentation_maps_aug
keypoints_aug = batch.keypoints_aug
polygons_aug = batch.polygons_aug
assert np.allclose(segmaps_aug[0].arr, segmaps.arr)
assert np.allclose(keypoints_aug[0].to_xy_array(),
keypoints.to_xy_array())
for polygon_aug, polygon in zip(polygons_aug[0].polygons,
polygons.polygons):
assert polygon_aug.exterior_almost_equals(polygon)
def test_with_affine(self):
# make sure that augment actually does something
aug = iaa.Affine(translate_px={"x": 1}, order=0, mode="constant",
cval=0)
image = np.zeros((4, 4, 1), dtype=np.uint8) + 255
heatmaps = np.ones((1, 4, 4, 1), dtype=np.float32)
segmaps = np.ones((1, 4, 4, 1), dtype=np.int32)
kps = [(0, 0), (1, 2)]
bbs = [(0, 0, 1, 1), (1, 2, 2, 3)]
polygons = [(0, 0), (1, 0), (1, 1)]
ls = [(0, 0), (1, 0), (1, 1)]
image_aug = aug.augment(image=image)
_, heatmaps_aug = aug.augment(image=image, heatmaps=heatmaps)
_, segmaps_aug = aug.augment(image=image, segmentation_maps=segmaps)
_, kps_aug = aug.augment(image=image, keypoints=kps)
_, bbs_aug = aug.augment(image=image, bounding_boxes=bbs)
_, polygons_aug = aug.augment(image=image, polygons=polygons)
_, ls_aug = aug.augment(image=image, line_strings=ls)
# all augmentables must have been moved to the right by 1px
assert np.all(image_aug[:, 0] == 0)
assert np.all(image_aug[:, 1:] == 255)
assert np.allclose(heatmaps_aug[0][:, 0], 0.0)
assert np.allclose(heatmaps_aug[0][:, 1:], 1.0)
assert np.all(segmaps_aug[0][:, 0] == 0)
assert np.all(segmaps_aug[0][:, 1:] == 1)
assert np.allclose(kps_aug, [(1, 0), (2, 2)])
assert np.allclose(bbs_aug, [(1, 0, 2, 1), (2, 2, 3, 3)])
assert np.allclose(polygons_aug, [(1, 0), (2, 0), (2, 1)])
assert np.allclose(ls_aug, [(1, 0), (2, 0), (2, 1)])
def test_alignment(self):
# make sure that changes from augment() are aligned and vary between
# call
aug = iaa.Affine(translate_px={"x": (0, 100)}, order=0, mode="constant",
cval=0)
image = np.zeros((1, 100, 1), dtype=np.uint8) + 255
heatmaps = np.ones((1, 1, 100, 1), dtype=np.float32)
segmaps = np.ones((1, 1, 100, 1), dtype=np.int32)
kps = [(0, 0)]
bbs = [(0, 0, 1, 1)]
polygons = [(0, 0), (1, 0), (1, 1)]
ls = [(0, 0), (1, 0), (1, 1)]
seen = []
for _ in sm.xrange(10):
batch_aug = aug.augment(image=image, heatmaps=heatmaps,
segmentation_maps=segmaps, keypoints=kps,
bounding_boxes=bbs, polygons=polygons,
line_strings=ls, return_batch=True)
shift_image = np.sum(batch_aug.images_aug[0][0, :] == 0)
shift_heatmaps = np.sum(
np.isclose(batch_aug.heatmaps_aug[0][0, :, 0], 0.0))
shift_segmaps = np.sum(
batch_aug.segmentation_maps_aug[0][0, :, 0] == 0)
shift_kps = batch_aug.keypoints_aug[0][0]
shift_bbs = batch_aug.bounding_boxes_aug[0][0]
shift_polygons = batch_aug.polygons_aug[0][0]
shift_ls = batch_aug.line_strings_aug[0][0]
assert len({shift_image, shift_heatmaps, shift_segmaps,
shift_kps, shift_bbs, shift_polygons,
shift_ls}) == 1
seen.append(shift_image)
assert len(set(seen)) > 7
def test_alignment_and_same_outputs_in_deterministic_mode(self):
# make sure that changes from augment() are aligned
# and do NOT vary if the augmenter was already in deterministic mode
aug = iaa.Affine(translate_px={"x": (0, 100)}, order=0, mode="constant",
cval=0)
aug = aug.to_deterministic()
image = np.zeros((1, 100, 1), dtype=np.uint8) + 255
heatmaps = np.ones((1, 1, 100, 1), dtype=np.float32)
segmaps = np.ones((1, 1, 100, 1), dtype=np.int32)
kps = [(0, 0)]
bbs = [(0, 0, 1, 1)]
polygons = [(0, 0), (1, 0), (1, 1)]
ls = [(0, 0), (1, 0), (1, 1)]
seen = []
for _ in sm.xrange(10):
batch_aug = aug.augment(image=image, heatmaps=heatmaps,
segmentation_maps=segmaps, keypoints=kps,
bounding_boxes=bbs, polygons=polygons,
line_strings=ls,
return_batch=True)
shift_image = np.sum(batch_aug.images_aug[0][0, :] == 0)
shift_heatmaps = np.sum(
np.isclose(batch_aug.heatmaps_aug[0][0, :, 0], 0.0))
shift_segmaps = np.sum(
batch_aug.segmentation_maps_aug[0][0, :, 0] == 0)
shift_kps = batch_aug.keypoints_aug[0][0]
shift_bbs = batch_aug.bounding_boxes_aug[0][0]
shift_polygons = batch_aug.polygons_aug[0][0]
shift_ls = batch_aug.line_strings_aug[0][0]
assert len({shift_image, shift_heatmaps, shift_segmaps,
shift_kps, shift_bbs, shift_polygons,
shift_ls}) == 1
seen.append(shift_image)
assert len(set(seen)) == 1
def test_arrays_become_lists_if_augmenter_changes_shapes(self):
# make sure that arrays (of images, heatmaps, segmaps) get split to
# lists of arrays if the augmenter changes shapes in non-uniform
# (between images) ways
# we augment 100 images here with rotation of either 0deg or 90deg
# and do not resize back to the original image size afterwards, so
# shapes change
aug = iaa.Rot90([0, 1], keep_size=False)
# base_arr is (100, 1, 2) array, each containing [[0, 1]]
base_arr = np.tile(np.arange(1*2).reshape((1, 2))[np.newaxis, :, :],
(100, 1, 1))
images = np.copy(base_arr)[:, :, :, np.newaxis].astype(np.uint8)
heatmaps = (
np.copy(base_arr)[:, :, :, np.newaxis].astype(np.float32)
/ np.max(base_arr)
)
segmaps = np.copy(base_arr)[:, :, :, np.newaxis].astype(np.int32)
batch_aug = aug.augment(images=images, heatmaps=heatmaps,
segmentation_maps=segmaps,
return_batch=True)
assert isinstance(batch_aug.images_aug, list)
assert isinstance(batch_aug.heatmaps_aug, list)
assert isinstance(batch_aug.segmentation_maps_aug, list)
shapes_images = [arr.shape for arr in batch_aug.images_aug]
shapes_heatmaps = [arr.shape for arr in batch_aug.heatmaps_aug]
shapes_segmaps = [arr.shape for arr in batch_aug.segmentation_maps_aug]
assert (
[shape[0:2] for shape in shapes_images]
== [shape[0:2] for shape in shapes_heatmaps]
== [shape[0:2] for shape in shapes_segmaps]
)
assert len(set(shapes_images)) == 2
@unittest.skipIf(not IS_PY36_OR_HIGHER,
"Behaviour is only supported in python 3.6+")
def test_py_gte_36_two_outputs_none_of_them_images(self):
aug = iaa.Identity()
keypoints = ia.quokka_keypoints((128, 128), extract="square")
polygons = ia.quokka_polygons((128, 128), extract="square")
keypoints_aug, polygons_aug = aug.augment(keypoints=[keypoints],
polygons=[polygons])
assert_cbaois_equal(keypoints_aug[0], keypoints)
assert_cbaois_equal(polygons_aug[0], polygons)
@unittest.skipIf(not IS_PY36_OR_HIGHER,
"Behaviour is only supported in python 3.6+")
def test_py_gte_36_two_outputs_none_of_them_images_inverted(self):
aug = iaa.Identity()
keypoints = ia.quokka_keypoints((128, 128), extract="square")
polygons = ia.quokka_polygons((128, 128), extract="square")
polygons_aug, keypoints_aug = aug.augment(polygons=[polygons],
keypoints=[keypoints])
assert_cbaois_equal(keypoints_aug[0], keypoints)
assert_cbaois_equal(polygons_aug[0], polygons)
@unittest.skipIf(not IS_PY36_OR_HIGHER,
"Behaviour is only supported in python 3.6+")
def test_py_gte_36_two_outputs_inverted_order_heatmaps(self):
aug = iaa.Identity()
image = ia.quokka((128, 128), extract="square")
heatmaps = ia.quokka_heatmap((128, 128), extract="square")
heatmaps_aug, images_aug = aug.augment(heatmaps=[heatmaps],
images=[image])
assert np.array_equal(images_aug[0], image)
assert np.allclose(heatmaps_aug[0].arr_0to1, heatmaps.arr_0to1)
@unittest.skipIf(not IS_PY36_OR_HIGHER,
"Behaviour is only supported in python 3.6+")
def test_py_gte_36_two_outputs_inverted_order_segmaps(self):
aug = iaa.Identity()
image = ia.quokka((128, 128), extract="square")
segmaps = ia.quokka_segmentation_map((128, 128), extract="square")
segmaps_aug, images_aug = aug.augment(segmentation_maps=[segmaps],
images=[image])
assert np.array_equal(images_aug[0], image)
assert np.array_equal(segmaps_aug[0].arr, segmaps.arr)
@unittest.skipIf(not IS_PY36_OR_HIGHER,
"Behaviour is only supported in python 3.6+")
def test_py_gte_36_two_outputs_inverted_order_keypoints(self):
aug = iaa.Identity()
image = ia.quokka((128, 128), extract="square")
keypoints = ia.quokka_keypoints((128, 128), extract="square")
keypoints_aug, images_aug = aug.augment(keypoints=[keypoints],
images=[image])
assert np.array_equal(images_aug[0], image)
assert_cbaois_equal(keypoints_aug[0], keypoints)
@unittest.skipIf(not IS_PY36_OR_HIGHER,
"Behaviour is only supported in python 3.6+")
def test_py_gte_36_two_outputs_inverted_order_bbs(self):
aug = iaa.Identity()
image = ia.quokka((128, 128), extract="square")
bbs = ia.quokka_bounding_boxes((128, 128), extract="square")
bbs_aug, images_aug = aug.augment(bounding_boxes=[bbs],
images=[image])
assert np.array_equal(images_aug[0], image)
assert_cbaois_equal(bbs_aug[0], bbs)
@unittest.skipIf(not IS_PY36_OR_HIGHER,
"Behaviour is only supported in python 3.6+")
def test_py_gte_36_two_outputs_inverted_order_polygons(self):
aug = iaa.Identity()
image = ia.quokka((128, 128), extract="square")
polygons = ia.quokka_polygons((128, 128), extract="square")
polygons_aug, images_aug = aug.augment(polygons=[polygons],
images=[image])
assert np.array_equal(images_aug[0], image)
assert_cbaois_equal(polygons_aug[0], polygons)
@unittest.skipIf(not IS_PY36_OR_HIGHER,
"Behaviour is only supported in python 3.6+")
def test_py_gte_36_two_outputs_inverted_order_line_strings(self):
aug = iaa.Identity()
image = ia.quokka((128, 128), extract="square")
psoi = ia.quokka_polygons((128, 128), extract="square")
lsoi = ia.LineStringsOnImage([
psoi.polygons[0].to_line_string(closed=False)
], shape=psoi.shape)
lsoi_aug, images_aug = aug.augment(line_strings=[lsoi],
images=[image])
assert np.array_equal(images_aug[0], image)
assert_cbaois_equal(lsoi_aug[0], lsoi)
@unittest.skipIf(not IS_PY36_OR_HIGHER,
"Behaviour is only supported in python 3.6+")
def test_py_gte_36_three_inputs_expected_order(self):
aug = iaa.Identity()
image = ia.quokka((128, 128), extract="square")
heatmaps = ia.quokka_heatmap((128, 128), extract="square")
segmaps = ia.quokka_segmentation_map((128, 128), extract="square")
images_aug, heatmaps_aug, segmaps_aug = aug.augment(
images=[image],
heatmaps=[heatmaps],
segmentation_maps=[segmaps])
assert np.array_equal(images_aug[0], image)
assert np.allclose(heatmaps_aug[0].arr_0to1, heatmaps.arr_0to1)
assert np.array_equal(segmaps_aug[0].arr, segmaps.arr)
@unittest.skipIf(not IS_PY36_OR_HIGHER,
"Behaviour is only supported in python 3.6+")
def test_py_gte_36_three_inputs_expected_order2(self):
aug = iaa.Identity()
segmaps = ia.quokka_segmentation_map((128, 128), extract="square")
keypoints = ia.quokka_keypoints((128, 128), extract="square")
polygons = ia.quokka_polygons((128, 128), extract="square")
segmaps_aug, keypoints_aug, polygons_aug = aug.augment(
segmentation_maps=[segmaps],
keypoints=[keypoints],
polygons=[polygons])
assert np.array_equal(segmaps_aug[0].arr, segmaps.arr)
assert_cbaois_equal(keypoints_aug[0], keypoints)
assert_cbaois_equal(polygons_aug[0], polygons)
@unittest.skipIf(not IS_PY36_OR_HIGHER,
"Behaviour is only supported in python 3.6+")
def test_py_gte_36_three_inputs_inverted_order(self):
aug = iaa.Identity()
image = ia.quokka((128, 128), extract="square")
heatmaps = ia.quokka_heatmap((128, 128), extract="square")
segmaps = ia.quokka_segmentation_map((128, 128), extract="square")
segmaps_aug, heatmaps_aug, images_aug = aug.augment(
segmentation_maps=[segmaps],
heatmaps=[heatmaps],
images=[image])
assert np.array_equal(images_aug[0], image)
assert np.allclose(heatmaps_aug[0].arr_0to1, heatmaps.arr_0to1)
assert np.array_equal(segmaps_aug[0].arr, segmaps.arr)
@unittest.skipIf(not IS_PY36_OR_HIGHER,
"Behaviour is only supported in python 3.6+")
def test_py_gte_36_three_inputs_inverted_order2(self):
aug = iaa.Identity()
segmaps = ia.quokka_segmentation_map((128, 128), extract="square")
keypoints = ia.quokka_keypoints((128, 128), extract="square")
polygons = ia.quokka_polygons((128, 128), extract="square")
polygons_aug, keypoints_aug, segmaps_aug = aug.augment(
polygons=[polygons],
keypoints=[keypoints],
segmentation_maps=[segmaps])
assert np.array_equal(segmaps_aug[0].arr, segmaps.arr)
assert_cbaois_equal(keypoints_aug[0], keypoints)
assert_cbaois_equal(polygons_aug[0], polygons)
@unittest.skipIf(not IS_PY36_OR_HIGHER,
"Behaviour is only supported in python 3.6+")
def test_py_gte_36_all_inputs_expected_order(self):
aug = iaa.Identity()
image = ia.quokka((128, 128), extract="square")
heatmaps = ia.quokka_heatmap((128, 128), extract="square")
segmaps = ia.quokka_segmentation_map((128, 128), extract="square")
keypoints = ia.quokka_keypoints((128, 128), extract="square")
bbs = ia.quokka_bounding_boxes((128, 128), extract="square")
polygons = ia.quokka_polygons((128, 128), extract="square")
lsoi = ia.LineStringsOnImage([
polygons.polygons[0].to_line_string(closed=False)
], shape=polygons.shape)
images_aug, heatmaps_aug, segmaps_aug, keypoints_aug, bbs_aug, \
polygons_aug, lsoi_aug = aug.augment(
images=[image],
heatmaps=[heatmaps],
segmentation_maps=[segmaps],
keypoints=[keypoints],
bounding_boxes=[bbs],
polygons=[polygons],
line_strings=[lsoi])
assert np.array_equal(images_aug[0], image)
assert np.allclose(heatmaps_aug[0].arr_0to1, heatmaps.arr_0to1)
assert np.array_equal(segmaps_aug[0].arr, segmaps.arr)
assert_cbaois_equal(keypoints_aug[0], keypoints)
assert_cbaois_equal(bbs_aug[0], bbs)
assert_cbaois_equal(polygons_aug[0], polygons)
assert_cbaois_equal(lsoi_aug[0], lsoi)
@unittest.skipIf(not IS_PY36_OR_HIGHER,
"Behaviour is only supported in python 3.6+")
def test_py_gte_36_all_inputs_inverted_order(self):
aug = iaa.Identity()
image = ia.quokka((128, 128), extract="square")
heatmaps = ia.quokka_heatmap((128, 128), extract="square")
segmaps = ia.quokka_segmentation_map((128, 128), extract="square")
keypoints = ia.quokka_keypoints((128, 128), extract="square")
bbs = ia.quokka_bounding_boxes((128, 128), extract="square")
polygons = ia.quokka_polygons((128, 128), extract="square")
lsoi = ia.LineStringsOnImage([
polygons.polygons[0].to_line_string(closed=False)
], shape=polygons.shape)
lsoi_aug, polygons_aug, bbs_aug, keypoints_aug, segmaps_aug, \
heatmaps_aug, images_aug = aug.augment(
line_strings=[lsoi],
polygons=[polygons],
bounding_boxes=[bbs],
keypoints=[keypoints],
segmentation_maps=[segmaps],
heatmaps=[heatmaps],
images=[image])
assert np.array_equal(images_aug[0], image)
assert np.allclose(heatmaps_aug[0].arr_0to1, heatmaps.arr_0to1)
assert np.array_equal(segmaps_aug[0].arr, segmaps.arr)
assert_cbaois_equal(keypoints_aug[0], keypoints)
assert_cbaois_equal(bbs_aug[0], bbs)
assert_cbaois_equal(polygons_aug[0], polygons)
assert_cbaois_equal(lsoi_aug[0], lsoi)
@unittest.skipIf(IS_PY36_OR_HIGHER,
"Test checks behaviour for python <=3.5")
def test_py_lte_35_calls_without_images_fail(self):
aug = iaa.Identity()
keypoints = ia.quokka_keypoints((128, 128), extract="square")
polygons = ia.quokka_polygons((128, 128), extract="square")
got_exception = False
try:
_ = aug.augment(keypoints=[keypoints], polygons=[polygons])
except Exception as exc:
msg = "Requested two outputs from augment() that were not 'images'"
assert msg in str(exc)
got_exception = True
assert got_exception
@unittest.skipIf(IS_PY36_OR_HIGHER,
"Test checks behaviour for python <=3.5")
def test_py_lte_35_calls_with_more_than_three_args_fail(self):
aug = iaa.Identity()
image = ia.quokka((128, 128), extract="square")
heatmaps = ia.quokka_heatmap((128, 128), extract="square")
segmaps = ia.quokka_segmentation_map((128, 128), extract="square")
got_exception = False
try:
_ = aug.augment(images=[image], heatmaps=[heatmaps],
segmentation_maps=[segmaps])
except Exception as exc:
assert "Requested more than two outputs" in str(exc)
got_exception = True
assert got_exception
class TestAugmenter___call__(unittest.TestCase):
def setUp(self):
reseed()
def test_with_two_augmentables(self):
image = ia.quokka(size=(128, 128), extract="square")
heatmaps = ia.quokka_heatmap(size=(128, 128), extract="square")
images_aug, heatmaps_aug = iaa.Identity()(images=[image],
heatmaps=[heatmaps])
assert np.array_equal(images_aug[0], image)
assert np.allclose(heatmaps_aug[0].arr_0to1, heatmaps.arr_0to1)
class TestAugmenter_pool(unittest.TestCase):
def setUp(self):
reseed()
def test_pool(self):
augseq = iaa.Identity()
mock_Pool = mock.MagicMock()
mock_Pool.return_value = mock_Pool
mock_Pool.__enter__.return_value = None
mock_Pool.__exit__.return_value = None
with mock.patch("imgaug.multicore.Pool", mock_Pool):
with augseq.pool(processes=2, maxtasksperchild=10, seed=17):
pass
assert mock_Pool.call_count == 1
assert mock_Pool.__enter__.call_count == 1
assert mock_Pool.__exit__.call_count == 1
assert mock_Pool.call_args[0][0] == augseq
assert mock_Pool.call_args[1]["processes"] == 2
assert mock_Pool.call_args[1]["maxtasksperchild"] == 10
assert mock_Pool.call_args[1]["seed"] == 17
class TestAugmenter_find_augmenters_by_name(unittest.TestCase):
def setUp(self):
reseed()
@property
def seq(self):
noop1 = iaa.Identity(name="Identity")
fliplr = iaa.Fliplr(name="Fliplr")
flipud = iaa.Flipud(name="Flipud")
noop2 = iaa.Identity(name="Identity2")
seq2 = iaa.Sequential([flipud, noop2], name="Seq2")
seq1 = iaa.Sequential([noop1, fliplr, seq2], name="Seq")
return seq1, seq2
def test_find_top_element(self):
seq1, seq2 = self.seq
augs = seq1.find_augmenters_by_name("Seq")
assert len(augs) == 1
assert augs[0] == seq1
def test_find_nested_element(self):
seq1, seq2 = self.seq
augs = seq1.find_augmenters_by_name("Seq2")
assert len(augs) == 1
assert augs[0] == seq2
def test_find_list_of_names(self):
seq1, seq2 = self.seq
augs = seq1.find_augmenters_by_names(["Seq", "Seq2"])
assert len(augs) == 2
assert augs[0] == seq1
assert augs[1] == seq2
def test_find_by_regex(self):
seq1, seq2 = self.seq
augs = seq1.find_augmenters_by_name(r"Seq.*", regex=True)
assert len(augs) == 2
assert augs[0] == seq1
assert augs[1] == seq2
class TestAugmenter_find_augmenters(unittest.TestCase):
def setUp(self):
reseed()
@property
def seq(self):
noop1 = iaa.Identity(name="Identity")
fliplr = iaa.Fliplr(name="Fliplr")
flipud = iaa.Flipud(name="Flipud")
noop2 = iaa.Identity(name="Identity2")
seq2 = iaa.Sequential([flipud, noop2], name="Seq2")
seq1 = iaa.Sequential([noop1, fliplr, seq2], name="Seq")
return seq1, seq2
def test_find_by_list_of_names(self):
def _func(aug, parents):
return aug.name in ["Seq", "Seq2"]
seq1, seq2 = self.seq
augs = seq1.find_augmenters(_func)
assert len(augs) == 2
assert augs[0] == seq1
assert augs[1] == seq2
def test_use_parents_arg(self):
def _func(aug, parents):
return (
aug.name in ["Seq", "Seq2"]
and len(parents) > 0
)
seq1, seq2 = self.seq
augs = seq1.find_augmenters(_func)
assert len(augs) == 1
assert augs[0] == seq2
def test_find_by_list_of_names_flat_false(self):
def _func(aug, parents):
return aug.name in ["Seq", "Seq2"]
seq1, seq2 = self.seq
augs = seq1.find_augmenters(_func, flat=False)
assert len(augs) == 2
assert augs[0] == seq1
assert augs[1] == [seq2]
class TestAugmenter_remove(unittest.TestCase):
def setUp(self):
reseed()
@property
def seq(self):
noop1 = iaa.Identity(name="Identity")
fliplr = iaa.Fliplr(name="Fliplr")
flipud = iaa.Flipud(name="Flipud")
noop2 = iaa.Identity(name="Identity2")
seq2 = iaa.Sequential([flipud, noop2], name="Seq2")
seq1 = iaa.Sequential([noop1, fliplr, seq2], name="Seq")
return seq1
def test_remove_by_name(self):
def _func(aug, parents):
return aug.name == "Seq2"
augs = self.seq
augs = augs.remove_augmenters(_func)
seqs = augs.find_augmenters_by_name(r"Seq.*", regex=True)
assert len(seqs) == 1
assert seqs[0].name == "Seq"
def test_remove_by_name_and_parents_arg(self):
def _func(aug, parents):
return aug.name == "Seq2" and len(parents) == 0
augs = self.seq
augs = augs.remove_augmenters(_func)
seqs = augs.find_augmenters_by_name(r"Seq.*", regex=True)
assert len(seqs) == 2
assert seqs[0].name == "Seq"
assert seqs[1].name == "Seq2"
def test_remove_all_without_inplace_removal(self):
def _func(aug, parents):
return True
augs = self.seq
augs = augs.remove_augmenters(_func)
assert augs is not None
assert isinstance(augs, iaa.Identity)
def test_remove_all_with_inplace_removal(self):
def _func(aug, parents):
return aug.name == "Seq"
augs = self.seq
got_exception = False
try:
_ = augs.remove_augmenters(_func, copy=False)
except Exception as exc:
got_exception = True
expected = (
"Inplace removal of topmost augmenter requested, "
"which is currently not possible")
assert expected in str(exc)
assert got_exception
def test_remove_all_without_inplace_removal_and_no_identity(self):
def _func(aug, parents):
return True
augs = self.seq
augs = augs.remove_augmenters(_func, identity_if_topmost=False)
assert augs is None
def test_remove_all_without_inplace_removal_and_no_noop(self):
def _func(aug, parents):
return True
augs = self.seq
with warnings.catch_warnings(record=True) as caught_warnings:
warnings.simplefilter("always")
augs = augs.remove_augmenters(_func, noop_if_topmost=False)
assert len(caught_warnings) == 1
assert "deprecated" in str(caught_warnings[-1].message)
assert augs is None
class TestAugmenter_copy_random_state(unittest.TestCase):
def setUp(self):
reseed()
@property
def image(self):
return ia.quokka_square(size=(128, 128))
@property
def images(self):
return np.array([self.image] * 64, dtype=np.uint8)
@property
def source(self):
source = iaa.Sequential([
iaa.Fliplr(0.5, name="hflip"),
iaa.Dropout(0.05, name="dropout"),
iaa.Affine(translate_px=(-10, 10), name="translate",
seed=3),
iaa.GaussianBlur(1.0, name="blur", seed=4)
], seed=5)
return source
@property
def target(self):
target = iaa.Sequential([
iaa.Fliplr(0.5, name="hflip"),
iaa.Dropout(0.05, name="dropout"),
iaa.Affine(translate_px=(-10, 10), name="translate")
])
return target
def test_matching_position(self):
def _func(aug, parents):
return aug.name == "blur"
images = self.images
source = self.source
target = self.target
source.localize_random_state_()
target_cprs = target.copy_random_state(source, matching="position")
source_alt = source.remove_augmenters(_func)
images_aug_source = source_alt.augment_images(images)
images_aug_target = target_cprs.augment_images(images)
assert target_cprs.random_state.equals(source_alt.random_state)
for i in sm.xrange(3):
assert target_cprs[i].random_state.equals(
source_alt[i].random_state)
assert np.array_equal(images_aug_source, images_aug_target)
def test_matching_position_copy_determinism(self):
def _func(aug, parents):
return aug.name == "blur"
images = self.images
source = self.source
target = self.target
source.localize_random_state_()
source[0].deterministic = True
target_cprs = target.copy_random_state(
source, matching="position", copy_determinism=True)
source_alt = source.remove_augmenters(_func)
images_aug_source = source_alt.augment_images(images)
images_aug_target = target_cprs.augment_images(images)
assert target_cprs[0].deterministic is True
assert np.array_equal(images_aug_source, images_aug_target)
def test_matching_name(self):
def _func(aug, parents):
return aug.name == "blur"
images = self.images
source = self.source
target = self.target
source.localize_random_state_()
target_cprs = target.copy_random_state(source, matching="name")
source_alt = source.remove_augmenters(_func)
images_aug_source = source_alt.augment_images(images)
images_aug_target = target_cprs.augment_images(images)
assert np.array_equal(images_aug_source, images_aug_target)
def test_matching_name_copy_determinism(self):
def _func(aug, parents):
return aug.name == "blur"
images = self.images
source = self.source
target = self.target
source.localize_random_state_()
source_alt = source.remove_augmenters(_func)
source_det = source_alt.to_deterministic()
target_cprs_det = target.copy_random_state(
source_det, matching="name", copy_determinism=True)
images_aug_source1 = source_det.augment_images(images)
images_aug_target1 = target_cprs_det.augment_images(images)
images_aug_source2 = source_det.augment_images(images)
images_aug_target2 = target_cprs_det.augment_images(images)
assert np.array_equal(images_aug_source1, images_aug_source2)
assert np.array_equal(images_aug_target1, images_aug_target2)
assert np.array_equal(images_aug_source1, images_aug_target1)
assert np.array_equal(images_aug_source2, images_aug_target2)
def test_copy_fails_when_source_rngs_are_not_localized__name(self):
source = iaa.Fliplr(0.5, name="hflip")
target = iaa.Fliplr(0.5, name="hflip")
got_exception = False
try:
_ = target.copy_random_state(source, matching="name")
except Exception as exc:
got_exception = True
assert "localize_random_state" in str(exc)
assert got_exception
def test_copy_fails_when_source_rngs_are_not_localized__position(self):
source = iaa.Fliplr(0.5, name="hflip")
target = iaa.Fliplr(0.5, name="hflip")
got_exception = False
try:
_ = target.copy_random_state(source, matching="position")
except Exception as exc:
got_exception = True
assert "localize_random_state" in str(exc)
assert got_exception
def test_copy_fails_when_names_not_match_and_matching_not_tolerant(self):
source = iaa.Fliplr(0.5, name="hflip-other-name")
target = iaa.Fliplr(0.5, name="hflip")
source.localize_random_state_()
got_exception = False
try:
_ = target.copy_random_state(
source, matching="name", matching_tolerant=False)
except Exception as exc:
got_exception = True
assert "not found among source augmenters" in str(exc)
assert got_exception
def test_copy_fails_for_not_tolerant_position_matching(self):
source = iaa.Sequential([iaa.Fliplr(0.5, name="hflip"),
iaa.Fliplr(0.5, name="hflip2")])
target = iaa.Sequential([iaa.Fliplr(0.5, name="hflip")])
source.localize_random_state_()
got_exception = False
try:
_ = target.copy_random_state(
source, matching="position", matching_tolerant=False)
except Exception as exc:
got_exception = True
assert "different lengths" in str(exc)
assert got_exception
def test_copy_fails_for_unknown_matching_method(self):
source = iaa.Sequential([iaa.Fliplr(0.5, name="hflip"),
iaa.Fliplr(0.5, name="hflip2")])
target = iaa.Sequential([iaa.Fliplr(0.5, name="hflip")])
source.localize_random_state_()
got_exception = False
try:
_ = target.copy_random_state(source, matching="test")
except Exception as exc:
got_exception = True
assert "Unknown matching method" in str(exc)
assert got_exception
def test_warn_if_multiple_augmenters_with_same_name(self):
source = iaa.Sequential([iaa.Fliplr(0.5, name="hflip"),
iaa.Fliplr(0.5, name="hflip")])
target = iaa.Sequential([iaa.Fliplr(0.5, name="hflip")])
source.localize_random_state_()
with warnings.catch_warnings(record=True) as caught_warnings:
warnings.simplefilter("always")
_ = target.copy_random_state(source, matching="name")
assert len(caught_warnings) == 1
assert (
"contains multiple augmenters with the same name"
in str(caught_warnings[-1].message)
)
# TODO these tests change the input type from list to array. Might be
# reasonable to change and test that scenario separetely
class TestAugmenterHooks(unittest.TestCase):
def setUp(self):
reseed()
@property
def image(self):
image = np.array([[0, 0, 1],
[0, 0, 1],
[0, 1, 1]], dtype=np.uint8)
return np.atleast_3d(image)
@property
def image_lr(self):
image_lr = np.array([[1, 0, 0],
[1, 0, 0],
[1, 1, 0]], dtype=np.uint8)
return np.atleast_3d(image_lr)
@property
def image_lrud(self):
image_lrud = np.array([[1, 1, 0],
[1, 0, 0],
[1, 0, 0]], dtype=np.uint8)
return np.atleast_3d(image_lrud)
def test_preprocessor(self):
def preprocessor(images, augmenter, parents):
img = np.copy(images)
img[0][1, 1, 0] += 1
return img
hooks = ia.HooksImages(preprocessor=preprocessor)
seq = iaa.Sequential([iaa.Fliplr(1.0), iaa.Flipud(1.0)])
images_aug = seq.augment_images([self.image], hooks=hooks)
expected = np.copy(self.image_lrud)
expected[1, 1, 0] = 3
assert np.array_equal(images_aug[0], expected)
def test_postprocessor(self):
def postprocessor(images, augmenter, parents):
img = np.copy(images)
img[0][1, 1, 0] += 1
return img
hooks = ia.HooksImages(postprocessor=postprocessor)
seq = iaa.Sequential([iaa.Fliplr(1.0), iaa.Flipud(1.0)])
images_aug = seq.augment_images([self.image], hooks=hooks)
expected = np.copy(self.image_lrud)
expected[1, 1, 0] = 3
assert np.array_equal(images_aug[0], expected)
def test_propagator(self):
def propagator(images, augmenter, parents, default):
if "Seq" in augmenter.name:
return False
else:
return default
hooks = ia.HooksImages(propagator=propagator)
seq = iaa.Sequential([iaa.Fliplr(1.0), iaa.Flipud(1.0)])
images_aug = seq.augment_images([self.image], hooks=hooks)
assert np.array_equal(images_aug[0], self.image)
def test_activator(self):
def activator(images, augmenter, parents, default):
if "Flipud" in augmenter.name:
return False
else:
return default
hooks = ia.HooksImages(activator=activator)
seq = iaa.Sequential([iaa.Fliplr(1.0), iaa.Flipud(1.0)])
images_aug = seq.augment_images([self.image], hooks=hooks)
assert np.array_equal(images_aug[0], self.image_lr)
def test_activator_keypoints(self):
def activator(keypoints_on_images, augmenter, parents, default):
return False
hooks = ia.HooksKeypoints(activator=activator)
kps = [ia.Keypoint(x=1, y=0), ia.Keypoint(x=2, y=0),
ia.Keypoint(x=2, y=1)]
kpsoi = ia.KeypointsOnImage(kps, shape=(5, 10, 3))
aug = iaa.Affine(translate_px=1)
keypoints_aug = aug.augment_keypoints(kpsoi, hooks=hooks)
assert keypoints_equal([keypoints_aug], [kpsoi])
class TestAugmenterWithLoadedImages(unittest.TestCase):
def setUp(self):
reseed()
def test_with_cv2(self):
image = np.arange(10*20).astype(np.uint8).reshape((10, 20, 1))
image = np.tile(image, (1, 1, 3))
image[:, :, 0] += 0
image[:, :, 1] += 1
image[:, :, 2] += 2
images = image[np.newaxis, :, :, :]
image_cp = np.copy(image)
images_cp = np.copy(images)
aug_arrs = _InplaceDummyAugmenterImgsArray(1)
aug_lists = _InplaceDummyAugmenterImgsList(1)
with TemporaryDirectory() as dirpath:
imgpath = os.path.join(dirpath, "temp_cv2.png")
imageio.imwrite(imgpath, image)
image_reloaded = cv2.imread(imgpath)[:, :, ::-1]
images_reloaded = image_reloaded[np.newaxis, :, :, :]
image_aug = aug_lists(image=image_reloaded)
assert image_aug is not image_reloaded
assert np.array_equal(image_reloaded, image_cp)
assert np.array_equal(image_aug, image_cp + 1)
image_aug = aug_lists.augment_image(image=image_reloaded)
assert image_aug is not image_reloaded
assert np.array_equal(image_reloaded, image_cp)
assert np.array_equal(image_aug, image_cp + 1)
images_aug = aug_arrs(images=images_reloaded)
assert images_aug is not images_reloaded
assert np.array_equal(images_reloaded, images_cp)
assert np.array_equal(images_aug, images_cp + 1)
images_aug = aug_arrs.augment_images(images=images_reloaded)
assert images_aug is not images_reloaded
assert np.array_equal(images_reloaded, images_cp)
assert np.array_equal(images_aug, images_cp + 1)
def test_with_imageio(self):
image = np.arange(10*20).astype(np.uint8).reshape((10, 20, 1))
image = np.tile(image, (1, 1, 3))
image[:, :, 0] += 0
image[:, :, 1] += 1
image[:, :, 2] += 2
images = image[np.newaxis, :, :, :]
image_cp = np.copy(image)
images_cp = np.copy(images)
aug_arrs = _InplaceDummyAugmenterImgsArray(1)
aug_lists = _InplaceDummyAugmenterImgsList(1)
with TemporaryDirectory() as dirpath:
imgpath = os.path.join(dirpath, "temp_imageio.png")
imageio.imwrite(imgpath, image)
image_reloaded = imageio.imread(imgpath)
images_reloaded = image_reloaded[np.newaxis, :, :, :]
image_aug = aug_lists(image=image_reloaded)
assert image_aug is not image_reloaded
assert np.array_equal(image_reloaded, image_cp)
assert np.array_equal(image_aug, image_cp + 1)
image_aug = aug_lists.augment_image(image=image_reloaded)
assert image_aug is not image_reloaded
assert np.array_equal(image_reloaded, image_cp)
assert np.array_equal(image_aug, image_cp + 1)
images_aug = aug_arrs(images=images_reloaded)
assert images_aug is not images_reloaded
assert np.array_equal(images_reloaded, images_cp)
assert np.array_equal(images_aug, images_cp + 1)
images_aug = aug_arrs.augment_images(images=images_reloaded)
assert images_aug is not images_reloaded
assert np.array_equal(images_reloaded, images_cp)
assert np.array_equal(images_aug, images_cp + 1)
def test_with_pil(self):
fnames = ["asarray", "array"]
for fname in fnames:
with self.subTest(fname=fname):
image = np.arange(10*20).astype(np.uint8).reshape((10, 20, 1))
image = np.tile(image, (1, 1, 3))
image[:, :, 0] += 0
image[:, :, 1] += 1
image[:, :, 2] += 2
images = image[np.newaxis, :, :, :]
image_cp = np.copy(image)
images_cp = np.copy(images)
aug_arrs = _InplaceDummyAugmenterImgsArray(1)
aug_lists = _InplaceDummyAugmenterImgsList(1)
with TemporaryDirectory() as dirpath:
imgpath = os.path.join(dirpath,
"temp_pil_%s.png" % (fname,))
imageio.imwrite(imgpath, image)
image_reloaded = getattr(np, fname)(PIL.Image.open(imgpath))
images_reloaded = image_reloaded[np.newaxis, :, :, :]
image_aug = aug_lists(image=image_reloaded)
assert image_aug is not image_reloaded
assert np.array_equal(image_reloaded, image_cp)
assert np.array_equal(image_aug, image_cp + 1)
image_aug = aug_lists.augment_image(image=image_reloaded)
assert image_aug is not image_reloaded
assert np.array_equal(image_reloaded, image_cp)
assert np.array_equal(image_aug, image_cp + 1)
images_aug = aug_arrs(images=images_reloaded)
assert images_aug is not images_reloaded
assert np.array_equal(images_reloaded, images_cp)
assert np.array_equal(images_aug, images_cp + 1)
images_aug = aug_arrs.augment_images(images=images_reloaded)
assert images_aug is not images_reloaded
assert np.array_equal(images_reloaded, images_cp)
assert np.array_equal(images_aug, images_cp + 1)
class TestSequential(unittest.TestCase):
def setUp(self):
reseed()
@property
def image(self):
image = np.array([[0, 1, 1],
[0, 0, 1],
[0, 0, 1]], dtype=np.uint8) * 255
return np.atleast_3d(image)
@property
def images(self):
return np.array([self.image], dtype=np.uint8)
@property
def image_lr(self):
image_lr = np.array([[1, 1, 0],
[1, 0, 0],
[1, 0, 0]], dtype=np.uint8) * 255
return np.atleast_3d(image_lr)
@property
def images_lr(self):
return np.array([self.image_lr], dtype=np.uint8)
@property
def image_ud(self):
image_ud = np.array([[0, 0, 1],
[0, 0, 1],
[0, 1, 1]], dtype=np.uint8) * 255
return np.atleast_3d(image_ud)
@property
def images_ud(self):
return np.array([self.image_ud], dtype=np.uint8)
@property
def image_lr_ud(self):
image_lr_ud = np.array([[1, 0, 0],
[1, 0, 0],
[1, 1, 0]], dtype=np.uint8) * 255
return np.atleast_3d(image_lr_ud)
@property
def images_lr_ud(self):
return np.array([self.image_lr_ud])
@property
def keypoints(self):
kps = [ia.Keypoint(x=1, y=0),
ia.Keypoint(x=2, y=0),
ia.Keypoint(x=2, y=1)]
return ia.KeypointsOnImage(kps, shape=self.image.shape)
@property
def keypoints_aug(self):
kps = [ia.Keypoint(x=3-1, y=3-0),
ia.Keypoint(x=3-2, y=3-0),
ia.Keypoint(x=3-2, y=3-1)]
return ia.KeypointsOnImage(kps, shape=self.image.shape)
@property
def polygons(self):
polygon = ia.Polygon([(0, 0), (2, 0), (2, 2), (0, 2)])
return ia.PolygonsOnImage([polygon], shape=self.image.shape)
@property
def polygons_aug(self):
polygon = ia.Polygon([(3-0, 3-0), (3-2, 3-0), (3-2, 3-2), (3-0, 3-2)])
return ia.PolygonsOnImage([polygon], shape=self.image.shape)
@property
def lsoi(self):
ls = ia.LineString([(0, 0), (2, 0), (2, 2), (0, 2)])
return ia.LineStringsOnImage([ls], shape=self.image.shape)
@property
def lsoi_aug(self):
ls = ia.LineString([(3-0, 3-0), (3-2, 3-0), (3-2, 3-2), (3-0, 3-2)])
return ia.LineStringsOnImage([ls], shape=self.image.shape)
@property
def bbsoi(self):
bb = ia.BoundingBox(x1=0, y1=0, x2=2, y2=2)
return ia.BoundingBoxesOnImage([bb], shape=self.image.shape)
@property
def bbsoi_aug(self):
x1 = 3-0
x2 = 3-2
y1 = 3-0
y2 = 3-2
bb = ia.BoundingBox(x1=min(x1, x2), y1=min(y1, y2),
x2=max(x1, x2), y2=max(y1, y2))
return ia.BoundingBoxesOnImage([bb], shape=self.image.shape)
@property
def heatmaps(self):
heatmaps_arr = np.float32([[0, 0, 1.0],
[0, 0, 1.0],
[0, 1.0, 1.0]])
return ia.HeatmapsOnImage(heatmaps_arr, shape=self.image.shape)
@property
def heatmaps_aug(self):
heatmaps_arr_expected = np.float32([[1.0, 1.0, 0.0],
[1.0, 0, 0],
[1.0, 0, 0]])
return ia.HeatmapsOnImage(heatmaps_arr_expected, shape=self.image.shape)
@property
def segmaps(self):
segmaps_arr = np.int32([[0, 0, 1],
[0, 0, 1],
[0, 1, 1]])
return ia.SegmentationMapsOnImage(segmaps_arr, shape=self.image.shape)
@property
def segmaps_aug(self):
segmaps_arr_expected = np.int32([[1, 1, 0],
[1, 0, 0],
[1, 0, 0]])
return ia.SegmentationMapsOnImage(segmaps_arr_expected,
shape=self.image.shape)
@property
def seq_two_flips(self):
return iaa.Sequential([
iaa.Fliplr(1.0),
iaa.Flipud(1.0)
])
def test_images__two_flips(self):
aug = self.seq_two_flips
observed = aug.augment_images(self.images)
assert np.array_equal(observed, self.images_lr_ud)
def test_images__two_flips__deterministic(self):
aug = self.seq_two_flips
aug_det = aug.to_deterministic()
observed = aug_det.augment_images(self.images)
assert np.array_equal(observed, self.images_lr_ud)
def test_images_as_list__two_flips(self):
aug = self.seq_two_flips
observed = aug.augment_images([self.image])
assert array_equal_lists(observed, [self.image_lr_ud])
def test_images_as_list__two_flips__deterministic(self):
aug = self.seq_two_flips
aug_det = aug.to_deterministic()
observed = aug_det.augment_images([self.image])
assert array_equal_lists(observed, [self.image_lr_ud])
def test_keypoints__two_flips(self):
aug = self.seq_two_flips
observed = aug.augment_keypoints([self.keypoints])
assert_cbaois_equal(observed, [self.keypoints_aug])
def test_keypoints__two_flips__deterministic(self):
aug = self.seq_two_flips
aug_det = aug.to_deterministic()
observed = aug_det.augment_keypoints([self.keypoints])
assert_cbaois_equal(observed, [self.keypoints_aug])
def test_polygons__two_flips(self):
aug = self.seq_two_flips
observed = aug.augment_polygons(self.polygons)
assert_cbaois_equal(observed, self.polygons_aug)
def test_polygons__two_flips__deterministic(self):
aug = self.seq_two_flips
aug_det = aug.to_deterministic()
observed = aug_det.augment_polygons(self.polygons)
assert_cbaois_equal(observed, self.polygons_aug)
def test_line_strings__two_flips(self):
aug = self.seq_two_flips
observed = aug.augment_line_strings(self.lsoi)
assert_cbaois_equal(observed, self.lsoi_aug)
def test_line_strings__two_flips__deterministic(self):
aug = self.seq_two_flips
aug_det = aug.to_deterministic()
observed = aug_det.augment_line_strings(self.lsoi)
assert_cbaois_equal(observed, self.lsoi_aug)
def test_bounding_boxes__two_flips(self):
aug = self.seq_two_flips
observed = aug.augment_bounding_boxes(self.bbsoi)
assert_cbaois_equal(observed, self.bbsoi_aug)
def test_bounding_boxes__two_flips__deterministic(self):
aug = self.seq_two_flips
aug_det = aug.to_deterministic()
observed = aug_det.augment_bounding_boxes(self.bbsoi)
assert_cbaois_equal(observed, self.bbsoi_aug)
def test_heatmaps__two_flips(self):
aug = self.seq_two_flips
heatmaps = self.heatmaps
observed = aug.augment_heatmaps([heatmaps])[0]
assert observed.shape == (3, 3, 1)
assert 0 - 1e-6 < observed.min_value < 0 + 1e-6
assert 1.0 - 1e-6 < observed.max_value < 1.0 + 1e-6
assert np.allclose(observed.get_arr(),
self.heatmaps_aug.get_arr())
def test_segmentation_maps__two_flips(self):
aug = self.seq_two_flips
segmaps = self.segmaps
observed = aug.augment_segmentation_maps([segmaps])[0]
assert observed.shape == (3, 3, 1)
assert np.array_equal(observed.get_arr(),
self.segmaps_aug.get_arr())
def test_children_not_provided(self):
aug = iaa.Sequential()
image = np.arange(4*4).reshape((4, 4)).astype(np.uint8)
observed = aug.augment_image(image)
assert np.array_equal(observed, image)
def test_children_are_none(self):
aug = iaa.Sequential(children=None)
image = np.arange(4*4).reshape((4, 4)).astype(np.uint8)
observed = aug.augment_image(image)
assert np.array_equal(observed, image)
def test_children_is_single_augmenter_without_list(self):
aug = iaa.Sequential(iaa.Fliplr(1.0))
image = np.arange(4*4).reshape((4, 4)).astype(np.uint8)
observed = aug.augment_image(image)
assert np.array_equal(observed, np.fliplr(image))
def test_children_is_a_sequential(self):
aug = iaa.Sequential(iaa.Sequential(iaa.Fliplr(1.0)))
image = np.arange(4*4).reshape((4, 4)).astype(np.uint8)
observed = aug.augment_image(image)
assert np.array_equal(observed, np.fliplr(image))
def test_children_is_list_of_sequentials(self):
aug = iaa.Sequential([
iaa.Sequential(iaa.Flipud(1.0)),
iaa.Sequential(iaa.Fliplr(1.0))
])
image = np.arange(4*4).reshape((4, 4)).astype(np.uint8)
observed = aug.augment_image(image)
assert np.array_equal(observed, np.fliplr(np.flipud(image)))
def test_randomness__two_flips(self):
# 50% horizontal flip, 50% vertical flip
aug = iaa.Sequential([
iaa.Fliplr(0.5),
iaa.Flipud(0.5)
])
frac_same = self._test_randomness__two_flips__compute_fraction_same(
aug, 200)
assert np.isclose(frac_same, 0.25, rtol=0, atol=0.1)
def test_randomness__two_flips__deterministic(self):
# 50% horizontal flip, 50% vertical flip
aug = iaa.Sequential([
iaa.Fliplr(0.5),
iaa.Flipud(0.5)
])
aug_det = aug.to_deterministic()
frac_same = self._test_randomness__two_flips__compute_fraction_same(
aug_det, 200)
assert (
np.isclose(frac_same, 0.0, rtol=0, atol=1e-5)
or np.isclose(frac_same, 1.0, rtol=0, atol=1e-5)
)
def _test_randomness__two_flips__compute_fraction_same(self, aug,
nb_iterations):
expected = [self.images, self.images_lr, self.images_ud,
self.images_lr_ud]
last_aug = None
nb_changed_aug = 0
for i in sm.xrange(nb_iterations):
observed_aug = aug.augment_images(self.images)
if i == 0:
last_aug = observed_aug
else:
if not np.array_equal(observed_aug, last_aug):
nb_changed_aug += 1
last_aug = observed_aug
assert np.any([np.array_equal(observed_aug, expected_i)
for expected_i in expected])
# should be the same in roughly 25% of all cases
frac_changed = nb_changed_aug / nb_iterations
return 1 - frac_changed
def test_random_order_true_images(self):
aug = iaa.Sequential([
iaa.Affine(translate_px={"x": 1}, mode="constant", cval=0, order=0),
iaa.Fliplr(1.0)
], random_order=True)
frac_12 = self._test_random_order_images_frac_12(aug, 200)
assert np.isclose(frac_12, 0.5, 0.075)
def test_random_order_false_images(self):
aug = iaa.Sequential([
iaa.Affine(translate_px={"x": 1}, mode="constant", cval=0, order=0),
iaa.Fliplr(1.0)
], random_order=False)
frac_12 = self._test_random_order_images_frac_12(aug, 25)
assert frac_12 >= 1.0 - 1e-4
def test_random_order_true_deterministic_images(self):
aug = iaa.Sequential([
iaa.Affine(translate_px={"x": 1}, mode="constant", cval=0, order=0),
iaa.Fliplr(1.0)
], random_order=True)
aug = aug.to_deterministic()
frac_12 = self._test_random_order_images_frac_12(aug, 25)
assert (frac_12 >= 1.0-1e-4 or frac_12 <= 0.0+1e-4)
@classmethod
def _test_random_order_images_frac_12(cls, aug, nb_iterations):
image = np.uint8([[0, 1],
[2, 3]])
image_12 = np.uint8([[0, 0],
[2, 0]])
image_21 = np.uint8([[0, 1],
[0, 3]])
seen = [False, False]
for _ in sm.xrange(nb_iterations):
observed = aug.augment_images([image])[0]
if np.array_equal(observed, image_12):
seen[0] = True
elif np.array_equal(observed, image_21):
seen[1] = True
else:
assert False
frac_12 = seen[0] / np.sum(seen)
return frac_12
# TODO add random_order=False
def test_random_order_heatmaps(self):
aug = iaa.Sequential([
iaa.Affine(translate_px={"x": 1}),
iaa.Fliplr(1.0)
], random_order=True)
heatmaps_arr = np.float32([[0, 0, 1.0],
[0, 0, 1.0],
[0, 1.0, 1.0]])
heatmaps_arr_expected1 = np.float32([[0.0, 0.0, 0.0],
[0.0, 0.0, 0.0],
[1.0, 0.0, 0.0]])
heatmaps_arr_expected2 = np.float32([[0.0, 1.0, 0.0],
[0.0, 1.0, 0.0],
[0.0, 1.0, 1.0]])
seen = [False, False]
for _ in sm.xrange(100):
observed = aug.augment_heatmaps([
ia.HeatmapsOnImage(heatmaps_arr, shape=(3, 3, 3))])[0]
if np.allclose(observed.get_arr(), heatmaps_arr_expected1):
seen[0] = True
elif np.allclose(observed.get_arr(), heatmaps_arr_expected2):
seen[1] = True
else:
assert False
if np.all(seen):
break
assert np.all(seen)
# TODO add random_order=False
def test_random_order_segmentation_maps(self):
aug = iaa.Sequential([
iaa.Affine(translate_px={"x": 1}),
iaa.Fliplr(1.0)
], random_order=True)
segmaps_arr = np.int32([[0, 0, 1],
[0, 0, 1],
[0, 1, 1]])
segmaps_arr_expected1 = np.int32([[0, 0, 0],
[0, 0, 0],
[1, 0, 0]])
segmaps_arr_expected2 = np.int32([[0, 1, 0],
[0, 1, 0],
[0, 1, 1]])
seen = [False, False]
for _ in sm.xrange(100):
observed = aug.augment_segmentation_maps([
SegmentationMapsOnImage(segmaps_arr, shape=(3, 3, 3))])[0]
if np.array_equal(observed.get_arr(), segmaps_arr_expected1):
seen[0] = True
elif np.array_equal(observed.get_arr(), segmaps_arr_expected2):
seen[1] = True
else:
assert False
if np.all(seen):
break
assert np.all(seen)
# TODO add random_order=False
def test_random_order_keypoints(self):
KP = ia.Keypoint
kps = [KP(0, 0), KP(2, 0), KP(2, 2)]
kps_12 = [KP((0+1)*2, 0), KP((2+1)*2, 0), KP((2+1)*2, 2)]
kps_21 = [KP((0*2)+1, 0), KP((2*2)+1, 0), KP((2*2)+1, 2)]
kpsoi = ia.KeypointsOnImage(kps, shape=(3, 3))
kpsoi_12 = ia.KeypointsOnImage(kps_12, shape=(3, 3))
kpsoi_21 = ia.KeypointsOnImage(kps_21, shape=(3, 3))
def func1(keypoints_on_images, random_state, parents, hooks):
for kpsoi in keypoints_on_images:
for kp in kpsoi.keypoints:
kp.x += 1
return keypoints_on_images
def func2(keypoints_on_images, random_state, parents, hooks):
for kpsoi in keypoints_on_images:
for kp in kpsoi.keypoints:
kp.x *= 2
return keypoints_on_images
aug_1 = iaa.Lambda(func_keypoints=func1)
aug_2 = iaa.Lambda(func_keypoints=func2)
seq = iaa.Sequential([aug_1, aug_2], random_order=True)
seen = [False, False]
for _ in sm.xrange(100):
observed = seq.augment_keypoints(kpsoi)
if np.allclose(observed.to_xy_array(), kpsoi_12.to_xy_array()):
seen[0] = True
elif np.allclose(observed.to_xy_array(), kpsoi_21.to_xy_array()):
seen[1] = True
else:
assert False
if np.all(seen):
break
assert np.all(seen)
# TODO add random_order=False
def test_random_order_polygons(self):
cba = ia.Polygon([(0, 0), (1, 0), (1, 1)])
cba_12 = ia.Polygon([(0, 0), (1, 0), ((1+1)*2, 1)])
cba_21 = ia.Polygon([(0, 0), (1, 0), ((1*2)+1, 1)])
cbaoi = ia.PolygonsOnImage([cba], shape=(3, 3))
def func1(polygons_on_images, random_state, parents, hooks):
for cbaoi_ in polygons_on_images:
for cba_ in cbaoi_.items:
cba_.exterior[-1, 0] += 1
return polygons_on_images
def func2(polygons_on_images, random_state, parents, hooks):
for cbaoi_ in polygons_on_images:
for cba_ in cbaoi_.items:
cba_.exterior[-1, 0] *= 2
return polygons_on_images
aug_1 = iaa.Lambda(func_polygons=func1)
aug_2 = iaa.Lambda(func_polygons=func2)
seq = iaa.Sequential([aug_1, aug_2], random_order=True)
seen = [False, False]
for _ in sm.xrange(100):
observed = seq.augment_polygons(cbaoi)
if np.allclose(observed.items[0].coords, cba_12.coords):
seen[0] = True
elif np.allclose(observed.items[0].coords, cba_21.coords):
seen[1] = True
else:
assert False
if np.all(seen):
break
assert np.all(seen)
# TODO add random_order=False
def test_random_order_line_strings(self):
cba = ia.LineString([(0, 0), (1, 0), (1, 1)])
cba_12 = ia.LineString([(0, 0), (1, 0), ((1+1)*2, 1)])
cba_21 = ia.LineString([(0, 0), (1, 0), ((1*2)+1, 1)])
cbaoi = ia.LineStringsOnImage([cba], shape=(3, 3))
def func1(line_strings_on_images, random_state, parents, hooks):
for cbaoi_ in line_strings_on_images:
for cba_ in cbaoi_.items:
cba_.coords[-1, 0] += 1
return line_strings_on_images
def func2(line_strings_on_images, random_state, parents, hooks):
for cbaoi_ in line_strings_on_images:
for cba_ in cbaoi_.items:
cba_.coords[-1, 0] *= 2
return line_strings_on_images
aug_1 = iaa.Lambda(func_line_strings=func1)
aug_2 = iaa.Lambda(func_line_strings=func2)
seq = iaa.Sequential([aug_1, aug_2], random_order=True)
seen = [False, False]
for _ in sm.xrange(100):
observed = seq.augment_line_strings(cbaoi)
if np.allclose(observed.items[0].coords, cba_12.coords):
seen[0] = True
elif np.allclose(observed.items[0].coords, cba_21.coords):
seen[1] = True
else:
assert False
if np.all(seen):
break
assert np.all(seen)
# TODO add random_order=False
def test_random_order_bounding_boxes(self):
bbs = [ia.BoundingBox(x1=1, y1=2, x2=30, y2=40)]
bbs_12 = [ia.BoundingBox(x1=(1+1)*2, y1=2, x2=30, y2=40)]
bbs_21 = [ia.BoundingBox(x1=(1*2)+1, y1=2, x2=30, y2=40)]
bbsoi = ia.BoundingBoxesOnImage(bbs, shape=(3, 3))
bbsoi_12 = ia.BoundingBoxesOnImage(bbs_12, shape=(3, 3))
bbsoi_21 = ia.BoundingBoxesOnImage(bbs_21, shape=(3, 3))
def func1(bounding_boxes_on_images, random_state, parents, hooks):
for bbsoi in bounding_boxes_on_images:
for bb in bbsoi.bounding_boxes:
bb.x1 += 1
return bounding_boxes_on_images
def func2(bounding_boxes_on_images, random_state, parents, hooks):
for bbsoi in bounding_boxes_on_images:
for bb in bbsoi.bounding_boxes:
bb.x1 *= 2
return bounding_boxes_on_images
aug_1 = iaa.Lambda(func_bounding_boxes=func1)
aug_2 = iaa.Lambda(func_bounding_boxes=func2)
seq = iaa.Sequential([aug_1, aug_2], random_order=True)
seen = [False, False]
for _ in sm.xrange(100):
observed = seq.augment_bounding_boxes(bbsoi)
if np.allclose(observed.to_xyxy_array(),
bbsoi_12.to_xyxy_array()):
seen[0] = True
elif np.allclose(observed.to_xyxy_array(),
bbsoi_21.to_xyxy_array()):
seen[1] = True
else:
assert False
if np.all(seen):
break
assert np.all(seen)
def test_zero_sized_axes(self):
shapes = [
(0, 0),
(0, 1),
(1, 0),
(0, 1, 0),
(1, 0, 0),
(0, 1, 1),
(1, 0, 1)
]
for shape in shapes:
for random_order in [False, True]:
with self.subTest(shape=shape):
image = np.zeros(shape, dtype=np.uint8)
aug = iaa.Sequential([iaa.Identity()],
random_order=random_order)
image_aug = aug(image=image)
assert image_aug.dtype.name == "uint8"
assert image_aug.shape == shape
def test_unusual_channel_numbers(self):
shapes = [
(1, 1, 4),
(1, 1, 5),
(1, 1, 512),
(1, 1, 513)
]
for shape in shapes:
for random_order in [False, True]:
with self.subTest(shape=shape):
image = np.zeros(shape, dtype=np.uint8)
aug = iaa.Sequential([iaa.Identity()],
random_order=random_order)
image_aug = aug(image=image)
assert np.all(image_aug == 0)
assert image_aug.dtype.name == "uint8"
assert image_aug.shape == shape
def test_add_to_empty_sequential(self):
aug = iaa.Sequential()
aug.add(iaa.Fliplr(1.0))
image = np.arange(4*4).reshape((4, 4)).astype(np.uint8)
observed = aug.augment_image(image)
assert np.array_equal(observed, np.fliplr(image))
def test_add_to_sequential_with_child(self):
aug = iaa.Sequential(iaa.Fliplr(1.0))
aug.add(iaa.Flipud(1.0))
image = np.arange(4*4).reshape((4, 4)).astype(np.uint8)
observed = aug.augment_image(image)
assert np.array_equal(observed, np.fliplr(np.flipud(image)))
def test_get_parameters(self):
aug1 = iaa.Sequential(iaa.Fliplr(1.0), random_order=False)
aug2 = iaa.Sequential(iaa.Fliplr(1.0), random_order=True)
assert aug1.get_parameters() == [False]
assert aug2.get_parameters() == [True]
def test_get_children_lists(self):
flip = iaa.Fliplr(1.0)
aug = iaa.Sequential(flip)
assert aug.get_children_lists() == [aug]
def test_to_deterministic(self):
child = iaa.Identity()
aug = iaa.Sequential([child])
aug_det = aug.to_deterministic()
assert aug_det.random_state is not aug.random_state
assert aug_det.deterministic
assert aug_det[0].deterministic
def test___str___and___repr__(self):
flip = iaa.Fliplr(1.0)
aug = iaa.Sequential(flip, random_order=True)
expected = (
"Sequential("
"name=%s, random_order=%s, children=[%s], deterministic=%s"
")" % (aug.name, "True", str(flip), "False")
)
assert aug.__str__() == aug.__repr__() == expected
def test_other_dtypes_noop__bool(self):
for random_order in [False, True]:
aug = iaa.Sequential([
iaa.Identity(),
iaa.Identity()
], random_order=random_order)
image = np.zeros((3, 3), dtype=bool)
image[0, 0] = True
image_aug = aug.augment_image(image)
assert image_aug.dtype.name == "bool"
assert np.all(image_aug == image)
def test_other_dtypes__noop__uint_int(self):
dtypes = ["uint8", "uint16", "uint32", "uint64",
"int8", "int32", "int64"]
for dtype, random_order in itertools.product(dtypes, [False, True]):
with self.subTest(dtype=dtype, random_order=random_order):
aug = iaa.Sequential([
iaa.Identity(),
iaa.Identity()
], random_order=random_order)
min_value, center_value, max_value = \
iadt.get_value_range_of_dtype(dtype)
value = max_value
image = np.zeros((3, 3), dtype=dtype)
image[0, 0] = value
image_aug = aug.augment_image(image)
assert image_aug.dtype.name == dtype
assert np.array_equal(image_aug, image)
def test_other_dtypes_noop__float(self):
dtypes = ["float16", "float32", "float64", "float128"]
values = [5000, 1000 ** 2, 1000 ** 3, 1000 ** 4]
for random_order in [False, True]:
for dtype, value in zip(dtypes, values):
with self.subTest(dtype=dtype, random_order=random_order):
aug = iaa.Sequential([
iaa.Identity(),
iaa.Identity()
], random_order=random_order)
image = np.zeros((3, 3), dtype=dtype)
image[0, 0] = value
image_aug = aug.augment_image(image)
assert image_aug.dtype.name == dtype
assert np.all(image_aug == image)
def test_other_dtypes_flips__bool(self):
for random_order in [False, True]:
# note that we use 100% probabilities with square images here,
# so random_order does not influence the output
aug = iaa.Sequential([
iaa.Fliplr(1.0),
iaa.Flipud(1.0)
], random_order=random_order)
image = np.zeros((3, 3), dtype=bool)
image[0, 0] = True
expected = np.zeros((3, 3), dtype=bool)
expected[2, 2] = True
image_aug = aug.augment_image(image)
assert image_aug.dtype.name == "bool"
assert np.all(image_aug == expected)
def test_other_dtypes__flips__uint_int(self):
dtypes = ["uint8", "uint16", "uint32", "uint64",
"int8", "int32", "int64"]
for dtype, random_order in itertools.product(dtypes, [False, True]):
with self.subTest(dtype=dtype, random_order=random_order):
# note that we use 100% probabilities with square images here,
# so random_order does not influence the output
aug = iaa.Sequential([
iaa.Fliplr(1.0),
iaa.Flipud(1.0)
], random_order=random_order)
min_value, center_value, max_value = \
iadt.get_value_range_of_dtype(dtype)
value = max_value
image = np.zeros((3, 3), dtype=dtype)
image[0, 0] = value
expected = np.zeros((3, 3), dtype=dtype)
expected[2, 2] = value
image_aug = aug.augment_image(image)
assert image_aug.dtype.name == dtype
assert np.array_equal(image_aug, expected)
def test_other_dtypes_flips__float(self):
dtypes = ["float16", "float32", "float64", "float128"]
values = [5000, 1000 ** 2, 1000 ** 3, 1000 ** 4]
for random_order in [False, True]:
for dtype, value in zip(dtypes, values):
with self.subTest(dtype=dtype, random_order=random_order):
# note that we use 100% probabilities with square images
# here, so random_order does not influence the output
aug = iaa.Sequential([
iaa.Fliplr(1.0),
iaa.Flipud(1.0)
], random_order=random_order)
image = np.zeros((3, 3), dtype=dtype)
image[0, 0] = value
expected = np.zeros((3, 3), dtype=dtype)
expected[2, 2] = value
image_aug = aug.augment_image(image)
assert image_aug.dtype.name == dtype
assert np.all(image_aug == expected)
def test_pickleable(self):
aug = iaa.Sequential(
[iaa.Add(1, seed=1),
iaa.Multiply(3, seed=2)],
random_order=True,
seed=3)
runtest_pickleable_uint8_img(aug, iterations=5)
class TestSomeOf(unittest.TestCase):
def setUp(self):
reseed()
def test_children_are_empty_list(self):
zeros = np.zeros((3, 3, 1), dtype=np.uint8)
aug = iaa.SomeOf(n=0, children=[])
observed = aug.augment_image(zeros)
assert np.array_equal(observed, zeros)
def test_children_are_not_provided(self):
zeros = np.zeros((3, 3, 1), dtype=np.uint8)
aug = iaa.SomeOf(n=0)
observed = aug.augment_image(zeros)
assert np.array_equal(observed, zeros)
def test_several_children_and_various_fixed_n(self):
zeros = np.zeros((3, 3, 1), dtype=np.uint8)
children = [iaa.Add(1), iaa.Add(2), iaa.Add(3)]
ns = [0, 1, 2, 3, 4, None, (2, None), (2, 2),
iap.Deterministic(3)]
expecteds = [[0], # 0
[9*1, 9*2, 9*3], # 1
[9*1+9*2, 9*1+9*3, 9*2+9*3], # 2
[9*1+9*2+9*3], # 3
[9*1+9*2+9*3], # 4
[9*1+9*2+9*3], # None
[9*1+9*2, 9*1+9*3, 9*2+9*3, 9*1+9*2+9*3], # (2, None)
[9*1+9*2, 9*1+9*3, 9*2+9*3], # (2, 2)
[9*1+9*2+9*3]] # Deterministic(3)
for n, expected in zip(ns, expecteds):
with self.subTest(n=n):
aug = iaa.SomeOf(n=n, children=children)
observed = aug.augment_image(zeros)
assert np.sum(observed) in expected
def test_several_children_and_n_as_tuple(self):
zeros = np.zeros((1, 1, 1), dtype=np.uint8)
augs = [iaa.Add(2**0), iaa.Add(2**1), iaa.Add(2**2)]
aug = iaa.SomeOf(n=(0, 3), children=augs)
nb_iterations = 1000
nb_observed = [0, 0, 0, 0]
for i in sm.xrange(nb_iterations):
observed = aug.augment_image(zeros)
s = observed[0, 0, 0]
if s == 0:
nb_observed[0] += 1
else:
if s & 2**0 > 0:
nb_observed[1] += 1
if s & 2**1 > 0:
nb_observed[2] += 1
if s & 2**2 > 0:
nb_observed[3] += 1
p_observed = [n/nb_iterations for n in nb_observed]
assert np.isclose(p_observed[0], 0.25, rtol=0, atol=0.1)
assert np.isclose(p_observed[1], 0.5, rtol=0, atol=0.1)
assert np.isclose(p_observed[2], 0.5, rtol=0, atol=0.1)
assert np.isclose(p_observed[3], 0.5, rtol=0, atol=0.1)
def test_several_children_and_various_fixed_n__heatmaps(self):
augs = [iaa.Affine(translate_px={"x": 1}),
iaa.Affine(translate_px={"x": 1}),
iaa.Affine(translate_px={"x": 1})]
heatmaps_arr = np.float32([[1.0, 0.0, 0.0],
[1.0, 0.0, 0.0],
[1.0, 0.0, 0.0]])
heatmaps_arr0 = np.float32([[1.0, 0.0, 0.0],
[1.0, 0.0, 0.0],
[1.0, 0.0, 0.0]])
heatmaps_arr1 = np.float32([[0.0, 1.0, 0.0],
[0.0, 1.0, 0.0],
[0.0, 1.0, 0.0]])
heatmaps_arr2 = np.float32([[0.0, 0.0, 1.0],
[0.0, 0.0, 1.0],
[0.0, 0.0, 1.0]])
heatmaps_arr3 = np.float32([[0.0, 0.0, 0.0],
[0.0, 0.0, 0.0],
[0.0, 0.0, 0.0]])
ns = [0, 1, 2, 3, None]
expecteds = [[heatmaps_arr0],
[heatmaps_arr1],
[heatmaps_arr2],
[heatmaps_arr3],
[heatmaps_arr3]]
for n, expected in zip(ns, expecteds):
with self.subTest(n=n):
heatmaps = ia.HeatmapsOnImage(heatmaps_arr, shape=(3, 3, 3))
aug = iaa.SomeOf(n=n, children=augs)
observed = aug.augment_heatmaps(heatmaps)
assert observed.shape == (3, 3, 3)
assert np.isclose(observed.min_value, 0.0)
assert np.isclose(observed.max_value, 1.0)
matches = [
np.allclose(observed.get_arr(), expected_i)
for expected_i in expected]
assert np.any(matches)
def test_several_children_and_various_fixed_n__segmaps(self):
augs = [iaa.Affine(translate_px={"x": 1}),
iaa.Affine(translate_px={"x": 1}),
iaa.Affine(translate_px={"x": 1})]
segmaps_arr = np.int32([[1, 0, 0],
[1, 0, 0],
[1, 0, 0]])
segmaps_arr0 = np.int32([[1, 0, 0],
[1, 0, 0],
[1, 0, 0]])
segmaps_arr1 = np.int32([[0, 1, 0],
[0, 1, 0],
[0, 1, 0]])
segmaps_arr2 = np.int32([[0, 0, 1],
[0, 0, 1],
[0, 0, 1]])
segmaps_arr3 = np.int32([[0, 0, 0],
[0, 0, 0],
[0, 0, 0]])
ns = [0, 1, 2, 3, None]
expecteds = [[segmaps_arr0],
[segmaps_arr1],
[segmaps_arr2],
[segmaps_arr3],
[segmaps_arr3]]
for n, expected in zip(ns, expecteds):
with self.subTest(n=n):
segmaps = SegmentationMapsOnImage(segmaps_arr, shape=(3, 3, 3))
aug = iaa.SomeOf(n=n, children=augs)
observed = aug.augment_segmentation_maps(segmaps)
assert observed.shape == (3, 3, 3)
matches = [
np.array_equal(observed.get_arr(), expected_i)
for expected_i in expected]
assert np.any(matches)
def _test_several_children_and_various_fixed_n__cbaois(
self, cbaoi, augf_name):
augs = [iaa.Affine(translate_px={"x": 1}),
iaa.Affine(translate_px={"y": 1})]
cbaoi_x = cbaoi.shift(x=1)
cbaoi_y = cbaoi.shift(y=1)
cbaoi_xy = cbaoi.shift(x=1, y=1)
ns = [0, 1, 2, None]
expecteds = [[cbaoi],
[cbaoi_x, cbaoi_y],
[cbaoi_xy],
[cbaoi_xy]]
for n, expected in zip(ns, expecteds):
with self.subTest(n=n):
aug = iaa.SomeOf(n=n, children=augs)
cbaoi_aug = getattr(aug, augf_name)(cbaoi)
cba = cbaoi_aug.items[0]
assert len(cbaoi_aug.items) == len(cbaoi.items)
assert cbaoi_aug.shape == (5, 6, 3)
if hasattr(cba, "is_valid"):
assert cba.is_valid
matches = [
cba.coords_almost_equals(cbaoi_i.items[0])
for cbaoi_i in expected
]
assert np.any(matches)
def test_several_children_and_various_fixed_n__keypoints(self):
kps = [ia.Keypoint(x=0, y=0), ia.Keypoint(x=1, y=1)]
kpsoi = ia.KeypointsOnImage(kps, shape=(5, 6, 3))
self._test_several_children_and_various_fixed_n__cbaois(
kpsoi, "augment_keypoints")
def test_several_children_and_various_fixed_n__polygons(self):
ps = [ia.Polygon([(0, 0), (3, 0), (3, 3), (0, 3)])]
psoi = ia.PolygonsOnImage(ps, shape=(5, 6, 3))
self._test_several_children_and_various_fixed_n__cbaois(
psoi, "augment_polygons")
def test_several_children_and_various_fixed_n__line_strings(self):
ls = [ia.LineString([(0, 0), (3, 0), (3, 3), (0, 3)])]
lsoi = ia.LineStringsOnImage(ls, shape=(5, 6, 3))
self._test_several_children_and_various_fixed_n__cbaois(
lsoi, "augment_line_strings")
def test_several_children_and_various_fixed_n__bounding_boxes(self):
bbs = [ia.BoundingBox(x1=0, y1=0, x2=3, y2=3)]
bbsoi = ia.BoundingBoxesOnImage(bbs, shape=(5, 6, 3))
self._test_several_children_and_various_fixed_n__cbaois(
bbsoi, "augment_bounding_boxes")
@classmethod
def _test_empty_cbaoi(cls, cbaoi, augf_name):
augs = [iaa.Affine(translate_px={"x": 1}),
iaa.Affine(translate_px={"y": 1})]
aug = iaa.SomeOf(n=2, children=augs)
cbaoi_aug = getattr(aug, augf_name)(cbaoi)
assert_cbaois_equal(cbaoi_aug, cbaoi)
def test_empty_keypoints_on_image_instance(self):
kpsoi = ia.KeypointsOnImage([], shape=(5, 6, 3))
self._test_empty_cbaoi(kpsoi, "augment_keypoints")
def test_empty_polygons_on_image_instance(self):
psoi = ia.PolygonsOnImage([], shape=(5, 6, 3))
self._test_empty_cbaoi(psoi, "augment_polygons")
def test_empty_line_strings_on_image_instance(self):
lsoi = ia.LineStringsOnImage([], shape=(5, 6, 3))
self._test_empty_cbaoi(lsoi, "augment_line_strings")
def test_empty_bounding_boxes_on_image_instance(self):
bbsoi = ia.BoundingBoxesOnImage([], shape=(5, 6, 3))
self._test_empty_cbaoi(bbsoi, "augment_bounding_boxes")
def test_random_order_false__images(self):
augs = [iaa.Multiply(2.0), iaa.Add(100)]
aug = iaa.SomeOf(n=2, children=augs, random_order=False)
p_observed = self._test_random_order(aug, 10)
assert np.isclose(p_observed[0], 1.0, rtol=0, atol=1e-8)
assert np.isclose(p_observed[1], 0.0, rtol=0, atol=1e-8)
def test_random_order_true__images(self):
augs = [iaa.Multiply(2.0), iaa.Add(100)]
aug = iaa.SomeOf(n=2, children=augs, random_order=True)
p_observed = self._test_random_order(aug, 300)
assert np.isclose(p_observed[0], 0.5, rtol=0, atol=0.15)
assert np.isclose(p_observed[1], 0.5, rtol=0, atol=0.15)
@classmethod
def _test_random_order(cls, aug, nb_iterations):
zeros = np.ones((1, 1, 1), dtype=np.uint8)
nb_observed = [0, 0]
for i in sm.xrange(nb_iterations):
observed = aug.augment_image(zeros)
s = np.sum(observed)
if s == (1*2)+100:
nb_observed[0] += 1
elif s == (1+100)*2:
nb_observed[1] += 1
else:
raise Exception("Unexpected sum: %.8f (@2)" % (s,))
p_observed = [n/nb_iterations for n in nb_observed]
return p_observed
@classmethod
def _test_images_and_cbaoi_aligned(cls, cbaoi, augf_name):
img = np.zeros((3, 3), dtype=np.uint8)
img_x = np.copy(img)
img_y = np.copy(img)
img_xy = np.copy(img)
img[1, 1] = 255
img_x[1, 2] = 255
img_y[2, 1] = 255
img_xy[2, 2] = 255
augs = [
iaa.Affine(translate_px={"x": 1}, order=0),
iaa.Affine(translate_px={"y": 1}, order=0)
]
cbaoi_x = cbaoi.shift(x=1)
cbaoi_y = cbaoi.shift(y=1)
cbaoi_xy = cbaoi.shift(x=1, y=1)
aug = iaa.SomeOf((0, 2), children=augs)
seen = [False, False, False, False]
for _ in sm.xrange(100):
aug_det = aug.to_deterministic()
img_aug = aug_det.augment_image(img)
cbaoi_aug = getattr(aug_det, augf_name)(cbaoi)
if np.array_equal(img_aug, img):
assert_cbaois_equal(cbaoi_aug, cbaoi)
seen[0] = True
elif np.array_equal(img_aug, img_x):
assert_cbaois_equal(cbaoi_aug, cbaoi_x)
seen[1] = True
elif np.array_equal(img_aug, img_y):
assert_cbaois_equal(cbaoi_aug, cbaoi_y)
seen[2] = True
elif np.array_equal(img_aug, img_xy):
assert_cbaois_equal(cbaoi_aug, cbaoi_xy)
seen[3] = True
else:
assert False
if np.all(seen):
break
assert np.all(seen)
def test_images_and_keypoints_aligned(self):
kps = [ia.Keypoint(x=0, y=0), ia.Keypoint(x=1, y=1)]
kpsoi = ia.KeypointsOnImage(kps, shape=(5, 6, 3))
self._test_images_and_cbaoi_aligned(kpsoi, "augment_keypoints")
def test_images_and_polygons_aligned(self):
ps = [ia.Polygon([(0, 0), (3, 0), (3, 3), (0, 3)])]
psoi = ia.PolygonsOnImage(ps, shape=(5, 6, 3))
self._test_images_and_cbaoi_aligned(psoi, "augment_polygons")
def test_images_and_line_strings_aligned(self):
ls = [ia.LineString([(0, 0), (3, 0), (3, 3), (0, 3)])]
lsoi = ia.LineStringsOnImage(ls, shape=(5, 6, 3))
self._test_images_and_cbaoi_aligned(lsoi, "augment_line_strings")
def test_images_and_bounding_boxes_aligned(self):
bbs = [ia.BoundingBox(x1=0, y1=0, x2=3, y2=3)]
bbsoi = ia.BoundingBoxesOnImage(bbs, shape=(5, 6, 3))
self._test_images_and_cbaoi_aligned(bbsoi, "augment_bounding_boxes")
def test_invalid_argument_as_children(self):
got_exception = False
try:
_ = iaa.SomeOf(1, children=False)
except Exception as exc:
assert "Expected " in str(exc)
got_exception = True
assert got_exception
def test_invalid_datatype_as_n(self):
got_exception = False
try:
_ = iaa.SomeOf(False, children=iaa.Fliplr(1.0))
except Exception as exc:
assert "Expected " in str(exc)
got_exception = True
assert got_exception
def test_invalid_tuple_as_n(self):
got_exception = False
try:
_ = iaa.SomeOf((2, "test"), children=iaa.Fliplr(1.0))
except Exception as exc:
assert "Expected " in str(exc)
got_exception = True
assert got_exception
def test_invalid_none_none_tuple_as_n(self):
got_exception = False
try:
_ = iaa.SomeOf((None, None), children=iaa.Fliplr(1.0))
except Exception as exc:
assert "Expected " in str(exc)
got_exception = True
assert got_exception
def test_with_children_that_change_shapes_keep_size_false(self):
# test for https://github.com/aleju/imgaug/issues/143
# (shapes change in child augmenters, leading to problems if input
# arrays are assumed to stay input arrays)
image = np.zeros((8, 8, 3), dtype=np.uint8)
aug = iaa.SomeOf(1, [
iaa.Crop((2, 0, 2, 0), keep_size=False),
iaa.Crop((1, 0, 1, 0), keep_size=False)
])
expected_shapes = [(4, 8, 3), (6, 8, 3)]
for _ in sm.xrange(10):
observed = aug.augment_images(np.uint8([image] * 4))
assert isinstance(observed, list)
assert np.all([img.shape in expected_shapes for img in observed])
observed = aug.augment_images([image] * 4)
assert isinstance(observed, list)
assert np.all([img.shape in expected_shapes for img in observed])
observed = aug.augment_images(np.uint8([image]))
assert isinstance(observed, list)
assert np.all([img.shape in expected_shapes for img in observed])
observed = aug.augment_images([image])
assert isinstance(observed, list)
assert np.all([img.shape in expected_shapes for img in observed])
observed = aug.augment_image(image)
assert ia.is_np_array(image)
assert observed.shape in expected_shapes
def test_with_children_that_change_shapes_keep_size_true(self):
image = np.zeros((8, 8, 3), dtype=np.uint8)
aug = iaa.SomeOf(1, [
iaa.Crop((2, 0, 2, 0), keep_size=True),
iaa.Crop((1, 0, 1, 0), keep_size=True)
])
expected_shapes = [(8, 8, 3)]
for _ in sm.xrange(10):
observed = aug.augment_images(np.uint8([image] * 4))
assert ia.is_np_array(observed)
assert np.all([img.shape in expected_shapes for img in observed])
observed = aug.augment_images([image] * 4)
assert isinstance(observed, list)
assert np.all([img.shape in expected_shapes for img in observed])
observed = aug.augment_images(np.uint8([image]))
assert ia.is_np_array(observed)
assert np.all([img.shape in expected_shapes for img in observed])
observed = aug.augment_images([image])
assert isinstance(observed, list)
assert np.all([img.shape in expected_shapes for img in observed])
observed = aug.augment_image(image)
assert ia.is_np_array(observed)
assert observed.shape in expected_shapes
def test_zero_sized_axes(self):
shapes = [
(0, 0),
(0, 1),
(1, 0),
(0, 1, 0),
(1, 0, 0),
(0, 1, 1),
(1, 0, 1)
]
for shape in shapes:
for random_order in [False, True]:
with self.subTest(shape=shape):
image = np.zeros(shape, dtype=np.uint8)
aug = iaa.SomeOf(
1, [iaa.Identity()], random_order=random_order)
image_aug = aug(image=image)
assert image_aug.dtype.name == "uint8"
assert image_aug.shape == shape
def test_unusual_channel_numbers(self):
shapes = [
(1, 1, 4),
(1, 1, 5),
(1, 1, 512),
(1, 1, 513)
]
for shape in shapes:
for random_order in [False, True]:
with self.subTest(shape=shape):
image = np.zeros(shape, dtype=np.uint8)
aug = iaa.SomeOf(
1, [iaa.Identity()], random_order=random_order)
image_aug = aug(image=image)
assert np.all(image_aug == 0)
assert image_aug.dtype.name == "uint8"
assert image_aug.shape == shape
def test_other_dtypes_via_noop__bool(self):
for random_order in [False, True]:
with self.subTest(random_order=random_order):
aug = iaa.SomeOf(2, [
iaa.Identity(),
iaa.Identity(),
iaa.Identity()
], random_order=random_order)
image = np.zeros((3, 3), dtype=bool)
image[0, 0] = True
image_aug = aug.augment_image(image)
assert image_aug.dtype.name == image.dtype.name
assert np.all(image_aug == image)
def test_other_dtypes_via_noop__uint_int(self):
dtypes = ["uint8", "uint16", "uint32", "uint64",
"int8", "int32", "int64"]
random_orders = [False, True]
for dtype, random_order in itertools.product(dtypes, random_orders):
with self.subTest(dtype=dtype, random_order=random_order):
aug = iaa.SomeOf(2, [
iaa.Identity(),
iaa.Identity(),
iaa.Identity()
], random_order=random_order)
min_value, center_value, max_value = \
iadt.get_value_range_of_dtype(dtype)
value = max_value
image = np.zeros((3, 3), dtype=dtype)
image[0, 0] = value
image_aug = aug.augment_image(image)
assert image_aug.dtype.name == dtype
assert np.array_equal(image_aug, image)
def test_other_dtypes_via_noop__float(self):
dtypes = ["float16", "float32", "float64", "float128"]
values = [5000, 1000 ** 2, 1000 ** 3, 1000 ** 4]
random_orders = [False, True]
for random_order in random_orders:
for dtype, value in zip(dtypes, values):
with self.subTest(dtype=dtype, random_order=random_order):
aug = iaa.SomeOf(2, [
iaa.Identity(),
iaa.Identity(),
iaa.Identity()
], random_order=random_order)
image = np.zeros((3, 3), dtype=dtype)
image[0, 0] = value
image_aug = aug.augment_image(image)
assert image_aug.dtype.name == dtype
assert np.all(image_aug == image)
def test_other_dtypes_via_flip__bool(self):
for random_order in [False, True]:
with self.subTest(random_order=random_order):
aug = iaa.SomeOf(2, [
iaa.Fliplr(1.0),
iaa.Flipud(1.0),
iaa.Identity()
], random_order=random_order)
image = np.zeros((3, 3), dtype=bool)
image[0, 0] = True
expected = [np.zeros((3, 3), dtype=bool)
for _ in sm.xrange(3)]
expected[0][0, 2] = True
expected[1][2, 0] = True
expected[2][2, 2] = True
for _ in sm.xrange(10):
image_aug = aug.augment_image(image)
assert image_aug.dtype.name == image.dtype.name
assert any([np.all(image_aug == expected_i)
for expected_i in expected])
def test_other_dtypes_via_flip__uint_int(self):
dtypes = ["uint8", "uint16", "uint32", "uint64",
"int8", "int32", "int64"]
random_orders = [False, True]
for dtype, random_order in itertools.product(dtypes, random_orders):
with self.subTest(dtype=dtype, random_order=random_order):
aug = iaa.SomeOf(2, [
iaa.Fliplr(1.0),
iaa.Flipud(1.0),
iaa.Identity()
], random_order=random_order)
min_value, center_value, max_value = \
iadt.get_value_range_of_dtype(dtype)
value = max_value
image = np.zeros((3, 3), dtype=dtype)
image[0, 0] = value
expected = [np.zeros((3, 3), dtype=dtype)
for _ in sm.xrange(3)]
expected[0][0, 2] = value
expected[1][2, 0] = value
expected[2][2, 2] = value
for _ in sm.xrange(10):
image_aug = aug.augment_image(image)
assert image_aug.dtype.name == dtype
assert any([np.all(image_aug == expected_i)
for expected_i in expected])
def test_other_dtypes_via_flip__float(self):
dtypes = ["float16", "float32", "float64", "float128"]
values = [5000, 1000 ** 2, 1000 ** 3, 1000 ** 4]
random_orders = [False, True]
for random_order in random_orders:
for dtype, value in zip(dtypes, values):
with self.subTest(dtype=dtype, random_order=random_order):
aug = iaa.SomeOf(2, [
iaa.Fliplr(1.0),
iaa.Flipud(1.0),
iaa.Identity()
], random_order=random_order)
image = np.zeros((3, 3), dtype=dtype)
image[0, 0] = value
expected = [np.zeros((3, 3), dtype=dtype)
for _ in sm.xrange(3)]
expected[0][0, 2] = value
expected[1][2, 0] = value
expected[2][2, 2] = value
for _ in sm.xrange(10):
image_aug = aug.augment_image(image)
assert image_aug.dtype.name == dtype
assert any([np.all(image_aug == expected_i)
for expected_i in expected])
def test_pickleable(self):
aug = iaa.SomeOf((0, 3),
[iaa.Add(1, seed=1),
iaa.Add(2, seed=2),
iaa.Multiply(1.5, seed=3),
iaa.Multiply(2.0, seed=4)],
random_order=True,
seed=5)
runtest_pickleable_uint8_img(aug, iterations=5)
def test_get_children_lists(self):
child = iaa.Identity()
aug = iaa.SomeOf(1, [child])
children_lsts = aug.get_children_lists()
assert len(children_lsts) == 1
assert len(children_lsts[0]) == 1
assert children_lsts[0][0] is child
def test_to_deterministic(self):
child = iaa.Identity()
aug = iaa.SomeOf(1, [child])
aug_det = aug.to_deterministic()
assert aug_det.random_state is not aug.random_state
assert aug_det.deterministic
assert aug_det[0].deterministic
class TestOneOf(unittest.TestCase):
def setUp(self):
reseed()
def test_returns_someof(self):
child = iaa.Identity()
aug = iaa.OneOf(children=child)
assert isinstance(aug, iaa.SomeOf)
assert aug.n == 1
assert aug[0] is child
def test_single_child_that_is_augmenter(self):
zeros = np.zeros((3, 3, 1), dtype=np.uint8)
aug = iaa.OneOf(children=iaa.Add(1))
observed = aug.augment_image(zeros)
assert np.array_equal(observed, zeros + 1)
def test_single_child_that_is_sequential(self):
zeros = np.zeros((3, 3, 1), dtype=np.uint8)
aug = iaa.OneOf(children=iaa.Sequential([iaa.Add(1)]))
observed = aug.augment_image(zeros)
assert np.array_equal(observed, zeros + 1)
def test_single_child_that_is_list(self):
zeros = np.zeros((3, 3, 1), dtype=np.uint8)
aug = iaa.OneOf(children=[iaa.Add(1)])
observed = aug.augment_image(zeros)
assert np.array_equal(observed, zeros + 1)
def test_three_children(self):
zeros = np.zeros((1, 1, 1), dtype=np.uint8)
augs = [iaa.Add(1), iaa.Add(2), iaa.Add(3)]
aug = iaa.OneOf(augs)
results = {1: 0, 2: 0, 3: 0}
nb_iterations = 1000
for _ in sm.xrange(nb_iterations):
result = aug.augment_image(zeros)
s = int(np.sum(result))
results[s] += 1
expected = int(nb_iterations / len(augs))
tolerance = int(nb_iterations * 0.05)
for key, val in results.items():
assert np.isclose(val, expected, rtol=0, atol=tolerance)
assert len(list(results.keys())) == 3
def test_pickleable(self):
aug = iaa.OneOf(
[iaa.Add(1, seed=1),
iaa.Add(10, seed=2),
iaa.Multiply(2.0, seed=3)],
seed=4)
runtest_pickleable_uint8_img(aug, iterations=5)
def test_get_children_lists(self):
child = iaa.Identity()
aug = iaa.OneOf([child])
children_lsts = aug.get_children_lists()
assert len(children_lsts) == 1
assert len(children_lsts[0]) == 1
assert children_lsts[0][0] is child
def test_to_deterministic(self):
child = iaa.Identity()
aug = iaa.OneOf([child])
aug_det = aug.to_deterministic()
assert aug_det.random_state is not aug.random_state
assert aug_det.deterministic
assert aug_det[0].deterministic
class TestSometimes(unittest.TestCase):
def setUp(self):
reseed()
@property
def image(self):
image = np.array([[0, 1, 1],
[0, 0, 1],
[0, 0, 1]], dtype=np.uint8) * 255
return np.atleast_3d(image)
@property
def images(self):
return np.uint8([self.image])
@property
def image_lr(self):
image_lr = np.array([[1, 1, 0],
[1, 0, 0],
[1, 0, 0]], dtype=np.uint8) * 255
return np.atleast_3d(image_lr)
@property
def images_lr(self):
return np.uint8([self.image_lr])
@property
def image_ud(self):
image_ud = np.array([[0, 0, 1],
[0, 0, 1],
[0, 1, 1]], dtype=np.uint8) * 255
return np.atleast_3d(image_ud)
@property
def images_ud(self):
return np.uint8([self.image_ud])
@property
def keypoints(self):
keypoints = [ia.Keypoint(x=1, y=0),
ia.Keypoint(x=2, y=0),
ia.Keypoint(x=2, y=1)]
return ia.KeypointsOnImage(keypoints, shape=self.image.shape)
@property
def keypoints_lr(self):
keypoints = [ia.Keypoint(x=3-1, y=0),
ia.Keypoint(x=3-2, y=0),
ia.Keypoint(x=3-2, y=1)]
return ia.KeypointsOnImage(keypoints, shape=self.image.shape)
@property
def keypoints_ud(self):
keypoints = [ia.Keypoint(x=1, y=3-0),
ia.Keypoint(x=2, y=3-0),
ia.Keypoint(x=2, y=3-1)]
return ia.KeypointsOnImage(keypoints, shape=self.image.shape)
@property
def polygons(self):
polygons = [ia.Polygon([(0, 0), (2, 0), (2, 2)])]
return ia.PolygonsOnImage(polygons, shape=self.image.shape)
@property
def polygons_lr(self):
polygons = [ia.Polygon([(3-0, 0), (3-2, 0), (3-2, 2)])]
return ia.PolygonsOnImage(polygons, shape=self.image.shape)
@property
def polygons_ud(self):
polygons = [ia.Polygon([(0, 3-0), (2, 3-0), (2, 3-2)])]
return ia.PolygonsOnImage(polygons, shape=self.image.shape)
@property
def lsoi(self):
lss = [ia.LineString([(0, 0), (2, 0), (2, 2)])]
return ia.LineStringsOnImage(lss, shape=self.image.shape)
@property
def lsoi_lr(self):
lss = [ia.LineString([(3-0, 0), (3-2, 0), (3-2, 2)])]
return ia.LineStringsOnImage(lss, shape=self.image.shape)
@property
def lsoi_ud(self):
lss = [ia.LineString([(0, 3-0), (2, 3-0), (2, 3-2)])]
return ia.LineStringsOnImage(lss, shape=self.image.shape)
@property
def bbsoi(self):
bbs = [ia.BoundingBox(x1=0, y1=0, x2=1.5, y2=1.0)]
return ia.BoundingBoxesOnImage(bbs, shape=self.image.shape)
@property
def bbsoi_lr(self):
x1 = 3-0
y1 = 0
x2 = 3-1.5
y2 = 1.0
bbs = [ia.BoundingBox(x1=min([x1, x2]), y1=min([y1, y2]),
x2=max([x1, x2]), y2=max([y1, y2]))]
return ia.BoundingBoxesOnImage(bbs, shape=self.image.shape)
@property
def bbsoi_ud(self):
x1 = 0
y1 = 3-0
x2 = 1.5
y2 = 3-1.0
bbs = [ia.BoundingBox(x1=min([x1, x2]), y1=min([y1, y2]),
x2=max([x1, x2]), y2=max([y1, y2]))]
return ia.BoundingBoxesOnImage(bbs, shape=self.image.shape)
@property
def heatmaps(self):
heatmaps_arr = np.float32([[0.0, 0.0, 1.0],
[0.0, 0.0, 1.0],
[0.0, 1.0, 1.0]])
return ia.HeatmapsOnImage(heatmaps_arr, shape=(3, 3, 3))
@property
def heatmaps_lr(self):
heatmaps_arr = np.float32([[1.0, 0.0, 0.0],
[1.0, 0.0, 0.0],
[1.0, 1.0, 0.0]])
return ia.HeatmapsOnImage(heatmaps_arr, shape=(3, 3, 3))
@property
def heatmaps_ud(self):
heatmaps_arr = np.float32([[0.0, 1.0, 1.0],
[0.0, 0.0, 1.0],
[0.0, 0.0, 1.0]])
return ia.HeatmapsOnImage(heatmaps_arr, shape=(3, 3, 3))
@property
def segmaps(self):
segmaps_arr = np.int32([[0, 0, 1],
[0, 0, 1],
[0, 1, 1]])
return ia.SegmentationMapsOnImage(segmaps_arr, shape=(3, 3, 3))
@property
def segmaps_lr(self):
segmaps_arr = np.int32([[1, 0, 0],
[1, 0, 0],
[1, 1, 0]])
return ia.SegmentationMapsOnImage(segmaps_arr, shape=(3, 3, 3))
@property
def segmaps_ud(self):
segmaps_arr = np.int32([[0, 1, 1],
[0, 0, 1],
[0, 0, 1]])
return ia.SegmentationMapsOnImage(segmaps_arr, shape=(3, 3, 3))
def test_two_branches_always_first__images(self):
aug = iaa.Sometimes(1.0, [iaa.Fliplr(1.0)], [iaa.Flipud(1.0)])
observed = aug.augment_images(self.images)
assert np.array_equal(observed, self.images_lr)
def test_two_branches_always_first__images__deterministic(self):
aug = iaa.Sometimes(1.0, [iaa.Fliplr(1.0)], [iaa.Flipud(1.0)])
aug_det = aug.to_deterministic()
observed = aug_det.augment_images(self.images)
assert np.array_equal(observed, self.images_lr)
def test_two_branches_always_first__images__list(self):
aug = iaa.Sometimes(1.0, [iaa.Fliplr(1.0)], [iaa.Flipud(1.0)])
observed = aug.augment_images([self.images[0]])
assert array_equal_lists(observed, [self.images_lr[0]])
def test_two_branches_always_first__images__deterministic__list(self):
aug = iaa.Sometimes(1.0, [iaa.Fliplr(1.0)], [iaa.Flipud(1.0)])
aug_det = aug.to_deterministic()
observed = aug_det.augment_images([self.images[0]])
assert array_equal_lists(observed, [self.images_lr[0]])
def test_two_branches_always_first__keypoints(self):
aug = iaa.Sometimes(1.0, [iaa.Fliplr(1.0)], [iaa.Flipud(1.0)])
observed = aug.augment_keypoints(self.keypoints)
assert keypoints_equal(observed, self.keypoints_lr)
def test_two_branches_always_first__keypoints__deterministic(self):
aug = iaa.Sometimes(1.0, [iaa.Fliplr(1.0)], [iaa.Flipud(1.0)])
aug_det = aug.to_deterministic()
observed = aug_det.augment_keypoints(self.keypoints)
assert_cbaois_equal(observed, self.keypoints_lr)
def test_two_branches_always_first__polygons(self):
aug = iaa.Sometimes(1.0, [iaa.Fliplr(1.0)], [iaa.Flipud(1.0)])
observed = aug.augment_polygons([self.polygons])
assert_cbaois_equal(observed, [self.polygons_lr])
def test_two_branches_always_first__polygons__deterministic(self):
aug = iaa.Sometimes(1.0, [iaa.Fliplr(1.0)], [iaa.Flipud(1.0)])
aug_det = aug.to_deterministic()
observed = aug_det.augment_polygons([self.polygons])
assert_cbaois_equal(observed, [self.polygons_lr])
def test_two_branches_always_first__line_strings(self):
aug = iaa.Sometimes(1.0, [iaa.Fliplr(1.0)], [iaa.Flipud(1.0)])
observed = aug.augment_line_strings([self.lsoi])
assert_cbaois_equal(observed, [self.lsoi_lr])
def test_two_branches_always_first__line_strings__deterministic(self):
aug = iaa.Sometimes(1.0, [iaa.Fliplr(1.0)], [iaa.Flipud(1.0)])
aug_det = aug.to_deterministic()
observed = aug_det.augment_line_strings([self.lsoi])
assert_cbaois_equal(observed, [self.lsoi_lr])
def test_two_branches_always_first__bounding_boxes(self):
aug = iaa.Sometimes(1.0, [iaa.Fliplr(1.0)], [iaa.Flipud(1.0)])
observed = aug.augment_bounding_boxes([self.bbsoi])
assert_cbaois_equal(observed, [self.bbsoi_lr])
def test_two_branches_always_first__bounding_boxes__deterministic(self):
aug = iaa.Sometimes(1.0, [iaa.Fliplr(1.0)], [iaa.Flipud(1.0)])
aug_det = aug.to_deterministic()
observed = aug_det.augment_bounding_boxes([self.bbsoi])
assert_cbaois_equal(observed, [self.bbsoi_lr])
def test_two_branches_always_first__heatmaps(self):
aug = iaa.Sometimes(1.0, [iaa.Fliplr(1.0)], [iaa.Flipud(1.0)])
observed = aug.augment_heatmaps([self.heatmaps])[0]
assert observed.shape == self.heatmaps.shape
assert 0 - 1e-6 < observed.min_value < 0 + 1e-6
assert 1 - 1e-6 < observed.max_value < 1 + 1e-6
assert np.array_equal(observed.get_arr(), self.heatmaps_lr.get_arr())
def test_two_branches_always_first__segmaps(self):
aug = iaa.Sometimes(1.0, [iaa.Fliplr(1.0)], [iaa.Flipud(1.0)])
observed = aug.augment_segmentation_maps(self.segmaps)
assert observed.shape == self.segmaps.shape
assert np.array_equal(observed.get_arr(), self.segmaps_lr.get_arr())
def test_two_branches_always_second__images(self):
aug = iaa.Sometimes(0.0, [iaa.Fliplr(1.0)], [iaa.Flipud(1.0)])
observed = aug.augment_images(self.images)
assert np.array_equal(observed, self.images_ud)
def test_two_branches_always_second__images__deterministic(self):
aug = iaa.Sometimes(0.0, [iaa.Fliplr(1.0)], [iaa.Flipud(1.0)])
aug_det = aug.to_deterministic()
observed = aug_det.augment_images(self.images)
assert np.array_equal(observed, self.images_ud)
def test_two_branches_always_second__images__list(self):
aug = iaa.Sometimes(0.0, [iaa.Fliplr(1.0)], [iaa.Flipud(1.0)])
observed = aug.augment_images([self.images[0]])
assert array_equal_lists(observed, [self.images_ud[0]])
def test_two_branches_always_second__images__list__deterministic(self):
aug = iaa.Sometimes(0.0, [iaa.Fliplr(1.0)], [iaa.Flipud(1.0)])
aug_det = aug.to_deterministic()
observed = aug_det.augment_images([self.images[0]])
assert array_equal_lists(observed, [self.images_ud[0]])
def test_two_branches_always_second__keypoints(self):
aug = iaa.Sometimes(0.0, [iaa.Fliplr(1.0)], [iaa.Flipud(1.0)])
observed = aug.augment_keypoints([self.keypoints])
assert_cbaois_equal(observed[0], self.keypoints_ud)
def test_two_branches_always_second__keypoints__deterministic(self):
aug = iaa.Sometimes(0.0, [iaa.Fliplr(1.0)], [iaa.Flipud(1.0)])
aug_det = aug.to_deterministic()
observed = aug_det.augment_keypoints([self.keypoints])
assert_cbaois_equal(observed[0], self.keypoints_ud)
def test_two_branches_always_second__polygons(self):
aug = iaa.Sometimes(0.0, [iaa.Fliplr(1.0)], [iaa.Flipud(1.0)])
observed = aug.augment_polygons(self.polygons)
assert_cbaois_equal(observed, self.polygons_ud)
def test_two_branches_always_second__polygons__deterministic(self):
aug = iaa.Sometimes(0.0, [iaa.Fliplr(1.0)], [iaa.Flipud(1.0)])
aug_det = aug.to_deterministic()
observed = aug_det.augment_polygons(self.polygons)
assert_cbaois_equal(observed, self.polygons_ud)
def test_two_branches_always_second__line_strings(self):
aug = iaa.Sometimes(0.0, [iaa.Fliplr(1.0)], [iaa.Flipud(1.0)])
observed = aug.augment_line_strings(self.lsoi)
assert_cbaois_equal(observed, self.lsoi_ud)
def test_two_branches_always_second__line_strings__deterministic(self):
aug = iaa.Sometimes(0.0, [iaa.Fliplr(1.0)], [iaa.Flipud(1.0)])
aug_det = aug.to_deterministic()
observed = aug_det.augment_line_strings(self.lsoi)
assert_cbaois_equal(observed, self.lsoi_ud)
def test_two_branches_always_second__bounding_boxes(self):
aug = iaa.Sometimes(0.0, [iaa.Fliplr(1.0)], [iaa.Flipud(1.0)])
observed = aug.augment_bounding_boxes(self.bbsoi)
assert_cbaois_equal(observed, self.bbsoi_ud)
def test_two_branches_always_second__bounding_boxes__deterministic(self):
aug = iaa.Sometimes(0.0, [iaa.Fliplr(1.0)], [iaa.Flipud(1.0)])
aug_det = aug.to_deterministic()
observed = aug_det.augment_bounding_boxes(self.bbsoi)
assert_cbaois_equal(observed, self.bbsoi_ud)
def test_two_branches_always_second__heatmaps(self):
aug = iaa.Sometimes(0.0, [iaa.Fliplr(1.0)], [iaa.Flipud(1.0)])
observed = aug.augment_heatmaps(self.heatmaps)
assert observed.shape == self.heatmaps.shape
assert 0 - 1e-6 < observed.min_value < 0 + 1e-6
assert 1 - 1e-6 < observed.max_value < 1 + 1e-6
assert np.array_equal(observed.get_arr(), self.heatmaps_ud.get_arr())
def test_two_branches_always_second__segmaps(self):
aug = iaa.Sometimes(0.0, [iaa.Fliplr(1.0)], [iaa.Flipud(1.0)])
observed = aug.augment_segmentation_maps(self.segmaps)
assert observed.shape == self.segmaps.shape
assert np.array_equal(observed.get_arr(), self.segmaps_ud.get_arr())
def test_two_branches_both_50_percent__images(self):
aug = iaa.Sometimes(0.5, [iaa.Fliplr(1.0)], [iaa.Flipud(1.0)])
last_aug = None
nb_changed_aug = 0
nb_iterations = 500
nb_images_if_branch = 0
nb_images_else_branch = 0
for i in sm.xrange(nb_iterations):
observed_aug = aug.augment_images(self.images)
if i == 0:
last_aug = observed_aug
else:
if not np.array_equal(observed_aug, last_aug):
nb_changed_aug += 1
last_aug = observed_aug
if np.array_equal(observed_aug, self.images_lr):
nb_images_if_branch += 1
elif np.array_equal(observed_aug, self.images_ud):
nb_images_else_branch += 1
else:
raise Exception(
"Received output doesnt match any expected output.")
p_if_branch = nb_images_if_branch / nb_iterations
p_else_branch = nb_images_else_branch / nb_iterations
p_changed = 1 - (nb_changed_aug / nb_iterations)
assert np.isclose(p_if_branch, 0.5, rtol=0, atol=0.1)
assert np.isclose(p_else_branch, 0.5, rtol=0, atol=0.1)
# should be the same in roughly 50% of all cases
assert np.isclose(p_changed, 0.5, rtol=0, atol=0.1)
def test_two_branches_both_50_percent__images__deterministic(self):
aug = iaa.Sometimes(0.5, [iaa.Fliplr(1.0)], [iaa.Flipud(1.0)])
aug_det = aug.to_deterministic()
last_aug_det = None
nb_changed_aug_det = 0
nb_iterations = 20
for i in sm.xrange(nb_iterations):
observed_aug_det = aug_det.augment_images(self.images)
if i == 0:
last_aug_det = observed_aug_det
else:
if not np.array_equal(observed_aug_det, last_aug_det):
nb_changed_aug_det += 1
last_aug_det = observed_aug_det
assert nb_changed_aug_det == 0
@classmethod
def _test_two_branches_both_50_percent__cbaois(
cls, cbaoi, cbaoi_lr, cbaoi_ud, augf_name):
def _same_coords(cbaoi1, cbaoi2):
assert len(cbaoi1.items) == len(cbaoi2.items)
for i1, i2 in zip(cbaoi1.items, cbaoi2.items):
if not np.allclose(i1.coords, i2.coords, atol=1e-4, rtol=0):
return False
return True
aug = iaa.Sometimes(0.5, [iaa.Fliplr(1.0)], [iaa.Flipud(1.0)])
nb_iterations = 250
nb_if_branch = 0
nb_else_branch = 0
for i in sm.xrange(nb_iterations):
cbaoi_aug = getattr(aug, augf_name)(cbaoi)
# use allclose() instead of coords_almost_equals() for efficiency
if _same_coords(cbaoi_aug, cbaoi_lr):
nb_if_branch += 1
elif _same_coords(cbaoi_aug, cbaoi_ud):
nb_else_branch += 1
else:
raise Exception(
"Received output doesnt match any expected output.")
p_if_branch = nb_if_branch / nb_iterations
p_else_branch = nb_else_branch / nb_iterations
assert np.isclose(p_if_branch, 0.5, rtol=0, atol=0.15)
assert np.isclose(p_else_branch, 0.5, rtol=0, atol=0.15)
def test_two_branches_both_50_percent__keypoints(self):
self._test_two_branches_both_50_percent__cbaois(
self.keypoints, self.keypoints_lr, self.keypoints_ud,
"augment_keypoints")
def test_two_branches_both_50_percent__polygons(self):
self._test_two_branches_both_50_percent__cbaois(
self.polygons, self.polygons_lr, self.polygons_ud,
"augment_polygons")
def test_two_branches_both_50_percent__line_strings(self):
self._test_two_branches_both_50_percent__cbaois(
self.lsoi, self.lsoi_lr, self.lsoi_ud,
"augment_line_strings")
def test_two_branches_both_50_percent__bounding_boxes(self):
self._test_two_branches_both_50_percent__cbaois(
self.bbsoi, self.bbsoi_lr, self.bbsoi_ud,
"augment_bounding_boxes")
def test_one_branch_50_percent__images(self):
aug = iaa.Sometimes(0.5, iaa.Fliplr(1.0))
last_aug = None
nb_changed_aug = 0
nb_iterations = 500
nb_images_if_branch = 0
nb_images_else_branch = 0
for i in sm.xrange(nb_iterations):
observed_aug = aug.augment_images(self.images)
if i == 0:
last_aug = observed_aug
else:
if not np.array_equal(observed_aug, last_aug):
nb_changed_aug += 1
last_aug = observed_aug
if np.array_equal(observed_aug, self.images_lr):
nb_images_if_branch += 1
elif np.array_equal(observed_aug, self.images):
nb_images_else_branch += 1
else:
raise Exception(
"Received output doesnt match any expected output.")
p_if_branch = nb_images_if_branch / nb_iterations
p_else_branch = nb_images_else_branch / nb_iterations
p_changed = 1 - (nb_changed_aug / nb_iterations)
assert np.isclose(p_if_branch, 0.5, rtol=0, atol=0.1)
assert np.isclose(p_else_branch, 0.5, rtol=0, atol=0.1)
# should be the same in roughly 50% of all cases
assert np.isclose(p_changed, 0.5, rtol=0, atol=0.1)
def test_one_branch_50_percent__images__deterministic(self):
aug = iaa.Sometimes(0.5, iaa.Fliplr(1.0))
aug_det = aug.to_deterministic()
last_aug_det = None
nb_changed_aug_det = 0
nb_iterations = 10
for i in sm.xrange(nb_iterations):
observed_aug_det = aug_det.augment_images(self.images)
if i == 0:
last_aug_det = observed_aug_det
else:
if not np.array_equal(observed_aug_det, last_aug_det):
nb_changed_aug_det += 1
last_aug_det = observed_aug_det
assert nb_changed_aug_det == 0
@classmethod
def _test_one_branch_50_percent__cbaois(
cls, cbaoi, cbaoi_lr, augf_name):
def _same_coords(cbaoi1, cbaoi2):
assert len(cbaoi1.items) == len(cbaoi2.items)
for i1, i2 in zip(cbaoi1.items, cbaoi2.items):
if not np.allclose(i1.coords, i2.coords, atol=1e-4, rtol=0):
return False
return True
aug = iaa.Sometimes(0.5, iaa.Fliplr(1.0))
nb_iterations = 250
nb_if_branch = 0
nb_else_branch = 0
for i in sm.xrange(nb_iterations):
cbaoi_aug = getattr(aug, augf_name)(cbaoi)
# use allclose() instead of coords_almost_equals() for efficiency
if _same_coords(cbaoi_aug, cbaoi_lr):
nb_if_branch += 1
elif _same_coords(cbaoi_aug, cbaoi):
nb_else_branch += 1
else:
raise Exception(
"Received output doesnt match any expected output.")
p_if_branch = nb_if_branch / nb_iterations
p_else_branch = nb_else_branch / nb_iterations
assert np.isclose(p_if_branch, 0.5, rtol=0, atol=0.15)
assert np.isclose(p_else_branch, 0.5, rtol=0, atol=0.15)
def test_one_branch_50_percent__keypoints(self):
self._test_one_branch_50_percent__cbaois(
self.keypoints, self.keypoints_lr, "augment_keypoints")
def test_one_branch_50_percent__polygons(self):
self._test_one_branch_50_percent__cbaois(
self.polygons, self.polygons_lr, "augment_polygons")
def test_one_branch_50_percent__bounding_boxes(self):
self._test_one_branch_50_percent__cbaois(
self.bbsoi, self.bbsoi_lr, "augment_bounding_boxes")
@classmethod
def _test_empty_cbaoi(cls, cbaoi, augf_name):
aug = iaa.Sometimes(0.5, iaa.Identity())
observed = getattr(aug, augf_name)(cbaoi)
assert_cbaois_equal(observed, cbaoi)
def test_empty_keypoints(self):
kpsoi = ia.KeypointsOnImage([], shape=(1, 2, 3))
self._test_empty_cbaoi(kpsoi, "augment_keypoints")
def test_empty_polygons(self):
psoi = ia.PolygonsOnImage([], shape=(1, 2, 3))
self._test_empty_cbaoi(psoi, "augment_polygons")
def test_empty_line_strings(self):
lsoi = ia.LineStringsOnImage([], shape=(1, 2, 3))
self._test_empty_cbaoi(lsoi, "augment_line_strings")
def test_empty_bounding_boxes(self):
bbsoi = ia.BoundingBoxesOnImage([], shape=(1, 2, 3))
self._test_empty_cbaoi(bbsoi, "augment_bounding_boxes")
def test_p_is_stochastic_parameter(self):
image = np.zeros((1, 1), dtype=np.uint8) + 100
images = [image] * 10
aug = iaa.Sometimes(
p=iap.Binomial(iap.Choice([0.0, 1.0])),
then_list=iaa.Add(10))
seen = [0, 0]
for _ in sm.xrange(100):
observed = aug.augment_images(images)
uq = np.unique(np.uint8(observed))
assert len(uq) == 1
if uq[0] == 100:
seen[0] += 1
elif uq[0] == 110:
seen[1] += 1
else:
assert False
assert seen[0] > 20
assert seen[1] > 20
def test_bad_datatype_for_p_fails(self):
got_exception = False
try:
_ = iaa.Sometimes(p="foo")
except Exception as exc:
assert "Expected " in str(exc)
got_exception = True
assert got_exception
def test_bad_datatype_for_then_list_fails(self):
got_exception = False
try:
_ = iaa.Sometimes(p=0.2, then_list=False)
except Exception as exc:
assert "Expected " in str(exc)
got_exception = True
assert got_exception
def test_bad_datatype_for_else_list_fails(self):
got_exception = False
try:
_ = iaa.Sometimes(p=0.2, then_list=None, else_list=False)
except Exception as exc:
assert "Expected " in str(exc)
got_exception = True
assert got_exception
def test_two_branches_both_none(self):
aug = iaa.Sometimes(0.2, then_list=None, else_list=None)
image = np.random.randint(0, 255, size=(16, 16), dtype=np.uint8)
observed = aug.augment_image(image)
assert np.array_equal(observed, image)
def test_using_hooks_to_deactivate_propagation(self):
image = np.random.randint(0, 255-10, size=(16, 16), dtype=np.uint8)
aug = iaa.Sometimes(1.0, iaa.Add(10))
def _propagator(images, augmenter, parents, default):
return False if augmenter == aug else default
hooks = ia.HooksImages(propagator=_propagator)
observed1 = aug.augment_image(image)
observed2 = aug.augment_image(image, hooks=hooks)
assert np.array_equal(observed1, image + 10)
assert np.array_equal(observed2, image)
def test_zero_sized_axes(self):
shapes = [
(0, 0),
(0, 1),
(1, 0),
(0, 1, 0),
(1, 0, 0),
(0, 1, 1),
(1, 0, 1)
]
for shape in shapes:
with self.subTest(shape=shape):
image = np.zeros(shape, dtype=np.uint8)
aug = iaa.Sometimes(1.0, iaa.Identity())
image_aug = aug(image=image)
assert image_aug.dtype.name == "uint8"
assert image_aug.shape == shape
def test_unusual_channel_numbers(self):
shapes = [
(1, 1, 4),
(1, 1, 5),
(1, 1, 512),
(1, 1, 513)
]
for shape in shapes:
with self.subTest(shape=shape):
image = np.zeros(shape, dtype=np.uint8)
aug = iaa.Sometimes(1.0, iaa.Identity())
image_aug = aug(image=image)
assert np.all(image_aug == 0)
assert image_aug.dtype.name == "uint8"
assert image_aug.shape == shape
def test_get_parameters(self):
aug = iaa.Sometimes(0.75)
params = aug.get_parameters()
assert isinstance(params[0], iap.Binomial)
assert isinstance(params[0].p, iap.Deterministic)
assert 0.75 - 1e-8 < params[0].p.value < 0.75 + 1e-8
def test___str___and___repr__(self):
then_list = iaa.Add(1)
else_list = iaa.Add(2)
aug = iaa.Sometimes(
0.5,
then_list=then_list,
else_list=else_list,
name="SometimesTest")
expected_p = "Binomial(Deterministic(float 0.50000000))"
expected_then_list = (
"Sequential("
"name=SometimesTest-then, "
"random_order=False, "
"children=[%s], "
"deterministic=False"
")" % (str(then_list),))
expected_else_list = (
"Sequential("
"name=SometimesTest-else, "
"random_order=False, "
"children=[%s], "
"deterministic=False"
")" % (str(else_list),))
expected = (
"Sometimes("
"p=%s, name=%s, then_list=%s, else_list=%s, deterministic=%s"
")" % (
expected_p,
"SometimesTest",
expected_then_list,
expected_else_list,
"False"))
observed_str = aug.__str__()
observed_repr = aug.__repr__()
assert observed_str == expected
assert observed_repr == expected
def test___str___and___repr___with_nones_as_children(self):
aug = iaa.Sometimes(
0.5,
then_list=None,
else_list=None,
name="SometimesTest")
expected_p = "Binomial(Deterministic(float 0.50000000))"
expected = (
"Sometimes("
"p=%s, "
"name=%s, "
"then_list=%s, "
"else_list=%s, "
"deterministic=%s"
")" % (
expected_p,
"SometimesTest",
"None",
"None",
"False"))
observed_str = aug.__str__()
observed_repr = aug.__repr__()
assert observed_str == expected
assert observed_repr == expected
def test_shapes_changed_by_children__no_keep_size_non_stochastic(self):
# Test for https://github.com/aleju/imgaug/issues/143
# (shapes change in child augmenters, leading to problems if input
# arrays are assumed to stay input arrays)
def _assert_all_valid_shapes(images):
expected_shapes = [(4, 8, 3), (6, 8, 3)]
assert np.all([img.shape in expected_shapes for img in images])
image = np.zeros((8, 8, 3), dtype=np.uint8)
aug = iaa.Sometimes(
0.5,
iaa.Crop((2, 0, 2, 0), keep_size=False),
iaa.Crop((1, 0, 1, 0), keep_size=False)
)
for _ in sm.xrange(10):
observed = aug.augment_images(
np.uint8([image, image, image, image]))
assert isinstance(observed, list) or ia.is_np_array(observed)
_assert_all_valid_shapes(observed)
observed = aug.augment_images([image, image, image, image])
assert isinstance(observed, list)
_assert_all_valid_shapes(observed)
observed = aug.augment_images(np.uint8([image]))
assert isinstance(observed, list) or ia.is_np_array(observed)
_assert_all_valid_shapes(observed)
observed = aug.augment_images([image])
assert isinstance(observed, list)
_assert_all_valid_shapes(observed)
observed = aug.augment_image(image)
assert ia.is_np_array(image)
_assert_all_valid_shapes([observed])
def test_shapes_changed_by_children__no_keep_size_stochastic(self):
def _assert_all_valid_shapes(images):
assert np.all([
16 <= img.shape[0] <= 30
and img.shape[1:] == (32, 3) for img in images
])
image = np.zeros((32, 32, 3), dtype=np.uint8)
aug = iaa.Sometimes(
0.5,
iaa.Crop(((1, 4), 0, (1, 4), 0), keep_size=False),
iaa.Crop(((4, 8), 0, (4, 8), 0), keep_size=False)
)
for _ in sm.xrange(10):
observed = aug.augment_images(
np.uint8([image, image, image, image]))
assert isinstance(observed, list) or ia.is_np_array(observed)
_assert_all_valid_shapes(observed)
observed = aug.augment_images([image, image, image, image])
assert isinstance(observed, list)
_assert_all_valid_shapes(observed)
observed = aug.augment_images(np.uint8([image]))
assert isinstance(observed, list) or ia.is_np_array(observed)
_assert_all_valid_shapes(observed)
observed = aug.augment_images([image])
assert isinstance(observed, list)
_assert_all_valid_shapes(observed)
observed = aug.augment_image(image)
assert ia.is_np_array(image)
_assert_all_valid_shapes([observed])
def test_shapes_changed_by_children__keep_size_non_stochastic(self):
def _assert_all_valid_shapes(images):
expected_shapes = [(8, 8, 3)]
assert np.all([img.shape in expected_shapes for img in images])
image = np.zeros((8, 8, 3), dtype=np.uint8)
aug = iaa.Sometimes(
0.5,
iaa.Crop((2, 0, 2, 0), keep_size=True),
iaa.Crop((1, 0, 1, 0), keep_size=True)
)
for _ in sm.xrange(10):
observed = aug.augment_images(
np.uint8([image, image, image, image]))
assert ia.is_np_array(observed)
_assert_all_valid_shapes(observed)
observed = aug.augment_images([image, image, image, image])
assert isinstance(observed, list)
_assert_all_valid_shapes(observed)
observed = aug.augment_images(np.uint8([image]))
assert ia.is_np_array(observed)
_assert_all_valid_shapes(observed)
observed = aug.augment_images([image])
assert isinstance(observed, list)
_assert_all_valid_shapes(observed)
observed = aug.augment_image(image)
assert ia.is_np_array(observed)
_assert_all_valid_shapes([observed])
def test_shapes_changed_by_children__keep_size_stochastic(self):
def _assert_all_valid_shapes(images):
# only one shape expected here despite stochastic crop ranges
# due to keep_size=True
expected_shapes = [(8, 8, 3)]
assert np.all([img.shape in expected_shapes for img in images])
image = np.zeros((8, 8, 3), dtype=np.uint8)
aug = iaa.Sometimes(
0.5,
iaa.Crop(((1, 4), 0, (1, 4), 0), keep_size=True),
iaa.Crop(((4, 8), 0, (4, 8), 0), keep_size=True)
)
for _ in sm.xrange(10):
observed = aug.augment_images(
np.uint8([image, image, image, image]))
assert ia.is_np_array(observed)
_assert_all_valid_shapes(observed)
observed = aug.augment_images([image, image, image, image])
assert isinstance(observed, list)
_assert_all_valid_shapes(observed)
observed = aug.augment_images(np.uint8([image]))
assert ia.is_np_array(observed)
_assert_all_valid_shapes(observed)
observed = aug.augment_images([image])
assert isinstance(observed, list)
_assert_all_valid_shapes(observed)
observed = aug.augment_image(image)
assert ia.is_np_array(observed)
_assert_all_valid_shapes([observed])
def test_other_dtypes_via_noop__bool(self):
aug = iaa.Sometimes(1.0, iaa.Identity())
image = np.zeros((3, 3), dtype=bool)
image[0, 0] = True
image_aug = aug.augment_image(image)
assert image_aug.dtype.name == image.dtype.name
assert np.all(image_aug == image)
def test_other_dtypes_via_noop__uint_int(self):
aug = iaa.Sometimes(1.0, iaa.Identity())
dtypes = ["uint8", "uint16", "uint32", "uint64",
"int8", "int32", "int64"]
for dtype in dtypes:
with self.subTest(dtype=dtype):
min_value, _center_value, max_value = \
iadt.get_value_range_of_dtype(dtype)
value = max_value
image = np.zeros((3, 3), dtype=dtype)
image[0, 0] = value
image_aug = aug.augment_image(image)
assert image_aug.dtype.name == dtype
assert np.array_equal(image_aug, image)
def test_other_dtypes_via_noop__float(self):
aug = iaa.Sometimes(1.0, iaa.Identity())
dtypes = ["float16", "float32", "float64", "float128"]
values = [5000, 1000 ** 2, 1000 ** 3, 1000 ** 4]
for dtype, value in zip(dtypes, values):
with self.subTest(dtype=dtype):
image = np.zeros((3, 3), dtype=dtype)
image[0, 0] = value
image_aug = aug.augment_image(image)
assert image_aug.dtype.name == dtype
assert np.all(image_aug == image)
def test_other_dtypes_via_flip__bool(self):
aug = iaa.Sometimes(0.5, iaa.Fliplr(1.0), iaa.Flipud(1.0))
image = np.zeros((3, 3), dtype=bool)
image[0, 0] = True
expected = [np.zeros((3, 3), dtype=bool) for _ in sm.xrange(2)]
expected[0][0, 2] = True
expected[1][2, 0] = True
seen = [False, False]
for _ in sm.xrange(100):
image_aug = aug.augment_image(image)
assert image_aug.dtype.name == image.dtype.name
if np.all(image_aug == expected[0]):
seen[0] = True
elif np.all(image_aug == expected[1]):
seen[1] = True
else:
assert False
if np.all(seen):
break
assert np.all(seen)
def test_other_dtypes_via_flip__uint_int(self):
aug = iaa.Sometimes(0.5, iaa.Fliplr(1.0), iaa.Flipud(1.0))
dtypes = ["uint8", "uint16", "uint32", "uint64",
"int8", "int32", "int64"]
for dtype in dtypes:
with self.subTest(dtype=dtype):
min_value, _center_value, max_value = \
iadt.get_value_range_of_dtype(dtype)
value = max_value
image = np.zeros((3, 3), dtype=dtype)
image[0, 0] = value
expected = [np.zeros((3, 3), dtype=dtype) for _ in sm.xrange(2)]
expected[0][0, 2] = value
expected[1][2, 0] = value
seen = [False, False]
for _ in sm.xrange(100):
image_aug = aug.augment_image(image)
assert image_aug.dtype.name == dtype
if np.all(image_aug == expected[0]):
seen[0] = True
elif np.all(image_aug == expected[1]):
seen[1] = True
else:
assert False
if np.all(seen):
break
assert np.all(seen)
def test_other_dtypes_via_flip__float(self):
aug = iaa.Sometimes(0.5, iaa.Fliplr(1.0), iaa.Flipud(1.0))
dtypes = ["float16", "float32", "float64", "float128"]
values = [5000, 1000 ** 2, 1000 ** 3, 1000 ** 4]
for dtype, value in zip(dtypes, values):
with self.subTest(dtype=dtype):
image = np.zeros((3, 3), dtype=dtype)
image[0, 0] = value
expected = [np.zeros((3, 3), dtype=dtype) for _ in sm.xrange(2)]
expected[0][0, 2] = value
expected[1][2, 0] = value
seen = [False, False]
for _ in sm.xrange(100):
image_aug = aug.augment_image(image)
assert image_aug.dtype.name == dtype
if np.all(image_aug == expected[0]):
seen[0] = True
elif np.all(image_aug == expected[1]):
seen[1] = True
else:
assert False
if np.all(seen):
break
assert np.all(seen)
def test_pickleable(self):
aug = iaa.Sometimes(0.5, iaa.Add(10), [iaa.Add(1), iaa.Multiply(2.0)],
seed=1)
runtest_pickleable_uint8_img(aug, iterations=5)
def test_get_children_lists(self):
child = iaa.Identity()
aug = iaa.Sometimes(0.5, [child])
children_lsts = aug.get_children_lists()
assert len(children_lsts) == 1
assert len(children_lsts[0]) == 1
assert children_lsts[0][0] is child
def test_get_children_lists_both_lists(self):
child = iaa.Identity()
child2 = iaa.Identity()
aug = iaa.Sometimes(0.5, [child], [child2])
children_lsts = aug.get_children_lists()
assert len(children_lsts) == 2
assert len(children_lsts[0]) == 1
assert len(children_lsts[1]) == 1
assert children_lsts[0][0] is child
assert children_lsts[1][0] is child2
def test_to_deterministic(self):
child = iaa.Identity()
child2 = iaa.Identity()
aug = iaa.Sometimes(0.5, [child], [child2])
aug_det = aug.to_deterministic()
assert aug_det.deterministic
assert aug_det.random_state is not aug.random_state
assert aug_det.then_list[0].deterministic
assert aug_det.else_list[0].deterministic
class TestWithChannels(unittest.TestCase):
def setUp(self):
reseed()
@property
def image(self):
base_img = np.zeros((3, 3, 2), dtype=np.uint8)
base_img[..., 0] += 100
base_img[..., 1] += 200
return base_img
def test_augment_only_channel_0(self):
aug = iaa.WithChannels(0, iaa.Add(10))
observed = aug.augment_image(self.image)
expected = self.image
expected[..., 0] += 10
assert np.allclose(observed, expected)
def test_augment_only_channel_1(self):
aug = iaa.WithChannels(1, iaa.Add(10))
observed = aug.augment_image(self.image)
expected = self.image
expected[..., 1] += 10
assert np.allclose(observed, expected)
def test_augment_all_channels_via_none(self):
aug = iaa.WithChannels(None, iaa.Add(10))
observed = aug.augment_image(self.image)
expected = self.image + 10
assert np.allclose(observed, expected)
def test_augment_channels_0_and_1_via_list(self):
aug = iaa.WithChannels([0, 1], iaa.Add(10))
observed = aug.augment_image(self.image)
expected = self.image + 10
assert np.allclose(observed, expected)
def test_apply_multiple_augmenters(self):
image = np.zeros((3, 3, 2), dtype=np.uint8)
image[..., 0] += 5
image[..., 1] += 10
aug = iaa.WithChannels(1, [iaa.Add(10), iaa.Multiply(2.0)])
observed = aug.augment_image(image)
expected = np.copy(image)
expected[..., 1] += 10
expected[..., 1] *= 2
assert np.allclose(observed, expected)
def test_multiple_images_given_as_array(self):
images = np.concatenate([
self.image[np.newaxis, ...],
self.image[np.newaxis, ...]],
axis=0)
aug = iaa.WithChannels(1, iaa.Add(10))
observed = aug.augment_images(images)
expected = np.copy(images)
expected[..., 1] += 10
assert np.allclose(observed, expected)
def test_multiple_images_given_as_list_of_arrays(self):
images = [self.image, self.image]
aug = iaa.WithChannels(1, iaa.Add(10))
observed = aug.augment_images(images)
expected = self.image
expected[..., 1] += 10
expected = [expected, expected]
assert array_equal_lists(observed, expected)
def test_children_list_is_none(self):
aug = iaa.WithChannels(1, children=None)
observed = aug.augment_image(self.image)
expected = self.image
assert np.array_equal(observed, expected)
def test_channels_is_empty_list(self):
aug = iaa.WithChannels([], iaa.Add(10))
observed = aug.augment_image(self.image)
expected = self.image
assert np.array_equal(observed, expected)
def test_heatmap_augmentation_single_channel(self):
heatmap_arr = np.float32([
[0.0, 0.0, 1.0],
[0.0, 1.0, 1.0],
[1.0, 1.0, 1.0]
])
heatmap = HeatmapsOnImage(heatmap_arr, shape=(3, 3, 3))
affine = iaa.Affine(translate_px={"x": 1})
aug = iaa.WithChannels(1, children=[affine])
heatmap_aug = aug.augment_heatmaps(heatmap)
assert heatmap_aug.shape == (3, 3, 3)
assert np.allclose(heatmap_aug.get_arr(), heatmap_arr)
def test_heatmap_augmentation_multiple_channels(self):
heatmap_arr = np.float32([
[0.0, 0.0, 1.0],
[0.0, 1.0, 1.0],
[1.0, 1.0, 1.0]
])
heatmap_arr_shifted = np.float32([
[0.0, 0.0, 0.0],
[0.0, 0.0, 1.0],
[0.0, 1.0, 1.0]
])
heatmap = HeatmapsOnImage(heatmap_arr, shape=(3, 3, 3))
affine = iaa.Affine(translate_px={"x": 1})
aug = iaa.WithChannels([0, 1, 2], children=[affine])
heatmap_aug = aug.augment_heatmaps(heatmap)
assert heatmap_aug.shape == (3, 3, 3)
assert np.allclose(heatmap_aug.get_arr(), heatmap_arr_shifted)
def test_segmentation_map_augmentation_single_channel(self):
segmap_arr = np.int32([
[0, 0, 1],
[0, 1, 1],
[1, 1, 1]
])
segmap = SegmentationMapsOnImage(segmap_arr, shape=(3, 3, 3))
aug = iaa.WithChannels(1, children=[iaa.Affine(translate_px={"x": 1})])
segmap_aug = aug.augment_segmentation_maps(segmap)
assert segmap_aug.shape == (3, 3, 3)
assert np.array_equal(segmap_aug.get_arr(), segmap_arr)
def test_segmentation_map_augmentation_multiple_channels(self):
segmap_arr = np.int32([
[0, 0, 1],
[0, 1, 1],
[1, 1, 1]
])
segmap_arr_shifted = np.int32([
[0, 0, 0],
[0, 0, 1],
[0, 1, 1]
])
segmap = SegmentationMapsOnImage(segmap_arr, shape=(3, 3, 3))
affine = iaa.Affine(translate_px={"x": 1})
aug = iaa.WithChannels([0, 1, 2], children=[affine])
segmap_aug = aug.augment_segmentation_maps(segmap)
assert segmap_aug.shape == (3, 3, 3)
assert np.array_equal(segmap_aug.get_arr(), segmap_arr_shifted)
@classmethod
def _test_cbaoi_augmentation_single_channel(cls, cbaoi, augf_name):
affine = iaa.Affine(translate_px={"x": 1})
aug = iaa.WithChannels(1, children=[affine])
observed = getattr(aug, augf_name)(cbaoi)
assert_cbaois_equal(observed, cbaoi)
@classmethod
def _test_cbaoi_augmentation_all_channels_via_list(cls, cbaoi, cbaoi_x,
augf_name):
affine = iaa.Affine(translate_px={"x": 1})
aug = iaa.WithChannels([0, 1, 2], children=[affine])
observed = getattr(aug, augf_name)(cbaoi)
assert_cbaois_equal(observed, cbaoi_x)
@classmethod
def _test_cbaoi_augmentation_subset_of_channels(cls, cbaoi, cbaoi_x,
augf_name):
affine = iaa.Affine(translate_px={"x": 1})
aug = iaa.WithChannels([0, 1], children=[affine])
observed = getattr(aug, augf_name)(cbaoi)
assert_cbaois_equal(observed, cbaoi_x)
@classmethod
def _test_cbaoi_augmentation_with_empty_cbaoi(cls, cbaoi, augf_name):
affine = iaa.Affine(translate_px={"x": 1})
aug = iaa.WithChannels([0, 1], children=[affine])
observed = getattr(aug, augf_name)(cbaoi)
assert_cbaois_equal(observed, cbaoi)
def test_keypoint_augmentation_single_channel(self):
kps = [ia.Keypoint(x=0, y=0), ia.Keypoint(x=1, y=2)]
kpsoi = ia.KeypointsOnImage(kps, shape=(5, 6, 3))
self._test_cbaoi_augmentation_single_channel(kpsoi, "augment_keypoints")
def test_keypoint_augmentation_all_channels_via_list(self):
kps = [ia.Keypoint(x=0, y=0), ia.Keypoint(x=1, y=2)]
kpsoi = ia.KeypointsOnImage(kps, shape=(5, 6, 3))
kpsoi_x = kpsoi.shift(x=1)
self._test_cbaoi_augmentation_all_channels_via_list(
kpsoi, kpsoi_x, "augment_keypoints")
def test_keypoint_augmentation_subset_of_channels(self):
kps = [ia.Keypoint(x=0, y=0), ia.Keypoint(x=1, y=2)]
kpsoi = ia.KeypointsOnImage(kps, shape=(5, 6, 3))
kpsoi_x = kpsoi.shift(x=1)
self._test_cbaoi_augmentation_subset_of_channels(
kpsoi, kpsoi_x, "augment_keypoints")
def test_keypoint_augmentation_with_empty_keypoints_instance(self):
kpsoi = ia.KeypointsOnImage([], shape=(5, 6, 3))
self._test_cbaoi_augmentation_with_empty_cbaoi(
kpsoi, "augment_keypoints")
def test_polygon_augmentation(self):
polygons = [ia.Polygon([(0, 0), (3, 0), (3, 3), (0, 3)])]
psoi = ia.PolygonsOnImage(polygons, shape=(5, 6, 3))
self._test_cbaoi_augmentation_single_channel(psoi, "augment_polygons")
def test_polygon_augmentation_all_channels_via_list(self):
polygons = [ia.Polygon([(0, 0), (3, 0), (3, 3), (0, 3)])]
psoi = ia.PolygonsOnImage(polygons, shape=(5, 6, 3))
psoi_x = psoi.shift(x=1)
self._test_cbaoi_augmentation_all_channels_via_list(
psoi, psoi_x, "augment_polygons")
def test_polygon_augmentation_subset_of_channels(self):
polygons = [ia.Polygon([(0, 0), (3, 0), (3, 3), (0, 3)])]
psoi = ia.PolygonsOnImage(polygons, shape=(5, 6, 3))
psoi_x = psoi.shift(x=1)
self._test_cbaoi_augmentation_subset_of_channels(
psoi, psoi_x, "augment_polygons")
def test_polygon_augmentation_with_empty_polygons_instance(self):
psoi = ia.PolygonsOnImage([], shape=(5, 6, 3))
self._test_cbaoi_augmentation_with_empty_cbaoi(
psoi, "augment_polygons")
def test_line_string_augmentation(self):
lss = [ia.LineString([(0, 0), (3, 0), (3, 3), (0, 3)])]
lsoi = ia.LineStringsOnImage(lss, shape=(5, 6, 3))
self._test_cbaoi_augmentation_single_channel(
lsoi, "augment_line_strings")
def test_line_string_augmentation_all_channels_via_list(self):
lss = [ia.LineString([(0, 0), (3, 0), (3, 3), (0, 3)])]
lsoi = ia.LineStringsOnImage(lss, shape=(5, 6, 3))
lsoi_x = lsoi.shift(x=1)
self._test_cbaoi_augmentation_all_channels_via_list(
lsoi, lsoi_x, "augment_line_strings")
def test_line_string_augmentation_subset_of_channels(self):
lss = [ia.LineString([(0, 0), (3, 0), (3, 3), (0, 3)])]
lsoi = ia.LineStringsOnImage(lss, shape=(5, 6, 3))
lsoi_x = lsoi.shift(x=1)
self._test_cbaoi_augmentation_subset_of_channels(
lsoi, lsoi_x, "augment_line_strings")
def test_line_string_augmentation_with_empty_polygons_instance(self):
lsoi = ia.LineStringsOnImage([], shape=(5, 6, 3))
self._test_cbaoi_augmentation_with_empty_cbaoi(
lsoi, "augment_line_strings")
def test_bounding_boxes_augmentation(self):
bbs = [ia.BoundingBox(x1=0, y1=0, x2=1.0, y2=1.5)]
bbsoi = ia.BoundingBoxesOnImage(bbs, shape=(5, 6, 3))
self._test_cbaoi_augmentation_single_channel(
bbsoi, "augment_bounding_boxes")
def test_bounding_boxes_augmentation_all_channels_via_list(self):
bbs = [ia.BoundingBox(x1=0, y1=0, x2=1.0, y2=1.5)]
bbsoi = ia.BoundingBoxesOnImage(bbs, shape=(5, 6, 3))
bbsoi_x = bbsoi.shift(x=1)
self._test_cbaoi_augmentation_all_channels_via_list(
bbsoi, bbsoi_x, "augment_bounding_boxes")
def test_bounding_boxes_augmentation_subset_of_channels(self):
bbs = [ia.BoundingBox(x1=0, y1=0, x2=1.0, y2=1.5)]
bbsoi = ia.BoundingBoxesOnImage(bbs, shape=(5, 6, 3))
bbsoi_x = bbsoi.shift(x=1)
self._test_cbaoi_augmentation_subset_of_channels(
bbsoi, bbsoi_x, "augment_bounding_boxes")
def test_bounding_boxes_augmentation_with_empty_bb_instance(self):
bbsoi = ia.BoundingBoxesOnImage([], shape=(5, 6, 3))
self._test_cbaoi_augmentation_with_empty_cbaoi(
bbsoi, "augment_bounding_boxes")
def test_invalid_datatype_for_channels_fails(self):
got_exception = False
try:
_ = iaa.WithChannels(False, iaa.Add(10))
except Exception as exc:
assert "Expected " in str(exc)
got_exception = True
assert got_exception
def test_invalid_datatype_for_children_fails(self):
got_exception = False
try:
_ = iaa.WithChannels(1, False)
except Exception as exc:
assert "Expected " in str(exc)
got_exception = True
assert got_exception
def test_zero_sized_axes(self):
shapes = [
(0, 0),
(0, 1),
(1, 0),
(0, 1, 0),
(1, 0, 0),
(0, 1, 1),
(1, 0, 1)
]
for shape in shapes:
with self.subTest(shape=shape):
image = np.zeros(shape, dtype=np.uint8)
aug = iaa.WithChannels([0], iaa.Add(1))
image_aug = aug(image=image)
assert image_aug.dtype.name == "uint8"
assert image_aug.shape == shape
def test_unusual_channel_numbers(self):
shapes = [
(1, 1, 4),
(1, 1, 5),
(1, 1, 512),
(1, 1, 513)
]
for shape in shapes:
with self.subTest(shape=shape):
image = np.zeros(shape, dtype=np.uint8)
aug = iaa.WithChannels([0], iaa.Add(1))
image_aug = aug(image=image)
assert np.all(image_aug[..., 0] == 1)
assert image_aug.dtype.name == "uint8"
assert image_aug.shape == shape
def test_get_parameters(self):
aug = iaa.WithChannels([1], iaa.Add(10))
params = aug.get_parameters()
assert len(params) == 1
assert params[0] == [1]
def test_get_children_lists(self):
children = iaa.Sequential([iaa.Add(10)])
aug = iaa.WithChannels(1, children)
assert aug.get_children_lists() == [children]
def test_to_deterministic(self):
child = iaa.Identity()
aug = iaa.WithChannels(1, [child])
aug_det = aug.to_deterministic()
assert aug_det.deterministic
assert aug_det.random_state is not aug.random_state
assert aug_det.children[0].deterministic
def test___repr___and___str__(self):
children = iaa.Sequential([iaa.Identity()])
aug = iaa.WithChannels(1, children, name="WithChannelsTest")
expected = (
"WithChannels("
"channels=[1], "
"name=WithChannelsTest, "
"children=%s, "
"deterministic=False"
")" % (str(children),))
assert aug.__repr__() == expected
assert aug.__str__() == expected
def test_other_dtypes_via_noop__bool(self):
aug = iaa.WithChannels([0], iaa.Identity())
image = np.zeros((3, 3, 2), dtype=bool)
image[0, 0, :] = True
image_aug = aug.augment_image(image)
assert image_aug.dtype.name == image.dtype.name
assert np.all(image_aug == image)
def test_other_dtypes_via_noop__uint_int(self):
aug = iaa.WithChannels([0], iaa.Identity())
dtypes = ["uint8", "uint16", "uint32", "uint64",
"int8", "int32", "int64"]
for dtype in dtypes:
with self.subTest(dtype=dtype):
min_value, center_value, max_value = \
iadt.get_value_range_of_dtype(dtype)
value = max_value
image = np.zeros((3, 3, 2), dtype=dtype)
image[0, 0, :] = value
image_aug = aug.augment_image(image)
assert image_aug.dtype.name == dtype
assert np.array_equal(image_aug, image)
def test_other_dtypes_via_noop__float(self):
aug = iaa.WithChannels([0], iaa.Identity())
dtypes = ["float16", "float32", "float64", "float128"]
values = [5000, 1000 ** 2, 1000 ** 3, 1000 ** 4]
for dtype, value in zip(dtypes, values):
with self.subTest(dtype=dtype):
image = np.zeros((3, 3, 2), dtype=dtype)
image[0, 0, :] = value
image_aug = aug.augment_image(image)
assert image_aug.dtype.name == dtype
assert np.all(image_aug == image)
def test_other_dtypes_via_flips__bool(self):
aug = iaa.WithChannels([0], iaa.Fliplr(1.0))
image = np.zeros((3, 3, 2), dtype=bool)
image[0, 0, :] = True
expected = np.zeros((3, 3, 2), dtype=bool)
expected[0, 2, 0] = True
expected[0, 0, 1] = True
image_aug = aug.augment_image(image)
assert image_aug.dtype.name == image.dtype.name
assert np.all(image_aug == expected)
def test_other_dtypes_via_flips__uint_int(self):
aug = iaa.WithChannels([0], iaa.Fliplr(1.0))
dtypes = ["uint8", "uint16", "uint32", "uint64",
"int8", "int32", "int64"]
for dtype in dtypes:
with self.subTest(dtype=dtype):
min_value, center_value, max_value = \
iadt.get_value_range_of_dtype(dtype)
value = max_value
image = np.zeros((3, 3, 2), dtype=dtype)
image[0, 0, :] = value
expected = np.zeros((3, 3, 2), dtype=dtype)
expected[0, 2, 0] = value
expected[0, 0, 1] = value
image_aug = aug.augment_image(image)
assert image_aug.dtype.name == dtype
assert np.array_equal(image_aug, expected)
def test_other_dtypes_via_flips__float(self):
aug = iaa.WithChannels([0], iaa.Fliplr(1.0))
dtypes = ["float16", "float32", "float64", "float128"]
values = [5000, 1000 ** 2, 1000 ** 3, 1000 ** 4]
for dtype, value in zip(dtypes, values):
with self.subTest(dtype=dtype):
image = np.zeros((3, 3, 2), dtype=dtype)
image[0, 0, :] = value
expected = np.zeros((3, 3, 2), dtype=dtype)
expected[0, 2, 0] = value
expected[0, 0, 1] = value
image_aug = aug.augment_image(image)
assert image_aug.dtype.name == dtype
assert np.all(image_aug == expected)
def test_pickleable(self):
aug = iaa.WithChannels([0], iaa.Add((1, 10), seed=2),
seed=1)
runtest_pickleable_uint8_img(aug, iterations=5)
class TestChannelShuffle(unittest.TestCase):
def setUp(self):
reseed()
def test___init__(self):
aug = iaa.ChannelShuffle(p=0.9, channels=[0, 2])
assert isinstance(aug.p, iap.Binomial)
assert isinstance(aug.p.p, iap.Deterministic)
assert np.allclose(aug.p.p.value, 0.9)
assert aug.channels == [0, 2]
def test_p_is_1(self):
aug = iaa.ChannelShuffle(p=1.0)
img = np.uint8([0, 1]).reshape((1, 1, 2))
expected = [
np.uint8([0, 1]).reshape((1, 1, 2)),
np.uint8([1, 0]).reshape((1, 1, 2))
]
seen = [False, False]
for _ in sm.xrange(100):
img_aug = aug.augment_image(img)
if np.array_equal(img_aug, expected[0]):
seen[0] = True
elif np.array_equal(img_aug, expected[1]):
seen[1] = True
else:
assert False
if np.all(seen):
break
assert np.all(seen)
def test_p_is_0(self):
aug = iaa.ChannelShuffle(p=0)
img = np.uint8([0, 1]).reshape((1, 1, 2))
for _ in sm.xrange(20):
img_aug = aug.augment_image(img)
assert np.array_equal(img_aug, img)
def test_p_is_1_and_channels_is_limited_subset(self):
aug = iaa.ChannelShuffle(p=1.0, channels=[0, 2])
img = np.uint8([0, 1, 2]).reshape((1, 1, 3))
expected = [
np.uint8([0, 1, 2]).reshape((1, 1, 3)),
np.uint8([2, 1, 0]).reshape((1, 1, 3))
]
seen = [False, False]
for _ in sm.xrange(100):
img_aug = aug.augment_image(img)
if np.array_equal(img_aug, expected[0]):
seen[0] = True
elif np.array_equal(img_aug, expected[1]):
seen[1] = True
else:
assert False
if np.all(seen):
break
assert np.all(seen)
def test_get_parameters(self):
aug = iaa.ChannelShuffle(p=1.0, channels=[0, 2])
assert aug.get_parameters()[0] == aug.p
assert aug.get_parameters()[1] == aug.channels
def test_heatmaps_must_not_change(self):
aug = iaa.ChannelShuffle(p=1.0)
hm = ia.HeatmapsOnImage(np.float32([[0, 0.5, 1.0]]), shape=(4, 4, 3))
hm_aug = aug.augment_heatmaps([hm])[0]
assert hm_aug.shape == (4, 4, 3)
assert hm_aug.arr_0to1.shape == (1, 3, 1)
assert np.allclose(hm.arr_0to1, hm_aug.arr_0to1)
def test_segmentation_maps_must_not_change(self):
aug = iaa.ChannelShuffle(p=1.0)
segmap = SegmentationMapsOnImage(np.int32([[0, 1, 2]]), shape=(4, 4, 3))
segmap_aug = aug.augment_segmentation_maps([segmap])[0]
assert segmap_aug.shape == (4, 4, 3)
assert segmap_aug.arr.shape == (1, 3, 1)
assert np.array_equal(segmap.arr, segmap_aug.arr)
def test_keypoints_must_not_change(self):
aug = iaa.ChannelShuffle(p=1.0)
kpsoi = ia.KeypointsOnImage([
ia.Keypoint(x=3, y=1), ia.Keypoint(x=2, y=4)
], shape=(10, 10, 3))
kpsoi_aug = aug.augment_keypoints([kpsoi])[0]
assert_cbaois_equal(kpsoi_aug, kpsoi)
def test_polygons_must_not_change(self):
aug = iaa.ChannelShuffle(p=1.0)
psoi = ia.PolygonsOnImage([
ia.Polygon([(0, 0), (5, 0), (5, 5)])
], shape=(10, 10, 3))
psoi_aug = aug.augment_polygons(psoi)
assert_cbaois_equal(psoi_aug, psoi)
def test_line_strings_must_not_change(self):
aug = iaa.ChannelShuffle(p=1.0)
lsoi = ia.LineStringsOnImage([
ia.LineString([(0, 0), (5, 0), (5, 5)])
], shape=(10, 10, 3))
lsoi_aug = aug.augment_line_strings(lsoi)
assert_cbaois_equal(lsoi_aug, lsoi)
def test_bounding_boxes_must_not_change(self):
aug = iaa.ChannelShuffle(p=1.0)
bbsoi = ia.BoundingBoxesOnImage([
ia.BoundingBox(x1=0, y1=0, x2=1.0, y2=1.5)
], shape=(10, 10, 3))
bbsoi_aug = aug.augment_bounding_boxes(bbsoi)
assert_cbaois_equal(bbsoi_aug, bbsoi)
def test_zero_sized_axes(self):
shapes = [
(0, 0),
(0, 1),
(1, 0),
(0, 1, 0),
(1, 0, 0),
(0, 1, 1),
(1, 0, 1)
]
for shape in shapes:
with self.subTest(shape=shape):
image = np.zeros(shape, dtype=np.uint8)
aug = iaa.ChannelShuffle(1.0)
image_aug = aug(image=image)
assert image_aug.dtype.name == "uint8"
assert image_aug.shape == shape
def test_unusual_channel_numbers(self):
shapes = [
(1, 1, 4),
(1, 1, 5),
(1, 1, 512),
(1, 1, 513)
]
for shape in shapes:
with self.subTest(shape=shape):
image = np.zeros(shape, dtype=np.uint8)
aug = iaa.ChannelShuffle(1.0)
image_aug = aug(image=image)
assert image_aug.dtype.name == "uint8"
assert image_aug.shape == shape
def test_other_dtypes_bool(self):
aug = iaa.ChannelShuffle(p=0.5)
image = np.zeros((3, 3, 2), dtype=bool)
image[0, 0, 0] = True
expected = [np.zeros((3, 3, 2), dtype=bool) for _ in sm.xrange(2)]
expected[0][0, 0, 0] = True
expected[1][0, 0, 1] = True
seen = [False, False]
for _ in sm.xrange(100):
image_aug = aug.augment_image(image)
assert image_aug.dtype.name == image.dtype.name
if np.all(image_aug == expected[0]):
seen[0] = True
elif np.all(image_aug == expected[1]):
seen[1] = True
else:
assert False
if np.all(seen):
break
assert np.all(seen)
def test_other_dtypes_uint_int(self):
aug = iaa.ChannelShuffle(p=0.5)
dtypes = ["uint8", "uint16", "uint32", "uint64",
"int8", "int32", "int64"]
for dtype in dtypes:
with self.subTest(dtype=dtype):
min_value, center_value, max_value = \
iadt.get_value_range_of_dtype(dtype)
value = max_value
image = np.zeros((3, 3, 2), dtype=dtype)
image[0, 0, 0] = value
expected = [np.zeros((3, 3, 2), dtype=dtype)
for _
in sm.xrange(2)]
expected[0][0, 0, 0] = value
expected[1][0, 0, 1] = value
seen = [False, False]
for _ in sm.xrange(100):
image_aug = aug.augment_image(image)
assert image_aug.dtype.name == dtype
if np.all(image_aug == expected[0]):
seen[0] = True
elif np.all(image_aug == expected[1]):
seen[1] = True
else:
assert False
if np.all(seen):
break
assert np.all(seen)
def test_other_dtypes_float(self):
aug = iaa.ChannelShuffle(p=0.5)
dtypes = ["float16", "float32", "float64", "float128"]
values = [5000, 1000 ** 2, 1000 ** 3, 1000 ** 4]
for dtype, value in zip(dtypes, values):
with self.subTest(dtype=dtype):
image = np.zeros((3, 3, 2), dtype=dtype)
image[0, 0, 0] = value
expected = [np.zeros((3, 3, 2), dtype=dtype)
for _
in sm.xrange(2)]
expected[0][0, 0, 0] = value
expected[1][0, 0, 1] = value
seen = [False, False]
for _ in sm.xrange(100):
image_aug = aug.augment_image(image)
assert image_aug.dtype.name == dtype
if np.all(image_aug == expected[0]):
seen[0] = True
elif np.all(image_aug == expected[1]):
seen[1] = True
else:
assert False
if np.all(seen):
break
assert np.all(seen)
def test_pickleable(self):
aug = iaa.ChannelShuffle(0.5, seed=1)
runtest_pickleable_uint8_img(aug, iterations=5, shape=(2, 2, 10))
class TestRemoveCBAsByOutOfImageFraction(unittest.TestCase):
def setUp(self):
reseed()
def test___init__(self):
aug = iaa.RemoveCBAsByOutOfImageFraction(0.51)
assert np.isclose(aug.fraction, 0.51)
def test_no_cbas_in_batch(self):
aug = iaa.RemoveCBAsByOutOfImageFraction(0.51)
dtypes = ["uint8", "uint16", "uint32", "uint64",
"int8", "int16", "int32", "int64",
"float16", "float32", "float64", "float128",
"bool"]
for dt in dtypes:
arr = np.ones((5, 10, 3), dtype=dt)
image_aug = aug(image=arr)
assert image_aug.dtype.name == dt
assert image_aug.shape == (5, 10, 3)
if arr.dtype.kind == "f":
assert np.allclose(image_aug, 1.0)
else:
assert np.all(image_aug == 1)
def test_keypoints(self):
aug = iaa.RemoveCBAsByOutOfImageFraction(0.51)
item1 = ia.Keypoint(x=5, y=1)
item2 = ia.Keypoint(x=15, y=1)
cbaoi = ia.KeypointsOnImage([item1, item2], shape=(10, 10, 3))
cbaoi_aug = aug(keypoints=cbaoi)
assert len(cbaoi_aug.items) == 1
for item_obs, item_exp in zip(cbaoi_aug.items, [item1]):
assert item_obs.coords_almost_equals(item_exp)
def test_bounding_boxes(self):
aug = iaa.RemoveCBAsByOutOfImageFraction(0.51)
item1 = ia.BoundingBox(y1=1, x1=5, y2=6, x2=9)
item2 = ia.BoundingBox(y1=1, x1=5, y2=6, x2=15)
item3 = ia.BoundingBox(y1=1, x1=15, y2=6, x2=25)
cbaoi = ia.BoundingBoxesOnImage([item1, item2, item3],
shape=(10, 10, 3))
cbaoi_aug = aug(bounding_boxes=cbaoi)
assert len(cbaoi_aug.items) == 2
for item_obs, item_exp in zip(cbaoi_aug.items, [item1, item2]):
assert item_obs.coords_almost_equals(item_exp)
def test_polygons(self):
aug = iaa.RemoveCBAsByOutOfImageFraction(0.51)
item1 = ia.Polygon([(5, 1), (9, 1), (9, 2), (5, 2)])
item2 = ia.Polygon([(5, 1), (15, 1), (15, 2), (5, 2)])
item3 = ia.Polygon([(15, 1), (25, 1), (25, 2), (15, 2)])
cbaoi = ia.PolygonsOnImage([item1, item2, item3],
shape=(10, 10, 3))
cbaoi_aug = aug(polygons=cbaoi)
assert len(cbaoi_aug.items) == 2
for item_obs, item_exp in zip(cbaoi_aug.items, [item1, item2]):
assert item_obs.coords_almost_equals(item_exp)
def test_line_strings(self):
aug = iaa.RemoveCBAsByOutOfImageFraction(0.51)
item1 = ia.LineString([(5, 1), (9, 1)])
item2 = ia.LineString([(5, 1), (15, 1)])
item3 = ia.LineString([(15, 1), (25, 1)])
cbaoi = ia.LineStringsOnImage([item1, item2, item3],
shape=(10, 10, 3))
cbaoi_aug = aug(line_strings=cbaoi)
assert len(cbaoi_aug.items) == 2
for item_obs, item_exp in zip(cbaoi_aug.items, [item1, item2]):
assert item_obs.coords_almost_equals(item_exp)
def test_get_parameters(self):
aug = iaa.RemoveCBAsByOutOfImageFraction(0.51)
params = aug.get_parameters()
assert len(params) == 1
assert np.isclose(params[0], 0.51)
def test_pickleable(self):
item1 = ia.Keypoint(x=5, y=1)
item2 = ia.Keypoint(x=15, y=1)
cbaoi = ia.KeypointsOnImage([item1, item2], shape=(10, 10, 3))
augmenter = iaa.RemoveCBAsByOutOfImageFraction(0.51)
augmenter_pkl = pickle.loads(pickle.dumps(augmenter, protocol=-1))
for _ in np.arange(3):
cbaoi_aug = augmenter(keypoints=cbaoi)
cbaoi_aug_pkl = augmenter_pkl(keypoints=cbaoi)
assert np.allclose(cbaoi_aug.to_xy_array(), cbaoi_aug_pkl.to_xy_array())
class TestClipCBAsToImagePlanes(unittest.TestCase):
def setUp(self):
reseed()
def test_no_cbas_in_batch(self):
aug = iaa.RemoveCBAsByOutOfImageFraction(0.51)
dtypes = ["uint8", "uint16", "uint32", "uint64",
"int8", "int16", "int32", "int64",
"float16", "float32", "float64", "float128",
"bool"]
for dt in dtypes:
arr = np.ones((5, 10, 3), dtype=dt)
image_aug = aug(image=arr)
assert image_aug.dtype.name == dt
assert image_aug.shape == (5, 10, 3)
if arr.dtype.kind == "f":
assert np.allclose(image_aug, 1.0)
else:
assert np.all(image_aug == 1)
def test_keypoints(self):
aug = iaa.RemoveCBAsByOutOfImageFraction(0.51)
item1 = ia.Keypoint(x=5, y=1)
item2 = ia.Keypoint(x=15, y=1)
cbaoi = ia.KeypointsOnImage([item1, item2], shape=(10, 10, 3))
cbaoi_aug = aug(keypoints=cbaoi)
assert len(cbaoi_aug.items) == 1
for item_obs, item_exp in zip(cbaoi_aug.items, [item1]):
assert item_obs.coords_almost_equals(item_exp)
def test_bounding_boxes(self):
aug = iaa.ClipCBAsToImagePlanes()
item1 = ia.BoundingBox(y1=1, x1=5, y2=6, x2=9)
item2 = ia.BoundingBox(y1=1, x1=5, y2=6, x2=15)
item3 = ia.BoundingBox(y1=1, x1=15, y2=6, x2=25)
cbaoi = ia.BoundingBoxesOnImage([item1, item2, item3],
shape=(10, 10, 3))
cbaoi_aug = aug(bounding_boxes=cbaoi)
expected = [
ia.BoundingBox(y1=1, x1=5, y2=6, x2=9),
ia.BoundingBox(y1=1, x1=5, y2=6, x2=10)
]
assert len(cbaoi_aug.items) == len(expected)
for item_obs, item_exp in zip(cbaoi_aug.items, expected):
assert item_obs.coords_almost_equals(item_exp)
def test_polygons(self):
aug = iaa.ClipCBAsToImagePlanes()
item1 = ia.Polygon([(5, 1), (9, 1), (9, 2), (5, 2)])
item2 = ia.Polygon([(5, 1), (15, 1), (15, 2), (5, 2)])
item3 = ia.Polygon([(15, 1), (25, 1), (25, 2), (15, 2)])
cbaoi = ia.PolygonsOnImage([item1, item2, item3],
shape=(10, 10, 3))
cbaoi_aug = aug(polygons=cbaoi)
expected = [
ia.Polygon([(5, 1), (9, 1), (9, 2), (5, 2)]),
ia.Polygon([(5, 1), (10, 1), (10, 2), (5, 2)])
]
assert len(cbaoi_aug.items) == len(expected)
for item_obs, item_exp in zip(cbaoi_aug.items, expected):
assert item_obs.coords_almost_equals(item_exp)
def test_line_strings(self):
aug = iaa.ClipCBAsToImagePlanes()
item1 = ia.LineString([(5, 1), (9, 1)])
item2 = ia.LineString([(5, 1), (15, 1)])
item3 = ia.LineString([(15, 1), (25, 1)])
cbaoi = ia.LineStringsOnImage([item1, item2, item3],
shape=(10, 10, 3))
cbaoi_aug = aug(line_strings=cbaoi)
expected = [
ia.LineString([(5, 1), (9, 1)]),
ia.LineString([(5, 1), (10, 1)])
]
assert len(cbaoi_aug.items) == len(expected)
for item_obs, item_exp in zip(cbaoi_aug.items, expected):
assert item_obs.coords_almost_equals(item_exp, max_distance=1e-2)
def test_get_parameters(self):
aug = iaa.ClipCBAsToImagePlanes()
params = aug.get_parameters()
assert len(params) == 0
def test_pickleable(self):
item1 = ia.Keypoint(x=5, y=1)
item2 = ia.Keypoint(x=15, y=1)
cbaoi = ia.KeypointsOnImage([item1, item2], shape=(10, 10, 3))
augmenter = iaa.ClipCBAsToImagePlanes()
augmenter_pkl = pickle.loads(pickle.dumps(augmenter, protocol=-1))
for _ in np.arange(3):
cbaoi_aug = augmenter(keypoints=cbaoi)
cbaoi_aug_pkl = augmenter_pkl(keypoints=cbaoi)
assert np.allclose(cbaoi_aug.to_xy_array(), cbaoi_aug_pkl.to_xy_array())
| 37.969255
| 84
| 0.586846
| 42,980
| 338,382
| 4.377548
| 0.02222
| 0.006846
| 0.003922
| 0.016455
| 0.864675
| 0.830282
| 0.794772
| 0.76394
| 0.724481
| 0.699124
| 0
| 0.044232
| 0.298411
| 338,382
| 8,911
| 85
| 37.973516
| 0.748282
| 0.020087
| 0
| 0.68112
| 0
| 0
| 0.016506
| 0.001298
| 0
| 0
| 0
| 0.000224
| 0.180267
| 1
| 0.121837
| false
| 0.000142
| 0.004549
| 0.014643
| 0.167472
| 0.000142
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
434823ed3aa63066ddcf582e7d9343c3ccd7ebfc
| 60
|
py
|
Python
|
free_sms_otp/__init__.py
|
QwertyQwertovich/free-sms-otp
|
b8ffb2510c5a2a5167d61b86c7e09c2abed38366
|
[
"MIT"
] | 2
|
2021-09-23T20:31:41.000Z
|
2021-09-24T05:52:19.000Z
|
free_sms_otp/__init__.py
|
QwertyQwertovich/free-sms-otp
|
b8ffb2510c5a2a5167d61b86c7e09c2abed38366
|
[
"MIT"
] | null | null | null |
free_sms_otp/__init__.py
|
QwertyQwertovich/free-sms-otp
|
b8ffb2510c5a2a5167d61b86c7e09c2abed38366
|
[
"MIT"
] | null | null | null |
from free_sms_otp.main_func import generate_pass, check_pass
| 60
| 60
| 0.9
| 11
| 60
| 4.454545
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.066667
| 60
| 1
| 60
| 60
| 0.875
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 1
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
|
0
| 6
|
4a2d5b5d7c9a743828eb11c74b00187fb6ea7478
| 3,421
|
py
|
Python
|
TunAugmentor/transformations/translations.py
|
ahmedbelgacem/TunAugmentor
|
a18c3ee4be985ebf621b4caf59c0c8c2c52ef3cd
|
[
"MIT"
] | null | null | null |
TunAugmentor/transformations/translations.py
|
ahmedbelgacem/TunAugmentor
|
a18c3ee4be985ebf621b4caf59c0c8c2c52ef3cd
|
[
"MIT"
] | null | null | null |
TunAugmentor/transformations/translations.py
|
ahmedbelgacem/TunAugmentor
|
a18c3ee4be985ebf621b4caf59c0c8c2c52ef3cd
|
[
"MIT"
] | 1
|
2021-12-23T16:56:26.000Z
|
2021-12-23T16:56:26.000Z
|
from .basic_transform import BasicTransform
from typing import List
import numpy as np
class Translation (BasicTransform):
"""
Translates the image along the y-axis and colors the remaining part of the image with the chosen color.
Parameters
----------
shift_along_x : int
Distance of the shift along x-axis.
shift_along_y : int
Distance of the shift along y-axis.
color_value : int
The chosen color for the remaining part of the image.
"""
def __init__(self, shift_along_x, shift_along_y, color_value):
self.shift_along_y = shift_along_y
self.shift_along_x = shift_along_x
self.color_value = color_value
def transform(self, images: List[np.ndarray]):
self.check_images(images)
res = []
for im in images:
height, width = im.shape[:2]
if self.shift_along_y > height or self.shift_along_x > width:
raise ValueError("shift_along_y and shift_along_x should be less then height and width of the image "
"respectively")
output_im = np.zeros(im.shape, dtype='u1')
output_im[:] = self.color_value
output_im[self.shift_along_y:, self.shift_along_x:] = im[:height - self.shift_along_y, :width-self.shift_along_x]
res.append(output_im)
return res
class TranslationX(BasicTransform):
"""
Translates the image along the x-axis then adds a padding
corresponding to the color value chosen.
Parameters
----------
shift_along_x : int
Distance of the shift along x-axis.
color_value : int
The chosen color for the padding
"""
def __init__(self, shift_along_x, color_value):
self.shift_along_x = shift_along_x
self.color_value = color_value
def transform(self, images: List[np.ndarray]):
self.check_images(images)
res = []
for im in images:
height, width = im.shape[:2]
if self.shift_along_x > width:
raise ValueError("shift_along_x should be less then width of the image")
output_im = np.zeros(im.shape, dtype='u1')
output_im[:] = self.color_value
output_im[:, self.shift_along_x:] = im[:, :width - self.shift_along_x]
res.append(output_im)
return res
class TranslationY(BasicTransform):
"""
Translates the image along the y-axis and colors the remaining part of the image with the chosen color.
Parameters
----------
shift_along_y : int
Distance of the shift along y-axis.
color_value : int
The chosen color for the remaining part of the image.
"""
def __init__(self, shift_along_y, color_value):
self.shift_along_y = shift_along_y
self.color_value = color_value
def transform(self, images: List[np.ndarray]):
self.check_images(images)
res = []
for im in images:
height, width = im.shape[:2]
if self.shift_along_y > height:
raise ValueError("shift_along_y should be less then height of the image")
output_im = np.zeros(im.shape, dtype='u1')
output_im[:] = self.color_value
output_im[self.shift_along_y:, :] = im[:height - self.shift_along_y, :]
res.append(output_im)
return res
| 34.555556
| 125
| 0.621748
| 464
| 3,421
| 4.353448
| 0.146552
| 0.178218
| 0.131683
| 0.074257
| 0.893564
| 0.859901
| 0.793069
| 0.763861
| 0.763861
| 0.709901
| 0
| 0.002477
| 0.29202
| 3,421
| 98
| 126
| 34.908163
| 0.831544
| 0.242034
| 0
| 0.641509
| 0
| 0
| 0.083845
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.113208
| false
| 0
| 0.056604
| 0
| 0.283019
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
4a3f492e9c994df0a77d27b08f9b36f1ed04a8c3
| 472
|
py
|
Python
|
bot/db/entities/File.py
|
WizzardHub/EcoleDirecteOrtBot
|
d64ea45acbae3ba4b10152a25bf25abf6ba9525d
|
[
"MIT"
] | null | null | null |
bot/db/entities/File.py
|
WizzardHub/EcoleDirecteOrtBot
|
d64ea45acbae3ba4b10152a25bf25abf6ba9525d
|
[
"MIT"
] | null | null | null |
bot/db/entities/File.py
|
WizzardHub/EcoleDirecteOrtBot
|
d64ea45acbae3ba4b10152a25bf25abf6ba9525d
|
[
"MIT"
] | null | null | null |
class File:
def __init__(self, file):
self._libelle = None
self._date = None
if len(file) <= 0:
return
self._libelle = file['libelle']
self._date = file['date']
def getLibelle(self):
return self._libelle
def getDate(self):
return self._date
def isEmpty(self):
return self._libelle is None
def __str__(self):
return f'Libelle: {self._libelle} Date: {self._date}'
| 20.521739
| 61
| 0.567797
| 56
| 472
| 4.482143
| 0.321429
| 0.219124
| 0.203187
| 0.167331
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.003135
| 0.324153
| 472
| 23
| 61
| 20.521739
| 0.783699
| 0
| 0
| 0
| 0
| 0
| 0.114165
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.3125
| false
| 0
| 0
| 0.25
| 0.6875
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 6
|
4a5adaf9df15c7bb1003c878eb9550d10606a716
| 46,951
|
py
|
Python
|
poseconnect/overlay.py
|
WildflowerSchools/poseconnect
|
5d0c188b7f8477f4b8020fa3f9d510a39581713b
|
[
"MIT"
] | null | null | null |
poseconnect/overlay.py
|
WildflowerSchools/poseconnect
|
5d0c188b7f8477f4b8020fa3f9d510a39581713b
|
[
"MIT"
] | null | null | null |
poseconnect/overlay.py
|
WildflowerSchools/poseconnect
|
5d0c188b7f8477f4b8020fa3f9d510a39581713b
|
[
"MIT"
] | null | null | null |
import poseconnect.utils
import poseconnect.defaults
# import process_pose_data.local_io
# import poseconnect.visualize
# import honeycomb_io
# import video_io
import pandas as pd
import numpy as np
import cv_utils
# import cv2 as cv
# import ffmpeg
# import matplotlib.pyplot as plt
import matplotlib.colors
# import seaborn as sns
import tqdm
# import slugify
# import functools
import datetime
# import string
import logging
# import multiprocessing
import os
logger = logging.getLogger(__name__)
KEYPOINT_CONNECTORS_BY_POSE_MODEL = {
'COCO-17': [[5, 6], [5, 11], [6, 12], [11, 12], [0, 1], [0, 2], [0, 3], [0, 4], [0, 5], [0, 6], [5, 6], [5, 7], [7, 9], [6, 8], [8, 10], [11, 13], [13, 15], [12, 14], [14, 16]],
'COCO-18': [[2, 5], [2, 8], [5, 11], [8, 11], [1, 2], [1, 5], [1, 0], [0, 14], [0, 15], [0, 16], [0, 17], [1, 16], [1, 17], [2, 3], [3, 4], [5, 6], [6, 7], [8, 9], [9, 10], [11, 12], [12, 13]],
'MPII-15': [[0, 1], [1, 14], [14, 2], [2, 3], [3, 4], [14, 5], [5, 6], [6, 7], [14, 8], [8, 9], [9, 10], [14, 11], [11, 12], [12, 13]],
'MPII-16': [[6, 7], [7, 8], [8, 9], [6, 2], [2, 1], [1, 0], [6, 3], [3, 4], [4, 5], [8, 12], [12, 11], [11, 10], [8, 13], [13, 14], [14, 15]],
'BODY_25': [[2, 3], [3, 4], [5, 2], [5, 6], [6, 7], [0, 1], [0, 15], [0, 16], [1, 2], [1, 5], [15, 17], [16, 18], [1, 8], [8, 9], [9, 10], [10, 11], [11, 24], [24, 22], [24, 23], [8, 12], [12, 13], [13, 14], [14, 21], [21, 19], [21, 20]]
}
def overlay_poses_2d(
poses_2d,
camera_id,
video_input_path,
video_start_time,
video_fps=poseconnect.defaults.OVERLAY_VIDEO_FPS,
video_frame_count=poseconnect.defaults.OVERLAY_VIDEO_FRAME_COUNT,
video_output_path=poseconnect.defaults.OVERLAY_VIDEO_OUTPUT_PATH,
video_output_directory=poseconnect.defaults.OVERLAY_VIDEO_OUTPUT_DIRECTORY,
video_output_filename_suffix=poseconnect.defaults.OVERLAY_VIDEO_OUTPUT_FILENAME_SUFFIX_POSES_2D,
video_output_filename_extension=poseconnect.defaults.OVERLAY_VIDEO_OUTPUT_FILENAME_EXTENSION,
video_output_fourcc_string=poseconnect.defaults.OVERLAY_VIDEO_OUTPUT_FOURCC_STRING,
draw_keypoint_connectors=poseconnect.defaults.OVERLAY_DRAW_KEYPOINT_CONNECTORS,
keypoint_connectors=poseconnect.defaults.OVERLAY_KEYPOINT_CONNECTORS,
pose_model_name=poseconnect.defaults.OVERLAY_POSE_MODEL_NAME,
pose_color=poseconnect.defaults.OVERLAY_POSE_COLOR,
keypoint_radius=poseconnect.defaults.OVERLAY_KEYPOINT_RADIUS,
keypoint_alpha=poseconnect.defaults.OVERLAY_KEYPOINT_ALPHA,
keypoint_connector_alpha=poseconnect.defaults.OVERLAY_KEYPOINT_CONNECTOR_ALPHA,
keypoint_connector_linewidth=poseconnect.defaults.OVERLAY_KEYPOINT_CONNECTOR_LINEWIDTH,
pose_label_text_color=poseconnect.defaults.OVERLAY_POSE_LABEL_TEXT_COLOR,
pose_label_box_alpha=poseconnect.defaults.OVERLAY_POSE_LABEL_BOX_ALPHA,
pose_label_font_scale=poseconnect.defaults.OVERLAY_POSE_LABEL_FONT_SCALE,
pose_label_text_line_width=poseconnect.defaults.OVERLAY_POSE_LABEL_TEXT_LINE_WIDTH,
progress_bar=poseconnect.defaults.PROGRESS_BAR,
notebook=poseconnect.defaults.NOTEBOOK
):
overlay_poses_video(
poses=poses_2d,
video_input_path=video_input_path,
video_start_time=video_start_time,
pose_type='2d',
camera_id=camera_id,
camera_calibration=None,
camera_calibrations=None,
pose_label_column=None,
pose_label_map=None,
generate_pose_label_map=False,
video_fps=video_fps,
video_frame_count=video_frame_count,
video_output_path=video_output_path,
video_output_directory=video_output_directory,
video_output_filename_suffix=video_output_filename_suffix,
video_output_filename_extension=video_output_filename_extension,
video_output_fourcc_string=video_output_fourcc_string,
draw_keypoint_connectors=draw_keypoint_connectors,
keypoint_connectors=keypoint_connectors,
pose_model_name=pose_model_name,
pose_color=pose_color,
keypoint_radius=keypoint_radius,
keypoint_alpha=keypoint_alpha,
keypoint_connector_alpha=keypoint_connector_alpha,
keypoint_connector_linewidth=keypoint_connector_linewidth,
pose_label_text_color=pose_label_text_color,
pose_label_box_alpha=pose_label_box_alpha,
pose_label_font_scale=pose_label_font_scale,
pose_label_text_line_width=pose_label_text_line_width,
progress_bar=progress_bar,
notebook=notebook
)
def overlay_poses_3d(
poses_3d,
camera_calibrations,
camera_id,
video_input_path,
video_start_time,
video_fps=poseconnect.defaults.OVERLAY_VIDEO_FPS,
video_frame_count=poseconnect.defaults.OVERLAY_VIDEO_FRAME_COUNT,
video_output_path=poseconnect.defaults.OVERLAY_VIDEO_OUTPUT_PATH,
video_output_directory=poseconnect.defaults.OVERLAY_VIDEO_OUTPUT_DIRECTORY,
video_output_filename_suffix=poseconnect.defaults.OVERLAY_VIDEO_OUTPUT_FILENAME_SUFFIX_POSES_3D,
video_output_filename_extension=poseconnect.defaults.OVERLAY_VIDEO_OUTPUT_FILENAME_EXTENSION,
video_output_fourcc_string=poseconnect.defaults.OVERLAY_VIDEO_OUTPUT_FOURCC_STRING,
draw_keypoint_connectors=poseconnect.defaults.OVERLAY_DRAW_KEYPOINT_CONNECTORS,
keypoint_connectors=poseconnect.defaults.OVERLAY_KEYPOINT_CONNECTORS,
pose_model_name=poseconnect.defaults.OVERLAY_POSE_MODEL_NAME,
pose_color=poseconnect.defaults.OVERLAY_POSE_COLOR,
keypoint_radius=poseconnect.defaults.OVERLAY_KEYPOINT_RADIUS,
keypoint_alpha=poseconnect.defaults.OVERLAY_KEYPOINT_ALPHA,
keypoint_connector_alpha=poseconnect.defaults.OVERLAY_KEYPOINT_CONNECTOR_ALPHA,
keypoint_connector_linewidth=poseconnect.defaults.OVERLAY_KEYPOINT_CONNECTOR_LINEWIDTH,
pose_label_text_color=poseconnect.defaults.OVERLAY_POSE_LABEL_TEXT_COLOR,
pose_label_box_alpha=poseconnect.defaults.OVERLAY_POSE_LABEL_BOX_ALPHA,
pose_label_font_scale=poseconnect.defaults.OVERLAY_POSE_LABEL_FONT_SCALE,
pose_label_text_line_width=poseconnect.defaults.OVERLAY_POSE_LABEL_TEXT_LINE_WIDTH,
progress_bar=poseconnect.defaults.PROGRESS_BAR,
notebook=poseconnect.defaults.NOTEBOOK
):
overlay_poses_video(
poses=poses_3d,
video_input_path=video_input_path,
video_start_time=video_start_time,
pose_type='3d',
camera_id=camera_id,
camera_calibration=None,
camera_calibrations=camera_calibrations,
pose_label_column=None,
pose_label_map=None,
generate_pose_label_map=False,
video_fps=video_fps,
video_frame_count=video_frame_count,
video_output_path=video_output_path,
video_output_directory=video_output_directory,
video_output_filename_suffix=video_output_filename_suffix,
video_output_filename_extension=video_output_filename_extension,
video_output_fourcc_string=video_output_fourcc_string,
draw_keypoint_connectors=draw_keypoint_connectors,
keypoint_connectors=keypoint_connectors,
pose_model_name=pose_model_name,
pose_color=pose_color,
keypoint_radius=keypoint_radius,
keypoint_alpha=keypoint_alpha,
keypoint_connector_alpha=keypoint_connector_alpha,
keypoint_connector_linewidth=keypoint_connector_linewidth,
pose_label_text_color=pose_label_text_color,
pose_label_box_alpha=pose_label_box_alpha,
pose_label_font_scale=pose_label_font_scale,
pose_label_text_line_width=pose_label_text_line_width,
progress_bar=progress_bar,
notebook=notebook
)
def overlay_poses_3d_tracked(
poses_3d,
camera_calibrations,
camera_id,
video_input_path,
video_start_time,
video_fps=poseconnect.defaults.OVERLAY_VIDEO_FPS,
video_frame_count=poseconnect.defaults.OVERLAY_VIDEO_FRAME_COUNT,
video_output_path=poseconnect.defaults.OVERLAY_VIDEO_OUTPUT_PATH,
video_output_directory=poseconnect.defaults.OVERLAY_VIDEO_OUTPUT_DIRECTORY,
video_output_filename_suffix=poseconnect.defaults.OVERLAY_VIDEO_OUTPUT_FILENAME_SUFFIX_POSES_3D_TRACKED,
video_output_filename_extension=poseconnect.defaults.OVERLAY_VIDEO_OUTPUT_FILENAME_EXTENSION,
video_output_fourcc_string=poseconnect.defaults.OVERLAY_VIDEO_OUTPUT_FOURCC_STRING,
draw_keypoint_connectors=poseconnect.defaults.OVERLAY_DRAW_KEYPOINT_CONNECTORS,
keypoint_connectors=poseconnect.defaults.OVERLAY_KEYPOINT_CONNECTORS,
pose_model_name=poseconnect.defaults.OVERLAY_POSE_MODEL_NAME,
pose_color=poseconnect.defaults.OVERLAY_POSE_COLOR,
keypoint_radius=poseconnect.defaults.OVERLAY_KEYPOINT_RADIUS,
keypoint_alpha=poseconnect.defaults.OVERLAY_KEYPOINT_ALPHA,
keypoint_connector_alpha=poseconnect.defaults.OVERLAY_KEYPOINT_CONNECTOR_ALPHA,
keypoint_connector_linewidth=poseconnect.defaults.OVERLAY_KEYPOINT_CONNECTOR_LINEWIDTH,
pose_label_text_color=poseconnect.defaults.OVERLAY_POSE_LABEL_TEXT_COLOR,
pose_label_box_alpha=poseconnect.defaults.OVERLAY_POSE_LABEL_BOX_ALPHA,
pose_label_font_scale=poseconnect.defaults.OVERLAY_POSE_LABEL_FONT_SCALE,
pose_label_text_line_width=poseconnect.defaults.OVERLAY_POSE_LABEL_TEXT_LINE_WIDTH,
progress_bar=poseconnect.defaults.PROGRESS_BAR,
notebook=poseconnect.defaults.NOTEBOOK
):
overlay_poses_video(
poses=poses_3d,
video_input_path=video_input_path,
video_start_time=video_start_time,
pose_type='3d',
camera_id=camera_id,
camera_calibration=None,
camera_calibrations=camera_calibrations,
pose_label_column='pose_track_3d_id',
pose_label_map=None,
generate_pose_label_map=True,
video_fps=video_fps,
video_frame_count=video_frame_count,
video_output_path=video_output_path,
video_output_directory=video_output_directory,
video_output_filename_suffix=video_output_filename_suffix,
video_output_filename_extension=video_output_filename_extension,
video_output_fourcc_string=video_output_fourcc_string,
draw_keypoint_connectors=draw_keypoint_connectors,
keypoint_connectors=keypoint_connectors,
pose_model_name=pose_model_name,
pose_color=pose_color,
keypoint_radius=keypoint_radius,
keypoint_alpha=keypoint_alpha,
keypoint_connector_alpha=keypoint_connector_alpha,
keypoint_connector_linewidth=keypoint_connector_linewidth,
pose_label_text_color=pose_label_text_color,
pose_label_box_alpha=pose_label_box_alpha,
pose_label_font_scale=pose_label_font_scale,
pose_label_text_line_width=pose_label_text_line_width,
progress_bar=progress_bar,
notebook=notebook
)
def overlay_poses_3d_identified(
poses_3d,
camera_calibrations,
camera_id,
video_input_path,
video_start_time,
person_lookup=None,
video_fps=poseconnect.defaults.OVERLAY_VIDEO_FPS,
video_frame_count=poseconnect.defaults.OVERLAY_VIDEO_FRAME_COUNT,
video_output_path=poseconnect.defaults.OVERLAY_VIDEO_OUTPUT_PATH,
video_output_directory=poseconnect.defaults.OVERLAY_VIDEO_OUTPUT_DIRECTORY,
video_output_filename_suffix=poseconnect.defaults.OVERLAY_VIDEO_OUTPUT_FILENAME_SUFFIX_POSES_3D_IDENTIFIED,
video_output_filename_extension=poseconnect.defaults.OVERLAY_VIDEO_OUTPUT_FILENAME_EXTENSION,
video_output_fourcc_string=poseconnect.defaults.OVERLAY_VIDEO_OUTPUT_FOURCC_STRING,
draw_keypoint_connectors=poseconnect.defaults.OVERLAY_DRAW_KEYPOINT_CONNECTORS,
keypoint_connectors=poseconnect.defaults.OVERLAY_KEYPOINT_CONNECTORS,
pose_model_name=poseconnect.defaults.OVERLAY_POSE_MODEL_NAME,
pose_color=poseconnect.defaults.OVERLAY_POSE_COLOR,
keypoint_radius=poseconnect.defaults.OVERLAY_KEYPOINT_RADIUS,
keypoint_alpha=poseconnect.defaults.OVERLAY_KEYPOINT_ALPHA,
keypoint_connector_alpha=poseconnect.defaults.OVERLAY_KEYPOINT_CONNECTOR_ALPHA,
keypoint_connector_linewidth=poseconnect.defaults.OVERLAY_KEYPOINT_CONNECTOR_LINEWIDTH,
pose_label_text_color=poseconnect.defaults.OVERLAY_POSE_LABEL_TEXT_COLOR,
pose_label_box_alpha=poseconnect.defaults.OVERLAY_POSE_LABEL_BOX_ALPHA,
pose_label_font_scale=poseconnect.defaults.OVERLAY_POSE_LABEL_FONT_SCALE,
pose_label_text_line_width=poseconnect.defaults.OVERLAY_POSE_LABEL_TEXT_LINE_WIDTH,
progress_bar=poseconnect.defaults.PROGRESS_BAR,
notebook=poseconnect.defaults.NOTEBOOK
):
overlay_poses_video(
poses=poses_3d,
video_input_path=video_input_path,
video_start_time=video_start_time,
pose_type='3d',
camera_id=camera_id,
camera_calibration=None,
camera_calibrations=camera_calibrations,
pose_label_column='person_id',
pose_label_map=person_lookup,
generate_pose_label_map=True,
video_fps=video_fps,
video_frame_count=video_frame_count,
video_output_path=video_output_path,
video_output_directory=video_output_directory,
video_output_filename_suffix=video_output_filename_suffix,
video_output_filename_extension=video_output_filename_extension,
video_output_fourcc_string=video_output_fourcc_string,
draw_keypoint_connectors=draw_keypoint_connectors,
keypoint_connectors=keypoint_connectors,
pose_model_name=pose_model_name,
pose_color=pose_color,
keypoint_radius=keypoint_radius,
keypoint_alpha=keypoint_alpha,
keypoint_connector_alpha=keypoint_connector_alpha,
keypoint_connector_linewidth=keypoint_connector_linewidth,
pose_label_text_color=pose_label_text_color,
pose_label_box_alpha=pose_label_box_alpha,
pose_label_font_scale=pose_label_font_scale,
pose_label_text_line_width=pose_label_text_line_width,
progress_bar=progress_bar,
notebook=notebook
)
def overlay_poses_video(
poses,
video_input_path,
video_start_time,
pose_type=poseconnect.defaults.OVERLAY_POSE_TYPE,
camera_id=poseconnect.defaults.OVERLAY_CAMERA_ID,
camera_calibration=poseconnect.defaults.OVERLAY_CAMERA_CALIBRATION,
camera_calibrations=poseconnect.defaults.OVERLAY_CAMERA_CALIBRATIONS,
pose_label_column=poseconnect.defaults.OVERLAY_POSE_LABEL_COLUMN,
pose_label_map=poseconnect.defaults.OVERLAY_POSE_LABEL_MAP,
generate_pose_label_map=poseconnect.defaults.OVERLAY_GENERATE_POSE_LABEL_MAP,
video_fps=poseconnect.defaults.OVERLAY_VIDEO_FPS,
video_frame_count=poseconnect.defaults.OVERLAY_VIDEO_FRAME_COUNT,
video_output_path=poseconnect.defaults.OVERLAY_VIDEO_OUTPUT_PATH,
video_output_directory=poseconnect.defaults.OVERLAY_VIDEO_OUTPUT_DIRECTORY,
video_output_filename_suffix=poseconnect.defaults.OVERLAY_VIDEO_OUTPUT_FILENAME_SUFFIX,
video_output_filename_extension=poseconnect.defaults.OVERLAY_VIDEO_OUTPUT_FILENAME_EXTENSION,
video_output_fourcc_string=poseconnect.defaults.OVERLAY_VIDEO_OUTPUT_FOURCC_STRING,
draw_keypoint_connectors=poseconnect.defaults.OVERLAY_DRAW_KEYPOINT_CONNECTORS,
keypoint_connectors=poseconnect.defaults.OVERLAY_KEYPOINT_CONNECTORS,
pose_model_name=poseconnect.defaults.OVERLAY_POSE_MODEL_NAME,
pose_color=poseconnect.defaults.OVERLAY_POSE_COLOR,
keypoint_radius=poseconnect.defaults.OVERLAY_KEYPOINT_RADIUS,
keypoint_alpha=poseconnect.defaults.OVERLAY_KEYPOINT_ALPHA,
keypoint_connector_alpha=poseconnect.defaults.OVERLAY_KEYPOINT_CONNECTOR_ALPHA,
keypoint_connector_linewidth=poseconnect.defaults.OVERLAY_KEYPOINT_CONNECTOR_LINEWIDTH,
pose_label_text_color=poseconnect.defaults.OVERLAY_POSE_LABEL_TEXT_COLOR,
pose_label_box_alpha=poseconnect.defaults.OVERLAY_POSE_LABEL_BOX_ALPHA,
pose_label_font_scale=poseconnect.defaults.OVERLAY_POSE_LABEL_FONT_SCALE,
pose_label_text_line_width=poseconnect.defaults.OVERLAY_POSE_LABEL_TEXT_LINE_WIDTH,
draw_timestamp=poseconnect.defaults.OVERLAY_DRAW_TIMESTAMP,
timestamp_padding=poseconnect.defaults.OVERLAY_TIMESTAMP_PADDING,
timestamp_font_scale=poseconnect.defaults.OVERLAY_TIMESTAMP_FONT_SCALE,
timestamp_text_line_width=poseconnect.defaults.OVERLAY_TIMESTAMP_TEXT_LINE_WIDTH,
timestamp_text_color=poseconnect.defaults.OVERLAY_TIMESTAMP_TEXT_COLOR,
timestamp_box_color=poseconnect.defaults.OVERLAY_TIMESTAMP_BOX_COLOR,
timestamp_box_alpha=poseconnect.defaults.OVERLAY_TIMESTAMP_BOX_ALPHA,
progress_bar=poseconnect.defaults.PROGRESS_BAR,
notebook=poseconnect.defaults.NOTEBOOK
):
poses = poseconnect.utils.ingest_poses_generic(
data_object=poses,
pose_type=pose_type
)
poses=poses.copy()
video_start_time = poseconnect.utils.convert_to_datetime_utc(video_start_time)
if camera_calibration is None:
if camera_calibrations is not None and camera_id is not None:
camera_calibrations = poseconnect.utils.ingest_camera_calibrations(camera_calibrations)
camera_calibrations = camera_calibrations.to_dict(orient='index')
if camera_id not in camera_calibrations.keys():
raise ValueError('Camera ID \'{}\' not found in camera calibration data'.format(
camera_id
))
camera_calibration = camera_calibrations.get(camera_id)
if pose_label_column is not None:
if pose_label_column not in poses.columns:
raise ValueError('Specified pose label column \'{}\' not found in pose data'.format(
pose_label_column
))
if pose_label_map is not None:
pose_label_map = poseconnect.utils.convert_to_lookup_dict(pose_label_map)
elif generate_pose_label_map:
source_labels = (
poses
.sort_values('timestamp')
.loc[:, pose_label_column]
.dropna()
.drop_duplicates()
.tolist()
)
target_labels = list(range(len(source_labels)))
pose_label_map = dict(zip(source_labels, target_labels))
if pose_label_map is not None:
poses[pose_label_column] = poses[pose_label_column].apply(
lambda x: pose_label_map.get(x)
)
timestamp_text_color = matplotlib.colors.to_hex(timestamp_text_color, keep_alpha=False)
timestamp_box_color = matplotlib.colors.to_hex(timestamp_box_color, keep_alpha=False)
if pose_type == '2d' and 'camera_id' in poses.columns:
if camera_id is not None:
poses = poses.loc[poses['camera_id'] == camera_id].copy()
if poses['camera_id'].nunique() > 1:
raise ValueError('Pose data contains multiple camera IDs for a single video')
elif pose_type == '3d':
if camera_calibration is None:
raise ValueError('Camera calibration parameters must be specified to overlay 3D poses')
else:
raise ValueError('Pose type must be either \'2d\' or \'3d\'')
logger.info('Ingested {} poses spanning time period {} to {}'.format(
len(poses),
poses['timestamp'].min().isoformat(),
poses['timestamp'].max().isoformat()
))
logger.info('Video input path: {}'.format(video_input_path))
logger.info('Video start time: {}'.format(
video_start_time.isoformat()
))
video_input = cv_utils.VideoInput(
input_path=video_input_path,
start_time=video_start_time
)
if video_fps is None:
video_fps = video_input.video_parameters.fps
if video_fps is None:
raise ValueError('Failed to rate video frame rate from video file.')
logger.info('Video frame rate: {} frames per second'.format(
video_fps
))
if video_frame_count is None:
video_frame_count = video_input.video_parameters.frame_count
if video_frame_count is None:
raise ValueError('Failed to rate video frame count from video file.')
logger.info('Video frame count: {}'.format(
video_frame_count
))
logger.info('Video input path: {}'.format(video_input_path))
if video_output_path is None:
video_input_directory, video_input_filename = os.path.split(video_input_path)
video_input_filename_stem, video_input_filename_extension = os.path.splitext(video_input_filename)
if video_input_filename_extension is not None:
video_input_filename_extension = video_input_filename_extension[1:]
logger.info('Video input directory: {}'.format(video_input_directory))
logger.info('Video input filename stem: {}'.format(video_input_filename_stem))
logger.info('Video input filename extension: {}'.format(video_input_filename_extension))
if video_output_directory is None:
video_output_directory = video_input_directory
if video_output_filename_suffix is None:
video_output_filename_stem = video_input_filename_stem
else:
video_output_filename_stem = '_'.join([
video_input_filename_stem,
video_output_filename_suffix
])
if video_output_filename_extension is None:
video_output_filename_extension = video_input_filename_extension
logger.info('Video output directory: {}'.format(video_output_directory))
logger.info('Video output filename stem: {}'.format(video_output_filename_stem))
logger.info('Video output filename extension: {}'.format(video_output_filename_extension))
video_output_path = os.path.join(
video_output_directory,
'.'.join([
video_output_filename_stem,
video_output_filename_extension
])
)
logger.info('Video output path: {}'.format(video_output_path))
video_input_parameters = video_input.video_parameters
logger.info('Video input FOURCC integer: {}'.format(
video_input_parameters.fourcc_int
))
logger.info('Video input FOURCC string: {}'.format(
cv_utils.fourcc_int_to_string(video_input_parameters.fourcc_int)
))
video_output_parameters = video_input_parameters
if video_output_fourcc_string is not None:
video_output_parameters.fourcc_int = cv_utils.fourcc_string_to_int(video_output_fourcc_string)
logger.info('Video output FOURCC integer: {}'.format(
video_output_parameters.fourcc_int
))
logger.info('Video output FOURCC string: {}'.format(
cv_utils.fourcc_int_to_string(video_output_parameters.fourcc_int)
))
video_output = cv_utils.VideoOutput(
video_output_path,
video_parameters=video_output_parameters
)
video_timestamps, aligned_pose_timestamps = align_timestamps(
pose_timestamps=poses['timestamp'],
video_start_time=video_start_time,
video_fps=video_fps,
video_frame_count=video_frame_count
)
logger.info('{}/{} video timestamps have aligned pose data'.format(
aligned_pose_timestamps.notna().sum(),
video_timestamps.notna().sum()
))
if progress_bar:
if notebook:
t = tqdm.tqdm_notebook(total=video_frame_count)
else:
t = tqdm.tqdm(total=video_frame_count)
for frame_index, video_timestamp in enumerate(video_timestamps):
pose_timestamp = aligned_pose_timestamps[frame_index]
frame = video_input.get_frame()
if frame is None:
raise ValueError('Input video ended unexpectedly at frame number {}'.format(frame_index))
frame=overlay_poses_image(
poses=poses.loc[poses['timestamp'] == pose_timestamp].copy(),
image=frame,
pose_type=pose_type,
camera_calibration=camera_calibration,
pose_label_column=pose_label_column,
draw_keypoint_connectors=draw_keypoint_connectors,
keypoint_connectors=keypoint_connectors,
pose_model_name=pose_model_name,
pose_color=pose_color,
keypoint_radius=keypoint_radius,
keypoint_alpha=keypoint_alpha,
keypoint_connector_alpha=keypoint_connector_alpha,
keypoint_connector_linewidth=keypoint_connector_linewidth,
pose_label_text_color=pose_label_text_color,
pose_label_box_alpha=pose_label_box_alpha,
pose_label_font_scale=pose_label_font_scale,
pose_label_text_line_width=pose_label_text_line_width
)
if draw_timestamp:
frame = cv_utils.draw_timestamp(
original_image=frame,
timestamp=video_timestamp,
padding=timestamp_padding,
font_scale=timestamp_font_scale,
text_line_width=timestamp_text_line_width,
text_color=timestamp_text_color,
text_alpha=1.0,
box_line_width=0,
box_color=timestamp_box_color,
box_fill=True,
box_alpha=timestamp_box_alpha
)
video_output.write_frame(frame)
if progress_bar:
t.update()
video_input.close()
video_output.close()
def overlay_poses_video_frame(
poses,
video_input_path,
video_start_time,
timestamp,
timestamp_offset_max_milliseconds=poseconnect.defaults.OVERLAY_TIMESTAMP_OFFSET_MAX_MILLISECONDS,
pose_type=poseconnect.defaults.OVERLAY_POSE_TYPE,
camera_id=poseconnect.defaults.OVERLAY_CAMERA_ID,
camera_calibration=poseconnect.defaults.OVERLAY_CAMERA_CALIBRATION,
camera_calibrations=poseconnect.defaults.OVERLAY_CAMERA_CALIBRATIONS,
pose_label_column=poseconnect.defaults.OVERLAY_POSE_LABEL_COLUMN,
pose_label_map=poseconnect.defaults.OVERLAY_POSE_LABEL_MAP,
generate_pose_label_map=poseconnect.defaults.OVERLAY_GENERATE_POSE_LABEL_MAP,
video_fps=poseconnect.defaults.OVERLAY_VIDEO_FPS,
video_frame_count=poseconnect.defaults.OVERLAY_VIDEO_FRAME_COUNT,
image_output_path=poseconnect.defaults.OVERLAY_IMAGE_OUTPUT_PATH,
image_output_directory=poseconnect.defaults.OVERLAY_IMAGE_OUTPUT_DIRECTORY,
image_output_filename_suffix=poseconnect.defaults.OVERLAY_IMAGE_OUTPUT_FILENAME_SUFFIX,
image_output_filename_extension=poseconnect.defaults.OVERLAY_IMAGE_OUTPUT_FILENAME_EXTENSION,
draw_keypoint_connectors=poseconnect.defaults.OVERLAY_DRAW_KEYPOINT_CONNECTORS,
keypoint_connectors=poseconnect.defaults.OVERLAY_KEYPOINT_CONNECTORS,
pose_model_name=poseconnect.defaults.OVERLAY_POSE_MODEL_NAME,
pose_color=poseconnect.defaults.OVERLAY_POSE_COLOR,
keypoint_radius=poseconnect.defaults.OVERLAY_KEYPOINT_RADIUS,
keypoint_alpha=poseconnect.defaults.OVERLAY_KEYPOINT_ALPHA,
keypoint_connector_alpha=poseconnect.defaults.OVERLAY_KEYPOINT_CONNECTOR_ALPHA,
keypoint_connector_linewidth=poseconnect.defaults.OVERLAY_KEYPOINT_CONNECTOR_LINEWIDTH,
pose_label_text_color=poseconnect.defaults.OVERLAY_POSE_LABEL_TEXT_COLOR,
pose_label_box_alpha=poseconnect.defaults.OVERLAY_POSE_LABEL_BOX_ALPHA,
pose_label_font_scale=poseconnect.defaults.OVERLAY_POSE_LABEL_FONT_SCALE,
pose_label_text_line_width=poseconnect.defaults.OVERLAY_POSE_LABEL_TEXT_LINE_WIDTH,
draw_timestamp=poseconnect.defaults.OVERLAY_DRAW_TIMESTAMP,
timestamp_padding=poseconnect.defaults.OVERLAY_TIMESTAMP_PADDING,
timestamp_font_scale=poseconnect.defaults.OVERLAY_TIMESTAMP_FONT_SCALE,
timestamp_text_line_width=poseconnect.defaults.OVERLAY_TIMESTAMP_TEXT_LINE_WIDTH,
timestamp_text_color=poseconnect.defaults.OVERLAY_TIMESTAMP_TEXT_COLOR,
timestamp_box_color=poseconnect.defaults.OVERLAY_TIMESTAMP_BOX_COLOR,
timestamp_box_alpha=poseconnect.defaults.OVERLAY_TIMESTAMP_BOX_ALPHA
):
poses = poseconnect.utils.ingest_poses_generic(
data_object=poses,
pose_type=pose_type
)
poses=poses.copy()
video_start_time = poseconnect.utils.convert_to_datetime_utc(video_start_time)
timestamp = poseconnect.utils.convert_to_datetime_utc(timestamp)
if camera_calibration is None:
if camera_calibrations is not None and camera_id is not None:
camera_calibrations = poseconnect.utils.ingest_camera_calibrations(camera_calibrations)
camera_calibrations = camera_calibrations.to_dict(orient='index')
if camera_id not in camera_calibrations.keys():
raise ValueError('Camera ID \'{}\' not found in camera calibration data'.format(
camera_id
))
camera_calibration = camera_calibrations.get(camera_id)
if pose_label_column is not None:
if pose_label_column not in poses.columns:
raise ValueError('Specified pose label column \'{}\' not found in pose data'.format(
pose_label_column
))
if pose_label_map is not None:
pose_label_map = poseconnect.utils.convert_to_lookup_dict(pose_label_map)
elif generate_pose_label_map:
source_labels = (
poses
.sort_values('timestamp')
.loc[:, pose_label_column]
.dropna()
.drop_duplicates()
.tolist()
)
target_labels = list(range(len(source_labels)))
pose_label_map = dict(zip(source_labels, target_labels))
if pose_label_map is not None:
poses[pose_label_column] = poses[pose_label_column].apply(
lambda x: pose_label_map.get(x)
)
timestamp_text_color = matplotlib.colors.to_hex(timestamp_text_color, keep_alpha=False)
timestamp_box_color = matplotlib.colors.to_hex(timestamp_box_color, keep_alpha=False)
if pose_type == '2d' and 'camera_id' in poses.columns:
if camera_id is not None:
poses = poses.loc[poses['camera_id'] == camera_id].copy()
if poses['camera_id'].nunique() > 1:
raise ValueError('Pose data contains multiple camera IDs for a single video')
elif pose_type == '3d':
if camera_calibration is None:
raise ValueError('Camera calibration parameters must be specified to overlay 3D poses')
else:
raise ValueError('Pose type must be either \'2d\' or \'3d\'')
logger.info('Ingested {} poses spanning time period {} to {}'.format(
len(poses),
poses['timestamp'].min().isoformat(),
poses['timestamp'].max().isoformat()
))
logger.info('Video input path: {}'.format(video_input_path))
logger.info('Video start time: {}'.format(
video_start_time.isoformat()
))
video_input = cv_utils.VideoInput(
input_path=video_input_path,
start_time=video_start_time
)
if video_fps is None:
video_fps = video_input.video_parameters.fps
if video_fps is None:
raise ValueError('Failed to rate video frame rate from video file.')
logger.info('Video frame rate: {} frames per second'.format(
video_fps
))
if video_frame_count is None:
video_frame_count = video_input.video_parameters.frame_count
if video_frame_count is None:
raise ValueError('Failed to rate video frame count from video file.')
logger.info('Video frame count: {}'.format(
video_frame_count
))
logger.info('Video input path: {}'.format(video_input_path))
if image_output_path is None:
video_input_directory, video_input_filename = os.path.split(video_input_path)
video_input_filename_stem, video_input_filename_extension = os.path.splitext(video_input_filename)
logger.info('Video input directory: {}'.format(video_input_directory))
logger.info('Video input filename stem: {}'.format(video_input_filename_stem))
if image_output_directory is None:
image_output_directory = video_input_directory
image_output_filename_stem = '_'.join([
video_input_filename_stem,
image_output_filename_suffix,
timestamp.strftime('%Y%m%d_%H%M%S_%f')
])
logger.info('Image output directory: {}'.format(image_output_directory))
logger.info('Image output filename stem: {}'.format(image_output_filename_stem))
logger.info('Image output filename extension: {}'.format(image_output_filename_extension))
image_output_path = os.path.join(
image_output_directory,
'.'.join([
image_output_filename_stem,
image_output_filename_extension
])
)
logger.info('Image output path: {}'.format(image_output_path))
nearest_pose_timestamp = find_nearest_pose_timestamp(
pose_timestamps=poses['timestamp'],
target_timestamp=timestamp,
timestamp_offset_max_milliseconds=timestamp_offset_max_milliseconds
)
if nearest_pose_timestamp is None:
logger.info('No pose timestamp near target timestamp')
return
frame = video_input.get_frame_by_timestamp(timestamp)
video_input.close()
if frame is None:
raise ValueError('No video frame at target timestamp {}'.format(timestamp.isoformat()))
poses_frame = poses.loc[poses['timestamp'] == nearest_pose_timestamp].copy()
logger.info('Found {} poses for chosen frame'.format(
len(poses_frame)
))
frame=overlay_poses_image(
poses=poses_frame,
image=frame,
pose_type=pose_type,
camera_calibration=camera_calibration,
pose_label_column=pose_label_column,
draw_keypoint_connectors=draw_keypoint_connectors,
keypoint_connectors=keypoint_connectors,
pose_model_name=pose_model_name,
pose_color=pose_color,
keypoint_radius=keypoint_radius,
keypoint_alpha=keypoint_alpha,
keypoint_connector_alpha=keypoint_connector_alpha,
keypoint_connector_linewidth=keypoint_connector_linewidth,
pose_label_text_color=pose_label_text_color,
pose_label_box_alpha=pose_label_box_alpha,
pose_label_font_scale=pose_label_font_scale,
pose_label_text_line_width=pose_label_text_line_width
)
if draw_timestamp:
frame = cv_utils.draw_timestamp(
original_image=frame,
timestamp=timestamp,
padding=timestamp_padding,
font_scale=timestamp_font_scale,
text_line_width=timestamp_text_line_width,
text_color=timestamp_text_color,
text_alpha=1.0,
box_line_width=0,
box_color=timestamp_box_color,
box_fill=True,
box_alpha=timestamp_box_alpha
)
cv_utils.write_image(
image=frame,
path=image_output_path
)
def overlay_poses_image(
poses,
image,
pose_type=poseconnect.defaults.OVERLAY_POSE_TYPE,
camera_calibration=poseconnect.defaults.OVERLAY_CAMERA_CALIBRATION,
pose_label_column=poseconnect.defaults.OVERLAY_POSE_LABEL_COLUMN,
draw_keypoint_connectors=poseconnect.defaults.OVERLAY_DRAW_KEYPOINT_CONNECTORS,
keypoint_connectors=poseconnect.defaults.OVERLAY_KEYPOINT_CONNECTORS,
pose_model_name=poseconnect.defaults.OVERLAY_POSE_MODEL_NAME,
pose_color=poseconnect.defaults.OVERLAY_POSE_COLOR,
keypoint_radius=poseconnect.defaults.OVERLAY_KEYPOINT_RADIUS,
keypoint_alpha=poseconnect.defaults.OVERLAY_KEYPOINT_ALPHA,
keypoint_connector_alpha=poseconnect.defaults.OVERLAY_KEYPOINT_CONNECTOR_ALPHA,
keypoint_connector_linewidth=poseconnect.defaults.OVERLAY_KEYPOINT_CONNECTOR_LINEWIDTH,
pose_label_text_color=poseconnect.defaults.OVERLAY_POSE_LABEL_TEXT_COLOR,
pose_label_box_alpha=poseconnect.defaults.OVERLAY_POSE_LABEL_BOX_ALPHA,
pose_label_font_scale=poseconnect.defaults.OVERLAY_POSE_LABEL_FONT_SCALE,
pose_label_text_line_width=poseconnect.defaults.OVERLAY_POSE_LABEL_TEXT_LINE_WIDTH,
):
if pose_type == '2d':
if poses['camera_id'].nunique() > 1:
raise ValueError('Pose data contains multiple camera IDs for a single image')
keypoint_coordinate_column_name='keypoint_coordinates_2d'
elif pose_type == '3d':
if camera_calibration is None:
raise ValueError('Camera calibration parameters must be specified to overlay 3D poses')
keypoint_coordinate_column_name='keypoint_coordinates_3d'
else:
raise ValueError('Pose type must be either \'2d\' or \'3d\'')
if poses['timestamp'].nunique() > 1:
raise ValueError('Pose data contains multiple timestamps for a single image')
for pose_id, row in poses.iterrows():
image = overlay_pose_image(
keypoint_coordinates=row.get(keypoint_coordinate_column_name),
image=image,
pose_type=pose_type,
camera_calibration=camera_calibration,
pose_label=row.get(pose_label_column),
draw_keypoint_connectors=draw_keypoint_connectors,
keypoint_connectors=keypoint_connectors,
pose_model_name=pose_model_name,
pose_color=pose_color,
keypoint_radius=keypoint_radius,
keypoint_alpha=keypoint_alpha,
keypoint_connector_alpha=keypoint_connector_alpha,
keypoint_connector_linewidth=keypoint_connector_linewidth,
pose_label_text_color=pose_label_text_color,
pose_label_box_alpha=pose_label_box_alpha,
pose_label_font_scale=pose_label_font_scale,
pose_label_text_line_width=pose_label_text_line_width
)
return image
def overlay_pose_image(
keypoint_coordinates,
image,
pose_type=poseconnect.defaults.OVERLAY_POSE_TYPE,
camera_calibration=poseconnect.defaults.OVERLAY_CAMERA_CALIBRATION,
pose_label=None,
draw_keypoint_connectors=poseconnect.defaults.OVERLAY_DRAW_KEYPOINT_CONNECTORS,
keypoint_connectors=poseconnect.defaults.OVERLAY_KEYPOINT_CONNECTORS,
pose_model_name=poseconnect.defaults.OVERLAY_POSE_MODEL_NAME,
pose_color=poseconnect.defaults.OVERLAY_POSE_COLOR,
keypoint_radius=poseconnect.defaults.OVERLAY_KEYPOINT_RADIUS,
keypoint_alpha=poseconnect.defaults.OVERLAY_KEYPOINT_ALPHA,
keypoint_connector_alpha=poseconnect.defaults.OVERLAY_KEYPOINT_CONNECTOR_ALPHA,
keypoint_connector_linewidth=poseconnect.defaults.OVERLAY_KEYPOINT_CONNECTOR_LINEWIDTH,
pose_label_text_color=poseconnect.defaults.OVERLAY_POSE_LABEL_TEXT_COLOR,
pose_label_box_alpha=poseconnect.defaults.OVERLAY_POSE_LABEL_BOX_ALPHA,
pose_label_font_scale=poseconnect.defaults.OVERLAY_POSE_LABEL_FONT_SCALE,
pose_label_text_line_width=poseconnect.defaults.OVERLAY_POSE_LABEL_TEXT_LINE_WIDTH
):
keypoint_coordinates = np.asarray(keypoint_coordinates)
if pose_type == '2d':
if keypoint_coordinates.shape[-1] != 2:
raise ValueError('Expected 2D pose but keypoint coordinates have shape {}'.format(
keypoint_coordinates.shape
))
elif pose_type == '3d':
if keypoint_coordinates.shape[-1] != 3:
raise ValueError('Expected 3D pose but keypoint coordinates have shape {}'.format(
keypoint_coordinates.shape
))
if camera_calibration is None:
raise ValueError('Camera calibration parameters must be specified to overlay 3D poses')
keypoint_coordinates = cv_utils.project_points(
keypoint_coordinates,
rotation_vector=camera_calibration['rotation_vector'],
translation_vector=camera_calibration['translation_vector'],
camera_matrix=camera_calibration['camera_matrix'],
distortion_coefficients=camera_calibration['distortion_coefficients'],
remove_behind_camera=True,
remove_outside_frame=True,
image_corners=[
[0,0],
[camera_calibration['image_width'], camera_calibration['image_height']]
]
)
else:
raise ValueError('Pose type must be either \'2d\' or \'3d\'')
pose_color = matplotlib.colors.to_hex(pose_color, keep_alpha=False)
pose_label_text_color = matplotlib.colors.to_hex(pose_label_text_color, keep_alpha=False)
if draw_keypoint_connectors:
if keypoint_connectors is None:
if pose_model_name is None:
raise ValueError('Must specify pose model name or explicitly specify keypoint connectors to draw keypoint connectors')
if pose_model_name not in KEYPOINT_CONNECTORS_BY_POSE_MODEL.keys():
raise ValueError('Pose model \'{}\' not recognized'.format(
pose_model_name
))
keypoint_connectors = KEYPOINT_CONNECTORS_BY_POSE_MODEL[pose_model_name]
if not np.any(np.all(np.isfinite(keypoint_coordinates), axis=1), axis=0):
return image
valid_keypoints = np.all(np.isfinite(keypoint_coordinates), axis=1)
plottable_points = keypoint_coordinates[valid_keypoints]
new_image = image
for point_index in range(plottable_points.shape[0]):
new_image = cv_utils.draw_circle(
original_image=new_image,
coordinates=plottable_points[point_index],
radius=keypoint_radius,
line_width=1,
color=pose_color,
fill=True,
alpha=keypoint_alpha
)
if draw_keypoint_connectors and (keypoint_connectors is not None):
for keypoint_connector in keypoint_connectors:
keypoint_from_index = keypoint_connector[0]
keypoint_to_index = keypoint_connector[1]
if valid_keypoints[keypoint_from_index] and valid_keypoints[keypoint_to_index]:
new_image=cv_utils.draw_line(
original_image=new_image,
coordinates=[
keypoint_coordinates[keypoint_from_index],
keypoint_coordinates[keypoint_to_index]
],
line_width=keypoint_connector_linewidth,
color=pose_color,
alpha=keypoint_connector_alpha
)
if pd.notna(pose_label):
pose_label_anchor = np.nanmean(keypoint_coordinates, axis=0)
new_image = cv_utils.draw_text_box(
original_image=new_image,
anchor_coordinates=pose_label_anchor,
text=str(pose_label),
horizontal_alignment='center',
vertical_alignment='middle',
font_scale=pose_label_font_scale,
text_line_width=pose_label_text_line_width,
text_color=pose_label_text_color,
text_alpha=1.0,
box_line_width=1.5,
box_color=pose_color,
box_fill=True,
box_alpha=pose_label_box_alpha
)
return new_image
def align_timestamps(
pose_timestamps,
video_start_time,
video_fps,
video_frame_count
):
pose_timestamps = pd.DatetimeIndex(
pd.to_datetime(pose_timestamps, utc=True)
.drop_duplicates()
.sort_values()
)
if video_start_time.tzinfo is None:
logger.info('Specified video start time is timezone-naive. Assuming UTC')
video_start_time=video_start_time.replace(tzinfo=datetime.timezone.utc)
video_start_time = video_start_time.astimezone(datetime.timezone.utc)
frame_period_microseconds = 10**6/video_fps
video_timestamps = pd.date_range(
start=video_start_time,
freq=pd.tseries.offsets.DateOffset(microseconds=frame_period_microseconds),
periods=video_frame_count
)
aligned_pose_timestamps = list()
for video_timestamp in video_timestamps:
nearby_pose_timestamps = pose_timestamps[
(pose_timestamps >= video_timestamp - datetime.timedelta(microseconds=frame_period_microseconds)/2) &
(pose_timestamps < video_timestamp + datetime.timedelta(microseconds=frame_period_microseconds)/2)
]
if len(nearby_pose_timestamps) == 0:
logger.debug('There are no pose timestamps nearby video timestamp {}.'.format(
video_timestamp.isoformat()
))
aligned_pose_timestamp = None
elif len(nearby_pose_timestamps) == 1:
aligned_pose_timestamp = nearby_pose_timestamps[0]
else:
time_distances = [
max(nearby_pose_timestamp.to_pydatetime(), video_timestamp.to_pydatetime()) -
min(nearby_pose_timestamp.to_pydatetime(), video_timestamp.to_pydatetime())
for nearby_pose_timestamp in nearby_pose_timestamps
]
aligned_pose_timestamp = nearby_pose_timestamps[np.argmin(time_distances)]
logger.debug('There are {} pose timestamps nearby video timestamp {}: {}. Chose pose timestamp {}'.format(
len(nearby_pose_timestamps),
video_timestamp.isoformat(),
[nearby_pose_timestamp.isoformat() for nearby_pose_timestamp in nearby_pose_timestamps],
aligned_pose_timestamp.isoformat()
))
aligned_pose_timestamps.append(aligned_pose_timestamp)
aligned_pose_timestamps = pd.DatetimeIndex(aligned_pose_timestamps)
return video_timestamps, aligned_pose_timestamps
def find_nearest_pose_timestamp(
pose_timestamps,
target_timestamp,
timestamp_offset_max_milliseconds=poseconnect.defaults.OVERLAY_TIMESTAMP_OFFSET_MAX_MILLISECONDS
):
pose_timestamps = pd.DatetimeIndex(
pd.to_datetime(pose_timestamps, utc=True)
.drop_duplicates()
.sort_values()
)
target_timestamp = poseconnect.utils.convert_to_datetime_utc(target_timestamp)
nearby_pose_timestamps = pose_timestamps[
(pose_timestamps >= target_timestamp - datetime.timedelta(milliseconds=timestamp_offset_max_milliseconds)) &
(pose_timestamps < target_timestamp + datetime.timedelta(milliseconds=timestamp_offset_max_milliseconds))
]
if len(nearby_pose_timestamps) == 0:
logger.debug('There are no pose timestamps nearby target timestamp {}.'.format(
target_timestamp.isoformat()
))
nearest_pose_timestamp = None
elif len(nearby_pose_timestamps) == 1:
nearest_pose_timestamp = nearby_pose_timestamps[0]
else:
time_distances = [
max(nearby_pose_timestamp.to_pydatetime(), target_timestamp) -
min(nearby_pose_timestamp.to_pydatetime(), target_timestamp)
for nearby_pose_timestamp in nearby_pose_timestamps
]
nearest_pose_timestamp = nearby_pose_timestamps[np.argmin(time_distances)]
logger.debug('There are {} pose timestamps nearby video timestamp {}: {}. Chose pose timestamp {}'.format(
len(nearby_pose_timestamps),
target_timestamp.isoformat(),
[nearby_pose_timestamp.isoformat() for nearby_pose_timestamp in nearby_pose_timestamps],
nearest_pose_timestamp.isoformat()
))
return nearest_pose_timestamp
| 49.474183
| 241
| 0.73451
| 5,643
| 46,951
| 5.670565
| 0.053163
| 0.05372
| 0.139754
| 0.053439
| 0.844995
| 0.801525
| 0.77043
| 0.759586
| 0.751336
| 0.741742
| 0
| 0.009414
| 0.192264
| 46,951
| 948
| 242
| 49.526371
| 0.834353
| 0.005367
| 0
| 0.695887
| 0
| 0
| 0.06488
| 0.001478
| 0
| 0
| 0
| 0
| 0
| 1
| 0.010823
| false
| 0
| 0.010823
| 0
| 0.028139
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
4a6b71790745ef8289120d9a96c9c2caa3926637
| 42,020
|
py
|
Python
|
src/sage/graphs/base/graph_backends.py
|
bopopescu/sage-5
|
9d85b34956ca2edd55af307f99c5d3859acd30bf
|
[
"BSL-1.0"
] | 5
|
2015-01-04T07:15:06.000Z
|
2022-03-04T15:15:18.000Z
|
src/sage/graphs/base/graph_backends.py
|
bopopescu/sage-5
|
9d85b34956ca2edd55af307f99c5d3859acd30bf
|
[
"BSL-1.0"
] | null | null | null |
src/sage/graphs/base/graph_backends.py
|
bopopescu/sage-5
|
9d85b34956ca2edd55af307f99c5d3859acd30bf
|
[
"BSL-1.0"
] | 10
|
2016-09-28T13:12:40.000Z
|
2022-02-12T09:28:34.000Z
|
"""
Implements various backends for Sage graphs.
"""
#*******************************************************************************
# Copyright (C) 2008 Robert L. Miller <[email protected]>
#
# Distributed under the terms of the GNU General Public License (GPL)
# http://www.gnu.org/licenses/
#*******************************************************************************
from sage.structure.sage_object import SageObject
class GenericGraphBackend(SageObject):
"""
A generic wrapper for the backend of a graph. Various graph classes use
extensions of this class. Note, this graph has a number of placeholder
functions, so the doctests are rather silly.
TESTS::
sage: import sage.graphs.base.graph_backends
"""
_loops = False
_multiple_edges = False
_name = ''
def add_edge(self, u, v, l, directed):
"""
Add an edge (u,v) to self, with label l. If directed is True, this is
interpreted as an arc from u to v.
INPUT::
- ``u,v`` -- vertices
- ``l`` -- edge label
- ``directed`` -- boolean
TESTS::
sage: G = sage.graphs.base.graph_backends.GenericGraphBackend()
sage: G.add_edge(1,2,'a',True)
Traceback (most recent call last):
...
NotImplementedError
"""
raise NotImplementedError()
def add_edges(self, edges, directed):
"""
Add a sequence of edges to self. If directed is True, these are
interpreted as arcs.
INPUT:
- ``edges`` -- list/iterator of edges to be added.
- ``directed`` -- boolean
TESTS::
sage: G = sage.graphs.base.graph_backends.GenericGraphBackend()
sage: G.add_edges([],True)
Traceback (most recent call last):
...
NotImplementedError
"""
raise NotImplementedError()
def add_vertex(self, name):
"""
Add a labelled vertex to self.
INPUT:
- ``name`` -- vertex label
OUTPUT:
If ``name=None``, the new vertex name is returned, ``None`` otherwise.
TESTS::
sage: G = sage.graphs.base.graph_backends.GenericGraphBackend()
sage: G.add_vertex(0)
Traceback (most recent call last):
...
NotImplementedError
"""
raise NotImplementedError()
def add_vertices(self, vertices):
"""
Add labelled vertices to self.
INPUT:
- ``vertices`` -- iterator of vertex labels. A new label is created,
used and returned in the output list for all ``None`` values in
``vertices``.
OUTPUT:
Generated names of new vertices if there is at least one ``None`` value
present in ``vertices``. ``None`` otherwise.
EXAMPLES::
sage: G = sage.graphs.base.graph_backends.GenericGraphBackend()
sage: G.add_vertices([1,2,3])
Traceback (most recent call last):
...
NotImplementedError
"""
raise NotImplementedError()
def degree(self, v, directed):
"""
Returns the total number of vertices incident to v.
INPUT:
- ``v`` -- a vertex label
- ``directed`` -- boolean
OUTPUT:
degree of v
TESTS::
sage: G = sage.graphs.base.graph_backends.GenericGraphBackend()
sage: G.degree(1, False)
Traceback (most recent call last):
...
NotImplementedError
"""
raise NotImplementedError()
def del_edge(self, u, v, l, directed):
"""
Deletes the edge (u,v) with label l.
INPUT:
- ``u,v`` -- vertices
- ``l`` -- edge label
- ``directed`` -- boolean
TESTS::
sage: G = sage.graphs.base.graph_backends.GenericGraphBackend()
sage: G.del_edge(1,2,'a',True)
Traceback (most recent call last):
...
NotImplementedError
"""
raise NotImplementedError()
def del_vertex(self, v):
"""
Delete a labelled vertex in self.
INPUT:
- ``v`` -- vertex label
TESTS::
sage: G = sage.graphs.base.graph_backends.GenericGraphBackend()
sage: G.del_vertex(0)
Traceback (most recent call last):
...
NotImplementedError
"""
raise NotImplementedError()
def del_vertices(self, vertices):
"""
Delete labelled vertices in self.
INPUT:
- ``vertices`` -- iterator of vertex labels
TESTS::
sage: G = sage.graphs.base.graph_backends.GenericGraphBackend()
sage: G.del_vertices([1,2,3])
Traceback (most recent call last):
...
NotImplementedError
"""
raise NotImplementedError()
def get_edge_label(self, u, v):
"""
Returns the edge label of (u,v).
INPUT:
- ``u,v`` -- vertex labels
OUTPUT:
label of (u,v)
TESTS::
sage: G = sage.graphs.base.graph_backends.GenericGraphBackend()
sage: G.get_edge_label(1,2)
Traceback (most recent call last):
...
NotImplementedError
"""
raise NotImplementedError()
def has_edge(self, u, v, l):
"""
True if self has an edge (u,v) with label l.
INPUT:
- ``u,v`` -- vertex labels
- ``l`` -- label
OUTPUT:
boolean
TESTS::
sage: G = sage.graphs.base.graph_backends.GenericGraphBackend()
sage: G.has_edge(1,2,'a')
Traceback (most recent call last):
...
NotImplementedError
"""
raise NotImplementedError()
def has_vertex(self, v):
"""
True if self has a vertex with label v.
INPUT:
- ``v`` -- vertex label
OUTPUT:
boolean
TESTS::
sage: G = sage.graphs.base.graph_backends.GenericGraphBackend()
sage: G.has_vertex(0)
Traceback (most recent call last):
...
NotImplementedError
"""
raise NotImplementedError()
def iterator_edges(self, vertices, labels):
"""
Iterate over the edges incident to a sequence of vertices. Edges are
assumed to be undirected.
INPUT:
- ``vertices`` -- a list of vertex labels
- ``labels`` -- boolean
OUTPUT:
a generator which yields edges, with or without labels
depending on the labels parameter.
TESTS::
sage: G = sage.graphs.base.graph_backends.GenericGraphBackend()
sage: G.iterator_edges([],True)
Traceback (most recent call last):
...
NotImplementedError
"""
raise NotImplementedError()
def iterator_in_edges(self, vertices, labels):
"""
Iterate over the incoming edges incident to a sequence of vertices.
INPUT:
- ``vertices`` -- a list of vertex labels
- ``labels`` -- boolean
OUTPUT:
a generator which yields edges, with or without labels
depending on the labels parameter.
TESTS::
sage: G = sage.graphs.base.graph_backends.GenericGraphBackend()
sage: G.iterator_in_edges([],True)
Traceback (most recent call last):
...
NotImplementedError
"""
raise NotImplementedError()
def iterator_out_edges(self, vertices, labels):
"""
Iterate over the outbound edges incident to a sequence of vertices.
INPUT:
- ``vertices`` -- a list of vertex labels
- ``labels`` -- boolean
OUTPUT:
a generator which yields edges, with or without labels
depending on the labels parameter.
TESTS::
sage: G = sage.graphs.base.graph_backends.GenericGraphBackend()
sage: G.iterator_out_edges([],True)
Traceback (most recent call last):
...
NotImplementedError
"""
raise NotImplementedError()
def iterator_nbrs(self, v):
"""
Iterate over the vertices adjacent to v.
INPUT:
- ``v`` -- vertex label
OUTPUT:
a generator which yields vertex labels
TESTS::
sage: G = sage.graphs.base.graph_backends.GenericGraphBackend()
sage: G.iterator_nbrs(0)
Traceback (most recent call last):
...
NotImplementedError
"""
raise NotImplementedError()
def iterator_in_nbrs(self, v):
"""
Iterate over the vertices u such that the edge (u,v) is in self
(that is, predecessors of v).
INPUT:
- ``v`` -- vertex label
OUTPUT:
a generator which yields vertex labels
TESTS::
sage: G = sage.graphs.base.graph_backends.GenericGraphBackend()
sage: G.iterator_in_nbrs(0)
Traceback (most recent call last):
...
NotImplementedError
"""
raise NotImplementedError()
def iterator_out_nbrs(self, v):
"""
Iterate over the vertices u such that the edge (v,u) is in self
(that is, successors of v).
INPUT:
- ``v`` -- vertex label
OUTPUT:
a generator which yields vertex labels
TESTS::
sage: G = sage.graphs.base.graph_backends.GenericGraphBackend()
sage: G.iterator_out_nbrs(0)
Traceback (most recent call last):
...
NotImplementedError
"""
raise NotImplementedError()
def iterator_verts(self, verts):
"""
Iterate over the vertices v with labels in verts.
INPUT:
- ``vertex`` -- vertex labels
OUTPUT:
a generator which yields vertices
TESTS::
sage: G = sage.graphs.base.graph_backends.GenericGraphBackend()
sage: G.iterator_verts(0)
Traceback (most recent call last):
...
NotImplementedError
"""
raise NotImplementedError()
def loops(self, new=None):
"""
Get/set whether or not self allows loops.
INPUT:
- ``new`` -- can be a boolean (in which case it sets the value) or
``None``, in which case the current value is returned. It is set to
``None`` by default.
TESTS::
sage: G = sage.graphs.base.graph_backends.GenericGraphBackend()
sage: G.loops(True)
Traceback (most recent call last):
...
NotImplementedError
sage: G.loops(None)
Traceback (most recent call last):
...
NotImplementedError
"""
raise NotImplementedError()
def multiple_edges(self, new=None):
"""
Get/set whether or not self allows multiple edges.
INPUT:
- ``new`` -- can be a boolean (in which case it sets the value) or
``None``, in which case the current value is returned. It is set to
``None`` by default.
TESTS::
sage: G = sage.graphs.base.graph_backends.GenericGraphBackend()
sage: G.multiple_edges(True)
Traceback (most recent call last):
...
NotImplementedError
sage: G.multiple_edges(None)
Traceback (most recent call last):
...
NotImplementedError
"""
raise NotImplementedError()
def name(self, new=None):
"""
Get/set name of self.
INPUT:
- ``new`` -- can be a string (in which case it sets the value) or
``None``, in which case the current value is returned. It is set to
``None`` by default.
TESTS::
sage: G = sage.graphs.base.graph_backends.GenericGraphBackend()
sage: G.name("A Generic Graph")
Traceback (most recent call last):
...
NotImplementedError
sage: G.name(None)
Traceback (most recent call last):
...
NotImplementedError
"""
raise NotImplementedError()
def num_edges(self, directed):
"""
The number of edges in self
INPUT:
- ``directed`` -- boolean
TESTS::
sage: G = sage.graphs.base.graph_backends.GenericGraphBackend()
sage: G.num_edges(True)
Traceback (most recent call last):
...
NotImplementedError
sage: G.num_edges(False)
Traceback (most recent call last):
...
NotImplementedError
"""
raise NotImplementedError()
def num_verts(self):
"""
The number of vertices in self
TESTS::
sage: G = sage.graphs.base.graph_backends.GenericGraphBackend()
sage: G.num_verts()
Traceback (most recent call last):
...
NotImplementedError
"""
raise NotImplementedError()
def relabel(self, perm, directed):
"""
Relabel the vertices of self by a permutation.
INPUT:
- ``perm`` -- permutation
- ``directed`` -- boolean
TESTS::
sage: G = sage.graphs.base.graph_backends.GenericGraphBackend()
sage: G.relabel([],False)
Traceback (most recent call last):
...
NotImplementedError
"""
raise NotImplementedError()
def set_edge_label(self, u, v, l, directed):
"""
Label the edge (u,v) by l.
INPUT:
- ``u,v`` -- vertices
- ``l`` -- edge label
- ``directed`` -- boolean
TESTS::
sage: G = sage.graphs.base.graph_backends.GenericGraphBackend()
sage: G.set_edge_label(1,2,'a',True)
Traceback (most recent call last):
...
NotImplementedError
"""
raise NotImplementedError()
class NetworkXGraphDeprecated(SageObject):
"""
Class for unpickling old networkx.XGraph formats
TESTS::
sage: from sage.graphs.base.graph_backends import NetworkXGraphDeprecated as NXGD
sage: X = NXGD()
doctest:...
"""
def __init__(self):
"""
Issue deprecation warnings for the old networkx XGraph formats
EXAMPLE::
sage: from sage.graphs.base.graph_backends import NetworkXGraphDeprecated
sage: NetworkXGraphDeprecated()
doctest:...
<class 'sage.graphs.base.graph_backends.NetworkXGraphDeprecated'>
"""
from sage.misc.superseded import deprecation
deprecation(10900, "Your graph object is saved in an old format since networkx "+
"was updated to 1.0.1. You can re-save your graph by typing "+
"graph.save(filename) to make this warning go away.")
def mutate(self):
"""
Change the old networkx XGraph format into the new one.
OUTPUT:
- The networkx.Graph or networkx.MultiGraph corresponding to the
unpickled data.
EXAMPLES::
sage: from sage.graphs.base.graph_backends import NetworkXGraphDeprecated as NXGD
sage: X = NXGD()
doctest:...
sage: X.adj = {1:{2:7}, 2:{1:7}, 3:{2:[4,5,6,7]}, 2:{3:[4,5,6,7]}}
sage: X.multiedges = True
sage: G = X.mutate()
sage: G.edges()
[(1, 2), (2, 3)]
sage: G.edges(data=True)
[(1, 2, {'weight': 7}), (2, 3, {4: {}, 5: {}, 6: {}, 7: {}})]
"""
import networkx
new_adj = {}
for node1, edges in self.adj.iteritems():
new_adj[node1] = {}
for node2, weights in edges.iteritems():
new_adj[node1][node2] = {}
if weights is not None:
try:
for weight in weights:
new_adj[node1][node2][weight] = {}
except TypeError:
new_adj[node1][node2]['weight'] = weights
if self.multiedges:
G = networkx.MultiGraph(new_adj)
else:
G = networkx.Graph(new_adj)
return G
class NetworkXDiGraphDeprecated(SageObject):
"""
Class for unpickling old networkx.XDiGraph formats
TESTS::
sage: import sage.graphs.base.graph_backends
"""
def __init__(self):
"""
Issue deprecation warnings for the old networkx XDiGraph formats
EXAMPLE::
sage: from sage.graphs.base.graph_backends import NetworkXDiGraphDeprecated
sage: NetworkXDiGraphDeprecated()
doctest:...
<class 'sage.graphs.base.graph_backends.NetworkXDiGraphDeprecated'>
"""
from sage.misc.superseded import deprecation
deprecation(10900, "Your digraph object is saved in an old format since networkx "+
"was updated to 1.0.1. You can re-save your digraph by typing "+
"digraph.save(filename) to make this warning go away.")
def mutate(self):
"""
Change the old networkx XDiGraph format into the new one.
OUTPUT:
- The networkx.DiGraph or networkx.MultiDiGraph corresponding to the
unpickled data.
EXAMPLES::
sage: from sage.graphs.base.graph_backends import NetworkXDiGraphDeprecated as NXDGD
sage: X = NXDGD()
doctest:...
sage: X.adj = {1:{2:7}, 2:{1:[7,8], 3:[4,5,6,7]}}
sage: X.multiedges = True
sage: G = X.mutate()
sage: G.edges()
[(1, 2), (2, 1), (2, 3)]
sage: G.edges(data=True)
[(1, 2, {'weight': 7}), (2, 1, {8: {}, 7: {}}), (2, 3, {4: {}, 5: {}, 6: {}, 7: {}})]
"""
import networkx
new_adj = {}
for node1, edges in self.adj.iteritems():
new_adj[node1] = {}
for node2, weights in edges.iteritems():
new_adj[node1][node2] = {}
if weights is not None:
try:
for weight in weights:
new_adj[node1][node2][weight] = {}
except TypeError:
new_adj[node1][node2]['weight'] = weights
if self.multiedges:
G = networkx.MultiDiGraph(new_adj)
else:
G = networkx.DiGraph(new_adj)
return G
from sage.structure.sage_object import register_unpickle_override
register_unpickle_override('networkx.xgraph','XGraph', NetworkXGraphDeprecated)
register_unpickle_override('networkx.xdigraph','XDiGraph', NetworkXDiGraphDeprecated)
class NetworkXGraphBackend(GenericGraphBackend):
"""
A wrapper for NetworkX as the backend of a graph.
TESTS::
sage: import sage.graphs.base.graph_backends
"""
_nxg = None
def __init__(self, N=None):
"""
Initialize the backend with NetworkX graph N.
TESTS::
sage: G = sage.graphs.base.graph_backends.NetworkXGraphBackend()
sage: G.iterator_edges([],True)
<generator object iterator_edges at ...>
"""
if N is None:
import networkx
N = networkx.MultiGraph()
self._nxg = N
try:
assert(not isinstance(self._nxg, (NetworkXGraphDeprecated, NetworkXDiGraphDeprecated)))
except AssertionError:
self._nxg = self._nxg.mutate()
def add_edge(self, u, v, l, directed):
"""
Add an edge (u,v) to self, with label l. If directed is True, this is
interpreted as an arc from u to v.
INPUT:
- ``u,v`` -- vertices
- ``l`` -- edge label
- ``directed`` -- boolean
TESTS::
sage: G = sage.graphs.base.graph_backends.NetworkXGraphBackend()
sage: G.add_edge(1,2,'a',True)
"""
try:
assert(not isinstance(self._nxg, (NetworkXGraphDeprecated, NetworkXDiGraphDeprecated)))
except AssertionError:
self._nxg = self._nxg.mutate()
if u is None: u = self.add_vertex(None)
if v is None: v = self.add_vertex(None)
if l:
self._nxg.add_edge(u, v, weight=l)
else:
self._nxg.add_edge(u, v)
def add_edges(self, edges, directed):
"""
Add a sequence of edges to self. If directed is True, these are
interpreted as arcs.
INPUT:
- ``edges`` -- list/iterator of edges to be added.
- ``directed`` -- boolean
TESTS::
sage: G = sage.graphs.base.graph_backends.NetworkXGraphBackend()
sage: G.add_edges([],True)
"""
for e in edges:
try:
u,v,l = e
except ValueError:
u,v = e
l = None
self.add_edge(u,v,l,directed)
def add_vertex(self, name):
"""
Add a labelled vertex to self.
INPUT:
- ``name``: vertex label
OUTPUT:
If ``name=None``, the new vertex name is returned. ``None`` otherwise.
TESTS::
sage: G = sage.graphs.base.graph_backends.NetworkXGraphBackend()
sage: G.add_vertex(0)
"""
try:
assert(not isinstance(self._nxg, (NetworkXGraphDeprecated, NetworkXDiGraphDeprecated)))
except AssertionError:
self._nxg = self._nxg.mutate()
retval = None
if name is None: # then find an integer to use as a key
i = 0
while self.has_vertex(i):
i=i+1
name = i
retval = name
self._nxg.add_node(name)
return retval
def add_vertices(self, vertices):
"""
Add labelled vertices to self.
INPUT:
- ``vertices``: iterator of vertex labels. A new label is created, used and returned in
the output list for all ``None`` values in ``vertices``.
OUTPUT:
Generated names of new vertices if there is at least one ``None`` value
present in ``vertices``. ``None`` otherwise.
EXAMPLES::
sage: G = sage.graphs.base.graph_backends.NetworkXGraphBackend()
sage: G.add_vertices([1,2,3])
sage: G.add_vertices([4,None,None,5])
[0, 6]
"""
try:
assert(not isinstance(self._nxg, (NetworkXGraphDeprecated, NetworkXDiGraphDeprecated)))
except AssertionError:
self._nxg = self._nxg.mutate()
vertices = list(vertices)
nones = vertices.count(None)
vertices = filter(lambda v: v is not None, vertices)
self._nxg.add_nodes_from(vertices)
new_names = []
i = 0
while nones > 0:
while self.has_vertex(i):
i += 1
self._nxg.add_node(i)
new_names.append(i)
nones -= 1
i += 1
return new_names if new_names != [] else None
def degree(self, v, directed):
"""
Returns the total number of vertices incident to v.
INPUT:
- ``v`` -- a vertex label
- ``directed`` -- boolean
OUTPUT:
degree of v
TESTS::
sage: G = sage.graphs.base.graph_backends.NetworkXGraphBackend()
sage: G.add_vertices(range(3))
sage: G.degree(1, False)
0
"""
try:
assert(not isinstance(self._nxg, (NetworkXGraphDeprecated, NetworkXDiGraphDeprecated)))
except AssertionError:
self._nxg = self._nxg.mutate()
return self._nxg.degree(v)
def del_edge(self, u, v, l, directed):
"""
Deletes the edge (u,v) with label l.
INPUT:
- ``u,v`` -- vertices
- ``l`` -- edge label
- ``directed`` -- boolean
TESTS::
sage: G = sage.graphs.base.graph_backends.NetworkXGraphBackend()
sage: G.del_edge(1,2,'a',True)
"""
try:
assert(not isinstance(self._nxg, (NetworkXGraphDeprecated, NetworkXDiGraphDeprecated)))
except AssertionError:
self._nxg = self._nxg.mutate()
import networkx
try:
if self._nxg.is_multigraph():
for k,d in self._nxg.edge[u][v].iteritems():
if d.get('weight',None) == l:
self._nxg.remove_edge(u,v,k)
break
else:
if l is None or self._nxg.edge[u][v].get('weight',None) == l:
self._nxg.remove_edge(u,v)
except (KeyError, networkx.NetworkXError):
pass
def del_vertex(self, v):
"""
Delete a labelled vertex in self.
INPUT:
- ``v`` -- vertex label
TESTS::
sage: G = sage.graphs.base.graph_backends.NetworkXGraphBackend()
sage: G.del_vertex(0)
Traceback (most recent call last):
...
NetworkXError: The node 0 is not in the graph.
"""
try:
assert(not isinstance(self._nxg, (NetworkXGraphDeprecated, NetworkXDiGraphDeprecated)))
except AssertionError:
self._nxg = self._nxg.mutate()
self._nxg.remove_node(v)
def del_vertices(self, vertices):
"""
Delete labelled vertices in self.
INPUT:
- ``vertices`` -- iterator of vertex labels
TESTS::
sage: G = sage.graphs.base.graph_backends.NetworkXGraphBackend()
sage: G.del_vertices([1,2,3])
Traceback (most recent call last):
...
NetworkXError: The node 1 is not in the graph.
"""
try:
assert(not isinstance(self._nxg, (NetworkXGraphDeprecated, NetworkXDiGraphDeprecated)))
except AssertionError:
self._nxg = self._nxg.mutate()
for v in vertices:
self._nxg.remove_node(v)
def get_edge_label(self, u, v):
"""
Returns the edge label of (u,v).
INPUT:
- ``u,v`` -- vertex labels
OUTPUT:
label of (u,v)
TESTS::
sage: G = sage.graphs.base.graph_backends.NetworkXGraphBackend()
sage: G.get_edge_label(1,2)
Traceback (most recent call last):
...
NetworkXError: Edge (1,2) requested via get_edge_label does not exist.
"""
try:
assert(not isinstance(self._nxg, (NetworkXGraphDeprecated, NetworkXDiGraphDeprecated)))
except AssertionError:
self._nxg = self._nxg.mutate()
try:
E = self._nxg.edge[u][v]
except KeyError:
from networkx import NetworkXError
raise NetworkXError("Edge (%s,%s) requested via get_edge_label does not exist."%(u,v))
if self._nxg.is_multigraph():
return [ e.get('weight',None) for e in E.itervalues() ]
else:
return E.get('weight',None)
def has_edge(self, u, v, l):
"""
True if self has an edge (u,v) with label l.
INPUT:
- ``u,v`` -- vertex labels
- ``l`` -- label
OUTPUT:
boolean
TESTS::
sage: G = sage.graphs.base.graph_backends.NetworkXGraphBackend()
sage: G.has_edge(1,2,'a')
False
"""
try:
assert(not isinstance(self._nxg, (NetworkXGraphDeprecated, NetworkXDiGraphDeprecated)))
except AssertionError:
self._nxg = self._nxg.mutate()
if not self._nxg.has_edge(u, v):
return False
if l is None:
return True
if self._nxg.is_multigraph():
return any( e.get('weight',None) == l for e in self._nxg.adj[u][v].itervalues() )
else:
return any( e == l for e in self._nxg.adj[u][v].itervalues() )
def has_vertex(self, v):
"""
True if self has a vertex with label v.
INPUT:
- ``v`` -- vertex label
OUTPUT:
boolean
TESTS::
sage: G = sage.graphs.base.graph_backends.NetworkXGraphBackend()
sage: G.has_vertex(0)
False
"""
try:
assert(not isinstance(self._nxg, (NetworkXGraphDeprecated, NetworkXDiGraphDeprecated)))
except AssertionError:
self._nxg = self._nxg.mutate()
return self._nxg.has_node(v)
def iterator_edges(self, vertices, labels):
"""
Iterate over the edges incident to a sequence of vertices. Edges are
assumed to be undirected.
INPUT:
- ``vertices`` -- a list of vertex labels
- ``labels`` -- boolean
OUTPUT:
a generator which yields edges, with or without labels
depending on the labels parameter.
TESTS::
sage: G = sage.graphs.base.graph_backends.NetworkXGraphBackend()
sage: G.iterator_edges([],True)
<generator object iterator_edges at ...>
"""
try:
assert(not isinstance(self._nxg, (NetworkXGraphDeprecated, NetworkXDiGraphDeprecated)))
except AssertionError:
self._nxg = self._nxg.mutate()
if labels:
for u,v,d in self._nxg.edges_iter(data=True):
if u in vertices or v in vertices:
yield (u,v,d.get('weight',None))
else:
for u,v in self._nxg.edges_iter():
if u in vertices or v in vertices:
yield (u,v)
def _iterator_in_edges_with_labels(self, vertices):
"""
Iterate over the incoming edges incident to a sequence of vertices.
Special case, only for internal use.
EXAMPLE::
sage: g = DiGraph(graphs.PetersenGraph(), implementation="networkx")._backend
sage: sorted(list(g.iterator_in_edges([0,1], True)))
[(0, 1, None), (1, 0, None), (2, 1, None), (4, 0, None), (5, 0, None), (6, 1, None)]
"""
try:
assert(not isinstance(self._nxg, (NetworkXGraphDeprecated, NetworkXDiGraphDeprecated)))
except AssertionError:
self._nxg = self._nxg.mutate()
for u,v,d in self._nxg.in_edges_iter(vertices,data=True):
yield (u,v,d.get('weight',None))
def iterator_in_edges(self, vertices, labels):
"""
Iterate over the incoming edges incident to a sequence of vertices.
INPUT:
- ``vertices`` -- a list of vertex labels
- ``labels`` -- boolean
OUTPUT:
a generator which yields edges, with or without labels
depending on the labels parameter.
TESTS::
sage: G = sage.graphs.base.graph_backends.NetworkXGraphBackend()
sage: i = G.iterator_in_edges([],True)
"""
try:
assert(not isinstance(self._nxg, (NetworkXGraphDeprecated, NetworkXDiGraphDeprecated)))
except AssertionError:
self._nxg = self._nxg.mutate()
if self._nxg.is_directed():
if labels:
return self._iterator_in_edges_with_labels(vertices)
else:
return self._nxg.in_edges_iter(vertices)
else:
return self.iterator_edges(vertices,labels)
def _iterator_out_edges_with_labels(self, vertices):
"""
Iterate over the outbound edges incident to a sequence of vertices.
Special case, only for internal use.
EXAMPLE::
sage: g = DiGraph(graphs.PetersenGraph(), implementation="networkx")._backend
sage: sorted(list(g.iterator_out_edges([0,1], True)))
[(0, 1, None), (0, 4, None), (0, 5, None), (1, 0, None), (1, 2, None), (1, 6, None)]
"""
try:
assert(not isinstance(self._nxg, (NetworkXGraphDeprecated, NetworkXDiGraphDeprecated)))
except AssertionError:
self._nxg = self._nxg.mutate()
for u,v,d in self._nxg.out_edges_iter(vertices,data=True):
yield (u,v,d.get('weight',None))
def iterator_out_edges(self, vertices, labels):
"""
Iterate over the outbound edges incident to a sequence of vertices.
INPUT:
- ``vertices`` -- a list of vertex labels
- ``labels`` -- boolean
OUTPUT:
a generator which yields edges, with or without labels
depending on the labels parameter.
TESTS::
sage: G = sage.graphs.base.graph_backends.NetworkXGraphBackend()
sage: i = G.iterator_out_edges([],True)
"""
try:
assert(not isinstance(self._nxg, (NetworkXGraphDeprecated, NetworkXDiGraphDeprecated)))
except AssertionError:
self._nxg = self._nxg.mutate()
if self._nxg.is_directed():
if labels:
return self._iterator_out_edges_with_labels(vertices)
else:
return self._nxg.out_edges_iter(vertices)
else:
return self.iterator_edges(vertices,labels)
def iterator_nbrs(self, v):
"""
Iterate over the vertices adjacent to v.
INPUT:
- ``v`` -- vertex label
OUTPUT:
a generator which yields vertex labels
TESTS::
sage: G = sage.graphs.base.graph_backends.NetworkXGraphBackend()
sage: G.add_vertex(0)
sage: G.iterator_nbrs(0)
<dictionary-keyiterator object at ...>
"""
try:
assert(not isinstance(self._nxg, (NetworkXGraphDeprecated, NetworkXDiGraphDeprecated)))
except AssertionError:
self._nxg = self._nxg.mutate()
return self._nxg.neighbors_iter(v)
def iterator_in_nbrs(self, v):
"""
Iterate over the vertices u such that the edge (u,v) is in self
(that is, predecessors of v).
INPUT:
- ``v`` -- vertex label
OUTPUT:
a generator which yields vertex labels
TESTS::
sage: G = sage.graphs.base.graph_backends.NetworkXGraphBackend()
sage: G.iterator_in_nbrs(0)
Traceback (most recent call last):
...
AttributeError: 'MultiGraph' object has no attribute 'predecessors_iter'
"""
try:
assert(not isinstance(self._nxg, (NetworkXGraphDeprecated, NetworkXDiGraphDeprecated)))
except AssertionError:
self._nxg = self._nxg.mutate()
return self._nxg.predecessors_iter(v)
def iterator_out_nbrs(self, v):
"""
Iterate over the vertices u such that the edge (v,u) is in self
(that is, successors of v).
INPUT:
- ``v`` -- vertex label
OUTPUT:
a generator which yields vertex labels
TESTS::
sage: G = sage.graphs.base.graph_backends.NetworkXGraphBackend()
sage: G.iterator_out_nbrs(0)
Traceback (most recent call last):
...
AttributeError: 'MultiGraph' object has no attribute 'successors_iter'
"""
try:
assert(not isinstance(self._nxg, (NetworkXGraphDeprecated, NetworkXDiGraphDeprecated)))
except AssertionError:
self._nxg = self._nxg.mutate()
return self._nxg.successors_iter(v)
def iterator_verts(self, verts):
"""
Iterate over the vertices v with labels in verts.
INPUT:
- ``vertex`` -- vertex labels
OUTPUT:
a generator which yields vertices
TESTS::
sage: G = sage.graphs.base.graph_backends.NetworkXGraphBackend()
sage: G.iterator_verts(0)
<generator object bunch_iter at ...>
"""
try:
assert(not isinstance(self._nxg, (NetworkXGraphDeprecated, NetworkXDiGraphDeprecated)))
except AssertionError:
self._nxg = self._nxg.mutate()
return self._nxg.nbunch_iter(verts)
def loops(self, new=None):
"""
Get/set whether or not self allows loops.
INPUT:
- ``new`` -- can be a boolean (in which case it sets the value) or
``None``, in which case the current value is returned. It is set to
``None`` by default.
TESTS::
sage: G = sage.graphs.base.graph_backends.NetworkXGraphBackend()
sage: G.loops(True)
sage: G.loops(None)
True
"""
if new is None:
return self._loops
if new:
self._loops = True
else:
self._loops = False
def multiple_edges(self, new=None):
"""
Get/set whether or not self allows multiple edges.
INPUT:
- ``new`` -- can be a boolean (in which case it sets the value) or
``None``, in which case the current value is returned. It is set to
``None`` by default.
TESTS::
sage: G = sage.graphs.base.graph_backends.NetworkXGraphBackend()
sage: G.multiple_edges(True)
sage: G.multiple_edges(None)
True
"""
try:
assert(not isinstance(self._nxg, (NetworkXGraphDeprecated, NetworkXDiGraphDeprecated)))
except AssertionError:
self._nxg = self._nxg.mutate()
from networkx import Graph,MultiGraph,DiGraph,MultiDiGraph
if new is None:
return self._nxg.is_multigraph()
if new == self._nxg.is_multigraph():
return
if new:
if self._nxg.is_directed():
self._nxg = MultiDiGraph(self._nxg)
else:
self._nxg = MultiGraph(self._nxg)
else:
if self._nxg.is_directed():
self._nxg = DiGraph(self._nxg)
else:
self._nxg = Graph(self._nxg)
def name(self, new=None):
"""
Get/set name of self.
INPUT:
- ``new`` -- can be a string (in which case it sets the value) or
``None``, in which case the current value is returned. It is set to
``None`` by default.
TESTS::
sage: G = sage.graphs.base.graph_backends.NetworkXGraphBackend()
sage: G.name("A NetworkX Graph")
sage: G.name(None)
'A NetworkX Graph'
"""
try:
assert(not isinstance(self._nxg, (NetworkXGraphDeprecated, NetworkXDiGraphDeprecated)))
except AssertionError:
self._nxg = self._nxg.mutate()
if new is None:
return self._nxg.name
self._nxg.name = new
def num_edges(self, directed):
"""
The number of edges in self
INPUT:
- ``directed`` -- boolean
TESTS::
sage: G = sage.graphs.base.graph_backends.NetworkXGraphBackend()
sage: G.num_edges(True)
0
sage: G.num_edges(False)
0
"""
try:
assert(not isinstance(self._nxg, (NetworkXGraphDeprecated, NetworkXDiGraphDeprecated)))
except AssertionError:
self._nxg = self._nxg.mutate()
return self._nxg.size()
def num_verts(self):
"""
The number of vertices in self
TESTS::
sage: G = sage.graphs.base.graph_backends.NetworkXGraphBackend()
sage: G.num_verts()
0
"""
try:
assert(not isinstance(self._nxg, (NetworkXGraphDeprecated, NetworkXDiGraphDeprecated)))
except AssertionError:
self._nxg = self._nxg.mutate()
return self._nxg.order()
def relabel(self, perm, directed):
"""
Relabel the vertices of self by a permutation.
INPUT:
- ``perm`` -- permutation
- ``directed`` -- boolean
TESTS::
sage: G = sage.graphs.base.graph_backends.NetworkXGraphBackend()
sage: G.relabel([],False)
"""
try:
assert(not isinstance(self._nxg, (NetworkXGraphDeprecated, NetworkXDiGraphDeprecated)))
except AssertionError:
self._nxg = self._nxg.mutate()
from networkx import relabel_nodes
name = self._nxg.name
self._nxg = relabel_nodes(self._nxg,perm)
self._nxg.name = name
def set_edge_label(self, u, v, l, directed):
"""
Label the edge (u,v) by l.
INPUT:
- ``u,v`` -- vertices
- ``l`` -- edge label
- ``directed`` -- boolean
TESTS::
sage: G = sage.graphs.base.graph_backends.NetworkXGraphBackend()
sage: G.set_edge_label(1,2,'a',True)
"""
try:
assert(not isinstance(self._nxg, (NetworkXGraphDeprecated, NetworkXDiGraphDeprecated)))
except AssertionError:
self._nxg = self._nxg.mutate()
if not self.has_edge(u, v, None):
return
if self.multiple_edges(None):
self._nxg[u][v].clear()
self._nxg[u][v][0] = dict(weight=l)
if directed is False:
self._nxg[v][u].clear()
self._nxg[v][u][0] = dict(weight=l)
else:
self._nxg[u][v]['weight'] = l
if directed is False:
self._nxg[v][u]['weight'] = l
| 28.430311
| 99
| 0.542147
| 4,492
| 42,020
| 4.973286
| 0.065004
| 0.042927
| 0.038227
| 0.05188
| 0.890018
| 0.864816
| 0.85094
| 0.837511
| 0.815354
| 0.800134
| 0
| 0.007295
| 0.350785
| 42,020
| 1,477
| 100
| 28.44956
| 0.81162
| 0.478177
| 0
| 0.694301
| 0
| 0
| 0.031896
| 0.001357
| 0
| 0
| 0
| 0
| 0.134715
| 1
| 0.147668
| false
| 0.002591
| 0.028497
| 0
| 0.272021
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
4a88a84572d950a9a1263d45d85ea7f28dbbfbd6
| 17,708
|
py
|
Python
|
st/clitests/shutdown_spec.py
|
bhansaliakhil/cortx-s3server
|
d107adb521755da3564316778deff3a51c15170b
|
[
"Apache-2.0"
] | null | null | null |
st/clitests/shutdown_spec.py
|
bhansaliakhil/cortx-s3server
|
d107adb521755da3564316778deff3a51c15170b
|
[
"Apache-2.0"
] | 1
|
2021-11-11T13:55:44.000Z
|
2021-11-11T13:55:44.000Z
|
st/clitests/shutdown_spec.py
|
bhansaliakhil/cortx-s3server
|
d107adb521755da3564316778deff3a51c15170b
|
[
"Apache-2.0"
] | 1
|
2022-03-04T09:44:59.000Z
|
2022-03-04T09:44:59.000Z
|
#
# Copyright (c) 2020 Seagate Technology LLC and/or its Affiliates
#
# 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.
#
# For any questions about this software or licensing,
# please email [email protected] or [email protected].
#
#!/usr/bin/python3.6
from framework import Config
from framework import S3PyCliTest
from s3cmd import S3cmdTest
from s3fi import S3fiTest
from jclient import JClientTest
from s3client_config import S3ClientConfig
# Helps debugging
# Config.log_enabled = True
# Config.dummy_run = True
# Config.client_execution_timeout = 300 * 1000
# Config.request_timeout = 300 * 1000
# Config.socket_timeout = 300 * 1000
# Enable retry flag to limit retries on failure
Config.s3cmd_max_retries = 2
# Set time_readable_format to False if you want to display the time in milli seconds.
# Config.time_readable_format = False
# TODO
# DNS-compliant bucket names should not contains underscore or other special characters.
# The allowed characters are [a-zA-Z0-9.-]*
#
# Add validations to S3 server and write system tests for the same.
# ***MAIN ENTRY POINT
# Run before all to setup the test environment.
print("Configuring LDAP")
S3PyCliTest('Before_all').before_all()
# Set pathstyle =false to run jclient for partial multipart upload
S3ClientConfig.pathstyle = False
S3ClientConfig.access_key_id = 'AKIAJPINPFRBTPAYOGNA'
S3ClientConfig.secret_key = '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'
config_types = ["pathstyle.s3cfg", "virtualhoststyle.s3cfg"]
for i, type in enumerate(config_types):
Config.config_file = type
# ************ Create bucket ************
S3cmdTest('s3cmd can create bucket').create_bucket("seagatebucket").\
execute_test().command_is_successful()
# ************ List buckets ************
S3cmdTest('s3cmd can list buckets').list_buckets().execute_test().\
command_is_successful().command_response_should_have('s3://seagatebucket')
# *********** Inform S3 that shutdown tests are in progress ******
S3fiTest('s3cmd enable FI shutdown_system_tests_in_progress').\
enable_fi("enable", "always", "shutdown_system_tests_in_progress").\
execute_test().command_is_successful().\
command_response_should_not_have('ServiceUnavailable')
# ************ PUT/GET OBJECT TEST ***********
S3fiTest('s3cmd enable FI put_object_action_fetch_bucket_info_shutdown_fail').\
enable_fi("enable", "always", "put_object_action_fetch_bucket_info_shutdown_fail").\
execute_test().command_is_successful().\
command_response_should_not_have('ServiceUnavailable')
S3cmdTest('s3cmd can not upload 4MB file').\
upload_test("seagatebucket", "4MBfile", 4000000).\
execute_test(negative_case=True).command_should_fail().\
command_error_should_have("ServiceUnavailable")
S3fiTest('s3cmd can disable Fault injection').\
disable_fi("put_object_action_fetch_bucket_info_shutdown_fail").\
execute_test().command_is_successful()
S3cmdTest('s3cmd should not have objects').list_objects('seagatebucket').\
execute_test().command_is_successful().\
command_response_should_not_have('4MBfile')
S3fiTest('s3cmd enable FI put_object_action_create_object_shutdown_fail').\
enable_fi("enable", "always", "put_object_action_create_object_shutdown_fail").\
execute_test().command_is_successful().\
command_response_should_not_have('ServiceUnavailable')
S3cmdTest('s3cmd can not upload 4MB file').\
upload_test("seagatebucket", "4MBfile", 4000000).\
execute_test(negative_case=True).command_should_fail().\
command_error_should_have("ServiceUnavailable")
S3fiTest('s3cmd can disable Fault injection').\
disable_fi("put_object_action_create_object_shutdown_fail").\
execute_test().command_is_successful()
S3cmdTest('s3cmd should not have objects').list_objects('seagatebucket').\
execute_test().command_is_successful().\
command_response_should_not_have('4MBfile')
S3fiTest('s3cmd enable FI put_object_action_consume_incoming_content_shutdown_fail').\
enable_fi_enablen("enable", "put_object_action_consume_incoming_content_shutdown_fail", "2").\
execute_test().command_is_successful().\
command_response_should_not_have('ServiceUnavailable')
S3cmdTest('s3cmd can not upload 4MB file').\
upload_test("seagatebucket", "4MBfile", 4000000).\
execute_test(negative_case=True).command_should_fail().\
command_error_should_have("ServiceUnavailable")
S3fiTest('s3cmd can disable Fault injection').\
disable_fi("put_object_action_consume_incoming_content_shutdown_fail").\
execute_test().command_is_successful()
S3cmdTest('s3cmd should not have objects').list_objects('seagatebucket').\
execute_test().command_is_successful().\
command_response_should_not_have('4MBfile')
S3fiTest('s3cmd enable FI put_object_action_save_metadata_pass').\
enable_fi("enable", "always", "put_object_action_save_metadata_pass").\
execute_test().command_is_successful().\
command_response_should_not_have('ServiceUnavailable')
S3cmdTest('s3cmd can upload 4MB file').\
upload_test("seagatebucket", "4MBfile", 4000000).\
execute_test().command_is_successful()
S3fiTest('s3cmd can disable Fault injection').\
disable_fi("put_object_action_save_metadata_pass").\
execute_test().command_is_successful()
S3cmdTest('s3cmd should list objects').list_objects('seagatebucket').\
execute_test().command_is_successful().\
command_response_should_have('s3://seagatebucket/4MBfile')
S3fiTest('s3cmd enable FI get_object_action_fetch_bucket_info_shutdown_fail').\
enable_fi("enable", "always", "get_object_action_fetch_bucket_info_shutdown_fail").\
execute_test().command_is_successful().\
command_response_should_not_have('ServiceUnavailable')
S3cmdTest('s3cmd can not download 4MB file').\
download_test("seagatebucket", "4MBfile").\
execute_test(negative_case=True).command_should_fail()
S3fiTest('s3cmd can disable Fault injection').\
disable_fi("get_object_action_fetch_bucket_info_shutdown_fail").\
execute_test().command_is_successful()
S3cmdTest('s3cmd can delete 4MB file').\
delete_test("seagatebucket", "4MBfile").execute_test().\
command_is_successful()
# ************ PUT/GET BUCKET TEST ***********
S3fiTest('s3cmd enable FI put_bucket_action_validate_request_shutdown_fail').\
enable_fi("enable", "always", "put_bucket_action_validate_request_shutdown_fail").\
execute_test().command_is_successful().\
command_response_should_not_have('ServiceUnavailable')
S3cmdTest('s3cmd can not create bucket').create_bucket("seagate-bucket").\
execute_test(negative_case=True).command_should_fail().\
command_error_should_have("ServiceUnavailable")
S3fiTest('s3cmd can disable Fault injection').\
disable_fi("put_bucket_action_validate_request_shutdown_fail").\
execute_test().command_is_successful().\
command_response_should_not_have('ServiceUnavailable')
S3cmdTest('s3cmd should not list bucket').list_buckets().execute_test().\
command_is_successful().\
command_response_should_not_have('s3://seagate-bucket')
S3cmdTest('s3cmd can upload 3K file').\
upload_test("seagatebucket", "3Kfile", 3000).\
execute_test().command_is_successful()
S3cmdTest('s3cmd can upload 9K file').\
upload_test("seagatebucket", "9Kfile", 9000).\
execute_test().command_is_successful()
S3fiTest('s3cmd enable FI get_bucket_action_get_next_objects_shutdown_fail').\
enable_fi("enable", "always", "get_bucket_action_get_next_objects_shutdown_fail").\
execute_test().command_is_successful().\
command_response_should_not_have('ServiceUnavailable')
S3cmdTest('s3cmd can not list objects').list_objects('seagatebucket').\
execute_test(negative_case=True).command_should_fail().\
command_error_should_have("ServiceUnavailable")
S3fiTest('s3cmd can disable Fault injection').\
disable_fi("get_bucket_action_get_next_objects_shutdown_fail").\
execute_test().command_is_successful()
S3cmdTest('s3cmd can delete 3K file').\
delete_test("seagatebucket", "3Kfile").\
execute_test().command_is_successful()
S3cmdTest('s3cmd can delete 9K file').\
delete_test("seagatebucket", "9Kfile").\
execute_test().command_is_successful()
S3fiTest('s3cmd enable FI get_service_action_get_next_buckets_shutdown_fail').\
enable_fi("enable", "always", "get_service_action_get_next_buckets_shutdown_fail").\
execute_test().command_is_successful().\
command_response_should_not_have('ServiceUnavailable')
S3cmdTest('s3cmd can not list buckets').list_buckets().\
execute_test(negative_case=True).command_should_fail().\
command_error_should_have("ServiceUnavailable")
S3fiTest('s3cmd can disable Fault injection').\
disable_fi("get_service_action_get_next_buckets_shutdown_fail").\
execute_test().command_is_successful().\
command_response_should_not_have('ServiceUnavailable')
# ************ ACL/POLICY TEST ***************
S3fiTest('s3cmd enable FI put_bucket_acl_action_fetch_bucket_info_shutdown_fail').\
enable_fi("enable", "always", "put_bucket_acl_action_fetch_bucket_info_shutdown_fail").\
execute_test().command_is_successful().\
command_response_should_not_have('ServiceUnavailable')
S3cmdTest('s3cmd can not set acl on bucket').\
setacl_bucket("seagatebucket","read:123").\
execute_test(negative_case=True).command_should_fail().\
command_error_should_have("ServiceUnavailable")
S3fiTest('s3cmd can disable Fault injection').\
disable_fi("put_bucket_acl_action_fetch_bucket_info_shutdown_fail").\
execute_test().command_is_successful().\
command_response_should_not_have('ServiceUnavailable')
S3cmdTest('s3cmd can upload 3k file').\
upload_test("seagatebucket", "3kfile", 3000).\
execute_test().command_is_successful()
S3fiTest('s3cmd enable FI put_object_acl_action_fetch_bucket_info_shutdown_fail').\
enable_fi("enable", "always", "put_object_acl_action_fetch_bucket_info_shutdown_fail").\
execute_test().command_is_successful().\
command_response_should_not_have('ServiceUnavailable')
S3cmdTest('s3cmd can not set acl on object').\
setacl_object("seagatebucket","3kfile", "read:123").\
execute_test(negative_case=True).command_should_fail().\
command_error_should_have("ServiceUnavailable")
S3fiTest('s3cmd can disable Fault injection').\
disable_fi("put_object_acl_action_fetch_bucket_info_shutdown_fail").\
execute_test().command_is_successful().\
command_response_should_not_have('ServiceUnavailable')
S3cmdTest('s3cmd can delete 3kfile').\
delete_test("seagatebucket", "3kfile").\
execute_test().command_is_successful()
S3fiTest('s3cmd enable FI put_bucket_policy_action_get_metadata_shutdown_fail').\
enable_fi("enable", "always", "put_bucket_policy_action_get_metadata_shutdown_fail").\
execute_test().command_is_successful().\
command_response_should_not_have('ServiceUnavailable')
S3cmdTest('s3cmd can not set policy on bucket').\
setpolicy_bucket("seagatebucket","policy.txt").\
execute_test(negative_case=True).command_should_fail().\
command_error_should_have("ServiceUnavailable")
S3fiTest('s3cmd can disable Fault injection').\
disable_fi("put_bucket_policy_action_get_metadata_shutdown_fail").\
execute_test().command_is_successful().\
command_response_should_not_have('ServiceUnavailable')
# ************ MULTI-PART TEST ***************
S3fiTest('s3cmd enable FI put_multiobject_action_create_object_shutdown_fail').\
enable_fi("enable", "always", "put_multiobject_action_create_object_shutdown_fail").\
execute_test().command_is_successful().\
command_response_should_not_have('ServiceUnavailable')
S3cmdTest('s3cmd can not upload 18MB file').\
upload_test("seagatebucket", "18MBfile1", 18000000).\
execute_test(negative_case=True).command_should_fail()
S3fiTest('s3cmd can disable Fault injection').\
disable_fi("put_multiobject_action_create_object_shutdown_fail").\
execute_test().command_is_successful().\
command_response_should_not_have('ServiceUnavailable')
# S3fiTest('s3cmd enable FI post_multipartobject_action_save_upload_metadata_shutdown_fail').\
# enable_fi("enable", "always", "post_multipartobject_action_save_upload_metadata_shutdown_fail").\
# execute_test().command_is_successful()
# S3cmdTest('s3cmd can not upload 18MB file').\
# upload_test("seagatebucket", "18MBfile2", 18000000).\
# execute_test(negative_case=True).command_should_fail().\
# command_error_should_have("ServiceUnavailable")
# S3fiTest('s3cmd can disable Fault injection').\
# disable_fi("post_multipartobject_action_save_upload_metadata_shutdown_fail").\
# execute_test().command_is_successful()
S3fiTest('s3cmd enable FI put_multiobject_action_fetch_bucket_info_shutdown_fail').\
enable_fi("enable", "always", "put_multiobject_action_fetch_bucket_info_shutdown_fail").\
execute_test().command_is_successful().\
command_response_should_not_have('ServiceUnavailable')
S3cmdTest('s3cmd can not upload 19MB file').\
upload_test("seagatebucket", "19MBfile", 19000000).\
execute_test(negative_case=True).command_should_fail().\
command_error_should_have("ServiceUnavailable")
S3fiTest('s3cmd can disable Fault injection').\
disable_fi("put_multiobject_action_fetch_bucket_info_shutdown_fail").\
execute_test().command_is_successful().\
command_response_should_not_have('ServiceUnavailable')
S3fiTest('s3cmd enable FI put_multiobject_action_consume_incoming_content_shutdown_fail').\
enable_fi_enablen("enable", "put_multiobject_action_consume_incoming_content_shutdown_fail", "2").\
execute_test().command_is_successful().\
command_response_should_not_have('ServiceUnavailable')
S3cmdTest('s3cmd can not upload 17MB file').\
upload_test("seagatebucket", "17MBfile", 17000000).\
execute_test(negative_case=True).command_should_fail().\
command_error_should_have("ServiceUnavailable")
S3fiTest('s3cmd can disable Fault injection').\
disable_fi("put_multiobject_action_consume_incoming_content_shutdown_fail").\
execute_test().command_is_successful().\
command_response_should_not_have('ServiceUnavailable')
# ************ CHUNK UPLOAD TEST ***************
S3fiTest('s3cmd enable FI put_multiobject_action_fetch_bucket_info_shutdown_fail').\
enable_fi("enable", "always", "put_multiobject_action_fetch_bucket_info_shutdown_fail").\
execute_test().command_is_successful().\
command_response_should_not_have('ServiceUnavailable')
JClientTest('Jclient can not upload 18MB file (multipart) in chunked mode').\
put_object_multipart("seagatebucket", "18MBfilec", 18000000, 15, chunked=True).\
execute_test(negative_case=True).command_should_fail().\
command_error_should_have("ServiceUnavailable")
S3fiTest('s3cmd can disable Fault injection').\
disable_fi("put_multiobject_action_fetch_bucket_info_shutdown_fail").\
execute_test().command_is_successful().\
command_response_should_not_have('ServiceUnavailable')
S3fiTest('s3cmd enable FI put_chunk_upload_object_action_consume_incoming_content_shutdown_fail').\
enable_fi_enablen("enable", "put_chunk_upload_object_action_consume_incoming_content_shutdown_fail", "2").\
execute_test().command_is_successful().\
command_response_should_not_have('ServiceUnavailable')
JClientTest('Jclient can not upload 4MB file in chunked mode').\
put_object("seagatebucket", "4MBfilec", 4000000, chunked=True).\
execute_test(negative_case=True).command_should_fail().\
command_error_should_have("ServiceUnavailable")
S3fiTest('s3cmd can disable Fault injection').\
disable_fi("put_chunk_upload_object_action_consume_incoming_content_shutdown_fail").\
execute_test().command_is_successful().\
command_response_should_not_have('ServiceUnavailable')
# *********** Done with shutdown tests, Inform S3 ********
S3fiTest('s3cmd can disable Fault injection').\
disable_fi("shutdown_system_tests_in_progress").execute_test()\
.command_is_successful().command_response_should_not_have('ServiceUnavailable')
# ************ Delete bucket TEST ************
S3cmdTest('s3cmd can delete bucket').delete_bucket("seagatebucket").\
execute_test().command_is_successful()
| 53.660606
| 115
| 0.734131
| 2,057
| 17,708
| 5.904229
| 0.124453
| 0.061589
| 0.077069
| 0.085632
| 0.803294
| 0.789872
| 0.784603
| 0.758831
| 0.740634
| 0.714203
| 0
| 0.022714
| 0.149706
| 17,708
| 329
| 116
| 53.823708
| 0.783888
| 0.141066
| 0
| 0.561475
| 0
| 0
| 0.392596
| 0.175675
| 0
| 0
| 0
| 0.00304
| 0
| 1
| 0
| false
| 0.012295
| 0.02459
| 0
| 0.02459
| 0.004098
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
437e47a0b7522cb6bfe1222d70682c71a0591d94
| 107
|
py
|
Python
|
adler/siteconfig/context_processors.py
|
Yura-D/adler-congress
|
bbdedb7dbada4f6246f2a880204e7dd4bb8c8466
|
[
"MIT"
] | null | null | null |
adler/siteconfig/context_processors.py
|
Yura-D/adler-congress
|
bbdedb7dbada4f6246f2a880204e7dd4bb8c8466
|
[
"MIT"
] | 10
|
2020-03-01T23:00:54.000Z
|
2022-03-12T00:17:11.000Z
|
adler/siteconfig/context_processors.py
|
Yura-D/adler-congress
|
bbdedb7dbada4f6246f2a880204e7dd4bb8c8466
|
[
"MIT"
] | null | null | null |
from .models import SiteSettings
def settings(request):
return {'settings': SiteSettings.get_solo()}
| 17.833333
| 48
| 0.747664
| 12
| 107
| 6.583333
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.140187
| 107
| 5
| 49
| 21.4
| 0.858696
| 0
| 0
| 0
| 0
| 0
| 0.074766
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0.333333
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 6
|
43c0030852d0d8426a9f633801f2295b205d71e8
| 338
|
py
|
Python
|
util.py
|
thesixonenine/daily-py
|
6a4df4f671eebf8d72676f394081ca8a30124d87
|
[
"MIT"
] | null | null | null |
util.py
|
thesixonenine/daily-py
|
6a4df4f671eebf8d72676f394081ca8a30124d87
|
[
"MIT"
] | null | null | null |
util.py
|
thesixonenine/daily-py
|
6a4df4f671eebf8d72676f394081ca8a30124d87
|
[
"MIT"
] | null | null | null |
import time
def is_update(t: time.struct_time) -> bool:
return compare_struct_time(t, time.localtime(time.time()))
def compare_struct_time(t1: time.struct_time, t2: time.struct_time) -> bool:
year = t1.tm_year == t2.tm_year
mon = t1.tm_mon == t2.tm_mon
mday = t1.tm_mday == t2.tm_mday
return year and mon and mday
| 26
| 76
| 0.695266
| 59
| 338
| 3.745763
| 0.305085
| 0.226244
| 0.190045
| 0.162896
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.028986
| 0.183432
| 338
| 12
| 77
| 28.166667
| 0.771739
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.125
| 0.125
| 0.625
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 6
|
78ee49df8951f277301cf8af5a97f98890091005
| 169
|
py
|
Python
|
Shawn/sams_thread.py
|
merlin-neurotech/Backend
|
7845a2ab087d184056aef1e5d43f6eccaef136eb
|
[
"MIT"
] | 2
|
2020-01-06T16:58:10.000Z
|
2020-02-01T19:41:44.000Z
|
Shawn/sams_thread.py
|
merlin-neurotech/Backend
|
7845a2ab087d184056aef1e5d43f6eccaef136eb
|
[
"MIT"
] | null | null | null |
Shawn/sams_thread.py
|
merlin-neurotech/Backend
|
7845a2ab087d184056aef1e5d43f6eccaef136eb
|
[
"MIT"
] | 2
|
2019-12-26T19:03:49.000Z
|
2020-02-09T17:36:04.000Z
|
import threading
from testPylsl import running
thread1 = threading.Thread(target= running)
thread1.start()
thread2 = threading.Thread(target= running)
thread2.start()
| 18.777778
| 43
| 0.798817
| 20
| 169
| 6.75
| 0.5
| 0.207407
| 0.311111
| 0.414815
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.02649
| 0.106509
| 169
| 8
| 44
| 21.125
| 0.86755
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 6
|
6042ad7ca0a3100e70def1ac476204e110da538c
| 40
|
py
|
Python
|
picpy/parsers/utils/__init__.py
|
begeistert/picpy
|
62e238a0f71d60ecb2fa1434e25c65045b65bda7
|
[
"MIT"
] | null | null | null |
picpy/parsers/utils/__init__.py
|
begeistert/picpy
|
62e238a0f71d60ecb2fa1434e25c65045b65bda7
|
[
"MIT"
] | null | null | null |
picpy/parsers/utils/__init__.py
|
begeistert/picpy
|
62e238a0f71d60ecb2fa1434e25c65045b65bda7
|
[
"MIT"
] | null | null | null |
from .asm import *
from .tokens import *
| 20
| 21
| 0.725
| 6
| 40
| 4.833333
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.175
| 40
| 2
| 21
| 20
| 0.878788
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 6
|
604d448efc98a87b46bf60ef49a5debf1cad1c76
| 41,347
|
py
|
Python
|
src/plotting/plot.py
|
suresh-guttikonda/deep-activate-localization
|
081c4bd89846806c234d324ac3cf48ab36828063
|
[
"Apache-2.0"
] | null | null | null |
src/plotting/plot.py
|
suresh-guttikonda/deep-activate-localization
|
081c4bd89846806c234d324ac3cf48ab36828063
|
[
"Apache-2.0"
] | null | null | null |
src/plotting/plot.py
|
suresh-guttikonda/deep-activate-localization
|
081c4bd89846806c234d324ac3cf48ab36828063
|
[
"Apache-2.0"
] | null | null | null |
#!/usr/bin/env python3
import matplotlib.pyplot as plt
import numpy as np
from tensorflow.python.summary.summary_iterator import summary_iterator
from tensorflow.python.framework import tensor_util
def getEventFileData(path):
data = {}
for event in summary_iterator(path):
for value in event.summary.value:
if value.simple_value == 0.0:
t = tensor_util.MakeNdarray(value.tensor)
else:
t = np.array([value.simple_value])
if value.tag not in data:
data[value.tag] = []
data[value.tag].append([event.step, t.item()])
return data
def generalization_plts():
fig = plt.figure(figsize=(18, 12))
ax = fig.add_subplot(111)
plot = 'train'
if plot == 'train':
# igibson apartments generalize
batches = 8000
generalize_aprts_path = "/media/neo/robotics/final_report/Aprts_400_8.0/Aprts_rgbd/train/events.out.tfevents.1630605625.rlgpu2.17887.0.v2"
generalize_aprts_loss = np.array(getEventFileData(generalize_aprts_path)["loss"])
generalize_aprts = ax.plot(generalize_aprts_loss[:, 0]*batches, generalize_aprts_loss[:, 1])
# igibson apartments
# batches = 8000
# aprts_path = "/media/neo/robotics/final_report/Aprts_400_8.0/Aprts_overfit_rgbd/train/events.out.tfevents.1630920914.rlgpu2.12306.0.v2"
# aprts_loss = np.array(getEventFileData(aprts_path)["loss"])
# aprts = ax.plot(aprts_loss[:, 0]*batches, aprts_loss[:, 1])
# igibson 10 apartments
batches = 1250
ten_aprts_path = "/media/neo/robotics/final_report/Aprts_400_8.0/10_Aprts_rgbd/train/events.out.tfevents.1630920486.rlgpu2.39725.0.v2"
ten_aprts_loss = np.array(getEventFileData(ten_aprts_path)["loss"])
ten_aprts = ax.plot(ten_aprts_loss[:, 0]*batches, ten_aprts_loss[:, 1])
# igibson 1 apartments
batches = 330
one_aprts_path = "/media/neo/robotics/final_report/Rs_400_8.0/Rs_rgb_depth/train/events.out.tfevents.1631779563.rlgpu2.40822.0.v2"
one_aprts_loss = np.array(getEventFileData(one_aprts_path)["loss"])
one_aprts = ax.plot(one_aprts_loss[:, 0]*batches, one_aprts_loss[:, 1])
ax.set_title('Training loss for iGibson environment', fontsize=22, weight='bold')
ax.set_xlabel("number of training batches", fontsize=18)
ax.set_ylabel("mean square error (cm)", fontsize=18)
ax.legend([
"115 Apartments",
# "115 Floors",
"17 Apartments",
"1 Apartment"
], loc='upper right', fontsize=16)
plt.show()
fig.savefig("igibson_train_loss.png")
else:
# igibson apartments generalize
batches = 1000
generalize_aprts_path = "/media/neo/robotics/final_report/Aprts_400_8.0/Aprts_rgbd/eval/events.out.tfevents.1630605625.rlgpu2.17887.1.v2"
generalize_aprts_loss = np.array(getEventFileData(generalize_aprts_path)["loss"])
generalize_aprts = ax.plot(generalize_aprts_loss[:, 0]*batches, generalize_aprts_loss[:, 1])
# igibson apartments
# aprts_path = "/media/neo/robotics/final_report/Aprts_400_8.0/Aprts_overfit_rgbd/eval/events.out.tfevents.1630920914.rlgpu2.12306.1.v2"
# aprts_loss = np.array(getEventFileData(aprts_path)["loss"])
# aprts = ax.plot(aprts_loss[:, 0], aprts_loss[:, 1])
# igibson 10 apartments
batches = 300
ten_aprts_path = "/media/neo/robotics/final_report/Aprts_400_8.0/10_Aprts_rgbd/eval/events.out.tfevents.1630920486.rlgpu2.39725.1.v2"
ten_aprts_loss = np.array(getEventFileData(ten_aprts_path)["loss"])
ten_aprts = ax.plot(ten_aprts_loss[:, 0]*batches, ten_aprts_loss[:, 1])
# igibson 1 apartments
batches = 40
one_aprts_path = "/media/neo/robotics/final_report/Rs_400_8.0/Rs_rgb_depth/eval/events.out.tfevents.1631779563.rlgpu2.40822.1.v2"
one_aprts_loss = np.array(getEventFileData(one_aprts_path)["loss"])
one_aprts = ax.plot(one_aprts_loss[:, 0]*batches, one_aprts_loss[:, 1])
ax.set_title('Evaluation loss for iGibson environment', fontsize=22, weight='bold')
ax.set_xlabel("number of evaluation batches", fontsize=18)
ax.set_ylabel("mean square error (cm)", fontsize=18)
ax.legend([
"15 Apartments (unseen)",
# "15 Floors",
"4 Apartments",
"1 Apartment"
], loc='upper right', fontsize=16)
plt.show()
fig.savefig("igibson_eval_loss.png")
def house3d_plts():
fig = plt.figure(figsize=(18, 12))
ax = fig.add_subplot(111)
# pfnet house3d apartment
pfnet_train_path = "/media/neo/robotics/final_report/House3D_4000_8.0/house3d_rgb_depth/train/events.out.tfevents.1631127344.rlgpu2.10177.0.v2"
pfnet_train_loss = np.array(getEventFileData(pfnet_train_path)["loss"])
pfnet_eval_path = "/media/neo/robotics/final_report/House3D_4000_8.0/house3d_rgb_depth/eval/events.out.tfevents.1631127344.rlgpu2.10177.1.v2"
pfnet_eval_loss = np.array(getEventFileData(pfnet_eval_path)["loss"])
pfnet_train = ax.plot(pfnet_train_loss[:, 0], pfnet_train_loss[:, 1])
pfnet_eval = ax.plot(pfnet_eval_loss[:, 0], pfnet_eval_loss[:, 1])
# dpf house3d apartment
dpf_train_path = "/media/neo/robotics/deep-activate-localization/bckp/jan/jan_22/runs/Jan23_00-10-06_pearl8/train_stats_mean_total_loss/events.out.tfevents.1611357667.pearl8.6887.3"
dpf_train_loss = np.array(getEventFileData(dpf_train_path)["train_stats"])
dpf_eval_path = "/media/neo/robotics/deep-activate-localization/bckp/jan/jan_27_1/runs/Jan27_10-55-58_pearl8/eval_stats_mean_loss/events.out.tfevents.1611741820.pearl8.17432.3"
dpf_eval_loss = np.array(getEventFileData(dpf_eval_path)["eval_stats"])
dpf_train = ax.plot(dpf_train_loss[:, 0], dpf_train_loss[:, 1])
dpf_eval = ax.plot(dpf_eval_loss[:, 0]*3, dpf_eval_loss[:, 1])
ax.set_title('Training/Evaluation loss for House3D environment', fontsize=18, weight='bold')
ax.set_xlabel("number of train epochs", fontsize=16)
ax.set_ylabel("pose error (meters)", fontsize=16)
ax.legend([
"PFNet Train",
"PFNet Eval",
"DPF Train",
"DPF Eval"
], loc='upper right', fontsize=14)
plt.show()
fig.savefig("house3d_loss.png")
def igibson_plts():
fig = plt.figure(figsize=(18, 12))
ax = fig.add_subplot(111)
N = np.array([500, 500, 1000])
T = np.array([50, 100, 100])
accuracy = np.array([90.0, 90.625, 91.875])
area = np.array([100, 200, 300])
colors = np.random.rand(len(N+1))
ax.scatter(x=N, y=T, s=area, c=colors, alpha=0.5)
for i, txt in enumerate(accuracy):
ax.annotate(f" {txt}", (N[i], T[i]), fontsize=16)
ax.set_xticks(np.array([0, 250, 500, 1000]))
ax.set_yticks(np.array([0, 10, 50, 100]))
ax.set_title('iGibson PFNet global localization RGB-D success (%) ', fontsize=18, weight='bold')
ax.set_xlabel("number of particles (N)", fontsize=16)
ax.set_ylabel("episode steps (t)", fontsize=16)
plt.show()
fig.savefig("igibson_rgbd_accuracy.png")
def belief_plts():
fig = plt.figure(figsize=(18, 12))
ax = fig.add_subplot(111)
# kmeans representation
pfnet_train_path = "/media/neo/robotics/August/20-07-2021/train_rl_uniform_kmeans/train/events.out.tfevents.1629406907.pearl9.4239.0.v2"
pfnet_train_return = np.array(getEventFileData(pfnet_train_path)["Metrics/AverageReturn"])
pfnet_eval_path = "/media/neo/robotics/August/20-07-2021/train_rl_uniform_kmeans/eval/events.out.tfevents.1629406907.pearl9.4239.1.v2"
pfnet_eval_return = np.array(getEventFileData(pfnet_eval_path)["Metrics/AverageReturn"])
pfnet_train = ax.plot(pfnet_train_return[:, 0], pfnet_train_return[:, 1])
pfnet_eval = ax.plot(pfnet_eval_return[:, 0], pfnet_eval_return[:, 1])
# belief map representation
dpf_train_path = "/media/neo/robotics/August/20-07-2021/train_rl_uniform_likelihood/train/events.out.tfevents.1629406377.pearl8.20947.0.v2"
dpf_train_return = np.array(getEventFileData(dpf_train_path)["Metrics/AverageReturn"])
dpf_eval_path = "/media/neo/robotics/August/20-07-2021/train_rl_uniform_likelihood/eval/events.out.tfevents.1629406377.pearl8.20947.1.v2"
dpf_eval_return = np.array(getEventFileData(dpf_eval_path)["Metrics/AverageReturn"])
dpf_train = ax.plot(dpf_train_return[:, 0], dpf_train_return[:, 1])
dpf_eval = ax.plot(dpf_eval_return[:, 0], dpf_eval_return[:, 1])
ax.set_title('Training/Evaluation episode return for SAC agent', fontsize=22, weight='bold')
ax.set_xlabel("number of train epochs", fontsize=18)
ax.set_ylabel("average episode return", fontsize=18)
ax.legend([
"KMeans (k=10) Train",
"KMeans (k=10) Eval",
"Belief Map Train",
"Belief Map Eval"
], loc='upper left', fontsize=16)
plt.show()
fig.savefig("particle_rep_sac_return.png")
def rl_train_eval_plts():
fig = plt.figure(figsize=(18, 12))
ax = fig.add_subplot(111)
plot = 'train'
if plot == 'train':
# 1.0 box + 25 steps rl agent
box_path_1_0 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_0.5_box_25/train/events.out.tfevents.1631716010.pearl8.18818.0.v2"
box_return_1_0 = np.array(getEventFileData(box_path_1_0)["Metrics/AverageReturn"])
box_1_0 = ax.plot(box_return_1_0[:, 0], box_return_1_0[:, 1])
# 2.0 box + 25 steps rl agent
box_path_2_0 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_1.0_box_25/train/events.out.tfevents.1631867346.pearl8.18370.0.v2"
box_return_2_0 = np.array(getEventFileData(box_path_2_0)["Metrics/AverageReturn"])
box_2_0 = ax.plot(box_return_2_0[:, 0], box_return_2_0[:, 1])
# 4.0 box + 50 steps rl agent
box_path_4_0 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_2.0_box_50/train/events.out.tfevents.1632144090.pearl2.5531.0.v2"
box_return_4_0 = np.array(getEventFileData(box_path_4_0)["Metrics/AverageReturn"])
box_4_0 = ax.plot(box_return_4_0[:, 0], box_return_4_0[:, 1])
# 5.0 box + 50 steps rl agent
box_path_5_0 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_2.5_box_50/train/events.out.tfevents.1632349779.pearl8.24775.0.v2"
box_return_5_0 = np.array(getEventFileData(box_path_5_0)["Metrics/AverageReturn"])
box_5_0 = ax.plot(box_return_5_0[:, 0], box_return_5_0[:, 1])
ax.set_title('Training episode return for SAC agent with Belief Map', fontsize=22, weight='bold')
ax.set_xlabel("number of train epochs", fontsize=18)
ax.set_ylabel("average episode return", fontsize=18)
ax.legend([
"1.0 sampling box",
"2.0 sampling box",
"4.0 sampling box",
"5.0 sampling box"
], loc='upper right', fontsize=16)
plt.show()
fig.savefig("rl_belief_train_returns.png")
else:
# 1.0 box + 25 steps rl agent
box_path_1_0 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_0.5_box_25/eval/events.out.tfevents.1631716010.pearl8.18818.1.v2"
box_return_1_0 = np.array(getEventFileData(box_path_1_0)["Metrics/AverageReturn"])
box_1_0 = ax.plot(box_return_1_0[:, 0], box_return_1_0[:, 1])
# 2.0 box + 25 steps rl agent
box_path_2_0 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_1.0_box_25/eval/events.out.tfevents.1631867347.pearl8.18370.1.v2"
box_return_2_0 = np.array(getEventFileData(box_path_2_0)["Metrics/AverageReturn"])
box_2_0 = ax.plot(box_return_2_0[:, 0], box_return_2_0[:, 1])
# 4.0 box + 50 steps rl agent
box_path_4_0 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_2.0_box_50/eval/events.out.tfevents.1632144090.pearl2.5531.1.v2"
box_return_4_0 = np.array(getEventFileData(box_path_4_0)["Metrics/AverageReturn"])
box_4_0 = ax.plot(box_return_4_0[:, 0], box_return_4_0[:, 1])
# 5.0 box + 50 steps rl agent
box_path_5_0 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_2.5_box_50/eval/events.out.tfevents.1632349779.pearl8.24775.1.v2"
box_return_5_0 = np.array(getEventFileData(box_path_5_0)["Metrics/AverageReturn"])
box_5_0 = ax.plot(box_return_5_0[:, 0], box_return_5_0[:, 1])
ax.set_title('Evaluation episode return for SAC agent with belief map', fontsize=22, weight='bold')
ax.set_xlabel("number of train epochs", fontsize=18)
ax.set_ylabel("average episode return", fontsize=18)
ax.legend([
"1.0 sampling box",
"2.0 sampling box",
"4.0 sampling box",
"5.0 sampling box"
], loc='upper right', fontsize=16)
plt.show()
fig.savefig("rl_belief_eval_returns.png")
def rl_test_plts():
fig = plt.figure(figsize=(18, 12))
ax = fig.add_subplot(111)
plot = 'collision_penalty'
if plot == 'collision_penalty':
# obstacle avoid agent
avoid_path = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_2.0_box_50/avoid_agent/events.out.tfevents.1632427985.pearl2.18690.0.v2"
avoid_eps_mcp = np.array(getEventFileData(avoid_path)["per_eps_mcp"])
# random agent
rnd_path = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_2.0_box_50/rnd_agent/events.out.tfevents.1632428087.pearl2.18689.0.v2"
rnd_eps_mcp = np.array(getEventFileData(rnd_path)["per_eps_mcp"])
# trained sac agent
sac_path = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_2.0_box_50/sac_agent/events.out.tfevents.1632427849.pearl5.11213.0.v2"
sac_eps_mcp = np.array(getEventFileData(sac_path)["per_eps_mcp"])
data = np.concatenate([
-avoid_eps_mcp[:, 1:2],
-rnd_eps_mcp[:, 1:2],
-sac_eps_mcp[:, 1:2]
], axis=1)
ax.boxplot(data)
ax.set_title('Episode mean collision penalty for 4.0 sampling box', fontsize=22, weight='bold')
# ax.set_xlabel("agent behavior", fontsize=16)
ax.set_ylabel("mean collision penalty (%)", fontsize=18)
# ax.set_ylim(-1.05, 0.05)
ax.set_xticklabels([
"Obstacle Avoidance Agent",
"Random Action Agent",
"Trained SAC Agent"
], fontsize=18)
plt.show()
fig.savefig("rl_belief_test_mcp.png")
elif plot == 'orientation_error':
# obstacle avoid agent
avoid_path = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_2.0_box_50/avoid_agent/events.out.tfevents.1632427985.pearl2.18690.0.v2"
avoid_eps_mso = np.array(getEventFileData(avoid_path)["per_eps_mso"])
# random agent
rnd_path = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_2.0_box_50/rnd_agent/events.out.tfevents.1632428087.pearl2.18689.0.v2"
rnd_eps_mso = np.array(getEventFileData(rnd_path)["per_eps_mso"])
# trained sac agent
sac_path = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_2.0_box_50/sac_agent/events.out.tfevents.1632427849.pearl5.11213.0.v2"
sac_eps_mso = np.array(getEventFileData(sac_path)["per_eps_mso"])
data = np.concatenate([
avoid_eps_mso[:, 1:2],
rnd_eps_mso[:, 1:2],
sac_eps_mso[:, 1:2]
], axis=1)
ax.boxplot(data)
ax.set_title('Episode mean orientation error for 4.0 sampling box', fontsize=22, weight='bold')
# ax.set_xlabel("agent behavior", fontsize=16)
ax.set_ylabel("mean orientation error (radians)", fontsize=18)
ax.set_ylim(-0.05, 0.15)
ax.set_xticklabels([
"Obstacle Avoidance Agent",
"Random Action Agent",
"Trained SAC Agent"
], fontsize=18)
plt.show()
fig.savefig("rl_belief_test_mso.png")
elif plot == 'position_error':
# obstacle avoid agent
avoid_path = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_2.0_box_50/avoid_agent/events.out.tfevents.1632427985.pearl2.18690.0.v2"
avoid_eps_msp = np.array(getEventFileData(avoid_path)["per_eps_msp"])
# random agent
rnd_path = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_2.0_box_50/rnd_agent/events.out.tfevents.1632428087.pearl2.18689.0.v2"
rnd_eps_msp = np.array(getEventFileData(rnd_path)["per_eps_msp"])
# trained sac agent
sac_path = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_2.0_box_50/sac_agent/events.out.tfevents.1632427849.pearl5.11213.0.v2"
sac_eps_msp = np.array(getEventFileData(sac_path)["per_eps_msp"])
data = np.concatenate([
avoid_eps_msp[:, 1:2],
rnd_eps_msp[:, 1:2],
sac_eps_msp[:, 1:2]
], axis=1)
ax.boxplot(data)
ax.set_title('Episode mean position error for 4.0 sampling box', fontsize=22, weight='bold')
# ax.set_xlabel("agent behavior", fontsize=16)
ax.set_ylabel("mean position error (meters)", fontsize=18)
ax.set_ylim(-0.05, 2.0)
ax.set_xticklabels([
"Obstacle Avoidance Agent",
"Random Action Agent",
"Trained SAC Agent"
], fontsize=18)
plt.show()
fig.savefig("rl_belief_test_msp.png")
else:
# obstacle avoid agent
avoid_path = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_2.0_box_50/avoid_agent/events.out.tfevents.1632427985.pearl2.18690.0.v2"
avoid_eps_end_mse = np.array(getEventFileData(avoid_path)["per_eps_end_reward"])
# random agent
rnd_path = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_2.0_box_50/rnd_agent/events.out.tfevents.1632428087.pearl2.18689.0.v2"
rnd_eps_end_mse = np.array(getEventFileData(rnd_path)["per_eps_end_reward"])
# trained sac agent
sac_path = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_2.0_box_50/sac_agent/events.out.tfevents.1632427849.pearl5.11213.0.v2"
sac_eps_end_mse = np.array(getEventFileData(sac_path)["per_eps_end_reward"])
data = np.concatenate([
-avoid_eps_end_mse[:, 1:2],
-rnd_eps_end_mse[:, 1:2],
-sac_eps_end_mse[:, 1:2]
], axis=1)
ax.boxplot(data)
ax.set_title('Episode end pose error for 4.0 sampling box', fontsize=22, weight='bold')
# ax.set_xlabel("agent behavior", fontsize=16)
ax.set_ylabel("mean squared error (meters)", fontsize=18)
ax.set_ylim(-0.05, 0.3)
ax.set_xticklabels([
"Obstacle Avoidance Agent",
"Random Action Agent",
"Trained SAC Agent"
], fontsize=18)
plt.show()
fig.savefig("rl_belief_test_end_mse.png")
def diff_steps_plts():
fig = plt.figure(figsize=(18, 12))
ax = fig.add_subplot(111)
plot = 'average_return'
# # 1.0 box + 25 steps rl agent
# box_path_1_0_25 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_1.0_box_25/train/events.out.tfevents.1631867346.pearl8.18370.0.v2"
# box_return_1_0_25 = np.array(getEventFileData(box_path_1_0_25)["Metrics/AverageReturn"])
# box_1_0_25 = ax.plot(box_return_1_0_25[:, 0], box_return_1_0_25[:, 1])
#
# # 1.0 box + 50 steps rl agent
# box_path_1_0_50 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_1.0_box_50/train/events.out.tfevents.1631961881.pearl2.22000.0.v2"
# box_return_1_0_50 = np.array(getEventFileData(box_path_1_0_50)["Metrics/AverageReturn"])
# box_1_0_50 = ax.plot(box_return_1_0_50[:, 0], box_return_1_0_50[:, 1])
if plot == 'average_return':
# 1.0 box + 25 steps rl agent
box_path_1_0_25 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_1.0_box_25/eval/events.out.tfevents.1631867347.pearl8.18370.1.v2"
box_return_1_0_25 = np.array(getEventFileData(box_path_1_0_25)["Metrics/AverageReturn"])
box_1_0_25 = ax.plot(box_return_1_0_25[:, 0], box_return_1_0_25[:, 1])
# 1.0 box + 50 steps rl agent
box_path_1_0_50 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_1.0_box_50/eval/events.out.tfevents.1631961881.pearl2.22000.1.v2"
box_return_1_0_50 = np.array(getEventFileData(box_path_1_0_50)["Metrics/AverageReturn"])
box_1_0_50 = ax.plot(box_return_1_0_50[:, 0], box_return_1_0_50[:, 1])
ax.set_title('Average episode return for SAC agent with belief map (2.0 sampling box)', fontsize=22, weight='bold')
ax.set_xlabel("number of eval epochs", fontsize=18)
ax.set_ylabel("average episode return", fontsize=18)
ax.legend([
"25 particle filter steps",
"50 particle filter steps"
], loc='upper right', fontsize=16)
plt.show()
fig.savefig("diff_steps_eval_avg_eps_return.png")
elif plot == 'collision_penalty':
# 1.0 box + 25 steps rl agent
box_path_1_0_25 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_1.0_box_25/eval/events.out.tfevents.1631867347.pearl8.18370.1.v2"
box_return_1_0_25 = np.array(getEventFileData(box_path_1_0_25)["Metrics/AverageStepCollisionPenality"])
box_1_0_25 = ax.plot(box_return_1_0_25[:, 0], box_return_1_0_25[:, 1])
# 1.0 box + 50 steps rl agent
box_path_1_0_50 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_1.0_box_50/eval/events.out.tfevents.1631961881.pearl2.22000.1.v2"
box_return_1_0_50 = np.array(getEventFileData(box_path_1_0_50)["Metrics/AverageStepCollisionPenality"])
box_1_0_50 = ax.plot(box_return_1_0_50[:, 0], box_return_1_0_50[:, 1])
ax.set_title('Average step collision penalty for SAC agent with belief map (2.0 sampling box)', fontsize=22, weight='bold')
ax.set_xlabel("number of eval epochs", fontsize=18)
ax.set_ylabel("average collision penalty (%)", fontsize=18)
ax.legend([
"25 particle filter steps",
"50 particle filter steps"
], loc='upper right', fontsize=16)
plt.show()
fig.savefig("diff_steps_eval_avg_step_collision.png")
elif plot == 'orientation_error':
# 1.0 box + 25 steps rl agent
box_path_1_0_25 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_1.0_box_25/eval/events.out.tfevents.1631867347.pearl8.18370.1.v2"
box_return_1_0_25 = np.array(getEventFileData(box_path_1_0_25)["Metrics/AverageStepOrientationError"])
box_1_0_25 = ax.plot(box_return_1_0_25[:, 0], box_return_1_0_25[:, 1])
# box_return_1_0_25 = np.array(getEventFileData(box_path_1_0_25)["Metrics/AverageStepPositionError"])
# 1.0 box + 50 steps rl agent
box_path_1_0_50 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_1.0_box_50/eval/events.out.tfevents.1631961881.pearl2.22000.1.v2"
box_return_1_0_50 = np.array(getEventFileData(box_path_1_0_50)["Metrics/AverageStepOrientationError"])
box_1_0_50 = ax.plot(box_return_1_0_50[:, 0], box_return_1_0_50[:, 1])
# box_return_1_0_50 = np.array(getEventFileData(box_path_1_0_50)["Metrics/AverageStepPositionError"])
ax.set_title('Average step orientation error for SAC agent with belief map (2.0 sampling box)', fontsize=22, weight='bold')
ax.set_xlabel("number of eval epochs", fontsize=18)
ax.set_ylabel("average orientation error (radians)", fontsize=18)
ax.legend([
"25 particle filter steps",
"50 particle filter steps"
], loc='upper right', fontsize=16)
plt.show()
fig.savefig("diff_steps_eval_avg_step_orientation.png")
else:
# 1.0 box + 25 steps rl agent
box_path_1_0_25 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_1.0_box_25/eval/events.out.tfevents.1631867347.pearl8.18370.1.v2"
box_return_1_0_25 = np.array(getEventFileData(box_path_1_0_25)["Metrics/AverageStepPositionError"])
box_1_0_25 = ax.plot(box_return_1_0_25[:, 0], box_return_1_0_25[:, 1])
# 1.0 box + 50 steps rl agent
box_path_1_0_50 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_1.0_box_50/eval/events.out.tfevents.1631961881.pearl2.22000.1.v2"
box_return_1_0_50 = np.array(getEventFileData(box_path_1_0_50)["Metrics/AverageStepPositionError"])
box_1_0_50 = ax.plot(box_return_1_0_50[:, 0], box_return_1_0_50[:, 1])
ax.set_title('Average step position error for SAC agent with belief map (2.0 sampling box)', fontsize=22, weight='bold')
ax.set_xlabel("number of eval epochs", fontsize=18)
ax.set_ylabel("average position error (meters)", fontsize=18)
ax.legend([
"25 particle filter steps",
"50 particle filter steps"
], loc='upper right', fontsize=16)
plt.show()
fig.savefig("diff_steps_eval_avg_step_position.png")
def diff_resample_plts():
fig = plt.figure(figsize=(18, 12))
ax = fig.add_subplot(111)
plot = 'average_return'
# # 1.0 box + 25 steps rl agent
# box_path_1_0_25 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_1.0_box_25/train/events.out.tfevents.1631867346.pearl8.18370.0.v2"
# box_return_1_0_25 = np.array(getEventFileData(box_path_1_0_25)["Metrics/AverageReturn"])
# box_1_0_25 = ax.plot(box_return_1_0_25[:, 0], box_return_1_0_25[:, 1])
#
# # 1.0 box + 50 steps rl agent
# box_path_1_0_50 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_1.0_box_50/train/events.out.tfevents.1631961881.pearl2.22000.0.v2"
# box_return_1_0_50 = np.array(getEventFileData(box_path_1_0_50)["Metrics/AverageReturn"])
# box_1_0_50 = ax.plot(box_return_1_0_50[:, 0], box_return_1_0_50[:, 1])
if plot == 'average_return':
# 0.5 box + 25 steps + 1.0 resample rl agent
box_path_1_0 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_0.5_box_25/eval/events.out.tfevents.1631716010.pearl8.18818.1.v2"
box_return_1_0 = np.array(getEventFileData(box_path_1_0)["Metrics/AverageReturn"])
box_1_0 = ax.plot(box_return_1_0[:, 0], box_return_1_0[:, 1])
# 0.5 box + 25 steps + 0.5 resample rl agent
box_path_0_5 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_0.5_box_0.5/eval/events.out.tfevents.1633342690.pearl8.24069.1.v2"
box_return_0_5 = np.array(getEventFileData(box_path_0_5)["Metrics/AverageReturn"])
box_0_5 = ax.plot(box_return_0_5[:, 0], box_return_0_5[:, 1])
ax.set_title('Average episode return for SAC agent with belief map (0.5 sampling box)', fontsize=22, weight='bold')
ax.set_xlabel("number of eval epochs", fontsize=18)
ax.set_ylabel("average episode return", fontsize=18)
ax.legend([
"1.0 soft resample rate",
"0.5 soft resample rate"
], loc='upper right', fontsize=16)
plt.show()
fig.savefig("diff_resample_eval_avg_eps_return.png")
elif plot == 'collision_penalty':
# 0.5 box + 25 steps + 1.0 resample rl agent
box_path_1_0 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_0.5_box_25/eval/events.out.tfevents.1631716010.pearl8.18818.1.v2"
box_return_1_0 = np.array(getEventFileData(box_path_1_0)["Metrics/AverageStepCollisionPenality"])
box_1_0 = ax.plot(box_return_1_0[:, 0], box_return_1_0[:, 1])
# 0.5 box + 25 steps + 0.5 resample rl agent
box_path_0_5 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_0.5_box_0.5/eval/events.out.tfevents.1633342690.pearl8.24069.1.v2"
box_return_0_5 = np.array(getEventFileData(box_path_0_5)["Metrics/AverageStepCollisionPenality"])
box_0_5 = ax.plot(box_return_0_5[:, 0], box_return_0_5[:, 1])
ax.set_title('Average step collision penalty for SAC agent with belief map (0.5 sampling box)', fontsize=22, weight='bold')
ax.set_xlabel("number of eval epochs", fontsize=18)
ax.set_ylabel("average collision penalty (%)", fontsize=18)
ax.legend([
"1.0 soft resample rate",
"0.5 soft resample rate"
], loc='upper right', fontsize=16)
plt.show()
fig.savefig("diff_resample_eval_avg_step_collision.png")
elif plot == 'orientation_error':
# 0.5 box + 25 steps + 1.0 resample rl agent
box_path_1_0 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_0.5_box_25/eval/events.out.tfevents.1631716010.pearl8.18818.1.v2"
box_return_1_0 = np.array(getEventFileData(box_path_1_0)["Metrics/AverageStepOrientationError"])
box_1_0 = ax.plot(box_return_1_0[:, 0], box_return_1_0[:, 1])
# 0.5 box + 25 steps + 0.5 resample rl agent
box_path_0_5 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_0.5_box_0.5/eval/events.out.tfevents.1633342690.pearl8.24069.1.v2"
box_return_0_5 = np.array(getEventFileData(box_path_0_5)["Metrics/AverageStepOrientationError"])
box_0_5 = ax.plot(box_return_0_5[:, 0], box_return_0_5[:, 1])
ax.set_title('Average step orientation error for SAC agent with belief map (0.5 sampling box)', fontsize=22, weight='bold')
ax.set_xlabel("number of eval epochs", fontsize=18)
ax.set_ylabel("average orientation error (radians)", fontsize=18)
ax.legend([
"1.0 soft resample rate",
"0.5 soft resample rate"
], loc='upper right', fontsize=16)
plt.show()
fig.savefig("diff_resample_eval_avg_step_orientation.png")
else:
# 0.5 box + 25 steps + 1.0 resample rl agent
box_path_1_0 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_0.5_box_25/eval/events.out.tfevents.1631716010.pearl8.18818.1.v2"
box_return_1_0 = np.array(getEventFileData(box_path_1_0)["Metrics/AverageStepPositionError"])
box_1_0 = ax.plot(box_return_1_0[:, 0], box_return_1_0[:, 1])
# 0.5 box + 25 steps + 0.5 resample rl agent
box_path_0_5 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_0.5_box_0.5/eval/events.out.tfevents.1633342690.pearl8.24069.1.v2"
box_return_0_5 = np.array(getEventFileData(box_path_0_5)["Metrics/AverageStepPositionError"])
box_0_5 = ax.plot(box_return_0_5[:, 0], box_return_0_5[:, 1])
ax.set_title('Average step position error for SAC agent with belief map (0.5 sampling box)', fontsize=22, weight='bold')
ax.set_xlabel("number of eval epochs", fontsize=18)
ax.set_ylabel("average position error (meters)", fontsize=18)
ax.legend([
"1.0 soft resample rate",
"0.5 soft resample rate"
], loc='upper right', fontsize=16)
plt.show()
fig.savefig("diff_resample_eval_avg_step_position.png")
def all_rl_eval_plts():
fig = plt.figure(figsize=(18, 12))
ax = fig.add_subplot(111)
plot = 'collision_penalty'
limit = 15
if plot == 'collision_penalty':
# 0.5 box + 25 steps rl agent
box_path_0_5_25 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_0.5_box_25/eval/events.out.tfevents.1631716010.pearl8.18818.1.v2"
box_0_5_mcp = np.array(getEventFileData(box_path_0_5_25)["Metrics/AverageStepCollisionPenality"])
# 1.0 box + 50 steps rl agent
box_path_1_0_50 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_1.0_box_50/eval/events.out.tfevents.1631961881.pearl2.22000.1.v2"
box_1_0_mcp = np.array(getEventFileData(box_path_1_0_50)["Metrics/AverageStepCollisionPenality"])
# 2.0 box + 50 steps rl agent
box_path_2_0_50 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_2.0_box_50/eval/events.out.tfevents.1632144090.pearl2.5531.1.v2"
box_2_0_mcp = np.array(getEventFileData(box_path_2_0_50)["Metrics/AverageStepCollisionPenality"])
# 2.5 box + 50 steps rl agent
box_path_2_5_50 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_2.5_box_50/eval/events.out.tfevents.1632349779.pearl8.24775.1.v2"
box_2_5_mcp = np.array(getEventFileData(box_path_2_5_50)["Metrics/AverageStepCollisionPenality"])
# full aprt + 50 steps rl agent
box_path_50 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_likelihood_rnd_50_new/eval/events.out.tfevents.1633162880.pearl8.3776.1.v2"
box_mcp = np.array(getEventFileData(box_path_50)["Metrics/AverageStepCollisionPenality"])
data = np.concatenate([
box_0_5_mcp[:limit, 1:2],
box_1_0_mcp[:limit, 1:2],
box_2_0_mcp[:limit, 1:2],
box_2_5_mcp[:limit, 1:2],
box_mcp[:limit, 1:2]
], axis=1)
ax.boxplot(data)
ax.set_title('Episode mean collision penalty for different start pose sampling area', fontsize=22, weight='bold')
# ax.set_xlabel("agent behavior", fontsize=16)
ax.set_ylabel("mean collision penalty (%)", fontsize=18)
# ax.set_ylim(-1.05, 0.05)
ax.set_xticklabels([
"1.0 Sampling Box",
"2.0 Sampling Box",
"4.0 Sampling Box",
"5.0 Sampling Box",
"Full Apartment",
], fontsize=18)
plt.show()
fig.savefig("rl_belief_eval_mcp.png")
elif plot == 'orientation_error':
# 0.5 box + 25 steps rl agent
box_path_0_5_25 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_0.5_box_25/eval/events.out.tfevents.1631716010.pearl8.18818.1.v2"
box_0_5_mso = np.array(getEventFileData(box_path_0_5_25)["Metrics/AverageStepOrientationError"])
# 1.0 box + 50 steps rl agent
box_path_1_0_50 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_1.0_box_50/eval/events.out.tfevents.1631961881.pearl2.22000.1.v2"
box_1_0_mso = np.array(getEventFileData(box_path_1_0_50)["Metrics/AverageStepOrientationError"])
# 2.0 box + 50 steps rl agent
box_path_2_0_50 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_2.0_box_50/eval/events.out.tfevents.1632144090.pearl2.5531.1.v2"
box_2_0_mso = np.array(getEventFileData(box_path_2_0_50)["Metrics/AverageStepOrientationError"])
# 2.5 box + 50 steps rl agent
box_path_2_5_50 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_2.5_box_50/eval/events.out.tfevents.1632349779.pearl8.24775.1.v2"
box_2_5_mso = np.array(getEventFileData(box_path_2_5_50)["Metrics/AverageStepOrientationError"])
# full aprt + 50 steps rl agent
box_path_50 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_likelihood_rnd_50_new/eval/events.out.tfevents.1633162880.pearl8.3776.1.v2"
box_mso = np.array(getEventFileData(box_path_50)["Metrics/AverageStepOrientationError"])
data = np.concatenate([
box_0_5_mso[:limit, 1:2],
box_1_0_mso[:limit, 1:2],
box_2_0_mso[:limit, 1:2],
box_2_5_mso[:limit, 1:2],
box_mso[:limit, 1:2]
], axis=1)
ax.boxplot(data)
ax.set_title('Episode mean orientation error for different start pose sampling area', fontsize=22, weight='bold')
# ax.set_xlabel("agent behavior", fontsize=16)
ax.set_ylabel("mean orientation error (radians)", fontsize=18)
# ax.set_ylim(-0.05, 0.15)
ax.set_xticklabels([
"1.0 Sampling Box",
"2.0 Sampling Box",
"4.0 Sampling Box",
"5.0 Sampling Box",
"Full Apartment",
], fontsize=18)
plt.show()
fig.savefig("rl_belief_eval_mso.png")
elif plot == 'position_error':
# 0.5 box + 25 steps rl agent
box_path_0_5_25 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_0.5_box_25/eval/events.out.tfevents.1631716010.pearl8.18818.1.v2"
box_0_5_msp = np.array(getEventFileData(box_path_0_5_25)["Metrics/AverageStepPositionError"])
# 1.0 box + 50 steps rl agent
box_path_1_0_50 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_1.0_box_50/eval/events.out.tfevents.1631961881.pearl2.22000.1.v2"
box_1_0_msp = np.array(getEventFileData(box_path_1_0_50)["Metrics/AverageStepPositionError"])
# 2.0 box + 50 steps rl agent
box_path_2_0_50 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_2.0_box_50/eval/events.out.tfevents.1632144090.pearl2.5531.1.v2"
box_2_0_msp = np.array(getEventFileData(box_path_2_0_50)["Metrics/AverageStepPositionError"])
# 2.5 box + 50 steps rl agent
box_path_2_5_50 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_2.5_box_50/eval/events.out.tfevents.1632349779.pearl8.24775.1.v2"
box_2_5_msp = np.array(getEventFileData(box_path_2_5_50)["Metrics/AverageStepPositionError"])
# full aprt + 50 steps rl agent
box_path_50 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_likelihood_rnd_50_new/eval/events.out.tfevents.1633162880.pearl8.3776.1.v2"
box_msp = np.array(getEventFileData(box_path_50)["Metrics/AverageStepPositionError"])
data = np.concatenate([
box_0_5_msp[:limit, 1:2],
box_1_0_msp[:limit, 1:2],
box_2_0_msp[:limit, 1:2],
box_2_5_msp[:limit, 1:2],
box_msp[:limit, 1:2]
], axis=1)
ax.boxplot(data)
ax.set_title('Episode mean position error for different start pose sampling area', fontsize=22, weight='bold')
# ax.set_xlabel("agent behavior", fontsize=16)
ax.set_ylabel("mean position error (meters)", fontsize=18)
# ax.set_ylim(-1.05, 0.05)
ax.set_xticklabels([
"1.0 Sampling Box",
"2.0 Sampling Box",
"4.0 Sampling Box",
"5.0 Sampling Box",
"Full Apartment",
], fontsize=18)
plt.show()
fig.savefig("rl_belief_eval_msp.png")
else:
# 0.5 box + 25 steps rl agent
box_path_0_5_25 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_0.5_box_25/eval/events.out.tfevents.1631716010.pearl8.18818.1.v2"
box_0_5_mer = np.array(getEventFileData(box_path_0_5_25)["Metrics/AverageReturn"])
# 1.0 box + 50 steps rl agent
box_path_1_0_50 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_1.0_box_50/eval/events.out.tfevents.1631961881.pearl2.22000.1.v2"
box_1_0_mer = np.array(getEventFileData(box_path_1_0_50)["Metrics/AverageReturn"])
# 2.0 box + 50 steps rl agent
box_path_2_0_50 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_2.0_box_50/eval/events.out.tfevents.1632144090.pearl2.5531.1.v2"
box_2_0_mer = np.array(getEventFileData(box_path_2_0_50)["Metrics/AverageReturn"])
# 2.5 box + 50 steps rl agent
box_path_2_5_50 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_2.5_box_50/eval/events.out.tfevents.1632349779.pearl8.24775.1.v2"
box_2_5_mer = np.array(getEventFileData(box_path_2_5_50)["Metrics/AverageReturn"])
# full aprt + 50 steps rl agent
box_path_50 = "/media/neo/robotics/August/17-09-2021/train_rl_uniform_likelihood_rnd_50_new/eval/events.out.tfevents.1633162880.pearl8.3776.1.v2"
box_mer = np.array(getEventFileData(box_path_50)["Metrics/AverageReturn"])
data = np.concatenate([
box_0_5_mer[:limit, 1:2],
box_1_0_mer[:limit, 1:2],
box_2_0_mer[:limit, 1:2],
box_2_5_mer[:limit, 1:2],
box_mer[:limit, 1:2]
], axis=1)
ax.boxplot(data)
ax.set_title('Episode mean return for different start pose sampling area', fontsize=22, weight='bold')
# ax.set_xlabel("agent behavior", fontsize=16)
ax.set_ylabel("return", fontsize=18)
# ax.set_ylim(-1.05, 0.05)
ax.set_xticklabels([
"1.0 Sampling Box",
"2.0 Sampling Box",
"4.0 Sampling Box",
"5.0 Sampling Box",
"Full Apartment",
], fontsize=18)
plt.show()
fig.savefig("rl_belief_eval_mer.png")
if __name__ == '__main__':
# generalization_plts()
# house3d_plts()
# igibson_plts()
# belief_plts()
# rl_train_eval_plts()
# rl_test_plts()
# diff_steps_plts()
diff_resample_plts()
# all_rl_eval_plts()
| 50.857319
| 185
| 0.658669
| 6,197
| 41,347
| 4.118283
| 0.047926
| 0.014263
| 0.070295
| 0.05517
| 0.899808
| 0.878453
| 0.816308
| 0.777046
| 0.776224
| 0.749383
| 0
| 0.115762
| 0.213607
| 41,347
| 812
| 186
| 50.919951
| 0.669137
| 0.110189
| 0
| 0.578755
| 0
| 0.128205
| 0.403458
| 0.285917
| 0
| 0
| 0
| 0
| 0
| 1
| 0.018315
| false
| 0
| 0.007326
| 0
| 0.027473
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
60c5948b435621c10b46244e429ad6569eb151a6
| 467
|
py
|
Python
|
SikuliScripts/Settings.sikuli/Settings.py
|
JabRef-628298/jabref-4.2
|
ebf5ff3e1a22ec5881de001a1fbc9214d3c1348d
|
[
"MIT"
] | null | null | null |
SikuliScripts/Settings.sikuli/Settings.py
|
JabRef-628298/jabref-4.2
|
ebf5ff3e1a22ec5881de001a1fbc9214d3c1348d
|
[
"MIT"
] | null | null | null |
SikuliScripts/Settings.sikuli/Settings.py
|
JabRef-628298/jabref-4.2
|
ebf5ff3e1a22ec5881de001a1fbc9214d3c1348d
|
[
"MIT"
] | null | null | null |
App.open("java -jar C:/JabRef-4.2-fat.jar")
wait(30)
click("1529632189350.png")
wait(2)
click("1529632296782.png")
wait(2)
click("1530899089323.png")
wait(2)
click("1530899105356.png")
wait(2)
click("1530899134798.png")
wait(2)
click("1530899120685.png")
wait(2)
click("1530899134798.png")
wait(2)
click("1530899165770.png")
wait(2)
click("1530899134798.png")
wait(2)
click("1530899192513.png")
wait(2)
click("1530899134798.png")
wait(2)
click("1530899212578.png")
| 16.678571
| 43
| 0.732334
| 70
| 467
| 4.885714
| 0.314286
| 0.225146
| 0.25731
| 0.418129
| 0.45614
| 0.45614
| 0.45614
| 0.45614
| 0.45614
| 0
| 0
| 0.390411
| 0.062099
| 467
| 27
| 44
| 17.296296
| 0.390411
| 0
| 0
| 0.6
| 0
| 0
| 0.505376
| 0.045161
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
880d638fbae590804313a52a4c59495504f87571
| 28,070
|
py
|
Python
|
tests/ope/test_meta.py
|
Tanvikapoor14/zr-obp
|
51eba00f0dda5c26c1fa6826f544c60de485da52
|
[
"Apache-2.0"
] | null | null | null |
tests/ope/test_meta.py
|
Tanvikapoor14/zr-obp
|
51eba00f0dda5c26c1fa6826f544c60de485da52
|
[
"Apache-2.0"
] | null | null | null |
tests/ope/test_meta.py
|
Tanvikapoor14/zr-obp
|
51eba00f0dda5c26c1fa6826f544c60de485da52
|
[
"Apache-2.0"
] | null | null | null |
from copy import deepcopy
from dataclasses import dataclass
import itertools
from typing import Dict
from typing import Optional
import numpy as np
import pandas as pd
from pandas.testing import assert_frame_equal
import pytest
from obp.ope import BaseOffPolicyEstimator
from obp.ope import DirectMethod
from obp.ope import OffPolicyEvaluation
from obp.types import BanditFeedback
from obp.utils import check_confidence_interval_arguments
mock_policy_value = 0.5
mock_confidence_interval = {
"mean": 0.5,
"95.0% CI (lower)": 0.3,
"95.0% CI (upper)": 0.7,
}
@dataclass
class DirectMethodMock(BaseOffPolicyEstimator):
"""Direct Method (DM) Mock."""
estimator_name: str = "dm"
def _estimate_round_rewards(
self,
position: np.ndarray,
action_dist: np.ndarray,
estimated_rewards_by_reg_model: np.ndarray,
**kwargs,
) -> float:
return 1
def estimate_policy_value(
self,
position: np.ndarray,
action_dist: np.ndarray,
estimated_rewards_by_reg_model: np.ndarray,
**kwargs,
) -> float:
"""Estimate the policy value of evaluation policy.
Parameters
----------
position: array-like, shape (n_rounds,)
Indices to differentiate positions in a recommendation interface where the actions are presented.
action_dist: array-like, shape (n_rounds, n_actions, len_list)
Action choice probabilities of the evaluation policy (can be deterministic), i.e., :math:`\\pi_e(a_i|x_i)`.
estimated_rewards_by_reg_model: array-like, shape (n_rounds, n_actions, len_list)
Estimated expected rewards given context, action, and position, i.e., :math:`\\hat{q}(x_i,a_i)`.
Returns
----------
mock_policy_value: float
"""
return mock_policy_value
def estimate_interval(
self,
position: np.ndarray,
action_dist: np.ndarray,
estimated_rewards_by_reg_model: np.ndarray,
alpha: float = 0.05,
n_bootstrap_samples: int = 10000,
random_state: Optional[int] = None,
**kwargs,
) -> Dict[str, float]:
"""Estimate the confidence interval of the policy value using bootstrap.
Parameters
----------
position: array-like, shape (n_rounds,)
Indices to differentiate positions in a recommendation interface where the actions are presented.
action_dist: array-like, shape (n_rounds, n_actions, len_list)
Action choice probabilities of the evaluation policy (can be deterministic), i.e., :math:`\\pi_e(a_i|x_i)`.
estimated_rewards_by_reg_model: array-like, shape (n_rounds, n_actions, len_list)
Estimated expected rewards given context, action, and position, i.e., :math:`\\hat{q}(x_i,a_i)`.
alpha: float, default=0.05
Significance level.
n_bootstrap_samples: int, default=10000
Number of resampling performed in bootstrap sampling.
random_state: int, default=None
Controls the random seed in bootstrap sampling.
Returns
----------
mock_confidence_interval: Dict[str, float]
Dictionary storing the estimated mean and upper-lower confidence bounds.
"""
check_confidence_interval_arguments(
alpha=alpha,
n_bootstrap_samples=n_bootstrap_samples,
random_state=random_state,
)
return mock_confidence_interval
@dataclass
class InverseProbabilityWeightingMock(BaseOffPolicyEstimator):
"""Inverse Probability Weighting (IPW) Mock."""
estimator_name: str = "ipw"
eps: float = 0.1
def _estimate_round_rewards(
self,
position: np.ndarray,
action_dist: np.ndarray,
estimated_rewards_by_reg_model: np.ndarray,
**kwargs,
) -> float:
return 1
def estimate_policy_value(
self,
reward: np.ndarray,
action: np.ndarray,
position: np.ndarray,
pscore: np.ndarray,
action_dist: np.ndarray,
estimated_pscore: Optional[np.ndarray] = None,
**kwargs,
) -> np.ndarray:
"""Estimate the policy value of evaluation policy.
Parameters
----------
reward: array-like, shape (n_rounds,)
Rewards observed for each data in logged bandit data, i.e., :math:`r_i`.
action: array-like, shape (n_rounds,)
Actions sampled by the logging/behavior policy for each data in logged bandit data, i.e., :math:`a_i`.
position: array-like, shape (n_rounds,)
Indices to differentiate positions in a recommendation interface where the actions are presented.
pscore: array-like, shape (n_rounds,)
Action choice probabilities of the logging/behavior policy (propensity scores), i.e., :math:`\\pi_b(a_i|x_i)`.
action_dist: array-like, shape (n_rounds, n_actions, len_list)
Action choice probabilities of the evaluation policy (can be deterministic), i.e., :math:`\\pi_e(a_i|x_i)`.
estimated_pscore: array-like, shape (n_rounds,), default=None
Estimated behavior policy (propensity scores), i.e., :math:`\\hat{\\pi}_b(a_i|x_i)`.
Returns
----------
mock_policy_value: float
"""
return mock_policy_value + self.eps
def estimate_interval(
self,
reward: np.ndarray,
action: np.ndarray,
position: np.ndarray,
pscore: np.ndarray,
action_dist: np.ndarray,
estimated_pscore: Optional[np.ndarray] = None,
alpha: float = 0.05,
n_bootstrap_samples: int = 10000,
random_state: Optional[int] = None,
**kwargs,
) -> Dict[str, float]:
"""Estimate the confidence interval of the policy value using bootstrap.
Parameters
----------
reward: array-like, shape (n_rounds,)
Rewards observed for each data in logged bandit data, i.e., :math:`r_i`.
action: array-like, shape (n_rounds,)
Actions sampled by the logging/behavior policy for each data in logged bandit data, i.e., :math:`a_i`.
position: array-like, shape (n_rounds,)
Indices to differentiate positions in a recommendation interface where the actions are presented.
pscore: array-like, shape (n_rounds,)
Action choice probabilities of the logging/behavior policy (propensity scores), i.e., :math:`\\pi_b(a_i|x_i)`.
action_dist: array-like, shape (n_rounds, n_actions, len_list)
Action choice probabilities
by the evaluation policy (can be deterministic), i.e., :math:`\\pi_e(a_i|x_i)`.
estimated_pscore: array-like, shape (n_rounds,), default=None
Estimated behavior policy (propensity scores), i.e., :math:`\\hat{\\pi}_b(a_i|x_i)`.
alpha: float, default=0.05
Significance level.
n_bootstrap_samples: int, default=10000
Number of resampling performed in bootstrap sampling.
random_state: int, default=None
Controls the random seed in bootstrap sampling.
Returns
----------
mock_confidence_interval: Dict[str, float]
Dictionary storing the estimated mean and upper-lower confidence bounds.
"""
return {k: v + self.eps for k, v in mock_confidence_interval.items()}
# define Mock instances
dm = DirectMethodMock()
ipw = InverseProbabilityWeightingMock(eps=0.01)
ipw2 = InverseProbabilityWeightingMock(eps=0.02)
ipw3 = InverseProbabilityWeightingMock(estimator_name="ipw3")
def test_meta_post_init(synthetic_bandit_feedback: BanditFeedback) -> None:
"""
Test the __post_init__ function
"""
# __post_init__ saves the latter estimator when the same estimator name is used
ope_ = OffPolicyEvaluation(
bandit_feedback=synthetic_bandit_feedback, ope_estimators=[ipw, ipw2]
)
assert ope_.ope_estimators_ == {"ipw": ipw2}, "__post_init__ returns a wrong value"
# __post_init__ can handle the same estimator if the estimator names are different
ope_ = OffPolicyEvaluation(
bandit_feedback=synthetic_bandit_feedback, ope_estimators=[ipw, ipw3]
)
assert ope_.ope_estimators_ == {
"ipw": ipw,
"ipw3": ipw3,
}, "__post_init__ returns a wrong value"
# __post__init__ raises RuntimeError when necessary_keys are not included in the bandit_feedback
necessary_keys = ["action", "position", "reward"]
for i in range(len(necessary_keys)):
for deleted_keys in itertools.combinations(necessary_keys, i + 1):
invalid_bandit_feedback_dict = {key: "_" for key in necessary_keys}
# delete
for k in deleted_keys:
del invalid_bandit_feedback_dict[k]
with pytest.raises(RuntimeError, match=r"Missing key*"):
_ = OffPolicyEvaluation(
bandit_feedback=invalid_bandit_feedback_dict, ope_estimators=[ipw]
)
def test_meta_estimated_rewards_by_reg_model_inputs(
synthetic_bandit_feedback: BanditFeedback,
) -> None:
"""
Test the estimate_policy_values/estimate_intervals functions wrt estimated_rewards_by_reg_model
"""
ope_ = OffPolicyEvaluation(
bandit_feedback=synthetic_bandit_feedback, ope_estimators=[DirectMethod()]
)
action_dist = np.zeros(
(synthetic_bandit_feedback["n_rounds"], synthetic_bandit_feedback["n_actions"])
)
with pytest.raises(ValueError):
ope_.estimate_policy_values(
action_dist=action_dist,
estimated_rewards_by_reg_model=None,
)
with pytest.raises(ValueError):
ope_.estimate_intervals(
action_dist=action_dist,
estimated_rewards_by_reg_model=None,
)
# action_dist, estimated_rewards_by_reg_model, description
invalid_input_of_create_estimator_inputs = [
(
np.zeros((2, 3, 4)),
np.zeros((2, 3, 3)),
"Expected `estimated_rewards_by_reg_model.shape",
),
(
np.zeros((2, 3, 4)),
{"dm": np.zeros((2, 3, 3))},
r"Expected `estimated_rewards_by_reg_model\[dm\].shape",
),
(
np.zeros((2, 3, 4)),
{"dm": None},
r"`estimated_rewards_by_reg_model\[dm\]` must be 3D array",
),
(np.zeros((2, 3)), None, "`action_dist` must be 3D array"),
("3", None, "`action_dist` must be 3D array"),
(None, None, "`action_dist` must be 3D array"),
]
valid_input_of_create_estimator_inputs = [
(
np.zeros((2, 3, 4)),
np.zeros((2, 3, 4)),
"same shape",
),
(
np.zeros((2, 3, 4)),
{"dm": np.zeros((2, 3, 4))},
"same shape",
),
(np.zeros((2, 3, 1)), None, "`estimated_rewards_by_reg_model` is None"),
]
@pytest.mark.parametrize(
"action_dist, estimated_rewards_by_reg_model, description",
invalid_input_of_create_estimator_inputs,
)
def test_meta_create_estimator_inputs_using_invalid_input_data(
action_dist,
estimated_rewards_by_reg_model,
description: str,
synthetic_bandit_feedback: BanditFeedback,
) -> None:
"""
Test the _create_estimator_inputs using valid data
"""
ope_ = OffPolicyEvaluation(
bandit_feedback=synthetic_bandit_feedback, ope_estimators=[ipw]
)
# raise ValueError when the shape of two arrays are different
with pytest.raises(ValueError, match=f"{description}*"):
_ = ope_._create_estimator_inputs(
action_dist=action_dist,
estimated_rewards_by_reg_model=estimated_rewards_by_reg_model,
)
# _create_estimator_inputs function is called in the following functions
with pytest.raises(ValueError, match=f"{description}*"):
_ = ope_.estimate_policy_values(
action_dist=action_dist,
estimated_rewards_by_reg_model=estimated_rewards_by_reg_model,
)
with pytest.raises(ValueError, match=f"{description}*"):
_ = ope_.estimate_intervals(
action_dist=action_dist,
estimated_rewards_by_reg_model=estimated_rewards_by_reg_model,
)
with pytest.raises(ValueError, match=f"{description}*"):
_ = ope_.summarize_off_policy_estimates(
action_dist=action_dist,
estimated_rewards_by_reg_model=estimated_rewards_by_reg_model,
)
with pytest.raises(ValueError, match=f"{description}*"):
_ = ope_.evaluate_performance_of_estimators(
ground_truth_policy_value=0.1,
action_dist=action_dist,
estimated_rewards_by_reg_model=estimated_rewards_by_reg_model,
)
with pytest.raises(ValueError, match=f"{description}*"):
_ = ope_.summarize_estimators_comparison(
ground_truth_policy_value=0.1,
action_dist=action_dist,
estimated_rewards_by_reg_model=estimated_rewards_by_reg_model,
)
@pytest.mark.parametrize(
"action_dist, estimated_rewards_by_reg_model, description",
valid_input_of_create_estimator_inputs,
)
def test_meta_create_estimator_inputs_using_valid_input_data(
action_dist,
estimated_rewards_by_reg_model,
description: str,
synthetic_bandit_feedback: BanditFeedback,
) -> None:
"""
Test the _create_estimator_inputs using invalid data
"""
ope_ = OffPolicyEvaluation(
bandit_feedback=synthetic_bandit_feedback, ope_estimators=[ipw]
)
estimator_inputs = ope_._create_estimator_inputs(
action_dist=action_dist,
estimated_rewards_by_reg_model=estimated_rewards_by_reg_model,
)
assert set(estimator_inputs.keys()) == set(["ipw"])
assert set(estimator_inputs["ipw"].keys()) == set(
[
"reward",
"action",
"pscore",
"position",
"action_dist",
"estimated_rewards_by_reg_model",
"estimated_pscore",
"estimated_importance_weights",
]
), f"Invalid response of _create_estimator_inputs (test case: {description})"
# _create_estimator_inputs function is called in the following functions
_ = ope_.estimate_policy_values(
action_dist=action_dist,
estimated_rewards_by_reg_model=estimated_rewards_by_reg_model,
)
_ = ope_.estimate_intervals(
action_dist=action_dist,
estimated_rewards_by_reg_model=estimated_rewards_by_reg_model,
)
_ = ope_.summarize_off_policy_estimates(
action_dist=action_dist,
estimated_rewards_by_reg_model=estimated_rewards_by_reg_model,
)
_ = ope_.evaluate_performance_of_estimators(
ground_truth_policy_value=0.1,
action_dist=action_dist,
estimated_rewards_by_reg_model=estimated_rewards_by_reg_model,
)
_ = ope_.summarize_estimators_comparison(
ground_truth_policy_value=0.1,
action_dist=action_dist,
estimated_rewards_by_reg_model=estimated_rewards_by_reg_model,
)
@pytest.mark.parametrize(
"action_dist, estimated_rewards_by_reg_model, description",
valid_input_of_create_estimator_inputs[:-1],
)
def test_meta_estimate_policy_values_using_valid_input_data(
action_dist,
estimated_rewards_by_reg_model,
description: str,
synthetic_bandit_feedback: BanditFeedback,
) -> None:
"""
Test the response of estimate_policy_values using valid data
"""
# single ope estimator
ope_ = OffPolicyEvaluation(
bandit_feedback=synthetic_bandit_feedback, ope_estimators=[dm]
)
ope_.is_model_dependent = True
assert ope_.estimate_policy_values(
action_dist=action_dist,
estimated_rewards_by_reg_model=estimated_rewards_by_reg_model,
) == {
"dm": mock_policy_value
}, "OffPolicyEvaluation.estimate_policy_values ([DirectMethod]) returns a wrong value"
# multiple ope estimators
ope_ = OffPolicyEvaluation(
bandit_feedback=synthetic_bandit_feedback, ope_estimators=[dm, ipw]
)
ope_.is_model_dependent = True
assert ope_.estimate_policy_values(
action_dist=action_dist,
estimated_rewards_by_reg_model=estimated_rewards_by_reg_model,
) == {
"dm": mock_policy_value,
"ipw": mock_policy_value + ipw.eps,
}, "OffPolicyEvaluation.estimate_policy_values ([DirectMethod, IPW]) returns a wrong value"
# alpha, n_bootstrap_samples, random_state, err, description
invalid_input_of_estimate_intervals = [
(
0.05,
100,
"s",
ValueError,
"'s' cannot be used to seed a numpy.random.RandomState instance",
),
(0.05, -1, 1, ValueError, "n_bootstrap_samples == -1, must be >= 1"),
(
0.05,
"s",
1,
TypeError,
"n_bootstrap_samples must be an instance of <class 'int'>, not <class 'str'>",
),
(-1.0, 1, 1, ValueError, "alpha == -1.0, must be >= 0.0"),
(2.0, 1, 1, ValueError, "alpha == 2.0, must be <= 1.0"),
(
"0",
1,
1,
TypeError,
"alpha must be an instance of <class 'float'>, not <class 'str'>",
),
]
valid_input_of_estimate_intervals = [
(0.05, 100, 1, "random_state is 1"),
(0.05, 1, 1, "n_bootstrap_samples is 1"),
]
@pytest.mark.parametrize(
"action_dist, estimated_rewards_by_reg_model, description_1",
valid_input_of_create_estimator_inputs,
)
@pytest.mark.parametrize(
"alpha, n_bootstrap_samples, random_state, err, description_2",
invalid_input_of_estimate_intervals,
)
def test_meta_estimate_intervals_using_invalid_input_data(
action_dist,
estimated_rewards_by_reg_model,
description_1: str,
alpha,
n_bootstrap_samples,
random_state,
err,
description_2: str,
synthetic_bandit_feedback: BanditFeedback,
) -> None:
"""
Test the response of estimate_intervals using invalid data
"""
ope_ = OffPolicyEvaluation(
bandit_feedback=synthetic_bandit_feedback, ope_estimators=[dm]
)
with pytest.raises(err, match=f"{description_2}*"):
_ = ope_.estimate_intervals(
action_dist=action_dist,
estimated_rewards_by_reg_model=estimated_rewards_by_reg_model,
alpha=alpha,
n_bootstrap_samples=n_bootstrap_samples,
random_state=random_state,
)
# estimate_intervals function is called in summarize_off_policy_estimates
with pytest.raises(err, match=f"{description_2}*"):
_ = ope_.summarize_off_policy_estimates(
action_dist=action_dist,
estimated_rewards_by_reg_model=estimated_rewards_by_reg_model,
alpha=alpha,
n_bootstrap_samples=n_bootstrap_samples,
random_state=random_state,
)
@pytest.mark.parametrize(
"action_dist, estimated_rewards_by_reg_model, description_1",
valid_input_of_create_estimator_inputs,
)
@pytest.mark.parametrize(
"alpha, n_bootstrap_samples, random_state, description_2",
valid_input_of_estimate_intervals,
)
def test_meta_estimate_intervals_using_valid_input_data(
action_dist,
estimated_rewards_by_reg_model,
description_1: str,
alpha: float,
n_bootstrap_samples: int,
random_state: int,
description_2: str,
synthetic_bandit_feedback: BanditFeedback,
) -> None:
"""
Test the response of estimate_intervals using valid data
"""
# single ope estimator
ope_ = OffPolicyEvaluation(
bandit_feedback=synthetic_bandit_feedback, ope_estimators=[dm]
)
assert ope_.estimate_intervals(
action_dist=action_dist,
estimated_rewards_by_reg_model=estimated_rewards_by_reg_model,
alpha=alpha,
n_bootstrap_samples=n_bootstrap_samples,
random_state=random_state,
) == {
"dm": mock_confidence_interval
}, "OffPolicyEvaluation.estimate_intervals ([DirectMethod]) returns a wrong value"
# multiple ope estimators
ope_ = OffPolicyEvaluation(
bandit_feedback=synthetic_bandit_feedback, ope_estimators=[dm, ipw]
)
assert ope_.estimate_intervals(
action_dist=action_dist,
estimated_rewards_by_reg_model=estimated_rewards_by_reg_model,
alpha=alpha,
n_bootstrap_samples=n_bootstrap_samples,
random_state=random_state,
) == {
"dm": mock_confidence_interval,
"ipw": {k: v + ipw.eps for k, v in mock_confidence_interval.items()},
}, "OffPolicyEvaluation.estimate_intervals ([DirectMethod, IPW]) returns a wrong value"
@pytest.mark.parametrize(
"action_dist, estimated_rewards_by_reg_model, description_1",
valid_input_of_create_estimator_inputs,
)
@pytest.mark.parametrize(
"alpha, n_bootstrap_samples, random_state, description_2",
valid_input_of_estimate_intervals,
)
def test_meta_summarize_off_policy_estimates(
action_dist,
estimated_rewards_by_reg_model,
description_1: str,
alpha: float,
n_bootstrap_samples: int,
random_state: int,
description_2: str,
synthetic_bandit_feedback: BanditFeedback,
) -> None:
"""
Test the response of summarize_off_policy_estimates using valid data
"""
ope_ = OffPolicyEvaluation(
bandit_feedback=synthetic_bandit_feedback, ope_estimators=[ipw, ipw3]
)
value, interval = ope_.summarize_off_policy_estimates(
action_dist=action_dist,
estimated_rewards_by_reg_model=estimated_rewards_by_reg_model,
alpha=alpha,
n_bootstrap_samples=n_bootstrap_samples,
random_state=random_state,
)
expected_value = pd.DataFrame(
{
"ipw": mock_policy_value + ipw.eps,
"ipw3": mock_policy_value + ipw3.eps,
},
index=["estimated_policy_value"],
).T
expected_value["relative_estimated_policy_value"] = (
expected_value["estimated_policy_value"]
/ synthetic_bandit_feedback["reward"].mean()
)
expected_interval = pd.DataFrame(
{
"ipw": {k: v + ipw.eps for k, v in mock_confidence_interval.items()},
"ipw3": {k: v + ipw3.eps for k, v in mock_confidence_interval.items()},
}
).T
assert_frame_equal(value, expected_value), "Invalid summarization (policy value)"
assert_frame_equal(interval, expected_interval), "Invalid summarization (interval)"
# check relative estimated policy value when the average of bandit_feedback["reward"] is zero
zero_reward_bandit_feedback = deepcopy(synthetic_bandit_feedback)
zero_reward_bandit_feedback["reward"] = np.zeros(
zero_reward_bandit_feedback["reward"].shape[0]
)
ope_ = OffPolicyEvaluation(
bandit_feedback=zero_reward_bandit_feedback, ope_estimators=[ipw, ipw3]
)
value, _ = ope_.summarize_off_policy_estimates(
action_dist=action_dist,
estimated_rewards_by_reg_model=estimated_rewards_by_reg_model,
alpha=alpha,
n_bootstrap_samples=n_bootstrap_samples,
random_state=random_state,
)
expected_value = pd.DataFrame(
{
"ipw": mock_policy_value + ipw.eps,
"ipw3": mock_policy_value + ipw3.eps,
},
index=["estimated_policy_value"],
).T
expected_value["relative_estimated_policy_value"] = np.nan
assert_frame_equal(value, expected_value), "Invalid summarization (policy value)"
invalid_input_of_evaluation_performance_of_estimators = [
("foo", 0.3, ValueError, "`metric` must be either 'relative-ee' or 'se'"),
(
"se",
1,
TypeError,
"ground_truth_policy_value must be an instance of <class 'float'>, not <class 'int'>.",
),
(
"se",
"a",
TypeError,
"ground_truth_policy_value must be an instance of <class 'float'>, not <class 'str'>.",
),
(
"relative-ee",
0.0,
ValueError,
"`ground_truth_policy_value` must be non-zero when metric is relative-ee",
),
]
valid_input_of_evaluation_performance_of_estimators = [
("se", 0.0, "metric is se and ground_truth_policy_value is 0.0"),
("relative-ee", 1.0, "metric is relative-ee and ground_truth_policy_value is 1.0"),
]
@pytest.mark.parametrize(
"action_dist, estimated_rewards_by_reg_model, description_1",
valid_input_of_create_estimator_inputs,
)
@pytest.mark.parametrize(
"metric, ground_truth_policy_value, err, description_2",
invalid_input_of_evaluation_performance_of_estimators,
)
def test_meta_evaluate_performance_of_estimators_using_invalid_input_data(
action_dist,
estimated_rewards_by_reg_model,
description_1: str,
metric,
ground_truth_policy_value,
err,
description_2: str,
synthetic_bandit_feedback: BanditFeedback,
) -> None:
"""
Test the response of evaluate_performance_of_estimators using invalid data
"""
ope_ = OffPolicyEvaluation(
bandit_feedback=synthetic_bandit_feedback, ope_estimators=[dm]
)
with pytest.raises(err, match=f"{description_2}*"):
_ = ope_.evaluate_performance_of_estimators(
ground_truth_policy_value=ground_truth_policy_value,
estimated_rewards_by_reg_model=estimated_rewards_by_reg_model,
action_dist=action_dist,
metric=metric,
)
# estimate_intervals function is called in summarize_off_policy_estimates
with pytest.raises(err, match=f"{description_2}*"):
_ = ope_.summarize_estimators_comparison(
ground_truth_policy_value=ground_truth_policy_value,
estimated_rewards_by_reg_model=estimated_rewards_by_reg_model,
action_dist=action_dist,
metric=metric,
)
@pytest.mark.parametrize(
"action_dist, estimated_rewards_by_reg_model, description_1",
valid_input_of_create_estimator_inputs,
)
@pytest.mark.parametrize(
"metric, ground_truth_policy_value, description_2",
valid_input_of_evaluation_performance_of_estimators,
)
def test_meta_evaluate_performance_of_estimators_using_valid_input_data(
action_dist,
estimated_rewards_by_reg_model,
description_1: str,
metric,
ground_truth_policy_value,
description_2: str,
synthetic_bandit_feedback: BanditFeedback,
) -> None:
"""
Test the response of evaluate_performance_of_estimators using valid data
"""
if metric == "relative-ee":
# calculate relative-ee
eval_metric_ope_dict = {
"ipw": np.abs(
(mock_policy_value + ipw.eps - ground_truth_policy_value)
/ ground_truth_policy_value
),
"ipw3": np.abs(
(mock_policy_value + ipw3.eps - ground_truth_policy_value)
/ ground_truth_policy_value
),
}
else:
# calculate se
eval_metric_ope_dict = {
"ipw": (mock_policy_value + ipw.eps - ground_truth_policy_value) ** 2,
"ipw3": (mock_policy_value + ipw3.eps - ground_truth_policy_value) ** 2,
}
# check performance estimators
ope_ = OffPolicyEvaluation(
bandit_feedback=synthetic_bandit_feedback, ope_estimators=[ipw, ipw3]
)
performance = ope_.evaluate_performance_of_estimators(
ground_truth_policy_value=ground_truth_policy_value,
estimated_rewards_by_reg_model=estimated_rewards_by_reg_model,
action_dist=action_dist,
metric=metric,
)
for k, v in performance.items():
assert k in eval_metric_ope_dict, "Invalid key of performance response"
assert v == eval_metric_ope_dict[k], "Invalid value of performance response"
performance_df = ope_.summarize_estimators_comparison(
ground_truth_policy_value=ground_truth_policy_value,
estimated_rewards_by_reg_model=estimated_rewards_by_reg_model,
action_dist=action_dist,
metric=metric,
)
assert_frame_equal(
performance_df, pd.DataFrame(eval_metric_ope_dict, index=[metric]).T
), "Invalid summarization (performance)"
| 34.912935
| 122
| 0.676487
| 3,356
| 28,070
| 5.281585
| 0.078665
| 0.047391
| 0.081241
| 0.094781
| 0.822341
| 0.802877
| 0.775458
| 0.755148
| 0.735176
| 0.709788
| 0
| 0.009934
| 0.232561
| 28,070
| 803
| 123
| 34.956413
| 0.812877
| 0.200285
| 0
| 0.590219
| 0
| 0
| 0.141285
| 0.044891
| 0
| 0
| 0
| 0
| 0.025295
| 1
| 0.026981
| false
| 0
| 0.025295
| 0.003373
| 0.070826
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
714bf0bb4dfbf2692ae248237d5cc95dc180bec8
| 45
|
py
|
Python
|
hello.py
|
client366932/runpy
|
b53b730b4674993de5c9f8173a78063f00629f5c
|
[
"MIT"
] | null | null | null |
hello.py
|
client366932/runpy
|
b53b730b4674993de5c9f8173a78063f00629f5c
|
[
"MIT"
] | null | null | null |
hello.py
|
client366932/runpy
|
b53b730b4674993de5c9f8173a78063f00629f5c
|
[
"MIT"
] | null | null | null |
def sumOf(a, b):
return int(a) + int(b)
| 11.25
| 26
| 0.533333
| 9
| 45
| 2.666667
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.266667
| 45
| 3
| 27
| 15
| 0.727273
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 6
|
71c95943f63c9c4ac03916878be2c50d73e6945f
| 32
|
py
|
Python
|
ddf_utils/chef/hy_mod/__init__.py
|
semio/ddf_utils
|
e10c4cb6dc7722415a5863579a552cc7b7e3668d
|
[
"MIT"
] | 2
|
2016-11-23T12:28:15.000Z
|
2019-03-04T16:06:25.000Z
|
ddf_utils/chef/hy_mod/__init__.py
|
semio/ddf_utils
|
e10c4cb6dc7722415a5863579a552cc7b7e3668d
|
[
"MIT"
] | 124
|
2016-07-14T13:39:41.000Z
|
2021-12-24T01:45:23.000Z
|
ddf_utils/chef/hy_mod/__init__.py
|
semio/ddf_utils
|
e10c4cb6dc7722415a5863579a552cc7b7e3668d
|
[
"MIT"
] | 1
|
2016-11-30T23:42:56.000Z
|
2016-11-30T23:42:56.000Z
|
import hy
from .funcs import *
| 8
| 20
| 0.71875
| 5
| 32
| 4.6
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.21875
| 32
| 3
| 21
| 10.666667
| 0.92
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 6
|
e0803e7d49f8bdc60463eb9d540500ec32dc14a3
| 27
|
py
|
Python
|
timer/__init__.py
|
jlyons871/Tax-Calculator
|
77f3f67ae77f12ea83e15e138e9fc0ab9fd5cd1d
|
[
"MIT"
] | null | null | null |
timer/__init__.py
|
jlyons871/Tax-Calculator
|
77f3f67ae77f12ea83e15e138e9fc0ab9fd5cd1d
|
[
"MIT"
] | null | null | null |
timer/__init__.py
|
jlyons871/Tax-Calculator
|
77f3f67ae77f12ea83e15e138e9fc0ab9fd5cd1d
|
[
"MIT"
] | null | null | null |
from .timer_utils import *
| 13.5
| 26
| 0.777778
| 4
| 27
| 5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.148148
| 27
| 1
| 27
| 27
| 0.869565
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 6
|
e08c2b9c42442707ae8e4ad725c7884fa3399dca
| 129
|
py
|
Python
|
io_scene_vrm/misc/version.py
|
Raptor54/VRM_IMPORTER_for_Blender
|
855081e503351a82fd466de48d6b9c0be95c41ee
|
[
"MIT"
] | null | null | null |
io_scene_vrm/misc/version.py
|
Raptor54/VRM_IMPORTER_for_Blender
|
855081e503351a82fd466de48d6b9c0be95c41ee
|
[
"MIT"
] | null | null | null |
io_scene_vrm/misc/version.py
|
Raptor54/VRM_IMPORTER_for_Blender
|
855081e503351a82fd466de48d6b9c0be95c41ee
|
[
"MIT"
] | null | null | null |
# To avoid circular reference
def version() -> str:
return __import__(".".join(__name__.split(".")[:-3])).bl_info["version"]
| 32.25
| 76
| 0.658915
| 16
| 129
| 4.75
| 0.9375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.008772
| 0.116279
| 129
| 3
| 77
| 43
| 0.657895
| 0.209302
| 0
| 0
| 0
| 0
| 0.09
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| true
| 0
| 0.5
| 0.5
| 1.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 1
| 0
| 0
|
0
| 6
|
e0b8963ee3891df19281176c034ba648191335ed
| 4,730
|
py
|
Python
|
tests/test_decorators.py
|
mgurdal/aegis
|
c57d1b4c5cbd9acc9a8a0d321d108319d8e0ece4
|
[
"Apache-2.0"
] | 8
|
2019-05-09T20:05:01.000Z
|
2022-03-30T09:39:08.000Z
|
tests/test_decorators.py
|
mgurdal/aegis
|
c57d1b4c5cbd9acc9a8a0d321d108319d8e0ece4
|
[
"Apache-2.0"
] | 154
|
2019-08-18T17:49:15.000Z
|
2022-03-27T13:02:13.000Z
|
tests/test_decorators.py
|
mgurdal/aiohttp_auth
|
c57d1b4c5cbd9acc9a8a0d321d108319d8e0ece4
|
[
"Apache-2.0"
] | 1
|
2021-12-30T21:35:30.000Z
|
2021-12-30T21:35:30.000Z
|
from unittest.mock import patch
import pytest
from aiohttp import web
from aiohttp.test_utils import make_mocked_request
from aegis import decorators
from asynctest import CoroutineMock
async def test_login_required_raises_TypeError_on_invalid_request():
with pytest.raises(TypeError) as error:
@decorators.login_required
async def test_view(request):
return web.json_response({})
invalid_request = object()
await test_view(invalid_request)
assert str(error.value) == f"Invalid Type '{type(invalid_request)}'"
async def test_login_required_handles_no_user():
with patch("aegis.decorators.AuthRequiredException.make_response") as auth_required:
@decorators.login_required
async def test_view(request):
return web.json_response({})
stub_request = make_mocked_request("GET", "/", headers={"authorization": "x"})
auth_required.return_value.status = 401
response = test_view(stub_request)
assert response.status == 401
auth_required.assert_called_once_with(stub_request)
async def test_login_required_returns_401_if_request_user_is_invalid():
with patch("aegis.decorators.AuthRequiredException.make_response") as auth_required:
@decorators.login_required
async def test_view(request):
return web.json_response({})
stub_request = make_mocked_request("GET", "/", headers={"authorization": "x"})
stub_request.user = None
auth_required.return_value.status = 401
response = test_view(stub_request)
assert response.status == 401
auth_required.assert_called_once_with(stub_request)
async def test_login_required_returns_200_if_request_has_user():
@decorators.login_required
async def test_view(request):
return web.json_response({})
stub_request = make_mocked_request("GET", "/", headers={"authorization": "x"})
stub_request.user = {"id": 7}
response = await test_view(stub_request)
assert response.status == 200
async def test_get_permissions_cannot_be_initialized_without_parameters():
with pytest.raises(AssertionError) as error:
decorators.permissions()
assert str(error.value) == "Cannot be used without any permission!"
async def test_permissions_raises_TypeError_on_invalid_request():
with pytest.raises(TypeError) as error:
@decorators.permissions("test_permission")
async def test_view(request):
return web.json_response({})
invalid_request = object()
await test_view(invalid_request)
assert str(error.value) == f"Invalid Type '{type(invalid_request)}'"
async def test_permissions_returns_403_if_not_has_permisions():
with patch("aegis.decorators.ForbiddenException.make_response") as forbidden:
required_permissions = ("test_permission",)
provided_permissions = ()
@decorators.permissions(*required_permissions, algorithm="any")
async def test_view(request):
return web.json_response({})
stub_request = make_mocked_request("GET", "/", headers={"authorization": "x"})
authenticator = CoroutineMock()
stub_request.app["authenticator"] = authenticator
authenticator.get_permissions = CoroutineMock(return_value=provided_permissions)
authenticator.check_permissions = CoroutineMock(return_value=False)
await test_view(stub_request)
assert forbidden.awaited_once_with(stub_request)
assert authenticator.get_permissions.awaited_once_with(stub_request)
assert authenticator.get_permissions.awaited_once_with(
provided_permissions, required_permissions, "any"
)
async def test_permissions_awaits_view_on_happy_path():
with patch("aegis.decorators.ForbiddenException.make_response") as forbidden:
required_permissions = ("test_permission",)
provided_permissions = ()
@decorators.permissions(*required_permissions)
async def test_view(request):
return web.json_response({})
stub_request = make_mocked_request("GET", "/", headers={"authorization": "x"})
authenticator = CoroutineMock()
stub_request.app["authenticator"] = authenticator
authenticator.get_permissions = CoroutineMock(return_value=provided_permissions)
authenticator.check_permissions = CoroutineMock(return_value=True)
await test_view(stub_request)
assert authenticator.get_permissions.awaited_once_with(stub_request)
assert authenticator.get_permissions.awaited_once_with(
provided_permissions, required_permissions, "any"
)
assert forbidden.not_awaited
| 36.10687
| 88
| 0.721564
| 528
| 4,730
| 6.13447
| 0.164773
| 0.064526
| 0.055573
| 0.034579
| 0.817536
| 0.809818
| 0.790985
| 0.778944
| 0.778944
| 0.778944
| 0
| 0.006526
| 0.190063
| 4,730
| 130
| 89
| 36.384615
| 0.838945
| 0
| 0
| 0.67033
| 0
| 0
| 0.103171
| 0.053277
| 0
| 0
| 0
| 0
| 0.164835
| 1
| 0
| false
| 0
| 0.065934
| 0
| 0.142857
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
e0bb50b4f4eb10ba219523e87886740d66bb2cc5
| 3,184
|
py
|
Python
|
tests/test_profile.py
|
MarieEngel/message_board
|
f5dbc5cf592d3396a2f9358ad25e64a2d858569c
|
[
"MIT"
] | null | null | null |
tests/test_profile.py
|
MarieEngel/message_board
|
f5dbc5cf592d3396a2f9358ad25e64a2d858569c
|
[
"MIT"
] | null | null | null |
tests/test_profile.py
|
MarieEngel/message_board
|
f5dbc5cf592d3396a2f9358ad25e64a2d858569c
|
[
"MIT"
] | 1
|
2022-03-31T21:59:29.000Z
|
2022-03-31T21:59:29.000Z
|
from django.test import TestCase
class ProfileTestCase(TestCase):
fixtures = [
"user_test.json",
"profile_test.json",
"category_test.json",
"post_test.json",
"comment_test.json",
]
def test_register(self):
response = self.client.get("/user/register/")
self.assertEqual(response.status_code, 200)
response = self.client.post(
"/user/register/",
{
"username": "new_user",
"password1": "new_password",
"password2": "new_password",
"email": "[email protected]",
"postcode": "8305",
"city": "Berlin",
"_save": "SAVE",
},
)
self.assertRedirects(response, "/user/login/")
response = self.client.get("/")
self.assertRedirects(response, "/user/login/?next=/")
self.client.login(username="new_user", password="new_password")
response = self.client.get("/")
self.assertContains(response, "Has anybody seen my cow")
def test_not_register_with_false_postcode(self):
response = self.client.get("/user/register/")
self.assertEqual(response.status_code, 200)
response = self.client.post(
"/user/register/",
{
"username": "new_user",
"password1": "new_password",
"password2": "new_password",
"email": "[email protected]",
"postcode": "8303",
"city": "Berlin",
"_save": "SAVE",
},
)
self.assertContains(response, "Only people from island Samsø can register")
def test_create_profile_with_registration(self):
response = self.client.get("/user/register/")
self.assertEqual(response.status_code, 200)
response = self.client.post(
"/user/register/",
{
"username": "new_user",
"password1": "new_password",
"password2": "new_password",
"email": "[email protected]",
"postcode": "8305",
"city": "Berlin",
"_save": "SAVE",
},
)
self.assertRedirects(response, "/user/login/")
response = self.client.get("/user/profile/")
self.assertRedirects(response, "/user/login/?next=/user/profile/")
self.client.login(username="new_user", password="new_password")
response = self.client.get("/user/profile/")
self.assertContains(response, "new_user")
def test_delete_profile(self):
self.client.login(username="anna", password="password")
response = self.client.get("/user/profile/")
self.assertContains(response, "anna")
response = self.client.post("/user/delete/")
response = self.client.get("/user/profile/")
self.assertRedirects(response, "/user/login/?next=/user/profile/")
self.client.login(username="anna", password="password")
response = self.client.get("/user/profile/")
self.assertRedirects(response, "/user/login/?next=/user/profile/")
| 37.904762
| 83
| 0.553078
| 302
| 3,184
| 5.708609
| 0.192053
| 0.104408
| 0.146172
| 0.12181
| 0.788863
| 0.758701
| 0.735499
| 0.735499
| 0.735499
| 0.735499
| 0
| 0.012081
| 0.298053
| 3,184
| 83
| 84
| 38.361446
| 0.759284
| 0
| 0
| 0.623377
| 0
| 0
| 0.269786
| 0.030151
| 0
| 0
| 0
| 0
| 0.168831
| 1
| 0.051948
| false
| 0.12987
| 0.012987
| 0
| 0.090909
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 6
|
e0dd059c85b929458f5d10d8a403b7d755078cef
| 42
|
py
|
Python
|
biasedrandom/__init__.py
|
Berserkware/biasedrandom
|
37b5d164df7f8f0cbff93d42b02d2d604452cca5
|
[
"MIT"
] | 2
|
2022-03-06T05:16:33.000Z
|
2022-03-06T22:37:18.000Z
|
biasedrandom/__init__.py
|
Berserkware/biasedrandom
|
37b5d164df7f8f0cbff93d42b02d2d604452cca5
|
[
"MIT"
] | null | null | null |
biasedrandom/__init__.py
|
Berserkware/biasedrandom
|
37b5d164df7f8f0cbff93d42b02d2d604452cca5
|
[
"MIT"
] | null | null | null |
from biasedrandom.main import biasedrandom
| 42
| 42
| 0.904762
| 5
| 42
| 7.6
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.071429
| 42
| 1
| 42
| 42
| 0.974359
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 6
|
e804ab36145a7e862e967c832715ed471f3b07e4
| 162,080
|
py
|
Python
|
test/test_esapi.py
|
niooss-ledger/tpm2-pytss
|
f748de7993ff6b39900ba4a0332f893eba19194f
|
[
"BSD-2-Clause"
] | null | null | null |
test/test_esapi.py
|
niooss-ledger/tpm2-pytss
|
f748de7993ff6b39900ba4a0332f893eba19194f
|
[
"BSD-2-Clause"
] | null | null | null |
test/test_esapi.py
|
niooss-ledger/tpm2-pytss
|
f748de7993ff6b39900ba4a0332f893eba19194f
|
[
"BSD-2-Clause"
] | null | null | null |
#!/usr/bin/python3 -u
"""
SPDX-License-Identifier: BSD-2
"""
import unittest
from tpm2_pytss import *
from .TSS2_BaseTest import TSS2_EsapiTest
class TestEsys(TSS2_EsapiTest):
def test_get_random(self):
r = self.ectx.get_random(5)
self.assertEqual(len(r), 5)
with self.assertRaises(TypeError):
self.ectx.get_random("foo")
with self.assertRaises(TypeError):
self.ectx.get_random(5, session1="baz")
with self.assertRaises(TypeError):
self.ectx.get_random(5, session2=object())
with self.assertRaises(TypeError):
self.ectx.get_random(5, session3=56.7)
def test_create_primary(self):
inSensitive = TPM2B_SENSITIVE_CREATE()
inPublic = TPM2B_PUBLIC()
outsideInfo = TPM2B_DATA()
creationPCR = TPML_PCR_SELECTION()
inPublic.publicArea.type = TPM2_ALG.ECC
inPublic.publicArea.nameAlg = TPM2_ALG.SHA1
inPublic.publicArea.objectAttributes = (
TPMA_OBJECT.USERWITHAUTH
| TPMA_OBJECT.SIGN_ENCRYPT
| TPMA_OBJECT.RESTRICTED
| TPMA_OBJECT.FIXEDTPM
| TPMA_OBJECT.FIXEDPARENT
| TPMA_OBJECT.SENSITIVEDATAORIGIN
)
inPublic.publicArea.parameters.eccDetail.scheme.scheme = TPM2_ALG.ECDSA
inPublic.publicArea.parameters.eccDetail.scheme.details.ecdsa.hashAlg = (
TPM2_ALG.SHA256
)
inPublic.publicArea.parameters.eccDetail.symmetric.algorithm = TPM2_ALG.NULL
inPublic.publicArea.parameters.eccDetail.kdf.scheme = TPM2_ALG.NULL
inPublic.publicArea.parameters.eccDetail.curveID = TPM2_ECC.NIST_P256
handle, public, creation_data, digest, ticket = self.ectx.create_primary(
inSensitive, inPublic, ESYS_TR.OWNER, outsideInfo, creationPCR,
)
self.assertNotEqual(handle, 0)
self.assertEqual(type(public), TPM2B_PUBLIC)
self.assertEqual(type(creation_data), TPM2B_CREATION_DATA)
self.assertEqual(type(digest), TPM2B_DIGEST)
self.assertEqual(type(ticket), TPMT_TK_CREATION)
self.ectx.flush_context(handle)
handle, _, _, _, _ = self.ectx.create_primary(inSensitive,)
self.assertNotEqual(handle, 0)
self.ectx.flush_context(handle)
handle, _, _, _, _ = self.ectx.create_primary(inSensitive, inPublic)
self.assertNotEqual(handle, 0)
self.ectx.flush_context(handle)
handle, _, _, _, _ = self.ectx.create_primary(inSensitive, "ecc256")
self.assertNotEqual(handle, 0)
self.ectx.flush_context(handle)
handle, _, _, _, _ = self.ectx.create_primary(
inSensitive, "ecc256", creation_pcr="sha256:4,6,7"
)
self.assertNotEqual(handle, 0)
self.ectx.flush_context(handle)
with self.assertRaises(TypeError):
self.ectx.create_primary(
TPM2B_DATA, inPublic, ESYS_TR.OWNER, outsideInfo, creationPCR,
)
with self.assertRaises(TypeError):
self.ectx.create_primary(
inSensitive,
b"should not work",
ESYS_TR.OWNER,
outsideInfo,
creationPCR,
)
with self.assertRaises(TypeError):
self.ectx.create_primary(
inSensitive, inPublic, object(), outsideInfo, creationPCR,
)
with self.assertRaises(TypeError):
self.ectx.create_primary(
inSensitive, inPublic, ESYS_TR.OWNER, object(), creationPCR,
)
with self.assertRaises(TypeError):
self.ectx.create_primary(
inSensitive, inPublic, ESYS_TR.OWNER, outsideInfo, TPM2B_SENSITIVE(),
)
with self.assertRaises(TypeError):
handle, _, _, _, _ = self.ectx.create_primary(
inSensitive, "ecc256", session1=object()
)
with self.assertRaises(TypeError):
handle, _, _, _, _ = self.ectx.create_primary(
inSensitive, "ecc256", session2=object()
)
with self.assertRaises(TypeError):
handle, _, _, _, _ = self.ectx.create_primary(
inSensitive, "ecc256", session3=object()
)
def test_create_primary_none(self):
handle, _, _, _, _ = self.ectx.create_primary(None)
self.assertNotEqual(handle, 0)
def test_pcr_read(self):
pcrsels = TPML_PCR_SELECTION.parse("sha1:3+sha256:all")
_, _, digests, = self.ectx.pcr_read(pcrsels)
self.assertEqual(len(digests[0]), 20)
for d in digests[1:]:
self.assertEqual(len(d), 32)
with self.assertRaises(TypeError):
self.ectx.pcr_read(TPML_AC_CAPABILITIES())
with self.assertRaises(TypeError):
self.ectx.pcr_read(pcrsels, session1="bar")
with self.assertRaises(TypeError):
self.ectx.pcr_read(pcrsels, session2=56.7)
with self.assertRaises(TypeError):
self.ectx.pcr_read(pcrsels, session3=object())
def test_plain_nv_define_write_read_undefine(self):
nv_public = TPM2B_NV_PUBLIC(
nvPublic=TPMS_NV_PUBLIC(
nvIndex=TPM2_HC.NV_INDEX_FIRST,
nameAlg=TPM2_ALG.SHA256,
attributes=TPMA_NV.parse("ownerread|ownerwrite|authread|authwrite"),
dataSize=32,
)
)
# No password NV index
nv_index = self.ectx.nv_define_space(None, nv_public)
self.ectx.nv_write(nv_index, b"hello world")
value = self.ectx.nv_read(nv_index, 11)
self.assertEqual(bytes(value), b"hello world")
public, name = self.ectx.nv_read_public(nv_index)
self.assertEqual(public.nvPublic.nvIndex, TPM2_HC.NV_INDEX_FIRST)
self.assertEqual(public.nvPublic.nameAlg, TPM2_ALG.SHA256)
self.assertEqual(
public.nvPublic.attributes,
TPMA_NV.parse("ownerread|ownerwrite|authread|authwrite|written"),
)
self.assertEqual(public.nvPublic.authPolicy.size, 0)
self.assertEqual(public.nvPublic.dataSize, 32)
# Algorithm id (UINT16) followed by SHA256 len of name bytes
self.assertEqual(len(name), 2 + 32)
n = str(name)
self.assertEqual(len(n), 68)
self.assertTrue(isinstance(n, str))
self.ectx.nv_undefine_space(nv_index)
with self.assertRaises(TSS2_Exception):
public, name = self.ectx.nv_read_public(nv_index)
def test_hierarchychangeauth(self):
self.ectx.hierarchy_change_auth(ESYS_TR.OWNER, "passwd")
# force esys to forget about the 'good' password
self.ectx.set_auth(ESYS_TR.OWNER, "badpasswd")
with self.assertRaises(TSS2_Exception):
self.ectx.hierarchy_change_auth(ESYS_TR.OWNER, "anotherpasswd")
def test_fulltest_yes(self):
self.ectx.self_test(True)
def test_fulltest_no(self):
self.ectx.self_test(False)
def test_incremental_self_test(self):
algs = TPML_ALG.parse("rsa,ecc,xor,aes,cbc")
self.ectx.incremental_self_test(algs)
self.ectx.incremental_self_test("rsa,ecc,xor,aes,cbc")
with self.assertRaises(TypeError):
self.ectx.incremental_self_test(None)
with self.assertRaises(TypeError):
self.ectx.incremental_self_test(object())
with self.assertRaises(TypeError):
self.ectx.incremental_self_test(session1=45.9)
with self.assertRaises(TypeError):
self.ectx.incremental_self_test(session2=object())
with self.assertRaises(TypeError):
self.ectx.incremental_self_test(session3=TPM2B_PUBLIC())
def test_incremental_resume_test(self):
algs = TPML_ALG.parse("rsa,ecc,xor,aes,cbc")
self.ectx.incremental_self_test(algs)
toDo, rc = self.ectx.get_test_result()
self.assertEqual(type(toDo), TPM2B_MAX_BUFFER)
self.assertEqual(rc, TPM2_RC.SUCCESS)
with self.assertRaises(TypeError):
self.ectx.get_test_result(session1=45.7)
with self.assertRaises(TypeError):
self.ectx.get_test_result(session2=TPM2B_DATA())
with self.assertRaises(TypeError):
self.ectx.get_test_result(session3=object())
def test_hmac_session(self):
sym = TPMT_SYM_DEF(
algorithm=TPM2_ALG.XOR,
keyBits=TPMU_SYM_KEY_BITS(exclusiveOr=TPM2_ALG.SHA256),
mode=TPMU_SYM_MODE(aes=TPM2_ALG.CFB),
)
hmac_session = self.ectx.start_auth_session(
tpm_key=ESYS_TR.NONE,
bind=ESYS_TR.NONE,
session_type=TPM2_SE.HMAC,
symmetric=sym,
auth_hash=TPM2_ALG.SHA256,
)
self.assertTrue(hmac_session)
self.ectx.hierarchy_change_auth(ESYS_TR.OWNER, "passwd", session1=hmac_session)
# force esys to forget about the 'good' password
self.ectx.set_auth(ESYS_TR.OWNER, "badpasswd")
with self.assertRaises(TSS2_Exception):
self.ectx.hierarchy_change_auth(
ESYS_TR.OWNER, "anotherpasswd", session1=hmac_session
)
# test some bad params
with self.assertRaises(TypeError):
self.ectx.start_auth_session(
object, ESYS_TR.NONE, TPM2_SE.HMAC, sym, TPM2_ALG.SHA256
)
with self.assertRaises(TypeError):
self.ectx.start_auth_session(
ESYS_TR.NONE, object(), TPM2_SE.HMAC, sym, TPM2_ALG.SHA256
)
with self.assertRaises(ValueError):
self.ectx.start_auth_session(
ESYS_TR.NONE, ESYS_TR.NONE, 8745635, sym, TPM2_ALG.SHA256
)
with self.assertRaises(TypeError):
self.ectx.start_auth_session(
ESYS_TR.NONE, ESYS_TR.NONE, object(), sym, TPM2_ALG.SHA256
)
with self.assertRaises(TypeError):
self.ectx.start_auth_session(
ESYS_TR.NONE, ESYS_TR.NONE, TPM2_SE.HMAC, 42, TPM2_ALG.SHA256
)
with self.assertRaises(ValueError):
self.ectx.start_auth_session(
ESYS_TR.NONE, ESYS_TR.NONE, TPM2_SE.HMAC, sym, 8395847
)
with self.assertRaises(TypeError):
self.ectx.start_auth_session(
ESYS_TR.NONE, ESYS_TR.NONE, TPM2_SE.HMAC, sym, TPM2B_SYM_KEY()
)
with self.assertRaises(TypeError):
self.ectx.start_auth_session(
ESYS_TR.NONE,
ESYS_TR.NONE,
TPM2_SE.HMAC,
sym,
TPM2_ALG.SHA256,
TPM2B_PUBLIC(),
)
def test_start_auth_session_enckey(self):
inSensitive = TPM2B_SENSITIVE_CREATE()
handle, _, _, _, _ = self.ectx.create_primary(inSensitive, "rsa2048:aes128cfb")
sym = TPMT_SYM_DEF(
algorithm=TPM2_ALG.XOR,
keyBits=TPMU_SYM_KEY_BITS(exclusiveOr=TPM2_ALG.SHA256),
mode=TPMU_SYM_MODE(aes=TPM2_ALG.CFB),
)
session = self.ectx.start_auth_session(
tpm_key=handle,
bind=ESYS_TR.NONE,
session_type=TPM2_SE.POLICY,
symmetric=sym,
auth_hash=TPM2_ALG.SHA256,
)
self.ectx.trsess_set_attributes(
session, (TPMA_SESSION.ENCRYPT | TPMA_SESSION.DECRYPT)
)
random = self.ectx.get_random(4, session1=session)
self.assertEqual(len(random), 4)
def test_start_auth_session_enckey_bindkey(self):
inSensitive = TPM2B_SENSITIVE_CREATE(
TPMS_SENSITIVE_CREATE(userAuth=TPM2B_AUTH("password"))
)
handle, _, _, _, _ = self.ectx.create_primary(inSensitive, "rsa2048:aes128cfb")
sym = TPMT_SYM_DEF(
algorithm=TPM2_ALG.XOR,
keyBits=TPMU_SYM_KEY_BITS(exclusiveOr=TPM2_ALG.SHA256),
mode=TPMU_SYM_MODE(aes=TPM2_ALG.CFB),
)
session = self.ectx.start_auth_session(
tpm_key=handle,
bind=handle,
session_type=TPM2_SE.POLICY,
symmetric=sym,
auth_hash=TPM2_ALG.SHA256,
)
self.ectx.trsess_set_attributes(
session, (TPMA_SESSION.ENCRYPT | TPMA_SESSION.DECRYPT)
)
random = self.ectx.get_random(4, session1=session)
self.assertEqual(len(random), 4)
def test_tr_sess_set_attributes(self):
inSensitive = TPM2B_SENSITIVE_CREATE(
TPMS_SENSITIVE_CREATE(userAuth=TPM2B_AUTH("password"))
)
handle, _, _, _, _ = self.ectx.create_primary(inSensitive, "rsa2048:aes128cfb")
sym = TPMT_SYM_DEF(
algorithm=TPM2_ALG.XOR,
keyBits=TPMU_SYM_KEY_BITS(exclusiveOr=TPM2_ALG.SHA256),
mode=TPMU_SYM_MODE(aes=TPM2_ALG.CFB),
)
session = self.ectx.start_auth_session(
tpm_key=handle,
bind=handle,
session_type=TPM2_SE.POLICY,
symmetric=sym,
auth_hash=TPM2_ALG.SHA256,
)
self.ectx.trsess_set_attributes(
session, (TPMA_SESSION.ENCRYPT | TPMA_SESSION.DECRYPT)
)
with self.assertRaises(TypeError):
self.ectx.trsess_set_attributes(
object(), (TPMA_SESSION.ENCRYPT | TPMA_SESSION.DECRYPT)
)
with self.assertRaises(TypeError):
self.ectx.trsess_set_attributes(session, 67.5)
with self.assertRaises(TypeError):
self.ectx.trsess_set_attributes(session, 1, 75.6)
def test_start_auth_session_noncecaller(self):
inSensitive = TPM2B_SENSITIVE_CREATE(
TPMS_SENSITIVE_CREATE(userAuth=TPM2B_AUTH("password"))
)
handle, _, _, _, _ = self.ectx.create_primary(inSensitive, "rsa2048:aes128cfb")
sym = TPMT_SYM_DEF(
algorithm=TPM2_ALG.XOR,
keyBits=TPMU_SYM_KEY_BITS(exclusiveOr=TPM2_ALG.SHA256),
mode=TPMU_SYM_MODE(aes=TPM2_ALG.CFB),
)
session = self.ectx.start_auth_session(
tpm_key=handle,
bind=handle,
session_type=TPM2_SE.POLICY,
symmetric=sym,
auth_hash=TPM2_ALG.SHA256,
nonce_caller=TPM2B_NONCE(b"thisisthirtytwocharslastichecked"),
)
self.ectx.trsess_set_attributes(
session, (TPMA_SESSION.ENCRYPT | TPMA_SESSION.DECRYPT)
)
random = self.ectx.get_random(4, session1=session)
self.assertEqual(len(random), 4)
def test_start_auth_session_noncecaller_bad(self):
sym = TPMT_SYM_DEF(
algorithm=TPM2_ALG.XOR,
keyBits=TPMU_SYM_KEY_BITS(exclusiveOr=TPM2_ALG.SHA256),
mode=TPMU_SYM_MODE(aes=TPM2_ALG.CFB),
)
with self.assertRaises(TypeError):
self.ectx.start_auth_session(
tpm_key=ESYS_TR.NONE,
bind=ESYS_TR.NONE,
session_type=TPM2_SE.HMAC,
symmetric=sym,
auth_hash=TPM2_ALG.SHA256,
nonce_caller=object(),
)
def test_create(self):
inSensitive = TPM2B_SENSITIVE_CREATE(
TPMS_SENSITIVE_CREATE(userAuth=TPM2B_AUTH("password"))
)
parentHandle, _, _, _, _ = self.ectx.create_primary(
inSensitive, "rsa2048:aes128cfb"
)
childInSensitive = TPM2B_SENSITIVE_CREATE(
TPMS_SENSITIVE_CREATE(userAuth=TPM2B_AUTH("childpassword"))
)
alg = "rsa2048"
childInPublic = TPM2B_PUBLIC(TPMT_PUBLIC.parse(alg))
outsideInfo = TPM2B_DATA()
creationPCR = TPML_PCR_SELECTION()
priv, pub, _, _, _ = self.ectx.create(
parentHandle, childInSensitive, childInPublic, outsideInfo, creationPCR
)
self.assertEqual(type(priv), TPM2B_PRIVATE),
self.assertEqual(type(pub), TPM2B_PUBLIC),
priv, pub, _, _, _ = self.ectx.create(
parentHandle, childInSensitive, childInPublic, outsideInfo
)
self.assertEqual(type(priv), TPM2B_PRIVATE),
self.assertEqual(type(pub), TPM2B_PUBLIC),
priv, pub, _, _, _ = self.ectx.create(
parentHandle, childInSensitive, childInPublic, creation_pcr=creationPCR
)
self.assertEqual(type(priv), TPM2B_PRIVATE),
self.assertEqual(type(pub), TPM2B_PUBLIC),
priv, pub, _, _, _ = self.ectx.create(
parentHandle,
childInSensitive,
childInPublic,
creation_pcr="sha256:1,2,3,4,5",
)
self.assertEqual(type(priv), TPM2B_PRIVATE),
self.assertEqual(type(pub), TPM2B_PUBLIC),
with self.assertRaises(TypeError):
self.ectx.create(
34.945, childInSensitive, childInPublic, outsideInfo, creationPCR
)
with self.assertRaises(TypeError):
self.ectx.create(
parentHandle, object(), childInPublic, outsideInfo, creationPCR
)
with self.assertRaises(TypeError):
self.ectx.create(
parentHandle, childInSensitive, 56, outsideInfo, creationPCR
)
with self.assertRaises(TypeError):
self.ectx.create(
parentHandle, childInSensitive, childInPublic, None, creationPCR
)
with self.assertRaises(TypeError):
self.ectx.create(
parentHandle, childInSensitive, childInPublic, outsideInfo, object
)
def test_create_none(self):
parentHandle = self.ectx.create_primary(None)[0]
priv, pub = self.ectx.create(parentHandle, None)[0:2]
self.assertEqual(type(pub), TPM2B_PUBLIC)
self.assertEqual(type(priv), TPM2B_PRIVATE)
def test_load(self):
inSensitive = TPM2B_SENSITIVE_CREATE(
TPMS_SENSITIVE_CREATE(userAuth=TPM2B_AUTH("password"))
)
parentHandle, _, _, _, _ = self.ectx.create_primary(
inSensitive, "rsa2048:aes128cfb"
)
childInSensitive = TPM2B_SENSITIVE_CREATE(
TPMS_SENSITIVE_CREATE(userAuth=TPM2B_AUTH("childpassword"))
)
priv, pub, _, _, _ = self.ectx.create(parentHandle, childInSensitive)
childHandle = self.ectx.load(parentHandle, priv, pub)
self.assertTrue(childHandle)
with self.assertRaises(TypeError):
self.ectx.load(42.5, priv, pub)
with self.assertRaises(TypeError):
self.ectx.load(parentHandle, TPM2B_DATA(), pub)
with self.assertRaises(TypeError):
self.ectx.load(parentHandle, priv, object())
def test_readpublic(self):
inSensitive = TPM2B_SENSITIVE_CREATE(
TPMS_SENSITIVE_CREATE(userAuth=TPM2B_AUTH("password"))
)
parentHandle, _, _, _, _ = self.ectx.create_primary(
inSensitive, "rsa2048:aes128cfb"
)
childInSensitive = TPM2B_SENSITIVE_CREATE(
TPMS_SENSITIVE_CREATE(userAuth=TPM2B_AUTH("childpassword"))
)
priv, pub, _, _, _ = self.ectx.create(parentHandle, childInSensitive)
childHandle = self.ectx.load(parentHandle, priv, pub)
pubdata, name, qname = self.ectx.read_public(childHandle)
self.assertTrue(
isinstance(pubdata, TPM2B_PUBLIC),
f"Expected TPM2B_PUBLIC, got: {type(pubdata)}",
)
self.assertTrue(
isinstance(name, TPM2B_NAME), f"Expected TPM2B_NAME, got: {type(name)}"
)
self.assertTrue(
isinstance(qname, TPM2B_NAME), f"Expected TPM2B_NAME, got: {type(qname)}"
)
self.assertTrue(pubdata.publicArea.type, TPM2_ALG.RSA)
self.assertTrue(pubdata.publicArea.nameAlg, TPM2_ALG.SHA256)
self.assertTrue(name.size, 32)
self.assertTrue(qname.size, 32)
with self.assertRaises(TypeError):
self.ectx.read_public(object())
with self.assertRaises(TypeError):
self.ectx.read_public(childHandle, session1=object)
with self.assertRaises(TypeError):
self.ectx.read_public(childHandle, session2="foo")
with self.assertRaises(TypeError):
self.ectx.read_public(childHandle, session3=42.5)
def test_make_credential(self):
inSensitive = TPM2B_SENSITIVE_CREATE(
TPMS_SENSITIVE_CREATE(userAuth=TPM2B_AUTH("password"))
)
parentHandle, _, _, _, _ = self.ectx.create_primary(
inSensitive, "rsa2048:aes128cfb"
)
alg = "rsa2048"
attrs = (
TPMA_OBJECT.RESTRICTED
| TPMA_OBJECT.DECRYPT
| TPMA_OBJECT.USERWITHAUTH
| TPMA_OBJECT.SENSITIVEDATAORIGIN
)
childInPublic = TPM2B_PUBLIC(TPMT_PUBLIC.parse(alg=alg, objectAttributes=attrs))
childInSensitive = TPM2B_SENSITIVE_CREATE(
TPMS_SENSITIVE_CREATE(userAuth=TPM2B_AUTH("childpassword"))
)
priv, pub, _, _, _ = self.ectx.create(
parentHandle, childInSensitive, childInPublic
)
childHandle = self.ectx.load(parentHandle, priv, pub)
primaryKeyName = self.ectx.read_public(parentHandle)[1]
credential = TPM2B_DIGEST("this is my credential")
# this can be done without a key as in tpm2-tools project, but for simpplicity
# use the TPM command, which uses the PUBLIC portion of the object and thus
# needs no auth.
credentialBlob, secret = self.ectx.make_credential(
childHandle, credential, primaryKeyName
)
self.assertEqual(type(credentialBlob), TPM2B_ID_OBJECT)
self.assertEqual(type(secret), TPM2B_ENCRYPTED_SECRET)
credentialBlob, secret = self.ectx.make_credential(
childHandle, "this is my credential", bytes(primaryKeyName)
)
self.assertEqual(type(credentialBlob), TPM2B_ID_OBJECT)
self.assertEqual(type(secret), TPM2B_ENCRYPTED_SECRET)
with self.assertRaises(TypeError):
self.ectx.make_credential(42.5, credential, primaryKeyName)
with self.assertRaises(TypeError):
self.ectx.make_credential(childHandle, object(), primaryKeyName)
with self.assertRaises(TypeError):
self.ectx.make_credential(childHandle, credential, object())
with self.assertRaises(TypeError):
self.ectx.make_credential(
childHandle, credential, primaryKeyName, session1="bar"
)
with self.assertRaises(TypeError):
self.ectx.make_credential(
childHandle, credential, primaryKeyName, session2=54.6
)
with self.assertRaises(TypeError):
self.ectx.make_credential(
childHandle, credential, primaryKeyName, session3=object()
)
def test_activate_credential(self):
inSensitive = TPM2B_SENSITIVE_CREATE(
TPMS_SENSITIVE_CREATE(userAuth=TPM2B_AUTH("password"))
)
parentHandle, _, _, _, _ = self.ectx.create_primary(
inSensitive, "rsa2048:aes128cfb"
)
alg = "rsa2048"
attrs = (
TPMA_OBJECT.RESTRICTED
| TPMA_OBJECT.DECRYPT
| TPMA_OBJECT.USERWITHAUTH
| TPMA_OBJECT.SENSITIVEDATAORIGIN
)
childInPublic = TPM2B_PUBLIC(TPMT_PUBLIC.parse(alg=alg, objectAttributes=attrs))
childInSensitive = TPM2B_SENSITIVE_CREATE(
TPMS_SENSITIVE_CREATE(userAuth=TPM2B_AUTH("childpassword"))
)
priv, pub, _, _, _ = self.ectx.create(
parentHandle, childInSensitive, childInPublic
)
childHandle = self.ectx.load(parentHandle, priv, pub)
primaryKeyName = self.ectx.read_public(parentHandle)[1]
credential = TPM2B_DIGEST("this is my credential")
# this can be done without a key as in tpm2-tools project, but for simpplicity
# use the TPM command, which uses the PUBLIC portion of the object and thus
# needs no auth.
credentialBlob, secret = self.ectx.make_credential(
childHandle, credential, primaryKeyName
)
self.ectx.set_auth(childHandle, "childpassword")
certInfo = self.ectx.activate_credential(
parentHandle, childHandle, credentialBlob, secret
)
self.assertEqual(bytes(certInfo), b"this is my credential")
with self.assertRaises(TypeError):
self.ectx.activate_credential(object(), childHandle, credentialBlob, secret)
with self.assertRaises(TypeError):
self.ectx.activate_credential(parentHandle, 76.4, credentialBlob, secret)
with self.assertRaises(TypeError):
self.ectx.activate_credential(
parentHandle, childHandle, TPM2B_PUBLIC(), secret
)
with self.assertRaises(TypeError):
self.ectx.activate_credential(
parentHandle, childHandle, credentialBlob, object()
)
with self.assertRaises(TypeError):
self.ectx.activate_credential(
parentHandle, childHandle, credentialBlob, secret, session1="foo"
)
with self.assertRaises(TypeError):
self.ectx.activate_credential(
parentHandle, childHandle, credentialBlob, secret, session2=object()
)
with self.assertRaises(TypeError):
self.ectx.activate_credential(
parentHandle, childHandle, credentialBlob, secret, session3=65.4
)
def test_unseal(self):
inSensitive = TPM2B_SENSITIVE_CREATE(
TPMS_SENSITIVE_CREATE(userAuth=TPM2B_AUTH("password"))
)
parentHandle, _, _, _, _ = self.ectx.create_primary(
inSensitive, "rsa2048:aes128cfb"
)
attrs = (
TPMA_OBJECT.USERWITHAUTH | TPMA_OBJECT.FIXEDPARENT | TPMA_OBJECT.FIXEDTPM
)
templ = TPMT_PUBLIC(
type=TPM2_ALG.KEYEDHASH, objectAttributes=attrs, nameAlg=TPM2_ALG.SHA256
)
templ.parameters.keyedHashDetail.scheme.scheme = TPM2_ALG.NULL
templ.parameters.keyedHashDetail.scheme.details.hmac.hashAlg = TPM2_ALG.SHA256
childInPublic = TPM2B_PUBLIC(templ)
childInSensitive = TPM2B_SENSITIVE_CREATE(
# TODO make sure this works without the buffer, and for other SIMPLE TPM2B types
TPMS_SENSITIVE_CREATE(
userAuth=TPM2B_AUTH("childpassword"),
data=TPM2B_SENSITIVE_DATA(b"sealedsecret"),
)
)
priv, pub, _, _, _ = self.ectx.create(
parentHandle, childInSensitive, childInPublic
)
childHandle = self.ectx.load(parentHandle, priv, pub)
self.ectx.set_auth(childHandle, "childpassword")
secret = self.ectx.unseal(childHandle)
self.assertEqual(bytes(secret), b"sealedsecret")
with self.assertRaises(TypeError):
self.ectx.unseal(45.2)
with self.assertRaises(TypeError):
self.ectx.unseal(childHandle, session1=object())
with self.assertRaises(TypeError):
self.ectx.unseal(childHandle, session2=67.4)
with self.assertRaises(TypeError):
self.ectx.unseal(childHandle, session3="bar")
def test_object_change_auth(self):
inSensitive = TPM2B_SENSITIVE_CREATE(
TPMS_SENSITIVE_CREATE(userAuth=TPM2B_AUTH("password"))
)
parentHandle, _, _, _, _ = self.ectx.create_primary(
inSensitive, "rsa2048:aes128cfb"
)
alg = "rsa2048"
attrs = (
TPMA_OBJECT.RESTRICTED
| TPMA_OBJECT.DECRYPT
| TPMA_OBJECT.USERWITHAUTH
| TPMA_OBJECT.SENSITIVEDATAORIGIN
)
childInPublic = TPM2B_PUBLIC(TPMT_PUBLIC.parse(alg=alg, objectAttributes=attrs))
childInSensitive = TPM2B_SENSITIVE_CREATE(
TPMS_SENSITIVE_CREATE(userAuth=TPM2B_AUTH("childpassword"))
)
priv, pub, _, _, _ = self.ectx.create(
parentHandle, childInSensitive, childInPublic
)
childHandle = self.ectx.load(parentHandle, priv, pub)
# force an error
self.ectx.set_auth(childHandle, "BADchildpassword")
with self.assertRaises(TSS2_Exception):
self.ectx.object_change_auth(childHandle, parentHandle, "newauth")
self.ectx.set_auth(childHandle, "childpassword")
self.ectx.object_change_auth(childHandle, parentHandle, TPM2B_AUTH("newauth"))
self.ectx.object_change_auth(childHandle, parentHandle, b"anotherauth")
self.ectx.object_change_auth(childHandle, parentHandle, "yetanotherone")
with self.assertRaises(TypeError):
self.ectx.object_change_auth("bad", parentHandle, "yetanotherone")
with self.assertRaises(TypeError):
self.ectx.object_change_auth(childHandle, 56.7, "yetanotherone")
with self.assertRaises(TypeError):
self.ectx.object_change_auth(childHandle, parentHandle, object())
def test_createloaded(self):
inSensitive = TPM2B_SENSITIVE_CREATE(
TPMS_SENSITIVE_CREATE(userAuth=TPM2B_AUTH("password"))
)
parentHandle, _, _, _, _ = self.ectx.create_primary(
inSensitive, "rsa2048:aes128cfb"
)
templ = TPMT_PUBLIC.parse(
alg="rsa2048", objectAttributes=TPMA_OBJECT.DEFAULT_TPM2_TOOLS_CREATE_ATTRS
)
childInPublic = TPM2B_TEMPLATE(templ.marshal())
childInSensitive = TPM2B_SENSITIVE_CREATE(
TPMS_SENSITIVE_CREATE(userAuth=TPM2B_AUTH("childpassword"))
)
childHandle, priv, pub = self.ectx.create_loaded(
parentHandle, childInSensitive, childInPublic
)
self.assertNotEqual(childHandle, 0)
self.assertEqual(type(priv), TPM2B_PRIVATE)
self.assertEqual(type(pub), TPM2B_PUBLIC)
childHandle, priv, pub = self.ectx.create_loaded(parentHandle, childInSensitive)
self.assertNotEqual(childHandle, 0)
self.assertEqual(type(priv), TPM2B_PRIVATE)
self.assertEqual(type(pub), TPM2B_PUBLIC)
with self.assertRaises(TypeError):
self.ectx.create_loaded(65.4, childInSensitive, childInPublic)
with self.assertRaises(TypeError):
self.ectx.create_loaded(parentHandle, "1223", childInPublic)
with self.assertRaises(TypeError):
self.ectx.create_loaded(parentHandle, childInSensitive, object())
with self.assertRaises(TypeError):
self.ectx.create_loaded(parentHandle, childInSensitive, session1=56.7)
with self.assertRaises(TypeError):
self.ectx.create_loaded(parentHandle, childInSensitive, session2=b"baz")
with self.assertRaises(TypeError):
self.ectx.create_loaded(parentHandle, childInSensitive, session3=object())
def test_createloaded_none(self):
parentHandle = self.ectx.create_primary(None)[0]
childHandle = self.ectx.create_loaded(parentHandle, None)[0]
self.assertNotEqual(childHandle, 0)
def test_rsa_enc_dec(self):
inSensitive = TPM2B_SENSITIVE_CREATE(
TPMS_SENSITIVE_CREATE(userAuth=TPM2B_AUTH("password"))
)
parentHandle, _, _, _, _ = self.ectx.create_primary(
inSensitive, "rsa2048:aes128cfb"
)
templ = TPMT_PUBLIC.parse(
alg="rsa2048", objectAttributes=TPMA_OBJECT.DEFAULT_TPM2_TOOLS_CREATE_ATTRS
)
childInPublic = TPM2B_TEMPLATE(templ.marshal())
childInSensitive = TPM2B_SENSITIVE_CREATE(
TPMS_SENSITIVE_CREATE(userAuth=TPM2B_AUTH("childpassword"))
)
childHandle, _, _ = self.ectx.create_loaded(
parentHandle, childInSensitive, childInPublic
)
message = TPM2B_PUBLIC_KEY_RSA("hello world")
scheme = TPMT_RSA_DECRYPT(scheme=TPM2_ALG.RSAES)
outData = self.ectx.rsa_encrypt(childHandle, message, scheme)
message2 = self.ectx.rsa_decrypt(childHandle, outData, scheme)
self.assertEqual(bytes(message), bytes(message2))
outData = self.ectx.rsa_encrypt(childHandle, "hello world", scheme)
message2 = self.ectx.rsa_decrypt(childHandle, outData, scheme)
self.assertEqual(bytes(message), bytes(message2))
# negative test rsa_encrypt
with self.assertRaises(TypeError):
self.ectx.rsa_encrypt(45.6, message, scheme)
with self.assertRaises(TypeError):
self.ectx.rsa_encrypt(childHandle, TPM2B_PUBLIC(), scheme)
with self.assertRaises(TypeError):
self.ectx.rsa_encrypt(childHandle, message, "foo")
with self.assertRaises(TypeError):
self.ectx.rsa_encrypt(childHandle, message, scheme, session1=object())
with self.assertRaises(TypeError):
self.ectx.rsa_encrypt(childHandle, message, scheme, session2="foo")
with self.assertRaises(TypeError):
self.ectx.rsa_encrypt(childHandle, message, scheme, session3=52.6)
# negative test rsa_decrypt
with self.assertRaises(TypeError):
self.ectx.rsa_decrypt(56.2, outData, scheme)
with self.assertRaises(TypeError):
self.ectx.rsa_decrypt(childHandle, object(), scheme)
with self.assertRaises(TypeError):
self.ectx.rsa_decrypt(childHandle, outData, TPM2_ALG.RSAES)
with self.assertRaises(TypeError):
self.ectx.rsa_decrypt(childHandle, outData, scheme, session1=67.9)
with self.assertRaises(TypeError):
self.ectx.rsa_decrypt(childHandle, outData, scheme, session2="foo")
with self.assertRaises(TypeError):
self.ectx.rsa_decrypt(childHandle, outData, scheme, session3=object())
def test_rsa_enc_dec_with_label(self):
inSensitive = TPM2B_SENSITIVE_CREATE(
TPMS_SENSITIVE_CREATE(userAuth=TPM2B_AUTH("password"))
)
parentHandle, _, _, _, _ = self.ectx.create_primary(
inSensitive, "rsa2048:aes128cfb"
)
templ = TPMT_PUBLIC.parse(
alg="rsa2048", objectAttributes=TPMA_OBJECT.DEFAULT_TPM2_TOOLS_CREATE_ATTRS
)
childInPublic = TPM2B_TEMPLATE(templ.marshal())
childInSensitive = TPM2B_SENSITIVE_CREATE(
TPMS_SENSITIVE_CREATE(userAuth=TPM2B_AUTH("childpassword"))
)
childHandle, _, _ = self.ectx.create_loaded(
parentHandle, childInSensitive, childInPublic
)
message = TPM2B_PUBLIC_KEY_RSA("hello world")
scheme = TPMT_RSA_DECRYPT(scheme=TPM2_ALG.RSAES)
outData = self.ectx.rsa_encrypt(
childHandle, message, scheme, label=b"my label\0"
)
message2 = self.ectx.rsa_decrypt(
childHandle, outData, scheme, label=b"my label\0"
)
self.assertEqual(bytes(message), bytes(message2))
def test_ecdh_key_gen(self):
inSensitive = TPM2B_SENSITIVE_CREATE()
parentHandle, _, _, _, _ = self.ectx.create_primary(
inSensitive, "ecc256:aes128cfb"
)
zPoint, pubPoint = self.ectx.ecdh_key_gen(parentHandle)
self.assertNotEqual(zPoint, None)
self.assertNotEqual(pubPoint, None)
with self.assertRaises(TypeError):
self.ectx.ecdh_key_gen(56.8)
with self.assertRaises(TypeError):
self.ectx.ecdh_key_gen(parentHandle, session1="baz")
with self.assertRaises(TypeError):
self.ectx.ecdh_key_gen(parentHandle, session2=object())
with self.assertRaises(TypeError):
self.ectx.ecdh_key_gen(parentHandle, session3=45.6)
def test_ecdh_z_gen(self):
alg = "ecc256:ecdh"
attrs = (
TPMA_OBJECT.USERWITHAUTH
| TPMA_OBJECT.DECRYPT
| TPMA_OBJECT.FIXEDTPM
| TPMA_OBJECT.FIXEDPARENT
| TPMA_OBJECT.SENSITIVEDATAORIGIN
)
inPublic = TPM2B_PUBLIC(TPMT_PUBLIC.parse(alg=alg, objectAttributes=attrs))
inSensitive = TPM2B_SENSITIVE_CREATE(TPMS_SENSITIVE_CREATE())
parentHandle, _, _, _, _ = self.ectx.create_primary(inSensitive, inPublic)
inPoint = TPM2B_ECC_POINT(
TPMS_ECC_POINT(
x=binascii.unhexlify(
"25db1f8bbcfabc31f8176acbb2f840a3b6a5d340659d37eed9fd5247f514d598"
),
y=binascii.unhexlify(
"ed623e3dd20908cf583c814bbf657e08ab9f40ffea51da21298ce24deb344ccc"
),
)
)
outPoint = self.ectx.ecdh_zgen(parentHandle, inPoint)
self.assertEqual(type(outPoint), TPM2B_ECC_POINT)
with self.assertRaises(TypeError):
self.ectx.ecdh_zgen(object(), inPoint)
with self.assertRaises(TypeError):
self.ectx.ecdh_zgen(parentHandle, "boo")
with self.assertRaises(TypeError):
self.ectx.ecdh_zgen(parentHandle, inPoint, session1="baz")
with self.assertRaises(TypeError):
self.ectx.ecdh_zgen(parentHandle, inPoint, session2=object())
with self.assertRaises(TypeError):
self.ectx.ecdh_zgen(parentHandle, inPoint, session3=89.6)
def test_ecc_parameters(self):
params = self.ectx.ecc_parameters(TPM2_ECC_CURVE.NIST_P256)
self.assertEqual(type(params), TPMS_ALGORITHM_DETAIL_ECC)
with self.assertRaises(ValueError):
self.ectx.ecc_parameters(42)
with self.assertRaises(TypeError):
self.ectx.ecc_parameters(TPM2B_DATA())
with self.assertRaises(TypeError):
self.ectx.ecc_parameters(TPM2_ECC_CURVE.NIST_P256, session1="foo")
with self.assertRaises(TypeError):
self.ectx.ecc_parameters(TPM2_ECC_CURVE.NIST_P256, session2=object())
with self.assertRaises(TypeError):
self.ectx.ecc_parameters(TPM2_ECC_CURVE.NIST_P256, session3=TPM2B_DATA())
def test_z_gen_2_phase(self):
alg = "ecc256:ecdh-sha256"
attrs = (
TPMA_OBJECT.USERWITHAUTH
| TPMA_OBJECT.DECRYPT
| TPMA_OBJECT.FIXEDTPM
| TPMA_OBJECT.FIXEDPARENT
| TPMA_OBJECT.SENSITIVEDATAORIGIN
)
inPublic = TPM2B_PUBLIC(TPMT_PUBLIC.parse(alg=alg, objectAttributes=attrs))
inSensitive = TPM2B_SENSITIVE_CREATE(TPMS_SENSITIVE_CREATE())
eccHandle, outPublic, _, _, _ = self.ectx.create_primary(inSensitive, inPublic)
curveId = TPM2_ECC.NIST_P256
Q, counter = self.ectx.ec_ephemeral(curveId)
inQsB = TPM2B_ECC_POINT(outPublic.publicArea.unique.ecc)
inQeB = Q
Z1, Z2 = self.ectx.zgen_2_phase(eccHandle, inQsB, inQeB, TPM2_ALG.ECDH, counter)
self.assertEqual(type(Z1), TPM2B_ECC_POINT)
self.assertEqual(type(Z2), TPM2B_ECC_POINT)
with self.assertRaises(TypeError):
self.ectx.zgen_2_phase(42.5, inQsB, inQeB, TPM2_ALG.ECDH, counter)
with self.assertRaises(TypeError):
self.ectx.zgen_2_phase(eccHandle, "hello", inQeB, TPM2_ALG.ECDH, counter)
with self.assertRaises(TypeError):
self.ectx.zgen_2_phase(eccHandle, inQsB, object(), TPM2_ALG.ECDH, counter)
with self.assertRaises(TypeError):
self.ectx.zgen_2_phase(eccHandle, inQsB, inQeB, object(), counter)
with self.assertRaises(TypeError):
self.ectx.zgen_2_phase(eccHandle, inQsB, inQeB, TPM2_ALG.ECDH, "baz")
with self.assertRaises(ValueError):
self.ectx.zgen_2_phase(eccHandle, inQsB, inQeB, TPM2_ALG.ECDH, 2 ** 18)
with self.assertRaises(TypeError):
self.ectx.zgen_2_phase(
eccHandle, inQsB, inQeB, TPM2_ALG.ECDH, counter, session1=object()
)
with self.assertRaises(TypeError):
self.ectx.zgen_2_phase(
eccHandle, inQsB, inQeB, TPM2_ALG.ECDH, counter, session2="baz"
)
with self.assertRaises(TypeError):
self.ectx.zgen_2_phase(
eccHandle, inQsB, inQeB, TPM2_ALG.ECDH, counter, session3=45.5
)
def test_encrypt_decrypt(self):
inSensitive = TPM2B_SENSITIVE_CREATE()
parentHandle = self.ectx.create_primary(inSensitive, "ecc")[0]
inPublic = TPM2B_TEMPLATE(TPMT_PUBLIC.parse(alg="aes").marshal())
aesKeyHandle = self.ectx.create_loaded(parentHandle, inSensitive, inPublic)[0]
ivIn = TPM2B_IV(b"thisis16byteszxc")
inData = TPM2B_MAX_BUFFER(b"this is data to encrypt")
outCipherText, outIV = self.ectx.encrypt_decrypt(
aesKeyHandle, False, TPM2_ALG.CFB, ivIn, inData
)
self.assertEqual(len(outIV), len(ivIn))
outData, outIV2 = self.ectx.encrypt_decrypt(
aesKeyHandle, True, TPM2_ALG.CFB, ivIn, outCipherText
)
self.assertEqual(bytes(inData), bytes(outData))
self.assertEqual(bytes(outIV), bytes(outIV2))
# test plain bytes for data
ivIn = b"thisis16byteszxc"
inData = b"this is data to encrypt"
outCipherText, outIV = self.ectx.encrypt_decrypt(
aesKeyHandle, False, TPM2_ALG.CFB, ivIn, inData
)
self.assertEqual(len(outIV), len(ivIn))
outData, outIV2 = self.ectx.encrypt_decrypt(
aesKeyHandle, True, TPM2_ALG.CFB, ivIn, outCipherText
)
self.assertEqual(inData, bytes(outData))
self.assertEqual(bytes(outIV), bytes(outIV2))
with self.assertRaises(TypeError):
self.ectx.encrypt_decrypt(42.5, True, TPM2_ALG.CFB, ivIn, outCipherText)
with self.assertRaises(TypeError):
self.ectx.encrypt_decrypt(
aesKeyHandle, object(), TPM2_ALG.CFB, ivIn, outCipherText
)
with self.assertRaises(TypeError):
self.ectx.encrypt_decrypt(aesKeyHandle, True, object(), ivIn, outCipherText)
with self.assertRaises(ValueError):
self.ectx.encrypt_decrypt(aesKeyHandle, True, 42, ivIn, outCipherText)
with self.assertRaises(TypeError):
self.ectx.encrypt_decrypt(
aesKeyHandle, True, TPM2_ALG.CFB, TPM2B_PUBLIC(), outCipherText
)
with self.assertRaises(TypeError):
self.ectx.encrypt_decrypt(aesKeyHandle, True, TPM2_ALG.CFB, ivIn, None)
with self.assertRaises(TypeError):
self.ectx.encrypt_decrypt(
aesKeyHandle, True, TPM2_ALG.CFB, ivIn, outCipherText, session1=object()
)
with self.assertRaises(TypeError):
self.ectx.encrypt_decrypt(
aesKeyHandle, True, TPM2_ALG.CFB, ivIn, outCipherText, session2="foo"
)
with self.assertRaises(TypeError):
self.ectx.encrypt_decrypt(
aesKeyHandle, True, TPM2_ALG.CFB, ivIn, outCipherText, session3=12.3
)
with self.assertRaises(TypeError):
self.ectx.encrypt_decrypt(
aesKeyHandle, "bad Bool", TPM2_ALG.CFB, ivIn, inData
)
def test_encrypt_decrypt2(self):
inSensitive = TPM2B_SENSITIVE_CREATE()
parentHandle = self.ectx.create_primary(inSensitive, "ecc")[0]
inPublic = TPM2B_TEMPLATE(TPMT_PUBLIC.parse(alg="aes").marshal())
aesKeyHandle = self.ectx.create_loaded(parentHandle, inSensitive, inPublic)[0]
ivIn = TPM2B_IV(b"thisis16byteszxc")
inData = TPM2B_MAX_BUFFER(b"this is data to encrypt")
outCipherText, outIV = self.ectx.encrypt_decrypt_2(
aesKeyHandle, False, TPM2_ALG.CFB, ivIn, inData
)
self.assertEqual(len(outIV), len(ivIn))
outData, outIV2 = self.ectx.encrypt_decrypt_2(
aesKeyHandle, True, TPM2_ALG.CFB, ivIn, outCipherText
)
self.assertEqual(bytes(inData), bytes(outData))
self.assertEqual(bytes(outIV), bytes(outIV2))
ivIn = b"thisis16byteszxc"
inData = b"this is data to encrypt"
outCipherText, outIV = self.ectx.encrypt_decrypt_2(
aesKeyHandle, False, TPM2_ALG.CFB, ivIn, inData
)
self.assertEqual(len(outIV), len(ivIn))
outData, outIV2 = self.ectx.encrypt_decrypt_2(
aesKeyHandle, True, TPM2_ALG.CFB, ivIn, outCipherText
)
self.assertEqual(inData, bytes(outData))
self.assertEqual(bytes(outIV), bytes(outIV2))
with self.assertRaises(TypeError):
self.ectx.encrypt_decrypt(42.5, True, TPM2_ALG.CFB, ivIn, outCipherText)
with self.assertRaises(TypeError):
self.ectx.encrypt_decrypt(
aesKeyHandle, object(), TPM2_ALG.CFB, ivIn, outCipherText
)
with self.assertRaises(TypeError):
self.ectx.encrypt_decrypt(aesKeyHandle, True, object(), ivIn, outCipherText)
with self.assertRaises(ValueError):
self.ectx.encrypt_decrypt(aesKeyHandle, True, 42, ivIn, outCipherText)
with self.assertRaises(TypeError):
self.ectx.encrypt_decrypt(
aesKeyHandle, True, TPM2_ALG.CFB, TPM2B_PUBLIC(), outCipherText
)
with self.assertRaises(TypeError):
self.ectx.encrypt_decrypt(aesKeyHandle, True, TPM2_ALG.CFB, ivIn, None)
with self.assertRaises(TypeError):
self.ectx.encrypt_decrypt(
aesKeyHandle, True, TPM2_ALG.CFB, ivIn, outCipherText, session1=object()
)
with self.assertRaises(TypeError):
self.ectx.encrypt_decrypt(
aesKeyHandle, True, TPM2_ALG.CFB, ivIn, outCipherText, session2="foo"
)
with self.assertRaises(TypeError):
self.ectx.encrypt_decrypt(
aesKeyHandle, True, TPM2_ALG.CFB, ivIn, outCipherText, session3=12.3
)
with self.assertRaises(TypeError):
self.ectx.encrypt_decrypt_2(
aesKeyHandle, "Not Bool", TPM2_ALG.CFB, ivIn, inData
)
def test_hash(self):
# Null hierarchy default
digest, ticket = self.ectx.hash(b"1234", TPM2_ALG.SHA256)
self.assertNotEqual(digest, None)
self.assertNotEqual(ticket, None)
d = bytes(digest)
c = binascii.unhexlify(
"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4"
)
self.assertEqual(c, d)
# Owner hierarchy set
digest, ticket = self.ectx.hash(b"1234", TPM2_ALG.SHA256, ESYS_TR.OWNER)
self.assertNotEqual(digest, None)
self.assertNotEqual(ticket, None)
d = bytes(digest)
c = binascii.unhexlify(
"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4"
)
self.assertEqual(c, d)
# Test TPM2B_MAX_BUFFER
inData = TPM2B_MAX_BUFFER(b"1234")
digest, ticket = self.ectx.hash(inData, TPM2_ALG.SHA256)
self.assertNotEqual(digest, None)
self.assertNotEqual(ticket, None)
d = bytes(digest)
c = binascii.unhexlify(
"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4"
)
self.assertEqual(c, d)
# Test str input
inData = TPM2B_MAX_BUFFER("1234")
digest, ticket = self.ectx.hash(inData, TPM2_ALG.SHA256)
self.assertNotEqual(digest, None)
self.assertNotEqual(ticket, None)
d = bytes(digest)
c = binascii.unhexlify(
"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4"
)
self.assertEqual(c, d)
with self.assertRaises(TypeError):
self.ectx.hash(object(), TPM2_ALG.SHA256)
with self.assertRaises(TypeError):
self.ectx.hash(inData, "baz")
with self.assertRaises(ValueError):
self.ectx.hash(inData, 42)
with self.assertRaises(TypeError):
self.ectx.hash(inData, TPM2_ALG.SHA256, session1=56.7)
with self.assertRaises(TypeError):
self.ectx.hash(inData, TPM2_ALG.SHA256, session2="baz")
with self.assertRaises(TypeError):
self.ectx.hash(inData, TPM2_ALG.SHA256, session3=object())
def test_hmac(self):
attrs = (
TPMA_OBJECT.SIGN_ENCRYPT
| TPMA_OBJECT.USERWITHAUTH
| TPMA_OBJECT.SENSITIVEDATAORIGIN
)
templ = TPMT_PUBLIC.parse(alg="hmac", objectAttributes=attrs)
inPublic = TPM2B_PUBLIC(templ)
inSensitive = TPM2B_SENSITIVE_CREATE(TPMS_SENSITIVE_CREATE())
primaryHandle = self.ectx.create_primary(inSensitive, inPublic)[0]
# Test bytes
hmac = self.ectx.hmac(primaryHandle, b"1234", TPM2_ALG.SHA256)
self.assertNotEqual(hmac, None)
self.assertEqual(len(bytes(hmac)), 32)
# Test str
hmac = self.ectx.hmac(primaryHandle, "1234", TPM2_ALG.SHA256)
self.assertNotEqual(hmac, None)
self.assertEqual(len(bytes(hmac)), 32)
# Test Native
inData = TPM2B_MAX_BUFFER("1234")
hmac = self.ectx.hmac(primaryHandle, inData, TPM2_ALG.SHA256)
self.assertNotEqual(hmac, None)
self.assertEqual(len(bytes(hmac)), 32)
with self.assertRaises(TypeError):
self.ectx.hmac(45.6, inData, TPM2_ALG.SHA256)
with self.assertRaises(TypeError):
self.ectx.hmac(primaryHandle, object(), TPM2_ALG.SHA256)
with self.assertRaises(TypeError):
self.ectx.hmac(primaryHandle, inData, "baz")
with self.assertRaises(ValueError):
self.ectx.hmac(primaryHandle, inData, 42)
with self.assertRaises(TypeError):
self.ectx.hmac(primaryHandle, inData, TPM2_ALG.SHA256, session1=object())
with self.assertRaises(TypeError):
self.ectx.hmac(primaryHandle, inData, TPM2_ALG.SHA256, session2="object")
with self.assertRaises(TypeError):
self.ectx.hmac(primaryHandle, inData, TPM2_ALG.SHA256, session3=45.6)
def test_stir_random(self):
self.ectx.stir_random(b"1234")
self.ectx.stir_random("1234")
self.ectx.stir_random(TPM2B_SENSITIVE_DATA("1234"))
with self.assertRaises(TypeError):
self.ectx.stir_random(object())
with self.assertRaises(TypeError):
self.ectx.stir_random("1234", session1=56.7)
with self.assertRaises(TypeError):
self.ectx.stir_random("1234", session2="foo")
with self.assertRaises(TypeError):
self.ectx.stir_random("1234", session3=object())
def test_hmac_sequence(self):
inPublic = TPM2B_PUBLIC(
TPMT_PUBLIC.parse(
alg="hmac",
objectAttributes=(
TPMA_OBJECT.SIGN_ENCRYPT
| TPMA_OBJECT.USERWITHAUTH
| TPMA_OBJECT.SENSITIVEDATAORIGIN
),
)
)
inSensitive = TPM2B_SENSITIVE_CREATE(TPMS_SENSITIVE_CREATE())
handle = self.ectx.create_primary(inSensitive, inPublic)[0]
seqHandle = self.ectx.hmac_start(handle, None, TPM2_ALG.SHA256)
self.assertNotEqual(seqHandle, 0)
self.ectx.flush_context(seqHandle)
seqHandle = self.ectx.hmac_start(handle, b"1234", TPM2_ALG.SHA256)
self.assertNotEqual(seqHandle, 0)
self.ectx.flush_context(seqHandle)
seqHandle = self.ectx.hmac_start(handle, "1234", TPM2_ALG.SHA256)
self.assertNotEqual(seqHandle, 0)
self.ectx.flush_context(seqHandle)
seqHandle = self.ectx.hmac_start(handle, TPM2B_AUTH(b"1234"), TPM2_ALG.SHA256)
self.assertNotEqual(seqHandle, 0)
# self.ectx.set_auth(seqHandle, b"1234")
self.ectx.sequence_update(seqHandle, "here is some data")
self.ectx.sequence_update(seqHandle, b"more data but byte string")
self.ectx.sequence_update(seqHandle, TPM2B_MAX_BUFFER("native data format"))
self.ectx.sequence_update(seqHandle, None)
digest, ticket = self.ectx.sequence_complete(seqHandle, None)
self.assertNotEqual(digest, None)
self.assertNotEqual(ticket, None)
self.assertEqual(len(digest), 32)
with self.assertRaises(TypeError):
self.ectx.hmac_start(45.6, "1234", TPM2_ALG.SHA256)
with self.assertRaises(TypeError):
self.ectx.hmac_start(handle, dict(), TPM2_ALG.SHA256)
with self.assertRaises(TypeError):
self.ectx.hmac_start(handle, "1234", object())
with self.assertRaises(ValueError):
self.ectx.hmac_start(handle, "1234", 42)
with self.assertRaises(TypeError):
self.ectx.hmac_start(handle, "1234", TPM2_ALG.SHA256, session1="baz")
with self.assertRaises(TypeError):
self.ectx.hmac_start(handle, "1234", TPM2_ALG.SHA256, session2=object())
with self.assertRaises(TypeError):
self.ectx.hmac_start(handle, "1234", TPM2_ALG.SHA256, session3=45.6)
def test_hash_sequence(self):
seqHandle = self.ectx.hash_sequence_start(None, TPM2_ALG.SHA256)
self.assertNotEqual(seqHandle, 0)
self.ectx.flush_context(seqHandle)
seqHandle = self.ectx.hash_sequence_start(b"1234", TPM2_ALG.SHA256)
self.assertNotEqual(seqHandle, 0)
self.ectx.flush_context(seqHandle)
seqHandle = self.ectx.hash_sequence_start("1234", TPM2_ALG.SHA256)
self.assertNotEqual(seqHandle, 0)
self.ectx.flush_context(seqHandle)
seqHandle = self.ectx.hash_sequence_start(TPM2B_AUTH(b"1234"), TPM2_ALG.SHA256)
self.assertNotEqual(seqHandle, 0)
self.ectx.set_auth(seqHandle, b"1234")
self.ectx.sequence_update(seqHandle, "here is some data")
self.ectx.sequence_update(seqHandle, b"more data but byte string")
self.ectx.sequence_update(seqHandle, TPM2B_MAX_BUFFER("native data format"))
self.ectx.sequence_update(seqHandle, None)
digest, ticket = self.ectx.sequence_complete(seqHandle, "AnotherBuffer")
self.assertNotEqual(digest, None)
self.assertNotEqual(ticket, None)
e = binascii.unhexlify(
"a02271d78e351c6e9e775b0570b440d3ac37ad6c02a3b69df940f3f893f80d41"
)
d = bytes(digest)
self.assertEqual(e, d)
with self.assertRaises(TypeError):
self.ectx.hash_sequence_start(object(), TPM2_ALG.SHA256)
with self.assertRaises(TypeError):
self.ectx.hash_sequence_start(b"1234", "dssdf")
with self.assertRaises(ValueError):
self.ectx.hash_sequence_start(b"1234", 42)
with self.assertRaises(TypeError):
self.ectx.hash_sequence_start(b"1234", TPM2_ALG.SHA256, session1="baz")
with self.assertRaises(TypeError):
self.ectx.hash_sequence_start(b"1234", TPM2_ALG.SHA256, session2=56.7)
with self.assertRaises(TypeError):
self.ectx.hash_sequence_start(
b"1234", TPM2_ALG.SHA256, session3=TPM2B_DATA()
)
with self.assertRaises(TypeError):
self.ectx.sequence_update(56.7, "here is some data")
with self.assertRaises(TypeError):
self.ectx.sequence_update(seqHandle, [])
with self.assertRaises(TypeError):
self.ectx.sequence_update(seqHandle, "here is some data", sequence1="foo")
with self.assertRaises(TypeError):
self.ectx.sequence_update(
seqHandle, "here is some data", sequence2=object()
)
with self.assertRaises(TypeError):
self.ectx.sequence_update(seqHandle, "here is some data", sequence3=78.23)
with self.assertRaises(TypeError):
self.ectx.sequence_complete(78.25, "AnotherBuffer")
with self.assertRaises(TypeError):
self.ectx.sequence_complete(seqHandle, [])
with self.assertRaises(TypeError):
self.ectx.sequence_complete(seqHandle, "AnotherBuffer", hierarchy=object())
with self.assertRaises(ValueError):
self.ectx.sequence_complete(seqHandle, "AnotherBuffer", hierarchy=42)
with self.assertRaises(TypeError):
self.ectx.sequence_complete(seqHandle, "AnotherBuffer", session1=42.67)
with self.assertRaises(TypeError):
self.ectx.sequence_complete(seqHandle, "AnotherBuffer", session2="baz")
with self.assertRaises(TypeError):
self.ectx.sequence_complete(seqHandle, "AnotherBuffer", session3=object())
def test_event_sequence_complete(self):
seqHandle = self.ectx.hash_sequence_start(TPM2B_AUTH(b"1234"), TPM2_ALG.NULL)
self.assertNotEqual(seqHandle, 0)
self.ectx.set_auth(seqHandle, b"1234")
self.ectx.sequence_update(seqHandle, "here is some data")
self.ectx.sequence_update(seqHandle, b"more data but byte string")
self.ectx.sequence_update(seqHandle, TPM2B_MAX_BUFFER("native data format"))
self.ectx.sequence_update(seqHandle, None)
pcrs = self.ectx.event_sequence_complete(
ESYS_TR.PCR16, seqHandle, "AnotherBuffer"
)
self.assertEqual(type(pcrs), TPML_DIGEST_VALUES)
with self.assertRaises(TypeError):
self.ectx.event_sequence_complete(object(), seqHandle, None)
with self.assertRaises(ValueError):
self.ectx.event_sequence_complete(42, seqHandle, None)
with self.assertRaises(TypeError):
self.ectx.event_sequence_complete(ESYS_TR.PCR16, 46.5, None)
with self.assertRaises(TypeError):
self.ectx.event_sequence_complete(ESYS_TR.PCR16, seqHandle, object())
with self.assertRaises(TypeError):
self.ectx.event_sequence_complete(
ESYS_TR.PCR16, seqHandle, None, sequence1=67.34
)
with self.assertRaises(TypeError):
self.ectx.event_sequence_complete(
ESYS_TR.PCR16, seqHandle, None, sequence2="boo"
)
with self.assertRaises(TypeError):
self.ectx.event_sequence_complete(
ESYS_TR.PCR16, seqHandle, None, sequence3=object()
)
def test_context_save_context_load(self):
inPublic = TPM2B_PUBLIC(
TPMT_PUBLIC.parse(
alg="rsa:rsassa-sha256",
objectAttributes=TPMA_OBJECT.USERWITHAUTH
| TPMA_OBJECT.SIGN_ENCRYPT
| TPMA_OBJECT.FIXEDTPM
| TPMA_OBJECT.FIXEDPARENT
| TPMA_OBJECT.SENSITIVEDATAORIGIN,
)
)
inSensitive = TPM2B_SENSITIVE_CREATE()
handle, outpub, _, _, _ = self.ectx.create_primary(inSensitive, inPublic)
ctx = self.ectx.context_save(handle)
nhandle = self.ectx.context_load(ctx)
name = self.ectx.tr_get_name(nhandle)
self.assertEqual(bytes(outpub.get_name()), bytes(name))
def test_flush_context(self):
inPublic = TPM2B_PUBLIC(
TPMT_PUBLIC.parse(
alg="rsa:rsassa-sha256",
objectAttributes=TPMA_OBJECT.USERWITHAUTH
| TPMA_OBJECT.SIGN_ENCRYPT
| TPMA_OBJECT.FIXEDTPM
| TPMA_OBJECT.FIXEDPARENT
| TPMA_OBJECT.SENSITIVEDATAORIGIN,
)
)
inSensitive = TPM2B_SENSITIVE_CREATE()
handle, _, _, _, _ = self.ectx.create_primary(inSensitive, inPublic)
self.ectx.flush_context(handle)
with self.assertRaises(TSS2_Exception) as e:
self.ectx.tr_get_name(handle)
self.assertEqual(e.exception.error, TSS2_RC.ESYS_RC_BAD_TR)
def test_evict_control(self):
inPublic = TPM2B_PUBLIC(
TPMT_PUBLIC.parse(
alg="rsa:rsassa-sha256",
objectAttributes=TPMA_OBJECT.USERWITHAUTH
| TPMA_OBJECT.SIGN_ENCRYPT
| TPMA_OBJECT.FIXEDTPM
| TPMA_OBJECT.FIXEDPARENT
| TPMA_OBJECT.SENSITIVEDATAORIGIN,
)
)
inSensitive = TPM2B_SENSITIVE_CREATE()
handle, _, _, _, _ = self.ectx.create_primary(inSensitive, inPublic)
self.ectx.evict_control(
ESYS_TR.OWNER, handle, 0x81000081, session1=ESYS_TR.PASSWORD
)
phandle = self.ectx.tr_from_tpmpublic(0x81000081)
self.ectx.evict_control(
ESYS_TR.OWNER, phandle, 0x81000081, session1=ESYS_TR.PASSWORD
)
with self.assertRaises(TSS2_Exception) as e:
self.ectx.tr_from_tpmpublic(0x81000081)
self.assertEqual(e.exception.error, TPM2_RC.HANDLE)
def test_get_capability(self):
more = True
while more:
more, capdata = self.ectx.get_capability(
TPM2_CAP.COMMANDS, TPM2_CC.FIRST, TPM2_MAX.CAP_CC
)
for c in capdata.data.command:
pass
with self.assertRaises(TypeError):
self.ectx.get_capability("Not valid", TPM2_CC.FIRST, TPM2_MAX.CAP_CC)
with self.assertRaises(TypeError):
self.ectx.get_capability(TPM2_CAP.COMMANDS, 45.6, TPM2_MAX.CAP_CC)
with self.assertRaises(TypeError):
self.ectx.get_capability(TPM2_CAP.COMMANDS, TPM2_CC.FIRST, [])
with self.assertRaises(TypeError):
self.ectx.get_capability(
TPM2_CAP.COMMANDS, TPM2_CC.FIRST, TPM2_MAX.CAP_CC, session1=56.7
)
with self.assertRaises(TypeError):
self.ectx.get_capability(
TPM2_CAP.COMMANDS, TPM2_CC.FIRST, TPM2_MAX.CAP_CC, session2=object()
)
with self.assertRaises(TypeError):
self.ectx.get_capability(
TPM2_CAP.COMMANDS, TPM2_CC.FIRST, TPM2_MAX.CAP_CC, session3="baz"
)
def test_test_parms(self):
parms = TPMT_PUBLIC_PARMS(type=TPM2_ALG.RSA)
parms.parameters.rsaDetail.symmetric.algorithm = TPM2_ALG.NULL
parms.parameters.rsaDetail.scheme.scheme = TPM2_ALG.NULL
parms.parameters.rsaDetail.keyBits = 2048
parms.parameters.rsaDetail.exponent = 0
self.ectx.test_parms(parms)
parms.parameters.rsaDetail.keyBits = 1234
with self.assertRaises(TSS2_Exception) as e:
self.ectx.test_parms(parms)
self.assertEqual(e.exception.error, TPM2_RC.VALUE)
self.assertEqual(e.exception.parameter, 1)
def test_read_clock(self):
ctime = self.ectx.read_clock()
self.assertGreater(ctime.time, 0)
self.assertGreater(ctime.clockInfo.clock, 0)
def test_clock_set(self):
newtime = 0xFA1AFE1
self.ectx.clock_set(newtime)
ntime = self.ectx.read_clock()
self.assertGreaterEqual(ntime.clockInfo.clock, newtime)
with self.assertRaises(TSS2_Exception) as e:
self.ectx.clock_set(0)
self.assertEqual(e.exception.error, TPM2_RC.VALUE)
def test_clock_rate_adjust(self):
self.ectx.clock_rate_adjust(TPM2_CLOCK.COARSE_SLOWER)
def test_nv_undefine_space_special(self):
# pre-generated TPM2_PolicyCommandCode(TPM2_CC_NV_UndefineSpaceSpecial)
pol = b"\x1d-\xc4\x85\xe1w\xdd\xd0\xa4\n4I\x13\xce\xebB\x0c\xaa\t<BX}.\x1b\x13+\x15|\xcb]\xb0"
nvpub = TPM2B_NV_PUBLIC(
nvPublic=TPMS_NV_PUBLIC(
nvIndex=0x1000000,
nameAlg=TPM2_ALG.SHA256,
attributes=TPMA_NV.PPWRITE
| TPMA_NV.PPREAD
| TPMA_NV.PLATFORMCREATE
| TPMA_NV.POLICY_DELETE,
authPolicy=pol,
dataSize=8,
)
)
nvhandle = self.ectx.nv_define_space(
b"", nvpub, auth_handle=ESYS_TR.RH_PLATFORM
)
session = self.ectx.start_auth_session(
ESYS_TR.NONE,
ESYS_TR.NONE,
TPM2_SE.POLICY,
TPMT_SYM_DEF(algorithm=TPM2_ALG.NULL),
TPM2_ALG.SHA256,
)
self.ectx.policy_command_code(session, TPM2_CC.NV_UndefineSpaceSpecial)
self.ectx.nv_undefine_space_special(nvhandle, session1=session)
def test_nv_read_public(self):
nvpub = TPM2B_NV_PUBLIC(
nvPublic=TPMS_NV_PUBLIC(
nvIndex=0x1000000,
nameAlg=TPM2_ALG.SHA256,
attributes=TPMA_NV.OWNERWRITE | TPMA_NV.OWNERREAD,
authPolicy=b"",
dataSize=8,
)
)
nvhandle = self.ectx.nv_define_space(b"", nvpub)
pubout, name = self.ectx.nv_read_public(nvhandle)
self.assertEqual(nvpub.get_name().name, name.name)
def test_nv_increment(self):
nvpub = TPM2B_NV_PUBLIC(
nvPublic=TPMS_NV_PUBLIC(
nvIndex=0x1000000,
nameAlg=TPM2_ALG.SHA256,
attributes=TPMA_NV.OWNERWRITE
| TPMA_NV.OWNERREAD
| TPMA_NV.AUTHREAD
| TPMA_NV.AUTHWRITE
| (TPM2_NT.COUNTER << TPMA_NV.TPM2_NT_SHIFT),
authPolicy=b"",
dataSize=8,
)
)
nvhandle = self.ectx.nv_define_space(b"", nvpub)
self.ectx.nv_increment(nvhandle, auth_handle=ESYS_TR.RH_OWNER)
self.ectx.nv_increment(nvhandle)
data = self.ectx.nv_read(nvhandle, 8, 0, auth_handle=ESYS_TR.RH_OWNER)
counter = int.from_bytes(data.buffer, byteorder="big")
self.assertEqual(counter, 2)
with self.assertRaises(TypeError):
self.ectx.nv_increment("foo")
with self.assertRaises(TypeError):
self.ectx.nv_increment(nvhandle, auth_handle="bar")
with self.assertRaises(TypeError):
self.ectx.nv_increment(nvhandle, session1=45.6)
with self.assertRaises(TypeError):
self.ectx.nv_increment(nvhandle, session2=object())
with self.assertRaises(TypeError):
self.ectx.nv_increment(nvhandle, session3="baz")
def test_nv_extend(self):
nvpub = TPM2B_NV_PUBLIC(
nvPublic=TPMS_NV_PUBLIC(
nvIndex=0x1000000,
nameAlg=TPM2_ALG.SHA256,
attributes=TPMA_NV.OWNERWRITE
| TPMA_NV.OWNERREAD
| TPMA_NV.AUTHREAD
| TPMA_NV.AUTHWRITE
| (TPM2_NT.EXTEND << TPMA_NV.TPM2_NT_SHIFT),
authPolicy=b"",
dataSize=32,
)
)
nvhandle = self.ectx.nv_define_space(b"", nvpub)
edata = b"\xFF" * 32
self.ectx.nv_extend(nvhandle, edata, auth_handle=ESYS_TR.RH_OWNER)
self.ectx.nv_extend(nvhandle, edata)
data = self.ectx.nv_read(nvhandle, 32, 0, auth_handle=ESYS_TR.RH_OWNER)
edigest = b"\x10l\xc9ey]W\x01\xde\x94\x048\xf5\x08\x0fS'h\xbc\x98\xb5\x9bg\xf9g\xa4(\x1d\xc2\x83Z\xef"
self.assertEqual(edigest, bytes(data))
with self.assertRaises(TypeError):
self.ectx.nv_extend("handle", edata)
with self.assertRaises(TypeError):
self.ectx.nv_extend(nvhandle, TPM2B_CONTEXT_DATA())
with self.assertRaises(TypeError):
self.ectx.nv_extend(nvhandle, edata, auth_handle=34.7)
with self.assertRaises(TypeError):
self.ectx.nv_extend(nvhandle, edata, session1="foo")
with self.assertRaises(TypeError):
self.ectx.nv_extend(nvhandle, edata, session2=56.9)
with self.assertRaises(TypeError):
self.ectx.nv_extend(nvhandle, edata, session3=object)
def test_nv_set_bits(self):
nvpub = TPM2B_NV_PUBLIC(
nvPublic=TPMS_NV_PUBLIC(
nvIndex=0x1000000,
nameAlg=TPM2_ALG.SHA256,
attributes=TPMA_NV.OWNERWRITE
| TPMA_NV.OWNERREAD
| TPMA_NV.AUTHREAD
| TPMA_NV.AUTHWRITE
| (TPM2_NT.BITS << TPMA_NV.TPM2_NT_SHIFT),
authPolicy=b"",
dataSize=8,
)
)
nvhandle = self.ectx.nv_define_space(b"", nvpub)
bits = 0b1010
self.ectx.nv_set_bits(nvhandle, bits, auth_handle=ESYS_TR.RH_OWNER)
bits = 0b1011
self.ectx.nv_set_bits(nvhandle, bits)
data = self.ectx.nv_read(nvhandle, 8, 0, auth_handle=ESYS_TR.RH_OWNER)
b = bits.to_bytes(length=8, byteorder="big")
self.assertEqual(b, bytes(data))
with self.assertRaises(TypeError):
self.ectx.nv_set_bits("not a handle", bits)
with self.assertRaises(TypeError):
self.ectx.nv_set_bits(nvhandle, object())
with self.assertRaises(TypeError):
self.ectx.nv_set_bits(nvhandle, bits, auth_handle=45.6)
with self.assertRaises(TypeError):
self.ectx.nv_set_bits(nvhandle, bits, session1="foo")
with self.assertRaises(TypeError):
self.ectx.nv_set_bits(nvhandle, bits, session2=45.6)
with self.assertRaises(TypeError):
self.ectx.nv_set_bits(nvhandle, bits, session3=object())
def test_nv_write_lock(self):
nvpub = TPM2B_NV_PUBLIC(
nvPublic=TPMS_NV_PUBLIC(
nvIndex=0x1000000,
nameAlg=TPM2_ALG.SHA256,
attributes=TPMA_NV.OWNERWRITE
| TPMA_NV.OWNERREAD
| TPMA_NV.WRITE_STCLEAR
| TPMA_NV.AUTHREAD
| TPMA_NV.AUTHWRITE,
authPolicy=b"",
dataSize=8,
)
)
nvhandle = self.ectx.nv_define_space(b"", nvpub)
self.ectx.nv_write_lock(nvhandle, auth_handle=ESYS_TR.RH_OWNER)
self.ectx.nv_write_lock(nvhandle)
indata = b"12345678"
with self.assertRaises(TSS2_Exception) as e:
self.ectx.nv_write(nvhandle, indata, auth_handle=ESYS_TR.RH_OWNER)
self.assertEqual(e.exception.error, TPM2_RC.NV_LOCKED)
with self.assertRaises(TypeError):
self.ectx.nv_write_lock(list())
with self.assertRaises(TypeError):
self.ectx.nv_write_lock(nvhandle, auth_handle=42.3)
with self.assertRaises(TypeError):
self.ectx.nv_write_lock(nvhandle, session1="baz")
with self.assertRaises(TypeError):
self.ectx.nv_write_lock(nvhandle, session2=45.6)
with self.assertRaises(TypeError):
self.ectx.nv_write_lock(nvhandle, session3=list())
def test_nv_global_write_lock(self):
nvpub = TPM2B_NV_PUBLIC(
nvPublic=TPMS_NV_PUBLIC(
nvIndex=0x1000000,
nameAlg=TPM2_ALG.SHA256,
attributes=TPMA_NV.OWNERWRITE | TPMA_NV.OWNERREAD | TPMA_NV.GLOBALLOCK,
authPolicy=b"",
dataSize=8,
)
)
nvhandle = self.ectx.nv_define_space(b"", nvpub)
self.ectx.nv_global_write_lock()
indata = b"12345678"
with self.assertRaises(TSS2_Exception) as e:
self.ectx.nv_write(nvhandle, indata, auth_handle=ESYS_TR.RH_OWNER)
self.assertEqual(e.exception.error, TPM2_RC.NV_LOCKED)
def test_nv_read_lock(self):
nvpub = TPM2B_NV_PUBLIC(
nvPublic=TPMS_NV_PUBLIC(
nvIndex=0x1000000,
nameAlg=TPM2_ALG.SHA256,
attributes=TPMA_NV.OWNERWRITE
| TPMA_NV.OWNERREAD
| TPMA_NV.AUTHREAD
| TPMA_NV.AUTHWRITE
| TPMA_NV.READ_STCLEAR,
authPolicy=b"",
dataSize=8,
)
)
nvhandle = self.ectx.nv_define_space(b"", nvpub)
indata = b"12345678"
self.ectx.nv_write(nvhandle, indata, auth_handle=ESYS_TR.RH_OWNER)
self.ectx.nv_read_lock(nvhandle, auth_handle=ESYS_TR.RH_OWNER)
self.ectx.nv_read_lock(nvhandle)
with self.assertRaises(TSS2_Exception) as e:
self.ectx.nv_read(nvhandle, 8, auth_handle=ESYS_TR.RH_OWNER)
self.assertEqual(e.exception.error, TPM2_RC.NV_LOCKED)
with self.assertRaises(TypeError):
self.ectx.nv_read_lock("handle")
with self.assertRaises(TypeError):
self.ectx.nv_read_lock(nvhandle, auth_handle=45.6)
with self.assertRaises(TypeError):
self.ectx.nv_read_lock(nvhandle, session1=56.9)
with self.assertRaises(TypeError):
self.ectx.nv_read_lock(nvhandle, sesiosn2=object())
with self.assertRaises(TypeError):
self.ectx.nv_read_lock(nvhandle, session3="baz")
def test_nv_change_auth(self):
# pre-generated TPM2_PolicyCommandCode(TPM2_CC_NV_ChangeAuth)
pol = b"D^\xd9S`\x1a\x04U\x04U\t\x99\xbf,\xbb)\x92\xcb\xa2\xdb\xb5\x12\x1b\xcf\x03\x86\x9fe\xb5\x0c&\xe5"
nvpub = TPM2B_NV_PUBLIC(
nvPublic=TPMS_NV_PUBLIC(
nvIndex=0x1000000,
nameAlg=TPM2_ALG.SHA256,
attributes=TPMA_NV.OWNERWRITE | TPMA_NV.OWNERREAD | TPMA_NV.AUTHREAD,
authPolicy=pol,
dataSize=8,
)
)
nvhandle = self.ectx.nv_define_space(b"first", nvpub)
self.ectx.nv_write(nvhandle, b"sometest", auth_handle=ESYS_TR.RH_OWNER)
self.ectx.nv_read(nvhandle, 8, auth_handle=nvhandle)
session = self.ectx.start_auth_session(
ESYS_TR.NONE,
ESYS_TR.NONE,
TPM2_SE.POLICY,
TPMT_SYM_DEF(algorithm=TPM2_ALG.NULL),
TPM2_ALG.SHA256,
)
self.ectx.policy_command_code(session, TPM2_CC.NV_ChangeAuth)
self.ectx.nv_change_auth(nvhandle, b"second", session1=session)
self.ectx.nv_read(nvhandle, 8, auth_handle=nvhandle)
def test_nv_certify(self):
nvpub = TPM2B_NV_PUBLIC(
nvPublic=TPMS_NV_PUBLIC(
nvIndex=0x1000000,
nameAlg=TPM2_ALG.SHA256,
attributes=TPMA_NV.OWNERWRITE
| TPMA_NV.OWNERREAD
| TPMA_NV.AUTHREAD
| TPMA_NV.AUTHWRITE,
authPolicy=b"",
dataSize=8,
)
)
nvhandle = self.ectx.nv_define_space(b"", nvpub)
self.ectx.nv_write(nvhandle, b"sometest", auth_handle=ESYS_TR.RH_OWNER)
inPublic = TPM2B_PUBLIC(
TPMT_PUBLIC.parse(
alg="rsa:rsassa-sha256",
objectAttributes=TPMA_OBJECT.USERWITHAUTH
| TPMA_OBJECT.SIGN_ENCRYPT
| TPMA_OBJECT.FIXEDTPM
| TPMA_OBJECT.FIXEDPARENT
| TPMA_OBJECT.SENSITIVEDATAORIGIN,
)
)
inSensitive = TPM2B_SENSITIVE_CREATE()
eccHandle, signPub, _, _, _ = self.ectx.create_primary(inSensitive, inPublic)
qualifyingData = TPM2B_DATA(b"qdata")
inScheme = TPMT_SIG_SCHEME(scheme=TPM2_ALG.NULL)
certifyInfo, _ = self.ectx.nv_certify(
eccHandle,
nvhandle,
qualifyingData,
inScheme,
8,
auth_handle=ESYS_TR.RH_OWNER,
session1=ESYS_TR.PASSWORD,
session2=ESYS_TR.PASSWORD,
)
att, _ = TPMS_ATTEST.unmarshal(bytes(certifyInfo))
self.assertEqual(att.magic, TPM2_GENERATED_VALUE(0xFF544347))
self.assertEqual(att.type, TPM2_ST.ATTEST_NV)
self.assertEqual(bytes(att.extraData), b"qdata")
nvpub.nvPublic.attributes = nvpub.nvPublic.attributes | TPMA_NV.WRITTEN
self.assertEqual(bytes(att.attested.nv.indexName), bytes(nvpub.get_name()))
self.assertEqual(att.attested.nv.offset, 0)
self.assertEqual(att.attested.nv.nvContents.buffer, b"sometest")
self.ectx.nv_certify(eccHandle, nvhandle, qualifyingData, inScheme, 8)
with self.assertRaises(TypeError):
self.ectx.nv_certify(67.7, nvhandle, qualifyingData, inScheme, 8)
with self.assertRaises(TypeError):
self.ectx.nv_certify(eccHandle, "bad handle", qualifyingData, inScheme, 8)
with self.assertRaises(TypeError):
self.ectx.nv_certify(eccHandle, nvhandle, object(), inScheme, 8)
with self.assertRaises(TypeError):
self.ectx.nv_certify(eccHandle, nvhandle, qualifyingData, TPM2B_DATA(), 8)
with self.assertRaises(TypeError):
self.ectx.nv_certify(eccHandle, nvhandle, qualifyingData, inScheme, 45.6)
with self.assertRaises(TypeError):
self.ectx.nv_certify(
eccHandle, nvhandle, qualifyingData, inScheme, 8, offset="bar"
)
with self.assertRaises(TypeError):
self.ectx.nv_certify(
eccHandle, nvhandle, qualifyingData, inScheme, 8, auth_handle=object
)
with self.assertRaises(TypeError):
self.ectx.nv_certify(
eccHandle, nvhandle, qualifyingData, inScheme, 8, session1=67.8
)
with self.assertRaises(TypeError):
self.ectx.nv_certify(
eccHandle, nvhandle, qualifyingData, inScheme, 8, session2="bar"
)
with self.assertRaises(TypeError):
self.ectx.nv_certify(
eccHandle, nvhandle, qualifyingData, inScheme, 8, session3=[]
)
def test_certify(self):
inPublic = TPM2B_PUBLIC(
TPMT_PUBLIC.parse(
alg="rsa:rsassa-sha256",
objectAttributes=TPMA_OBJECT.USERWITHAUTH
| TPMA_OBJECT.SIGN_ENCRYPT
| TPMA_OBJECT.FIXEDTPM
| TPMA_OBJECT.FIXEDPARENT
| TPMA_OBJECT.SENSITIVEDATAORIGIN,
)
)
inSensitive = TPM2B_SENSITIVE_CREATE()
eccHandle = self.ectx.create_primary(inSensitive, inPublic)[0]
qualifyingData = TPM2B_DATA()
inScheme = TPMT_SIG_SCHEME(scheme=TPM2_ALG.NULL)
certifyInfo, signature = self.ectx.certify(
eccHandle, eccHandle, qualifyingData, inScheme
)
self.assertEqual(type(certifyInfo), TPM2B_ATTEST)
self.assertNotEqual(len(certifyInfo), 0)
self.assertEqual(type(signature), TPMT_SIGNATURE)
certifyInfo, signature = self.ectx.certify(
eccHandle, eccHandle, b"12345678", inScheme
)
self.assertEqual(type(certifyInfo), TPM2B_ATTEST)
self.assertNotEqual(len(certifyInfo), 0)
self.assertEqual(type(signature), TPMT_SIGNATURE)
with self.assertRaises(TypeError):
certifyInfo, signature = self.ectx.certify(
TPM2B_ATTEST(), eccHandle, qualifyingData, inScheme
)
with self.assertRaises(TypeError):
certifyInfo, signature = self.ectx.certify(
eccHandle, 2.0, qualifyingData, inScheme
)
with self.assertRaises(TypeError):
certifyInfo, signature = self.ectx.certify(
eccHandle, eccHandle, TPM2B_PUBLIC(), inScheme
)
with self.assertRaises(TypeError):
certifyInfo, signature = self.ectx.certify(
eccHandle, eccHandle, qualifyingData, TPM2B_PRIVATE()
)
with self.assertRaises(TypeError):
self.ectx.certify(
eccHandle, eccHandle, qualifyingData, inScheme, session1=56.7
)
with self.assertRaises(TypeError):
self.ectx.certify(
eccHandle, eccHandle, qualifyingData, inScheme, session2="foo"
)
with self.assertRaises(TypeError):
self.ectx.certify(
eccHandle, eccHandle, qualifyingData, inScheme, session3=object()
)
def test_certify_creation(self):
inPublic = TPM2B_PUBLIC(
TPMT_PUBLIC.parse(
alg="rsa:rsassa-sha256",
objectAttributes=TPMA_OBJECT.USERWITHAUTH
| TPMA_OBJECT.SIGN_ENCRYPT
| TPMA_OBJECT.FIXEDTPM
| TPMA_OBJECT.FIXEDPARENT
| TPMA_OBJECT.SENSITIVEDATAORIGIN,
)
)
inSensitive = TPM2B_SENSITIVE_CREATE()
eccHandle, _, _, creationHash, creationTicket = self.ectx.create_primary(
inSensitive, inPublic
)
qualifyingData = TPM2B_DATA()
inScheme = TPMT_SIG_SCHEME(scheme=TPM2_ALG.NULL)
certifyInfo, signature = self.ectx.certify_creation(
eccHandle, eccHandle, qualifyingData, creationHash, inScheme, creationTicket
)
self.assertEqual(type(certifyInfo), TPM2B_ATTEST)
self.assertNotEqual(len(certifyInfo), 0)
self.assertEqual(type(signature), TPMT_SIGNATURE)
with self.assertRaises(TypeError):
self.ectx.certify_creation(
45.6, eccHandle, qualifyingData, creationHash, inScheme, creationTicket
)
with self.assertRaises(TypeError):
self.ectx.certify_creation(
eccHandle,
object(),
qualifyingData,
creationHash,
inScheme,
creationTicket,
)
with self.assertRaises(TypeError):
self.ectx.certify_creation(
eccHandle,
eccHandle,
TPM2B_PUBLIC(),
creationHash,
inScheme,
creationTicket,
)
with self.assertRaises(TypeError):
self.ectx.certify_creation(
eccHandle, eccHandle, qualifyingData, object(), inScheme, creationTicket
)
with self.assertRaises(TypeError):
self.ectx.certify_creation(
eccHandle, eccHandle, qualifyingData, creationHash, [], creationTicket
)
with self.assertRaises(TypeError):
self.ectx.certify_creation(
eccHandle, eccHandle, qualifyingData, creationHash, inScheme, 56.7
)
with self.assertRaises(TypeError):
self.ectx.certify_creation(
eccHandle,
eccHandle,
qualifyingData,
creationHash,
inScheme,
creationTicket,
session1=56.7,
)
with self.assertRaises(TypeError):
self.ectx.certify_creation(
eccHandle,
eccHandle,
qualifyingData,
creationHash,
inScheme,
creationTicket,
session2=object(),
)
with self.assertRaises(TypeError):
self.ectx.certify_creation(
eccHandle,
eccHandle,
qualifyingData,
creationHash,
inScheme,
creationTicket,
session3="baz",
)
def test_vendor_tcg_test(self):
# Maybe some TPMs support the CC some don't
capdata = self.ectx.get_capability(
TPM2_CAP.COMMANDS, TPM2_CC.FIRST, TPM2_MAX.CAP_CC
)[1]
# TPM Supports it
if TPM2_CC.Vendor_TCG_Test in capdata.data.command:
self.ectx.vendor_tcg_test(b"random data")
in_cdata = TPM2B_DATA(b"other bytes")._cdata
self.ectx.vendor_tcg_test(in_cdata)
# TPM Does not Support it
else:
with self.assertRaises(TSS2_Exception):
self.ectx.vendor_tcg_test(b"random data")
in_cdata = TPM2B_DATA(b"other bytes")._cdata
with self.assertRaises(TSS2_Exception):
self.ectx.vendor_tcg_test(in_cdata)
with self.assertRaises(TypeError):
self.ectx.vendor_tcg_test(None)
with self.assertRaises(TypeError):
self.ectx.vendor_tcg_test(TPM2B_PUBLIC())
def test_field_upgrade_start(self):
inPublic = TPM2B_PUBLIC(
TPMT_PUBLIC.parse(
alg="rsa:rsassa-sha256",
objectAttributes=TPMA_OBJECT.USERWITHAUTH
| TPMA_OBJECT.SIGN_ENCRYPT
| TPMA_OBJECT.FIXEDTPM
| TPMA_OBJECT.FIXEDPARENT
| TPMA_OBJECT.SENSITIVEDATAORIGIN,
)
)
inSensitive = TPM2B_SENSITIVE_CREATE()
keyhandle, _, _, _, _ = self.ectx.create_primary(inSensitive, inPublic)
with self.assertRaises(TSS2_Exception) as e:
self.ectx.field_upgrade_start(
keyhandle, b"", TPMT_SIGNATURE(sigAlg=TPM2_ALG.NULL),
)
self.assertEqual(e.exception.error, TPM2_RC.COMMAND_CODE)
def test_field_upgrade_data(self):
with self.assertRaises(TSS2_Exception) as e:
self.ectx.field_upgrade_data(b"")
self.assertEqual(e.exception.error, TPM2_RC.COMMAND_CODE)
def test_firmware_read(self):
with self.assertRaises(TSS2_Exception) as e:
self.ectx.firmware_read(0)
self.assertEqual(e.exception.error, TPM2_RC.COMMAND_CODE)
def test_shutdown_no_arg(self):
self.ectx.shutdown(TPM2_SU.STATE)
def test_shutdown_state(self):
self.ectx.shutdown(TPM2_SU.STATE)
def test_shutdown_clear(self):
self.ectx.shutdown(TPM2_SU.CLEAR)
def test_shutdown_bad(self):
with self.assertRaises(TypeError):
self.ectx.shutdown(object())
with self.assertRaises(ValueError):
self.ectx.shutdown(42)
with self.assertRaises(TypeError):
self.ectx.shutdown(session1=object())
with self.assertRaises(TypeError):
self.ectx.shutdown(session2=object())
with self.assertRaises(TypeError):
self.ectx.shutdown(session3=object())
def test_policyrestart(self):
sym = TPMT_SYM_DEF(
algorithm=TPM2_ALG.XOR,
keyBits=TPMU_SYM_KEY_BITS(exclusiveOr=TPM2_ALG.SHA256),
mode=TPMU_SYM_MODE(aes=TPM2_ALG.CFB),
)
session = self.ectx.start_auth_session(
tpm_key=ESYS_TR.NONE,
bind=ESYS_TR.NONE,
session_type=TPM2_SE.TRIAL,
symmetric=sym,
auth_hash=TPM2_ALG.SHA256,
)
self.ectx.policy_restart(session)
with self.assertRaises(TypeError):
self.ectx.policy_restart(object())
with self.assertRaises(TypeError):
self.ectx.policy_restart(session, session1=4.5)
with self.assertRaises(TypeError):
self.ectx.policy_restart(session, session2=object())
with self.assertRaises(TypeError):
self.ectx.policy_restart(session, session3=33.666)
def test_duplicate(self):
sym = TPMT_SYM_DEF(
algorithm=TPM2_ALG.XOR,
keyBits=TPMU_SYM_KEY_BITS(exclusiveOr=TPM2_ALG.SHA256),
mode=TPMU_SYM_MODE(aes=TPM2_ALG.CFB),
)
session = self.ectx.start_auth_session(
tpm_key=ESYS_TR.NONE,
bind=ESYS_TR.NONE,
session_type=TPM2_SE.TRIAL,
symmetric=sym,
auth_hash=TPM2_ALG.SHA256,
)
self.ectx.policy_auth_value(session)
self.ectx.policy_command_code(session, TPM2_CC.Duplicate)
policyDigest = self.ectx.policy_get_digest(session)
self.ectx.flush_context(session)
session = None
inPublic = TPM2B_PUBLIC(
TPMT_PUBLIC.parse(
alg="rsa2048",
objectAttributes=TPMA_OBJECT.USERWITHAUTH
| TPMA_OBJECT.RESTRICTED
| TPMA_OBJECT.DECRYPT
| TPMA_OBJECT.FIXEDTPM
| TPMA_OBJECT.FIXEDPARENT
| TPMA_OBJECT.SENSITIVEDATAORIGIN,
)
)
inSensitive = TPM2B_SENSITIVE_CREATE()
primary1, _, _, _, _ = self.ectx.create_primary(inSensitive, inPublic,)
primary2, _, _, _, _ = self.ectx.create_primary(inSensitive, inPublic)
inPublic = TPM2B_PUBLIC(
TPMT_PUBLIC.parse(
alg="rsa2048:aes128cfb",
objectAttributes=TPMA_OBJECT.USERWITHAUTH
| TPMA_OBJECT.RESTRICTED
| TPMA_OBJECT.DECRYPT
| TPMA_OBJECT.SENSITIVEDATAORIGIN,
)
)
inPublic.publicArea.authPolicy = policyDigest
priv, pub, _, _, _ = self.ectx.create(primary1, inSensitive, inPublic)
childHandle = self.ectx.load(primary1, priv, pub)
session = self.ectx.start_auth_session(
tpm_key=ESYS_TR.NONE,
bind=ESYS_TR.NONE,
session_type=TPM2_SE.POLICY,
symmetric=sym,
auth_hash=TPM2_ALG.SHA256,
)
self.ectx.policy_auth_value(session)
self.ectx.policy_command_code(session, TPM2_CC.Duplicate)
encryptionKey = TPM2B_DATA("is sixteen bytes")
sym = TPMT_SYM_DEF_OBJECT(
algorithm=TPM2_ALG.AES,
keyBits=TPMU_SYM_KEY_BITS(aes=128),
mode=TPMU_SYM_MODE(aes=TPM2_ALG.CFB),
)
encryptionKeyOut, duplicate, symSeed = self.ectx.duplicate(
childHandle, primary2, encryptionKey, sym, session1=session
)
self.assertEqual(type(encryptionKeyOut), TPM2B_DATA)
self.assertEqual(type(duplicate), TPM2B_PRIVATE)
self.assertEqual(type(symSeed), TPM2B_ENCRYPTED_SECRET)
with self.assertRaises(TypeError):
self.ectx.duplicate(6.7, primary2, encryptionKey, sym, session1=session)
with self.assertRaises(TypeError):
self.ectx.duplicate(
childHandle, object(), encryptionKey, sym, session1=session
)
with self.assertRaises(TypeError):
self.ectx.duplicate(
childHandle, primary2, TPM2B_PUBLIC(), sym, session1=session
)
with self.assertRaises(TypeError):
self.ectx.duplicate(
childHandle, primary2, encryptionKey, b"1234", session1=session
)
with self.assertRaises(TypeError):
self.ectx.duplicate(
childHandle, primary2, encryptionKey, sym, session1=7.89
)
with self.assertRaises(TypeError):
self.ectx.duplicate(
childHandle,
primary2,
encryptionKey,
sym,
session1=session,
session2="foo",
)
with self.assertRaises(TypeError):
self.ectx.duplicate(
childHandle,
primary2,
encryptionKey,
sym,
session1=session,
session2=ESYS_TR.PASSWORD,
session3="foo",
)
def test_policy_auth_value(self):
sym = TPMT_SYM_DEF(
algorithm=TPM2_ALG.XOR,
keyBits=TPMU_SYM_KEY_BITS(exclusiveOr=TPM2_ALG.SHA256),
mode=TPMU_SYM_MODE(aes=TPM2_ALG.CFB),
)
session = self.ectx.start_auth_session(
tpm_key=ESYS_TR.NONE,
bind=ESYS_TR.NONE,
session_type=TPM2_SE.TRIAL,
symmetric=sym,
auth_hash=TPM2_ALG.SHA256,
)
self.ectx.policy_auth_value(session)
with self.assertRaises(TypeError):
self.ectx.policy_auth_value(b"1234")
def test_policy_command_code(self):
sym = TPMT_SYM_DEF(
algorithm=TPM2_ALG.XOR,
keyBits=TPMU_SYM_KEY_BITS(exclusiveOr=TPM2_ALG.SHA256),
mode=TPMU_SYM_MODE(aes=TPM2_ALG.CFB),
)
session = self.ectx.start_auth_session(
tpm_key=ESYS_TR.NONE,
bind=ESYS_TR.NONE,
session_type=TPM2_SE.TRIAL,
symmetric=sym,
auth_hash=TPM2_ALG.SHA256,
)
self.ectx.policy_command_code(session, TPM2_CC.Duplicate)
with self.assertRaises(TypeError):
self.ectx.policy_command_code(b"1234", TPM2_CC.Duplicate)
with self.assertRaises(TypeError):
self.ectx.policy_command_code(session, b"12345")
with self.assertRaises(ValueError):
self.ectx.policy_command_code(session, 42)
def test_policy_get_digest(self):
sym = TPMT_SYM_DEF(
algorithm=TPM2_ALG.XOR,
keyBits=TPMU_SYM_KEY_BITS(exclusiveOr=TPM2_ALG.SHA256),
mode=TPMU_SYM_MODE(aes=TPM2_ALG.CFB),
)
session = self.ectx.start_auth_session(
tpm_key=ESYS_TR.NONE,
bind=ESYS_TR.NONE,
session_type=TPM2_SE.TRIAL,
symmetric=sym,
auth_hash=TPM2_ALG.SHA256,
)
self.ectx.policy_auth_value(session)
self.ectx.policy_command_code(session, TPM2_CC.Duplicate)
policyDigest = self.ectx.policy_get_digest(session)
self.assertTrue(type(policyDigest), TPM2B_DIGEST)
def test_rewrap(self):
sym = TPMT_SYM_DEF(
algorithm=TPM2_ALG.XOR,
keyBits=TPMU_SYM_KEY_BITS(exclusiveOr=TPM2_ALG.SHA256),
mode=TPMU_SYM_MODE(aes=TPM2_ALG.CFB),
)
session = self.ectx.start_auth_session(
tpm_key=ESYS_TR.NONE,
bind=ESYS_TR.NONE,
session_type=TPM2_SE.TRIAL,
symmetric=sym,
auth_hash=TPM2_ALG.SHA256,
)
self.ectx.policy_auth_value(session)
self.ectx.policy_command_code(session, TPM2_CC.Duplicate)
policyDigest = self.ectx.policy_get_digest(session)
self.ectx.flush_context(session)
session = None
inPublic = TPM2B_PUBLIC(
TPMT_PUBLIC.parse(
alg="rsa2048",
objectAttributes=TPMA_OBJECT.USERWITHAUTH
| TPMA_OBJECT.RESTRICTED
| TPMA_OBJECT.DECRYPT
| TPMA_OBJECT.FIXEDTPM
| TPMA_OBJECT.FIXEDPARENT
| TPMA_OBJECT.SENSITIVEDATAORIGIN,
)
)
inSensitive = TPM2B_SENSITIVE_CREATE()
primary1, _, _, _, _ = self.ectx.create_primary(inSensitive, inPublic)
primary2, _, _, _, _ = self.ectx.create_primary(inSensitive, inPublic)
inPublic = TPM2B_PUBLIC(
TPMT_PUBLIC.parse(
alg="rsa2048:aes128cfb",
objectAttributes=TPMA_OBJECT.USERWITHAUTH
| TPMA_OBJECT.RESTRICTED
| TPMA_OBJECT.DECRYPT
| TPMA_OBJECT.SENSITIVEDATAORIGIN,
)
)
inPublic.publicArea.authPolicy = policyDigest
priv, pub, _, _, _ = self.ectx.create(primary1, inSensitive, inPublic)
childHandle = self.ectx.load(primary1, priv, pub)
session = self.ectx.start_auth_session(
tpm_key=ESYS_TR.NONE,
bind=ESYS_TR.NONE,
session_type=TPM2_SE.POLICY,
symmetric=sym,
auth_hash=TPM2_ALG.SHA256,
)
self.ectx.policy_auth_value(session)
self.ectx.policy_command_code(session, TPM2_CC.Duplicate)
encryptionKey = TPM2B_DATA("is sixteen bytes")
sym = TPMT_SYM_DEF_OBJECT(
algorithm=TPM2_ALG.AES,
keyBits=TPMU_SYM_KEY_BITS(aes=128),
mode=TPMU_SYM_MODE(aes=TPM2_ALG.CFB),
)
_, duplicate, symSeed = self.ectx.duplicate(
childHandle, primary2, encryptionKey, sym, session1=session
)
keyName = pub.publicArea.get_name()
duplicate, symSeed = self.ectx.rewrap(
primary2, primary1, duplicate, keyName, symSeed
)
self.assertEqual(type(duplicate), TPM2B_PRIVATE)
self.assertEqual(type(symSeed), TPM2B_ENCRYPTED_SECRET)
with self.assertRaises(TypeError):
self.ectx.rewrap(67.3, primary1, duplicate, keyName, symSeed)
with self.assertRaises(TypeError):
self.ectx.rewrap(primary2, object(), duplicate, keyName, symSeed)
with self.assertRaises(TypeError):
self.ectx.rewrap(primary2, primary1, TPM2B_NAME(), keyName, symSeed)
with self.assertRaises(TypeError):
self.ectx.rewrap(primary2, primary1, duplicate, TPM2B_PRIVATE(), symSeed)
with self.assertRaises(TypeError):
self.ectx.rewrap(
primary2, primary1, duplicate, keyName, symSeed, session1="goo"
)
with self.assertRaises(TypeError):
self.ectx.rewrap(
primary2, primary1, duplicate, keyName, symSeed, session2=45.6
)
with self.assertRaises(TypeError):
self.ectx.rewrap(
primary2, primary1, duplicate, keyName, symSeed, sesion3=object()
)
def test_import(self):
sym = TPMT_SYM_DEF(
algorithm=TPM2_ALG.XOR,
keyBits=TPMU_SYM_KEY_BITS(exclusiveOr=TPM2_ALG.SHA256),
mode=TPMU_SYM_MODE(aes=TPM2_ALG.CFB),
)
session = self.ectx.start_auth_session(
tpm_key=ESYS_TR.NONE,
bind=ESYS_TR.NONE,
session_type=TPM2_SE.TRIAL,
symmetric=sym,
auth_hash=TPM2_ALG.SHA256,
)
self.ectx.policy_auth_value(session)
self.ectx.policy_command_code(session, TPM2_CC.Duplicate)
policyDigest = self.ectx.policy_get_digest(session)
self.ectx.flush_context(session)
session = None
inPublic = TPM2B_PUBLIC(
TPMT_PUBLIC.parse(
alg="rsa2048",
objectAttributes=TPMA_OBJECT.USERWITHAUTH
| TPMA_OBJECT.RESTRICTED
| TPMA_OBJECT.DECRYPT
| TPMA_OBJECT.FIXEDTPM
| TPMA_OBJECT.FIXEDPARENT
| TPMA_OBJECT.SENSITIVEDATAORIGIN,
)
)
inSensitive = TPM2B_SENSITIVE_CREATE()
primary1, _, _, _, _ = self.ectx.create_primary(inSensitive, inPublic)
primary2, _, _, _, _ = self.ectx.create_primary(inSensitive, inPublic)
inPublic = TPM2B_PUBLIC(
TPMT_PUBLIC.parse(
alg="rsa2048:aes128cfb",
objectAttributes=TPMA_OBJECT.USERWITHAUTH
| TPMA_OBJECT.RESTRICTED
| TPMA_OBJECT.DECRYPT
| TPMA_OBJECT.SENSITIVEDATAORIGIN,
)
)
inPublic.publicArea.authPolicy = policyDigest
priv, pub, _, _, _ = self.ectx.create(primary1, inSensitive, inPublic)
childHandle = self.ectx.load(primary1, priv, pub)
session = self.ectx.start_auth_session(
tpm_key=ESYS_TR.NONE,
bind=ESYS_TR.NONE,
session_type=TPM2_SE.POLICY,
symmetric=sym,
auth_hash=TPM2_ALG.SHA256,
)
self.ectx.policy_auth_value(session)
self.ectx.policy_command_code(session, TPM2_CC.Duplicate)
sym = TPMT_SYM_DEF_OBJECT(algorithm=TPM2_ALG.NULL,)
encryptionKey, duplicate, symSeed = self.ectx.duplicate(
childHandle, primary2, None, sym, session1=session
)
private = self.ectx.import_(
primary1, encryptionKey, pub, duplicate, symSeed, sym
)
self.assertEqual(type(private), TPM2B_PRIVATE)
with self.assertRaises(TypeError):
self.ectx.import_(98.5, encryptionKey, pub, duplicate, symSeed, sym)
with self.assertRaises(TypeError):
self.ectx.import_(primary1, TPM2B_ECC_POINT(), pub, duplicate, symSeed, sym)
with self.assertRaises(TypeError):
self.ectx.import_(
primary1, encryptionKey, TPM2B_DATA(), duplicate, symSeed, sym
)
with self.assertRaises(TypeError):
self.ectx.import_(primary1, encryptionKey, pub, object(), symSeed, sym)
with self.assertRaises(TypeError):
self.ectx.import_(primary1, encryptionKey, pub, duplicate, None, sym)
with self.assertRaises(TypeError):
self.ectx.import_(
primary1, encryptionKey, pub, duplicate, symSeed, TPM2B_PUBLIC()
)
with self.assertRaises(TypeError):
self.ectx.import_(
primary1, encryptionKey, pub, duplicate, symSeed, sym, session1="boo"
)
with self.assertRaises(TypeError):
self.ectx.import_(
primary1, encryptionKey, pub, duplicate, symSeed, sym, session2=object()
)
with self.assertRaises(TypeError):
self.ectx.import_(
primary1, encryptionKey, pub, duplicate, symSeed, sym, session3=4.5
)
def test_quote(self):
inPublic = TPM2B_PUBLIC(
TPMT_PUBLIC.parse(
alg="ecc:ecdsa",
objectAttributes=TPMA_OBJECT.SIGN_ENCRYPT
| TPMA_OBJECT.FIXEDPARENT
| TPMA_OBJECT.FIXEDTPM
| TPMA_OBJECT.USERWITHAUTH
| TPMA_OBJECT.SENSITIVEDATAORIGIN,
)
)
inSensitive = TPM2B_SENSITIVE_CREATE(TPMS_SENSITIVE_CREATE())
parentHandle = self.ectx.create_primary(inSensitive, inPublic)[0]
quote, signature = self.ectx.quote(
parentHandle, "sha256:1,2,3,4", TPM2B_DATA(b"123456789")
)
self.assertTrue(type(quote), TPM2B_ATTEST)
self.assertTrue(type(signature), TPMT_SIGNATURE)
quote, signature = self.ectx.quote(
parentHandle, TPML_PCR_SELECTION.parse("sha256:1,2,3,4"), TPM2B_DATA()
)
self.assertTrue(type(quote), TPM2B_ATTEST)
self.assertTrue(type(signature), TPMT_SIGNATURE)
quote, signature = self.ectx.quote(
parentHandle,
"sha256:1,2,3,4",
TPM2B_DATA(),
in_scheme=TPMT_SIG_SCHEME(scheme=TPM2_ALG.NULL),
)
self.assertTrue(type(quote), TPM2B_ATTEST)
self.assertTrue(type(signature), TPMT_SIGNATURE)
with self.assertRaises(TypeError):
self.ectx.quote(42.0, "sha256:1,2,3,4", TPM2B_DATA())
with self.assertRaises(TypeError):
self.ectx.quote(parentHandle, b"sha256:1,2,3,4")
with self.assertRaises(TypeError):
self.ectx.quote(parentHandle, "sha256:1,2,3,4", qualifying_data=object())
with self.assertRaises(TypeError):
self.ectx.quote(parentHandle, "sha256:1,2,3,4", in_scheme=87)
with self.assertRaises(TypeError):
self.ectx.quote(parentHandle, "sha256:1,2,3,4", session1="foo")
with self.assertRaises(TypeError):
self.ectx.quote(parentHandle, "sha256:1,2,3,4", session2=25.68)
with self.assertRaises(TypeError):
self.ectx.quote(parentHandle, "sha256:1,2,3,4", session3=object())
def test_get_session_audit_digest(self):
inPublic = TPM2B_PUBLIC(
TPMT_PUBLIC.parse(
alg="rsa2048:rsassa:null",
objectAttributes=TPMA_OBJECT.SIGN_ENCRYPT
| TPMA_OBJECT.FIXEDPARENT
| TPMA_OBJECT.FIXEDTPM
| TPMA_OBJECT.USERWITHAUTH
| TPMA_OBJECT.SENSITIVEDATAORIGIN
| TPMA_OBJECT.RESTRICTED,
)
)
inSensitive = TPM2B_SENSITIVE_CREATE(TPMS_SENSITIVE_CREATE())
signHandle = self.ectx.create_primary(inSensitive, inPublic)[0]
sym = TPMT_SYM_DEF(algorithm=TPM2_ALG.NULL,)
session = self.ectx.start_auth_session(
tpm_key=ESYS_TR.NONE,
bind=ESYS_TR.NONE,
session_type=TPM2_SE.HMAC,
symmetric=sym,
auth_hash=TPM2_ALG.SHA256,
)
self.ectx.trsess_set_attributes(
session, TPMA_SESSION.AUDIT | TPMA_SESSION.CONTINUESESSION
)
self.ectx.get_capability(
TPM2_CAP.COMMANDS, TPM2_CC.FIRST, TPM2_MAX.CAP_CC, session1=session
)
auditInfo, signature = self.ectx.get_session_audit_digest(
signHandle, session, b"1234"
)
self.assertEqual(type(auditInfo), TPM2B_ATTEST)
self.assertEqual(type(signature), TPMT_SIGNATURE)
with self.assertRaises(TypeError):
self.ectx.get_session_audit_digest(45.89, session, b"1234")
with self.assertRaises(TypeError):
self.ectx.get_session_audit_digest(signHandle, object(), b"1234")
with self.assertRaises(TypeError):
self.ectx.get_session_audit_digest(signHandle, session, list())
with self.assertRaises(TypeError):
self.ectx.get_session_audit_digest(
signHandle, session, b"1234", privacy_admin_handle=45.6
)
with self.assertRaises(ValueError):
self.ectx.get_session_audit_digest(
signHandle, session, b"1234", privacy_admin_handle=ESYS_TR.LOCKOUT
)
with self.assertRaises(TypeError):
self.ectx.get_session_audit_digest(
signHandle, session, b"1234", session1="baz"
)
with self.assertRaises(TypeError):
self.ectx.get_session_audit_digest(
signHandle, session, b"1234", session2=object()
)
with self.assertRaises(TypeError):
self.ectx.get_session_audit_digest(
signHandle, session, b"1234", session3=12.723
)
def test_pp_commands(self):
with self.assertRaises(TSS2_Exception) as e:
self.ectx.pp_commands(TPML_CC(), TPML_CC(), session1=ESYS_TR.PASSWORD)
self.assertEqual(e.exception.error, TPM2_RC.PP)
self.assertEqual(e.exception.session, 1)
with self.assertRaises(TypeError):
self.ectx.pp_commands(b"bad setList", TPML_CC(), session1=ESYS_TR.PASSWORD)
with self.assertRaises(TypeError):
self.ectx.pp_commands(TPML_CC(), None, session1=ESYS_TR.PASSWORD)
with self.assertRaises(TypeError):
self.ectx.pp_commands(TPML_CC(), TPML_CC(), session1=b"0xF1F1")
with self.assertRaises(TypeError):
self.ectx.pp_commands(TPML_CC(), TPML_CC(), session2=b"0xF1F1")
with self.assertRaises(TypeError):
self.ectx.pp_commands(TPML_CC(), TPML_CC(), session3=b"0xF1F1")
with self.assertRaises(TypeError):
self.ectx.pp_commands(TPML_CC(), TPML_CC(), authHandle="platform")
def test_set_algorithm_set(self):
self.ectx.set_algorithm_set(0)
with self.assertRaises(TypeError):
self.ectx.set_algorithm_set([1, 2, 3])
with self.assertRaises(TypeError):
self.ectx.set_algorithm_set(session2=set(3, 2, 1))
with self.assertRaises(TypeError):
self.ectx.set_algorithm_set(session1=set(4, 3, 2))
with self.assertRaises(TypeError):
self.ectx.set_algorithm_set(session3=set(5, 4, 3))
with self.assertRaises(TypeError):
self.ectx.set_algorithm_set(auth_handle=None)
def test_dictionary_attack_lock_reset(self):
self.ectx.dictionary_attack_lock_reset()
with self.assertRaises(ValueError):
self.ectx.dictionary_attack_lock_reset(lock_handle=ESYS_TR.RH_OWNER)
with self.assertRaises(TypeError):
self.ectx.dictionary_attack_lock_reset([1, 2, 3])
with self.assertRaises(TypeError):
self.ectx.dictionary_attack_lock_reset(session2=set(3, 2, 1))
with self.assertRaises(TypeError):
self.ectx.dictionary_attack_lock_reset(session1=set(4, 3, 2))
with self.assertRaises(TypeError):
self.ectx.dictionary_attack_lock_reset(session3=set(5, 4, 3))
with self.assertRaises(TypeError):
self.ectx.dictionary_attack_lock_reset(lock_handle=None)
def test_dictionary_attack_parameters(self):
self.ectx.dictionary_attack_parameters(1, 2, 3)
with self.assertRaises(TypeError):
self.ectx.dictionary_attack_parameters(None, 2, 3)
with self.assertRaises(TypeError):
self.ectx.dictionary_attack_parameters(1, None, 3)
with self.assertRaises(TypeError):
self.ectx.dictionary_attack_parameters(1, 2, None)
with self.assertRaises(TypeError):
self.ectx.dictionary_attack_parameters(1, 2, 3, session2=set(3, 2, 1))
with self.assertRaises(TypeError):
self.ectx.dictionary_attack_parameters(1, 2, 3, session1=set(4, 3, 2))
with self.assertRaises(TypeError):
self.ectx.dictionary_attack_parameters(1, 2, 3, session3=set(5, 4, 3))
with self.assertRaises(TypeError):
self.ectx.dictionary_attack_parameters(1, 2, 3, lock_handle=None)
def test_get_command_audit_digest(self):
inPublic = TPM2B_PUBLIC(
TPMT_PUBLIC.parse(
alg="rsa2048:rsassa:null",
objectAttributes=TPMA_OBJECT.SIGN_ENCRYPT
| TPMA_OBJECT.FIXEDPARENT
| TPMA_OBJECT.FIXEDTPM
| TPMA_OBJECT.USERWITHAUTH
| TPMA_OBJECT.SENSITIVEDATAORIGIN
| TPMA_OBJECT.RESTRICTED,
)
)
signHandle = self.ectx.create_primary(TPM2B_SENSITIVE_CREATE(), inPublic)[0]
sym = TPMT_SYM_DEF(
algorithm=TPM2_ALG.XOR,
keyBits=TPMU_SYM_KEY_BITS(exclusiveOr=TPM2_ALG.SHA256),
mode=TPMU_SYM_MODE(aes=TPM2_ALG.CFB),
)
session = self.ectx.start_auth_session(
tpm_key=ESYS_TR.NONE,
bind=ESYS_TR.NONE,
session_type=TPM2_SE.HMAC,
symmetric=sym,
auth_hash=TPM2_ALG.SHA256,
)
self.ectx.trsess_set_attributes(
session, TPMA_SESSION.AUDIT | TPMA_SESSION.CONTINUESESSION
)
self.ectx.get_capability(
TPM2_CAP.COMMANDS, TPM2_CC.FIRST, TPM2_MAX.CAP_CC, session1=session
)
auditInfo, signature = self.ectx.get_command_audit_digest(
signHandle, b"12345678"
)
self.assertEqual(type(auditInfo), TPM2B_ATTEST)
self.assertEqual(type(signature), TPMT_SIGNATURE)
with self.assertRaises(TypeError):
self.ectx.get_command_audit_digest(45.89, b"1234")
with self.assertRaises(TypeError):
self.ectx.get_command_audit_digest(signHandle, b"1234", list())
with self.assertRaises(TypeError):
self.ectx.get_command_audit_digest(signHandle, b"1234", privacy_handle=45.6)
with self.assertRaises(ValueError):
self.ectx.get_command_audit_digest(
signHandle, b"1234", privacy_handle=ESYS_TR.LOCKOUT
)
with self.assertRaises(TypeError):
self.ectx.get_command_audit_digest(signHandle, b"1234", session1="baz")
with self.assertRaises(TypeError):
self.ectx.get_command_audit_digest(signHandle, b"1234", session2=object())
with self.assertRaises(TypeError):
self.ectx.get_command_audit_digest(signHandle, b"1234", session3=12.723)
def test_get_time(self):
inPublic = TPM2B_PUBLIC.parse(
alg="rsa2048:rsassa:null",
objectAttributes=TPMA_OBJECT.SIGN_ENCRYPT
| TPMA_OBJECT.FIXEDPARENT
| TPMA_OBJECT.FIXEDTPM
| TPMA_OBJECT.USERWITHAUTH
| TPMA_OBJECT.SENSITIVEDATAORIGIN
| TPMA_OBJECT.RESTRICTED,
)
inSensitive = TPM2B_SENSITIVE_CREATE(TPMS_SENSITIVE_CREATE())
signHandle = self.ectx.create_primary(inSensitive, inPublic)[0]
auditInfo, signature = self.ectx.get_time(signHandle, b"12345678")
self.assertTrue(type(auditInfo), TPM2B_ATTEST)
self.assertTrue(type(signature), TPMT_SIGNATURE)
scheme = TPMT_SIG_SCHEME(scheme=TPM2_ALG.RSASSA)
scheme.details.rsassa.hashAlg = TPM2_ALG.SHA256
auditInfo, signature = self.ectx.get_time(
signHandle, b"12345678", in_scheme=scheme
)
self.assertTrue(type(auditInfo), TPM2B_ATTEST)
self.assertTrue(type(signature), TPMT_SIGNATURE)
with self.assertRaises(TypeError):
self.ectx.get_time(45.89, b"1234")
with self.assertRaises(TypeError):
self.ectx.get_time(signHandle, list())
with self.assertRaises(TypeError):
self.ectx.get_time(signHandle, b"1234", privacy_admin_handle=45.6)
with self.assertRaises(ValueError):
self.ectx.get_time(
signHandle, b"1234", privacy_admin_handle=ESYS_TR.LOCKOUT
)
with self.assertRaises(TypeError):
self.ectx.get_time(signHandle, b"1234", session1="baz")
with self.assertRaises(TypeError):
self.ectx.get_time(signHandle, b"1234", session2=object())
with self.assertRaises(TypeError):
self.ectx.get_time(signHandle, b"1234", session3=12.723)
def test_commit(self):
p = TPM2B_PUBLIC.parse(
"ecc:ecdaa",
(
TPMA_OBJECT.USERWITHAUTH
| TPMA_OBJECT.SIGN_ENCRYPT
| TPMA_OBJECT.FIXEDTPM
| TPMA_OBJECT.FIXEDPARENT
| TPMA_OBJECT.SENSITIVEDATAORIGIN
),
)
signHandle = self.ectx.create_primary(TPM2B_SENSITIVE_CREATE(), p)[0]
P1 = TPM2B_ECC_POINT()
s2 = TPM2B_SENSITIVE_DATA()
y2 = TPM2B_ECC_PARAMETER()
K, L, E, counter = self.ectx.commit(signHandle, P1, s2, y2)
self.assertEqual(type(K), TPM2B_ECC_POINT)
self.assertEqual(type(L), TPM2B_ECC_POINT)
self.assertEqual(type(E), TPM2B_ECC_POINT)
self.assertEqual(0, counter)
with self.assertRaises(TypeError):
self.ectx.commit("nope", P1, s2, y2)
with self.assertRaises(TypeError):
self.ectx.commit(signHandle, list(), s2, y2)
with self.assertRaises(TypeError):
self.ectx.commit(signHandle, P1, TPM2B_SENSITIVE_DATA, y2)
with self.assertRaises(TypeError):
self.ectx.commit(signHandle, P1, s2, 16)
with self.assertRaises(TypeError):
self.ectx.commit(signHandle, P1, s2, y2, session1="baz")
with self.assertRaises(TypeError):
self.ectx.commit(signHandle, P1, s2, y2, session2=object())
with self.assertRaises(TypeError):
self.ectx.commit(signHandle, P1, s2, y2, session3=67.5)
def test_sign(self):
sign_handle = self.ectx.create_primary(
TPM2B_SENSITIVE_CREATE(),
TPM2B_PUBLIC.parse(
"rsa",
(
TPMA_OBJECT.USERWITHAUTH
| TPMA_OBJECT.SIGN_ENCRYPT
| TPMA_OBJECT.FIXEDTPM
| TPMA_OBJECT.FIXEDPARENT
| TPMA_OBJECT.SENSITIVEDATAORIGIN
),
),
)[0]
digest = b"0123456789abcdef0987654321fedcba"
scheme = TPMT_SIG_SCHEME(scheme=TPM2_ALG.RSAPSS)
scheme.details.any.hashAlg = TPM2_ALG.SHA256
validation = TPMT_TK_HASHCHECK(tag=TPM2_ST.HASHCHECK, hierarchy=TPM2_RH.OWNER)
signature = self.ectx.sign(sign_handle, digest, scheme, validation)
self.assertEqual(type(signature), TPMT_SIGNATURE)
signature = self.ectx.sign(
sign_handle, TPM2B_DIGEST(digest), scheme, validation
)
self.assertEqual(type(signature), TPMT_SIGNATURE)
with self.assertRaises(TypeError):
self.ectx.sign("not valid", digest, scheme, validation)
with self.assertRaises(TypeError):
self.ectx.sign(sign_handle, object, scheme, validation)
with self.assertRaises(TypeError):
self.ectx.sign(sign_handle, digest, "not a scheme", validation)
with self.assertRaises(TypeError):
self.ectx.sign(sign_handle, digest, scheme, list())
with self.assertRaises(TypeError):
self.ectx.sign(sign_handle, digest, scheme, validation, session1="baz")
with self.assertRaises(TypeError):
self.ectx.sign(sign_handle, digest, scheme, validation, session2=56.5)
with self.assertRaises(TypeError):
self.ectx.sign(sign_handle, digest, scheme, validation, session3=object())
def test_verify_signature(self):
sign_handle = self.ectx.create_primary(
TPM2B_SENSITIVE_CREATE(),
TPM2B_PUBLIC.parse(
"rsa",
(
TPMA_OBJECT.USERWITHAUTH
| TPMA_OBJECT.SIGN_ENCRYPT
| TPMA_OBJECT.FIXEDTPM
| TPMA_OBJECT.FIXEDPARENT
| TPMA_OBJECT.SENSITIVEDATAORIGIN
),
),
)[0]
digest = b"0123456789abcdef0987654321fedcba"
scheme = TPMT_SIG_SCHEME(scheme=TPM2_ALG.RSAPSS)
scheme.details.any.hashAlg = TPM2_ALG.SHA256
validation = TPMT_TK_HASHCHECK(tag=TPM2_ST.HASHCHECK, hierarchy=TPM2_RH.OWNER)
signature = self.ectx.sign(sign_handle, digest, scheme, validation)
verified = self.ectx.verify_signature(sign_handle, digest, signature)
self.assertEqual(type(verified), TPMT_TK_VERIFIED)
verified = self.ectx.verify_signature(
sign_handle, TPM2B_DIGEST(digest), signature
)
self.assertEqual(type(verified), TPMT_TK_VERIFIED)
with self.assertRaises(TypeError):
self.ectx.verify_signature("nope", digest, signature)
with self.assertRaises(TypeError):
self.ectx.verify_signature(sign_handle, object(), signature)
with self.assertRaises(TypeError):
self.ectx.verify_signature(sign_handle, digest, 12.56)
with self.assertRaises(TypeError):
self.ectx.verify_signature(sign_handle, digest, signature, session1="baz")
with self.assertRaises(TypeError):
self.ectx.verify_signature(sign_handle, digest, signature, session2=12.3)
with self.assertRaises(TypeError):
self.ectx.verify_signature(sign_handle, digest, signature, session3={})
def test_set_command_code_audit_status(self):
self.ectx.set_command_code_audit_status(TPM2_ALG.SHA256, TPML_CC(), TPML_CC())
with self.assertRaises(TypeError):
self.ectx.set_command_code_audit_status(42.6, TPML_CC(), TPML_CC())
with self.assertRaises(ValueError):
self.ectx.set_command_code_audit_status(42, TPML_CC(), TPML_CC())
with self.assertRaises(TypeError):
self.ectx.set_command_code_audit_status(
TPM2_ALG.SHA256, TPML_ALG(), TPML_CC()
)
with self.assertRaises(TypeError):
self.ectx.set_command_code_audit_status(
TPM2_ALG.SHA256, TPML_CC(), object()
)
with self.assertRaises(TypeError):
self.ectx.set_command_code_audit_status(
TPM2_ALG.SHA256, TPML_CC(), TPML_CC(), auth=45.6
)
with self.assertRaises(ValueError):
self.ectx.set_command_code_audit_status(
TPM2_ALG.SHA256, TPML_CC(), TPML_CC(), auth=ESYS_TR.ENDORSEMENT
)
with self.assertRaises(TypeError):
self.ectx.set_command_code_audit_status(
TPM2_ALG.SHA256, TPML_CC(), TPML_CC(), session1=45.6
)
with self.assertRaises(TypeError):
self.ectx.set_command_code_audit_status(
TPM2_ALG.SHA256, TPML_CC(), TPML_CC(), session2="baz"
)
with self.assertRaises(TypeError):
self.ectx.set_command_code_audit_status(
TPM2_ALG.SHA256, TPML_CC(), TPML_CC(), session3=[]
)
def test_pcr_extend(self):
digests = TPML_DIGEST_VALUES(
[
TPMT_HA(
hashAlg=TPM2_ALG.SHA1, digest=TPMU_HA(sha1=b"0123456789abcdeffedc")
),
TPMT_HA(
hashAlg=TPM2_ALG.SHA256,
digest=TPMU_HA(sha256=b"0123456789abcdeffedcba9876543210"),
),
]
)
self.ectx.pcr_extend(ESYS_TR.PCR16, digests)
def test_pcr_event(self):
digests = self.ectx.pcr_event(ESYS_TR.PCR0, b"01234567890123456789")
self.assertEqual(type(digests), TPML_DIGEST_VALUES)
digests = self.ectx.pcr_event(
ESYS_TR.PCR0, TPM2B_EVENT(b"01234567890123456789")
)
self.assertEqual(type(digests), TPML_DIGEST_VALUES)
with self.assertRaises(TypeError):
self.ectx.pcr_event("foo", b"01234567890123456789")
with self.assertRaises(TypeError):
self.ectx.pcr_event(ESYS_TR.PCR0, object)
with self.assertRaises(TypeError):
self.ectx.pcr_event(ESYS_TR.PCR0, b"01234567890123456789", session1="bar")
with self.assertRaises(TypeError):
self.ectx.pcr_event(
ESYS_TR.PCR0, b"01234567890123456789", session2=object()
)
with self.assertRaises(TypeError):
self.ectx.pcr_event(
ESYS_TR.PCR0, b"01234567890123456789", session3=TPML_ALG()
)
def test_pcr_allocate(self):
pcrsels = TPML_PCR_SELECTION.parse("sha1:3+sha256:all")
success, max_, needed, available = self.ectx.pcr_allocate(pcrsels)
self.assertEqual(type(success), bool)
self.assertEqual(type(max_), int)
self.assertEqual(type(needed), int)
self.assertEqual(type(available), int)
with self.assertRaises(TypeError):
self.ectx.pcr_allocate(object)
with self.assertRaises(TypeError):
self.ectx.pcr_allocate(auth_handle="foo")
with self.assertRaises(ValueError):
self.ectx.pcr_allocate(pcrsels, auth_handle=ESYS_TR.OWNER)
with self.assertRaises(TypeError):
self.ectx.pcr_allocate(pcrsels, session1="bar")
with self.assertRaises(TypeError):
self.ectx.pcr_allocate(pcrsels, session2=12.3)
with self.assertRaises(TypeError):
self.ectx.pcr_allocate(pcrsels, session3=object())
def test_pcr_set_auth_policy(self):
policy = b"0123456789ABCDEF0123456789ABCDEF"
self.ectx.pcr_set_auth_policy(policy, TPM2_ALG.SHA256, ESYS_TR.PCR20)
with self.assertRaises(TypeError):
self.ectx.pcr_set_auth_policy(object, TPM2_ALG.SHA256, ESYS_TR.PCR20)
with self.assertRaises(TypeError):
self.ectx.pcr_set_auth_policy(policy, "bar", ESYS_TR.PCR20)
with self.assertRaises(ValueError):
self.ectx.pcr_set_auth_policy(policy, 42, ESYS_TR.PCR20)
with self.assertRaises(TypeError):
self.ectx.pcr_set_auth_policy(policy, TPM2_ALG.SHA256, "baz")
with self.assertRaises(ValueError):
self.ectx.pcr_set_auth_policy(policy, TPM2_ALG.SHA256, 42)
with self.assertRaises(TypeError):
self.ectx.pcr_set_auth_policy(
policy, TPM2_ALG.SHA256, ESYS_TR.PCR20, auth_handle="foo"
)
with self.assertRaises(ValueError):
self.ectx.pcr_set_auth_policy(
policy, TPM2_ALG.SHA256, ESYS_TR.PCR20, auth_handle=ESYS_TR.OWNER
)
with self.assertRaises(TypeError):
self.ectx.pcr_set_auth_policy(
policy, TPM2_ALG.SHA256, ESYS_TR.PCR20, session1="bar"
)
with self.assertRaises(TypeError):
self.ectx.pcr_set_auth_policy(
policy, TPM2_ALG.SHA256, ESYS_TR.PCR20, session2=12.3
)
with self.assertRaises(TypeError):
self.ectx.pcr_set_auth_policy(
policy, TPM2_ALG.SHA256, ESYS_TR.PCR20, session3=object()
)
def test_pcr_set_auth_value(self):
self.ectx.pcr_set_auth_value(ESYS_TR.PCR20, b"password")
self.ectx.set_auth(ESYS_TR.PCR20, b"password")
self.ectx.pcr_set_auth_value(ESYS_TR.PCR20, "password")
self.ectx.set_auth(ESYS_TR.PCR20, "password")
self.ectx.pcr_set_auth_value(ESYS_TR.PCR20, TPM2B_DIGEST("password"))
with self.assertRaises(TypeError):
self.ectx.pcr_set_auth_value("bar", b"password")
with self.assertRaises(ValueError):
self.ectx.pcr_set_auth_value(42, b"password")
with self.assertRaises(TypeError):
self.ectx.pcr_set_auth_value(ESYS_TR.PCR20, object())
with self.assertRaises(TypeError):
self.ectx.pcr_set_auth_value(ESYS_TR.PCR20, b"password", session1="bar")
with self.assertRaises(TypeError):
self.ectx.pcr_set_auth_value(ESYS_TR.PCR20, b"password", session2={})
with self.assertRaises(TypeError):
self.ectx.pcr_set_auth_value(ESYS_TR.PCR20, b"password", session3=43.2)
def test_pcr_reset(self):
self.ectx.pcr_reset(ESYS_TR.PCR16)
with self.assertRaises(TypeError):
self.ectx.pcr_reset(42.0)
with self.assertRaises(ValueError):
self.ectx.pcr_reset(42)
with self.assertRaises(TypeError):
self.ectx.pcr_reset(ESYS_TR.PCR20, session1="bar")
with self.assertRaises(TypeError):
self.ectx.pcr_reset(ESYS_TR.PCR20, session2=object())
with self.assertRaises(TypeError):
self.ectx.pcr_reset(ESYS_TR.PCR20, session3=45.6)
def test_policy_signed(self):
handle = self.ectx.create_primary(
TPM2B_SENSITIVE_CREATE(),
TPM2B_PUBLIC.parse(
"rsa:rsapss:null",
TPMA_OBJECT.USERWITHAUTH
| TPMA_OBJECT.SIGN_ENCRYPT
| TPMA_OBJECT.FIXEDTPM
| TPMA_OBJECT.FIXEDPARENT
| TPMA_OBJECT.SENSITIVEDATAORIGIN,
),
)[0]
sym = TPMT_SYM_DEF(algorithm=TPM2_ALG.NULL)
session = self.ectx.start_auth_session(
tpm_key=ESYS_TR.NONE,
bind=ESYS_TR.NONE,
session_type=TPM2_SE.POLICY,
symmetric=sym,
auth_hash=TPM2_ALG.SHA256,
)
nonce = self.ectx.trsess_get_nonce_tpm(session)
sequence = self.ectx.hash_sequence_start(None, TPM2_ALG.SHA256)
self.ectx.sequence_update(sequence, TPM2B_MAX_BUFFER(bytes(nonce)))
# 10 year expiration
expiration = -(10 * 365 * 24 * 60 * 60)
expbytes = expiration.to_bytes(4, byteorder="big", signed=True)
digest = self.ectx.sequence_complete(sequence, expbytes, ESYS_TR.OWNER)[0]
scheme = TPMT_SIG_SCHEME(scheme=TPM2_ALG.NULL)
hash_validation = TPMT_TK_HASHCHECK(
tag=TPM2_ST.HASHCHECK, hierarchy=TPM2_RH.OWNER
)
signature = self.ectx.sign(handle, digest, scheme, hash_validation)
timeout, policy_ticket = self.ectx.policy_signed(
handle, session, nonce, b"", b"", expiration, signature
)
self.assertEqual(type(timeout), TPM2B_TIMEOUT)
self.assertEqual(type(policy_ticket), TPMT_TK_AUTH)
with self.assertRaises(TypeError):
self.ectx.policy_signed(
"baz", session, nonce, b"", b"", expiration, signature
)
with self.assertRaises(TypeError):
self.ectx.policy_signed(
handle, 56.6, nonce, b"", b"", expiration, signature
)
with self.assertRaises(TypeError):
self.ectx.policy_signed(
handle, session, object(), b"", b"", expiration, signature
)
with self.assertRaises(TypeError):
self.ectx.policy_signed(
handle, session, nonce, TPM2B_PUBLIC(), b"", expiration, signature
)
with self.assertRaises(TypeError):
self.ectx.policy_signed(
handle, session, nonce, b"", [], expiration, signature
)
with self.assertRaises(TypeError):
self.ectx.policy_signed(
handle, session, nonce, b"", b"", object(), signature
)
with self.assertRaises(TypeError):
self.ectx.policy_signed(
handle, session, nonce, b"", b"", expiration, "signature"
)
with self.assertRaises(TypeError):
self.ectx.policy_signed(
handle, session, nonce, b"", b"", expiration, signature, session1="bar"
)
with self.assertRaises(TypeError):
self.ectx.policy_signed(
handle,
session,
nonce,
b"",
b"",
expiration,
signature,
session2=object(),
)
with self.assertRaises(TypeError):
self.ectx.policy_signed(
handle, session, nonce, b"", b"", expiration, signature, session3=56.6
)
def test_hierarchy_control(self):
self.ectx.hierarchy_control(
ESYS_TR.RH_ENDORSEMENT, ESYS_TR.RH_ENDORSEMENT, False
)
with self.assertRaises(ValueError):
self.ectx.hierarchy_control(ESYS_TR.RH_NULL, ESYS_TR.RH_ENDORSEMENT, False)
with self.assertRaises(ValueError):
self.ectx.hierarchy_control(ESYS_TR.RH_ENDORSEMENT, ESYS_TR.RH_NULL, False)
with self.assertRaises(TypeError):
self.ectx.hierarchy_control(
ESYS_TR.RH_ENDORSEMENT, ESYS_TR.RH_ENDORSEMENT, b"bad"
)
with self.assertRaises(TypeError):
self.ectx.hierarchy_control(
ESYS_TR.RH_ENDORSEMENT, ESYS_TR.RH_ENDORSEMENT, False, session1=None
)
with self.assertRaises(TypeError):
self.ectx.hierarchy_control(
ESYS_TR.RH_ENDORSEMENT, ESYS_TR.RH_ENDORSEMENT, False, session2=None
)
with self.assertRaises(TypeError):
self.ectx.hierarchy_control(
ESYS_TR.RH_ENDORSEMENT, ESYS_TR.RH_ENDORSEMENT, False, session3=None
)
def test_set_primary_policy(self):
self.ectx.set_primary_policy(
ESYS_TR.RH_ENDORSEMENT, b"\x00" * 32, TPM2_ALG.SHA256
)
with self.assertRaises(TypeError):
self.ectx.set_primary_policy(
ESYS_TR.RH_ENDORSEMENT, b"\x00" * 32, TPM2_ALG.SHA256, session1=None
)
with self.assertRaises(TypeError):
self.ectx.set_primary_policy(
ESYS_TR.RH_ENDORSEMENT, b"\x00" * 32, TPM2_ALG.SHA256, session2=None
)
with self.assertRaises(TypeError):
self.ectx.set_primary_policy(
ESYS_TR.RH_ENDORSEMENT, b"\x00" * 32, TPM2_ALG.SHA256, session3=None
)
with self.assertRaises(ValueError):
self.ectx.set_primary_policy(ESYS_TR.NULL, b"\x00" * 32, TPM2_ALG.SHA256)
with self.assertRaises(TypeError):
self.ectx.set_primary_policy(ESYS_TR.ENDORSEMENT, 123, TPM2_ALG.SHA256)
with self.assertRaises(ValueError):
self.ectx.set_primary_policy(
ESYS_TR.ENDORSEMENT, b"\x00" * 32, TPM2_SE.TRIAL
)
def test_change_pps(self):
self.ectx.change_pps()
with self.assertRaises(TypeError):
self.ectx.change_pps(session1=None)
with self.assertRaises(TypeError):
self.ectx.change_pps(session2=None)
with self.assertRaises(TypeError):
self.ectx.change_pps(session2=None)
with self.assertRaises(ValueError):
self.ectx.change_pps(auth_handle=ESYS_TR.RH_OWNER)
def test_change_eps(self):
self.ectx.change_eps()
with self.assertRaises(TypeError):
self.ectx.change_eps(session1=None)
with self.assertRaises(TypeError):
self.ectx.change_eps(session2=None)
with self.assertRaises(TypeError):
self.ectx.change_eps(session2=None)
with self.assertRaises(ValueError):
self.ectx.change_eps(auth_handle=ESYS_TR.RH_OWNER)
def test_clear(self):
self.ectx.clear(ESYS_TR.RH_LOCKOUT)
with self.assertRaises(TypeError):
self.ectx.clear(ESYS_TR.RH_LOCKOUT, session1=None)
with self.assertRaises(TypeError):
self.ectx.clear(ESYS_TR.RH_LOCKOUT, session2=None)
with self.assertRaises(TypeError):
self.ectx.clear(ESYS_TR.RH_LOCKOUT, session2=None)
with self.assertRaises(ValueError):
self.ectx.clear(auth_handle=ESYS_TR.RH_OWNER)
def test_clearcontrol(self):
self.ectx.clear_control(ESYS_TR.RH_LOCKOUT, True)
self.ectx.clear_control(ESYS_TR.RH_PLATFORM, False)
with self.assertRaises(TypeError):
self.ectx.clear_control(ESYS_TR.RH_LOCKOUT, True, session1=None)
with self.assertRaises(TypeError):
self.ectx.clear_control(ESYS_TR.RH_LOCKOUT, True, session2=None)
with self.assertRaises(TypeError):
self.ectx.clear_control(ESYS_TR.RH_LOCKOUT, True, session3=None)
with self.assertRaises(ValueError):
self.ectx.clear_control(ESYS_TR.RH_OWNER, False)
with self.assertRaises(TypeError):
self.ectx.clear_control(ESYS_TR.RH_LOCKOUT, b"bad")
def test_gettcti(self):
tcti = self.ectx.get_tcti()
self.assertTrue(isinstance(tcti, TCTI))
self.assertEqual(tcti, self.ectx.tcti)
def test_policy_secret(self):
sym = TPMT_SYM_DEF(algorithm=TPM2_ALG.NULL)
session = self.ectx.start_auth_session(
tpm_key=ESYS_TR.NONE,
bind=ESYS_TR.NONE,
session_type=TPM2_SE.TRIAL,
symmetric=sym,
auth_hash=TPM2_ALG.SHA256,
)
nonce = self.ectx.trsess_get_nonce_tpm(session)
expiration = -(10 * 365 * 24 * 60 * 60)
timeout, policyTicket = self.ectx.policy_secret(
ESYS_TR.OWNER, session, nonce, b"", b"", expiration
)
self.assertTrue(type(timeout), TPM2B_TIMEOUT)
self.assertTrue(type(policyTicket), TPMT_TK_AUTH)
with self.assertRaises(TypeError):
self.ectx.policy_secret("owner", session, nonce, b"", b"", expiration)
with self.assertRaises(TypeError):
self.ectx.policy_secret(ESYS_TR.OWNER, 56.7, nonce, b"", b"", expiration)
with self.assertRaises(TypeError):
self.ectx.policy_secret(
ESYS_TR.OWNER, session, object(), b"", b"", expiration
)
with self.assertRaises(TypeError):
self.ectx.policy_secret(
ESYS_TR.OWNER, session, nonce, TPM2B_PUBLIC(), b"", expiration
)
with self.assertRaises(TypeError):
self.ectx.policy_secret(ESYS_TR.OWNER, session, nonce, b"", {}, expiration)
with self.assertRaises(TypeError):
self.ectx.policy_secret(ESYS_TR.OWNER, session, nonce, b"", b"", 42.2)
with self.assertRaises(TypeError):
self.ectx.policy_secret(
ESYS_TR.OWNER, session, nonce, b"", b"", expiration, session1="bar"
)
with self.assertRaises(TypeError):
self.ectx.policy_secret(
ESYS_TR.OWNER, session, nonce, b"", b"", expiration, session2=object()
)
with self.assertRaises(TypeError):
self.ectx.policy_secret(
ESYS_TR.OWNER, session, nonce, b"", b"", expiration, session3=56.7
)
def test_policy_ticket(self):
handle = self.ectx.create_primary(
TPM2B_SENSITIVE_CREATE(),
TPM2B_PUBLIC.parse(
"rsa:rsapss:null",
TPMA_OBJECT.USERWITHAUTH
| TPMA_OBJECT.SIGN_ENCRYPT
| TPMA_OBJECT.FIXEDTPM
| TPMA_OBJECT.FIXEDPARENT
| TPMA_OBJECT.SENSITIVEDATAORIGIN,
),
)[0]
sym = TPMT_SYM_DEF(algorithm=TPM2_ALG.NULL)
session = self.ectx.start_auth_session(
tpm_key=ESYS_TR.NONE,
bind=ESYS_TR.NONE,
session_type=TPM2_SE.POLICY,
symmetric=sym,
auth_hash=TPM2_ALG.SHA256,
)
nonce = self.ectx.trsess_get_nonce_tpm(session)
sequence = self.ectx.hash_sequence_start(None, TPM2_ALG.SHA256)
self.ectx.sequence_update(sequence, TPM2B_MAX_BUFFER(bytes(nonce)))
# 10 year expiration
expiration = -(10 * 365 * 24 * 60 * 60)
expbytes = expiration.to_bytes(4, byteorder="big", signed=True)
digest = self.ectx.sequence_complete(sequence, expbytes, ESYS_TR.OWNER)[0]
scheme = TPMT_SIG_SCHEME(scheme=TPM2_ALG.NULL)
hash_validation = TPMT_TK_HASHCHECK(
tag=TPM2_ST.HASHCHECK, hierarchy=TPM2_RH.OWNER
)
signature = self.ectx.sign(handle, digest, scheme, hash_validation)
timeout, policy_ticket = self.ectx.policy_signed(
handle, session, nonce, b"", b"", expiration, signature
)
self.ectx.flush_context(session)
session = self.ectx.start_auth_session(
tpm_key=ESYS_TR.NONE,
bind=ESYS_TR.NONE,
session_type=TPM2_SE.POLICY,
symmetric=sym,
auth_hash=TPM2_ALG.SHA256,
)
name = self.ectx.tr_get_name(handle)
self.ectx.policy_ticket(session, timeout, b"", b"", name, policy_ticket)
with self.assertRaises(TypeError):
self.ectx.policy_ticket(
"notasession", timeout, b"", b"", name, policy_ticket
)
with self.assertRaises(TypeError):
self.ectx.policy_ticket(session, object(), b"", b"", name, policy_ticket)
with self.assertRaises(TypeError):
self.ectx.policy_ticket(
session, timeout, TPM2B_AUTH, b"", name, policy_ticket
)
with self.assertRaises(TypeError):
self.ectx.policy_ticket(
session, timeout, b"", object(), name, policy_ticket
)
with self.assertRaises(TypeError):
self.ectx.policy_ticket(session, timeout, b"", b"", [], policy_ticket)
with self.assertRaises(TypeError):
self.ectx.policy_ticket(session, timeout, b"", b"", name, 42)
with self.assertRaises(TypeError):
self.ectx.policy_ticket(
session, timeout, b"", b"", name, policy_ticket, session1="bar"
)
with self.assertRaises(TypeError):
self.ectx.policy_ticket(
session, timeout, b"", b"", name, policy_ticket, session2=56.7
)
with self.assertRaises(TypeError):
self.ectx.policy_ticket(
session, timeout, b"", b"", name, policy_ticket, session3=object()
)
def test_policy_or(self):
sym = TPMT_SYM_DEF(algorithm=TPM2_ALG.NULL)
session = self.ectx.start_auth_session(
tpm_key=ESYS_TR.NONE,
bind=ESYS_TR.NONE,
session_type=TPM2_SE.TRIAL,
symmetric=sym,
auth_hash=TPM2_ALG.SHA256,
)
self.ectx.policy_or(
session,
TPML_DIGEST(
[
b"0123456789ABCDEF0123456789ABCDEF",
b"0987654321ABCDEF1234567890ABCDEF",
]
),
)
self.ectx.policy_or(
session,
[b"0123456789ABCDEF0123456789ABCDEF", b"0987654321ABCDEF1234567890ABCDEF"],
)
with self.assertRaises(TypeError):
self.ectx.policy_or("bar", TPML_DIGEST())
with self.assertRaises(TypeError):
self.ectx.policy_or(session, TPML_PCR_SELECTION())
with self.assertRaises(TypeError):
self.ectx.policy_or(session, TPML_DIGEST(), session1=43.2)
with self.assertRaises(TypeError):
self.ectx.policy_or(session, TPML_DIGEST(), session2="bar")
with self.assertRaises(TypeError):
self.ectx.policy_or(session, TPML_DIGEST(), session3=object())
def test_policy_pcr(self):
sym = TPMT_SYM_DEF(algorithm=TPM2_ALG.NULL)
session = self.ectx.start_auth_session(
tpm_key=ESYS_TR.NONE,
bind=ESYS_TR.NONE,
session_type=TPM2_SE.TRIAL,
symmetric=sym,
auth_hash=TPM2_ALG.SHA256,
)
self.ectx.policy_pcr(session, b"0123456789ABCDEF0123456789ABCDEF", "sha256:1")
self.ectx.policy_pcr(
session, TPM2B_DIGEST(b"0123456789ABCDEF0123456789ABCDEF"), "sha256:1"
)
self.ectx.policy_pcr(
session,
b"0123456789ABCDEF0123456789ABCDEF",
TPML_PCR_SELECTION.parse("sha256:1"),
)
self.ectx.policy_pcr(
session,
TPM2B_DIGEST(b"0123456789ABCDEF0123456789ABCDEF"),
TPML_PCR_SELECTION.parse("sha256:1"),
)
with self.assertRaises(TypeError):
self.ectx.policy_pcr(session, TPM2B_ATTEST(), "sha256:1")
with self.assertRaises(TypeError):
self.ectx.policy_pcr(session, TPM2B_DIGEST(), TPML_ALG())
with self.assertRaises(TypeError):
self.ectx.policy_pcr(session, TPM2B_DIGEST(), "sha256:1", session1="baz")
with self.assertRaises(TypeError):
self.ectx.policy_pcr(session, TPM2B_DIGEST(), "sha256:1", session2=42.2)
with self.assertRaises(TypeError):
self.ectx.policy_pcr(session, TPM2B_DIGEST(), "sha256:1", session3=object)
def test_policy_locality(self):
sym = TPMT_SYM_DEF(algorithm=TPM2_ALG.NULL)
session = self.ectx.start_auth_session(
tpm_key=ESYS_TR.NONE,
bind=ESYS_TR.NONE,
session_type=TPM2_SE.TRIAL,
symmetric=sym,
auth_hash=TPM2_ALG.SHA256,
)
self.ectx.policy_locality(session, TPMA_LOCALITY.ONE)
with self.assertRaises(TypeError):
self.ectx.policy_locality(45.6, TPMA_LOCALITY.ONE)
with self.assertRaises(TypeError):
self.ectx.policy_locality(session, "baz")
with self.assertRaises(ValueError):
self.ectx.policy_locality(session, 0)
with self.assertRaises(ValueError):
self.ectx.policy_locality(session, 256)
with self.assertRaises(TypeError):
self.ectx.policy_locality(session, TPMA_LOCALITY.ONE, session1="bar")
with self.assertRaises(TypeError):
self.ectx.policy_locality(session, TPMA_LOCALITY.ONE, session2=56.7)
with self.assertRaises(TypeError):
self.ectx.policy_locality(session, TPMA_LOCALITY.ONE, session3=object())
def test_policy_nv(self):
sym = TPMT_SYM_DEF(algorithm=TPM2_ALG.NULL)
session = self.ectx.start_auth_session(
tpm_key=ESYS_TR.NONE,
bind=ESYS_TR.NONE,
session_type=TPM2_SE.TRIAL,
symmetric=sym,
auth_hash=TPM2_ALG.SHA256,
)
nvpub = TPM2B_NV_PUBLIC(
nvPublic=TPMS_NV_PUBLIC(
nvIndex=0x1000000,
nameAlg=TPM2_ALG.SHA256,
attributes=TPMA_NV.OWNERWRITE | TPMA_NV.OWNERREAD,
authPolicy=b"",
dataSize=8,
)
)
nvhandle = self.ectx.nv_define_space(b"", nvpub)
self.ectx.policy_nv(ESYS_TR.OWNER, nvhandle, session, b"12345678", TPM2_EO.EQ)
self.ectx.policy_nv(
ESYS_TR.OWNER, nvhandle, session, TPM2B_OPERAND(b"12345678"), TPM2_EO.EQ, 4
)
with self.assertRaises(TypeError):
self.ectx.policy_nv(42.2, nvhandle, session, b"12345678", TPM2_EO.EQ)
with self.assertRaises(ValueError):
self.ectx.policy_nv(42, nvhandle, session, b"12345678", TPM2_EO.EQ)
with self.assertRaises(TypeError):
self.ectx.policy_nv(ESYS_TR.OWNER, "baz", session, b"12345678", TPM2_EO.EQ)
with self.assertRaises(TypeError):
self.ectx.policy_nv(
ESYS_TR.OWNER, nvhandle, object(), b"12345678", TPM2_EO.EQ
)
with self.assertRaises(TypeError):
self.ectx.policy_nv(ESYS_TR.OWNER, nvhandle, session, object, TPM2_EO.EQ)
with self.assertRaises(TypeError):
self.ectx.policy_nv(ESYS_TR.OWNER, nvhandle, session, b"12345678", "baz")
with self.assertRaises(ValueError):
self.ectx.policy_nv(ESYS_TR.OWNER, nvhandle, session, b"12345678", 42)
with self.assertRaises(TypeError):
self.ectx.policy_nv(
ESYS_TR.OWNER, nvhandle, session, b"12345678", TPM2_EO.EQ, "baz"
)
with self.assertRaises(TypeError):
self.ectx.policy_nv(
ESYS_TR.OWNER,
nvhandle,
session,
b"12345678",
TPM2_EO.EQ,
session1="baz",
)
with self.assertRaises(TypeError):
self.ectx.policy_nv(
ESYS_TR.OWNER, nvhandle, session, b"12345678", TPM2_EO.EQ, session2=42.2
)
with self.assertRaises(TypeError):
self.ectx.policy_nv(
ESYS_TR.OWNER,
nvhandle,
session,
b"12345678",
TPM2_EO.EQ,
session3=object(),
)
def test_policy_counter_timer(self):
sym = TPMT_SYM_DEF(algorithm=TPM2_ALG.NULL)
session = self.ectx.start_auth_session(
tpm_key=ESYS_TR.NONE,
bind=ESYS_TR.NONE,
session_type=TPM2_SE.TRIAL,
symmetric=sym,
auth_hash=TPM2_ALG.SHA256,
)
self.ectx.policy_counter_timer(session, b"12345678", TPM2_EO.EQ)
self.ectx.policy_counter_timer(
session, TPM2B_OPERAND(b"12345678"), TPM2_EO.EQ, 4
)
with self.assertRaises(TypeError):
self.ectx.policy_counter_timer(object, b"12345678", TPM2_EO.EQ)
with self.assertRaises(TypeError):
self.ectx.policy_counter_timer(session, TPM2B_ATTEST(), TPM2_EO.EQ)
with self.assertRaises(TypeError):
self.ectx.policy_counter_timer(session, b"12345678", 42.2)
with self.assertRaises(ValueError):
self.ectx.policy_counter_timer(session, b"12345678", 42)
with self.assertRaises(TypeError):
self.ectx.policy_counter_timer(session, b"12345678", TPM2_EO.EQ, "bar")
with self.assertRaises(TypeError):
self.ectx.policy_counter_timer(
session, b"12345678", TPM2_EO.EQ, session1="baz"
)
with self.assertRaises(TypeError):
self.ectx.policy_counter_timer(
session, b"12345678", TPM2_EO.EQ, session2=object()
)
with self.assertRaises(TypeError):
self.ectx.policy_counter_timer(
session, b"12345678", TPM2_EO.EQ, session3=45.6
)
def test_policy_physical_presence(self):
sym = TPMT_SYM_DEF(algorithm=TPM2_ALG.NULL)
session = self.ectx.start_auth_session(
tpm_key=ESYS_TR.NONE,
bind=ESYS_TR.NONE,
session_type=TPM2_SE.TRIAL,
symmetric=sym,
auth_hash=TPM2_ALG.SHA256,
)
self.ectx.policy_physical_presence(session)
with self.assertRaises(TypeError):
self.ectx.policy_physical_presence("session")
with self.assertRaises(TypeError):
self.ectx.policy_physical_presence(session, session1="bar")
with self.assertRaises(TypeError):
self.ectx.policy_physical_presence(session, session2=list())
with self.assertRaises(TypeError):
self.ectx.policy_physical_presence(session, session3=42.2)
def test_policy_cp_hash(self):
sym = TPMT_SYM_DEF(algorithm=TPM2_ALG.NULL)
session = self.ectx.start_auth_session(
tpm_key=ESYS_TR.NONE,
bind=ESYS_TR.NONE,
session_type=TPM2_SE.TRIAL,
symmetric=sym,
auth_hash=TPM2_ALG.SHA256,
)
self.ectx.policy_cp_hash(session, b"01234567890ABCDEF012345689ABCDEF")
self.ectx.policy_cp_hash(
session, TPM2B_DIGEST(b"01234567890ABCDEF012345689ABCDEF")
)
with self.assertRaises(TypeError):
self.ectx.policy_cp_hash(42.2, b"01234567890ABCDEF012345689ABCDEF")
with self.assertRaises(TypeError):
self.ectx.policy_cp_hash(session, TPM2B_ATTEST())
with self.assertRaises(TypeError):
self.ectx.policy_cp_hash(
session, b"01234567890ABCDEF012345689ABCDEF", session1="foo"
)
with self.assertRaises(TypeError):
self.ectx.policy_cp_hash(
session, b"01234567890ABCDEF012345689ABCDEF", session2=object()
)
with self.assertRaises(TypeError):
self.ectx.policy_cp_hash(
session, b"01234567890ABCDEF012345689ABCDEF", session3=45.6
)
def test_policy_name_hash(self):
sym = TPMT_SYM_DEF(algorithm=TPM2_ALG.NULL)
session = self.ectx.start_auth_session(
tpm_key=ESYS_TR.NONE,
bind=ESYS_TR.NONE,
session_type=TPM2_SE.TRIAL,
symmetric=sym,
auth_hash=TPM2_ALG.SHA256,
)
self.ectx.policy_name_hash(session, b"01234567890ABCDEF012345689ABCDEF")
self.ectx.policy_restart(session)
self.ectx.policy_name_hash(
session, TPM2B_DIGEST(b"ABCDEF01234567890ABCDEF012345689")
)
with self.assertRaises(TypeError):
self.ectx.policy_name_hash(42.2, b"01234567890ABCDEF012345689ABCDEF")
with self.assertRaises(TypeError):
self.ectx.policy_name_hash(session, TPM2B_ATTEST())
with self.assertRaises(TypeError):
self.ectx.policy_name_hash(
session, b"01234567890ABCDEF012345689ABCDEF", session1="foo"
)
with self.assertRaises(TypeError):
self.ectx.policy_name_hash(
session, b"01234567890ABCDEF012345689ABCDEF", session2=object()
)
with self.assertRaises(TypeError):
self.ectx.policy_name_hash(
session, b"01234567890ABCDEF012345689ABCDEF", session3=45.6
)
def test_policy_duplication_select(self):
sym = TPMT_SYM_DEF(algorithm=TPM2_ALG.NULL)
session = self.ectx.start_auth_session(
tpm_key=ESYS_TR.NONE,
bind=ESYS_TR.NONE,
session_type=TPM2_SE.TRIAL,
symmetric=sym,
auth_hash=TPM2_ALG.SHA256,
)
self.ectx.policy_duplication_select(
session,
b"0123456789ABCDEF0123456789ABCDEF",
b"0123456789ABCDEF0123456789ABCDEF",
)
self.ectx.policy_restart(session)
self.ectx.policy_duplication_select(
session,
TPM2B_NAME(b"0123456789ABCDEF0123456789ABCDEF"),
TPM2B_NAME(b"0123456789ABCDEF0123456789ABCDEF"),
)
self.ectx.policy_restart(session)
self.ectx.policy_duplication_select(
session,
TPM2B_NAME(b"0123456789ABCDEF0123456789ABCDEF"),
b"0123456789ABCDEF0123456789ABCDEF",
True,
)
with self.assertRaises(TypeError):
self.ectx.policy_duplication_select(
42.2,
b"0123456789ABCDEF0123456789ABCDEF",
b"0123456789ABCDEF0123456789ABCDEF",
)
with self.assertRaises(TypeError):
self.ectx.policy_duplication_select(
session, TPM2B_ATTEST(), b"0123456789ABCDEF0123456789ABCDEF"
)
with self.assertRaises(TypeError):
self.ectx.policy_duplication_select(
session, b"0123456789ABCDEF0123456789ABCDEF", object()
)
with self.assertRaises(TypeError):
self.ectx.policy_duplication_select(
session,
b"0123456789ABCDEF0123456789ABCDEF",
b"0123456789ABCDEF0123456789ABCDEF",
"nope",
)
with self.assertRaises(TypeError):
self.ectx.policy_duplication_select(
session,
b"0123456789ABCDEF0123456789ABCDEF",
b"0123456789ABCDEF0123456789ABCDEF",
session1=42.5,
)
with self.assertRaises(TypeError):
self.ectx.policy_duplication_select(
session,
b"0123456789ABCDEF0123456789ABCDEF",
b"0123456789ABCDEF0123456789ABCDEF",
session2="baz",
)
with self.assertRaises(TypeError):
self.ectx.policy_duplication_select(
session,
b"0123456789ABCDEF0123456789ABCDEF",
b"0123456789ABCDEF0123456789ABCDEF",
session3=object(),
)
def test_policy_authorize(self):
handle = self.ectx.create_primary(
TPM2B_SENSITIVE_CREATE(),
TPM2B_PUBLIC.parse(
"rsa:rsapss:null",
TPMA_OBJECT.USERWITHAUTH
| TPMA_OBJECT.SIGN_ENCRYPT
| TPMA_OBJECT.FIXEDTPM
| TPMA_OBJECT.FIXEDPARENT
| TPMA_OBJECT.SENSITIVEDATAORIGIN,
),
)[0]
sym = TPMT_SYM_DEF(algorithm=TPM2_ALG.NULL)
session = self.ectx.start_auth_session(
tpm_key=ESYS_TR.NONE,
bind=ESYS_TR.NONE,
session_type=TPM2_SE.TRIAL,
symmetric=sym,
auth_hash=TPM2_ALG.SHA256,
)
check_ticket = TPMT_TK_VERIFIED(tag=TPM2_ST.VERIFIED, hierarchy=TPM2_RH.OWNER)
name = self.ectx.tr_get_name(handle)
self.ectx.policy_authorize(
session, TPM2B_DIGEST(), TPM2B_NONCE(), name, check_ticket
)
self.ectx.policy_authorize(
session, TPM2B_DIGEST(), TPM2B_NONCE(), name, check_ticket
)
self.ectx.policy_authorize(session, b"", TPM2B_NONCE(), name, check_ticket)
self.ectx.policy_authorize(session, TPM2B_DIGEST(), b"", name, check_ticket)
self.ectx.policy_authorize(
session, TPM2B_DIGEST(), TPM2B_NONCE(), bytes(name), check_ticket
)
with self.assertRaises(TypeError):
self.ectx.policy_authorize(
42.5, TPM2B_DIGEST(), TPM2B_NONCE(), name, check_ticket
)
with self.assertRaises(TypeError):
self.ectx.policy_authorize(
session, TPM2B_ATTEST(), TPM2B_NONCE(), name, check_ticket
)
with self.assertRaises(TypeError):
self.ectx.policy_authorize(
session, TPM2B_DIGEST(), object(), name, check_ticket
)
with self.assertRaises(TypeError):
self.ectx.policy_authorize(
session, TPM2B_DIGEST(), TPM2B_NONCE(), object(), check_ticket
)
with self.assertRaises(TypeError):
self.ectx.policy_authorize(
session, TPM2B_DIGEST(), TPM2B_NONCE(), name, TPM2B_AUTH()
)
with self.assertRaises(TypeError):
self.ectx.policy_authorize(
session,
TPM2B_DIGEST(),
TPM2B_NONCE(),
name,
check_ticket,
session1="foo",
)
with self.assertRaises(TypeError):
self.ectx.policy_authorize(
session,
TPM2B_DIGEST(),
TPM2B_NONCE(),
name,
check_ticket,
session2=42.4,
)
with self.assertRaises(TypeError):
self.ectx.policy_authorize(
session,
TPM2B_DIGEST(),
TPM2B_NONCE(),
name,
check_ticket,
session3=object(),
)
def test_policy_password(self):
sym = TPMT_SYM_DEF(TPM2_ALG.NULL)
session = self.ectx.start_auth_session(
tpm_key=ESYS_TR.NONE,
bind=ESYS_TR.NONE,
session_type=TPM2_SE.TRIAL,
symmetric=sym,
auth_hash=TPM2_ALG.SHA256,
)
self.ectx.policy_password(session)
with self.assertRaises(TypeError):
self.ectx.policy_password("session")
with self.assertRaises(TypeError):
self.ectx.policy_password(session, session1=45.6)
with self.assertRaises(TypeError):
self.ectx.policy_password(session, session2=object)
with self.assertRaises(TypeError):
self.ectx.policy_password(session, session3="baz")
def test_policy_nv_written(self):
sym = TPMT_SYM_DEF(TPM2_ALG.NULL)
session = self.ectx.start_auth_session(
tpm_key=ESYS_TR.NONE,
bind=ESYS_TR.NONE,
session_type=TPM2_SE.TRIAL,
symmetric=sym,
auth_hash=TPM2_ALG.SHA256,
)
self.ectx.policy_nv_written(session)
self.ectx.policy_restart(session)
self.ectx.policy_nv_written(session, False)
with self.assertRaises(TypeError):
self.ectx.policy_nv_written(43.2)
with self.assertRaises(TypeError):
self.ectx.policy_nv_written(session, "False")
with self.assertRaises(TypeError):
self.ectx.policy_nv_written(session, session1=45.6)
with self.assertRaises(TypeError):
self.ectx.policy_nv_written(session, session2=object())
with self.assertRaises(TypeError):
self.ectx.policy_nv_written(session, session3="baz")
def test_policy_template(self):
sym = TPMT_SYM_DEF(TPM2_ALG.NULL)
session = self.ectx.start_auth_session(
tpm_key=ESYS_TR.NONE,
bind=ESYS_TR.NONE,
session_type=TPM2_SE.TRIAL,
symmetric=sym,
auth_hash=TPM2_ALG.SHA256,
)
self.ectx.policy_template(session, b"0123456789ABCDEF01234567890ABCDE")
self.ectx.policy_template(
session, TPM2B_DIGEST(b"0123456789ABCDEF01234567890ABCDE")
)
with self.assertRaises(TypeError):
self.ectx.policy_template(object(), b"0123456789ABCDEF01234567890ABCDE")
with self.assertRaises(TypeError):
self.ectx.policy_template(session, list())
with self.assertRaises(TypeError):
self.ectx.policy_template(
session, b"0123456789ABCDEF01234567890ABCDE", session1="bar"
)
with self.assertRaises(TypeError):
self.ectx.policy_template(
session, b"0123456789ABCDEF01234567890ABCDE", session2=object
)
with self.assertRaises(TypeError):
self.ectx.policy_template(
session, b"0123456789ABCDEF01234567890ABCDE", session3=45.6
)
def test_policy_authorize_nv(self):
nv_public = TPM2B_NV_PUBLIC(
nvPublic=TPMS_NV_PUBLIC(
nvIndex=TPM2_HC.NV_INDEX_FIRST,
nameAlg=TPM2_ALG.SHA256,
attributes=TPMA_NV.parse("ownerread|ownerwrite|authread|authwrite"),
dataSize=32,
)
)
# No password NV index
nv_index = self.ectx.nv_define_space(None, nv_public)
sym = TPMT_SYM_DEF(TPM2_ALG.NULL)
session = self.ectx.start_auth_session(
tpm_key=ESYS_TR.NONE,
bind=ESYS_TR.NONE,
session_type=TPM2_SE.TRIAL,
symmetric=sym,
auth_hash=TPM2_ALG.SHA256,
)
self.ectx.policy_authorize_nv(nv_index, session)
self.ectx.policy_authorize_nv(nv_index, session, auth_handle=ESYS_TR.OWNER)
with self.assertRaises(TypeError):
self.ectx.policy_authorize_nv("not an index", session)
with self.assertRaises(TypeError):
self.ectx.policy_authorize_nv(nv_index, object())
with self.assertRaises(TypeError):
self.ectx.policy_authorize_nv(nv_index, session, auth_handle=object)
with self.assertRaises(TypeError):
self.ectx.policy_authorize_nv(nv_index, session, session1="foo")
with self.assertRaises(TypeError):
self.ectx.policy_authorize_nv(nv_index, session, session2=object())
with self.assertRaises(TypeError):
self.ectx.policy_authorize_nv(nv_index, session, session3=45.6)
def test_esys_tr_functions(self):
handle = self.ectx.create_primary(TPM2B_SENSITIVE_CREATE())[0]
buffer = self.ectx.tr_serialize(handle)
self.assertEqual(type(buffer), bytes)
self.assertEqual(handle.serialize(self.ectx), buffer)
handle2 = self.ectx.tr_deserialize(buffer)
self.assertEqual(type(handle2), ESYS_TR)
handle3 = ESYS_TR.deserialize(self.ectx, buffer)
self.assertEqual(type(handle3), ESYS_TR)
name2 = handle2.get_name(self.ectx)
name3 = handle3.get_name(self.ectx)
self.assertEqual(name2, name3)
self.ectx.tr_close(handle2)
handle3.close(self.ectx)
with self.assertRaises(TypeError):
self.ectx.tr_serialize("bad")
with self.assertRaises(TSS2_Exception):
self.ectx.tr_serialize(ESYS_TR(123456))
with self.assertRaises(TypeError):
self.ectx.tr_deserialize(42)
with self.assertRaises(TSS2_Exception):
self.ectx.tr_deserialize(b"0123456890")
if __name__ == "__main__":
unittest.main()
| 34.492445
| 113
| 0.616547
| 17,202
| 162,080
| 5.588362
| 0.03924
| 0.08064
| 0.114843
| 0.149026
| 0.892199
| 0.871602
| 0.852784
| 0.825759
| 0.780778
| 0.728131
| 0
| 0.041592
| 0.287229
| 162,080
| 4,698
| 114
| 34.499787
| 0.790523
| 0.007231
| 0
| 0.583521
| 0
| 0.000847
| 0.037366
| 0.014987
| 0
| 0
| 0.001094
| 0.000213
| 0.211061
| 1
| 0.033296
| false
| 0.016366
| 0.00395
| 0
| 0.037528
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
e804d9bfcb6f86e98dddf5147f40cac59850100d
| 89,391
|
py
|
Python
|
firestore/tests/unit/v1/test__helpers.py
|
DaveCheez/google-cloud-python
|
fc03d4d41f13e9d13db7206438163b3a471fdabd
|
[
"Apache-2.0"
] | 2
|
2021-06-29T12:27:00.000Z
|
2021-11-17T11:10:58.000Z
|
firestore/tests/unit/v1/test__helpers.py
|
DaveCheez/google-cloud-python
|
fc03d4d41f13e9d13db7206438163b3a471fdabd
|
[
"Apache-2.0"
] | 40
|
2019-07-16T10:04:48.000Z
|
2020-01-20T09:04:59.000Z
|
firestore/tests/unit/v1/test__helpers.py
|
DaveCheez/google-cloud-python
|
fc03d4d41f13e9d13db7206438163b3a471fdabd
|
[
"Apache-2.0"
] | 2
|
2019-07-18T00:05:31.000Z
|
2019-11-27T14:17:22.000Z
|
# -*- coding: utf-8 -*-
# Copyright 2017 Google LLC All rights reserved.
#
# 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 datetime
import sys
import unittest
import mock
class TestGeoPoint(unittest.TestCase):
@staticmethod
def _get_target_class():
from google.cloud.firestore_v1._helpers import GeoPoint
return GeoPoint
def _make_one(self, *args, **kwargs):
klass = self._get_target_class()
return klass(*args, **kwargs)
def test_constructor(self):
lat = 81.25
lng = 359.984375
geo_pt = self._make_one(lat, lng)
self.assertEqual(geo_pt.latitude, lat)
self.assertEqual(geo_pt.longitude, lng)
def test_to_protobuf(self):
from google.type import latlng_pb2
lat = 0.015625
lng = 20.03125
geo_pt = self._make_one(lat, lng)
result = geo_pt.to_protobuf()
geo_pt_pb = latlng_pb2.LatLng(latitude=lat, longitude=lng)
self.assertEqual(result, geo_pt_pb)
def test___eq__(self):
lat = 0.015625
lng = 20.03125
geo_pt1 = self._make_one(lat, lng)
geo_pt2 = self._make_one(lat, lng)
self.assertEqual(geo_pt1, geo_pt2)
def test___eq__type_differ(self):
lat = 0.015625
lng = 20.03125
geo_pt1 = self._make_one(lat, lng)
geo_pt2 = object()
self.assertNotEqual(geo_pt1, geo_pt2)
self.assertIs(geo_pt1.__eq__(geo_pt2), NotImplemented)
def test___ne__same_value(self):
lat = 0.015625
lng = 20.03125
geo_pt1 = self._make_one(lat, lng)
geo_pt2 = self._make_one(lat, lng)
comparison_val = geo_pt1 != geo_pt2
self.assertFalse(comparison_val)
def test___ne__(self):
geo_pt1 = self._make_one(0.0, 1.0)
geo_pt2 = self._make_one(2.0, 3.0)
self.assertNotEqual(geo_pt1, geo_pt2)
def test___ne__type_differ(self):
lat = 0.015625
lng = 20.03125
geo_pt1 = self._make_one(lat, lng)
geo_pt2 = object()
self.assertNotEqual(geo_pt1, geo_pt2)
self.assertIs(geo_pt1.__ne__(geo_pt2), NotImplemented)
class Test_verify_path(unittest.TestCase):
@staticmethod
def _call_fut(path, is_collection):
from google.cloud.firestore_v1._helpers import verify_path
return verify_path(path, is_collection)
def test_empty(self):
path = ()
with self.assertRaises(ValueError):
self._call_fut(path, True)
with self.assertRaises(ValueError):
self._call_fut(path, False)
def test_wrong_length_collection(self):
path = ("foo", "bar")
with self.assertRaises(ValueError):
self._call_fut(path, True)
def test_wrong_length_document(self):
path = ("Kind",)
with self.assertRaises(ValueError):
self._call_fut(path, False)
def test_wrong_type_collection(self):
path = (99, "ninety-nine", "zap")
with self.assertRaises(ValueError):
self._call_fut(path, True)
def test_wrong_type_document(self):
path = ("Users", "Ada", "Candy", {})
with self.assertRaises(ValueError):
self._call_fut(path, False)
def test_success_collection(self):
path = ("Computer", "Magic", "Win")
ret_val = self._call_fut(path, True)
# NOTE: We are just checking that it didn't fail.
self.assertIsNone(ret_val)
def test_success_document(self):
path = ("Tokenizer", "Seventeen", "Cheese", "Burger")
ret_val = self._call_fut(path, False)
# NOTE: We are just checking that it didn't fail.
self.assertIsNone(ret_val)
class Test_encode_value(unittest.TestCase):
@staticmethod
def _call_fut(value):
from google.cloud.firestore_v1._helpers import encode_value
return encode_value(value)
def test_none(self):
from google.protobuf import struct_pb2
result = self._call_fut(None)
expected = _value_pb(null_value=struct_pb2.NULL_VALUE)
self.assertEqual(result, expected)
def test_boolean(self):
result = self._call_fut(True)
expected = _value_pb(boolean_value=True)
self.assertEqual(result, expected)
def test_integer(self):
value = 425178
result = self._call_fut(value)
expected = _value_pb(integer_value=value)
self.assertEqual(result, expected)
def test_float(self):
value = 123.4453125
result = self._call_fut(value)
expected = _value_pb(double_value=value)
self.assertEqual(result, expected)
def test_datetime_with_nanos(self):
from google.api_core.datetime_helpers import DatetimeWithNanoseconds
from google.protobuf import timestamp_pb2
dt_seconds = 1488768504
dt_nanos = 458816991
timestamp_pb = timestamp_pb2.Timestamp(seconds=dt_seconds, nanos=dt_nanos)
dt_val = DatetimeWithNanoseconds.from_timestamp_pb(timestamp_pb)
result = self._call_fut(dt_val)
expected = _value_pb(timestamp_value=timestamp_pb)
self.assertEqual(result, expected)
def test_datetime_wo_nanos(self):
from google.protobuf import timestamp_pb2
dt_seconds = 1488768504
dt_nanos = 458816000
# Make sure precision is valid in microseconds too.
self.assertEqual(dt_nanos % 1000, 0)
dt_val = datetime.datetime.utcfromtimestamp(dt_seconds + 1e-9 * dt_nanos)
result = self._call_fut(dt_val)
timestamp_pb = timestamp_pb2.Timestamp(seconds=dt_seconds, nanos=dt_nanos)
expected = _value_pb(timestamp_value=timestamp_pb)
self.assertEqual(result, expected)
def test_string(self):
value = u"\u2018left quote, right quote\u2019"
result = self._call_fut(value)
expected = _value_pb(string_value=value)
self.assertEqual(result, expected)
def test_bytes(self):
value = b"\xe3\xf2\xff\x00"
result = self._call_fut(value)
expected = _value_pb(bytes_value=value)
self.assertEqual(result, expected)
def test_reference_value(self):
client = _make_client()
value = client.document("my", "friend")
result = self._call_fut(value)
expected = _value_pb(reference_value=value._document_path)
self.assertEqual(result, expected)
def test_geo_point(self):
from google.cloud.firestore_v1._helpers import GeoPoint
value = GeoPoint(50.5, 88.75)
result = self._call_fut(value)
expected = _value_pb(geo_point_value=value.to_protobuf())
self.assertEqual(result, expected)
def test_array(self):
from google.cloud.firestore_v1.proto.document_pb2 import ArrayValue
result = self._call_fut([99, True, 118.5])
array_pb = ArrayValue(
values=[
_value_pb(integer_value=99),
_value_pb(boolean_value=True),
_value_pb(double_value=118.5),
]
)
expected = _value_pb(array_value=array_pb)
self.assertEqual(result, expected)
def test_map(self):
from google.cloud.firestore_v1.proto.document_pb2 import MapValue
result = self._call_fut({"abc": 285, "def": b"piglatin"})
map_pb = MapValue(
fields={
"abc": _value_pb(integer_value=285),
"def": _value_pb(bytes_value=b"piglatin"),
}
)
expected = _value_pb(map_value=map_pb)
self.assertEqual(result, expected)
def test_bad_type(self):
value = object()
with self.assertRaises(TypeError):
self._call_fut(value)
class Test_encode_dict(unittest.TestCase):
@staticmethod
def _call_fut(values_dict):
from google.cloud.firestore_v1._helpers import encode_dict
return encode_dict(values_dict)
def test_many_types(self):
from google.protobuf import struct_pb2
from google.protobuf import timestamp_pb2
from google.cloud.firestore_v1.proto.document_pb2 import ArrayValue
from google.cloud.firestore_v1.proto.document_pb2 import MapValue
dt_seconds = 1497397225
dt_nanos = 465964000
# Make sure precision is valid in microseconds too.
self.assertEqual(dt_nanos % 1000, 0)
dt_val = datetime.datetime.utcfromtimestamp(dt_seconds + 1e-9 * dt_nanos)
client = _make_client()
document = client.document("most", "adjective", "thing", "here")
values_dict = {
"foo": None,
"bar": True,
"baz": 981,
"quux": 2.875,
"quuz": dt_val,
"corge": u"\N{snowman}",
"grault": b"\xe2\x98\x83",
"wibble": document,
"garply": [u"fork", 4.0],
"waldo": {"fred": u"zap", "thud": False},
}
encoded_dict = self._call_fut(values_dict)
expected_dict = {
"foo": _value_pb(null_value=struct_pb2.NULL_VALUE),
"bar": _value_pb(boolean_value=True),
"baz": _value_pb(integer_value=981),
"quux": _value_pb(double_value=2.875),
"quuz": _value_pb(
timestamp_value=timestamp_pb2.Timestamp(
seconds=dt_seconds, nanos=dt_nanos
)
),
"corge": _value_pb(string_value=u"\N{snowman}"),
"grault": _value_pb(bytes_value=b"\xe2\x98\x83"),
"wibble": _value_pb(reference_value=document._document_path),
"garply": _value_pb(
array_value=ArrayValue(
values=[
_value_pb(string_value=u"fork"),
_value_pb(double_value=4.0),
]
)
),
"waldo": _value_pb(
map_value=MapValue(
fields={
"fred": _value_pb(string_value=u"zap"),
"thud": _value_pb(boolean_value=False),
}
)
),
}
self.assertEqual(encoded_dict, expected_dict)
class Test_reference_value_to_document(unittest.TestCase):
@staticmethod
def _call_fut(reference_value, client):
from google.cloud.firestore_v1._helpers import reference_value_to_document
return reference_value_to_document(reference_value, client)
def test_bad_format(self):
from google.cloud.firestore_v1._helpers import BAD_REFERENCE_ERROR
reference_value = "not/the/right/format"
with self.assertRaises(ValueError) as exc_info:
self._call_fut(reference_value, None)
err_msg = BAD_REFERENCE_ERROR.format(reference_value)
self.assertEqual(exc_info.exception.args, (err_msg,))
def test_same_client(self):
from google.cloud.firestore_v1.document import DocumentReference
client = _make_client()
document = client.document("that", "this")
reference_value = document._document_path
new_document = self._call_fut(reference_value, client)
self.assertIsNot(new_document, document)
self.assertIsInstance(new_document, DocumentReference)
self.assertIs(new_document._client, client)
self.assertEqual(new_document._path, document._path)
def test_different_client(self):
from google.cloud.firestore_v1._helpers import WRONG_APP_REFERENCE
client1 = _make_client(project="kirk")
document = client1.document("tin", "foil")
reference_value = document._document_path
client2 = _make_client(project="spock")
with self.assertRaises(ValueError) as exc_info:
self._call_fut(reference_value, client2)
err_msg = WRONG_APP_REFERENCE.format(reference_value, client2._database_string)
self.assertEqual(exc_info.exception.args, (err_msg,))
class Test_decode_value(unittest.TestCase):
@staticmethod
def _call_fut(value, client=mock.sentinel.client):
from google.cloud.firestore_v1._helpers import decode_value
return decode_value(value, client)
def test_none(self):
from google.protobuf import struct_pb2
value = _value_pb(null_value=struct_pb2.NULL_VALUE)
self.assertIsNone(self._call_fut(value))
def test_bool(self):
value1 = _value_pb(boolean_value=True)
self.assertTrue(self._call_fut(value1))
value2 = _value_pb(boolean_value=False)
self.assertFalse(self._call_fut(value2))
def test_int(self):
int_val = 29871
value = _value_pb(integer_value=int_val)
self.assertEqual(self._call_fut(value), int_val)
def test_float(self):
float_val = 85.9296875
value = _value_pb(double_value=float_val)
self.assertEqual(self._call_fut(value), float_val)
@unittest.skipIf(
(3,) <= sys.version_info < (3, 4, 4), "known datetime bug (bpo-23517) in Python"
)
def test_datetime(self):
from google.api_core.datetime_helpers import DatetimeWithNanoseconds
from google.protobuf import timestamp_pb2
dt_seconds = 552855006
dt_nanos = 766961828
timestamp_pb = timestamp_pb2.Timestamp(seconds=dt_seconds, nanos=dt_nanos)
value = _value_pb(timestamp_value=timestamp_pb)
expected_dt_val = DatetimeWithNanoseconds.from_timestamp_pb(timestamp_pb)
self.assertEqual(self._call_fut(value), expected_dt_val)
def test_unicode(self):
unicode_val = u"zorgon"
value = _value_pb(string_value=unicode_val)
self.assertEqual(self._call_fut(value), unicode_val)
def test_bytes(self):
bytes_val = b"abc\x80"
value = _value_pb(bytes_value=bytes_val)
self.assertEqual(self._call_fut(value), bytes_val)
def test_reference(self):
from google.cloud.firestore_v1.document import DocumentReference
client = _make_client()
path = (u"then", u"there-was-one")
document = client.document(*path)
ref_string = document._document_path
value = _value_pb(reference_value=ref_string)
result = self._call_fut(value, client)
self.assertIsInstance(result, DocumentReference)
self.assertIs(result._client, client)
self.assertEqual(result._path, path)
def test_geo_point(self):
from google.cloud.firestore_v1._helpers import GeoPoint
geo_pt = GeoPoint(latitude=42.5, longitude=99.0625)
value = _value_pb(geo_point_value=geo_pt.to_protobuf())
self.assertEqual(self._call_fut(value), geo_pt)
def test_array(self):
from google.cloud.firestore_v1.proto import document_pb2
sub_value1 = _value_pb(boolean_value=True)
sub_value2 = _value_pb(double_value=14.1396484375)
sub_value3 = _value_pb(bytes_value=b"\xde\xad\xbe\xef")
array_pb = document_pb2.ArrayValue(values=[sub_value1, sub_value2, sub_value3])
value = _value_pb(array_value=array_pb)
expected = [
sub_value1.boolean_value,
sub_value2.double_value,
sub_value3.bytes_value,
]
self.assertEqual(self._call_fut(value), expected)
def test_map(self):
from google.cloud.firestore_v1.proto import document_pb2
sub_value1 = _value_pb(integer_value=187680)
sub_value2 = _value_pb(string_value=u"how low can you go?")
map_pb = document_pb2.MapValue(
fields={"first": sub_value1, "second": sub_value2}
)
value = _value_pb(map_value=map_pb)
expected = {
"first": sub_value1.integer_value,
"second": sub_value2.string_value,
}
self.assertEqual(self._call_fut(value), expected)
def test_nested_map(self):
from google.cloud.firestore_v1.proto import document_pb2
actual_value1 = 1009876
actual_value2 = u"hey you guys"
actual_value3 = 90.875
map_pb1 = document_pb2.MapValue(
fields={
"lowest": _value_pb(integer_value=actual_value1),
"aside": _value_pb(string_value=actual_value2),
}
)
map_pb2 = document_pb2.MapValue(
fields={
"middle": _value_pb(map_value=map_pb1),
"aside": _value_pb(boolean_value=True),
}
)
map_pb3 = document_pb2.MapValue(
fields={
"highest": _value_pb(map_value=map_pb2),
"aside": _value_pb(double_value=actual_value3),
}
)
value = _value_pb(map_value=map_pb3)
expected = {
"highest": {
"middle": {"lowest": actual_value1, "aside": actual_value2},
"aside": True,
},
"aside": actual_value3,
}
self.assertEqual(self._call_fut(value), expected)
def test_unset_value_type(self):
with self.assertRaises(ValueError):
self._call_fut(_value_pb())
def test_unknown_value_type(self):
value_pb = mock.Mock(spec=["WhichOneof"])
value_pb.WhichOneof.return_value = "zoob_value"
with self.assertRaises(ValueError):
self._call_fut(value_pb)
value_pb.WhichOneof.assert_called_once_with("value_type")
class Test_decode_dict(unittest.TestCase):
@staticmethod
def _call_fut(value_fields, client=mock.sentinel.client):
from google.cloud.firestore_v1._helpers import decode_dict
return decode_dict(value_fields, client)
@unittest.skipIf(
(3,) <= sys.version_info < (3, 4, 4), "known datetime bug (bpo-23517) in Python"
)
def test_many_types(self):
from google.protobuf import struct_pb2
from google.protobuf import timestamp_pb2
from google.cloud.firestore_v1.proto.document_pb2 import ArrayValue
from google.cloud.firestore_v1.proto.document_pb2 import MapValue
from google.cloud._helpers import UTC
from google.cloud.firestore_v1.field_path import FieldPath
dt_seconds = 1394037350
dt_nanos = 667285000
# Make sure precision is valid in microseconds too.
self.assertEqual(dt_nanos % 1000, 0)
dt_val = datetime.datetime.utcfromtimestamp(
dt_seconds + 1e-9 * dt_nanos
).replace(tzinfo=UTC)
value_fields = {
"foo": _value_pb(null_value=struct_pb2.NULL_VALUE),
"bar": _value_pb(boolean_value=True),
"baz": _value_pb(integer_value=981),
"quux": _value_pb(double_value=2.875),
"quuz": _value_pb(
timestamp_value=timestamp_pb2.Timestamp(
seconds=dt_seconds, nanos=dt_nanos
)
),
"corge": _value_pb(string_value=u"\N{snowman}"),
"grault": _value_pb(bytes_value=b"\xe2\x98\x83"),
"garply": _value_pb(
array_value=ArrayValue(
values=[
_value_pb(string_value=u"fork"),
_value_pb(double_value=4.0),
]
)
),
"waldo": _value_pb(
map_value=MapValue(
fields={
"fred": _value_pb(string_value=u"zap"),
"thud": _value_pb(boolean_value=False),
}
)
),
FieldPath("a", "b", "c").to_api_repr(): _value_pb(boolean_value=False),
}
expected = {
"foo": None,
"bar": True,
"baz": 981,
"quux": 2.875,
"quuz": dt_val,
"corge": u"\N{snowman}",
"grault": b"\xe2\x98\x83",
"garply": [u"fork", 4.0],
"waldo": {"fred": u"zap", "thud": False},
"a.b.c": False,
}
self.assertEqual(self._call_fut(value_fields), expected)
class Test_get_doc_id(unittest.TestCase):
@staticmethod
def _call_fut(document_pb, expected_prefix):
from google.cloud.firestore_v1._helpers import get_doc_id
return get_doc_id(document_pb, expected_prefix)
@staticmethod
def _dummy_ref_string(collection_id):
from google.cloud.firestore_v1.client import DEFAULT_DATABASE
project = u"bazzzz"
return u"projects/{}/databases/{}/documents/{}".format(
project, DEFAULT_DATABASE, collection_id
)
def test_success(self):
from google.cloud.firestore_v1.proto import document_pb2
prefix = self._dummy_ref_string("sub-collection")
actual_id = "this-is-the-one"
name = "{}/{}".format(prefix, actual_id)
document_pb = document_pb2.Document(name=name)
document_id = self._call_fut(document_pb, prefix)
self.assertEqual(document_id, actual_id)
def test_failure(self):
from google.cloud.firestore_v1.proto import document_pb2
actual_prefix = self._dummy_ref_string("the-right-one")
wrong_prefix = self._dummy_ref_string("the-wrong-one")
name = "{}/{}".format(actual_prefix, "sorry-wont-works")
document_pb = document_pb2.Document(name=name)
with self.assertRaises(ValueError) as exc_info:
self._call_fut(document_pb, wrong_prefix)
exc_args = exc_info.exception.args
self.assertEqual(len(exc_args), 4)
self.assertEqual(exc_args[1], name)
self.assertEqual(exc_args[3], wrong_prefix)
class Test_extract_fields(unittest.TestCase):
@staticmethod
def _call_fut(document_data, prefix_path, expand_dots=False):
from google.cloud.firestore_v1 import _helpers
return _helpers.extract_fields(
document_data, prefix_path, expand_dots=expand_dots
)
def test_w_empty_document(self):
from google.cloud.firestore_v1._helpers import _EmptyDict
document_data = {}
prefix_path = _make_field_path()
expected = [(_make_field_path(), _EmptyDict)]
iterator = self._call_fut(document_data, prefix_path)
self.assertEqual(list(iterator), expected)
def test_w_invalid_key_and_expand_dots(self):
document_data = {"b": 1, "a~d": 2, "c": 3}
prefix_path = _make_field_path()
with self.assertRaises(ValueError):
list(self._call_fut(document_data, prefix_path, expand_dots=True))
def test_w_shallow_keys(self):
document_data = {"b": 1, "a": 2, "c": 3}
prefix_path = _make_field_path()
expected = [
(_make_field_path("a"), 2),
(_make_field_path("b"), 1),
(_make_field_path("c"), 3),
]
iterator = self._call_fut(document_data, prefix_path)
self.assertEqual(list(iterator), expected)
def test_w_nested(self):
from google.cloud.firestore_v1._helpers import _EmptyDict
document_data = {"b": {"a": {"d": 4, "c": 3, "g": {}}, "e": 7}, "f": 5}
prefix_path = _make_field_path()
expected = [
(_make_field_path("b", "a", "c"), 3),
(_make_field_path("b", "a", "d"), 4),
(_make_field_path("b", "a", "g"), _EmptyDict),
(_make_field_path("b", "e"), 7),
(_make_field_path("f"), 5),
]
iterator = self._call_fut(document_data, prefix_path)
self.assertEqual(list(iterator), expected)
def test_w_expand_dotted(self):
from google.cloud.firestore_v1._helpers import _EmptyDict
document_data = {
"b": {"a": {"d": 4, "c": 3, "g": {}, "k.l.m": 17}, "e": 7},
"f": 5,
"h.i.j": 9,
}
prefix_path = _make_field_path()
expected = [
(_make_field_path("b", "a", "c"), 3),
(_make_field_path("b", "a", "d"), 4),
(_make_field_path("b", "a", "g"), _EmptyDict),
(_make_field_path("b", "a", "k.l.m"), 17),
(_make_field_path("b", "e"), 7),
(_make_field_path("f"), 5),
(_make_field_path("h", "i", "j"), 9),
]
iterator = self._call_fut(document_data, prefix_path, expand_dots=True)
self.assertEqual(list(iterator), expected)
class Test_set_field_value(unittest.TestCase):
@staticmethod
def _call_fut(document_data, field_path, value):
from google.cloud.firestore_v1 import _helpers
return _helpers.set_field_value(document_data, field_path, value)
def test_normal_value_w_shallow(self):
document = {}
field_path = _make_field_path("a")
value = 3
self._call_fut(document, field_path, value)
self.assertEqual(document, {"a": 3})
def test_normal_value_w_nested(self):
document = {}
field_path = _make_field_path("a", "b", "c")
value = 3
self._call_fut(document, field_path, value)
self.assertEqual(document, {"a": {"b": {"c": 3}}})
def test_empty_dict_w_shallow(self):
from google.cloud.firestore_v1._helpers import _EmptyDict
document = {}
field_path = _make_field_path("a")
value = _EmptyDict
self._call_fut(document, field_path, value)
self.assertEqual(document, {"a": {}})
def test_empty_dict_w_nested(self):
from google.cloud.firestore_v1._helpers import _EmptyDict
document = {}
field_path = _make_field_path("a", "b", "c")
value = _EmptyDict
self._call_fut(document, field_path, value)
self.assertEqual(document, {"a": {"b": {"c": {}}}})
class Test_get_field_value(unittest.TestCase):
@staticmethod
def _call_fut(document_data, field_path):
from google.cloud.firestore_v1 import _helpers
return _helpers.get_field_value(document_data, field_path)
def test_w_empty_path(self):
document = {}
with self.assertRaises(ValueError):
self._call_fut(document, _make_field_path())
def test_miss_shallow(self):
document = {}
with self.assertRaises(KeyError):
self._call_fut(document, _make_field_path("nonesuch"))
def test_miss_nested(self):
document = {"a": {"b": {}}}
with self.assertRaises(KeyError):
self._call_fut(document, _make_field_path("a", "b", "c"))
def test_hit_shallow(self):
document = {"a": 1}
self.assertEqual(self._call_fut(document, _make_field_path("a")), 1)
def test_hit_nested(self):
document = {"a": {"b": {"c": 1}}}
self.assertEqual(self._call_fut(document, _make_field_path("a", "b", "c")), 1)
class TestDocumentExtractor(unittest.TestCase):
@staticmethod
def _get_target_class():
from google.cloud.firestore_v1 import _helpers
return _helpers.DocumentExtractor
def _make_one(self, document_data):
return self._get_target_class()(document_data)
def test_ctor_w_empty_document(self):
document_data = {}
inst = self._make_one(document_data)
self.assertEqual(inst.document_data, document_data)
self.assertEqual(inst.field_paths, [])
self.assertEqual(inst.deleted_fields, [])
self.assertEqual(inst.server_timestamps, [])
self.assertEqual(inst.array_removes, {})
self.assertEqual(inst.array_unions, {})
self.assertEqual(inst.increments, {})
self.assertEqual(inst.maximums, {})
self.assertEqual(inst.minimums, {})
self.assertEqual(inst.set_fields, {})
self.assertTrue(inst.empty_document)
self.assertFalse(inst.has_transforms)
self.assertEqual(inst.transform_paths, [])
def test_ctor_w_delete_field_shallow(self):
from google.cloud.firestore_v1.transforms import DELETE_FIELD
document_data = {"a": DELETE_FIELD}
inst = self._make_one(document_data)
self.assertEqual(inst.document_data, document_data)
self.assertEqual(inst.field_paths, [])
self.assertEqual(inst.deleted_fields, [_make_field_path("a")])
self.assertEqual(inst.server_timestamps, [])
self.assertEqual(inst.array_removes, {})
self.assertEqual(inst.array_unions, {})
self.assertEqual(inst.increments, {})
self.assertEqual(inst.maximums, {})
self.assertEqual(inst.minimums, {})
self.assertEqual(inst.set_fields, {})
self.assertFalse(inst.empty_document)
self.assertFalse(inst.has_transforms)
self.assertEqual(inst.transform_paths, [])
def test_ctor_w_delete_field_nested(self):
from google.cloud.firestore_v1.transforms import DELETE_FIELD
document_data = {"a": {"b": {"c": DELETE_FIELD}}}
inst = self._make_one(document_data)
self.assertEqual(inst.document_data, document_data)
self.assertEqual(inst.field_paths, [])
self.assertEqual(inst.deleted_fields, [_make_field_path("a", "b", "c")])
self.assertEqual(inst.server_timestamps, [])
self.assertEqual(inst.array_removes, {})
self.assertEqual(inst.array_unions, {})
self.assertEqual(inst.increments, {})
self.assertEqual(inst.maximums, {})
self.assertEqual(inst.minimums, {})
self.assertEqual(inst.set_fields, {})
self.assertFalse(inst.empty_document)
self.assertFalse(inst.has_transforms)
self.assertEqual(inst.transform_paths, [])
def test_ctor_w_server_timestamp_shallow(self):
from google.cloud.firestore_v1.transforms import SERVER_TIMESTAMP
document_data = {"a": SERVER_TIMESTAMP}
inst = self._make_one(document_data)
self.assertEqual(inst.document_data, document_data)
self.assertEqual(inst.field_paths, [])
self.assertEqual(inst.deleted_fields, [])
self.assertEqual(inst.server_timestamps, [_make_field_path("a")])
self.assertEqual(inst.array_removes, {})
self.assertEqual(inst.array_unions, {})
self.assertEqual(inst.increments, {})
self.assertEqual(inst.maximums, {})
self.assertEqual(inst.minimums, {})
self.assertEqual(inst.set_fields, {})
self.assertFalse(inst.empty_document)
self.assertTrue(inst.has_transforms)
self.assertEqual(inst.transform_paths, [_make_field_path("a")])
def test_ctor_w_server_timestamp_nested(self):
from google.cloud.firestore_v1.transforms import SERVER_TIMESTAMP
document_data = {"a": {"b": {"c": SERVER_TIMESTAMP}}}
inst = self._make_one(document_data)
self.assertEqual(inst.document_data, document_data)
self.assertEqual(inst.field_paths, [])
self.assertEqual(inst.deleted_fields, [])
self.assertEqual(inst.server_timestamps, [_make_field_path("a", "b", "c")])
self.assertEqual(inst.array_removes, {})
self.assertEqual(inst.array_unions, {})
self.assertEqual(inst.increments, {})
self.assertEqual(inst.maximums, {})
self.assertEqual(inst.minimums, {})
self.assertEqual(inst.set_fields, {})
self.assertFalse(inst.empty_document)
self.assertTrue(inst.has_transforms)
self.assertEqual(inst.transform_paths, [_make_field_path("a", "b", "c")])
def test_ctor_w_array_remove_shallow(self):
from google.cloud.firestore_v1.transforms import ArrayRemove
values = [1, 3, 5]
document_data = {"a": ArrayRemove(values)}
inst = self._make_one(document_data)
expected_array_removes = {_make_field_path("a"): values}
self.assertEqual(inst.document_data, document_data)
self.assertEqual(inst.field_paths, [])
self.assertEqual(inst.deleted_fields, [])
self.assertEqual(inst.server_timestamps, [])
self.assertEqual(inst.array_removes, expected_array_removes)
self.assertEqual(inst.array_unions, {})
self.assertEqual(inst.increments, {})
self.assertEqual(inst.maximums, {})
self.assertEqual(inst.minimums, {})
self.assertEqual(inst.set_fields, {})
self.assertFalse(inst.empty_document)
self.assertTrue(inst.has_transforms)
self.assertEqual(inst.transform_paths, [_make_field_path("a")])
def test_ctor_w_array_remove_nested(self):
from google.cloud.firestore_v1.transforms import ArrayRemove
values = [2, 4, 8]
document_data = {"a": {"b": {"c": ArrayRemove(values)}}}
inst = self._make_one(document_data)
expected_array_removes = {_make_field_path("a", "b", "c"): values}
self.assertEqual(inst.document_data, document_data)
self.assertEqual(inst.field_paths, [])
self.assertEqual(inst.deleted_fields, [])
self.assertEqual(inst.server_timestamps, [])
self.assertEqual(inst.array_removes, expected_array_removes)
self.assertEqual(inst.array_unions, {})
self.assertEqual(inst.increments, {})
self.assertEqual(inst.maximums, {})
self.assertEqual(inst.minimums, {})
self.assertEqual(inst.set_fields, {})
self.assertFalse(inst.empty_document)
self.assertTrue(inst.has_transforms)
self.assertEqual(inst.transform_paths, [_make_field_path("a", "b", "c")])
def test_ctor_w_array_union_shallow(self):
from google.cloud.firestore_v1.transforms import ArrayUnion
values = [1, 3, 5]
document_data = {"a": ArrayUnion(values)}
inst = self._make_one(document_data)
expected_array_unions = {_make_field_path("a"): values}
self.assertEqual(inst.document_data, document_data)
self.assertEqual(inst.field_paths, [])
self.assertEqual(inst.deleted_fields, [])
self.assertEqual(inst.server_timestamps, [])
self.assertEqual(inst.array_removes, {})
self.assertEqual(inst.array_unions, expected_array_unions)
self.assertEqual(inst.set_fields, {})
self.assertFalse(inst.empty_document)
self.assertTrue(inst.has_transforms)
self.assertEqual(inst.transform_paths, [_make_field_path("a")])
def test_ctor_w_array_union_nested(self):
from google.cloud.firestore_v1.transforms import ArrayUnion
values = [2, 4, 8]
document_data = {"a": {"b": {"c": ArrayUnion(values)}}}
inst = self._make_one(document_data)
expected_array_unions = {_make_field_path("a", "b", "c"): values}
self.assertEqual(inst.document_data, document_data)
self.assertEqual(inst.field_paths, [])
self.assertEqual(inst.deleted_fields, [])
self.assertEqual(inst.server_timestamps, [])
self.assertEqual(inst.array_removes, {})
self.assertEqual(inst.array_unions, expected_array_unions)
self.assertEqual(inst.increments, {})
self.assertEqual(inst.maximums, {})
self.assertEqual(inst.minimums, {})
self.assertEqual(inst.set_fields, {})
self.assertFalse(inst.empty_document)
self.assertTrue(inst.has_transforms)
self.assertEqual(inst.transform_paths, [_make_field_path("a", "b", "c")])
def test_ctor_w_increment_shallow(self):
from google.cloud.firestore_v1.transforms import Increment
value = 1
document_data = {"a": Increment(value)}
inst = self._make_one(document_data)
expected_increments = {_make_field_path("a"): value}
self.assertEqual(inst.document_data, document_data)
self.assertEqual(inst.field_paths, [])
self.assertEqual(inst.deleted_fields, [])
self.assertEqual(inst.server_timestamps, [])
self.assertEqual(inst.array_removes, {})
self.assertEqual(inst.array_unions, {})
self.assertEqual(inst.increments, expected_increments)
self.assertEqual(inst.maximums, {})
self.assertEqual(inst.minimums, {})
self.assertEqual(inst.set_fields, {})
self.assertFalse(inst.empty_document)
self.assertTrue(inst.has_transforms)
self.assertEqual(inst.transform_paths, [_make_field_path("a")])
def test_ctor_w_increment_nested(self):
from google.cloud.firestore_v1.transforms import Increment
value = 2
document_data = {"a": {"b": {"c": Increment(value)}}}
inst = self._make_one(document_data)
expected_increments = {_make_field_path("a", "b", "c"): value}
self.assertEqual(inst.document_data, document_data)
self.assertEqual(inst.field_paths, [])
self.assertEqual(inst.deleted_fields, [])
self.assertEqual(inst.server_timestamps, [])
self.assertEqual(inst.array_removes, {})
self.assertEqual(inst.array_unions, {})
self.assertEqual(inst.increments, expected_increments)
self.assertEqual(inst.maximums, {})
self.assertEqual(inst.minimums, {})
self.assertEqual(inst.set_fields, {})
self.assertFalse(inst.empty_document)
self.assertTrue(inst.has_transforms)
self.assertEqual(inst.transform_paths, [_make_field_path("a", "b", "c")])
def test_ctor_w_maximum_shallow(self):
from google.cloud.firestore_v1.transforms import Maximum
value = 1
document_data = {"a": Maximum(value)}
inst = self._make_one(document_data)
expected_maximums = {_make_field_path("a"): value}
self.assertEqual(inst.document_data, document_data)
self.assertEqual(inst.field_paths, [])
self.assertEqual(inst.deleted_fields, [])
self.assertEqual(inst.server_timestamps, [])
self.assertEqual(inst.array_removes, {})
self.assertEqual(inst.array_unions, {})
self.assertEqual(inst.increments, {})
self.assertEqual(inst.maximums, expected_maximums)
self.assertEqual(inst.minimums, {})
self.assertEqual(inst.set_fields, {})
self.assertFalse(inst.empty_document)
self.assertTrue(inst.has_transforms)
self.assertEqual(inst.transform_paths, [_make_field_path("a")])
def test_ctor_w_maximum_nested(self):
from google.cloud.firestore_v1.transforms import Maximum
value = 2
document_data = {"a": {"b": {"c": Maximum(value)}}}
inst = self._make_one(document_data)
expected_maximums = {_make_field_path("a", "b", "c"): value}
self.assertEqual(inst.document_data, document_data)
self.assertEqual(inst.field_paths, [])
self.assertEqual(inst.deleted_fields, [])
self.assertEqual(inst.server_timestamps, [])
self.assertEqual(inst.array_removes, {})
self.assertEqual(inst.array_unions, {})
self.assertEqual(inst.increments, {})
self.assertEqual(inst.maximums, expected_maximums)
self.assertEqual(inst.minimums, {})
self.assertEqual(inst.set_fields, {})
self.assertFalse(inst.empty_document)
self.assertTrue(inst.has_transforms)
self.assertEqual(inst.transform_paths, [_make_field_path("a", "b", "c")])
def test_ctor_w_minimum_shallow(self):
from google.cloud.firestore_v1.transforms import Minimum
value = 1
document_data = {"a": Minimum(value)}
inst = self._make_one(document_data)
expected_minimums = {_make_field_path("a"): value}
self.assertEqual(inst.document_data, document_data)
self.assertEqual(inst.field_paths, [])
self.assertEqual(inst.deleted_fields, [])
self.assertEqual(inst.server_timestamps, [])
self.assertEqual(inst.array_removes, {})
self.assertEqual(inst.array_unions, {})
self.assertEqual(inst.increments, {})
self.assertEqual(inst.maximums, {})
self.assertEqual(inst.minimums, expected_minimums)
self.assertEqual(inst.set_fields, {})
self.assertFalse(inst.empty_document)
self.assertTrue(inst.has_transforms)
self.assertEqual(inst.transform_paths, [_make_field_path("a")])
def test_ctor_w_minimum_nested(self):
from google.cloud.firestore_v1.transforms import Minimum
value = 2
document_data = {"a": {"b": {"c": Minimum(value)}}}
inst = self._make_one(document_data)
expected_minimums = {_make_field_path("a", "b", "c"): value}
self.assertEqual(inst.document_data, document_data)
self.assertEqual(inst.field_paths, [])
self.assertEqual(inst.deleted_fields, [])
self.assertEqual(inst.server_timestamps, [])
self.assertEqual(inst.array_removes, {})
self.assertEqual(inst.array_unions, {})
self.assertEqual(inst.increments, {})
self.assertEqual(inst.maximums, {})
self.assertEqual(inst.minimums, expected_minimums)
self.assertEqual(inst.set_fields, {})
self.assertFalse(inst.empty_document)
self.assertTrue(inst.has_transforms)
self.assertEqual(inst.transform_paths, [_make_field_path("a", "b", "c")])
def test_ctor_w_empty_dict_shallow(self):
document_data = {"a": {}}
inst = self._make_one(document_data)
expected_field_paths = [_make_field_path("a")]
self.assertEqual(inst.document_data, document_data)
self.assertEqual(inst.field_paths, expected_field_paths)
self.assertEqual(inst.deleted_fields, [])
self.assertEqual(inst.server_timestamps, [])
self.assertEqual(inst.array_removes, {})
self.assertEqual(inst.array_unions, {})
self.assertEqual(inst.increments, {})
self.assertEqual(inst.maximums, {})
self.assertEqual(inst.minimums, {})
self.assertEqual(inst.set_fields, document_data)
self.assertFalse(inst.empty_document)
self.assertFalse(inst.has_transforms)
self.assertEqual(inst.transform_paths, [])
def test_ctor_w_empty_dict_nested(self):
document_data = {"a": {"b": {"c": {}}}}
inst = self._make_one(document_data)
expected_field_paths = [_make_field_path("a", "b", "c")]
self.assertEqual(inst.document_data, document_data)
self.assertEqual(inst.field_paths, expected_field_paths)
self.assertEqual(inst.deleted_fields, [])
self.assertEqual(inst.server_timestamps, [])
self.assertEqual(inst.array_removes, {})
self.assertEqual(inst.array_unions, {})
self.assertEqual(inst.increments, {})
self.assertEqual(inst.maximums, {})
self.assertEqual(inst.minimums, {})
self.assertEqual(inst.set_fields, document_data)
self.assertFalse(inst.empty_document)
self.assertFalse(inst.has_transforms)
self.assertEqual(inst.transform_paths, [])
def test_ctor_w_normal_value_shallow(self):
document_data = {"b": 1, "a": 2, "c": 3}
inst = self._make_one(document_data)
expected_field_paths = [
_make_field_path("a"),
_make_field_path("b"),
_make_field_path("c"),
]
self.assertEqual(inst.document_data, document_data)
self.assertEqual(inst.field_paths, expected_field_paths)
self.assertEqual(inst.deleted_fields, [])
self.assertEqual(inst.server_timestamps, [])
self.assertEqual(inst.array_removes, {})
self.assertEqual(inst.array_unions, {})
self.assertEqual(inst.set_fields, document_data)
self.assertFalse(inst.empty_document)
self.assertFalse(inst.has_transforms)
def test_ctor_w_normal_value_nested(self):
document_data = {"b": {"a": {"d": 4, "c": 3}, "e": 7}, "f": 5}
inst = self._make_one(document_data)
expected_field_paths = [
_make_field_path("b", "a", "c"),
_make_field_path("b", "a", "d"),
_make_field_path("b", "e"),
_make_field_path("f"),
]
self.assertEqual(inst.document_data, document_data)
self.assertEqual(inst.field_paths, expected_field_paths)
self.assertEqual(inst.deleted_fields, [])
self.assertEqual(inst.server_timestamps, [])
self.assertEqual(inst.array_removes, {})
self.assertEqual(inst.array_unions, {})
self.assertEqual(inst.increments, {})
self.assertEqual(inst.maximums, {})
self.assertEqual(inst.minimums, {})
self.assertEqual(inst.set_fields, document_data)
self.assertFalse(inst.empty_document)
self.assertFalse(inst.has_transforms)
def test_get_update_pb_w_exists_precondition(self):
from google.cloud.firestore_v1.proto import write_pb2
document_data = {}
inst = self._make_one(document_data)
document_path = (
"projects/project-id/databases/(default)/" "documents/document-id"
)
update_pb = inst.get_update_pb(document_path, exists=False)
self.assertIsInstance(update_pb, write_pb2.Write)
self.assertEqual(update_pb.update.name, document_path)
self.assertEqual(update_pb.update.fields, document_data)
self.assertTrue(update_pb.HasField("current_document"))
self.assertFalse(update_pb.current_document.exists)
def test_get_update_pb_wo_exists_precondition(self):
from google.cloud.firestore_v1.proto import write_pb2
from google.cloud.firestore_v1._helpers import encode_dict
document_data = {"a": 1}
inst = self._make_one(document_data)
document_path = (
"projects/project-id/databases/(default)/" "documents/document-id"
)
update_pb = inst.get_update_pb(document_path)
self.assertIsInstance(update_pb, write_pb2.Write)
self.assertEqual(update_pb.update.name, document_path)
self.assertEqual(update_pb.update.fields, encode_dict(document_data))
self.assertFalse(update_pb.HasField("current_document"))
def test_get_transform_pb_w_server_timestamp_w_exists_precondition(self):
from google.cloud.firestore_v1.proto import write_pb2
from google.cloud.firestore_v1.transforms import SERVER_TIMESTAMP
from google.cloud.firestore_v1._helpers import REQUEST_TIME_ENUM
document_data = {"a": SERVER_TIMESTAMP}
inst = self._make_one(document_data)
document_path = (
"projects/project-id/databases/(default)/" "documents/document-id"
)
transform_pb = inst.get_transform_pb(document_path, exists=False)
self.assertIsInstance(transform_pb, write_pb2.Write)
self.assertEqual(transform_pb.transform.document, document_path)
transforms = transform_pb.transform.field_transforms
self.assertEqual(len(transforms), 1)
transform = transforms[0]
self.assertEqual(transform.field_path, "a")
self.assertEqual(transform.set_to_server_value, REQUEST_TIME_ENUM)
self.assertTrue(transform_pb.HasField("current_document"))
self.assertFalse(transform_pb.current_document.exists)
def test_get_transform_pb_w_server_timestamp_wo_exists_precondition(self):
from google.cloud.firestore_v1.proto import write_pb2
from google.cloud.firestore_v1.transforms import SERVER_TIMESTAMP
from google.cloud.firestore_v1._helpers import REQUEST_TIME_ENUM
document_data = {"a": {"b": {"c": SERVER_TIMESTAMP}}}
inst = self._make_one(document_data)
document_path = (
"projects/project-id/databases/(default)/" "documents/document-id"
)
transform_pb = inst.get_transform_pb(document_path)
self.assertIsInstance(transform_pb, write_pb2.Write)
self.assertEqual(transform_pb.transform.document, document_path)
transforms = transform_pb.transform.field_transforms
self.assertEqual(len(transforms), 1)
transform = transforms[0]
self.assertEqual(transform.field_path, "a.b.c")
self.assertEqual(transform.set_to_server_value, REQUEST_TIME_ENUM)
self.assertFalse(transform_pb.HasField("current_document"))
@staticmethod
def _array_value_to_list(array_value):
from google.cloud.firestore_v1._helpers import decode_value
return [decode_value(element, client=None) for element in array_value.values]
def test_get_transform_pb_w_array_remove(self):
from google.cloud.firestore_v1.proto import write_pb2
from google.cloud.firestore_v1.transforms import ArrayRemove
values = [2, 4, 8]
document_data = {"a": {"b": {"c": ArrayRemove(values)}}}
inst = self._make_one(document_data)
document_path = (
"projects/project-id/databases/(default)/" "documents/document-id"
)
transform_pb = inst.get_transform_pb(document_path)
self.assertIsInstance(transform_pb, write_pb2.Write)
self.assertEqual(transform_pb.transform.document, document_path)
transforms = transform_pb.transform.field_transforms
self.assertEqual(len(transforms), 1)
transform = transforms[0]
self.assertEqual(transform.field_path, "a.b.c")
removed = self._array_value_to_list(transform.remove_all_from_array)
self.assertEqual(removed, values)
self.assertFalse(transform_pb.HasField("current_document"))
def test_get_transform_pb_w_array_union(self):
from google.cloud.firestore_v1.proto import write_pb2
from google.cloud.firestore_v1.transforms import ArrayUnion
values = [1, 3, 5]
document_data = {"a": {"b": {"c": ArrayUnion(values)}}}
inst = self._make_one(document_data)
document_path = (
"projects/project-id/databases/(default)/" "documents/document-id"
)
transform_pb = inst.get_transform_pb(document_path)
self.assertIsInstance(transform_pb, write_pb2.Write)
self.assertEqual(transform_pb.transform.document, document_path)
transforms = transform_pb.transform.field_transforms
self.assertEqual(len(transforms), 1)
transform = transforms[0]
self.assertEqual(transform.field_path, "a.b.c")
added = self._array_value_to_list(transform.append_missing_elements)
self.assertEqual(added, values)
self.assertFalse(transform_pb.HasField("current_document"))
def test_get_transform_pb_w_increment_int(self):
from google.cloud.firestore_v1.proto import write_pb2
from google.cloud.firestore_v1.transforms import Increment
value = 1
document_data = {"a": {"b": {"c": Increment(value)}}}
inst = self._make_one(document_data)
document_path = (
"projects/project-id/databases/(default)/" "documents/document-id"
)
transform_pb = inst.get_transform_pb(document_path)
self.assertIsInstance(transform_pb, write_pb2.Write)
self.assertEqual(transform_pb.transform.document, document_path)
transforms = transform_pb.transform.field_transforms
self.assertEqual(len(transforms), 1)
transform = transforms[0]
self.assertEqual(transform.field_path, "a.b.c")
added = transform.increment.integer_value
self.assertEqual(added, value)
self.assertFalse(transform_pb.HasField("current_document"))
def test_get_transform_pb_w_increment_float(self):
from google.cloud.firestore_v1.proto import write_pb2
from google.cloud.firestore_v1.transforms import Increment
value = 3.1415926
document_data = {"a": {"b": {"c": Increment(value)}}}
inst = self._make_one(document_data)
document_path = (
"projects/project-id/databases/(default)/" "documents/document-id"
)
transform_pb = inst.get_transform_pb(document_path)
self.assertIsInstance(transform_pb, write_pb2.Write)
self.assertEqual(transform_pb.transform.document, document_path)
transforms = transform_pb.transform.field_transforms
self.assertEqual(len(transforms), 1)
transform = transforms[0]
self.assertEqual(transform.field_path, "a.b.c")
added = transform.increment.double_value
self.assertEqual(added, value)
self.assertFalse(transform_pb.HasField("current_document"))
def test_get_transform_pb_w_maximum_int(self):
from google.cloud.firestore_v1.proto import write_pb2
from google.cloud.firestore_v1.transforms import Maximum
value = 1
document_data = {"a": {"b": {"c": Maximum(value)}}}
inst = self._make_one(document_data)
document_path = (
"projects/project-id/databases/(default)/" "documents/document-id"
)
transform_pb = inst.get_transform_pb(document_path)
self.assertIsInstance(transform_pb, write_pb2.Write)
self.assertEqual(transform_pb.transform.document, document_path)
transforms = transform_pb.transform.field_transforms
self.assertEqual(len(transforms), 1)
transform = transforms[0]
self.assertEqual(transform.field_path, "a.b.c")
added = transform.maximum.integer_value
self.assertEqual(added, value)
self.assertFalse(transform_pb.HasField("current_document"))
def test_get_transform_pb_w_maximum_float(self):
from google.cloud.firestore_v1.proto import write_pb2
from google.cloud.firestore_v1.transforms import Maximum
value = 3.1415926
document_data = {"a": {"b": {"c": Maximum(value)}}}
inst = self._make_one(document_data)
document_path = (
"projects/project-id/databases/(default)/" "documents/document-id"
)
transform_pb = inst.get_transform_pb(document_path)
self.assertIsInstance(transform_pb, write_pb2.Write)
self.assertEqual(transform_pb.transform.document, document_path)
transforms = transform_pb.transform.field_transforms
self.assertEqual(len(transforms), 1)
transform = transforms[0]
self.assertEqual(transform.field_path, "a.b.c")
added = transform.maximum.double_value
self.assertEqual(added, value)
self.assertFalse(transform_pb.HasField("current_document"))
def test_get_transform_pb_w_minimum_int(self):
from google.cloud.firestore_v1.proto import write_pb2
from google.cloud.firestore_v1.transforms import Minimum
value = 1
document_data = {"a": {"b": {"c": Minimum(value)}}}
inst = self._make_one(document_data)
document_path = (
"projects/project-id/databases/(default)/" "documents/document-id"
)
transform_pb = inst.get_transform_pb(document_path)
self.assertIsInstance(transform_pb, write_pb2.Write)
self.assertEqual(transform_pb.transform.document, document_path)
transforms = transform_pb.transform.field_transforms
self.assertEqual(len(transforms), 1)
transform = transforms[0]
self.assertEqual(transform.field_path, "a.b.c")
added = transform.minimum.integer_value
self.assertEqual(added, value)
self.assertFalse(transform_pb.HasField("current_document"))
def test_get_transform_pb_w_minimum_float(self):
from google.cloud.firestore_v1.proto import write_pb2
from google.cloud.firestore_v1.transforms import Minimum
value = 3.1415926
document_data = {"a": {"b": {"c": Minimum(value)}}}
inst = self._make_one(document_data)
document_path = (
"projects/project-id/databases/(default)/" "documents/document-id"
)
transform_pb = inst.get_transform_pb(document_path)
self.assertIsInstance(transform_pb, write_pb2.Write)
self.assertEqual(transform_pb.transform.document, document_path)
transforms = transform_pb.transform.field_transforms
self.assertEqual(len(transforms), 1)
transform = transforms[0]
self.assertEqual(transform.field_path, "a.b.c")
added = transform.minimum.double_value
self.assertEqual(added, value)
self.assertFalse(transform_pb.HasField("current_document"))
class Test_pbs_for_create(unittest.TestCase):
@staticmethod
def _call_fut(document_path, document_data):
from google.cloud.firestore_v1._helpers import pbs_for_create
return pbs_for_create(document_path, document_data)
@staticmethod
def _make_write_w_document(document_path, **data):
from google.cloud.firestore_v1.proto import document_pb2
from google.cloud.firestore_v1.proto import write_pb2
from google.cloud.firestore_v1._helpers import encode_dict
from google.cloud.firestore_v1.proto import common_pb2
return write_pb2.Write(
update=document_pb2.Document(name=document_path, fields=encode_dict(data)),
current_document=common_pb2.Precondition(exists=False),
)
@staticmethod
def _make_write_w_transform(document_path, fields):
from google.cloud.firestore_v1.proto import write_pb2
from google.cloud.firestore_v1.gapic import enums
server_val = enums.DocumentTransform.FieldTransform.ServerValue
transforms = [
write_pb2.DocumentTransform.FieldTransform(
field_path=field, set_to_server_value=server_val.REQUEST_TIME
)
for field in fields
]
return write_pb2.Write(
transform=write_pb2.DocumentTransform(
document=document_path, field_transforms=transforms
)
)
def _helper(self, do_transform=False, empty_val=False):
from google.cloud.firestore_v1.transforms import SERVER_TIMESTAMP
document_path = _make_ref_string(u"little", u"town", u"of", u"ham")
document_data = {"cheese": 1.5, "crackers": True}
if do_transform:
document_data["butter"] = SERVER_TIMESTAMP
if empty_val:
document_data["mustard"] = {}
write_pbs = self._call_fut(document_path, document_data)
if empty_val:
update_pb = self._make_write_w_document(
document_path, cheese=1.5, crackers=True, mustard={}
)
else:
update_pb = self._make_write_w_document(
document_path, cheese=1.5, crackers=True
)
expected_pbs = [update_pb]
if do_transform:
expected_pbs.append(
self._make_write_w_transform(document_path, fields=["butter"])
)
self.assertEqual(write_pbs, expected_pbs)
def test_without_transform(self):
self._helper()
def test_w_transform(self):
self._helper(do_transform=True)
def test_w_transform_and_empty_value(self):
self._helper(do_transform=True, empty_val=True)
class Test_pbs_for_set_no_merge(unittest.TestCase):
@staticmethod
def _call_fut(document_path, document_data):
from google.cloud.firestore_v1 import _helpers
return _helpers.pbs_for_set_no_merge(document_path, document_data)
@staticmethod
def _make_write_w_document(document_path, **data):
from google.cloud.firestore_v1.proto import document_pb2
from google.cloud.firestore_v1.proto import write_pb2
from google.cloud.firestore_v1._helpers import encode_dict
return write_pb2.Write(
update=document_pb2.Document(name=document_path, fields=encode_dict(data))
)
@staticmethod
def _make_write_w_transform(document_path, fields):
from google.cloud.firestore_v1.proto import write_pb2
from google.cloud.firestore_v1.gapic import enums
server_val = enums.DocumentTransform.FieldTransform.ServerValue
transforms = [
write_pb2.DocumentTransform.FieldTransform(
field_path=field, set_to_server_value=server_val.REQUEST_TIME
)
for field in fields
]
return write_pb2.Write(
transform=write_pb2.DocumentTransform(
document=document_path, field_transforms=transforms
)
)
def test_w_empty_document(self):
document_path = _make_ref_string(u"little", u"town", u"of", u"ham")
document_data = {}
write_pbs = self._call_fut(document_path, document_data)
update_pb = self._make_write_w_document(document_path)
expected_pbs = [update_pb]
self.assertEqual(write_pbs, expected_pbs)
def test_w_only_server_timestamp(self):
from google.cloud.firestore_v1.transforms import SERVER_TIMESTAMP
document_path = _make_ref_string(u"little", u"town", u"of", u"ham")
document_data = {"butter": SERVER_TIMESTAMP}
write_pbs = self._call_fut(document_path, document_data)
update_pb = self._make_write_w_document(document_path)
transform_pb = self._make_write_w_transform(document_path, ["butter"])
expected_pbs = [update_pb, transform_pb]
self.assertEqual(write_pbs, expected_pbs)
def _helper(self, do_transform=False, empty_val=False):
from google.cloud.firestore_v1.transforms import SERVER_TIMESTAMP
document_path = _make_ref_string(u"little", u"town", u"of", u"ham")
document_data = {"cheese": 1.5, "crackers": True}
if do_transform:
document_data["butter"] = SERVER_TIMESTAMP
if empty_val:
document_data["mustard"] = {}
write_pbs = self._call_fut(document_path, document_data)
if empty_val:
update_pb = self._make_write_w_document(
document_path, cheese=1.5, crackers=True, mustard={}
)
else:
update_pb = self._make_write_w_document(
document_path, cheese=1.5, crackers=True
)
expected_pbs = [update_pb]
if do_transform:
expected_pbs.append(
self._make_write_w_transform(document_path, fields=["butter"])
)
self.assertEqual(write_pbs, expected_pbs)
def test_defaults(self):
self._helper()
def test_w_transform(self):
self._helper(do_transform=True)
def test_w_transform_and_empty_value(self):
# Exercise #5944
self._helper(do_transform=True, empty_val=True)
class TestDocumentExtractorForMerge(unittest.TestCase):
@staticmethod
def _get_target_class():
from google.cloud.firestore_v1 import _helpers
return _helpers.DocumentExtractorForMerge
def _make_one(self, document_data):
return self._get_target_class()(document_data)
def test_ctor_w_empty_document(self):
document_data = {}
inst = self._make_one(document_data)
self.assertEqual(inst.data_merge, [])
self.assertEqual(inst.transform_merge, [])
self.assertEqual(inst.merge, [])
def test_apply_merge_all_w_empty_document(self):
document_data = {}
inst = self._make_one(document_data)
inst.apply_merge(True)
self.assertEqual(inst.data_merge, [])
self.assertEqual(inst.transform_merge, [])
self.assertEqual(inst.merge, [])
self.assertFalse(inst.has_updates)
def test_apply_merge_all_w_delete(self):
from google.cloud.firestore_v1.transforms import DELETE_FIELD
document_data = {"write_me": "value", "delete_me": DELETE_FIELD}
inst = self._make_one(document_data)
inst.apply_merge(True)
expected_data_merge = [
_make_field_path("delete_me"),
_make_field_path("write_me"),
]
self.assertEqual(inst.data_merge, expected_data_merge)
self.assertEqual(inst.transform_merge, [])
self.assertEqual(inst.merge, expected_data_merge)
self.assertTrue(inst.has_updates)
def test_apply_merge_all_w_server_timestamp(self):
from google.cloud.firestore_v1.transforms import SERVER_TIMESTAMP
document_data = {"write_me": "value", "timestamp": SERVER_TIMESTAMP}
inst = self._make_one(document_data)
inst.apply_merge(True)
expected_data_merge = [_make_field_path("write_me")]
expected_transform_merge = [_make_field_path("timestamp")]
expected_merge = [_make_field_path("timestamp"), _make_field_path("write_me")]
self.assertEqual(inst.data_merge, expected_data_merge)
self.assertEqual(inst.transform_merge, expected_transform_merge)
self.assertEqual(inst.merge, expected_merge)
self.assertTrue(inst.has_updates)
def test_apply_merge_list_fields_w_empty_document(self):
document_data = {}
inst = self._make_one(document_data)
with self.assertRaises(ValueError):
inst.apply_merge(["nonesuch", "or.this"])
def test_apply_merge_list_fields_w_unmerged_delete(self):
from google.cloud.firestore_v1.transforms import DELETE_FIELD
document_data = {
"write_me": "value",
"delete_me": DELETE_FIELD,
"ignore_me": 123,
"unmerged_delete": DELETE_FIELD,
}
inst = self._make_one(document_data)
with self.assertRaises(ValueError):
inst.apply_merge(["write_me", "delete_me"])
def test_apply_merge_list_fields_w_delete(self):
from google.cloud.firestore_v1.transforms import DELETE_FIELD
document_data = {
"write_me": "value",
"delete_me": DELETE_FIELD,
"ignore_me": 123,
}
inst = self._make_one(document_data)
inst.apply_merge(["write_me", "delete_me"])
expected_set_fields = {"write_me": "value"}
expected_deleted_fields = [_make_field_path("delete_me")]
self.assertEqual(inst.set_fields, expected_set_fields)
self.assertEqual(inst.deleted_fields, expected_deleted_fields)
self.assertTrue(inst.has_updates)
def test_apply_merge_list_fields_w_prefixes(self):
document_data = {"a": {"b": {"c": 123}}}
inst = self._make_one(document_data)
with self.assertRaises(ValueError):
inst.apply_merge(["a", "a.b"])
def test_apply_merge_list_fields_w_missing_data_string_paths(self):
document_data = {"write_me": "value", "ignore_me": 123}
inst = self._make_one(document_data)
with self.assertRaises(ValueError):
inst.apply_merge(["write_me", "nonesuch"])
def test_apply_merge_list_fields_w_non_merge_field(self):
document_data = {"write_me": "value", "ignore_me": 123}
inst = self._make_one(document_data)
inst.apply_merge([_make_field_path("write_me")])
expected_set_fields = {"write_me": "value"}
self.assertEqual(inst.set_fields, expected_set_fields)
self.assertTrue(inst.has_updates)
def test_apply_merge_list_fields_w_server_timestamp(self):
from google.cloud.firestore_v1.transforms import SERVER_TIMESTAMP
document_data = {
"write_me": "value",
"timestamp": SERVER_TIMESTAMP,
"ignored_stamp": SERVER_TIMESTAMP,
}
inst = self._make_one(document_data)
inst.apply_merge([_make_field_path("write_me"), _make_field_path("timestamp")])
expected_data_merge = [_make_field_path("write_me")]
expected_transform_merge = [_make_field_path("timestamp")]
expected_merge = [_make_field_path("timestamp"), _make_field_path("write_me")]
self.assertEqual(inst.data_merge, expected_data_merge)
self.assertEqual(inst.transform_merge, expected_transform_merge)
self.assertEqual(inst.merge, expected_merge)
expected_server_timestamps = [_make_field_path("timestamp")]
self.assertEqual(inst.server_timestamps, expected_server_timestamps)
self.assertTrue(inst.has_updates)
def test_apply_merge_list_fields_w_array_remove(self):
from google.cloud.firestore_v1.transforms import ArrayRemove
values = [2, 4, 8]
document_data = {
"write_me": "value",
"remove_me": ArrayRemove(values),
"ignored_remove_me": ArrayRemove((1, 3, 5)),
}
inst = self._make_one(document_data)
inst.apply_merge([_make_field_path("write_me"), _make_field_path("remove_me")])
expected_data_merge = [_make_field_path("write_me")]
expected_transform_merge = [_make_field_path("remove_me")]
expected_merge = [_make_field_path("remove_me"), _make_field_path("write_me")]
self.assertEqual(inst.data_merge, expected_data_merge)
self.assertEqual(inst.transform_merge, expected_transform_merge)
self.assertEqual(inst.merge, expected_merge)
expected_array_removes = {_make_field_path("remove_me"): values}
self.assertEqual(inst.array_removes, expected_array_removes)
self.assertTrue(inst.has_updates)
def test_apply_merge_list_fields_w_array_union(self):
from google.cloud.firestore_v1.transforms import ArrayUnion
values = [1, 3, 5]
document_data = {
"write_me": "value",
"union_me": ArrayUnion(values),
"ignored_union_me": ArrayUnion((2, 4, 8)),
}
inst = self._make_one(document_data)
inst.apply_merge([_make_field_path("write_me"), _make_field_path("union_me")])
expected_data_merge = [_make_field_path("write_me")]
expected_transform_merge = [_make_field_path("union_me")]
expected_merge = [_make_field_path("union_me"), _make_field_path("write_me")]
self.assertEqual(inst.data_merge, expected_data_merge)
self.assertEqual(inst.transform_merge, expected_transform_merge)
self.assertEqual(inst.merge, expected_merge)
expected_array_unions = {_make_field_path("union_me"): values}
self.assertEqual(inst.array_unions, expected_array_unions)
self.assertTrue(inst.has_updates)
class Test_pbs_for_set_with_merge(unittest.TestCase):
@staticmethod
def _call_fut(document_path, document_data, merge):
from google.cloud.firestore_v1 import _helpers
return _helpers.pbs_for_set_with_merge(
document_path, document_data, merge=merge
)
@staticmethod
def _make_write_w_document(document_path, **data):
from google.cloud.firestore_v1.proto import document_pb2
from google.cloud.firestore_v1.proto import write_pb2
from google.cloud.firestore_v1._helpers import encode_dict
return write_pb2.Write(
update=document_pb2.Document(name=document_path, fields=encode_dict(data))
)
@staticmethod
def _make_write_w_transform(document_path, fields):
from google.cloud.firestore_v1.proto import write_pb2
from google.cloud.firestore_v1.gapic import enums
server_val = enums.DocumentTransform.FieldTransform.ServerValue
transforms = [
write_pb2.DocumentTransform.FieldTransform(
field_path=field, set_to_server_value=server_val.REQUEST_TIME
)
for field in fields
]
return write_pb2.Write(
transform=write_pb2.DocumentTransform(
document=document_path, field_transforms=transforms
)
)
@staticmethod
def _update_document_mask(update_pb, field_paths):
from google.cloud.firestore_v1.proto import common_pb2
update_pb.update_mask.CopyFrom(
common_pb2.DocumentMask(field_paths=sorted(field_paths))
)
def test_with_merge_true_wo_transform(self):
document_path = _make_ref_string(u"little", u"town", u"of", u"ham")
document_data = {"cheese": 1.5, "crackers": True}
write_pbs = self._call_fut(document_path, document_data, merge=True)
update_pb = self._make_write_w_document(document_path, **document_data)
self._update_document_mask(update_pb, field_paths=sorted(document_data))
expected_pbs = [update_pb]
self.assertEqual(write_pbs, expected_pbs)
def test_with_merge_field_wo_transform(self):
document_path = _make_ref_string(u"little", u"town", u"of", u"ham")
document_data = {"cheese": 1.5, "crackers": True}
write_pbs = self._call_fut(document_path, document_data, merge=["cheese"])
update_pb = self._make_write_w_document(
document_path, cheese=document_data["cheese"]
)
self._update_document_mask(update_pb, field_paths=["cheese"])
expected_pbs = [update_pb]
self.assertEqual(write_pbs, expected_pbs)
def test_with_merge_true_w_transform(self):
from google.cloud.firestore_v1.transforms import SERVER_TIMESTAMP
document_path = _make_ref_string(u"little", u"town", u"of", u"ham")
update_data = {"cheese": 1.5, "crackers": True}
document_data = update_data.copy()
document_data["butter"] = SERVER_TIMESTAMP
write_pbs = self._call_fut(document_path, document_data, merge=True)
update_pb = self._make_write_w_document(document_path, **update_data)
self._update_document_mask(update_pb, field_paths=sorted(update_data))
transform_pb = self._make_write_w_transform(document_path, fields=["butter"])
expected_pbs = [update_pb, transform_pb]
self.assertEqual(write_pbs, expected_pbs)
def test_with_merge_field_w_transform(self):
from google.cloud.firestore_v1.transforms import SERVER_TIMESTAMP
document_path = _make_ref_string(u"little", u"town", u"of", u"ham")
update_data = {"cheese": 1.5, "crackers": True}
document_data = update_data.copy()
document_data["butter"] = SERVER_TIMESTAMP
write_pbs = self._call_fut(
document_path, document_data, merge=["cheese", "butter"]
)
update_pb = self._make_write_w_document(
document_path, cheese=document_data["cheese"]
)
self._update_document_mask(update_pb, ["cheese"])
transform_pb = self._make_write_w_transform(document_path, fields=["butter"])
expected_pbs = [update_pb, transform_pb]
self.assertEqual(write_pbs, expected_pbs)
def test_with_merge_field_w_transform_masking_simple(self):
from google.cloud.firestore_v1.transforms import SERVER_TIMESTAMP
document_path = _make_ref_string(u"little", u"town", u"of", u"ham")
update_data = {"cheese": 1.5, "crackers": True}
document_data = update_data.copy()
document_data["butter"] = {"pecan": SERVER_TIMESTAMP}
write_pbs = self._call_fut(document_path, document_data, merge=["butter.pecan"])
update_pb = self._make_write_w_document(document_path)
transform_pb = self._make_write_w_transform(
document_path, fields=["butter.pecan"]
)
expected_pbs = [update_pb, transform_pb]
self.assertEqual(write_pbs, expected_pbs)
def test_with_merge_field_w_transform_parent(self):
from google.cloud.firestore_v1.transforms import SERVER_TIMESTAMP
document_path = _make_ref_string(u"little", u"town", u"of", u"ham")
update_data = {"cheese": 1.5, "crackers": True}
document_data = update_data.copy()
document_data["butter"] = {"popcorn": "yum", "pecan": SERVER_TIMESTAMP}
write_pbs = self._call_fut(
document_path, document_data, merge=["cheese", "butter"]
)
update_pb = self._make_write_w_document(
document_path, cheese=update_data["cheese"], butter={"popcorn": "yum"}
)
self._update_document_mask(update_pb, ["cheese", "butter"])
transform_pb = self._make_write_w_transform(
document_path, fields=["butter.pecan"]
)
expected_pbs = [update_pb, transform_pb]
self.assertEqual(write_pbs, expected_pbs)
class TestDocumentExtractorForUpdate(unittest.TestCase):
@staticmethod
def _get_target_class():
from google.cloud.firestore_v1 import _helpers
return _helpers.DocumentExtractorForUpdate
def _make_one(self, document_data):
return self._get_target_class()(document_data)
def test_ctor_w_empty_document(self):
document_data = {}
inst = self._make_one(document_data)
self.assertEqual(inst.top_level_paths, [])
def test_ctor_w_simple_keys(self):
document_data = {"a": 1, "b": 2, "c": 3}
expected_paths = [
_make_field_path("a"),
_make_field_path("b"),
_make_field_path("c"),
]
inst = self._make_one(document_data)
self.assertEqual(inst.top_level_paths, expected_paths)
def test_ctor_w_nested_keys(self):
document_data = {"a": {"d": {"e": 1}}, "b": {"f": 7}, "c": 3}
expected_paths = [
_make_field_path("a"),
_make_field_path("b"),
_make_field_path("c"),
]
inst = self._make_one(document_data)
self.assertEqual(inst.top_level_paths, expected_paths)
def test_ctor_w_dotted_keys(self):
document_data = {"a.d.e": 1, "b.f": 7, "c": 3}
expected_paths = [
_make_field_path("a", "d", "e"),
_make_field_path("b", "f"),
_make_field_path("c"),
]
inst = self._make_one(document_data)
self.assertEqual(inst.top_level_paths, expected_paths)
def test_ctor_w_nested_dotted_keys(self):
document_data = {"a.d.e": 1, "b.f": {"h.i": 9}, "c": 3}
expected_paths = [
_make_field_path("a", "d", "e"),
_make_field_path("b", "f"),
_make_field_path("c"),
]
expected_set_fields = {"a": {"d": {"e": 1}}, "b": {"f": {"h.i": 9}}, "c": 3}
inst = self._make_one(document_data)
self.assertEqual(inst.top_level_paths, expected_paths)
self.assertEqual(inst.set_fields, expected_set_fields)
class Test_pbs_for_update(unittest.TestCase):
@staticmethod
def _call_fut(document_path, field_updates, option):
from google.cloud.firestore_v1._helpers import pbs_for_update
return pbs_for_update(document_path, field_updates, option)
def _helper(self, option=None, do_transform=False, **write_kwargs):
from google.cloud.firestore_v1 import _helpers
from google.cloud.firestore_v1.field_path import FieldPath
from google.cloud.firestore_v1.transforms import SERVER_TIMESTAMP
from google.cloud.firestore_v1.gapic import enums
from google.cloud.firestore_v1.proto import common_pb2
from google.cloud.firestore_v1.proto import document_pb2
from google.cloud.firestore_v1.proto import write_pb2
document_path = _make_ref_string(u"toy", u"car", u"onion", u"garlic")
field_path1 = "bitez.yum"
value = b"\x00\x01"
field_path2 = "blog.internet"
field_updates = {field_path1: value}
if do_transform:
field_updates[field_path2] = SERVER_TIMESTAMP
write_pbs = self._call_fut(document_path, field_updates, option)
map_pb = document_pb2.MapValue(fields={"yum": _value_pb(bytes_value=value)})
field_paths = [field_path1]
expected_update_pb = write_pb2.Write(
update=document_pb2.Document(
name=document_path, fields={"bitez": _value_pb(map_value=map_pb)}
),
update_mask=common_pb2.DocumentMask(field_paths=field_paths),
**write_kwargs
)
if isinstance(option, _helpers.ExistsOption):
precondition = common_pb2.Precondition(exists=False)
expected_update_pb.current_document.CopyFrom(precondition)
expected_pbs = [expected_update_pb]
if do_transform:
transform_paths = FieldPath.from_string(field_path2)
server_val = enums.DocumentTransform.FieldTransform.ServerValue
expected_transform_pb = write_pb2.Write(
transform=write_pb2.DocumentTransform(
document=document_path,
field_transforms=[
write_pb2.DocumentTransform.FieldTransform(
field_path=transform_paths.to_api_repr(),
set_to_server_value=server_val.REQUEST_TIME,
)
],
)
)
expected_pbs.append(expected_transform_pb)
self.assertEqual(write_pbs, expected_pbs)
def test_without_option(self):
from google.cloud.firestore_v1.proto import common_pb2
precondition = common_pb2.Precondition(exists=True)
self._helper(current_document=precondition)
def test_with_exists_option(self):
from google.cloud.firestore_v1.client import _helpers
option = _helpers.ExistsOption(False)
self._helper(option=option)
def test_update_and_transform(self):
from google.cloud.firestore_v1.proto import common_pb2
precondition = common_pb2.Precondition(exists=True)
self._helper(current_document=precondition, do_transform=True)
class Test_pb_for_delete(unittest.TestCase):
@staticmethod
def _call_fut(document_path, option):
from google.cloud.firestore_v1._helpers import pb_for_delete
return pb_for_delete(document_path, option)
def _helper(self, option=None, **write_kwargs):
from google.cloud.firestore_v1.proto import write_pb2
document_path = _make_ref_string(u"chicken", u"philly", u"one", u"two")
write_pb = self._call_fut(document_path, option)
expected_pb = write_pb2.Write(delete=document_path, **write_kwargs)
self.assertEqual(write_pb, expected_pb)
def test_without_option(self):
self._helper()
def test_with_option(self):
from google.protobuf import timestamp_pb2
from google.cloud.firestore_v1.proto import common_pb2
from google.cloud.firestore_v1 import _helpers
update_time = timestamp_pb2.Timestamp(seconds=1309700594, nanos=822211297)
option = _helpers.LastUpdateOption(update_time)
precondition = common_pb2.Precondition(update_time=update_time)
self._helper(option=option, current_document=precondition)
class Test_get_transaction_id(unittest.TestCase):
@staticmethod
def _call_fut(transaction, **kwargs):
from google.cloud.firestore_v1._helpers import get_transaction_id
return get_transaction_id(transaction, **kwargs)
def test_no_transaction(self):
ret_val = self._call_fut(None)
self.assertIsNone(ret_val)
def test_invalid_transaction(self):
from google.cloud.firestore_v1.transaction import Transaction
transaction = Transaction(mock.sentinel.client)
self.assertFalse(transaction.in_progress)
with self.assertRaises(ValueError):
self._call_fut(transaction)
def test_after_writes_not_allowed(self):
from google.cloud.firestore_v1._helpers import ReadAfterWriteError
from google.cloud.firestore_v1.transaction import Transaction
transaction = Transaction(mock.sentinel.client)
transaction._id = b"under-hook"
transaction._write_pbs.append(mock.sentinel.write)
with self.assertRaises(ReadAfterWriteError):
self._call_fut(transaction)
def test_after_writes_allowed(self):
from google.cloud.firestore_v1.transaction import Transaction
transaction = Transaction(mock.sentinel.client)
txn_id = b"we-are-0fine"
transaction._id = txn_id
transaction._write_pbs.append(mock.sentinel.write)
ret_val = self._call_fut(transaction, read_operation=False)
self.assertEqual(ret_val, txn_id)
def test_good_transaction(self):
from google.cloud.firestore_v1.transaction import Transaction
transaction = Transaction(mock.sentinel.client)
txn_id = b"doubt-it"
transaction._id = txn_id
self.assertTrue(transaction.in_progress)
self.assertEqual(self._call_fut(transaction), txn_id)
class Test_metadata_with_prefix(unittest.TestCase):
@staticmethod
def _call_fut(database_string):
from google.cloud.firestore_v1._helpers import metadata_with_prefix
return metadata_with_prefix(database_string)
def test_it(self):
database_string = u"projects/prahj/databases/dee-bee"
metadata = self._call_fut(database_string)
self.assertEqual(metadata, [("google-cloud-resource-prefix", database_string)])
class TestWriteOption(unittest.TestCase):
@staticmethod
def _get_target_class():
from google.cloud.firestore_v1._helpers import WriteOption
return WriteOption
def _make_one(self, *args, **kwargs):
klass = self._get_target_class()
return klass(*args, **kwargs)
def test_modify_write(self):
option = self._make_one()
with self.assertRaises(NotImplementedError):
option.modify_write(None)
class TestLastUpdateOption(unittest.TestCase):
@staticmethod
def _get_target_class():
from google.cloud.firestore_v1._helpers import LastUpdateOption
return LastUpdateOption
def _make_one(self, *args, **kwargs):
klass = self._get_target_class()
return klass(*args, **kwargs)
def test_constructor(self):
option = self._make_one(mock.sentinel.timestamp)
self.assertIs(option._last_update_time, mock.sentinel.timestamp)
def test___eq___different_type(self):
option = self._make_one(mock.sentinel.timestamp)
other = object()
self.assertFalse(option == other)
def test___eq___different_timestamp(self):
option = self._make_one(mock.sentinel.timestamp)
other = self._make_one(mock.sentinel.other_timestamp)
self.assertFalse(option == other)
def test___eq___same_timestamp(self):
option = self._make_one(mock.sentinel.timestamp)
other = self._make_one(mock.sentinel.timestamp)
self.assertTrue(option == other)
def test_modify_write_update_time(self):
from google.protobuf import timestamp_pb2
from google.cloud.firestore_v1.proto import common_pb2
from google.cloud.firestore_v1.proto import write_pb2
timestamp_pb = timestamp_pb2.Timestamp(seconds=683893592, nanos=229362000)
option = self._make_one(timestamp_pb)
write_pb = write_pb2.Write()
ret_val = option.modify_write(write_pb)
self.assertIsNone(ret_val)
expected_doc = common_pb2.Precondition(update_time=timestamp_pb)
self.assertEqual(write_pb.current_document, expected_doc)
class TestExistsOption(unittest.TestCase):
@staticmethod
def _get_target_class():
from google.cloud.firestore_v1._helpers import ExistsOption
return ExistsOption
def _make_one(self, *args, **kwargs):
klass = self._get_target_class()
return klass(*args, **kwargs)
def test_constructor(self):
option = self._make_one(mock.sentinel.totes_bool)
self.assertIs(option._exists, mock.sentinel.totes_bool)
def test___eq___different_type(self):
option = self._make_one(mock.sentinel.timestamp)
other = object()
self.assertFalse(option == other)
def test___eq___different_exists(self):
option = self._make_one(True)
other = self._make_one(False)
self.assertFalse(option == other)
def test___eq___same_exists(self):
option = self._make_one(True)
other = self._make_one(True)
self.assertTrue(option == other)
def test_modify_write(self):
from google.cloud.firestore_v1.proto import common_pb2
from google.cloud.firestore_v1.proto import write_pb2
for exists in (True, False):
option = self._make_one(exists)
write_pb = write_pb2.Write()
ret_val = option.modify_write(write_pb)
self.assertIsNone(ret_val)
expected_doc = common_pb2.Precondition(exists=exists)
self.assertEqual(write_pb.current_document, expected_doc)
def _value_pb(**kwargs):
from google.cloud.firestore_v1.proto.document_pb2 import Value
return Value(**kwargs)
def _make_ref_string(project, database, *path):
from google.cloud.firestore_v1 import _helpers
doc_rel_path = _helpers.DOCUMENT_PATH_DELIMITER.join(path)
return u"projects/{}/databases/{}/documents/{}".format(
project, database, doc_rel_path
)
def _make_credentials():
import google.auth.credentials
return mock.Mock(spec=google.auth.credentials.Credentials)
def _make_client(project="quark"):
from google.cloud.firestore_v1.client import Client
credentials = _make_credentials()
return Client(project=project, credentials=credentials)
def _make_field_path(*fields):
from google.cloud.firestore_v1 import field_path
return field_path.FieldPath(*fields)
| 37.308431
| 88
| 0.662841
| 10,651
| 89,391
| 5.22411
| 0.051638
| 0.092466
| 0.079904
| 0.062543
| 0.842134
| 0.813612
| 0.783545
| 0.751914
| 0.716509
| 0.691995
| 0
| 0.014107
| 0.232384
| 89,391
| 2,395
| 89
| 37.324008
| 0.796788
| 0.009509
| 0
| 0.624259
| 0
| 0
| 0.040059
| 0.009783
| 0
| 0
| 0
| 0
| 0.252291
| 1
| 0.10566
| false
| 0
| 0.088949
| 0.001617
| 0.231267
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
e81daf99235737118a9e2d58e6fcc451aa1bcefd
| 10,286
|
py
|
Python
|
test/test_l2_flood.py
|
mjnitp/vpp
|
537e85deab6fd916952ff4badeda4ec5d6f1a121
|
[
"Apache-2.0"
] | 1
|
2019-03-23T21:06:14.000Z
|
2019-03-23T21:06:14.000Z
|
test/test_l2_flood.py
|
mjnitp/vpp
|
537e85deab6fd916952ff4badeda4ec5d6f1a121
|
[
"Apache-2.0"
] | 1
|
2021-06-01T23:31:18.000Z
|
2021-06-01T23:31:18.000Z
|
test/test_l2_flood.py
|
mjnitp/vpp
|
537e85deab6fd916952ff4badeda4ec5d6f1a121
|
[
"Apache-2.0"
] | null | null | null |
#!/usr/bin/env python
import unittest
import socket
from framework import VppTestCase, VppTestRunner
from vpp_ip_route import VppIpRoute, VppRoutePath
from vpp_l2 import L2_PORT_TYPE, BRIDGE_FLAGS
from scapy.packet import Raw
from scapy.layers.l2 import Ether
from scapy.layers.inet import IP, UDP
class TestL2Flood(VppTestCase):
""" L2-flood """
def setUp(self):
super(TestL2Flood, self).setUp()
# 12 l2 interface and one l3
self.create_pg_interfaces(range(13))
self.create_bvi_interfaces(1)
for i in self.pg_interfaces:
i.admin_up()
for i in self.bvi_interfaces:
i.admin_up()
self.pg12.config_ip4()
self.pg12.resolve_arp()
self.bvi0.config_ip4()
def tearDown(self):
self.pg12.unconfig_ip4()
self.bvi0.unconfig_ip4()
for i in self.pg_interfaces:
i.admin_down()
for i in self.bvi_interfaces:
i.admin_down()
super(TestL2Flood, self).tearDown()
def test_flood(self):
""" L2 Flood Tests """
#
# Create a single bridge Domain
#
self.vapi.bridge_domain_add_del(bd_id=1)
#
# add each interface to the BD. 3 interfaces per split horizon group
#
for i in self.pg_interfaces[0:4]:
self.vapi.sw_interface_set_l2_bridge(rx_sw_if_index=i.sw_if_index,
bd_id=1, shg=0)
for i in self.pg_interfaces[4:8]:
self.vapi.sw_interface_set_l2_bridge(rx_sw_if_index=i.sw_if_index,
bd_id=1, shg=1)
for i in self.pg_interfaces[8:12]:
self.vapi.sw_interface_set_l2_bridge(rx_sw_if_index=i.sw_if_index,
bd_id=1, shg=2)
for i in self.bvi_interfaces:
self.vapi.sw_interface_set_l2_bridge(rx_sw_if_index=i.sw_if_index,
bd_id=1, shg=2,
port_type=L2_PORT_TYPE.BVI)
p = (Ether(dst="ff:ff:ff:ff:ff:ff",
src="00:00:de:ad:be:ef") /
IP(src="10.10.10.10", dst="1.1.1.1") /
UDP(sport=1234, dport=1234) /
Raw('\xa5' * 100))
#
# input on pg0 expect copies on pg1->11
# this is in SHG=0 so its flooded to all, expect the pg0 since that's
# the ingress link
#
self.pg0.add_stream(p*65)
self.pg_enable_capture(self.pg_interfaces)
self.pg_start()
for i in self.pg_interfaces[1:12]:
rx0 = i.get_capture(65, timeout=1)
#
# input on pg4 (SHG=1) expect copies on pg0->3 (SHG=0)
# and pg8->11 (SHG=2)
#
self.pg4.add_stream(p*65)
self.pg_enable_capture(self.pg_interfaces)
self.pg_start()
for i in self.pg_interfaces[:4]:
rx0 = i.get_capture(65, timeout=1)
for i in self.pg_interfaces[8:12]:
rx0 = i.get_capture(65, timeout=1)
for i in self.pg_interfaces[4:8]:
i.assert_nothing_captured(remark="Different SH group")
#
# An IP route so the packet that hits the BVI is sent out of pg12
#
ip_route = VppIpRoute(self, "1.1.1.1", 32,
[VppRoutePath(self.pg12.remote_ip4,
self.pg12.sw_if_index)])
ip_route.add_vpp_config()
self.logger.info(self.vapi.cli("sh bridge 1 detail"))
#
# input on pg0 expect copies on pg1->12
# this is in SHG=0 so its flooded to all, expect the pg0 since that's
# the ingress link
#
self.pg0.add_stream(p*65)
self.pg_enable_capture(self.pg_interfaces)
self.pg_start()
for i in self.pg_interfaces[1:]:
rx0 = i.get_capture(65, timeout=1)
#
# input on pg4 (SHG=1) expect copies on pg0->3 (SHG=0)
# and pg8->12 (SHG=2)
#
self.pg4.add_stream(p*65)
self.pg_enable_capture(self.pg_interfaces)
self.pg_start()
for i in self.pg_interfaces[:4]:
rx0 = i.get_capture(65, timeout=1)
for i in self.pg_interfaces[8:13]:
rx0 = i.get_capture(65, timeout=1)
for i in self.pg_interfaces[4:8]:
i.assert_nothing_captured(remark="Different SH group")
#
# cleanup
#
for i in self.pg_interfaces[:12]:
self.vapi.sw_interface_set_l2_bridge(rx_sw_if_index=i.sw_if_index,
bd_id=1, enable=0)
for i in self.bvi_interfaces:
self.vapi.sw_interface_set_l2_bridge(rx_sw_if_index=i.sw_if_index,
bd_id=1, shg=2,
port_type=L2_PORT_TYPE.BVI,
enable=0)
self.vapi.bridge_domain_add_del(bd_id=1, is_add=0)
def test_flood_one(self):
""" L2 no-Flood Test """
#
# Create a single bridge Domain
#
self.vapi.bridge_domain_add_del(bd_id=1)
#
# add 2 interfaces to the BD. this means a flood goes to only
# one member
#
for i in self.pg_interfaces[:2]:
self.vapi.sw_interface_set_l2_bridge(rx_sw_if_index=i.sw_if_index,
bd_id=1, shg=0)
p = (Ether(dst="ff:ff:ff:ff:ff:ff",
src="00:00:de:ad:be:ef") /
IP(src="10.10.10.10", dst="1.1.1.1") /
UDP(sport=1234, dport=1234) /
Raw('\xa5' * 100))
#
# input on pg0 expect copies on pg1
#
self.send_and_expect(self.pg0, p*65, self.pg1)
#
# cleanup
#
for i in self.pg_interfaces[:2]:
self.vapi.sw_interface_set_l2_bridge(rx_sw_if_index=i.sw_if_index,
bd_id=1, enable=0)
self.vapi.bridge_domain_add_del(bd_id=1, is_add=0)
def test_uu_fwd(self):
""" UU Flood """
#
# Create a single bridge Domain
#
self.vapi.bridge_domain_add_del(bd_id=1, uu_flood=1)
#
# add each interface to the BD. 3 interfaces per split horizon group
#
for i in self.pg_interfaces[0:4]:
self.vapi.sw_interface_set_l2_bridge(rx_sw_if_index=i.sw_if_index,
bd_id=1, shg=0)
#
# an unknown unicast and braodcast packets
#
p_uu = (Ether(dst="00:00:00:c1:5c:00",
src="00:00:de:ad:be:ef") /
IP(src="10.10.10.10", dst="1.1.1.1") /
UDP(sport=1234, dport=1234) /
Raw('\xa5' * 100))
p_bm = (Ether(dst="ff:ff:ff:ff:ff:ff",
src="00:00:de:ad:be:ef") /
IP(src="10.10.10.10", dst="1.1.1.1") /
UDP(sport=1234, dport=1234) /
Raw('\xa5' * 100))
#
# input on pg0, expected copies on pg1->4
#
self.pg0.add_stream(p_uu*65)
self.pg_enable_capture(self.pg_interfaces)
self.pg_start()
for i in self.pg_interfaces[1:4]:
rx0 = i.get_capture(65, timeout=1)
self.pg0.add_stream(p_bm*65)
self.pg_enable_capture(self.pg_interfaces)
self.pg_start()
for i in self.pg_interfaces[1:4]:
rx0 = i.get_capture(65, timeout=1)
#
# use pg8 as the uu-fwd interface
#
self.vapi.sw_interface_set_l2_bridge(
rx_sw_if_index=self.pg8.sw_if_index, bd_id=1, shg=0,
port_type=L2_PORT_TYPE.UU_FWD)
#
# expect the UU packet on the uu-fwd interface and not be flooded
#
self.pg0.add_stream(p_uu*65)
self.pg_enable_capture(self.pg_interfaces)
self.pg_start()
rx0 = self.pg8.get_capture(65, timeout=1)
for i in self.pg_interfaces[0:4]:
i.assert_nothing_captured(remark="UU not flooded")
self.pg0.add_stream(p_bm*65)
self.pg_enable_capture(self.pg_interfaces)
self.pg_start()
for i in self.pg_interfaces[1:4]:
rx0 = i.get_capture(65, timeout=1)
#
# remove the uu-fwd interface and expect UU to be flooded again
#
self.vapi.sw_interface_set_l2_bridge(
rx_sw_if_index=self.pg8.sw_if_index, bd_id=1, shg=0,
port_type=L2_PORT_TYPE.UU_FWD, enable=0)
self.pg0.add_stream(p_uu*65)
self.pg_enable_capture(self.pg_interfaces)
self.pg_start()
for i in self.pg_interfaces[1:4]:
rx0 = i.get_capture(65, timeout=1)
#
# change the BD config to not support UU-flood
#
self.vapi.bridge_flags(bd_id=1, is_set=0, flags=BRIDGE_FLAGS.UU_FLOOD)
self.send_and_assert_no_replies(self.pg0, p_uu)
#
# re-add the uu-fwd interface
#
self.vapi.sw_interface_set_l2_bridge(
rx_sw_if_index=self.pg8.sw_if_index, bd_id=1, shg=0,
port_type=L2_PORT_TYPE.UU_FWD)
self.logger.info(self.vapi.cli("sh bridge 1 detail"))
self.pg0.add_stream(p_uu*65)
self.pg_enable_capture(self.pg_interfaces)
self.pg_start()
rx0 = self.pg8.get_capture(65, timeout=1)
for i in self.pg_interfaces[0:4]:
i.assert_nothing_captured(remark="UU not flooded")
#
# remove the uu-fwd interface
#
self.vapi.sw_interface_set_l2_bridge(
rx_sw_if_index=self.pg8.sw_if_index, bd_id=1, shg=0,
port_type=L2_PORT_TYPE.UU_FWD, enable=0)
self.send_and_assert_no_replies(self.pg0, p_uu)
#
# cleanup
#
for i in self.pg_interfaces[:4]:
self.vapi.sw_interface_set_l2_bridge(rx_sw_if_index=i.sw_if_index,
bd_id=1, enable=0)
self.vapi.bridge_domain_add_del(bd_id=1, is_add=0)
if __name__ == '__main__':
unittest.main(testRunner=VppTestRunner)
| 32.345912
| 78
| 0.548318
| 1,494
| 10,286
| 3.539491
| 0.119143
| 0.061271
| 0.102874
| 0.05295
| 0.787821
| 0.777988
| 0.776664
| 0.759077
| 0.732602
| 0.727685
| 0
| 0.059499
| 0.348046
| 10,286
| 317
| 79
| 32.44795
| 0.729049
| 0.121524
| 0
| 0.752874
| 0
| 0
| 0.037945
| 0
| 0
| 0
| 0
| 0
| 0.034483
| 1
| 0.028736
| false
| 0
| 0.045977
| 0
| 0.08046
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
1c09caff52a77d4565f8bb0df81803050b4e93a2
| 6,168
|
py
|
Python
|
torch/nn/intrinsic/modules/fused.py
|
ljhOfGithub/pytorch
|
c568f7b16f2a98d72ff5b7c6c6161b67b2c27514
|
[
"Intel"
] | 1
|
2022-03-02T00:28:04.000Z
|
2022-03-02T00:28:04.000Z
|
torch/nn/intrinsic/modules/fused.py
|
ljhOfGithub/pytorch
|
c568f7b16f2a98d72ff5b7c6c6161b67b2c27514
|
[
"Intel"
] | 1
|
2019-07-23T15:23:32.000Z
|
2019-07-23T15:32:23.000Z
|
torch/nn/intrinsic/modules/fused.py
|
ljhOfGithub/pytorch
|
c568f7b16f2a98d72ff5b7c6c6161b67b2c27514
|
[
"Intel"
] | 2
|
2019-07-23T14:37:31.000Z
|
2019-07-23T14:47:13.000Z
|
import torch
from torch.nn import Conv1d, Conv2d, Conv3d, ReLU, Linear, BatchNorm1d, BatchNorm2d, BatchNorm3d
# Used for identifying intrinsic modules used in quantization
class _FusedModule(torch.nn.Sequential):
pass
class ConvReLU1d(_FusedModule):
r"""This is a sequential container which calls the Conv1d and ReLU modules.
During quantization this will be replaced with the corresponding fused module."""
def __init__(self, conv, relu):
assert type(conv) == Conv1d and type(relu) == ReLU, \
'Incorrect types for input modules{}{}'.format(
type(conv), type(relu))
super().__init__(conv, relu)
class ConvReLU2d(_FusedModule):
r"""This is a sequential container which calls the Conv2d and ReLU modules.
During quantization this will be replaced with the corresponding fused module."""
def __init__(self, conv, relu):
assert type(conv) == Conv2d and type(relu) == ReLU, \
'Incorrect types for input modules{}{}'.format(
type(conv), type(relu))
super().__init__(conv, relu)
class ConvReLU3d(_FusedModule):
r"""This is a sequential container which calls the Conv3d and ReLU modules.
During quantization this will be replaced with the corresponding fused module."""
def __init__(self, conv, relu):
assert type(conv) == Conv3d and type(relu) == ReLU, \
'Incorrect types for input modules{}{}'.format(
type(conv), type(relu))
super().__init__(conv, relu)
class LinearReLU(_FusedModule):
r"""This is a sequential container which calls the Linear and ReLU modules.
During quantization this will be replaced with the corresponding fused module."""
def __init__(self, linear, relu):
assert type(linear) == Linear and type(relu) == ReLU, \
'Incorrect types for input modules{}{}'.format(
type(linear), type(relu))
super().__init__(linear, relu)
class ConvBn1d(_FusedModule):
r"""This is a sequential container which calls the Conv 1d and Batch Norm 1d modules.
During quantization this will be replaced with the corresponding fused module."""
def __init__(self, conv, bn):
assert type(conv) == Conv1d and type(bn) == BatchNorm1d, \
'Incorrect types for input modules{}{}'.format(
type(conv), type(bn))
super().__init__(conv, bn)
class ConvBn2d(_FusedModule):
r"""This is a sequential container which calls the Conv 2d and Batch Norm 2d modules.
During quantization this will be replaced with the corresponding fused module."""
def __init__(self, conv, bn):
assert type(conv) == Conv2d and type(bn) == BatchNorm2d, \
'Incorrect types for input modules{}{}'.format(
type(conv), type(bn))
super(ConvBn2d, self).__init__(conv, bn)
class ConvBnReLU1d(_FusedModule):
r"""This is a sequential container which calls the Conv 1d, Batch Norm 1d, and ReLU modules.
During quantization this will be replaced with the corresponding fused module."""
def __init__(self, conv, bn, relu):
assert type(conv) == Conv1d and type(bn) == BatchNorm1d and \
type(relu) == ReLU, 'Incorrect types for input modules{}{}{}' \
.format(type(conv), type(bn), type(relu))
super().__init__(conv, bn, relu)
class ConvBnReLU2d(_FusedModule):
r"""This is a sequential container which calls the Conv 2d, Batch Norm 2d, and ReLU modules.
During quantization this will be replaced with the corresponding fused module."""
def __init__(self, conv, bn, relu):
assert type(conv) == Conv2d and type(bn) == BatchNorm2d and \
type(relu) == ReLU, 'Incorrect types for input modules{}{}{}' \
.format(type(conv), type(bn), type(relu))
super().__init__(conv, bn, relu)
class ConvBn3d(_FusedModule):
r"""This is a sequential container which calls the Conv 3d and Batch Norm 3d modules.
During quantization this will be replaced with the corresponding fused module."""
def __init__(self, conv, bn):
assert type(conv) == Conv3d and type(bn) == BatchNorm3d, \
'Incorrect types for input modules{}{}'.format(
type(conv), type(bn))
super().__init__(conv, bn)
class ConvBnReLU3d(_FusedModule):
r"""This is a sequential container which calls the Conv 3d, Batch Norm 3d, and ReLU modules.
During quantization this will be replaced with the corresponding fused module."""
def __init__(self, conv, bn, relu):
assert type(conv) == Conv3d and type(bn) == BatchNorm3d and \
type(relu) == ReLU, 'Incorrect types for input modules{}{}{}' \
.format(type(conv), type(bn), type(relu))
super().__init__(conv, bn, relu)
class BNReLU2d(_FusedModule):
r"""This is a sequential container which calls the BatchNorm 2d and ReLU modules.
During quantization this will be replaced with the corresponding fused module."""
def __init__(self, batch_norm, relu):
assert type(batch_norm) == BatchNorm2d and type(relu) == ReLU, \
'Incorrect types for input modules{}{}'.format(
type(batch_norm), type(relu))
super().__init__(batch_norm, relu)
class BNReLU3d(_FusedModule):
r"""This is a sequential container which calls the BatchNorm 3d and ReLU modules.
During quantization this will be replaced with the corresponding fused module."""
def __init__(self, batch_norm, relu):
assert type(batch_norm) == BatchNorm3d and type(relu) == ReLU, \
'Incorrect types for input modules{}{}'.format(
type(batch_norm), type(relu))
super().__init__(batch_norm, relu)
class LinearBn1d(_FusedModule):
r"""This is a sequential container which calls the Linear and BatchNorm1d modules.
During quantization this will be replaced with the corresponding fused module."""
def __init__(self, linear, bn):
assert type(linear) == Linear and type(bn) == BatchNorm1d, \
'Incorrect types for input modules{}{}'.format(type(linear), type(bn))
super().__init__(linear, bn)
| 49.344
| 96
| 0.666342
| 787
| 6,168
| 5.062262
| 0.090216
| 0.036145
| 0.052209
| 0.058735
| 0.877259
| 0.877259
| 0.866215
| 0.861697
| 0.833082
| 0.828062
| 0
| 0.011543
| 0.227464
| 6,168
| 124
| 97
| 49.741935
| 0.824554
| 0.344196
| 0
| 0.468085
| 0
| 0
| 0.124013
| 0
| 0
| 0
| 0
| 0
| 0.138298
| 1
| 0.138298
| false
| 0.010638
| 0.021277
| 0
| 0.308511
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.